Sha256: 7b7343f4c6f752d112e8b7883c5d343a9c993c709a5d9261c43f19ae71a1df4e
Contents?: true
Size: 650 Bytes
Versions: 7
Compression:
Stored size: 650 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}` exit($?.exitstatus)
Version data entries
7 entries across 7 versions & 1 rubygems