[
https://issues.apache.org/jira/browse/GOBBLIN-897?focusedWorklogId=338914&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-338914
]
ASF GitHub Bot logged work on GOBBLIN-897:
------------------------------------------
Author: ASF GitHub Bot
Created on: 05/Nov/19 18:29
Start Date: 05/Nov/19 18:29
Worklog Time Spent: 10m
Work Description: zxcware commented on pull request #2755: [GOBBLIN-897]
adds local FS spec executor to write jobs to a local dir
URL: https://github.com/apache/incubator-gobblin/pull/2755#discussion_r342724920
##########
File path:
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/spec_executorInstance/LocalFsSpecProducer.java
##########
@@ -94,7 +96,14 @@ public LocalFsSpecProducer(Config config) {
* @param headers*/
@Override
public Future<?> deleteSpec(URI deletedSpecURI, Properties headers) {
- return new CompletedFuture<>(Boolean.TRUE, null);
+ String[] uriTokens = deletedSpecURI.getPath().split("/");
+ String jobFileName = String.join("_", uriTokens) + ".job";
+ File file = new File(jobFileName);
+ if (file.delete()) {
+ log.info("Deleted spec: {}", jobFileName);
+ return new CompletedFuture<>(Boolean.TRUE, null);
+ }
+ throw new RuntimeException(String.format("Failed to delete file with uri
%s", deletedSpecURI));
Review comment:
This shouldn't halt the service, return a `CompletedFuture` with an
exception and expect the invoker to do proper error handling.
----------------------------------------------------------------
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: 338914)
Time Spent: 1h 50m (was: 1h 40m)
> Implement Local FS Spec Executor
> --------------------------------
>
> Key: GOBBLIN-897
> URL: https://issues.apache.org/jira/browse/GOBBLIN-897
> Project: Apache Gobblin
> Issue Type: New Feature
> Components: gobblin-core, gobblin-service
> Affects Versions: 0.15.0
> Reporter: William Lo
> Assignee: Abhishek Tiwari
> Priority: Major
> Fix For: 0.15.0
>
> Time Spent: 1h 50m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)