Exemplo n.º 1
0
 JobJarMaker(
     IResourceArchiveFileGenerator resourceArchiveFileGenerator,
     DriverFolderPreparationHelper driverFolderPreparationHelper,
     REEFFileNames fileNames,
     [Parameter(typeof(AzureBatchAccountKey))] string azureBatchAccountKey,
     [Parameter(typeof(AzureBatchAccountName))] string azureBatchAccountName,
     [Parameter(typeof(AzureBatchAccountUri))] string azureBatchAccountUri,
     [Parameter(typeof(AzureBatchPoolId))] string azureBatchPoolId,
     [Parameter(typeof(AzureStorageAccountKey))] string azureStorageAccountKey,
     [Parameter(typeof(AzureStorageAccountName))] string azureStorageAccountName,
     [Parameter(typeof(AzureStorageContainerName))] string azureStorageContainerName)
 {
     _resourceArchiveFileGenerator  = resourceArchiveFileGenerator;
     _driverFolderPreparationHelper = driverFolderPreparationHelper;
     _fileNames = fileNames;
     _avroAzureBatchJobSubmissionParameters = new AvroAzureBatchJobSubmissionParameters
     {
         AzureBatchAccountKey      = azureBatchAccountKey,
         AzureBatchAccountName     = azureBatchAccountName,
         AzureBatchAccountUri      = azureBatchAccountUri,
         AzureBatchPoolId          = azureBatchPoolId,
         AzureStorageAccountKey    = azureStorageAccountKey,
         AzureStorageAccountName   = azureStorageAccountName,
         AzureStorageContainerName = azureStorageContainerName,
         AzureBatchIsWindows       = true
     };
 }
Exemplo n.º 2
0
 private JobJarMaker(
     IResourceArchiveFileGenerator resourceArchiveFileGenerator,
     DriverFolderPreparationHelper driverFolderPreparationHelper,
     REEFFileNames fileNames,
     [Parameter(typeof(AzureBatchAccountName))] string azureBatchAccountName,
     [Parameter(typeof(AzureBatchAccountUri))] string azureBatchAccountUri,
     [Parameter(typeof(AzureBatchPoolId))] string azureBatchPoolId,
     [Parameter(typeof(AzureStorageAccountName))] string azureStorageAccountName,
     [Parameter(typeof(AzureStorageContainerName))] string azureStorageContainerName,
     [Parameter(typeof(AzureBatchPoolDriverPortsList))] List <string> azureBatchPoolDriverPortsList,
     [Parameter(typeof(ContainerRegistryServer))] string containerRegistryServer,
     [Parameter(typeof(ContainerRegistryUsername))] string containerRegistryUsername,
     [Parameter(typeof(ContainerRegistryPassword))] string containerRegistryPassword,
     [Parameter(typeof(ContainerImageName))] string containerImageName)
 {
     _resourceArchiveFileGenerator  = resourceArchiveFileGenerator;
     _driverFolderPreparationHelper = driverFolderPreparationHelper;
     _fileNames = fileNames;
     _avroAzureBatchJobSubmissionParameters = new AvroAzureBatchJobSubmissionParameters
     {
         AzureBatchAccountName         = azureBatchAccountName,
         AzureBatchAccountUri          = azureBatchAccountUri,
         AzureBatchPoolId              = azureBatchPoolId,
         AzureStorageAccountName       = azureStorageAccountName,
         AzureStorageContainerName     = azureStorageContainerName,
         AzureBatchPoolDriverPortsList = azureBatchPoolDriverPortsList,
         ContainerRegistryServer       = containerRegistryServer,
         ContainerRegistryUsername     = containerRegistryUsername,
         ContainerRegistryPassword     = containerRegistryPassword,
         ContainerImageName            = containerImageName,
     };
 }
Exemplo n.º 3
0
        private void SerializeJobFile(string localDriverFolderPath, AvroAzureBatchJobSubmissionParameters jobParameters)
        {
            var serializedArgs = AvroJsonSerializer <AvroAzureBatchJobSubmissionParameters> .ToBytes(jobParameters);

            var submissionJobArgsFilePath = Path.Combine(localDriverFolderPath,
                                                         _fileNames.GetReefFolderName(), _fileNames.GetJobSubmissionParametersFile());

            using (var jobArgsFileStream = new FileStream(submissionJobArgsFilePath, FileMode.CreateNew))
            {
                jobArgsFileStream.Write(serializedArgs, 0, serializedArgs.Length);
            }
        }