Title: expose HttpRequest.setInterceptor to allow for throttled uploads · Issue #3534 · googleapis/google-cloud-java · GitHub
Open Graph Title: expose HttpRequest.setInterceptor to allow for throttled uploads · Issue #3534 · googleapis/google-cloud-java
X Title: expose HttpRequest.setInterceptor to allow for throttled uploads · Issue #3534 · googleapis/google-cloud-java
Description: We have a multi-threaded uploader which transfers large files from local disk to GCS. The uploader is co-located with our low-latency app. inside the JVM. To control latency, we must throttle the uploader. Our best workaround involves re...
Open Graph Description: We have a multi-threaded uploader which transfers large files from local disk to GCS. The uploader is co-located with our low-latency app. inside the JVM. To control latency, we must throttle the u...
X Description: We have a multi-threaded uploader which transfers large files from local disk to GCS. The uploader is co-located with our low-latency app. inside the JVM. To control latency, we must throttle the u...
Opengraph URL: https://github.com/googleapis/google-cloud-java/issues/3534
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"expose HttpRequest.setInterceptor to allow for throttled uploads","articleBody":"We have a multi-threaded uploader which transfers large files from local disk to GCS. The uploader is co-located with our low-latency app. inside the JVM. To control latency, we must throttle the uploader. Our best workaround involves resorting to reflection in order to install `HttpRequest` interceptor which effectively wraps `HttpContent` with a throttled `OutputStream`; e.g.,\r\n\r\n```\r\nObject storageRpc = FieldUtils.getField(storage.getClass(), \"storageRpc\", true).get(storage);\r\nObject serviceStorage = FieldUtils.getField(storageRpc.getClass(), \"storage\", true).get(storageRpc);\r\nObject requestFactory = FieldUtils.getField(serviceStorage.getClass(), \"requestFactory\", true).get(serviceStorage);\r\nField initializerField = FieldUtils.getField(requestFactory.getClass(), \"initializer\", true);\r\nObject initializer = initializerField.get(requestFactory);\r\ninitializerField.set(requestFactory, new InterceptingHttpRequestInitializer((HttpRequestInitializer) initializer));\r\n``` ","author":{"url":"https://github.com/srosenberg","@type":"Person","name":"srosenberg"},"datePublished":"2018-08-06T15:43:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/3534/google-cloud-java/issues/3534"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0af1a3bc-51c1-f09e-d00f-bdaa16a33fdf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ED2C:35620A:141893B:1D41A34:6A4CE0C6 |
| html-safe-nonce | c3380603db0675a33a28910b8c985fa26b7a2bea2cdb14faafce4ab4e5e407e6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRDJDOjM1NjIwQToxNDE4OTNCOjFENDFBMzQ6NkE0Q0UwQzYiLCJ2aXNpdG9yX2lkIjoiMzM5Mjc2MzgyMDc1Njc0ODIyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 0ba1f05dcb666f89ea28a5d69f349dac3378360bc8d714c2c93952a7b2e45866 |
| hovercard-subject-tag | issue:347977885 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-java/3534/issue_layout |
| twitter:image | https://opengraph.githubassets.com/56cffa4713898f9e3e3888eb810210d09dc7a726efdfd1ff71b43a8dcd0ba664/googleapis/google-cloud-java/issues/3534 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/56cffa4713898f9e3e3888eb810210d09dc7a726efdfd1ff71b43a8dcd0ba664/googleapis/google-cloud-java/issues/3534 |
| og:image:alt | We have a multi-threaded uploader which transfers large files from local disk to GCS. The uploader is co-located with our low-latency app. inside the JVM. To control latency, we must throttle the u... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | srosenberg |
| hostname | github.com |
| expected-hostname | github.com |
| None | 299b43bca6e02ad35197ffeba30d2466846d5fb02ab96fbced5b5e6cec589fb8 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-java git https://github.com/googleapis/google-cloud-java.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 26181278 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 26181278 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3eeb74f55ccd8a31bdaec6839577c592bbf7844c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width