Sha256: ed2b80627357988b2a8d4f16fd07008eb2ea97e261d846e29248252094439753

Contents?: true

Size: 554 Bytes

Versions: 27

Compression:

Stored size: 554 Bytes

Contents

#!/usr/bin/env ruby
require 'wukong'

src_dir, dest_dir = ARGV[0..1]
src_files   = Dir[src_dir + '/*']
dest_files  = Wukong::Dfs.list_files dest_dir
Wukong::Dfs.compare_listings(src_files, dest_files) do |comparison, src_file, dest_file|
  case comparison
  when :missing
    dest_filename = "%s/%s" % [dest_dir, dest_file]
    puts "Copying #{src_file} #{dest_filename}"
    puts `hadoop dfs -put #{src_file} #{dest_filename}`
  when :differ
    src_ls = `ls -l #{src_file}`.split(/\s+/).join("\t")
    puts "Differ: #{src_ls} \n#{dest_file}"
  end
end

Version data entries

27 entries across 27 versions & 3 rubygems

Version Path
mrflip-wukong-0.1.0 bin/hdp-sync
wukong-hadoop-0.2.0 bin/hdp-sync
wukong-hadoop-0.1.1 bin/hdp-sync
wukong-hadoop-0.1.0 bin/hdp-sync
wukong-hadoop-0.0.2 bin/hdp-sync
wukong-hadoop-0.0.1 bin/hdp-sync
wukong-3.0.0.pre bin/hdp-sync
wukong-2.0.2 bin/hdp-sync
wukong-2.0.1 bin/hdp-sync
wukong-2.0.0 bin/hdp-sync
wukong-1.5.4 bin/hdp-sync
wukong-1.5.3 bin/hdp-sync
wukong-1.5.2 bin/hdp-sync
wukong-1.5.1 bin/hdp-sync
wukong-1.5.0 bin/hdp-sync
wukong-1.4.12 bin/hdp-sync
wukong-1.4.11 bin/hdp-sync
wukong-1.4.10 bin/hdp-sync
wukong-1.4.9 bin/hdp-sync
wukong-1.4.7 bin/hdp-sync