hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark question <markq2...@gmail.com>
Subject DiskUsage class DU Error
Date Fri, 10 Jun 2011 02:50:07 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message