Sha256: 625382e7b798182ad769fa439cc83e53b547bfc05e6272c2de9975d17826c5d7

Contents?: true

Size: 593 Bytes

Versions: 32

Compression:

Stored size: 593 Bytes

Contents

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

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}`

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
mandy-0.4.94 bin/mandy-cp
mandy-0.4.93 bin/mandy-cp
mandy-0.4.92 bin/mandy-cp
mandy-0.4.91 bin/mandy-cp
mandy-0.4.90 bin/mandy-cp
mandy-0.4.89 bin/mandy-cp
mandy-0.4.88 bin/mandy-cp
mandy-0.4.87 bin/mandy-cp
mandy-0.4.86 bin/mandy-cp
mandy-0.4.83 bin/mandy-cp
mandy-0.4.10 bin/mandy-cp
mandy-0.4.81 bin/mandy-cp