Skip to content

Commit 237b15d

Browse files
authored
fix: change app_profile_id to the correct header app_profile (#318)
1 parent 29da6de commit 237b15d

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ private <ReqT, RowT> ServerStreamingCallable<ReadRowsRequest, RowT> createReadRo
303303
public Map<String, String> extract(ReadRowsRequest readRowsRequest) {
304304
return ImmutableMap.of(
305305
"table_name", readRowsRequest.getTableName(),
306-
"app_profile_id", readRowsRequest.getAppProfileId());
306+
"app_profile", readRowsRequest.getAppProfileId());
307307
}
308308
})
309309
.build(),
@@ -360,7 +360,7 @@ public Map<String, String> extract(
360360
SampleRowKeysRequest sampleRowKeysRequest) {
361361
return ImmutableMap.of(
362362
"table_name", sampleRowKeysRequest.getTableName(),
363-
"app_profile_id", sampleRowKeysRequest.getAppProfileId());
363+
"app_profile", sampleRowKeysRequest.getAppProfileId());
364364
}
365365
})
366366
.build(),
@@ -394,7 +394,7 @@ private UnaryCallable<RowMutation, Void> createMutateRowCallable() {
394394
public Map<String, String> extract(MutateRowRequest mutateRowRequest) {
395395
return ImmutableMap.of(
396396
"table_name", mutateRowRequest.getTableName(),
397-
"app_profile_id", mutateRowRequest.getAppProfileId());
397+
"app_profile", mutateRowRequest.getAppProfileId());
398398
}
399399
})
400400
.build(),
@@ -507,7 +507,7 @@ private UnaryCallable<MutateRowsRequest, Void> createMutateRowsBaseCallable() {
507507
public Map<String, String> extract(MutateRowsRequest mutateRowsRequest) {
508508
return ImmutableMap.of(
509509
"table_name", mutateRowsRequest.getTableName(),
510-
"app_profile_id", mutateRowsRequest.getAppProfileId());
510+
"app_profile", mutateRowsRequest.getAppProfileId());
511511
}
512512
})
513513
.build(),
@@ -549,7 +549,7 @@ public Map<String, String> extract(
549549
CheckAndMutateRowRequest checkAndMutateRowRequest) {
550550
return ImmutableMap.of(
551551
"table_name", checkAndMutateRowRequest.getTableName(),
552-
"app_profile_id", checkAndMutateRowRequest.getAppProfileId());
552+
"app_profile", checkAndMutateRowRequest.getAppProfileId());
553553
}
554554
})
555555
.build(),
@@ -583,7 +583,7 @@ private UnaryCallable<ReadModifyWriteRow, Row> createReadModifyWriteRowCallable(
583583
public Map<String, String> extract(ReadModifyWriteRowRequest request) {
584584
return ImmutableMap.of(
585585
"table_name", request.getTableName(),
586-
"app_profile_id", request.getAppProfileId());
586+
"app_profile", request.getAppProfileId());
587587
}
588588
})
589589
.build(),

google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/HeadersTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ private void verifyHeaderSent() {
175175
String requestParamsvalue = metadata.get(X_GOOG_REQUEST_PARAMS_KEY);
176176
assertThat(requestParamsvalue).containsMatch("(^|.*&)table_name=" + TABLE_NAME + "($|&.*)");
177177
assertThat(requestParamsvalue)
178-
.containsMatch("(^|.*&)app_profile_id=" + APP_PROFILE_ID + "($|&.*)");
178+
.containsMatch("(^|.*&)app_profile=" + APP_PROFILE_ID + "($|&.*)");
179179

180180
String apiClientValue = metadata.get(API_CLIENT_HEADER_KEY);
181181
assertThat(apiClientValue).containsMatch("gl-java/[.\\d_]+");

0 commit comments

Comments
 (0)