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.5.9 bin/mandy-get
mandy-0.5.8 bin/mandy-get
mandy-0.5.7 bin/mandy-get
mandy-0.5.6 bin/mandy-get
mandy-0.5.5 bin/mandy-get
mandy-0.5.3 bin/mandy-get
mandy-0.5.2 bin/mandy-get
mandy-0.5.1 bin/mandy-get
mandy-0.5 bin/mandy-get
mandy-0.4.996 bin/mandy-get
mandy-0.4.995 bin/mandy-get
mandy-0.4.994 bin/mandy-get
mandy-0.4.993 bin/mandy-get
mandy-0.4.992 bin/mandy-get
mandy-0.4.991 bin/mandy-get
mandy-0.4.99 bin/mandy-get
mandy-0.4.98 bin/mandy-get
mandy-0.4.97 bin/mandy-get
mandy-0.4.96 bin/mandy-get
mandy-0.4.95 bin/mandy-get