|
19 | 19 | import com.google.api.gax.batching.FlowController; |
20 | 20 | import com.google.api.gax.core.CredentialsProvider; |
21 | 21 | import com.google.api.gax.core.ExecutorProvider; |
22 | | -import com.google.api.gax.rpc.FixedHeaderProvider; |
23 | 22 | import com.google.api.gax.rpc.TransportChannelProvider; |
24 | 23 | import com.google.auto.value.AutoOneOf; |
25 | 24 | import com.google.auto.value.AutoValue; |
@@ -276,10 +275,6 @@ private BigQueryWriteClient getBigQueryWriteClient(Builder builder) throws IOExc |
276 | 275 | .setCredentialsProvider(builder.credentialsProvider) |
277 | 276 | .setTransportChannelProvider(builder.channelProvider) |
278 | 277 | .setEndpoint(builder.endpoint) |
279 | | - // (b/185842996): Temporily fix this by explicitly providing the header. |
280 | | - .setHeaderProvider( |
281 | | - FixedHeaderProvider.create( |
282 | | - "x-goog-request-params", "write_stream=" + this.streamName)) |
283 | 278 | .build(); |
284 | 279 | testOnlyClientCreatedTimes++; |
285 | 280 | return BigQueryWriteClient.create(stubSettings); |
@@ -391,11 +386,7 @@ public void close() { |
391 | 386 | singleConnectionOrConnectionPool.close(this); |
392 | 387 | } |
393 | 388 |
|
394 | | - /** |
395 | | - * Constructs a new {@link StreamWriterV2.Builder} using the given stream and client. AppendRows |
396 | | - * needs special headers to be added to client, so a passed in client will not work. This should |
397 | | - * be used by test only. |
398 | | - */ |
| 389 | + /** Constructs a new {@link StreamWriterV2.Builder} using the given stream and client. */ |
399 | 390 | public static StreamWriter.Builder newBuilder(String streamName, BigQueryWriteClient client) { |
400 | 391 | return new StreamWriter.Builder(streamName, client); |
401 | 392 | } |
|
0 commit comments