hadoop通过FileSystem API读取和写入数据 (二)

2014-11-24 10:58:05 · 作者: · 浏览: 1
Copies from one stream to another.\n";
byte[] stringBuffer = new byte[1024];
stringBuffer = writeString.getBytes();

Path inputPath = new Path("hdfs://192.168.56.171:9000/testWrite");
OutputStream out = inputFileSystem.create(inputPath);
out.write(stringBuffer);
out.close();

}


}