Sha256: 61b7c5de4171090e2123b800a6f7be49a7ff559b55a6f1d838a2f196587e6e90

Contents?: true

Size: 643 Bytes

Versions: 2

Compression:

Stored size: 643 Bytes

Contents

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

require "rubygems"
require "mandy"


HadoopConfiguration.check_home_and_version

exec('mandy-ls -h') if ARGV.size == 0

options = OpenStruct.new

OptionParser.new do |opts|
  opts.banner = "USAGE: mandy-ls file_or_directory"

  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!

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


list = system("$HADOOP_HOME/bin/hadoop fs -conf #{config} -ls #{file}")
puts list

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mandy-0.5.28 bin/mandy-ls
mandy-0.5.27 bin/mandy-ls