ok_hbase 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- 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
data/lib/ok_hbase/client.rb
CHANGED
@@ -2,9 +2,7 @@ require 'thrift'
|
|
2
2
|
require 'thrift/transport/socket'
|
3
3
|
require 'thrift/protocol/binary_protocol'
|
4
4
|
|
5
|
-
require 'thrift/hbase
|
6
|
-
require 'thrift/hbase/hbase_types'
|
7
|
-
require 'thrift/hbase/hbase'
|
5
|
+
require 'thrift/hbase'
|
8
6
|
|
9
7
|
module OkHbase
|
10
8
|
class Client < Apache::Hadoop::Hbase::Thrift::Hbase::Client
|
@@ -82,9 +82,9 @@ module OkHbase
|
|
82
82
|
return if batch_mutations.blank?
|
83
83
|
|
84
84
|
if @timestamp
|
85
|
-
@table.connection.client.mutateRowsTs(@table.connection.table_name(@table.table_name), batch_mutations, @timestamp)
|
85
|
+
@table.connection.client.mutateRowsTs(@table.connection.table_name(@table.table_name), batch_mutations, @timestamp, {})
|
86
86
|
else
|
87
|
-
@table.connection.client.mutateRows(@table.connection.table_name(@table.table_name), batch_mutations)
|
87
|
+
@table.connection.client.mutateRows(@table.connection.table_name(@table.table_name), batch_mutations, {})
|
88
88
|
end
|
89
89
|
|
90
90
|
_reset_mutations()
|
@@ -61,9 +61,9 @@ module OkHbase
|
|
61
61
|
rows = if timestamp
|
62
62
|
raise TypeError.new "'timestamp' must be an integer" unless timestamp.is_a? Integer
|
63
63
|
|
64
|
-
self.connection.client.getRowWithColumnsTs(self.connection.table_name(table_name), row_key, columns, timestamp)
|
64
|
+
self.connection.client.getRowWithColumnsTs(self.connection.table_name(table_name), row_key, columns, timestamp, {})
|
65
65
|
else
|
66
|
-
self.connection.client.getRowWithColumns(self.connection.table_name(table_name), row_key, columns)
|
66
|
+
self.connection.client.getRowWithColumns(self.connection.table_name(table_name), row_key, columns, {})
|
67
67
|
end
|
68
68
|
|
69
69
|
rows.empty? ? {} : _make_row(rows[0].columns, include_timestamp)
|
@@ -81,9 +81,9 @@ module OkHbase
|
|
81
81
|
|
82
82
|
columns = _column_family_names() unless columns
|
83
83
|
|
84
|
-
self.connection.client.getRowsWithColumnsTs(self.connection.table_name(table_name), row_keys, columns, timestamp)
|
84
|
+
self.connection.client.getRowsWithColumnsTs(self.connection.table_name(table_name), row_keys, columns, timestamp, {})
|
85
85
|
else
|
86
|
-
self.connection.client.getRowsWithColumns(self.connection.table_name(table_name), row_keys, columns)
|
86
|
+
self.connection.client.getRowsWithColumns(self.connection.table_name(table_name), row_keys, columns, {})
|
87
87
|
end
|
88
88
|
|
89
89
|
rows.map { |row| [row.row, _make_row(row.columns, include_timestamp) ]}
|
@@ -101,9 +101,9 @@ module OkHbase
|
|
101
101
|
cells = if timestamp
|
102
102
|
raise TypeError.new "'timestamp' must be an integer" unless timestamp.is_a? Integer
|
103
103
|
|
104
|
-
self.connection.client.getVerTs(self.connection.table_name(table_name), row_key, column, timestamp, versions)
|
104
|
+
self.connection.client.getVerTs(self.connection.table_name(table_name), row_key, column, timestamp, versions, {})
|
105
105
|
else
|
106
|
-
self.connection.client.getVer(self.connection.table_name(table_name), row_key, column, versions)
|
106
|
+
self.connection.client.getVer(self.connection.table_name(table_name), row_key, column, versions, {})
|
107
107
|
end
|
108
108
|
|
109
109
|
cells.map { |cell| include_timestamp ? [cell.value, cell.timestamp] : cell.value }
|
@@ -129,7 +129,7 @@ module OkHbase
|
|
129
129
|
|
130
130
|
scanner = _scanner(opts)
|
131
131
|
|
132
|
-
scanner_id = self.connection.client.scannerOpenWithScan(self.connection.table_name(table_name), scanner)
|
132
|
+
scanner_id = self.connection.client.scannerOpenWithScan(self.connection.table_name(table_name), scanner, {})
|
133
133
|
|
134
134
|
fetched_count = returned_count = 0
|
135
135
|
|
@@ -178,7 +178,7 @@ module OkHbase
|
|
178
178
|
end
|
179
179
|
|
180
180
|
else
|
181
|
-
timestamp ? self.connection.client.deleteAllRowTs(self.connection.table_name(table_name), row_key, timestamp) : self.connection.client.deleteAllRow(self.connection.table_name(table_name), row_key)
|
181
|
+
timestamp ? self.connection.client.deleteAllRowTs(self.connection.table_name(table_name), row_key, timestamp, {}) : self.connection.client.deleteAllRow(self.connection.table_name(table_name), row_key, {})
|
182
182
|
end
|
183
183
|
end
|
184
184
|
|
data/lib/ok_hbase/connection.rb
CHANGED
@@ -2,9 +2,7 @@ require 'thrift'
|
|
2
2
|
require 'thrift/transport/socket'
|
3
3
|
require 'thrift/protocol/binary_protocol'
|
4
4
|
|
5
|
-
require 'thrift/hbase
|
6
|
-
require 'thrift/hbase/hbase_types'
|
7
|
-
require 'thrift/hbase/hbase'
|
5
|
+
require 'thrift/hbase'
|
8
6
|
|
9
7
|
require 'ok_hbase/client'
|
10
8
|
|
data/lib/ok_hbase/version.rb
CHANGED