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 CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'rubygems'
2
2
  require 'hoe'
3
3
 
4
- Hoe.new('sishen-hbase-ruby', '0.4.3') do |p|
4
+ Hoe.new('sishen-hbase-ruby', '0.4.5') do |p|
5
5
  p.rubyforge_name = 'sishen-hbase-ruby'
6
6
  p.author = 'Ye Dingding'
7
7
  p.email = 'yedingding@gmail.com'
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{hbase-ruby}
3
- s.version = "0.4.3"
3
+ s.version = "0.4.5"
4
4
 
5
5
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
6
6
  s.authors = ["Ye Dingding"]
@@ -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,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sishen-hbase-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ye Dingding