hadoop-jruby-connector 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.7
1
+ 0.0.8
@@ -39,6 +39,10 @@ module Hjc
39
39
  @reducer_path = File.basename(file.path)
40
40
  end
41
41
 
42
+ def add_file(f)
43
+ @files[File.basename(f.path)] = f
44
+ end
45
+
42
46
  def args
43
47
  concated_args = []
44
48
  concated_args.concat ['-input', @input_path] if @input_path
@@ -74,6 +74,17 @@ module Hjc
74
74
 
75
75
  job.args.join(" ").should == %Q!-input input -output outdir -jobconf hoge=fuga!
76
76
  end
77
+
78
+ describe '.add_file' do
79
+ it 'adds -file option' do
80
+ job = HadoopStreaming.new
81
+ file = Tempfile.new('additional.txt', 'tmp')
82
+ job.add_file(file)
83
+
84
+ job.args.join(" ").should match("-file")
85
+ job.args.join(" ").should match("tmp/additional.txt")
86
+ end
87
+ end
77
88
 
78
89
  def assert_result
79
90
  File.open(File.join(@output_dir, 'part-00000')) do |f|
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 7
9
- version: 0.0.7
8
+ - 8
9
+ version: 0.0.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Koichi Fujikawa
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-06-06 00:00:00 +09:00
17
+ date: 2011-08-24 00:00:00 +09:00
18
18
  default_executable:
19
19
  dependencies: []
20
20