lib/filbunke/client.rb in filbunke-1.10.0 vs lib/filbunke/client.rb in filbunke-1.10.1
- old
+ new
@@ -237,9 +237,10 @@
def update_hdfs_file!(file, local_file_path)
begin
::FileUtils.mkdir_p(::File.dirname(local_file_path))
::FileUtils.rm_f("#{local_file_path}.tmp")
url = file.url
+ url.gsub(/hdfs:\/\/([^\/]*)(.*)/, "hdfs://\\2")
hdfs_cmd = "#{@repository.hadoop_binary} dfs -copyToLocal #{url} #{local_file_path}.tmp"
@logger.log "Trying to update #{local_file_path} with '#{hdfs_cmd}'"
pid, stdin, stdout, stderr = Open4::popen4 hdfs_cmd
ignored, status = Process::waitpid2 pid