hbase-jruby 0.5.0-java → 0.5.1-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 38719a45c5f33a6b3ea5841b32325eec7e709ebf
4
- data.tar.gz: cc3634b8218d60809d86256819eb8b6657dcad63
3
+ metadata.gz: c04d7e2d6f49d78fb778390c8711ce7bf627f15f
4
+ data.tar.gz: 604381ab596d50cea5cea4f75367922dbe885ed1
5
5
  SHA512:
6
- metadata.gz: 11aebd9b28bce00bb7130197c9b9b55d59311cecd38d1711fef0703d62833db234a3e224d365df153c63c1fd9d1b638df57185dc988412d6c91c1596b1c476ae
7
- data.tar.gz: a375d7bc7e45c61c8c3f2613feacd05e83714b7992dd061f8c13ece2c8587e7f6590b9e18d02252e6aa8c979ae9fb9fdc439f035487feb7e6fb7b66004c8fe1e
6
+ metadata.gz: 93afab3c71ca6c297854e053b636d37a19f46af3be8c31ff78dc034dab53b664d60342db70875bce1161765eff60f0f00e920c86c11e3614fc65b97f01edb9c9
7
+ data.tar.gz: 70bc34ecaa532528a0ca26a31a123ec66e517c74875d43e6d007c56aa6c7a0573eb511bf0abd0ae3907f93ba07c0656085c33365cb42ef0b1b0a12c7244a623c
@@ -1,6 +1,10 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ 0.5.1
5
+ -----
6
+ - Fixed `Table#aggregate` for HBase 0.98 or above
7
+
4
8
  0.5.0
5
9
  -----
6
10
  - Added CDH5.0 (HBase 0.96.1.1) and CDH4.6 dependency profiles
@@ -47,10 +47,15 @@ private
47
47
  def aggregation_impl method, type
48
48
  raise ArgumentError.new("No column specified") if method != :row_count && @project.empty?
49
49
 
50
+ @@with_byte_array_name ||=
51
+ org.apache.hadoop.hbase.client.coprocessor.AggregationClient.
52
+ java_class.java_instance_methods.select { |m| m.name == 'sum' }.
53
+ map { |m| m.argument_types.first }.include?(''.to_java_bytes.java_class)
54
+
50
55
  @aggregation_client ||= AggregationClient.new(table.config)
51
56
  @aggregation_client.send(
52
57
  method,
53
- Util.to_bytes(table.name),
58
+ @@with_byte_array_name ? Util.to_bytes(table.name) : htable,
54
59
  column_interpreter_for(type),
55
60
  filtered_scan)
56
61
  end
@@ -1,5 +1,5 @@
1
1
  class HBase
2
2
  module JRuby
3
- VERSION = '0.5.0'
3
+ VERSION = '0.5.1'
4
4
  end
5
5
  end
@@ -40,7 +40,12 @@ class TestHBaseJRubyBase < Test::Unit::TestCase
40
40
  def setup
41
41
  @hbase = connect
42
42
  @table = @hbase.table(TABLE)
43
- @aggregation = defined?(org.apache.hadoop.hbase.client.coprocessor.AggregationClient)
43
+ begin
44
+ org.apache.hadoop.hbase.client.coprocessor.AggregationClient
45
+ @aggregation = true
46
+ rescue NameError
47
+ @aggregation = false
48
+ end
44
49
 
45
50
  # Drop & Create
46
51
  @table.drop! if RECREATE && @table.exists?
@@ -5,7 +5,7 @@ require 'helper'
5
5
 
6
6
  class TestAggregation < TestHBaseJRubyBase
7
7
  def test_aggregation
8
- omit "AggregationClient is removed in 0.96" unless @aggregation
8
+ omit 'AggregationClient is not found' unless @aggregation
9
9
 
10
10
  (1..100).each do |idx|
11
11
  @table.put idx, 'cf1:a' => idx, 'cf1:b' => idx * 2
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.5.0
4
+ version: 0.5.1
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-05-26 00:00:00.000000000 Z
11
+ date: 2014-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-unit