diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ConnectionWorker.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ConnectionWorker.java index e826d02cae..730bee7e2a 100644 --- a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ConnectionWorker.java +++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ConnectionWorker.java @@ -735,8 +735,8 @@ public Load getLoad() { public abstract static class Load { // Consider the load on this worker to be overwhelmed when above some percentage of // in-flight bytes or in-flight requests count. - private static double overwhelmedInflightCount = 0.5; - private static double overwhelmedInflightBytes = 0.6; + private static double overwhelmedInflightCount = 0.2; + private static double overwhelmedInflightBytes = 0.2; // Number of in-flight requests bytes in the worker. abstract long inFlightRequestsBytes(); diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ConnectionWorkerPool.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ConnectionWorkerPool.java index 3e042eb115..fc6152959d 100644 --- a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ConnectionWorkerPool.java +++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ConnectionWorkerPool.java @@ -163,7 +163,7 @@ public abstract static class Settings { public static Builder builder() { return new AutoValue_ConnectionWorkerPool_Settings.Builder() .setMinConnectionsPerRegion(2) - .setMaxConnectionsPerRegion(10); + .setMaxConnectionsPerRegion(20); } /** Builder for the options to config {@link ConnectionWorkerPool}. */ diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/StreamWriter.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/StreamWriter.java index 6a65b30f99..e4dc85e5ca 100644 --- a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/StreamWriter.java +++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/StreamWriter.java @@ -213,15 +213,16 @@ private StreamWriter(Builder builder) throws IOException { String fetchedLocation = writeStream.getLocation(); log.info( String.format( - "Fethed location %s for stream name %s", fetchedLocation, streamName)); + "Fethed location %s for stream name %s, extracted project and dataset name: %s\"", + fetchedLocation, streamName, datasetAndProjectName)); return fetchedLocation; }); if (location.isEmpty()) { throw new IllegalStateException( String.format( "The location is empty for both user passed in value and looked up value for " - + "stream: %s", - streamName)); + + "stream: %s, extracted project and dataset name: %s", + streamName, datasetAndProjectName)); } } this.location = location; diff --git a/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1/ConnectionWorkerPoolTest.java b/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1/ConnectionWorkerPoolTest.java index fa551c0a6b..cba5bf3fe6 100644 --- a/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1/ConnectionWorkerPoolTest.java +++ b/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1/ConnectionWorkerPoolTest.java @@ -68,6 +68,8 @@ public void setUp() throws Exception { .setCredentialsProvider(NoCredentialsProvider.create()) .setTransportChannelProvider(serviceHelper.createChannelProvider()) .build()); + ConnectionWorker.Load.setOverwhelmedCountsThreshold(0.5); + ConnectionWorker.Load.setOverwhelmedBytesThreshold(0.6); } @Test