/** * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ package org.apache.hadoop.corona; import java.util.Map; import java.util.HashMap; import org.apache.thrift.TEnum; /** * A Session is considered to be RUNNING from start() until end(). * When a session ends - it's status is updated to any of the other * states (FAILED-KILLED) by the client. * A session may also be terminated on the server side. The only state * set on the server side right now is TIMED_OUT * A session may end itself if it finds itself in an inconsistent state - * it ends with the KILLED_ABORTED state in that case. */ public enum SessionStatus implements org.apache.thrift.TEnum { RUNNING(1), FAILED(2), SUCCESSFUL(3), KILLED(4), TIMED_OUT(5), KILLED_ABORTED(6), FAILED_JOBTRACKER(7); private final int value; private SessionStatus(int value) { this.value = value; } /** * Get the integer value of this enum value, as defined in the Thrift IDL. */ public int getValue() { return value; } /** * Find a the enum type by its integer value, as defined in the Thrift IDL. * @return null if the value is not found. */ public static SessionStatus findByValue(int value) { switch (value) { case 1: return RUNNING; case 2: return FAILED; case 3: return SUCCESSFUL; case 4: return KILLED; case 5: return TIMED_OUT; case 6: return KILLED_ABORTED; case 7: return FAILED_JOBTRACKER; default: return null; } } }