<commit_before>{
   "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
   "contentVersion": "1.0.0.0",
   "parameters": {
      "clusterName": {
         "type": "string",
         "defaultValue": "[concat('hdi-', uniqueString(resourceGroup().id))]",
         "metadata": {
            "description": "The name of the cluster to create."
         }
      },
      "clusterVersion": {
         "type": "string",
         "defaultValue": "4.0",
         "metadata": {
            "description": "The HDInsight version to deploy."
         }
      },
      "headNodeSize": {
         "type": "string",
         "defaultValue": "Standard_D12_v2",
         "metadata": {
            "description": "The VM size of the head nodes."
         }
      },
      "workerNodeSize": {
         "type": "string",
         "defaultValue": "Standard_D13_v2",
         "metadata": {
            "description": "The VM size of the worker nodes."
         }
      },
      "workerNodeCount": {
         "type": "int",
         "defaultValue": 4,
         "metadata": {
            "description": "The number of worker nodes in the cluster."
         }
      },
      "clusterLoginUserName": {
         "type": "string",
         "metadata": {
            "description": "These credentials can be used to submit jobs to the cluster and to log into cluster dashboards."
         }
      },
      "clusterLoginPassword": {
         "type": "securestring",
         "metadata": {
            "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter."
         }
      },
      "sshUserName": {
         "type": "string",
         "metadata": {
            "description": "These credentials can be used to remotely access the cluster."
         }
      },
      "sshPassword": {
         "type": "securestring",
         "metadata": {
            "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter."
         }
      },
      "existingClusterStorageResourceGroup": {
         "type": "string",
         "defaultValue": "[resourceGroup().name]",
         "metadata": {
            "description": "The resource group name of the storage account to use as the cluster's default storage."
         }
      },
      "existingClusterStorageAccountName": {
         "type": "string",
         "metadata": {
            "description": "The name of the storage account to use as the cluster's default storage."
         }
      },
      "newOrExistingClusterStorageContainerName": {
         "type": "string",
         "metadata": {
            "description": "The name of the storage container to use."
         }
      },
      "existingSQLServerResourceGroup": {
         "type": "string",
         "defaultValue": "[resourceGroup().name]",
         "metadata": {
            "description": "The name of the resource group where the existing SQL server is to use for the new external metastore SQL db."
         }
      },
      "existingSQLServerName": {
         "type": "string",
         "metadata": {
            "description": "The name of the existing SQL server to use for the new external metastore SQL db."
         }
      },
      "existingSQLServerUsername": {
         "type": "string",
         "metadata": {
            "description": "The external Hive metastore's existing SQL server admin username."
         }
      },
      "existingSQLServerPassword": {
         "type": "securestring",
         "metadata": {
            "description": "The external Hive metastore's existing SQL server admin password."
         }
      },
      "newMetastoreDBName": {
         "type": "string",
         "defaultValue": "[concat('metastoredb', uniqueString(resourceGroup().id))]",
         "metadata": {
            "description": "The name of the new SQL db to create to serve as the external metastores."
         }
      },
      "existingVirtualNetworkResourceGroup": {
         "type": "string",
         "defaultValue": "[resourceGroup().name]",
         "metadata": {
            "description": "The existing virtual network resource group name."
         }
      },
      "existingVirtualNetworkName": {
         "type": "string",
         "metadata": {
            "description": "The existing virtual network name."
         }
      },
      "existingVirtualNetworkSubnetName": {
         "type": "string",
         "metadata": {
            "description": "The existing virtual network subnet name."
         }
      },
      "location": {
         "type": "string",
         "defaultValue": "[resourceGroup().location]",
         "metadata": {
            "description": "Location for all resources."
         }
      }
   },
   "variables": {
      "sqldbname": "[concat(parameters('existingSQLServerName'), '/', parameters('newMetastoreDBName'))]"
   },
   "resources": [
      {
         "type": "Microsoft.Sql/servers/databases",
         "apiVersion": "2018-06-01-preview",
         "location": "[parameters('location')]",
         "name": "[variables('sqldbname')]",
         "properties": {
            "collation": "SQL_Latin1_General_CP1_CI_AS",
            "maxSizeBytes": "268435456000",
            "zoneRedundant": false,
            "readScale": "Disabled",
            "readReplicaCount": 0
         },
         "sku": {
            "name": "S2",
            "tier": "Standard"
         }
      },
      {
         "name": "[parameters('clusterName')]",
         "type": "Microsoft.HDInsight/clusters",
         "location": "[parameters('location')]",
         "apiVersion": "2018-06-01-preview",
         "dependsOn": [
            "[variables('sqldbname')]"
         ],
         "properties": {
            "clusterVersion": "[parameters('clusterVersion')]",
            "osType": "Linux",
            "clusterDefinition": {
               "kind": "hadoop",
               "configurations": {
                  "gateway": {
                     "restAuthCredential.isEnabled": true,
                     "restAuthCredential.username": "[parameters('clusterLoginUserName')]",
                     "restAuthCredential.password": "[parameters('clusterLoginPassword')]"
                  },
                  "hive-site": {
                     "javax.jdo.option.ConnectionDriverName": "com.microsoft.sqlserver.jdbc.SQLServerDriver",
                     "javax.jdo.option.ConnectionURL": "[concat('jdbc:sqlserver://', reference(resourceId(parameters('existingSQLServerResourceGroup'), 'Microsoft.Sql/servers', parameters('existingSQLServerName')), '2018-06-01-preview').fullyQualifiedDomainName, ';database=',parameters('newMetastoreDBName'),';encrypt=true;trustServerCertificate=true;create=false;loginTimeout=300')]",
                     "javax.jdo.option.ConnectionUserName": "[parameters('existingSQLServerUsername')]",
                     "javax.jdo.option.ConnectionPassword": "[parameters('existingSQLServerPassword')]"
                  },
                  "hive-env": {
                     "hive_database": "Existing MSSQL Server database with SQL authentication",
                     "hive_database_name": "[parameters('newMetastoreDBName')]",
                     "hive_database_type": "mssql",
                     "hive_existing_mssql_server_database": "[parameters('newMetastoreDBName')]",
                     "hive_existing_mssql_server_host": "[reference(resourceId(parameters('existingSQLServerResourceGroup'),'Microsoft.Sql/servers',parameters('existingSQLServerName')), '2018-06-01-preview').fullyQualifiedDomainName]",
                     "hive_hostname": "[reference(resourceId(parameters('existingSQLServerResourceGroup'),'Microsoft.Sql/servers',parameters('existingSQLServerName')), '2018-06-01-preview').fullyQualifiedDomainName]"
                  },
                  "ambari-conf": {
                     "database-server": "[reference(resourceId(parameters('existingSQLServerResourceGroup'),'Microsoft.Sql/servers',parameters('existingSQLServerName')), '2018-06-01-preview').fullyQualifiedDomainName]",<commit_msg>Try to fix deployment<commit_after>{
   "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
   "contentVersion": "1.0.0.0",
   "parameters": {
      "clusterName": {
         "type": "string",
         "defaultValue": "[concat('hdi-', uniqueString(resourceGroup().id))]",
         "metadata": {
            "description": "The name of the cluster to create."
         }
      },
      "clusterVersion": {
         "type": "string",
         "defaultValue": "4.0",
         "metadata": {
            "description": "The HDInsight version to deploy."
         }
      },
      "headNodeSize": {
         "type": "string",
         "defaultValue": "Standard_D12_v2",
         "metadata": {
            "description": "The VM size of the head nodes."
         }
      },
      "workerNodeSize": {
         "type": "string",
         "defaultValue": "Standard_D13_v2",
         "metadata": {
            "description": "The VM size of the worker nodes."
         }
      },
      "workerNodeCount": {
         "type": "int",
         "defaultValue": 4,
         "metadata": {
            "description": "The number of worker nodes in the cluster."
         }
      },
      "clusterLoginUserName": {
         "type": "string",
         "metadata": {
            "description": "These credentials can be used to submit jobs to the cluster and to log into cluster dashboards."
         }
      },
      "clusterLoginPassword": {
         "type": "securestring",
         "metadata": {
            "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter."
         }
      },
      "sshUserName": {
         "type": "string",
         "metadata": {
            "description": "These credentials can be used to remotely access the cluster."
         }
      },
      "sshPassword": {
         "type": "securestring",
         "metadata": {
            "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter."
         }
      },
      "existingClusterStorageResourceGroup": {
         "type": "string",
         "defaultValue": "[resourceGroup().name]",
         "metadata": {
            "description": "The resource group name of the storage account to use as the cluster's default storage."
         }
      },
      "existingClusterStorageAccountName": {
         "type": "string",
         "metadata": {
            "description": "The name of the storage account to use as the cluster's default storage."
         }
      },
      "newOrExistingClusterStorageContainerName": {
         "type": "string",
         "metadata": {
            "description": "The name of the storage container to use."
         }
      },
      "existingSQLServerResourceGroup": {
         "type": "string",
         "defaultValue": "[resourceGroup().name]",
         "metadata": {
            "description": "The name of the resource group where the existing SQL server is to use for the new external metastore SQL db."
         }
      },
      "existingSQLServerName": {
         "type": "string",
         "metadata": {
            "description": "The name of the existing SQL server to use for the new external metastore SQL db."
         }
      },
      "existingSQLServerUsername": {
         "type": "string",
         "metadata": {
            "description": "The external Hive metastore's existing SQL server admin username."
         }
      },
      "existingSQLServerPassword": {
         "type": "securestring",
         "metadata": {
            "description": "The external Hive metastore's existing SQL server admin password."
         }
      },
      "newMetastoreDBName": {
         "type": "string",
         "defaultValue": "[concat('metastoredb', uniqueString(resourceGroup().id))]",
         "metadata": {
            "description": "The name of the new SQL db to create to serve as the external metastores."
         }
      },
      "existingVirtualNetworkResourceGroup": {
         "type": "string",
         "defaultValue": "[resourceGroup().name]",
         "metadata": {
            "description": "The existing virtual network resource group name."
         }
      },
      "existingVirtualNetworkName": {
         "type": "string",
         "metadata": {
            "description": "The existing virtual network name."
         }
      },
      "existingVirtualNetworkSubnetName": {
         "type": "string",
         "metadata": {
            "description": "The existing virtual network subnet name."
         }
      },
      "location": {
         "type": "string",
         "defaultValue": "[resourceGroup().location]",
         "metadata": {
            "description": "Location for all resources."
         }
      }
   },
   "variables": {
      "sqldbname": "[concat(parameters('existingSQLServerName'), '/', parameters('newMetastoreDBName'))]"
   },
   "resources": [
      {
         "apiVersion": "2019-05-01",
         "name": "sqlDbDeployment",
         "type": "Microsoft.Resources/deployments",
         "resourceGroup": "[parameters('existingSQLServerResourceGroup')]",
         "properties": {
            "mode": "Incremental",
            "template": {
               "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
               "contentVersion": "1.0.0.0",
               "resources": [
                  {
                     "type": "Microsoft.Sql/servers/databases",
                     "apiVersion": "2020-02-02-preview",
                     "location": "[parameters('location')]",
                     "name": "[variables('sqldbname')]",
                     "properties": {
                        "collation": "SQL_Latin1_General_CP1_CI_AS",
                        "maxSizeBytes": "268435456000",
                        "zoneRedundant": false,
                        "readScale": "Disabled",
                        "readReplicaCount": 0
                     },
                     "sku": {
                        "name": "S2",
                        "tier": "Standard"
                     }
                  }
               ]
            }
         }
      },
      {
         "name": "[parameters('clusterName')]",
         "type": "Microsoft.HDInsight/clusters",
         "location": "[parameters('location')]",
         "apiVersion": "2018-06-01-preview",
         "dependsOn": [
            "sqlDbDeployment"
         ],
         "properties": {
            "clusterVersion": "[parameters('clusterVersion')]",
            "osType": "Linux",
            "clusterDefinition": {
               "kind": "hadoop",
               "configurations": {
                  "gateway": {
                     "restAuthCredential.isEnabled": true,
                     "restAuthCredential.username": "[parameters('clusterLoginUserName')]",
                     "restAuthCredential.password": "[parameters('clusterLoginPassword')]"
                  },
                  "hive-site": {
                     "javax.jdo.option.ConnectionDriverName": "com.microsoft.sqlserver.jdbc.SQLServerDriver",
                     "javax.jdo.option.ConnectionURL": "[concat('jdbc:sqlserver://', reference(resourceId(parameters('existingSQLServerResourceGroup'), 'Microsoft.Sql/servers', parameters('existingSQLServerName')), '2018-06-01-preview').fullyQualifiedDomainName, ';database=',parameters('newMetastoreDBName'),';encrypt=true;trustServerCertificate=true;create=false;loginTimeout=300')]",
                     "javax.jdo.option.ConnectionUserName": "[parameters('existingSQLServerUsername')]",
                     "javax.jdo.option.ConnectionPassword": "[parameters('existingSQLServerPassword')]"
                  },
                  "hive-env": {
                     "hive_database": "Existing MSSQL Server database with SQL authentication",
                     "hive_database_name": "[parameters('newMetastoreDBName')]",
                     "hive_database_type": "mssql",
                     "hive_existing_mssql_server_database": "[parameters('newMetastoreDBName')]",
                     "hive_existing_mssql_server_host": "[reference(resourceId(parameters('existingSQLServerResourceGroup'),'Microsoft.Sql/servers',parameters('existingSQLServerName')), '2018-06-01-preview').fullyQualifiedDomainName]",
                     "hive_hostname": "[reference(resourceId(parameters('existingSQLServerResourceGroup'),'Microsoft.Sql/servers',parameters('existingSQLServerName')), '2018-06-01-preview').fullyQualifiedDomainName]"
                  },
                  "ambari-conf": {
                     "database-server": "[reference(resourceId(parameters('existingSQLServerResourceGroup'),'Microsoft.Sql/servers',parameters('existingSQLServerName')), '2018-06-01-preview').fullyQualifiedDomainName]",
{'fraction_non_alphanumeric': 0.13821563498982853, 'fraction_numerical': 0.011857018308631211, 'mean_word_length': 2.0577572418695573, 'pattern_counts': {'":': 294, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 3, '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': '6880423', 'n_tokens_mistral': 4523, 'n_tokens_neox': 4324, 'n_words': 959}