Skip to content
This repository was archived by the owner on Oct 12, 2023. It is now read-only.

Commit 96081cc

Browse files
authored
Fix: File share sample (#312)
* Fixed sample * Removed unchanged file name * removed account * Removed custom script
1 parent 81dcb72 commit 96081cc

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

R/utility-job.R

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,9 @@ waitForTasksToComplete <-
499499

500500
for (i in 1:length(failedTasks$value)) {
501501
if (!is.null(failedTasks$value[[i]]$executionInfo$result) &&
502-
failedTasks$value[[i]]$executionInfo$result == "Failure") {
502+
grepl(failedTasks$value[[i]]$executionInfo$result,
503+
"failure",
504+
ignore.case = TRUE)) {
503505
tasksFailureWarningLabel <-
504506
paste0(tasksFailureWarningLabel,
505507
sprintf("%s\n", failedTasks$value[[i]]$id))
@@ -557,7 +559,7 @@ waitForTasksToComplete <-
557559
next
558560
}
559561

560-
if (tolower(mergeTask$executionInfo$result) == "success") {
562+
if (grepl(mergeTask$executionInfo$result, "success", ignore.case = TRUE)) {
561563
cat(" Completed.")
562564
break
563565
}
@@ -601,7 +603,9 @@ waitForJobPreparation <- function(jobId, poolId) {
601603
)
602604

603605
statuses <- sapply(statuses$value, function(x) {
604-
tolower(x$jobPreparationTaskExecutionInfo$result) == "success"
606+
grepl(x$jobPreparationTaskExecutionInfo$result,
607+
"success",
608+
ignore.case = TRUE)
605609
})
606610

607611
if (TRUE %in% statuses) {

samples/azure_files/azure_files_cluster.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
},
2121
"commandLine": [
2222
"mkdir /mnt/batch/tasks/shared/data",
23-
"mount -t cifs //<STORAGE_ACCOUNT_NAME>.file.core.windows.net/<FILE_SHARE_NAME> /mnt/batch/tasks/shared/data -o vers=3.0,username=<STORAGE_ACCOUNT_NAME>,password=<STORAGE_ACCOUNT_KEY>,dir_mode=0777,file_mode=0777,sec=ntlmssp",
24-
"wget https://raw.githubusercontent.com/Azure/doAzureParallel/feature/custom-package/inst/startup/install_custom.R",
25-
"docker run --rm -v $AZ_BATCH_NODE_ROOT_DIR:$AZ_BATCH_NODE_ROOT_DIR -e AZ_BATCH_NODE_ROOT_DIR=$AZ_BATCH_NODE_ROOT_DIR -e AZ_BATCH_NODE_STARTUP_DIR=$AZ_BATCH_NODE_STARTUP_DIR --rm -v $AZ_BATCH_NODE_ROOT_DIR:$AZ_BATCH_NODE_ROOT_DIR -e AZ_BATCH_NODE_SHARED_DIR=$AZ_BATCH_NODE_SHARED_DIR -e AZ_BATCH_NODE_ROOT_DIR=$AZ_BATCH_NODE_ROOT_DIR -e AZ_BATCH_NODE_STARTUP_DIR=$AZ_BATCH_NODE_STARTUP_DIR rocker/tidyverse:latest Rscript --no-save --no-environ --no-restore --no-site-file --verbose $AZ_BATCH_NODE_STARTUP_DIR/wd/install_custom.R /mnt/batch/tasks/shared/data"
23+
"mount -t cifs //<STORAGE_ACCOUNT_NAME>.file.core.windows.net/<FILE_SHARED_NAME> /mnt/batch/tasks/shared/data -o vers=3.0,username=<STORAGE_ACCOUNT_NAME>,password=<STORAGE_ACCOUNT_KEY>,dir_mode=0777,file_mode=0777,sec=ntlmssp"
2624
]
2725
}

samples/package_management/custom/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ Finds files that end with *.tar.gz in the current Azure File Share directory
2828
]
2929
}
3030
```
31-
3) For more information on using Azure Files on Batch, follow our other [sample](./azure_files/readme.md) of using Azure Files
31+
3) For more information on using Azure Files on Batch, follow our other [sample](../../azure_files/readme.md) of using Azure Files
3232
4) Replace your Storage Account name, endpoint and key in the cluster configuration file

0 commit comments

Comments
 (0)