<commit_before><?xml version='1.0' encoding='utf-8'?>
<Context docBase="{{ .Env.PEGA_DEPLOYMENT_DIR }}">
  <!-- When including prconfig settings as JNDI environment entries, make sure that:
    1. JNDI names are unique.
    2. No JNDI names are wholely included as the prefix to another JNDI name. 
       Ie, 'abc/feature1' and 'abc/feature1/threshold' can't be bound to objects.
  -->
  
  {{ if .Env.PEGA_SEARCH_TYPE }}
  <Environment name="prconfig/database/databases/pegasearch/searchDeploymentType" value="{{ .Env.PEGA_SEARCH_TYPE }}" type="java.lang.String" />
  {{ end }}

  {{ if .Env.PEGA_SEARCH_URL }}
  <Environment name="prconfig/database/databases/pegasearch/searchEndpoint" value="{{ .Env.PEGA_SEARCH_URL }}" type="java.lang.String"/>
  {{ end }}

  {{ if .Env.PEGA_STREAM_URL }}
  <Environment name="prconfig/services/stream/validate" value="true" type="java.lang.String"/>
  <Environment name="prconfig/services/stream/provider" value="StreamService" type="java.lang.String"/>
  <Environment name="prconfig/services/stream/provider_url" value="{{ .Env.PEGA_STREAM_URL }}" type="java.lang.String"/>
  {{ end }}

  {{ if isTrue .Env.CASSANDRA_CLUSTER }}
  <Environment name="prconfig/dnode/external_cassandra_cluster" value="{{ .Env.CASSANDRA_CLUSTER }}" type="java.lang.String"/>
  <Environment name="prconfig/dnode/external_cassandra_nodes" value="{{ default .Env.CASSANDRA_NODES "" }}" type="java.lang.String"/>
  <Environment name="prconfig/dnode/external_cassandra_port" value="{{ default .Env.CASSANDRA_PORT "9042" }}" type="java.lang.String"/>
  <Environment name="prconfig/dnode/cassandra_username" value="{{ default .Env.SECRET_CASSANDRA_USERNAME "dnode_ext" }}" type="java.lang.String"/>
  <Environment name="prconfig/dnode/cassandra_password" value="{{ default .Env.SECRET_CASSANDRA_PASSWORD "<PASSWORD>" }}" type="java.lang.String"/>
  {{ end }}

  {{ if isTrue .Env.CASSANDRA_CLIENT_ENCRYPTION}}
  <!-- TODO: placeholder for non-conflicting setting name -->
  <!--<Environment name="prconfig/dnode/cassandra_client_encryption" value="{{ .Env.CASSANDRA_CLIENT_ENCRYPTION }}"  type="java.lang.String"/>-->
  <Environment name="prconfig/dnode/cassandra_client_encryption/truststore" value="{{ .Env.CASSANDRA_TRUSTSTORE }}"  type="java.lang.String"/>
  <Environment name="prconfig/dnode/cassandra_client_encryption/truststore_password" value="{{ .Env.SECRET_CASSANDRA_TRUSTSTORE_PASSWORD }}"  type="java.lang.String"/>
  <Environment name="prconfig/dnode/cassandra_client_encryption/keystore" value="{{ .Env.CASSANDRA_KEYSTORE }}"  type="java.lang.String"/>
  <Environment name="prconfig/dnode/cassandra_client_encryption/keystore_password" value="{{.Env.SECRET_CASSANDRA_KEYSTORE_PASSWORD }}"  type="java.lang.String"/>
  {{ end }}

  <Environment name="prconfig/session/ha/quiesce/strategy/shutdownquiesce" value="true" type="java.lang.String"/>
  <Environment name="prconfig/session/ha/enabled" value="true" type="java.lang.String"/>
  <Environment name="prconfig/dsm/services/stream/pyBaseLogPath" value="/opt/pega/kafkadata/data" type="java.lang.String" />
  <Environment name="prconfig/cloud/isNodeAgnosticAdminStudio" value="true" type="java.lang.String"/>

  {{ if isTrue .Env.HZ_CLIENT_MODE }}
  <Environment name="prconfig/cluster/clientserver/clientmode" value="{{ .Env.HZ_CLIENT_MODE }}" type="java.lang.String"/>
  <Environment name="prconfig/cluster/clientserver/hzOnK8s" value="{{ .Env.HZ_DISCOVERY_K8S }}" type="java.lang.String"/>
  <Environment name="prconfig/identification/cluster/name" value="{{ .Env.HZ_CLUSTER_NAME }}" type="java.lang.String"/>
  <Environment name="prconfig/cluster/clientserver/server/hostname" value="{{ .Env.HZ_SERVER_HOSTNAME }}" type="java.lang.String"/>
  <Environment name="prconfig/cluster/clientserver/authentication/username" value="{{ .Env.SECRET_HZ_CS_AUTH_USERNAME }}" type="java.lang.String"/>
  <Environment name="prconfig/cluster/clientserver/authentication/password" value="{{ .Env.SECRET_HZ_CS_AUTH_PASSWORD }}" type="java.lang.String"/>
  {{ end }}
  
</Context>
<commit_msg>only add trust store or key store if provided<commit_after><?xml version='1.0' encoding='utf-8'?>
<Context docBase="{{ .Env.PEGA_DEPLOYMENT_DIR }}">
  <!-- When including prconfig settings as JNDI environment entries, make sure that:
    1. JNDI names are unique.
    2. No JNDI names are wholely included as the prefix to another JNDI name. 
       Ie, 'abc/feature1' and 'abc/feature1/threshold' can't be bound to objects.
  -->
  
  {{ if .Env.PEGA_SEARCH_TYPE }}
  <Environment name="prconfig/database/databases/pegasearch/searchDeploymentType" value="{{ .Env.PEGA_SEARCH_TYPE }}" type="java.lang.String" />
  {{ end }}

  {{ if .Env.PEGA_SEARCH_URL }}
  <Environment name="prconfig/database/databases/pegasearch/searchEndpoint" value="{{ .Env.PEGA_SEARCH_URL }}" type="java.lang.String"/>
  {{ end }}

  {{ if .Env.PEGA_STREAM_URL }}
  <Environment name="prconfig/services/stream/validate" value="true" type="java.lang.String"/>
  <Environment name="prconfig/services/stream/provider" value="StreamService" type="java.lang.String"/>
  <Environment name="prconfig/services/stream/provider_url" value="{{ .Env.PEGA_STREAM_URL }}" type="java.lang.String"/>
  {{ end }}

  {{ if isTrue .Env.CASSANDRA_CLUSTER }}
  <Environment name="prconfig/dnode/external_cassandra_cluster" value="{{ .Env.CASSANDRA_CLUSTER }}" type="java.lang.String"/>
  <Environment name="prconfig/dnode/external_cassandra_nodes" value="{{ default .Env.CASSANDRA_NODES "" }}" type="java.lang.String"/>
  <Environment name="prconfig/dnode/external_cassandra_port" value="{{ default .Env.CASSANDRA_PORT "9042" }}" type="java.lang.String"/>
  <Environment name="prconfig/dnode/cassandra_username" value="{{ default .Env.SECRET_CASSANDRA_USERNAME "dnode_ext" }}" type="java.lang.String"/>
  <Environment name="prconfig/dnode/cassandra_password" value="{{ default .Env.SECRET_CASSANDRA_PASSWORD "<PASSWORD>" }}" type="java.lang.String"/>
  {{ end }}

  {{ if isTrue .Env.CASSANDRA_CLIENT_ENCRYPTION}}
  <!-- TODO: placeholder for non-conflicting setting name -->
  <!--<Environment name="prconfig/dnode/cassandra_client_encryption" value="{{ .Env.CASSANDRA_CLIENT_ENCRYPTION }}"  type="java.lang.String"/>-->
  {{ if .Env.CASSANDRA_TRUSTSTORE -}}
  <Environment name="prconfig/dnode/cassandra_client_encryption/truststore" value="{{ .Env.CASSANDRA_TRUSTSTORE }}"  type="java.lang.String"/>
  <Environment name="prconfig/dnode/cassandra_client_encryption/truststore_password" value="{{ .Env.SECRET_CASSANDRA_TRUSTSTORE_PASSWORD }}"  type="java.lang.String"/>
  {{- end }}
  {{ if .Env.CASSANDRA_KEYSTORE -}}
  <Environment name="prconfig/dnode/cassandra_client_encryption/keystore" value="{{ .Env.CASSANDRA_KEYSTORE }}"  type="java.lang.String"/>
  <Environment name="prconfig/dnode/cassandra_client_encryption/keystore_password" value="{{.Env.SECRET_CASSANDRA_KEYSTORE_PASSWORD }}"  type="java.lang.String"/>
  {{- end }}
  {{ end }}

  <Environment name="prconfig/session/ha/quiesce/strategy/shutdownquiesce" value="true" type="java.lang.String"/>
  <Environment name="prconfig/session/ha/enabled" value="true" type="java.lang.String"/>
  <Environment name="prconfig/dsm/services/stream/pyBaseLogPath" value="/opt/pega/kafkadata/data" type="java.lang.String" />
  <Environment name="prconfig/cloud/isNodeAgnosticAdminStudio" value="true" type="java.lang.String"/>

  {{ if isTrue .Env.HZ_CLIENT_MODE }}
  <Environment name="prconfig/cluster/clientserver/clientmode" value="{{ .Env.HZ_CLIENT_MODE }}" type="java.lang.String"/>
  <Environment name="prconfig/cluster/clientserver/hzOnK8s" value="{{ .Env.HZ_DISCOVERY_K8S }}" type="java.lang.String"/>
  <Environment name="prconfig/identification/cluster/name" value="{{ .Env.HZ_CLUSTER_NAME }}" type="java.lang.String"/>
  <Environment name="prconfig/cluster/clientserver/server/hostname" value="{{ .Env.HZ_SERVER_HOSTNAME }}" type="java.lang.String"/>
  <Environment name="prconfig/cluster/clientserver/authentication/username" value="{{ .Env.SECRET_HZ_CS_AUTH_USERNAME }}" type="java.lang.String"/>
  <Environment name="prconfig/cluster/clientserver/authentication/password" value="{{ .Env.SECRET_HZ_CS_AUTH_PASSWORD }}" type="java.lang.String"/>
  {{ end }}
  
</Context>

{'fraction_non_alphanumeric': 0.16828322017458777, 'fraction_numerical': 0.0031522793404461687, 'mean_word_length': 5.7448896156991, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 2, '>': 67, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1873645', 'n_tokens_mistral': 2824, 'n_tokens_neox': 2807, 'n_words': 410}