Created
November 5, 2012 16:01
-
-
Save gustavoanatoly/4017977 to your computer and use it in GitHub Desktop.
DirFilter Exception Refactor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean accept(Path p) { | |
boolean isValid = false; | |
try { | |
if (HConstants.HBASE_NON_USER_TABLE_DIRS.contains(p.toString())) { | |
isValid = false; | |
} else { | |
isValid = this.fs.getFileStatus(p).isDir(); | |
} | |
} catch (IOException e) { | |
String nonUserTableDirs = HConstants.HBASE_NON_USER_TABLE_DIRS.toString(); | |
LOG.warn("The path: [" + p.toString() + "] is on the directories list not allowed: " + nonUserTableDirs, e); | |
} | |
return isValid; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment