mudit-97 commented on code in PR #266:
URL: https://github.com/apache/tez/pull/266#discussion_r1115428110
##########
tez-dag/src/test/java/org/apache/tez/dag/app/TestDAGAppMaster.java:
##########
@@ -332,6 +339,92 @@ public void testParseAllPluginsCustomAndYarnSpecified()
throws IOException {
assertEquals(TC_NAME + CLASS_SUFFIX, tcDescriptors.get(1).getClassName());
}
+ @Test
+ public void testShutdownTezAMWithMissingRecovery() throws Exception {
+
+ TezConfiguration conf = new TezConfiguration();
+ conf.setBoolean(TezConfiguration.TEZ_AM_CREDENTIALS_MERGE, true);
+ conf.setBoolean(TezConfiguration.TEZ_LOCAL_MODE, true);
+ conf.set(TezConfiguration.TEZ_AM_STAGING_DIR, TEST_DIR.toString());
+ conf.setBoolean(TezConfiguration.TEZ_AM_FAILURE_ON_MISSING_RECOVERY_DATA,
true);
+ conf.setBoolean(TezConfiguration.DAG_RECOVERY_ENABLED, true);
+ ApplicationId appId = ApplicationId.newInstance(1, 1);
+ ApplicationAttemptId attemptId = ApplicationAttemptId.newInstance(appId,
2);
+
+ FileSystem spyRecoveryFs = spy(new FileSystem() {
+ @Override
+ public URI getUri() {
+ return null;
+ }
+
+ @Override
+ public FSDataInputStream open(Path path, int i) throws IOException {
+ return null;
+ }
+
+ @Override
+ public FSDataOutputStream create(Path path, FsPermission fsPermission,
boolean b,
Review Comment:
@abstractdog , I tried to create a spy filesystem object, FileSystem was an
abstract hadoop class and it had the similar variable names so I kept them
same, these I just created for placeholder because I needed to create an
instance of Filesystem and kept in parity with main class, if needed I will
replace these with some other names
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]