开发者

How can you create a file inside a hadoop map-reduce job?

I searched the we开发者_如何学Cb, but all I found was a site that claimed that it could be done. It didn't say how.


FileSystem fs = FileSystem.get(conf);
Path path = new Path("/my/path/file")
OutputStream os = fs.create(path)
// write to os
os.close()


Look at the FileSystem's API: Click me
There is a method called "create()".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜