public static ClusterMetrics.Option toOption(ClusterStatusProtos.Option option) {
    switch (option) {
      case HBASE_VERSION:
        return ClusterMetrics.Option.HBASE_VERSION;
      case LIVE_SERVERS:
        return ClusterMetrics.Option.LIVE_SERVERS;
      case DEAD_SERVERS:
        return ClusterMetrics.Option.DEAD_SERVERS;
      case UNKNOWN_SERVERS:
        return ClusterMetrics.Option.UNKNOWN_SERVERS;
      case REGIONS_IN_TRANSITION:
        return ClusterMetrics.Option.REGIONS_IN_TRANSITION;
      case CLUSTER_ID:
        return ClusterMetrics.Option.CLUSTER_ID;
      case MASTER_COPROCESSORS:
        return ClusterMetrics.Option.MASTER_COPROCESSORS;
      case MASTER:
        return ClusterMetrics.Option.MASTER;
      case BACKUP_MASTERS:
        return ClusterMetrics.Option.BACKUP_MASTERS;
      case BALANCER_ON:
        return ClusterMetrics.Option.BALANCER_ON;
      case SERVERS_NAME:
        return ClusterMetrics.Option.SERVERS_NAME;
      case MASTER_INFO_PORT:
        return ClusterMetrics.Option.MASTER_INFO_PORT;
      case TABLE_TO_REGIONS_COUNT:
        return ClusterMetrics.Option.TABLE_TO_REGIONS_COUNT;
      case TASKS:
        return ClusterMetrics.Option.TASKS;
      case DECOMMISSIONED_SERVERS:
        return ClusterMetrics.Option.DECOMMISSIONED_SERVERS;
      // should not reach here
      default:
        throw new IllegalArgumentException("Invalid option: " + option);
    }
  }
Convert ClusterStatusProtos.Option to ClusterMetrics.Option
@param option a ClusterStatusProtos.Option
@return converted ClusterMetrics.Option
hbase-client/src/main/java/org/apache/hadoop/hbase/ClusterMetricsBuilder.java