Class: Impala::Protocol::TTableDescriptor

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/impala/protocol/descriptors_types.rb

Constant Summary collapse

ID =
1
TABLETYPE =
2
NUMCOLS =
3
NUMCLUSTERINGCOLS =
4
HDFSTABLE =
5
HBASETABLE =
6
TABLENAME =
7
DBNAME =
8
FIELDS =
{
ID => { :type => ::Thrift::Types::I32, :name => 'id' },
TABLETYPE => { :type => ::Thrift::Types::I32, :name => 'tableType', :enum_class => Impala::Protocol::TTableType },
NUMCOLS => { :type => ::Thrift::Types::I32, :name => 'numCols' },
NUMCLUSTERINGCOLS => { :type => ::Thrift::Types::I32, :name => 'numClusteringCols' },
HDFSTABLE => { :type => ::Thrift::Types::STRUCT, :name => 'hdfsTable', :class => Impala::Protocol::THdfsTable, :optional => true },
HBASETABLE => { :type => ::Thrift::Types::STRUCT, :name => 'hbaseTable', :class => Impala::Protocol::THBaseTable, :optional => true },
TABLENAME => { :type => ::Thrift::Types::STRING, :name => 'tableName' },
DBNAME => { :type => ::Thrift::Types::STRING, :name => 'dbName' }
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



202
# File 'lib/impala/protocol/descriptors_types.rb', line 202

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


204
205
206
207
208
209
210
211
212
213
214
# File 'lib/impala/protocol/descriptors_types.rb', line 204

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field id is unset!') unless @id
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tableType is unset!') unless @tableType
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numCols is unset!') unless @numCols
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numClusteringCols is unset!') unless @numClusteringCols
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tableName is unset!') unless @tableName
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName
  unless @tableType.nil? || Impala::Protocol::TTableType::VALID_VALUES.include?(@tableType)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field tableType!')
  end
end