Sha256: df4ec9d1d2f5926582f4d4ace1f6d2cf428309be6a182a5af5b6c487c688f241

Contents?: true

Size: 727 Bytes

Versions: 40

Compression:

Stored size: 727 Bytes

Contents

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

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

options = OpenStruct.new

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


def absolute_path(path)
  path =~ /^\// ? path : File.join(Dir.pwd, path)
end

remote_file = ARGV[0]
local_file = ARGV[1]
config = absolute_path(options.config || 'cluster.xml')

`$HADOOP_HOME/bin/hadoop fs -conf #{config} -getmerge #{remote_file} #{local_file}`

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
mandy-0.4.94 bin/mandy-get
mandy-0.4.93 bin/mandy-get
mandy-0.4.92 bin/mandy-get
mandy-0.4.91 bin/mandy-get
mandy-0.4.90 bin/mandy-get
mandy-0.4.89 bin/mandy-get
mandy-0.4.88 bin/mandy-get
mandy-0.4.87 bin/mandy-get
mandy-0.4.86 bin/mandy-get
mandy-0.4.83 bin/mandy-get
mandy-0.4.10 bin/mandy-get
mandy-0.4.81 bin/mandy-get
mandy-0.4.8 bin/mandy-get
mandy-0.4.7 bin/mandy-get
mandy-0.4.6 bin/mandy-get
mandy-0.4.5 bin/mandy-get
mandy-0.4.4 bin/mandy-get
mandy-0.4.3 bin/mandy-get
mandy-0.4.2 bin/mandy-get
mandy-0.4.1 bin/mandy-get