Back to home page

OSCL-LXR

 
 

    


0001 /**
0002  * Autogenerated by Thrift Compiler (0.9.3)
0003  *
0004  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
0005  *  @generated
0006  */
0007 package org.apache.hive.service.rpc.thrift;
0008 
0009 
0010 import java.util.Map;
0011 import java.util.HashMap;
0012 import org.apache.thrift.TEnum;
0013 
0014 public enum TOperationState implements org.apache.thrift.TEnum {
0015   INITIALIZED_STATE(0),
0016   RUNNING_STATE(1),
0017   FINISHED_STATE(2),
0018   CANCELED_STATE(3),
0019   CLOSED_STATE(4),
0020   ERROR_STATE(5),
0021   UKNOWN_STATE(6),
0022   PENDING_STATE(7),
0023   TIMEDOUT_STATE(8);
0024 
0025   private final int value;
0026 
0027   private TOperationState(int value) {
0028     this.value = value;
0029   }
0030 
0031   /**
0032    * Get the integer value of this enum value, as defined in the Thrift IDL.
0033    */
0034   public int getValue() {
0035     return value;
0036   }
0037 
0038   /**
0039    * Find a the enum type by its integer value, as defined in the Thrift IDL.
0040    * @return null if the value is not found.
0041    */
0042   public static TOperationState findByValue(int value) { 
0043     switch (value) {
0044       case 0:
0045         return INITIALIZED_STATE;
0046       case 1:
0047         return RUNNING_STATE;
0048       case 2:
0049         return FINISHED_STATE;
0050       case 3:
0051         return CANCELED_STATE;
0052       case 4:
0053         return CLOSED_STATE;
0054       case 5:
0055         return ERROR_STATE;
0056       case 6:
0057         return UKNOWN_STATE;
0058       case 7:
0059         return PENDING_STATE;
0060       case 8:
0061         return TIMEDOUT_STATE;
0062       default:
0063         return null;
0064     }
0065   }
0066 }