PageRenderTime 46ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/release-0.1-rc2/hive/external/service/src/gen/thrift/gen-rb/hive_service_types.rb

#
Ruby | 67 lines | 48 code | 14 blank | 5 comment | 1 complexity | 46df2aa3bc805e796aad89fe05cbd3d6 MD5 | raw file
Possible License(s): Apache-2.0, BSD-3-Clause, JSON, CPL-1.0
  1. #
  2. # Autogenerated by Thrift
  3. #
  4. # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  5. #
  6. require 'fb303_types'
  7. require 'hive_metastore_types'
  8. require 'queryplan_types'
  9. module JobTrackerState
  10. INITIALIZING = 1
  11. RUNNING = 2
  12. VALUE_MAP = {1 => "INITIALIZING", 2 => "RUNNING"}
  13. VALID_VALUES = Set.new([INITIALIZING, RUNNING]).freeze
  14. end
  15. class HiveClusterStatus
  16. include ::Thrift::Struct, ::Thrift::Struct_Union
  17. TASKTRACKERS = 1
  18. MAPTASKS = 2
  19. REDUCETASKS = 3
  20. MAXMAPTASKS = 4
  21. MAXREDUCETASKS = 5
  22. STATE = 6
  23. FIELDS = {
  24. TASKTRACKERS => {:type => ::Thrift::Types::I32, :name => 'taskTrackers'},
  25. MAPTASKS => {:type => ::Thrift::Types::I32, :name => 'mapTasks'},
  26. REDUCETASKS => {:type => ::Thrift::Types::I32, :name => 'reduceTasks'},
  27. MAXMAPTASKS => {:type => ::Thrift::Types::I32, :name => 'maxMapTasks'},
  28. MAXREDUCETASKS => {:type => ::Thrift::Types::I32, :name => 'maxReduceTasks'},
  29. STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => JobTrackerState}
  30. }
  31. def struct_fields; FIELDS; end
  32. def validate
  33. unless @state.nil? || JobTrackerState::VALID_VALUES.include?(@state)
  34. raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!')
  35. end
  36. end
  37. ::Thrift::Struct.generate_accessors self
  38. end
  39. class HiveServerException < ::Thrift::Exception
  40. include ::Thrift::Struct, ::Thrift::Struct_Union
  41. MESSAGE = 1
  42. ERRORCODE = 2
  43. SQLSTATE = 3
  44. FIELDS = {
  45. MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'},
  46. ERRORCODE => {:type => ::Thrift::Types::I32, :name => 'errorCode'},
  47. SQLSTATE => {:type => ::Thrift::Types::STRING, :name => 'SQLState'}
  48. }
  49. def struct_fields; FIELDS; end
  50. def validate
  51. end
  52. ::Thrift::Struct.generate_accessors self
  53. end