# # Autogenerated by Thrift Compiler (0.8.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # module Impala module Protocol module TCounterType UNIT = 0 UNIT_PER_SECOND = 1 TIME_MS = 2 CPU_TICKS = 3 BYTES = 4 BYTES_PER_SECOND = 5 VALUE_MAP = { 0 => "UNIT", 1 => "UNIT_PER_SECOND", 2 => "TIME_MS", 3 => "CPU_TICKS", 4 => "BYTES", 5 => "BYTES_PER_SECOND" } VALID_VALUES = Set.new([UNIT, UNIT_PER_SECOND, TIME_MS, CPU_TICKS, BYTES, BYTES_PER_SECOND]).freeze end class TCounter include ::Thrift::Struct, ::Thrift::Struct_Union NAME = 1 TYPE = 2 VALUE = 3 FIELDS = { NAME => { :type => ::Thrift::Types::STRING, :name => 'name' }, TYPE => { :type => ::Thrift::Types::I32, :name => 'type', :enum_class => Impala::Protocol::TCounterType }, VALUE => { :type => ::Thrift::Types::I64, :name => 'value' } } def struct_fields; FIELDS; end def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field value is unset!') unless @value unless @type.nil? || Impala::Protocol::TCounterType::VALID_VALUES.include?(@type) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!') end end ::Thrift::Struct.generate_accessors self end class TRuntimeProfileNode include ::Thrift::Struct, ::Thrift::Struct_Union NAME = 1 NUM_CHILDREN = 2 COUNTERS = 3 METADATA = 4 INDENT = 5 INFO_STRINGS = 6 FIELDS = { NAME => { :type => ::Thrift::Types::STRING, :name => 'name' }, NUM_CHILDREN => { :type => ::Thrift::Types::I32, :name => 'num_children' }, COUNTERS => { :type => ::Thrift::Types::LIST, :name => 'counters', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TCounter } }, METADATA => { :type => ::Thrift::Types::I64, :name => 'metadata' }, INDENT => { :type => ::Thrift::Types::BOOL, :name => 'indent' }, INFO_STRINGS => { :type => ::Thrift::Types::MAP, :name => 'info_strings', :key => { :type => ::Thrift::Types::STRING }, :value => { :type => ::Thrift::Types::STRING } } } def struct_fields; FIELDS; end def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field num_children is unset!') unless @num_children raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field counters is unset!') unless @counters raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field metadata is unset!') unless @metadata raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field indent is unset!') if @indent.nil? raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field info_strings is unset!') unless @info_strings end ::Thrift::Struct.generate_accessors self end class TRuntimeProfileTree include ::Thrift::Struct, ::Thrift::Struct_Union NODES = 1 FIELDS = { NODES => { :type => ::Thrift::Types::LIST, :name => 'nodes', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TRuntimeProfileNode } } } def struct_fields; FIELDS; end def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field nodes is unset!') unless @nodes end ::Thrift::Struct.generate_accessors self end end end