Class: Impala::Protocol::THdfsPartition

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

Constant Summary collapse

LINEDELIM =
1
FIELDDELIM =
2
COLLECTIONDELIM =
3
MAPKEYDELIM =
4
ESCAPECHAR =
5
FILEFORMAT =
6
PARTITIONKEYEXPRS =
7
BLOCKSIZE =
8
COMPRESSION =
9
FIELDS =
{
LINEDELIM => { :type => ::Thrift::Types::BYTE, :name => 'lineDelim' },
FIELDDELIM => { :type => ::Thrift::Types::BYTE, :name => 'fieldDelim' },
COLLECTIONDELIM => { :type => ::Thrift::Types::BYTE, :name => 'collectionDelim' },
MAPKEYDELIM => { :type => ::Thrift::Types::BYTE, :name => 'mapKeyDelim' },
ESCAPECHAR => { :type => ::Thrift::Types::BYTE, :name => 'escapeChar' },
FILEFORMAT => { :type => ::Thrift::Types::I32, :name => 'fileFormat', :enum_class => Impala::Protocol::THdfsFileFormat },
PARTITIONKEYEXPRS => { :type => ::Thrift::Types::LIST, :name => 'partitionKeyExprs', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TExpr } },
BLOCKSIZE => { :type => ::Thrift::Types::I32, :name => 'blockSize' },
COMPRESSION => { :type => ::Thrift::Types::I32, :name => 'compression', :enum_class => Impala::Protocol::THdfsCompression }
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



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

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# File 'lib/impala/protocol/descriptors_types.rb', line 111

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lineDelim is unset!') unless @lineDelim
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field fieldDelim is unset!') unless @fieldDelim
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field collectionDelim is unset!') unless @collectionDelim
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field mapKeyDelim is unset!') unless @mapKeyDelim
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field escapeChar is unset!') unless @escapeChar
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field fileFormat is unset!') unless @fileFormat
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field blockSize is unset!') unless @blockSize
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field compression is unset!') unless @compression
  unless @fileFormat.nil? || Impala::Protocol::THdfsFileFormat::VALID_VALUES.include?(@fileFormat)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field fileFormat!')
  end
  unless @compression.nil? || Impala::Protocol::THdfsCompression::VALID_VALUES.include?(@compression)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field compression!')
  end
end