[
https://issues.apache.org/jira/browse/BEAM-10699?focusedWorklogId=475057&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-475057
]
ASF GitHub Bot logged work on BEAM-10699:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 26/Aug/20 23:44
Start Date: 26/Aug/20 23:44
Worklog Time Spent: 10m
Work Description: ihji commented on a change in pull request #12609:
URL: https://github.com/apache/beam/pull/12609#discussion_r477695112
##########
File path:
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryServicesImpl.java
##########
@@ -1014,34 +1021,33 @@ private static boolean nextBackOff(Sleeper sleeper,
BackOff backoff) throws Inte
}
/** Returns a BigQuery client builder using the specified {@link
BigQueryOptions}. */
- private static Bigquery.Builder newBigQueryClient(BigQueryOptions options) {
+ private static Bigquery.Builder newBigQueryClient(
+ BigQueryOptions options, @Nullable Histogram requestLatencies) {
RetryHttpRequestInitializer httpRequestInitializer =
new RetryHttpRequestInitializer(ImmutableList.of(404));
httpRequestInitializer.setCustomErrors(createBigQueryClientCustomErrors());
httpRequestInitializer.setWriteTimeout(options.getHTTPWriteTimeout());
+ ImmutableList.Builder<HttpRequestInitializer> initBuilder =
ImmutableList.builder();
+ Credentials credential = options.getGcpCredential();
+ initBuilder.add(
+ credential == null
+ ? new NullCredentialInitializer()
+ : new HttpCredentialsAdapter(credential));
+ // Do not log 404. It clutters the output and is possibly even required by
the
+ // caller.
+ initBuilder.add(httpRequestInitializer);
+ if (requestLatencies != null) {
+ initBuilder.add(new
LatencyRecordingHttpRequestInitializer(requestLatencies));
+ }
+ HttpRequestInitializer chainInitializer =
Review comment:
I didn't observe any performance difference before and after applying
this change. Recording is done in a constant time and percentile estimation
only requires a linear time depending on the number of buckets (which is also
small like few thousands).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 475057)
Time Spent: 4h 20m (was: 4h 10m)
> Identify and log additional information needed to debug streaming insert
> requests for Java SDK
> ----------------------------------------------------------------------------------------------
>
> Key: BEAM-10699
> URL: https://issues.apache.org/jira/browse/BEAM-10699
> Project: Beam
> Issue Type: Improvement
> Components: io-java-gcp
> Reporter: Heejong Lee
> Assignee: Heejong Lee
> Priority: P2
> Time Spent: 4h 20m
> Remaining Estimate: 0h
>
> implement logging for per worker statistics:
> - Request count - for that window.
> - Error codes + number of occurrences for that window (Or perhaps just log
> each error with as much detail as possible.)
> - Tail latencies of requests (50, 90 and 99, percentiles)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)