src/main/java/org/apache/hadoop/hdfs/server/namenode/analytics/Helper.java
public static String toYAxis(String sum) {
    switch (sum) {
      case "count":
        return "# of INodes";
      case "fileSize":
        return "Bytes (No Replication Factor)";
      case "diskspaceConsumed":
        return "Bytes (With Replication Factor)";
      case "numBlocks":
        return "# of Blocks (No Replication Factor)";
      case "blockSize":
        return "Block Size (No Replication Factor)";
      case "numReplicas":
        return "# of Replicas (Blocks * Replication Factor)";
      case "memoryConsumed":
        return "Bytes";
      case "dsQuota":
        return "DS Quota";
      case "nsQuota":
        return "NS Quota";
      case "dsQuotaUsed":
        return "DS Quota Used";
      case "nsQuotaUsed":
        return "Namespace Quota Used";
      case "dsQuotaRatioUsed":
        return "DS Quota Usage Percentage";
      case "nsQuotaRatioUsed":
        return "NS Quota Usage Percentage";
      case "dirNumChildren":
        return "# of Children INodes";
      default:
        throw new IllegalArgumentException(
            "Could not determine sum type: " + sum + ".\nPlease check /sums for available sums.");
    }
  }
/**
   * Get the title of the Y axis for a chart based on the sum.
   *
   * @param sum type of sum
   * @return string representing the y axis
   */
Get the title of the Y axis for a chart based on the sum.
@param sum type of sum
@return string representing the y axis
Get the title of the Y axis for a chart based on the sum . @param sum type of sum @return string representing the y axis
public static String toYAxis(String sum) {
    switch (sum) {
      case "count":
        return "# of INodes";
      case "fileSize":
        return "Bytes (No Replication Factor)";
      case "diskspaceConsumed":
        return "Bytes (With Replication Factor)";
      case "numBlocks":
        return "# of Blocks (No Replication Factor)";
      case "blockSize":
        return "Block Size (No Replication Factor)";
      case "numReplicas":
        return "# of Replicas (Blocks * Replication Factor)";
      case "memoryConsumed":
        return "Bytes";
      case "dsQuota":
        return "DS Quota";
      case "nsQuota":
        return "NS Quota";
      case "dsQuotaUsed":
        return "DS Quota Used";
      case "nsQuotaUsed":
        return "Namespace Quota Used";
      case "dsQuotaRatioUsed":
        return "DS Quota Usage Percentage";
      case "nsQuotaRatioUsed":
        return "NS Quota Usage Percentage";
      case "dirNumChildren":
        return "# of Children INodes";
      default:
        throw new IllegalArgumentException(
            "Could not determine sum type: " + sum + ".\nPlease check /sums for available sums.");
    }
  }
public static String toYAxis ( String sum ) { switch ( sum ) { case "count" : return "# of INodes" ; case "fileSize" : return "Bytes (No Replication Factor)" ; case "diskspaceConsumed" : return "Bytes (With Replication Factor)" ; case "numBlocks" : return "# of Blocks (No Replication Factor)" ; case "blockSize" : return "Block Size (No Replication Factor)" ; case "numReplicas" : return "# of Replicas (Blocks * Replication Factor)" ; case "memoryConsumed" : return "Bytes" ; case "dsQuota" : return "DS Quota" ; case "nsQuota" : return "NS Quota" ; case "dsQuotaUsed" : return "DS Quota Used" ; case "nsQuotaUsed" : return "Namespace Quota Used" ; case "dsQuotaRatioUsed" : return "DS Quota Usage Percentage" ; case "nsQuotaRatioUsed" : return "NS Quota Usage Percentage" ; case "dirNumChildren" : return "# of Children INodes" ; default : throw new IllegalArgumentException ( "Could not determine sum type: " + sum + ".\nPlease check /sums for available sums." ) ; } }
Get the title of the Y axis for a chart based on the sum.
Get the title of the Y axis for a chart based on the sum .