Sha256: ab626710711d7a3637badf630508c4ac02abfdbb4557f39a041a480f38bb04db

Contents?: true

Size: 646 Bytes

Versions: 12

Compression:

Stored size: 646 Bytes

Contents

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

require "rubygems"
require "mandy"


HadoopConfiguration.check_home_and_version

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

options = OpenStruct.new

OptionParser.new do |opts|
  opts.banner = "USAGE: mandy-lsr 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} -lsr #{file}")
puts list

Version data entries

12 entries across 12 versions & 1 rubygems

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