public MetricName createMetricName(String metricName) {
   String groupName = ColumnFamilyMetrics.class.getPackage().getName();
   StringBuilder mbeanName = new StringBuilder();
   mbeanName.append(groupName).append(":");
   mbeanName.append("type=ColumnFamily");
   mbeanName.append(",name=").append(metricName);
   return new MetricName(groupName, "ColumnFamily", metricName, "all", mbeanName.toString());
 }
  public String service(String... parts) {
    final StringBuilder sb = new StringBuilder();
    if (null != c.prefix) {
      sb.append(c.prefix).append(c.separator);
    }

    for (String p : parts) {
      sb.append(p).append(c.separator);
    }

    return sb.substring(0, sb.length() - c.separator.length());
  }
 // The service name for a given metric.
 public String service(MetricName name, String... rest) {
   final StringBuilder sb = new StringBuilder();
   if (null != c.prefix) {
     sb.append(c.prefix).append(c.separator);
   }
   sb.append(name.getGroup()).append(c.separator).append(name.getType()).append(c.separator);
   if (name.hasScope()) {
     sb.append(name.getScope()).append(c.separator);
   }
   sb.append(name.getName());
   for (String part : rest) {
     sb.append(c.separator);
     sb.append(part);
   }
   return sb.toString();
 }
    public MetricName createMetricName(String metricName) {
      String groupName = ColumnFamilyMetrics.class.getPackage().getName();
      String type = isIndex ? "IndexColumnFamily" : "ColumnFamily";

      StringBuilder mbeanName = new StringBuilder();
      mbeanName.append(groupName).append(":");
      mbeanName.append("type=").append(type);
      mbeanName.append(",keyspace=").append(keyspaceName);
      mbeanName.append(",scope=").append(columnFamilyName);
      mbeanName.append(",name=").append(metricName);

      return new MetricName(
          groupName, type, metricName, keyspaceName + "." + columnFamilyName, mbeanName.toString());
    }