Sha256: 397731a1d35b64ed14d6a266032d940e346fa1ce1dc17d1936369b71ec6c8c2c

Contents?: true

Size: 673 Bytes

Versions: 8

Compression:

Stored size: 673 Bytes

Contents

#!/usr/bin/env ruby
require 'optparse'
require 'ostruct'

require "rubygems"
require "mandy"

HadoopConfiguration.check_home_and_version

exec('mandy-mv -h') unless ARGV.size >= 2


options = OpenStruct.new

OptionParser.new do |opts|
  opts.banner = "USAGE: mandy-mv source destination [options]"

  opts.on("-c", "--conf HADOOP_CONF", "Use this cluster xml config file.") do |config|
    options.config = config
  end
  
  opts.on_tail("-h", "--help", "Show this message") do
    puts opts
    exit
  end
end.parse!

source = ARGV[0]
destination = ARGV[1]
config = options.config || 'cluster.xml'

`$HADOOP_HOME/bin/hadoop fs -conf #{config} -mv #{source} #{destination}`

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mandy-0.5.21 bin/mandy-mv
mandy-0.5.20 bin/mandy-mv
mandy-0.5.19 bin/mandy-mv
mandy-0.5.17 bin/mandy-mv
mandy-0.5.14 bin/mandy-mv
mandy-0.5.13 bin/mandy-mv
mandy-0.5.11 bin/mandy-mv
mandy-0.5.10 bin/mandy-mv