[
https://issues.apache.org/jira/browse/BEAM-6993?focusedWorklogId=227735&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-227735
]
ASF GitHub Bot logged work on BEAM-6993:
----------------------------------------
Author: ASF GitHub Bot
Created on: 15/Apr/19 14:23
Start Date: 15/Apr/19 14:23
Worklog Time Spent: 10m
Work Description: mxm commented on pull request #8303: [BEAM-6993] Ignore
missing artifacts dir during cleanup
URL: https://github.com/apache/beam/pull/8303#discussion_r275384983
##########
File path:
runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/artifact/BeamFileSystemArtifactStagingService.java
##########
@@ -165,7 +165,8 @@ public void removeArtifacts(String stagingSessionToken)
throws Exception {
ResourceId artifactsResourceId =
dir.resolve(ARTIFACTS, StandardResolveOptions.RESOLVE_DIRECTORY);
LOG.debug("Removing artifacts: {}", artifactsResourceId);
- FileSystems.delete(Collections.singletonList(artifactsResourceId));
+ FileSystems.delete(
+ Collections.singletonList(artifactsResourceId),
StandardMoveOptions.IGNORE_MISSING_FILES);
Review comment:
That's true. I still think it would be cleaner to only delete if it is
necessary. Just to keep things explicit. Who knows how the delete order might
change in the future?
I'd prefer one of these two options:
1. create the directory even if no files were staged, we can then delete it
afterwards
2. skip deletion of the directory in case no files were staged, we then do
not have to ignore a missing directory
----------------------------------------------------------------
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: 227735)
Time Spent: 1h 40m (was: 1.5h)
> Default to cleaning staged artifacts after running portable pipeline
> --------------------------------------------------------------------
>
> Key: BEAM-6993
> URL: https://issues.apache.org/jira/browse/BEAM-6993
> Project: Beam
> Issue Type: Improvement
> Components: sdk-java-core
> Reporter: Maximilian Michels
> Assignee: Maximilian Michels
> Priority: Major
> Labels: portability
> Fix For: 2.13.0
>
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> The default is to accumulate staged artifacts of portable pipelines. I think
> we should change that to delete them after pipeline execution has finished.
> There is already configuration to override it.
> CC [~angoenka] [~thw]]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)