public static String getMetricName ( String name ) { switch ( CommonUtils . PROCESS_TYPE . get ( ) ) { case CLIENT : return getClientMetricName ( name ) ; case MASTER : return getMasterMetricName ( name ) ; case PROXY : return getProxyMetricName ( name ) ; case WORKER : return getWorkerMetricName ( name ) ; case JOB_MASTER : return getJobMasterMetricName ( name ) ; case JOB_WORKER : return getJobWorkerMetricName ( name ) ; default : throw new IllegalStateException ( "Unknown process type" ) ; } }
Converts a simple string to a qualified metric name based on the process type .