Hi, Has Anyone tried using DU class to report hdfs-files size?
Both of the following lines are causing errors , running on Mac: DU DiskUsage = new DU(new File(outDir.getPath()),120000L); DU DiskUsage = new DU(new File(outDir.getName()),Configuration)conf); where, Path outDir = SequenceFileOutputFormat.getOutputPath(conf); // Working fine Exception in thread "main" java.io.IOException: Expecting a line not the end of stream at org.apache.hadoop.fs.DU.parseExecResult(DU.java:185) at org.apache.hadoop.util.Shell.runCommand(Shell.java:238) at org.apache.hadoop.util.Shell.run(Shell.java:183) at org.apache.hadoop.fs.DU.<init>(DU.java:57) at Analysis.analyzeOutput(Analysis.java:22) at Main.main(Main.java:48) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.hadoop.util.RunJar.main(RunJar.java:192) I run this DU command after the job is done. Any hints? Thank you, Mark