sishen-hbase-ruby 0.4.3 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/hbase-ruby.gemspec +1 -1
- data/lib/hbase/response/scanner_response.rb +3 -1
- metadata +1 -1
data/Rakefile
CHANGED
data/hbase-ruby.gemspec
CHANGED
@@ -3,13 +3,15 @@ module HBase
|
|
3
3
|
class ScannerResponse < BasicResponse
|
4
4
|
def parse_content(raw_data)
|
5
5
|
doc = REXML::Document.new(raw_data)
|
6
|
+
doc = doc.elements["rows"] if doc.elements["rows"] && doc.elements["rows"].has_elements?
|
7
|
+
|
6
8
|
rows = []
|
7
9
|
doc.elements.each("row") do |row|
|
8
10
|
row_name = row.elements["name"].text.strip.unpack("m").first
|
9
11
|
columns = []
|
10
12
|
row.elements.each("column") do |col|
|
11
13
|
name = col.elements["name"].text.strip.unpack("m").first
|
12
|
-
value = col.elements["value"].text.strip.unpack("m").first
|
14
|
+
value = col.elements["value"].text.strip.unpack("m").first rescue nil
|
13
15
|
timestamp = col.elements["timestamp"].text.strip.to_i
|
14
16
|
columns << Model::Column.new(:name => name,
|
15
17
|
:value => value,
|