[
https://issues.apache.org/jira/browse/BEAM-8815?focusedWorklogId=349236&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-349236
]
ASF GitHub Bot logged work on BEAM-8815:
----------------------------------------
Author: ASF GitHub Bot
Created on: 25/Nov/19 18:08
Start Date: 25/Nov/19 18:08
Worklog Time Spent: 10m
Work Description: robertwb commented on pull request #10205: [BEAM-8815]
Skip manifest when no artifacts are staged
URL: https://github.com/apache/beam/pull/10205#discussion_r350339812
##########
File path:
runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/artifact/AbstractArtifactStagingService.java
##########
@@ -77,25 +79,27 @@ public abstract String getArtifactUri(String
stagingSessionToken, String encoded
public void commitManifest(
CommitManifestRequest request, StreamObserver<CommitManifestResponse>
responseObserver) {
try {
- String stagingSessionToken = request.getStagingSessionToken();
- ProxyManifest.Builder proxyManifestBuilder =
- ProxyManifest.newBuilder().setManifest(request.getManifest());
- for (ArtifactMetadata artifactMetadata :
request.getManifest().getArtifactList()) {
- proxyManifestBuilder.addLocation(
- Location.newBuilder()
- .setName(artifactMetadata.getName())
- .setUri(getArtifactUri(stagingSessionToken,
encodedFileName(artifactMetadata)))
- .build());
- }
- try (WritableByteChannel manifestWritableByteChannel =
openManifest(stagingSessionToken)) {
- manifestWritableByteChannel.write(
-
CHARSET.encode(JsonFormat.printer().print(proxyManifestBuilder.build())));
+ String retrievalToken = NO_ARTIFACTS_STAGED_TOKEN;
Review comment:
Style: I would prefer
```
if (request.getManifest().getArtifactCount() == 0) {
retrievalToken = NO_ARTIFACTS_STAGED_TOKEN
} else {
...
}
to avoid re-assignment.
```
----------------------------------------------------------------
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: 349236)
Time Spent: 40m (was: 0.5h)
> Portable pipeline execution without artifact staging
> ----------------------------------------------------
>
> Key: BEAM-8815
> URL: https://issues.apache.org/jira/browse/BEAM-8815
> Project: Beam
> Issue Type: Task
> Components: runner-core, runner-flink
> Affects Versions: 2.17.0
> Reporter: Thomas Weise
> Assignee: Thomas Weise
> Priority: Major
> Labels: portability
> Time Spent: 40m
> Remaining Estimate: 0h
>
> The default artifact staging implementation relies on a distributed
> filesystem. A directory and manifest will be created even when artifact
> staging isn't used, and the container boot code will fail retrieving
> artifacts, even though there are non. In a containerized environment it is
> common to package artifacts into containers. It should be possible to run the
> pipeline w/o a distributed filesystem.
> [https://lists.apache.org/thread.html/1b0d545955a80688ea19f227ad943683747b17beb45368ad0908fd21@%3Cdev.beam.apache.org%3E]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)