HADOOP-12469. distcp shout not ignore the ignoreFailures option. Contributed by Mingliang Liu.
This commit is contained in:
parent
18950c0a55
commit
fa5a54cac7
|
@ -1277,6 +1277,9 @@ Release 2.8.0 - UNRELEASED
|
||||||
HADOOP-12441. Fixed shell-kill command behaviour to work correctly on some
|
HADOOP-12441. Fixed shell-kill command behaviour to work correctly on some
|
||||||
Linux distributions after HADOOP-12317. (Wangda Tan via vinodkv)
|
Linux distributions after HADOOP-12317. (Wangda Tan via vinodkv)
|
||||||
|
|
||||||
|
HADOOP-12469. distcp shout not ignore the ignoreFailures option.
|
||||||
|
(Mingliang Liu via wheat9)
|
||||||
|
|
||||||
Release 2.7.2 - UNRELEASED
|
Release 2.7.2 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -288,7 +288,7 @@ public class CopyMapper extends Mapper<Text, CopyListingFileStatus, Text, Text>
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
context.setStatus("Copy Failure: " + sourceFileStatus.getPath());
|
context.setStatus("Copy Failure: " + sourceFileStatus.getPath());
|
||||||
throw new IOException("File copy failed: " + sourceFileStatus.getPath() +
|
throw new IOException("File copy failed: " + sourceFileStatus.getPath() +
|
||||||
" --> " + target, e);
|
" --> " + target, e.getCause());
|
||||||
}
|
}
|
||||||
incrementCounter(context, Counter.BYTESEXPECTED, sourceFileStatus.getLen());
|
incrementCounter(context, Counter.BYTESEXPECTED, sourceFileStatus.getLen());
|
||||||
incrementCounter(context, Counter.BYTESCOPIED, bytesCopied);
|
incrementCounter(context, Counter.BYTESCOPIED, bytesCopied);
|
||||||
|
|
|
@ -713,7 +713,7 @@ public class TestCopyMapper {
|
||||||
// wrapped twice - once in RetriableCommand and again in CopyMapper
|
// wrapped twice - once in RetriableCommand and again in CopyMapper
|
||||||
// itself.
|
// itself.
|
||||||
if (e.getCause() == null || e.getCause().getCause() == null ||
|
if (e.getCause() == null || e.getCause().getCause() == null ||
|
||||||
!(e.getCause().getCause() instanceof AccessControlException)) {
|
!(e.getCause() instanceof AccessControlException)) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -841,8 +841,10 @@ public class TestCopyMapper {
|
||||||
}
|
}
|
||||||
catch (Exception exception) {
|
catch (Exception exception) {
|
||||||
// Check that the exception suggests the use of -pb/-skipCrc.
|
// Check that the exception suggests the use of -pb/-skipCrc.
|
||||||
Assert.assertTrue("Failure exception should have suggested the use of -pb.", exception.getCause().getCause().getMessage().contains("pb"));
|
Assert.assertTrue("Exception should have suggested the use of -pb.",
|
||||||
Assert.assertTrue("Failure exception should have suggested the use of -skipCrc.", exception.getCause().getCause().getMessage().contains("skipCrc"));
|
exception.getCause().getMessage().contains("pb"));
|
||||||
|
Assert.assertTrue("Exception should have suggested the use of -skipCrc.",
|
||||||
|
exception.getCause().getMessage().contains("skipCrc"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue