Sha256: 9009492088c1deb62d3a2db318e2146513b438c061a2f430555cb444fe4e772b

Contents?: true

Size: 630 Bytes

Versions: 8

Compression:

Stored size: 630 Bytes

Contents

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

require "rubygems"
require "mandy"

HadoopConfiguration.check_home_and_version

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


options = OpenStruct.new

OptionParser.new do |opts|
  opts.banner = "USAGE: mandy-mkdir directory [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!

dir = ARGV[0]
config = options.config || 'cluster.xml'

`$HADOOP_HOME/bin/hadoop fs -conf #{config} -mkdir #{dir}`

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mandy-0.5.21 bin/mandy-mkdir
mandy-0.5.20 bin/mandy-mkdir
mandy-0.5.19 bin/mandy-mkdir
mandy-0.5.17 bin/mandy-mkdir
mandy-0.5.14 bin/mandy-mkdir
mandy-0.5.13 bin/mandy-mkdir
mandy-0.5.11 bin/mandy-mkdir
mandy-0.5.10 bin/mandy-mkdir