hbase-jruby 0.4.2-java → 0.4.3-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fb5332ec468aee60e38e869db395bbae44796a7a
4
- data.tar.gz: 8379861af0be920e67f705b6a1bafbcf96a18a02
3
+ metadata.gz: e5616ee04c88b243406c3b20a0e5a6e54e2886a5
4
+ data.tar.gz: 31e980dd255421804a0d2cfe0eb39aaea281c3bf
5
5
  SHA512:
6
- metadata.gz: 4c934c7adf252bd2fd4830ac63d6e6322ae565be624dce270c9faac060814db8087d39ac9522bf4db121002efae828e120828266d29fd9d53a77501890c2a0b2
7
- data.tar.gz: 19b0b3208669c141bfeeff7f19ae2785b1b16c66c924d8b7da92588bfaff4c156b33f481e596b95355cdd49df92d3c9e3b9fa122b6f6effb81e049f8562785eb
6
+ metadata.gz: cac21cfa273b984ce372c73bc47726facc302ffeca22a71792b0565f022e47945199925fbdef8652c6a1af553edfe5f9d52aa642bd8d439fdb48bd2fe0f1de63
7
+ data.tar.gz: 50380fdbfe5d541482697adfa465cf2a66fd586b5b938756a88c9725d1056bd2b9ab83faf8c73265621ed612d00a5d54a925377e24ae9b36fbd3178a86ca9886
@@ -1,6 +1,10 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ 0.4.3
5
+ -----
6
+ - Fixed `HBase::Table#add_coprocessor[!]` and `HBase::Table#remove_coprocessor[!]`
7
+
4
8
  0.4.2
5
9
  -----
6
10
  - Fixed bug when using schema with non-String/Symbol qualifier
data/README.md CHANGED
@@ -35,7 +35,10 @@ Now, you're all set.
35
35
  hbase = HBase.new
36
36
 
37
37
  hbase.list
38
+
38
39
  hbase[:my_table].create! :f
40
+ hbase[:my_table].put 100, 'f:a' => 1, 'f:b' => 'two', 'f:c' => 3.14
41
+ hbase[:my_table].get(100).double('f:c') # Returns 3.14
39
42
  ```
40
43
 
41
44
  ## A quick example
@@ -406,8 +406,11 @@ private
406
406
  htd.addCoprocessor class_name
407
407
  else
408
408
  path, priority, params = props.values_at :path, :priority, :params
409
- params = Hash[ params.map { |k, v| [k.to_s, v.to_s] } ]
410
- htd.addCoprocessor class_name, path, priority || Coprocessor::PRIORITY_USER, params
409
+ raise ArgumentError, ":path required" unless path
410
+ params = params ? Hash[ params.map { |k, v| [k.to_s, v.to_s] } ] : {}
411
+ htd.addCoprocessor class_name,
412
+ org.apache.hadoop.fs.Path.new(path),
413
+ priority || org.apache.hadoop.hbase.Coprocessor::PRIORITY_USER, params
411
414
  end
412
415
  admin.modifyTable @name.to_java_bytes, htd
413
416
  wait_async_admin(admin, &block) if bang
@@ -416,9 +419,6 @@ private
416
419
  end
417
420
 
418
421
  def _remove_coprocessor name, bang, &block
419
- unless HTableDescriptor.respond_to?(:removeCoprocessor)
420
- raise NotImplementedError, "org.apache.hadoop.hbase.HTableDescriptor.removeCoprocessor not implemented"
421
- end
422
422
  with_admin do |admin|
423
423
  while_disabled(admin) do
424
424
  htd = admin.get_table_descriptor(@name.to_java_bytes)
@@ -1,5 +1,5 @@
1
1
  class HBase
2
2
  module JRuby
3
- VERSION = '0.4.2'
3
+ VERSION = '0.4.3'
4
4
  end
5
5
  end
@@ -145,13 +145,15 @@ class TestTableAdmin < TestHBaseJRubyBase
145
145
  def test_add_coprocessor!
146
146
  coproc = 'org.apache.hadoop.hbase.coprocessor.AggregateImplementation'
147
147
  assert_false @table.has_coprocessor? coproc
148
- @table.add_coprocessor! coproc, :priority => 20000, :params => { :abc => 'def', 'xyz' => 1 }
148
+ assert_raise(ArgumentError) {
149
+ # :path is missing
150
+ @table.add_coprocessor! coproc, :priority => 100
151
+ }
152
+ @table.add_coprocessor! coproc
149
153
  assert @table.has_coprocessor? coproc
150
154
 
151
- # TODO
152
- assert_raise(NotImplementedError) do
153
- @table.remove_coprocessor! 'org.apache.hadoop.hbase.coprocessor.AggregateImplementation'
154
- end
155
+ @table.remove_coprocessor! 'org.apache.hadoop.hbase.coprocessor.AggregateImplementation'
156
+ assert !@table.has_coprocessor?(coproc)
155
157
 
156
158
  @table.drop!
157
159
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hbase-jruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: java
6
6
  authors:
7
7
  - Junegunn Choi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-03 00:00:00.000000000 Z
11
+ date: 2014-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-unit