Class: Apache::Hadoop::Hbase::Thrift2::TAppend

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/hbase/hbase_types.rb

Constant Summary collapse

ROW =
1
COLUMNS =
2
ATTRIBUTES =
3
DURABILITY =
4
CELLVISIBILITY =
5
FIELDS =
{
  ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true},
  COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift2::TColumnValue}},
  ATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'attributes', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRING, :binary => true}, :optional => true},
  DURABILITY => {:type => ::Thrift::Types::I32, :name => 'durability', :optional => true, :enum_class => ::Apache::Hadoop::Hbase::Thrift2::TDurability},
  CELLVISIBILITY => {:type => ::Thrift::Types::STRUCT, :name => 'cellVisibility', :class => ::Apache::Hadoop::Hbase::Thrift2::TCellVisibility, :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



366
# File 'lib/hbase/hbase_types.rb', line 366

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


368
369
370
371
372
373
374
# File 'lib/hbase/hbase_types.rb', line 368

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field row is unset!') unless @row
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columns is unset!') unless @columns
  unless @durability.nil? || ::Apache::Hadoop::Hbase::Thrift2::TDurability::VALID_VALUES.include?(@durability)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field durability!')
  end
end