Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.1.1, 3.0.0
-
None
-
Patch
Description
org.apache.hadoop.hive.ql.exec.Utilities
public static boolean isEmptyPath(JobConf job, Path dirPath, Context ctx) throws Exception { if (ctx != null) { ContentSummary cs = ctx.getCS(dirPath); if (cs != null) { LOG.info("Content Summary " + dirPath + "length: " + cs.getLength() + " num files: " + cs.getFileCount() + " num directories: " + cs.getDirectoryCount()); return (cs.getLength() == 0 && cs.getFileCount() == 0 && cs.getDirectoryCount() <= 1); } else { LOG.info("Content Summary not cached for " + dirPath); } } return isEmptyPath(job, dirPath); }
- This is too chatty. Logging for caching is not necessary for INFO logging. Move to DEBUG
- Use Log4J's {} format
- Make the messages more symmetrical - The success message doesn't include the word "cache" in it at all
- Missing a space between the path and "length: " so the path is concatenated with the string "length:"