我做下面要做的O/P文件壓縮從減速機:如何在Hadoop中
OutputStream out = ipFs.create(new Path(opDir + "/" + fileName));
CompressionCodec codec = new GzipCodec();
OutputStream cs = codec.createOutputStream(out);
BufferedWriter cout = new BufferedWriter(new OutputStreamWriter(cs));
cout.write(...)
但在第3行了空指針異常:
java.lang.NullPointerException
at org.apache.hadoop.io.compress.zlib.ZlibFactory.isNativeZlibLoaded(ZlibFactory.java:63)
at org.apache.hadoop.io.compress.GzipCodec.createOutputStream(GzipCodec.java:92)
at myFile$myReduce.reduce(myFile.java:354)
我也得到了跟着JIRA一樣。
如果我做錯了什麼,你能建議嗎?
謝謝。這也有效。 – 2012-04-15 03:22:23