[
https://issues.apache.org/jira/browse/BEAM-9577?focusedWorklogId=442051&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-442051
]
ASF GitHub Bot logged work on BEAM-9577:
----------------------------------------
Author: ASF GitHub Bot
Created on: 05/Jun/20 22:04
Start Date: 05/Jun/20 22:04
Worklog Time Spent: 10m
Work Description: ibzib commented on a change in pull request #11932:
URL: https://github.com/apache/beam/pull/11932#discussion_r436178918
##########
File path:
runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/artifact/ArtifactRetrievalService.java
##########
@@ -89,34 +92,41 @@ public void resolveArtifacts(
public void getArtifact(
ArtifactApi.GetArtifactRequest request,
StreamObserver<ArtifactApi.GetArtifactResponse> responseObserver) {
- switch (request.getArtifact().getTypeUrn()) {
+ try {
+ InputStream inputStream = getArtifact(request.getArtifact());
+ byte[] buffer = new byte[bufferSize];
+ int bytesRead;
+ while ((bytesRead = inputStream.read(buffer)) > 0) {
+ responseObserver.onNext(
+ ArtifactApi.GetArtifactResponse.newBuilder()
+ .setData(ByteString.copyFrom(buffer, 0, bytesRead))
+ .build());
+ }
+ responseObserver.onCompleted();
+ } catch (IOException exn) {
+ exn.printStackTrace();
+ responseObserver.onError(exn);
Review comment:
Should we have wrapped this exception in a StatusException as well?
----------------------------------------------------------------
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: 442051)
Time Spent: 24h 20m (was: 24h 10m)
> Update artifact staging and retrieval protocols to be dependency aware.
> -----------------------------------------------------------------------
>
> Key: BEAM-9577
> URL: https://issues.apache.org/jira/browse/BEAM-9577
> Project: Beam
> Issue Type: Improvement
> Components: beam-model
> Reporter: Robert Bradshaw
> Assignee: Robert Bradshaw
> Priority: P2
> Time Spent: 24h 20m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)