humboldt 1.0.2-java → 1.0.3-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/humboldt/type_converters.rb +4 -105
- data/lib/humboldt/version.rb +1 -1
- data/lib/humboldt.jar +0 -0
- data/lib/humboldt.rb +3 -0
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad7d9161131ab93f3ee98a2a22a730bf6af82d9a
|
4
|
+
data.tar.gz: ee3f4f283aa281be60b55ecc9b6c169743d87998
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19ccf74a3524748dcea4b24b026f7870a4785d8e6ff18cc661cde2136ab3c955f8f2bd37fb5f4b85b292bbe1961d8464b07f679fc0c3ed263eba8cb5b3fd218b
|
7
|
+
data.tar.gz: 93bc3287a0859e02d380d66fb920fc3c48fd02697411c49468da63b86a5b94a381104408667a5cf18915928a3d7ee359e4a836ab9846c5520b30c9292a19b93c
|
@@ -5,31 +5,6 @@ module Humboldt
|
|
5
5
|
class Binary
|
6
6
|
HADOOP = ::Hadoop::Io::BytesWritable
|
7
7
|
RUBY = ::String
|
8
|
-
|
9
|
-
attr_reader :hadoop
|
10
|
-
|
11
|
-
def hadoop=(value)
|
12
|
-
unless value.is_a?(HADOOP)
|
13
|
-
raise ArgumentError, "Hadoop type mismatch, was #{value.class}, expected #{HADOOP}"
|
14
|
-
end
|
15
|
-
@hadoop = value
|
16
|
-
end
|
17
|
-
|
18
|
-
def initialize
|
19
|
-
@hadoop = HADOOP.new
|
20
|
-
end
|
21
|
-
|
22
|
-
def ruby
|
23
|
-
String.from_java_bytes(@hadoop.bytes).byteslice(0, @hadoop.length)
|
24
|
-
end
|
25
|
-
|
26
|
-
def ruby=(value)
|
27
|
-
unless value.is_a?(RUBY)
|
28
|
-
raise ArgumentError, "Hadoop type mismatch, was #{value.class}, expected #{RUBY}"
|
29
|
-
end
|
30
|
-
|
31
|
-
@hadoop.set(value.to_java_bytes, 0, value.bytesize)
|
32
|
-
end
|
33
8
|
end
|
34
9
|
|
35
10
|
begin
|
@@ -40,13 +15,11 @@ module Humboldt
|
|
40
15
|
unless value.is_a?(Hash) || value.is_a?(Array)
|
41
16
|
raise ArgumentError, "Hadoop type mismatch, was #{value.class}, expected Hash or Array"
|
42
17
|
end
|
43
|
-
|
44
|
-
@hadoop.set(packed.to_java_bytes, 0, packed.bytesize)
|
18
|
+
super(MessagePack.pack(value))
|
45
19
|
end
|
46
20
|
|
47
21
|
def ruby
|
48
|
-
|
49
|
-
MessagePack.unpack(packed, encoding: Encoding::UTF_8)
|
22
|
+
MessagePack.unpack(super(), encoding: Encoding::UTF_8)
|
50
23
|
end
|
51
24
|
end
|
52
25
|
rescue LoadError
|
@@ -55,35 +28,6 @@ module Humboldt
|
|
55
28
|
class Text
|
56
29
|
HADOOP = ::Hadoop::Io::Text
|
57
30
|
RUBY = ::String
|
58
|
-
|
59
|
-
attr_reader :hadoop
|
60
|
-
|
61
|
-
def hadoop=(value)
|
62
|
-
unless value.is_a?(HADOOP)
|
63
|
-
raise ArgumentError, "Hadoop type mismatch, was #{value.class}, expected #{HADOOP}"
|
64
|
-
end
|
65
|
-
@hadoop = value
|
66
|
-
end
|
67
|
-
|
68
|
-
def initialize
|
69
|
-
@hadoop = HADOOP.new
|
70
|
-
end
|
71
|
-
|
72
|
-
def ruby
|
73
|
-
String.from_java_bytes(@hadoop.bytes).byteslice(0, @hadoop.length).force_encoding(Encoding::UTF_8)
|
74
|
-
end
|
75
|
-
|
76
|
-
def ruby=(value)
|
77
|
-
unless value.is_a?(RUBY)
|
78
|
-
raise ArgumentError, "Hadoop type mismatch, was #{value.class}, expected #{RUBY}"
|
79
|
-
end
|
80
|
-
|
81
|
-
if value.encoding == Encoding::UTF_8
|
82
|
-
@hadoop.set(value.to_java_bytes, 0, value.bytesize)
|
83
|
-
else
|
84
|
-
@hadoop.set(value)
|
85
|
-
end
|
86
|
-
end
|
87
31
|
end
|
88
32
|
|
89
33
|
begin
|
@@ -94,11 +38,11 @@ module Humboldt
|
|
94
38
|
unless value.is_a?(Hash) || value.is_a?(Array)
|
95
39
|
raise ArgumentError, "Hadoop type mismatch, was #{value.class}, expected Hash or Array"
|
96
40
|
end
|
97
|
-
|
41
|
+
super(JSON.generate(value))
|
98
42
|
end
|
99
43
|
|
100
44
|
def ruby
|
101
|
-
JSON.parse(
|
45
|
+
JSON.parse(super())
|
102
46
|
end
|
103
47
|
end
|
104
48
|
end
|
@@ -106,56 +50,11 @@ module Humboldt
|
|
106
50
|
class Long
|
107
51
|
HADOOP = ::Hadoop::Io::LongWritable
|
108
52
|
RUBY = ::Integer
|
109
|
-
|
110
|
-
attr_reader :hadoop
|
111
|
-
|
112
|
-
def hadoop=(value)
|
113
|
-
unless value.is_a?(HADOOP)
|
114
|
-
raise ArgumentError, "Hadoop type mismatch, was #{value.class}, expected #{HADOOP}"
|
115
|
-
end
|
116
|
-
@hadoop = value
|
117
|
-
end
|
118
|
-
|
119
|
-
def initialize
|
120
|
-
@hadoop = HADOOP.new
|
121
|
-
end
|
122
|
-
|
123
|
-
def ruby
|
124
|
-
@hadoop.get
|
125
|
-
end
|
126
|
-
|
127
|
-
def ruby=(value)
|
128
|
-
unless value.is_a?(Integer)
|
129
|
-
raise ArgumentError, "Hadoop type mismatch, was #{value.class}, expected #{RUBY}"
|
130
|
-
end
|
131
|
-
|
132
|
-
@hadoop.set value
|
133
|
-
end
|
134
53
|
end
|
135
54
|
|
136
55
|
class None
|
137
56
|
HADOOP = ::Hadoop::Io::NullWritable
|
138
57
|
RUBY = ::NilClass
|
139
|
-
|
140
|
-
def hadoop
|
141
|
-
HADOOP.get
|
142
|
-
end
|
143
|
-
|
144
|
-
def hadoop=(value)
|
145
|
-
unless value.is_a?(HADOOP)
|
146
|
-
raise ArgumentError, "Hadoop type mismatch, was #{value.class}, expected #{HADOOP}"
|
147
|
-
end
|
148
|
-
end
|
149
|
-
|
150
|
-
def ruby
|
151
|
-
nil
|
152
|
-
end
|
153
|
-
|
154
|
-
def ruby=(value)
|
155
|
-
unless value.nil?
|
156
|
-
raise ArgumentError, "Hadoop type mismatch, was #{value.class}, expected #{RUBY}"
|
157
|
-
end
|
158
|
-
end
|
159
58
|
end
|
160
59
|
|
161
60
|
TYPE_CONVERTER_CLASS_CACHE = Hash.new { |h,k| h[k] = const_get(k.to_s.capitalize) }
|
data/lib/humboldt/version.rb
CHANGED
data/lib/humboldt.jar
CHANGED
Binary file
|
data/lib/humboldt.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: humboldt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- The Burt Platform Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,25 +66,25 @@ executables:
|
|
66
66
|
extensions: []
|
67
67
|
extra_rdoc_files: []
|
68
68
|
files:
|
69
|
-
-
|
69
|
+
- bin/humboldt
|
70
|
+
- config/emr-bootstrap/remove_old_jruby.sh
|
71
|
+
- config/hadoop-local.xml
|
70
72
|
- lib/ext/hadoop.rb
|
71
73
|
- lib/ext/rubydoop.rb
|
74
|
+
- lib/humboldt.jar
|
75
|
+
- lib/humboldt.rb
|
72
76
|
- lib/humboldt/cli.rb
|
73
77
|
- lib/humboldt/emr_flow.rb
|
74
78
|
- lib/humboldt/hadoop_status_filter.rb
|
75
79
|
- lib/humboldt/java_lib.rb
|
76
80
|
- lib/humboldt/mapper.rb
|
81
|
+
- lib/humboldt/patterns/sum_reducer.rb
|
77
82
|
- lib/humboldt/prefix_grouping.rb
|
78
83
|
- lib/humboldt/processor.rb
|
79
84
|
- lib/humboldt/reducer.rb
|
80
85
|
- lib/humboldt/rspec.rb
|
81
86
|
- lib/humboldt/type_converters.rb
|
82
87
|
- lib/humboldt/version.rb
|
83
|
-
- lib/humboldt/patterns/sum_reducer.rb
|
84
|
-
- lib/humboldt.jar
|
85
|
-
- bin/humboldt
|
86
|
-
- config/hadoop-local.xml
|
87
|
-
- config/emr-bootstrap/remove_old_jruby.sh
|
88
88
|
homepage: http://github.com/burtcorp/humboldt
|
89
89
|
licenses:
|
90
90
|
- BSD-3-Clause
|
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
105
|
version: '0'
|
106
106
|
requirements: []
|
107
107
|
rubyforge_project:
|
108
|
-
rubygems_version: 2.
|
108
|
+
rubygems_version: 2.4.5
|
109
109
|
signing_key:
|
110
110
|
specification_version: 4
|
111
111
|
summary: Tools and libraries for simplifying running Rubydoop jobs locally and on AWS Elastic MapReduce
|