hbase-rb 0.90.4.pre1 → 0.90.4.pre2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +20 -1
- data/hbase-rb.gemspec +1 -1
- data/lib/hbase-rb.rb +4 -0
- metadata +6 -6
data/README.md
CHANGED
@@ -55,7 +55,7 @@ For example:
|
|
55
55
|
```ruby
|
56
56
|
socket = Thrift::Socket.new('localhost', 9090)
|
57
57
|
|
58
|
-
transport = Thrift::BufferedTransport(socket)
|
58
|
+
transport = Thrift::BufferedTransport.new(socket)
|
59
59
|
transport.open
|
60
60
|
|
61
61
|
protocol = Thrift::BinaryProtocol.new(transport)
|
@@ -64,6 +64,25 @@ client = HBase::Client.new(protocol)
|
|
64
64
|
puts client.getTableNames
|
65
65
|
```
|
66
66
|
|
67
|
+
## Writing Rows
|
68
|
+
|
69
|
+
```ruby
|
70
|
+
# Assuming a table "mytable" and a column family "c"
|
71
|
+
client.mutateRow("mytable", "abc123", [HBase::Mutation.new(column: "c:foo", value: "bar")])
|
72
|
+
```
|
73
|
+
|
74
|
+
## Reading Rows
|
75
|
+
|
76
|
+
```ruby
|
77
|
+
# Assuming a table "mytable" and a column family "c"
|
78
|
+
results = client.getRow("mytable", "abc123")
|
79
|
+
if result = results.first
|
80
|
+
result.columns.each do |key, cell|
|
81
|
+
puts "#{key}: #{cell.value}"
|
82
|
+
end
|
83
|
+
end
|
84
|
+
```
|
85
|
+
|
67
86
|
## API Reference
|
68
87
|
|
69
88
|
* [Hbase/ThriftApi](http://wiki.apache.org/hadoop/Hbase/ThriftApi)
|
data/hbase-rb.gemspec
CHANGED
data/lib/hbase-rb.rb
CHANGED
@@ -6,5 +6,9 @@ require File.join(File.dirname(__FILE__), 'hbase', 'hbase')
|
|
6
6
|
# Try to make the crazy nesting that Thrift generates a little less painful
|
7
7
|
module Hbase
|
8
8
|
Client = ::Apache::Hadoop::Hbase::Thrift::Hbase::Client
|
9
|
+
|
10
|
+
Apache::Hadoop::Hbase::Thrift.constants.each do |constant|
|
11
|
+
const_set(constant, Apache::Hadoop::Hbase::Thrift.const_get(constant))
|
12
|
+
end
|
9
13
|
end
|
10
14
|
HBase = Hbase
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hbase-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.90.4.
|
4
|
+
version: 0.90.4.pre2
|
5
5
|
prerelease: 7
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-02-17 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thrift
|
16
|
-
requirement: &
|
16
|
+
requirement: &70327571009820 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.7.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70327571009820
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &70327571009400 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70327571009400
|
36
36
|
description: Everything you need to build a Ruby client for HBase
|
37
37
|
email:
|
38
38
|
- andy@highgroove.com
|
@@ -63,7 +63,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
63
63
|
version: '0'
|
64
64
|
segments:
|
65
65
|
- 0
|
66
|
-
hash:
|
66
|
+
hash: -483529441447440914
|
67
67
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
68
68
|
none: false
|
69
69
|
requirements:
|