hbase-jruby 0.5.0-java → 0.5.1-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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/hbase-jruby/scoped/aggregation.rb +6 -1
- data/lib/hbase-jruby/version.rb +1 -1
- data/test/helper.rb +6 -1
- data/test/test_aggregation.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c04d7e2d6f49d78fb778390c8711ce7bf627f15f
|
4
|
+
data.tar.gz: 604381ab596d50cea5cea4f75367922dbe885ed1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93afab3c71ca6c297854e053b636d37a19f46af3be8c31ff78dc034dab53b664d60342db70875bce1161765eff60f0f00e920c86c11e3614fc65b97f01edb9c9
|
7
|
+
data.tar.gz: 70bc34ecaa532528a0ca26a31a123ec66e517c74875d43e6d007c56aa6c7a0573eb511bf0abd0ae3907f93ba07c0656085c33365cb42ef0b1b0a12c7244a623c
|
data/CHANGELOG.md
CHANGED
@@ -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
|
data/lib/hbase-jruby/version.rb
CHANGED
data/test/helper.rb
CHANGED
@@ -40,7 +40,12 @@ class TestHBaseJRubyBase < Test::Unit::TestCase
|
|
40
40
|
def setup
|
41
41
|
@hbase = connect
|
42
42
|
@table = @hbase.table(TABLE)
|
43
|
-
|
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?
|
data/test/test_aggregation.rb
CHANGED
@@ -5,7 +5,7 @@ require 'helper'
|
|
5
5
|
|
6
6
|
class TestAggregation < TestHBaseJRubyBase
|
7
7
|
def test_aggregation
|
8
|
-
omit
|
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.
|
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-
|
11
|
+
date: 2014-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-unit
|