<commit_before>package com.linkedin.clustermanager;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.apache.log4j.Logger;

public class PropertyPathConfig
{
  private static Logger logger = Logger.getLogger(PropertyPathConfig.class);

  static Map<PropertyType, Map<Integer, String>> templateMap = new HashMap<PropertyType, Map<Integer, String>>();
  static
  {
    //@formatter:off
    addEntry(PropertyType.CONFIGS,1,"/{clusterName}/CONFIGS");
    addEntry(PropertyType.CONFIGS,2,"/{clusterName}/CONFIGS/{instanceName}");
    addEntry(PropertyType.LIVEINSTANCES,1,"/{clusterName}/LIVEINSTANCES");
    addEntry(PropertyType.LIVEINSTANCES,2,"/{clusterName}/LIVEINSTANCES/{instanceName}");
    addEntry(PropertyType.INSTANCES,1,"/{clusterName}/INSTANCES");
    addEntry(PropertyType.INSTANCES,2,"/{clusterName}/INSTANCES/{instanceName}");
    addEntry(PropertyType.IDEALSTATES,1,"/{clusterName}/IDEALSTATES");
    addEntry(PropertyType.IDEALSTATES,2,"/{clusterName}/IDEALSTATES/{resourceGroupName}");
    addEntry(PropertyType.EXTERNALVIEW,1,"/{clusterName}/EXTERNALVIEW");
    addEntry(PropertyType.EXTERNALVIEW,2,"/{clusterName}/EXTERNALVIEW/{resourceGroupName}");
    addEntry(PropertyType.STATEMODELDEFS,1,"/{clusterName}/STATEMODELDEFS");
    addEntry(PropertyType.STATEMODELDEFS,2,"/{clusterName}/STATEMODELDEFS/{stateModelName}");
    addEntry(PropertyType.CONTROLLER,1,"/{clusterName}/CONTROLLER");
    addEntry(PropertyType.PROPERTYSTORE,1,"/{clusterName}/PROPERTYSTORE");
    //INSTANCE
    addEntry(PropertyType.MESSAGES,2,"/{clusterName}/INSTANCES/{instanceName}/MESSAGES");
    addEntry(PropertyType.MESSAGES,3,"/{clusterName}/INSTANCES/{instanceName}/MESSAGES/{msgId}");
    addEntry(PropertyType.CURRENTSTATES,2,"/{clusterName}/INSTANCES/{instanceName}/CURRENTSTATES");
    addEntry(PropertyType.CURRENTSTATES,3,"/{clusterName}/INSTANCES/{instanceName}/CURRENTSTATES/{sessionId}");
    addEntry(PropertyType.CURRENTSTATES,4,"/{clusterName}/INSTANCES/{instanceName}/CURRENTSTATES/{sessionId}/{resourceGroupName}");
    addEntry(PropertyType.STATUSUPDATES,2,"/{clusterName}/INSTANCES/{instanceName}/STATUSUPDATES");
    addEntry(PropertyType.STATUSUPDATES,3,"/{clusterName}/INSTANCES/{instanceName}/STATUSUPDATES/{sessionId}");
    addEntry(PropertyType.STATUSUPDATES,4,"/{clusterName}/INSTANCES/{instanceName}/STATUSUPDATES/{sessionId}/{subPath}");
    addEntry(PropertyType.STATUSUPDATES,5,"/{clusterName}/INSTANCES/{instanceName}/STATUSUPDATES/{sessionId}/{subPath}/{recordName}");
    addEntry(PropertyType.ERRORS,2,"/{clusterName}/INSTANCES/{instanceName}/ERRORS/");
    addEntry(PropertyType.ERRORS,3,"/{clusterName}/INSTANCES/{instanceName}/ERRORS/{sessionId}");
    addEntry(PropertyType.ERRORS,4,"/{clusterName}/INSTANCES/{instanceName}/ERRORS/{sessionId}/{subPath}");
    addEntry(PropertyType.ERRORS,5,"/{clusterName}/INSTANCES/{instanceName}/ERRORS/{sessionId}/{subPath}/{recordName}");
    addEntry(PropertyType.HEALTHREPORT,2,"/{clusterName}/HEALTHREPORT/{instanceName}/HEALTHREPORT");
    addEntry(PropertyType.HEALTHREPORT,3,"/{clusterName}/HEALTHREPORT/{instanceName}/HEALTHREPORT/{reportName}");
    //CONTROLLER
    addEntry(PropertyType.MESSAGES_CONTROLLER,1,"/{clusterName}/CONTROLLER/MESSAGES");
    addEntry(PropertyType.MESSAGES_CONTROLLER,2,"/{clusterName}/CONTROLLER/MESSAGES/{msgId}");
    addEntry(PropertyType.ERRORS_CONTROLLER,1,"/{clusterName}/CONTROLLER/ERRORS");
    addEntry(PropertyType.ERRORS_CONTROLLER,2,"/{clusterName}/CONTROLLER/ERRORS/{errorId}");
    addEntry(PropertyType.STATUSUPDATES_CONTROLLER,1,"/{clusterName}/CONTROLLER/STATUSUPDATES");
    addEntry(PropertyType.STATUSUPDATES_CONTROLLER,2,"/{clusterName}/CONTROLLER/STATUSUPDATES/{sessionId}");
    addEntry(PropertyType.STATUSUPDATES_CONTROLLER,3,"/{clusterName}/CONTROLLER/STATUSUPDATES/{sessionId}/{subPath}");
    addEntry(PropertyType.STATUSUPDATES_CONTROLLER,4,"/{clusterName}/CONTROLLER/STATUSUPDATES/{sessionId}/{subPath}/{recordName}");
    addEntry(PropertyType.LEADER,1,"/{clusterName}/CONTROLLER/LEADER");
    addEntry(PropertyType.HISTORY,1,"/{clusterName}/CONTROLLER/HISTORY");
    addEntry(PropertyType.PAUSE,1,"/{clusterName}/CONTROLLER/PAUSE");
    //@formatter:on<commit_msg>fix the healthcheck propertypathconfig<commit_after>package com.linkedin.clustermanager;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.apache.log4j.Logger;

public class PropertyPathConfig
{
  private static Logger logger = Logger.getLogger(PropertyPathConfig.class);

  static Map<PropertyType, Map<Integer, String>> templateMap = new HashMap<PropertyType, Map<Integer, String>>();
  static
  {
    //@formatter:off
    addEntry(PropertyType.CONFIGS,1,"/{clusterName}/CONFIGS");
    addEntry(PropertyType.CONFIGS,2,"/{clusterName}/CONFIGS/{instanceName}");
    addEntry(PropertyType.LIVEINSTANCES,1,"/{clusterName}/LIVEINSTANCES");
    addEntry(PropertyType.LIVEINSTANCES,2,"/{clusterName}/LIVEINSTANCES/{instanceName}");
    addEntry(PropertyType.INSTANCES,1,"/{clusterName}/INSTANCES");
    addEntry(PropertyType.INSTANCES,2,"/{clusterName}/INSTANCES/{instanceName}");
    addEntry(PropertyType.IDEALSTATES,1,"/{clusterName}/IDEALSTATES");
    addEntry(PropertyType.IDEALSTATES,2,"/{clusterName}/IDEALSTATES/{resourceGroupName}");
    addEntry(PropertyType.EXTERNALVIEW,1,"/{clusterName}/EXTERNALVIEW");
    addEntry(PropertyType.EXTERNALVIEW,2,"/{clusterName}/EXTERNALVIEW/{resourceGroupName}");
    addEntry(PropertyType.STATEMODELDEFS,1,"/{clusterName}/STATEMODELDEFS");
    addEntry(PropertyType.STATEMODELDEFS,2,"/{clusterName}/STATEMODELDEFS/{stateModelName}");
    addEntry(PropertyType.CONTROLLER,1,"/{clusterName}/CONTROLLER");
    addEntry(PropertyType.PROPERTYSTORE,1,"/{clusterName}/PROPERTYSTORE");
    //INSTANCE
    addEntry(PropertyType.MESSAGES,2,"/{clusterName}/INSTANCES/{instanceName}/MESSAGES");
    addEntry(PropertyType.MESSAGES,3,"/{clusterName}/INSTANCES/{instanceName}/MESSAGES/{msgId}");
    addEntry(PropertyType.CURRENTSTATES,2,"/{clusterName}/INSTANCES/{instanceName}/CURRENTSTATES");
    addEntry(PropertyType.CURRENTSTATES,3,"/{clusterName}/INSTANCES/{instanceName}/CURRENTSTATES/{sessionId}");
    addEntry(PropertyType.CURRENTSTATES,4,"/{clusterName}/INSTANCES/{instanceName}/CURRENTSTATES/{sessionId}/{resourceGroupName}");
    addEntry(PropertyType.STATUSUPDATES,2,"/{clusterName}/INSTANCES/{instanceName}/STATUSUPDATES");
    addEntry(PropertyType.STATUSUPDATES,3,"/{clusterName}/INSTANCES/{instanceName}/STATUSUPDATES/{sessionId}");
    addEntry(PropertyType.STATUSUPDATES,4,"/{clusterName}/INSTANCES/{instanceName}/STATUSUPDATES/{sessionId}/{subPath}");
    addEntry(PropertyType.STATUSUPDATES,5,"/{clusterName}/INSTANCES/{instanceName}/STATUSUPDATES/{sessionId}/{subPath}/{recordName}");
    addEntry(PropertyType.ERRORS,2,"/{clusterName}/INSTANCES/{instanceName}/ERRORS/");
    addEntry(PropertyType.ERRORS,3,"/{clusterName}/INSTANCES/{instanceName}/ERRORS/{sessionId}");
    addEntry(PropertyType.ERRORS,4,"/{clusterName}/INSTANCES/{instanceName}/ERRORS/{sessionId}/{subPath}");
    addEntry(PropertyType.ERRORS,5,"/{clusterName}/INSTANCES/{instanceName}/ERRORS/{sessionId}/{subPath}/{recordName}");
    addEntry(PropertyType.HEALTHREPORT,2,"/{clusterName}/INSTANCES/{instanceName}/HEALTHREPORT/");
    addEntry(PropertyType.HEALTHREPORT,3,"/{clusterName}/INSTANCES/{instanceName}/HEALTHREPORT/{reportName}");
    //CONTROLLER
    addEntry(PropertyType.MESSAGES_CONTROLLER,1,"/{clusterName}/CONTROLLER/MESSAGES");
    addEntry(PropertyType.MESSAGES_CONTROLLER,2,"/{clusterName}/CONTROLLER/MESSAGES/{msgId}");
    addEntry(PropertyType.ERRORS_CONTROLLER,1,"/{clusterName}/CONTROLLER/ERRORS");
    addEntry(PropertyType.ERRORS_CONTROLLER,2,"/{clusterName}/CONTROLLER/ERRORS/{errorId}");
    addEntry(PropertyType.STATUSUPDATES_CONTROLLER,1,"/{clusterName}/CONTROLLER/STATUSUPDATES");
    addEntry(PropertyType.STATUSUPDATES_CONTROLLER,2,"/{clusterName}/CONTROLLER/STATUSUPDATES/{sessionId}");
    addEntry(PropertyType.STATUSUPDATES_CONTROLLER,3,"/{clusterName}/CONTROLLER/STATUSUPDATES/{sessionId}/{subPath}");
    addEntry(PropertyType.STATUSUPDATES_CONTROLLER,4,"/{clusterName}/CONTROLLER/STATUSUPDATES/{sessionId}/{subPath}/{recordName}");
    addEntry(PropertyType.LEADER,1,"/{clusterName}/CONTROLLER/LEADER");
    addEntry(PropertyType.HISTORY,1,"/{clusterName}/CONTROLLER/HISTORY");
    addEntry(PropertyType.PAUSE,1,"/{clusterName}/CONTROLLER/PAUSE");
    //@formatter:on
{'fraction_non_alphanumeric': 0.16415662650602408, 'fraction_numerical': 0.009499536607970344, 'mean_word_length': 7.818181818181818, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3755191', 'n_tokens_mistral': 2856, 'n_tokens_neox': 2817, 'n_words': 154}