Sha256: c79801f0f8ff08061c1b9b5a10ca164e2be764991bbab96cc462d0c4d702300a

Contents?: true

Size: 693 Bytes

Versions: 7

Compression:

Stored size: 693 Bytes

Contents

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

require "rubygems"
require "mandy"

HadoopConfiguration.check_home_and_version

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


options = OpenStruct.new

OptionParser.new do |opts|
  opts.banner = "USAGE: mandy-cp 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} -cp #{source} #{destination}`
exit($?.exitstatus)

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
mandy-0.5.28 bin/mandy-cp
mandy-0.5.27 bin/mandy-cp
mandy-0.5.26 bin/mandy-cp
mandy-0.5.25 bin/mandy-cp
mandy-0.5.24 bin/mandy-cp
mandy-0.5.23 bin/mandy-cp
mandy-0.5.22 bin/mandy-cp