[
https://issues.apache.org/jira/browse/BEAM-9577?focusedWorklogId=451731&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-451731
]
ASF GitHub Bot logged work on BEAM-9577:
----------------------------------------
Author: ASF GitHub Bot
Created on: 26/Jun/20 20:24
Start Date: 26/Jun/20 20:24
Worklog Time Spent: 10m
Work Description: lukecwik commented on a change in pull request #11938:
URL: https://github.com/apache/beam/pull/11938#discussion_r446390607
##########
File path:
runners/portability/java/src/main/java/org/apache/beam/runners/portability/PortableRunner.java
##########
@@ -188,43 +178,24 @@ public PipelineResult run(Pipeline pipeline) {
prepareJobResponse.getArtifactStagingEndpoint();
String stagingSessionToken = prepareJobResponse.getStagingSessionToken();
- List<StagedFile> filesToStage = createFilesToStage(pipelineProto);
-
- String retrievalToken = null;
try (CloseableResource<ManagedChannel> artifactChannel =
CloseableResource.of(
channelFactory.forDescriptor(artifactStagingEndpoint),
ManagedChannel::shutdown)) {
- LOG.debug("Actual files staged: {}", filesToStage);
- try {
- ArtifactStagingService.offer(
- new ArtifactRetrievalService(),
- ArtifactStagingServiceGrpc.newStub(artifactChannel.get()),
- stagingSessionToken);
- retrievalToken = "";
- } catch (ExecutionException exn) {
- if (exn.getCause() instanceof StatusRuntimeException
- && ((StatusRuntimeException)
exn.getCause()).getStatus().getCode()
- == Status.Code.UNIMPLEMENTED) {
- // Attempt legacy staging.
- ArtifactServiceStager stager =
ArtifactServiceStager.overChannel(artifactChannel.get());
- retrievalToken = stager.stage(stagingSessionToken, filesToStage);
- } else {
- throw exn;
- }
- }
+ ArtifactStagingService.offer(
+ new ArtifactRetrievalService(),
+ ArtifactStagingServiceGrpc.newStub(artifactChannel.get()),
+ stagingSessionToken);
} catch (CloseableResource.CloseException e) {
LOG.warn("Error closing artifact staging channel", e);
// CloseExceptions should only be thrown while closing the channel.
- checkState(retrievalToken != null);
} catch (Exception e) {
throw new RuntimeException("Error staging files.", e);
}
RunJobRequest runJobRequest =
RunJobRequest.newBuilder()
.setPreparationId(prepareJobResponse.getPreparationId())
- .setRetrievalToken(retrievalToken)
Review comment:
As a followup I'm assuming we can finally deprecate the retrieval token
field from the proto and the few places it still exists.
----------------------------------------------------------------
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: 451731)
Time Spent: 27h 40m (was: 27.5h)
> 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: 27h 40m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)