bin/hdfshealth
#!/usr/bin/env ruby
#
# hdfshealth
#
# run with no options for help
#
$:.unshift File.join(File.dirname(__FILE__), '../lib')
require 'choice'
require 'hdfshealth'
Choice.options do
option :namenode, :required => true do
long '--namenode=HOST:PORT'
desc 'Namenode to check'
end
option :output_format, :required => false do
long '--output-format={human,json}'
short '-o'
desc 'Output format: human (default) or json'
valid ['human', 'json']
default 'human'
end
option :version do
long '--version'
desc 'Show version'
action do
puts HDFSHealth::VERSION
exit
end
end
end
cli = HDFSHealth::CLI.new(Choice.choices)
cli.run