Class: HadoopDsl::Client

Inherits:
JRubyOnHadoop::Client
  • Object
show all
Defined in:
lib/hadoop_dsl_client.rb

Instance Method Summary collapse

Instance Method Details

#add_dsl_lib_filesObject



32
33
34
35
# File 'lib/hadoop_dsl_client.rb', line 32

def add_dsl_lib_files
  lib_path = HadoopDsl.lib_path
  @files += Dir.glob(File.join(lib_path, "*.rb"))
end

#mapred_argsObject



26
27
28
29
30
# File 'lib/hadoop_dsl_client.rb', line 26

def mapred_args
  args = super
  args += " --dslfile #{@dsl_file}"
  args
end

#parse_argsObject



13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/hadoop_dsl_client.rb', line 13

def parse_args
  super
  @script_path = HadoopDsl.dsl_init_script
  @script = File.basename(@script_path)
  @dsl_file_path = @args[0]
  @dsl_file = File.basename(@dsl_file_path)
  @files << @script_path << @dsl_file_path

  # TODO move properly, with jruby-on-hadoop
  add_dsl_lib_files
  ENV['RUBYLIB'] = File.dirname(@dsl_file_path)
end