HADOOP-15416. Clear error message in S3Guard diff if source not found. Contributed by Gabor Bota.

This commit is contained in:
Sean Mackrory 2018-06-22 11:36:36 -06:00
parent 6432128622
commit 55fad6a3de

View File

@ -805,7 +805,9 @@ private static void printDiff(FileStatus msStatus,
*/
private void compareDir(FileStatus msDir, FileStatus s3Dir,
PrintStream out) throws IOException {
Preconditions.checkArgument(!(msDir == null && s3Dir == null));
Preconditions.checkArgument(!(msDir == null && s3Dir == null),
"The path does not exist in metadata store and on s3.");
if (msDir != null && s3Dir != null) {
Preconditions.checkArgument(msDir.getPath().equals(s3Dir.getPath()),
String.format("The path from metadata store and s3 are different:" +