HBASE-10780 HFilePrettyPrinter#processFile should return immediately if file does not exist (Ashish Singhi)

This commit is contained in:
tedyu 2014-11-03 20:30:47 -08:00
parent 65e7de39c7
commit 481c6829db
1 changed files with 2 additions and 0 deletions

View File

@ -228,6 +228,7 @@ public class HFilePrettyPrinter extends Configured implements Tool {
processFile(fileName);
} catch (IOException ex) {
LOG.error("Error reading " + fileName, ex);
System.exit(-2);
}
}
@ -244,6 +245,7 @@ public class HFilePrettyPrinter extends Configured implements Tool {
FileSystem fs = file.getFileSystem(getConf());
if (!fs.exists(file)) {
System.err.println("ERROR, file doesnt exist: " + file);
System.exit(-2);
}
HFile.Reader reader = HFile.createReader(fs, file, new CacheConfig(getConf()), getConf());