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

Version Path
mandy-0.5.28 bin/mandy-hdfs
mandy-0.5.27 bin/mandy-hdfs
mandy-0.5.26 bin/mandy-hdfs
mandy-0.5.25 bin/mandy-hdfs
mandy-0.5.24 bin/mandy-hdfs
mandy-0.5.23 bin/mandy-hdfs
mandy-0.5.22 bin/mandy-hdfs
mandy-0.5.21 bin/mandy-hdfs
mandy-0.5.20 bin/mandy-hdfs
mandy-0.5.19 bin/mandy-hdfs
mandy-0.5.17 bin/mandy-hdfs