Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 gem 'webhdfs' 将文件分块上传到 HDFS。我在文档中看到有一个创建方法,但我不确定如何使用它并分块上传大文件。有没有人试过这个?
我不认为你必须自己分块。您可以传递文件句柄并让库流式传输它。
file_IO_handle = File.open('/tmp/foo.bin', 'rb') # Straight from the documentation: client.create('/path/to/file', file_IO_handle, :overwrite => false, :permission => 0666)