Class: HbaseAdapter::Mutation

Inherits:
Object
  • Object
show all
Defined in:
lib/hbase_adapter/mutation.rb

Direct Known Subclasses

DeleteMutation, UpdateMutation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(column) ⇒ Mutation

Returns a new instance of Mutation.



5
6
7
8
# File 'lib/hbase_adapter/mutation.rb', line 5

def initialize(column)
  @column = column
  @value = nil
end

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column.



3
4
5
# File 'lib/hbase_adapter/mutation.rb', line 3

def column
  @column
end

#valueObject (readonly)

Returns the value of attribute value.



3
4
5
# File 'lib/hbase_adapter/mutation.rb', line 3

def value
  @value
end

Instance Method Details

#is_delete?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/hbase_adapter/mutation.rb', line 10

def is_delete?
  false
end

#to_thriftObject



14
15
16
17
18
19
20
# File 'lib/hbase_adapter/mutation.rb', line 14

def to_thrift
  Apache::Hadoop::Hbase::Thrift::Mutation.new(
    :isDelete => is_delete?,
    :column => column,
    :value => value
  )
end