com.xiaomi.infra.galaxy.sds.thrift.MetricKey Maven / Gradle / Ivy
/**
* Autogenerated by Thrift Compiler (0.9.2)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package com.xiaomi.infra.galaxy.sds.thrift;
import java.util.Map;
import java.util.HashMap;
import libthrift091.TEnum;
/**
* 系统统计指标类型
*/
public enum MetricKey implements libthrift091.TEnum {
/**
* 速率类型统计指标起始
*/
METER_METRIC_MIN(0),
/**
* 限流检查通过的读操作
*/
READ_ALLOWED(1),
/**
* 限流检查拒绝的读操作
*/
READ_THROTTLED(2),
/**
* 限流检查通过的写操作
*/
WRITE_ALLOWED(3),
/**
* 限流检查拒绝的写操作
*/
WRITE_THROTTLED(4),
/**
* 成功调用
*/
ACTION_SUCCESS(5),
/**
* 客户端错误导致的失败调用
*/
ACTION_CLIENT_ERROR(6),
/**
* 系统错误导致的失败调用
*/
ACTION_SYSTEM_ERROR(7),
/**
* 速率类型统计指标结束
*/
METER_METRIC_MAX(49),
/**
* 直方图类型统计指标起始
*/
HISTOGRAM_METRIC_MIN(50),
/**
* CreateTable 调用延迟
*/
CREATE_LATENCY(51),
/**
* DropTable 调用延迟
*/
DROP_LATENCY(52),
/**
* DescribeTable 调用延迟
*/
DESCRIBE_LATENCY(53),
/**
* AlterTable 调用延迟
*/
ALTER_LATENCY(54),
/**
* EnableTable 调用延迟
*/
ENABLE_LATENCY(55),
/**
* DisableTable 调用延迟
*/
DISABLE_LATENCY(56),
/**
* QueryMetrics 调用延迟
*/
METRICQUERY_LATENCY(57),
/**
* Get 调用延迟
*/
GET_LATENCY(58),
/**
* Put 调用延迟
*/
PUT_LATENCY(59),
/**
* Increment 调用延迟
*/
INCREMENT_LATENCY(60),
/**
* Delete(Remove) 调用延迟
*/
DELETE_LATENCY(61),
/**
* Scan 调用延迟
*/
SCAN_LATENCY(62),
/**
* Batch 调用延迟
*/
BATCH_LATENCY(63),
/**
* 直方图类型统计指标结束
*/
HISTOGRAM_METRIC_MAX(100);
private final int value;
private MetricKey(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 MetricKey findByValue(int value) {
switch (value) {
case 0:
return METER_METRIC_MIN;
case 1:
return READ_ALLOWED;
case 2:
return READ_THROTTLED;
case 3:
return WRITE_ALLOWED;
case 4:
return WRITE_THROTTLED;
case 5:
return ACTION_SUCCESS;
case 6:
return ACTION_CLIENT_ERROR;
case 7:
return ACTION_SYSTEM_ERROR;
case 49:
return METER_METRIC_MAX;
case 50:
return HISTOGRAM_METRIC_MIN;
case 51:
return CREATE_LATENCY;
case 52:
return DROP_LATENCY;
case 53:
return DESCRIBE_LATENCY;
case 54:
return ALTER_LATENCY;
case 55:
return ENABLE_LATENCY;
case 56:
return DISABLE_LATENCY;
case 57:
return METRICQUERY_LATENCY;
case 58:
return GET_LATENCY;
case 59:
return PUT_LATENCY;
case 60:
return INCREMENT_LATENCY;
case 61:
return DELETE_LATENCY;
case 62:
return SCAN_LATENCY;
case 63:
return BATCH_LATENCY;
case 100:
return HISTOGRAM_METRIC_MAX;
default:
return null;
}
}
}