ok_hbase 0.0.6 → 0.0.7
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.
- data/lib/ok_hbase/client.rb +1 -3
- data/lib/ok_hbase/concerns/table/batch.rb +2 -2
- data/lib/ok_hbase/concerns/table.rb +8 -8
- data/lib/ok_hbase/connection.rb +1 -3
- data/lib/ok_hbase/version.rb +1 -1
- data/lib/thrift/{hbase/hbase.rb → hbase.rb} +476 -150
- data/lib/thrift/{hbase/hbase_constants.rb → hbase.thrift_constants.rb} +3 -0
- data/lib/thrift/{hbase/hbase_types.rb → hbase.thrift_types.rb} +61 -4
- metadata +5 -5
@@ -4,6 +4,8 @@
|
|
4
4
|
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
5
|
#
|
6
6
|
|
7
|
+
require 'thrift'
|
8
|
+
|
7
9
|
module Apache
|
8
10
|
module Hadoop
|
9
11
|
module Hbase
|
@@ -73,13 +75,17 @@ module Apache
|
|
73
75
|
ID = 3
|
74
76
|
NAME = 4
|
75
77
|
VERSION = 5
|
78
|
+
SERVERNAME = 6
|
79
|
+
PORT = 7
|
76
80
|
|
77
81
|
FIELDS = {
|
78
82
|
STARTKEY => {:type => ::Thrift::Types::STRING, :name => 'startKey', :binary => true},
|
79
83
|
ENDKEY => {:type => ::Thrift::Types::STRING, :name => 'endKey', :binary => true},
|
80
84
|
ID => {:type => ::Thrift::Types::I64, :name => 'id'},
|
81
85
|
NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :binary => true},
|
82
|
-
VERSION => {:type => ::Thrift::Types::BYTE, :name => 'version'}
|
86
|
+
VERSION => {:type => ::Thrift::Types::BYTE, :name => 'version'},
|
87
|
+
SERVERNAME => {:type => ::Thrift::Types::STRING, :name => 'serverName', :binary => true},
|
88
|
+
PORT => {:type => ::Thrift::Types::I32, :name => 'port'}
|
83
89
|
}
|
84
90
|
|
85
91
|
def struct_fields; FIELDS; end
|
@@ -96,11 +102,13 @@ module Apache
|
|
96
102
|
ISDELETE = 1
|
97
103
|
COLUMN = 2
|
98
104
|
VALUE = 3
|
105
|
+
WRITETOWAL = 4
|
99
106
|
|
100
107
|
FIELDS = {
|
101
108
|
ISDELETE => {:type => ::Thrift::Types::BOOL, :name => 'isDelete', :default => false},
|
102
109
|
COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :binary => true},
|
103
|
-
VALUE => {:type => ::Thrift::Types::STRING, :name => 'value', :binary => true}
|
110
|
+
VALUE => {:type => ::Thrift::Types::STRING, :name => 'value', :binary => true},
|
111
|
+
WRITETOWAL => {:type => ::Thrift::Types::BOOL, :name => 'writeToWAL', :default => true}
|
104
112
|
}
|
105
113
|
|
106
114
|
def struct_fields; FIELDS; end
|
@@ -130,15 +138,60 @@ module Apache
|
|
130
138
|
::Thrift::Struct.generate_accessors self
|
131
139
|
end
|
132
140
|
|
141
|
+
# For increments that are not incrementColumnValue
|
142
|
+
# equivalents.
|
143
|
+
class TIncrement
|
144
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
145
|
+
TABLE = 1
|
146
|
+
ROW = 2
|
147
|
+
COLUMN = 3
|
148
|
+
AMMOUNT = 4
|
149
|
+
|
150
|
+
FIELDS = {
|
151
|
+
TABLE => {:type => ::Thrift::Types::STRING, :name => 'table', :binary => true},
|
152
|
+
ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true},
|
153
|
+
COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :binary => true},
|
154
|
+
AMMOUNT => {:type => ::Thrift::Types::I64, :name => 'ammount'}
|
155
|
+
}
|
156
|
+
|
157
|
+
def struct_fields; FIELDS; end
|
158
|
+
|
159
|
+
def validate
|
160
|
+
end
|
161
|
+
|
162
|
+
::Thrift::Struct.generate_accessors self
|
163
|
+
end
|
164
|
+
|
165
|
+
# Holds column name and the cell.
|
166
|
+
class TColumn
|
167
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
168
|
+
COLUMNNAME = 1
|
169
|
+
CELL = 2
|
170
|
+
|
171
|
+
FIELDS = {
|
172
|
+
COLUMNNAME => {:type => ::Thrift::Types::STRING, :name => 'columnName', :binary => true},
|
173
|
+
CELL => {:type => ::Thrift::Types::STRUCT, :name => 'cell', :class => ::Apache::Hadoop::Hbase::Thrift::TCell}
|
174
|
+
}
|
175
|
+
|
176
|
+
def struct_fields; FIELDS; end
|
177
|
+
|
178
|
+
def validate
|
179
|
+
end
|
180
|
+
|
181
|
+
::Thrift::Struct.generate_accessors self
|
182
|
+
end
|
183
|
+
|
133
184
|
# Holds row name and then a map of columns to cells.
|
134
185
|
class TRowResult
|
135
186
|
include ::Thrift::Struct, ::Thrift::Struct_Union
|
136
187
|
ROW = 1
|
137
188
|
COLUMNS = 2
|
189
|
+
SORTEDCOLUMNS = 3
|
138
190
|
|
139
191
|
FIELDS = {
|
140
192
|
ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true},
|
141
|
-
COLUMNS => {:type => ::Thrift::Types::MAP, :name => 'columns', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift::TCell}}
|
193
|
+
COLUMNS => {:type => ::Thrift::Types::MAP, :name => 'columns', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift::TCell}, :optional => true},
|
194
|
+
SORTEDCOLUMNS => {:type => ::Thrift::Types::LIST, :name => 'sortedColumns', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift::TColumn}, :optional => true}
|
142
195
|
}
|
143
196
|
|
144
197
|
def struct_fields; FIELDS; end
|
@@ -158,6 +211,8 @@ module Apache
|
|
158
211
|
COLUMNS = 4
|
159
212
|
CACHING = 5
|
160
213
|
FILTERSTRING = 6
|
214
|
+
BATCHSIZE = 7
|
215
|
+
SORTCOLUMNS = 8
|
161
216
|
|
162
217
|
FIELDS = {
|
163
218
|
STARTROW => {:type => ::Thrift::Types::STRING, :name => 'startRow', :binary => true, :optional => true},
|
@@ -165,7 +220,9 @@ module Apache
|
|
165
220
|
TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp', :optional => true},
|
166
221
|
COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRING, :binary => true}, :optional => true},
|
167
222
|
CACHING => {:type => ::Thrift::Types::I32, :name => 'caching', :optional => true},
|
168
|
-
FILTERSTRING => {:type => ::Thrift::Types::STRING, :name => 'filterString', :binary => true, :optional => true}
|
223
|
+
FILTERSTRING => {:type => ::Thrift::Types::STRING, :name => 'filterString', :binary => true, :optional => true},
|
224
|
+
BATCHSIZE => {:type => ::Thrift::Types::I32, :name => 'batchSize', :optional => true},
|
225
|
+
SORTCOLUMNS => {:type => ::Thrift::Types::BOOL, :name => 'sortColumns', :optional => true}
|
169
226
|
}
|
170
227
|
|
171
228
|
def struct_fields; FIELDS; end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ok_hbase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-08-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thrift
|
@@ -82,9 +82,9 @@ files:
|
|
82
82
|
- lib/ok_hbase/row.rb
|
83
83
|
- lib/ok_hbase/table.rb
|
84
84
|
- lib/ok_hbase/version.rb
|
85
|
-
- lib/thrift/hbase
|
86
|
-
- lib/thrift/hbase
|
87
|
-
- lib/thrift/hbase
|
85
|
+
- lib/thrift/hbase.rb
|
86
|
+
- lib/thrift/hbase.thrift_constants.rb
|
87
|
+
- lib/thrift/hbase.thrift_types.rb
|
88
88
|
- ok-hbase.gemspec
|
89
89
|
- spec/ok_hbase/connection_spec.rb
|
90
90
|
- spec/ok_hbase/table_spec.rb
|