[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EXGWS0ETSGHXK87K0JN5FX":3,"skill-same:01M6EXGWS0ETSGHXK87K0JN5FX":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":35,"linkOnly":36,"markdownContent":37,"markdownBody":38,"frontMatter":39,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":43,"repositoryHtmlUrl":44,"repositoryHomepageUrl":45,"ownerHtmlUrl":46,"ownerBlogUrl":6,"ownerDescription":47,"updatedAt":48,"install":49,"resources":62},"01M6EXGWS0ETSGHXK87K0JN5FX","azure-compute-batch-java",null,"Azure Batch SDK for Java. Run large-scale parallel and HPC batch jobs with pools, jobs, tasks, and compute nodes.\nTriggers: \"BatchClient java\", \"azure batch java\", \"batch pool java\", \"batch job java\", \"HPC java\", \"parallel computing java\".","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fsickn33\u002Fazure-compute-batch-java\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34],"azure compute","azure","azure compute batch java","java","batch","compute","sdk","tasks","run","parallel","Nodes","jobs","triggers","scale","azure batch","with","2026-11-10 10:12:30",false,"---\nname: azure-compute-batch-java\ndescription: |\n  Azure Batch SDK for Java. Run large-scale parallel and HPC batch jobs with pools, jobs, tasks, and compute nodes.\n  Triggers: \"BatchClient java\", \"azure batch java\", \"batch pool java\", \"batch job java\", \"HPC java\", \"parallel computing java\".\n---\n\n# Azure Batch SDK for Java\n\nClient library for running large-scale parallel and high-performance computing (HPC) batch jobs in Azure.\n\n## Installation\n\n```xml\n\u003Cdependency>\n    \u003CgroupId>com.azure\u003C\u002FgroupId>\n    \u003CartifactId>azure-compute-batch\u003C\u002FartifactId>\n    \u003Cversion>1.0.0-beta.5\u003C\u002Fversion>\n\u003C\u002Fdependency>\n```\n\n## Prerequisites\n\n- Azure Batch account\n- Pool configured with compute nodes\n- Azure subscription\n\n## Environment Variables\n\n```bash\nAZURE_BATCH_ENDPOINT=https:\u002F\u002F\u003Caccount>.\u003Cregion>.batch.azure.com\nAZURE_BATCH_ACCOUNT=\u003Caccount-name>\nAZURE_BATCH_ACCESS_KEY=\u003Caccount-key>\n```\n\n## Client Creation\n\n### With Microsoft Entra ID (Recommended)\n\n```java\nimport com.azure.compute.batch.BatchClient;\nimport com.azure.compute.batch.BatchClientBuilder;\nimport com.azure.identity.DefaultAzureCredentialBuilder;\n\nBatchClient batchClient = new BatchClientBuilder()\n    .credential(new DefaultAzureCredentialBuilder().build())\n    .endpoint(System.getenv(\"AZURE_BATCH_ENDPOINT\"))\n    .buildClient();\n```\n\n### Async Client\n\n```java\nimport com.azure.compute.batch.BatchAsyncClient;\n\nBatchAsyncClient batchAsyncClient = new BatchClientBuilder()\n    .credential(new DefaultAzureCredentialBuilder().build())\n    .endpoint(System.getenv(\"AZURE_BATCH_ENDPOINT\"))\n    .buildAsyncClient();\n```\n\n### With Shared Key Credentials\n\n```java\nimport com.azure.core.credential.AzureNamedKeyCredential;\n\nString accountName = System.getenv(\"AZURE_BATCH_ACCOUNT\");\nString accountKey = System.getenv(\"AZURE_BATCH_ACCESS_KEY\");\nAzureNamedKeyCredential sharedKeyCreds = new AzureNamedKeyCredential(accountName, accountKey);\n\nBatchClient batchClient = new BatchClientBuilder()\n    .credential(sharedKeyCreds)\n    .endpoint(System.getenv(\"AZURE_BATCH_ENDPOINT\"))\n    .buildClient();\n```\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Pool | Collection of compute nodes that run tasks |\n| Job | Logical grouping of tasks |\n| Task | Unit of computation (command\u002Fscript) |\n| Node | VM that executes tasks |\n| Job Schedule | Recurring job creation |\n\n## Pool Operations\n\n### Create Pool\n\n```java\nimport com.azure.compute.batch.models.*;\n\nbatchClient.createPool(new BatchPoolCreateParameters(\"myPoolId\", \"STANDARD_DC2s_V2\")\n    .setVirtualMachineConfiguration(\n        new VirtualMachineConfiguration(\n            new BatchVmImageReference()\n                .setPublisher(\"Canonical\")\n                .setOffer(\"UbuntuServer\")\n                .setSku(\"22_04-lts\")\n                .setVersion(\"latest\"),\n            \"batch.node.ubuntu 22.04\"))\n    .setTargetDedicatedNodes(2)\n    .setTargetLowPriorityNodes(0), null);\n```\n\n### Get Pool\n\n```java\nBatchPool pool = batchClient.getPool(\"myPoolId\");\nSystem.out.println(\"Pool state: \" + pool.getState());\nSystem.out.println(\"Current dedicated nodes: \" + pool.getCurrentDedicatedNodes());\n```\n\n### List Pools\n\n```java\nimport com.azure.core.http.rest.PagedIterable;\n\nPagedIterable\u003CBatchPool> pools = batchClient.listPools();\nfor (BatchPool pool : pools) {\n    System.out.println(\"Pool: \" + pool.getId() + \", State: \" + pool.getState());\n}\n```\n\n### Resize Pool\n\n```java\nimport com.azure.core.util.polling.SyncPoller;\n\nBatchPoolResizeParameters resizeParams = new BatchPoolResizeParameters()\n    .setTargetDedicatedNodes(4)\n    .setTargetLowPriorityNodes(2);\n\nSyncPoller\u003CBatchPool, BatchPool> poller = batchClient.beginResizePool(\"myPoolId\", resizeParams);\npoller.waitForCompletion();\nBatchPool resizedPool = poller.getFinalResult();\n```\n\n### Enable AutoScale\n\n```java\nBatchPoolEnableAutoScaleParameters autoScaleParams = new BatchPoolEnableAutoScaleParameters()\n    .setAutoScaleEvaluationInterval(Duration.ofMinutes(5))\n    .setAutoScaleFormula(\"$TargetDedicatedNodes = min(10, $PendingTasks.GetSample(TimeInterval_Minute * 5));\");\n\nbatchClient.enablePoolAutoScale(\"myPoolId\", autoScaleParams);\n```\n\n### Delete Pool\n\n```java\nSyncPoller\u003CBatchPool, Void> deletePoller = batchClient.beginDeletePool(\"myPoolId\");\ndeletePoller.waitForCompletion();\n```\n\n## Job Operations\n\n### Create Job\n\n```java\nbatchClient.createJob(\n    new BatchJobCreateParameters(\"myJobId\", new BatchPoolInfo().setPoolId(\"myPoolId\"))\n        .setPriority(100)\n        .setConstraints(new BatchJobConstraints()\n            .setMaxWallClockTime(Duration.ofHours(24))\n            .setMaxTaskRetryCount(3)),\n    null);\n```\n\n### Get Job\n\n```java\nBatchJob job = batchClient.getJob(\"myJobId\", null, null);\nSystem.out.println(\"Job state: \" + job.getState());\n```\n\n### List Jobs\n\n```java\nPagedIterable\u003CBatchJob> jobs = batchClient.listJobs(new BatchJobsListOptions());\nfor (BatchJob job : jobs) {\n    System.out.println(\"Job: \" + job.getId() + \", State: \" + job.getState());\n}\n```\n\n### Get Task Counts\n\n```java\nBatchTaskCountsResult counts = batchClient.getJobTaskCounts(\"myJobId\");\nSystem.out.println(\"Active: \" + counts.getTaskCounts().getActive());\nSystem.out.println(\"Running: \" + counts.getTaskCounts().getRunning());\nSystem.out.println(\"Completed: \" + counts.getTaskCounts().getCompleted());\n```\n\n### Terminate Job\n\n```java\nBatchJobTerminateParameters terminateParams = new BatchJobTerminateParameters()\n    .setTerminationReason(\"Manual termination\");\nBatchJobTerminateOptions options = new BatchJobTerminateOptions().setParameters(terminateParams);\n\nSyncPoller\u003CBatchJob, BatchJob> poller = batchClient.beginTerminateJob(\"myJobId\", options, null);\npoller.waitForCompletion();\n```\n\n### Delete Job\n\n```java\nSyncPoller\u003CBatchJob, Void> deletePoller = batchClient.beginDeleteJob(\"myJobId\");\ndeletePoller.waitForCompletion();\n```\n\n## Task Operations\n\n### Create Single Task\n\n```java\nBatchTaskCreateParameters task = new BatchTaskCreateParameters(\"task1\", \"echo 'Hello World'\");\nbatchClient.createTask(\"myJobId\", task);\n```\n\n### Create Task with Exit Conditions\n\n```java\nbatchClient.createTask(\"myJobId\", new BatchTaskCreateParameters(\"task2\", \"cmd \u002Fc exit 3\")\n    .setExitConditions(new ExitConditions()\n        .setExitCodeRanges(Arrays.asList(\n            new ExitCodeRangeMapping(2, 4, \n                new ExitOptions().setJobAction(BatchJobActionKind.TERMINATE)))))\n    .setUserIdentity(new UserIdentity()\n        .setAutoUser(new AutoUserSpecification()\n            .setScope(AutoUserScope.TASK)\n            .setElevationLevel(ElevationLevel.NON_ADMIN))),\n    null);\n```\n\n### Create Task Collection (up to 100)\n\n```java\nList\u003CBatchTaskCreateParameters> taskList = Arrays.asList(\n    new BatchTaskCreateParameters(\"task1\", \"echo Task 1\"),\n    new BatchTaskCreateParameters(\"task2\", \"echo Task 2\"),\n    new BatchTaskCreateParameters(\"task3\", \"echo Task 3\")\n);\nBatchTaskGroup taskGroup = new BatchTaskGroup(taskList);\nBatchCreateTaskCollectionResult result = batchClient.createTaskCollection(\"myJobId\", taskGroup);\n```\n\n### Create Many Tasks (no limit)\n\n```java\nList\u003CBatchTaskCreateParameters> tasks = new ArrayList\u003C>();\nfor (int i = 0; i \u003C 1000; i++) {\n    tasks.add(new BatchTaskCreateParameters(\"task\" + i, \"echo Task \" + i));\n}\nbatchClient.createTasks(\"myJobId\", tasks);\n```\n\n### Get Task\n\n```java\nBatchTask task = batchClient.getTask(\"myJobId\", \"task1\");\nSystem.out.println(\"Task state: \" + task.getState());\nSystem.out.println(\"Exit code: \" + task.getExecutionInfo().getExitCode());\n```\n\n### List Tasks\n\n```java\nPagedIterable\u003CBatchTask> tasks = batchClient.listTasks(\"myJobId\");\nfor (BatchTask task : tasks) {\n    System.out.println(\"Task: \" + task.getId() + \", State: \" + task.getState());\n}\n```\n\n### Get Task Output\n\n```java\nimport com.azure.core.util.BinaryData;\nimport java.nio.charset.StandardCharsets;\n\nBinaryData stdout = batchClient.getTaskFile(\"myJobId\", \"task1\", \"stdout.txt\");\nSystem.out.println(new String(stdout.toBytes(), StandardCharsets.UTF_8));\n```\n\n### Terminate Task\n\n```java\nbatchClient.terminateTask(\"myJobId\", \"task1\", null, null);\n```\n\n## Node Operations\n\n### List Nodes\n\n```java\nPagedIterable\u003CBatchNode> nodes = batchClient.listNodes(\"myPoolId\", new BatchNodesListOptions());\nfor (BatchNode node : nodes) {\n    System.out.println(\"Node: \" + node.getId() + \", State: \" + node.getState());\n}\n```\n\n### Reboot Node\n\n```java\nSyncPoller\u003CBatchNode, BatchNode> rebootPoller = batchClient.beginRebootNode(\"myPoolId\", \"nodeId\");\nrebootPoller.waitForCompletion();\n```\n\n### Get Remote Login Settings\n\n```java\nBatchNodeRemoteLoginSettings settings = batchClient.getNodeRemoteLoginSettings(\"myPoolId\", \"nodeId\");\nSystem.out.println(\"IP: \" + settings.getRemoteLoginIpAddress());\nSystem.out.println(\"Port: \" + settings.getRemoteLoginPort());\n```\n\n## Job Schedule Operations\n\n### Create Job Schedule\n\n```java\nbatchClient.createJobSchedule(new BatchJobScheduleCreateParameters(\"myScheduleId\",\n    new BatchJobScheduleConfiguration()\n        .setRecurrenceInterval(Duration.ofHours(6))\n        .setDoNotRunUntil(OffsetDateTime.now().plusDays(1)),\n    new BatchJobSpecification(new BatchPoolInfo().setPoolId(\"myPoolId\"))\n        .setPriority(50)),\n    null);\n```\n\n### Get Job Schedule\n\n```java\nBatchJobSchedule schedule = batchClient.getJobSchedule(\"myScheduleId\");\nSystem.out.println(\"Schedule state: \" + schedule.getState());\n```\n\n## Error Handling\n\n```java\nimport com.azure.compute.batch.models.BatchErrorException;\nimport com.azure.compute.batch.models.BatchError;\n\ntry {\n    batchClient.getPool(\"nonexistent-pool\");\n} catch (BatchErrorException e) {\n    BatchError error = e.getValue();\n    System.err.println(\"Error code: \" + error.getCode());\n    System.err.println(\"Message: \" + error.getMessage().getValue());\n    \n    if (\"PoolNotFound\".equals(error.getCode())) {\n        System.err.println(\"The specified pool does not exist.\");\n    }\n}\n```\n\n## Best Practices\n\n1. **Use Entra ID** — Preferred over shared key for authentication\n2. **Use management SDK for pools** — `azure-resourcemanager-batch` supports managed identities\n3. **Batch task creation** — Use `createTaskCollection` or `createTasks` for multiple tasks\n4. **Handle LRO properly** — Pool resize, delete operations are long-running\n5. **Monitor task counts** — Use `getJobTaskCounts` to track progress\n6. **Set constraints** — Configure `maxWallClockTime` and `maxTaskRetryCount`\n7. **Use low-priority nodes** — Cost savings for fault-tolerant workloads\n8. **Enable autoscale** — Dynamically adjust pool size based on workload\n\n## Reference Links\n\n| Resource | URL |\n|----------|-----|\n| Maven Package | https:\u002F\u002Fcentral.sonatype.com\u002Fartifact\u002Fcom.azure\u002Fazure-compute-batch |\n| GitHub | https:\u002F\u002Fgithub.com\u002FAzure\u002Fazure-sdk-for-java\u002Ftree\u002Fmain\u002Fsdk\u002Fbatch\u002Fazure-compute-batch |\n| API Documentation | https:\u002F\u002Flearn.microsoft.com\u002Fjava\u002Fapi\u002Fcom.azure.compute.batch |\n| Product Docs | https:\u002F\u002Flearn.microsoft.com\u002Fazure\u002Fbatch\u002F |\n| REST API | https:\u002F\u002Flearn.microsoft.com\u002Frest\u002Fapi\u002Fbatchservice\u002F |\n| Samples | https:\u002F\u002Fgithub.com\u002Fazure\u002Fazure-batch-samples |\n","# Azure Batch SDK for Java\n\nClient library for running large-scale parallel and high-performance computing (HPC) batch jobs in Azure.\n\n## Installation\n\n```xml\n\u003Cdependency>\n    \u003CgroupId>com.azure\u003C\u002FgroupId>\n    \u003CartifactId>azure-compute-batch\u003C\u002FartifactId>\n    \u003Cversion>1.0.0-beta.5\u003C\u002Fversion>\n\u003C\u002Fdependency>\n```\n\n## Prerequisites\n\n- Azure Batch account\n- Pool configured with compute nodes\n- Azure subscription\n\n## Environment Variables\n\n```bash\nAZURE_BATCH_ENDPOINT=https:\u002F\u002F\u003Caccount>.\u003Cregion>.batch.azure.com\nAZURE_BATCH_ACCOUNT=\u003Caccount-name>\nAZURE_BATCH_ACCESS_KEY=\u003Caccount-key>\n```\n\n## Client Creation\n\n### With Microsoft Entra ID (Recommended)\n\n```java\nimport com.azure.compute.batch.BatchClient;\nimport com.azure.compute.batch.BatchClientBuilder;\nimport com.azure.identity.DefaultAzureCredentialBuilder;\n\nBatchClient batchClient = new BatchClientBuilder()\n    .credential(new DefaultAzureCredentialBuilder().build())\n    .endpoint(System.getenv(\"AZURE_BATCH_ENDPOINT\"))\n    .buildClient();\n```\n\n### Async Client\n\n```java\nimport com.azure.compute.batch.BatchAsyncClient;\n\nBatchAsyncClient batchAsyncClient = new BatchClientBuilder()\n    .credential(new DefaultAzureCredentialBuilder().build())\n    .endpoint(System.getenv(\"AZURE_BATCH_ENDPOINT\"))\n    .buildAsyncClient();\n```\n\n### With Shared Key Credentials\n\n```java\nimport com.azure.core.credential.AzureNamedKeyCredential;\n\nString accountName = System.getenv(\"AZURE_BATCH_ACCOUNT\");\nString accountKey = System.getenv(\"AZURE_BATCH_ACCESS_KEY\");\nAzureNamedKeyCredential sharedKeyCreds = new AzureNamedKeyCredential(accountName, accountKey);\n\nBatchClient batchClient = new BatchClientBuilder()\n    .credential(sharedKeyCreds)\n    .endpoint(System.getenv(\"AZURE_BATCH_ENDPOINT\"))\n    .buildClient();\n```\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Pool | Collection of compute nodes that run tasks |\n| Job | Logical grouping of tasks |\n| Task | Unit of computation (command\u002Fscript) |\n| Node | VM that executes tasks |\n| Job Schedule | Recurring job creation |\n\n## Pool Operations\n\n### Create Pool\n\n```java\nimport com.azure.compute.batch.models.*;\n\nbatchClient.createPool(new BatchPoolCreateParameters(\"myPoolId\", \"STANDARD_DC2s_V2\")\n    .setVirtualMachineConfiguration(\n        new VirtualMachineConfiguration(\n            new BatchVmImageReference()\n                .setPublisher(\"Canonical\")\n                .setOffer(\"UbuntuServer\")\n                .setSku(\"22_04-lts\")\n                .setVersion(\"latest\"),\n            \"batch.node.ubuntu 22.04\"))\n    .setTargetDedicatedNodes(2)\n    .setTargetLowPriorityNodes(0), null);\n```\n\n### Get Pool\n\n```java\nBatchPool pool = batchClient.getPool(\"myPoolId\");\nSystem.out.println(\"Pool state: \" + pool.getState());\nSystem.out.println(\"Current dedicated nodes: \" + pool.getCurrentDedicatedNodes());\n```\n\n### List Pools\n\n```java\nimport com.azure.core.http.rest.PagedIterable;\n\nPagedIterable\u003CBatchPool> pools = batchClient.listPools();\nfor (BatchPool pool : pools) {\n    System.out.println(\"Pool: \" + pool.getId() + \", State: \" + pool.getState());\n}\n```\n\n### Resize Pool\n\n```java\nimport com.azure.core.util.polling.SyncPoller;\n\nBatchPoolResizeParameters resizeParams = new BatchPoolResizeParameters()\n    .setTargetDedicatedNodes(4)\n    .setTargetLowPriorityNodes(2);\n\nSyncPoller\u003CBatchPool, BatchPool> poller = batchClient.beginResizePool(\"myPoolId\", resizeParams);\npoller.waitForCompletion();\nBatchPool resizedPool = poller.getFinalResult();\n```\n\n### Enable AutoScale\n\n```java\nBatchPoolEnableAutoScaleParameters autoScaleParams = new BatchPoolEnableAutoScaleParameters()\n    .setAutoScaleEvaluationInterval(Duration.ofMinutes(5))\n    .setAutoScaleFormula(\"$TargetDedicatedNodes = min(10, $PendingTasks.GetSample(TimeInterval_Minute * 5));\");\n\nbatchClient.enablePoolAutoScale(\"myPoolId\", autoScaleParams);\n```\n\n### Delete Pool\n\n```java\nSyncPoller\u003CBatchPool, Void> deletePoller = batchClient.beginDeletePool(\"myPoolId\");\ndeletePoller.waitForCompletion();\n```\n\n## Job Operations\n\n### Create Job\n\n```java\nbatchClient.createJob(\n    new BatchJobCreateParameters(\"myJobId\", new BatchPoolInfo().setPoolId(\"myPoolId\"))\n        .setPriority(100)\n        .setConstraints(new BatchJobConstraints()\n            .setMaxWallClockTime(Duration.ofHours(24))\n            .setMaxTaskRetryCount(3)),\n    null);\n```\n\n### Get Job\n\n```java\nBatchJob job = batchClient.getJob(\"myJobId\", null, null);\nSystem.out.println(\"Job state: \" + job.getState());\n```\n\n### List Jobs\n\n```java\nPagedIterable\u003CBatchJob> jobs = batchClient.listJobs(new BatchJobsListOptions());\nfor (BatchJob job : jobs) {\n    System.out.println(\"Job: \" + job.getId() + \", State: \" + job.getState());\n}\n```\n\n### Get Task Counts\n\n```java\nBatchTaskCountsResult counts = batchClient.getJobTaskCounts(\"myJobId\");\nSystem.out.println(\"Active: \" + counts.getTaskCounts().getActive());\nSystem.out.println(\"Running: \" + counts.getTaskCounts().getRunning());\nSystem.out.println(\"Completed: \" + counts.getTaskCounts().getCompleted());\n```\n\n### Terminate Job\n\n```java\nBatchJobTerminateParameters terminateParams = new BatchJobTerminateParameters()\n    .setTerminationReason(\"Manual termination\");\nBatchJobTerminateOptions options = new BatchJobTerminateOptions().setParameters(terminateParams);\n\nSyncPoller\u003CBatchJob, BatchJob> poller = batchClient.beginTerminateJob(\"myJobId\", options, null);\npoller.waitForCompletion();\n```\n\n### Delete Job\n\n```java\nSyncPoller\u003CBatchJob, Void> deletePoller = batchClient.beginDeleteJob(\"myJobId\");\ndeletePoller.waitForCompletion();\n```\n\n## Task Operations\n\n### Create Single Task\n\n```java\nBatchTaskCreateParameters task = new BatchTaskCreateParameters(\"task1\", \"echo 'Hello World'\");\nbatchClient.createTask(\"myJobId\", task);\n```\n\n### Create Task with Exit Conditions\n\n```java\nbatchClient.createTask(\"myJobId\", new BatchTaskCreateParameters(\"task2\", \"cmd \u002Fc exit 3\")\n    .setExitConditions(new ExitConditions()\n        .setExitCodeRanges(Arrays.asList(\n            new ExitCodeRangeMapping(2, 4, \n                new ExitOptions().setJobAction(BatchJobActionKind.TERMINATE)))))\n    .setUserIdentity(new UserIdentity()\n        .setAutoUser(new AutoUserSpecification()\n            .setScope(AutoUserScope.TASK)\n            .setElevationLevel(ElevationLevel.NON_ADMIN))),\n    null);\n```\n\n### Create Task Collection (up to 100)\n\n```java\nList\u003CBatchTaskCreateParameters> taskList = Arrays.asList(\n    new BatchTaskCreateParameters(\"task1\", \"echo Task 1\"),\n    new BatchTaskCreateParameters(\"task2\", \"echo Task 2\"),\n    new BatchTaskCreateParameters(\"task3\", \"echo Task 3\")\n);\nBatchTaskGroup taskGroup = new BatchTaskGroup(taskList);\nBatchCreateTaskCollectionResult result = batchClient.createTaskCollection(\"myJobId\", taskGroup);\n```\n\n### Create Many Tasks (no limit)\n\n```java\nList\u003CBatchTaskCreateParameters> tasks = new ArrayList\u003C>();\nfor (int i = 0; i \u003C 1000; i++) {\n    tasks.add(new BatchTaskCreateParameters(\"task\" + i, \"echo Task \" + i));\n}\nbatchClient.createTasks(\"myJobId\", tasks);\n```\n\n### Get Task\n\n```java\nBatchTask task = batchClient.getTask(\"myJobId\", \"task1\");\nSystem.out.println(\"Task state: \" + task.getState());\nSystem.out.println(\"Exit code: \" + task.getExecutionInfo().getExitCode());\n```\n\n### List Tasks\n\n```java\nPagedIterable\u003CBatchTask> tasks = batchClient.listTasks(\"myJobId\");\nfor (BatchTask task : tasks) {\n    System.out.println(\"Task: \" + task.getId() + \", State: \" + task.getState());\n}\n```\n\n### Get Task Output\n\n```java\nimport com.azure.core.util.BinaryData;\nimport java.nio.charset.StandardCharsets;\n\nBinaryData stdout = batchClient.getTaskFile(\"myJobId\", \"task1\", \"stdout.txt\");\nSystem.out.println(new String(stdout.toBytes(), StandardCharsets.UTF_8));\n```\n\n### Terminate Task\n\n```java\nbatchClient.terminateTask(\"myJobId\", \"task1\", null, null);\n```\n\n## Node Operations\n\n### List Nodes\n\n```java\nPagedIterable\u003CBatchNode> nodes = batchClient.listNodes(\"myPoolId\", new BatchNodesListOptions());\nfor (BatchNode node : nodes) {\n    System.out.println(\"Node: \" + node.getId() + \", State: \" + node.getState());\n}\n```\n\n### Reboot Node\n\n```java\nSyncPoller\u003CBatchNode, BatchNode> rebootPoller = batchClient.beginRebootNode(\"myPoolId\", \"nodeId\");\nrebootPoller.waitForCompletion();\n```\n\n### Get Remote Login Settings\n\n```java\nBatchNodeRemoteLoginSettings settings = batchClient.getNodeRemoteLoginSettings(\"myPoolId\", \"nodeId\");\nSystem.out.println(\"IP: \" + settings.getRemoteLoginIpAddress());\nSystem.out.println(\"Port: \" + settings.getRemoteLoginPort());\n```\n\n## Job Schedule Operations\n\n### Create Job Schedule\n\n```java\nbatchClient.createJobSchedule(new BatchJobScheduleCreateParameters(\"myScheduleId\",\n    new BatchJobScheduleConfiguration()\n        .setRecurrenceInterval(Duration.ofHours(6))\n        .setDoNotRunUntil(OffsetDateTime.now().plusDays(1)),\n    new BatchJobSpecification(new BatchPoolInfo().setPoolId(\"myPoolId\"))\n        .setPriority(50)),\n    null);\n```\n\n### Get Job Schedule\n\n```java\nBatchJobSchedule schedule = batchClient.getJobSchedule(\"myScheduleId\");\nSystem.out.println(\"Schedule state: \" + schedule.getState());\n```\n\n## Error Handling\n\n```java\nimport com.azure.compute.batch.models.BatchErrorException;\nimport com.azure.compute.batch.models.BatchError;\n\ntry {\n    batchClient.getPool(\"nonexistent-pool\");\n} catch (BatchErrorException e) {\n    BatchError error = e.getValue();\n    System.err.println(\"Error code: \" + error.getCode());\n    System.err.println(\"Message: \" + error.getMessage().getValue());\n    \n    if (\"PoolNotFound\".equals(error.getCode())) {\n        System.err.println(\"The specified pool does not exist.\");\n    }\n}\n```\n\n## Best Practices\n\n1. **Use Entra ID** — Preferred over shared key for authentication\n2. **Use management SDK for pools** — `azure-resourcemanager-batch` supports managed identities\n3. **Batch task creation** — Use `createTaskCollection` or `createTasks` for multiple tasks\n4. **Handle LRO properly** — Pool resize, delete operations are long-running\n5. **Monitor task counts** — Use `getJobTaskCounts` to track progress\n6. **Set constraints** — Configure `maxWallClockTime` and `maxTaskRetryCount`\n7. **Use low-priority nodes** — Cost savings for fault-tolerant workloads\n8. **Enable autoscale** — Dynamically adjust pool size based on workload\n\n## Reference Links\n\n| Resource | URL |\n|----------|-----|\n| Maven Package | https:\u002F\u002Fcentral.sonatype.com\u002Fartifact\u002Fcom.azure\u002Fazure-compute-batch |\n| GitHub | https:\u002F\u002Fgithub.com\u002FAzure\u002Fazure-sdk-for-java\u002Ftree\u002Fmain\u002Fsdk\u002Fbatch\u002Fazure-compute-batch |\n| API Documentation | https:\u002F\u002Flearn.microsoft.com\u002Fjava\u002Fapi\u002Fcom.azure.compute.batch |\n| Product Docs | https:\u002F\u002Flearn.microsoft.com\u002Fazure\u002Fbatch\u002F |\n| REST API | https:\u002F\u002Flearn.microsoft.com\u002Frest\u002Fapi\u002Fbatchservice\u002F |\n| Samples | https:\u002F\u002Fgithub.com\u002Fazure\u002Fazure-batch-samples |\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fsickn33\u002Fazure-compute-batch-java",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill azure-compute-batch-java",{"tool":55,"command":56},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill azure-compute-batch-java",{"tool":58,"command":59},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill azure-compute-batch-java","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fsickn33\u002Fazure-compute-batch-java\u002FSKILL.md",true,[63],{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},"skill-report.json","REFERENCE","参考文档",8809,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fsickn33\u002Fazure-compute-batch-java\u002Fskill-report.json",[70,84,94,102,108,115],{"skillNo":71,"name":72,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":80,"publishedAt":35},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[75],{"categoryNo":76,"categoryName":77,"taxonomyType":78,"taxonomyTypeDesc":79},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[81,82,83],"model","model hierarchy","model hierarchy skill",{"skillNo":85,"name":86,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":90,"publishedAt":35},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[89],{"categoryNo":76,"categoryName":77,"taxonomyType":78,"taxonomyTypeDesc":79},[91,92,93],"MCP","zoom","zoom mcp",{"skillNo":95,"name":96,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":35},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[25,100,101,92],"zoom apps sdk","apps",{"skillNo":103,"name":104,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":35},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[104],{"skillNo":109,"name":110,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":114,"publishedAt":35},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[113],{"categoryNo":76,"categoryName":77,"taxonomyType":78,"taxonomyTypeDesc":79},[110],{"skillNo":116,"name":117,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":35},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[117]]