Class: Mandy::Stores::HBase

Inherits:
Object
  • Object
show all
Defined in:
lib/mandy/stores/hbase.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ HBase

Returns a new instance of HBase.



6
7
8
9
# File 'lib/mandy/stores/hbase.rb', line 6

def initialize(options)
  @options = options
  @table = ::HBase::HTable.new(options[:url])
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



4
5
6
# File 'lib/mandy/stores/hbase.rb', line 4

def options
  @options
end

Instance Method Details

#==(other) ⇒ Object



19
20
21
# File 'lib/mandy/stores/hbase.rb', line 19

def ==(other)
  self.class == other.class && self.options == other.options
end

#get(key) ⇒ Object



11
12
13
# File 'lib/mandy/stores/hbase.rb', line 11

def get(key)
  @table.get(key)
end

#put(key, values) ⇒ Object



15
16
17
# File 'lib/mandy/stores/hbase.rb', line 15

def put(key, values)
  @table.put(key, values)
end