hbase-jruby 0.1.1-java → 0.1.2-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -36,6 +36,8 @@ class TestTableAdmin < TestHBaseJRubyBase
36
36
  @table.drop!
37
37
  @table.create! :cf1, :max_filesize => max_fs
38
38
  assert_equal max_fs, @table.descriptor.get_max_file_size
39
+
40
+ @table.drop!
39
41
  end
40
42
 
41
43
  def test_create_table_invalid_input
@@ -91,6 +93,8 @@ class TestTableAdmin < TestHBaseJRubyBase
91
93
  assert_equal mem_fs, @table.descriptor.get_mem_store_flush_size
92
94
  assert_equal false, @table.descriptor.is_read_only
93
95
  assert_equal true, @table.descriptor.is_deferred_log_flush
96
+
97
+ @table.drop!
94
98
  end
95
99
 
96
100
  def test_column_family_alteration!
@@ -110,6 +114,22 @@ class TestTableAdmin < TestHBaseJRubyBase
110
114
  assert_raise(ArgumentError) {
111
115
  @table.alter_family! :cf4, :bloomfilter => :xxx
112
116
  }
117
+
118
+ @table.drop!
119
+ end
120
+
121
+ def test_add_coprocessor!
122
+ coproc = 'org.apache.hadoop.hbase.coprocessor.AggregateImplementation'
123
+ assert_false @table.has_coprocessor? coproc
124
+ @table.add_coprocessor! coproc, :priority => 20000, :params => { :abc => 'def', 'xyz' => 1 }
125
+ assert @table.has_coprocessor? coproc
126
+
127
+ # TODO
128
+ assert_raise(NotImplementedError) do
129
+ @table.remove_coprocessor! 'org.apache.hadoop.hbase.coprocessor.AggregateImplementation'
130
+ end
131
+
132
+ @table.drop!
113
133
  end
114
134
 
115
135
  def test_inspect
@@ -143,6 +163,8 @@ class TestTableAdmin < TestHBaseJRubyBase
143
163
  assert_equal '131072', cf[:blocksize]
144
164
  assert_equal 'true', cf[:in_memory]
145
165
  assert_equal 'true', cf[:blockcache]
166
+
167
+ @table.drop!
146
168
  end
147
169
  end
148
170
 
data/test/test_util.rb CHANGED
@@ -10,15 +10,14 @@ class TestUtil < Test::Unit::TestCase
10
10
  def test_bytea_conversion
11
11
  Util.import_java_classes!
12
12
 
13
+ assert_raise(ArgumentError) { Util.to_bytes(10 ** 30) }
14
+
13
15
  [:fixnum, :int, :integer].each do |type|
14
16
  assert_equal 100, Util.from_bytes( type, Util.to_bytes(100) )
15
17
  end
16
18
  [:float, :double].each do |type|
17
19
  assert_equal 3.14, Util.from_bytes( type, Util.to_bytes(3.14) )
18
20
  end
19
- [:bignum, :biginteger, :bigint].each do |type|
20
- assert_equal 12345678901234567890, Util.from_bytes( type, Util.to_bytes(12345678901234567890) )
21
- end
22
21
  [:string, :str].each do |type|
23
22
  assert_equal "Hello", Util.from_bytes( type, Util.to_bytes("Hello") )
24
23
  end
metadata CHANGED
@@ -1,48 +1,52 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hbase-jruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
5
- prerelease:
4
+ prerelease:
5
+ version: 0.1.2
6
6
  platform: java
7
7
  authors:
8
8
  - Junegunn Choi
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-24 00:00:00.000000000 Z
12
+ date: 2012-11-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: test-unit
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
16
+ version_requirements: !ruby/object:Gem::Requirement
18
17
  requirements:
19
18
  - - ! '>='
20
19
  - !ruby/object:Gem::Version
21
- version: '0'
22
- type: :development
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
20
+ version: !binary |-
21
+ MA==
25
22
  none: false
23
+ requirement: !ruby/object:Gem::Requirement
26
24
  requirements:
27
25
  - - ! '>='
28
26
  - !ruby/object:Gem::Version
29
- version: '0'
27
+ version: !binary |-
28
+ MA==
29
+ none: false
30
+ prerelease: false
31
+ type: :development
30
32
  - !ruby/object:Gem::Dependency
31
33
  name: simplecov
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
+ version_requirements: !ruby/object:Gem::Requirement
34
35
  requirements:
35
36
  - - ! '>='
36
37
  - !ruby/object:Gem::Version
37
- version: '0'
38
- type: :development
39
- prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
38
+ version: !binary |-
39
+ MA==
41
40
  none: false
41
+ requirement: !ruby/object:Gem::Requirement
42
42
  requirements:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
- version: '0'
45
+ version: !binary |-
46
+ MA==
47
+ none: false
48
+ prerelease: false
49
+ type: :development
46
50
  description: Ruby-esque interface for accessing HBase from JRuby
47
51
  email:
48
52
  - junegunn.c@gmail.com
@@ -51,6 +55,7 @@ extensions: []
51
55
  extra_rdoc_files: []
52
56
  files:
53
57
  - .gitignore
58
+ - CHANGELOG.md
54
59
  - Gemfile
55
60
  - LICENSE.txt
56
61
  - README.md
@@ -67,10 +72,12 @@ files:
67
72
  - lib/hbase-jruby/pom/cdh4.1.2.xml
68
73
  - lib/hbase-jruby/result.rb
69
74
  - lib/hbase-jruby/scoped.rb
75
+ - lib/hbase-jruby/scoped/aggregation.rb
70
76
  - lib/hbase-jruby/table.rb
71
77
  - lib/hbase-jruby/util.rb
72
78
  - lib/hbase-jruby/version.rb
73
79
  - test/helper.rb
80
+ - test/test_aggregation.rb
74
81
  - test/test_byte_array.rb
75
82
  - test/test_cell.rb
76
83
  - test/test_column_key.rb
@@ -80,31 +87,35 @@ files:
80
87
  - test/test_table_admin.rb
81
88
  - test/test_util.rb
82
89
  homepage: https://github.com/junegunn/hbase-jruby
83
- licenses: []
84
- post_install_message:
90
+ licenses:
91
+ - MIT
92
+ post_install_message:
85
93
  rdoc_options: []
86
94
  require_paths:
87
95
  - lib
88
96
  required_ruby_version: !ruby/object:Gem::Requirement
89
- none: false
90
97
  requirements:
91
98
  - - ! '>='
92
99
  - !ruby/object:Gem::Version
93
- version: '0'
94
- required_rubygems_version: !ruby/object:Gem::Requirement
100
+ version: !binary |-
101
+ MA==
95
102
  none: false
103
+ required_rubygems_version: !ruby/object:Gem::Requirement
96
104
  requirements:
97
105
  - - ! '>='
98
106
  - !ruby/object:Gem::Version
99
- version: '0'
107
+ version: !binary |-
108
+ MA==
109
+ none: false
100
110
  requirements: []
101
- rubyforge_project:
111
+ rubyforge_project:
102
112
  rubygems_version: 1.8.24
103
- signing_key:
113
+ signing_key:
104
114
  specification_version: 3
105
115
  summary: Ruby-esque interface for accessing HBase from JRuby
106
116
  test_files:
107
117
  - test/helper.rb
118
+ - test/test_aggregation.rb
108
119
  - test/test_byte_array.rb
109
120
  - test/test_cell.rb
110
121
  - test/test_column_key.rb
@@ -113,4 +124,3 @@ test_files:
113
124
  - test/test_table.rb
114
125
  - test/test_table_admin.rb
115
126
  - test/test_util.rb
116
- has_rdoc: