Sha256: 334babb058bd30c3bf56a78eaaafbf6ac03e9c4eacd029b6f8529e2baf525038

Contents?: true

Size: 683 Bytes

Versions: 24

Compression:

Stored size: 683 Bytes

Contents

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

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

24 entries across 24 versions & 2 rubygems

Version Path
trafficbroker-mandy-0.2.10 bin/mandy-get
trafficbroker-mandy-0.2.11 bin/mandy-get
trafficbroker-mandy-0.2.12 bin/mandy-get
trafficbroker-mandy-0.2.13 bin/mandy-get
trafficbroker-mandy-0.2.5.1 bin/mandy-get
trafficbroker-mandy-0.2.5 bin/mandy-get
trafficbroker-mandy-0.2.6 bin/mandy-get
trafficbroker-mandy-0.2.7 bin/mandy-get
trafficbroker-mandy-0.2.8 bin/mandy-get
mandy-0.4 bin/mandy-get
mandy-0.3.13 bin/mandy-get
mandy-0.3.12 bin/mandy-get
mandy-0.3.11 bin/mandy-get
mandy-0.3.10 bin/mandy-get
mandy-0.3.9 bin/mandy-get
mandy-0.3.7 bin/mandy-get
mandy-0.3.6 bin/mandy-get
mandy-0.3.5 bin/mandy-get
mandy-0.3.4 bin/mandy-get
mandy-0.3.3 bin/mandy-get