Class: Apache::Hadoop::Hbase::Thrift2::TPut
- Inherits:
-
Object
- Object
- Apache::Hadoop::Hbase::Thrift2::TPut
- Includes:
- Thrift::Struct, Thrift::Struct_Union
- Defined in:
- lib/hbase/hbase_types.rb
Overview
Add column values to this object and they’ll be added. You can provide a default timestamp if the column values don’t have one. If you don’t provide a default timestamp the current time is inserted.
You can specify how this Put should be written to the write-ahead Log (WAL) by changing the durability. If you don’t provide durability, it defaults to column family’s default setting for durability.
Constant Summary collapse
- ROW =
1- COLUMNVALUES =
2- TIMESTAMP =
3- ATTRIBUTES =
5- DURABILITY =
6- CELLVISIBILITY =
7- FIELDS =
{ ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, COLUMNVALUES => {:type => ::Thrift::Types::LIST, :name => 'columnValues', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift2::TColumnValue}}, TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp', :optional => true}, 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_fields ⇒ Object
246 |
# File 'lib/hbase/hbase_types.rb', line 246 def struct_fields; FIELDS; end |
#validate ⇒ Object
248 249 250 251 252 253 254 |
# File 'lib/hbase/hbase_types.rb', line 248 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 columnValues is unset!') unless @columnValues 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 |