diff --git a/Java/PoolAndResourceFile/src/main/java/PoolAndResourceFile.java b/Java/PoolAndResourceFile/src/main/java/PoolAndResourceFile.java index 7fb9f284..6d5890f0 100644 --- a/Java/PoolAndResourceFile/src/main/java/PoolAndResourceFile.java +++ b/Java/PoolAndResourceFile/src/main/java/PoolAndResourceFile.java @@ -16,13 +16,14 @@ public class PoolAndResourceFile { // Get Batch and storage account information from environment - static String BATCH_ACCOUNT = System.getenv("AZURE_BATCH_ACCOUNT"); - static String BATCH_ACCESS_KEY = System.getenv("AZURE_BATCH_ACCESS_KEY"); - static String BATCH_URI = System.getenv("AZURE_BATCH_ENDPOINT"); - static String STORAGE_ACCOUNT_NAME = System.getenv("STORAGE_ACCOUNT_NAME"); - static String STORAGE_ACCOUNT_KEY = System.getenv("STORAGE_ACCOUNT_KEY"); + static String BATCH_ACCOUNT = "metlife"; //System.getenv("AZURE_BATCH_ACCOUNT") + static String BATCH_ACCESS_KEY = "a7+xnp0ECqN28DXqv2VmoapYQolTF0c7CriBMzxabgma4vfiha+Uffp0fbEGF1qVxdZ/tU4t9Wu6+ABa+eeYkQ=="; //System.getenv("AZURE_BATCH_ACCESS_KEY"); + static String BATCH_URI = "metlife.eastus.batch.azure.com"; //System.getenv("AZURE_BATCH_ENDPOINT"); + static String STORAGE_ACCOUNT_NAME = "metlifepoc"; //System.getenv("STORAGE_ACCOUNT_NAME"); + static String STORAGE_ACCOUNT_KEY = "SxJZ9lzgO+O+pzPX0zqA89xhKpUQ3OLvDMHOyxSO3V0PwE2sUN+LEcESJPjtBma3989DGJlDIIKT+ASt/o80tw=="; //System.getenv("STORAGE_ACCOUNT_KEY"); static String STORAGE_CONTAINER_NAME = "poolandresourcefile"; + // How many tasks to run across how many nodes static int TASK_COUNT = 5; static int NODE_COUNT = 1; @@ -111,9 +112,9 @@ public static void main(String[] argv) throws Exception { private static CloudPool createPoolIfNotExists(BatchClient client, String poolId) throws BatchErrorException, IllegalArgumentException, IOException, InterruptedException, TimeoutException { // Create a pool with 1 A1 VM - String osPublisher = "OpenLogic"; - String osOffer = "CentOS"; - String poolVMSize = "STANDARD_A1"; + String osPublisher = "canonical"; + String osOffer = "ubuntuserver"; + String poolVMSize = "standard_a1_v2"; int poolVMCount = 1; Duration poolSteadyTimeout = Duration.ofMinutes(5); Duration vmReadyTimeout = Duration.ofMinutes(20); @@ -338,17 +339,17 @@ private static void waitForTasksToComplete(BatchClient client, String jobId, Dur throw new TimeoutException("Task did not complete within the specified timeout"); } - private static void printBatchException(BatchErrorException err) { - System.out.printf("BatchError %s%n", err.toString()); - if (err.body() != null) { - System.out.printf("BatchError code = %s, message = %s%n", err.body().code(), - err.body().message().value()); - if (err.body().values() != null) { - for (BatchErrorDetail detail : err.body().values()) { - System.out.printf("Detail %s=%s%n", detail.key(), detail.value()); - } - } - } - } +// private static void printBatchException(BatchErrorException err) { +// System.out.printf("BatchError %s%n", err.toString()); +// if (err.body() != null) { +// System.out.printf("BatchError code = %s, message = %s%n", err.body().code(), +// err.body().message().value()); +// if (err.body().values() != null) { +// for (BatchErrorDetail detail : err.body().values()) { +// System.out.printf("Detail %s=%s%n", detail.key(), detail.value()); +// } +// } +// } +// } }