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