Sha256: 100e0dd964fef25e00ab85ec61cbefd67887b702c8cb4475b87a01ef8f69d1f6
Contents?: true
Size: 684 Bytes
Versions: 11
Compression:
Stored size: 684 Bytes
Contents
#!/usr/bin/env ruby require 'optparse' require 'ostruct' require "rubygems" require "mandy" HadoopConfiguration.check_home_and_version exec('mandy-hdfs -h') if ARGV.size == 0 options = OpenStruct.new OptionParser.new do |opts| opts.banner = "USAGE: mandy-hdfs <command> [args]" 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! command = ARGV.shift args = ARGV.join(' ') config = options.config || 'cluster.xml' result = system("$HADOOP_HOME/bin/hadoop fs -conf #{config} -#{command} #{args}") puts result
Version data entries
11 entries across 11 versions & 1 rubygems