Skip to content

Commit

Permalink
OOZIE-2246 CoordinatorInputCheckCommand does not behave properly when…
Browse files Browse the repository at this point in the history
… har file is one of data dependency and doesn't exist
  • Loading branch information
Purshotam Shah committed Mar 3, 2016
1 parent 6aa8476 commit d04b243
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,15 @@ public boolean exists(URI uri, Configuration conf, String user) throws URIHandle
FileSystem fs = getFileSystem(uri, conf, user);
return fs.exists(getNormalizedPath(uri));
}
catch (HadoopAccessorException e) {
if (ErrorCode.E0902.equals(e.getErrorCode()) && e.getMessage() != null
&& e.getMessage().indexOf("Invalid path for the Har Filesystem. No index file") != -1) {
return false;
}
else {
throw e;
}
}
catch (IOException e) {
throw new HadoopAccessorException(ErrorCode.E0902, e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1017,4 +1017,20 @@ private CoordinatorActionBean checkCoordAction(String actionId, String expDeps,
throw new Exception("Action ID " + actionId + " was not stored properly in db");
}
}

public void testHarFileInputCheck() throws Exception {
CoordinatorJobBean job = addRecordToCoordJobTableForWaiting("coord-job-for-action-input-check.xml",
CoordinatorJob.Status.RUNNING, false, true);
String pathName = createTestCaseSubDir("2009/01/29".split("/"));
CoordJobQueryExecutor.getInstance().executeUpdate(CoordJobQueryExecutor.CoordJobQuery.UPDATE_COORD_JOB, job);
String missingDeps = "file://" + pathName + CoordELFunctions.INSTANCE_SEPARATOR
+ "har:///dirx/archive.har/data";
String actionId1 = addInitRecords(missingDeps, null, TZ, job, 1);
new CoordActionInputCheckXCommand(actionId1, job.getId()).call();
CoordinatorActionBean coordAction = CoordActionQueryExecutor.getInstance()
.get(CoordActionQuery.GET_COORD_ACTION, actionId1);
// the directory (2009/01/29) exists and successfully removed from
// missing dependency of the coord action
assertEquals(coordAction.getMissingDependencies(), "har:///dirx/archive.har/data");
}
}
1 change: 1 addition & 0 deletions release-log.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
-- Oozie 4.3.0 release (trunk - unreleased)

OOZIE-2246 CoordinatorInputCheckCommand does not behave properly when har file is one of data dependency and doesn't exist (satishsaley via puru)
OOZIE-2446 Job does not fail during submission if non existent credential is specified (satishsaley via puru)
OOZIE-2283 Documentation should not say that System.exit is not allowed in Java Action (eeeva via rkanter)
OOZIE-2400 Workflow xml configuration parser cannot deal with namespace prefix (lars_francke via rkanter)
Expand Down

0 comments on commit d04b243

Please sign in to comment.