Class: Apache::Hadoop::Hbase::Thrift2::TGet

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

Overview

The scope can be further narrowed down by specifying a list of columns or column families.

To get everything for a row, instantiate a Get object with just the row to get. To further define the scope of what to get you can add a timestamp or time range with an optional maximum number of versions to return.

If you specify a time range and a timestamp the range is ignored. Timestamps on TColumns are ignored.

Constant Summary collapse

ROW =
1
COLUMNS =
2
TIMESTAMP =
3
TIMERANGE =
4
MAXVERSIONS =
5
FILTERSTRING =
6
ATTRIBUTES =
7
AUTHORIZATIONS =
8
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::TColumn}, :optional => true},
  TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp', :optional => true},
  TIMERANGE => {:type => ::Thrift::Types::STRUCT, :name => 'timeRange', :class => ::Apache::Hadoop::Hbase::Thrift2::TTimeRange, :optional => true},
  MAXVERSIONS => {:type => ::Thrift::Types::I32, :name => 'maxVersions', :optional => true},
  FILTERSTRING => {:type => ::Thrift::Types::STRING, :name => 'filterString', :binary => true, :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},
  AUTHORIZATIONS => {:type => ::Thrift::Types::STRUCT, :name => 'authorizations', :class => ::Apache::Hadoop::Hbase::Thrift2::TAuthorization, :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



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

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


211
212
213
# File 'lib/hbase/hbase_types.rb', line 211

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field row is unset!') unless @row
end