Sha256: 5ecef1e8b6289ce1f692e97b073a37bff29af84517ef228be3065875860cf994

Contents?: true

Size: 1.75 KB

Versions: 2

Compression:

Stored size: 1.75 KB

Contents

#
# Autogenerated by Thrift
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#

require File.join(File.dirname(__FILE__), *%w[fb303_types])
require File.join(File.dirname(__FILE__), *%w[hive_metastore_types])


module JobTrackerState
  INITIALIZING = 1
  RUNNING = 2
  VALUE_MAP = {1 => "INITIALIZING", 2 => "RUNNING"}
  VALID_VALUES = Set.new([INITIALIZING, RUNNING]).freeze
end

class HiveClusterStatus
  include ::Thrift::Struct
  TASKTRACKERS = 1
  MAPTASKS = 2
  REDUCETASKS = 3
  MAXMAPTASKS = 4
  MAXREDUCETASKS = 5
  STATE = 6

  ::Thrift::Struct.field_accessor self, :taskTrackers, :mapTasks, :reduceTasks, :maxMapTasks, :maxReduceTasks, :state
  FIELDS = {
    TASKTRACKERS => {:type => ::Thrift::Types::I32, :name => 'taskTrackers'},
    MAPTASKS => {:type => ::Thrift::Types::I32, :name => 'mapTasks'},
    REDUCETASKS => {:type => ::Thrift::Types::I32, :name => 'reduceTasks'},
    MAXMAPTASKS => {:type => ::Thrift::Types::I32, :name => 'maxMapTasks'},
    MAXREDUCETASKS => {:type => ::Thrift::Types::I32, :name => 'maxReduceTasks'},
    STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => JobTrackerState}
  }

  def struct_fields; FIELDS; end

  def validate
    unless @state.nil? || JobTrackerState::VALID_VALUES.include?(@state)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!')
    end
  end

end

class HiveServerException < ::Thrift::Exception
  include ::Thrift::Struct
  def initialize(message=nil)
    super()
    self.message = message
  end

  MESSAGE = 1

  ::Thrift::Struct.field_accessor self, :message
  FIELDS = {
    MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
  }

  def struct_fields; FIELDS; end

  def validate
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rbhive-0.1.1 lib/thrift/hive_service_types.rb
rbhive-0.1.0 lib/thrift/hive_service_types.rb