[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71B9GXCF96K6QPFKHSS5EGP":3,"skill-same:01M71B9GXCF96K6QPFKHSS5EGP":78},{"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":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":6,"ownerHtmlUrl":52,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":53,"install":54,"resources":67},"01M71B9GXCF96K6QPFKHSS5EGP","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\".","strmt7\u002Fai_skills_collection_benchmarked","strmt7","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F28989754?v=4","01M71929P914SWKQ7QJV24NBBY","Stratos","01M71929Q9VGKQ7PWYR95VSQQQ",1,"MIT","https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fskills\u002Fby-category\u002Fcloud-azure-microsoft-sdks\u002Fofficial-vendor-reference\u002Fazure-compute-batch-java\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"azure compute","azure","azure compute batch java","java","batch","compute","Nodes","hpc","for","pool","with","azure batch","scale","triggers","jobs","sdk","parallel","run","tasks","microsoft","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\".\nlicense: MIT\nmetadata:\n  author: Microsoft\n  version: \"1.0.0\"\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,"license":15,"metadata":44,"description":7},{"author":45,"version":46},"Microsoft","1.0.0","main","5c95bcac4646c5aed06bd9aed5235cfc7985aafc","included\u002Fskills\u002Fby-category\u002Fcloud-azure-microsoft-sdks\u002Fofficial-vendor-reference\u002Fazure-compute-batch-java",0,"https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked","https:\u002F\u002Fgithub.com\u002Fstrmt7","2026-11-11 04:18:12",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add strmt7\u002Fai_skills_collection_benchmarked --skill azure-compute-batch-java",{"tool":60,"command":61},"bunx","bunx skills add strmt7\u002Fai_skills_collection_benchmarked --skill azure-compute-batch-java",{"tool":63,"command":64},"pnpm","pnpm dlx skills add strmt7\u002Fai_skills_collection_benchmarked --skill azure-compute-batch-java","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fskills\u002Fby-category\u002Fcloud-azure-microsoft-sdks\u002Fofficial-vendor-reference\u002Fazure-compute-batch-java\u002FSKILL.md",true,[68,74],{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Facceptance-criteria.md","REFERENCE","参考文档",5074,"https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fskills\u002Fby-category\u002Fcloud-azure-microsoft-sdks\u002Fofficial-vendor-reference\u002Fazure-compute-batch-java\u002Freferences\u002Facceptance-criteria.md",{"path":75,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fexamples.md",29018,"https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fskills\u002Fby-category\u002Fcloud-azure-microsoft-sdks\u002Fofficial-vendor-reference\u002Fazure-compute-batch-java\u002Freferences\u002Fexamples.md",[79,111,140,165,191,219],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":84,"sourceHtmlUrl":85,"categories":86,"keywords":95,"publishedAt":39},"01M71D4H3T6M57DFKN8HENAWRV","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fskills\u002Fby-category\u002Ftesting-qa-benchmarking\u002Fofficial-reference\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fskills\u002Fby-category\u002Ftesting-qa-benchmarking\u002Fofficial-reference\u002Fwebapp-testing\u002FSKILL.md",[87,92],{"categoryNo":88,"categoryName":89,"taxonomyType":90,"taxonomyTypeDesc":91},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",{"categoryNo":93,"categoryName":94,"taxonomyType":90,"taxonomyTypeDesc":91},"01JBSEEDCAT000000000000009","前端开发",[96,97,98,27,99,100,101,102,103,104,105,29,106,107,108,109,110],"webapp","testing","webapp testing","applications","local","frontend","debugging","toolkit","logs","browser","playwright","web","behavior","ui","screenshots",{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":115,"sourceHtmlUrl":116,"categories":117,"keywords":121,"publishedAt":39},"01M71D4CQR2A2TB7GASCR5ZBG3","skill-creator","Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.","https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fskills\u002Fby-category\u002Ftesting-qa-benchmarking\u002Fofficial-reference\u002Fskill-creator-anthropics\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fskills\u002Fby-category\u002Ftesting-qa-benchmarking\u002Fofficial-reference\u002Fskill-creator-anthropics\u002FSKILL.md",[118],{"categoryNo":119,"categoryName":120,"taxonomyType":90,"taxonomyTypeDesc":91},"01JBSEEDCAT000000000000023","Skill与智能体开发",[122,123,124,125,126,127,128,129,130,131,132,36,133,134,135,136,137,138,27,139],"skill creator","creator","performance","improve","run evals","new","when","analysis","create","optimize","variance analysis","edit","benchmark","a skill","existing skill","evals","modify","accuracy",{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":148,"publishedAt":39},"01M71D488XHEZVXXSXFYP8ENMH","playwright-skill","Complete browser automation with Playwright. Auto-detects dev servers, writes reusable test scripts, and supports screenshots, responsive checks, UX validation, login flows, link checks, and arbitrary browser automation. Use when the user wants to test a website, automate browser interactions, validate web functionality, or perform browser-based testing.","https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fskills\u002Fby-category\u002Ftesting-qa-benchmarking\u002Flatest-release-browser-automation\u002Fplaywright-skill\u002FSKILL.md",[146,147],{"categoryNo":88,"categoryName":89,"taxonomyType":90,"taxonomyTypeDesc":91},{"categoryNo":119,"categoryName":120,"taxonomyType":90,"taxonomyTypeDesc":91},[106,149,150,151,97,152,153,128,154,105,155,156,157,158,159,160,161,162,163,164],"playwright skill","browser automation","flows","auto","access","Bash","website","ux","login","scripts","read","write","node","install","network","responsive",{"skillNo":166,"name":167,"nameZh":6,"description":168,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":169,"sourceHtmlUrl":170,"categories":171,"keywords":173,"publishedAt":39},"01M71CY25GM939M6RES91QSG3T","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fskills\u002Fby-category\u002Fsearch-retrieval-web-automation\u002Fofficial-reference\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fskills\u002Fby-category\u002Fsearch-retrieval-web-automation\u002Fofficial-reference\u002Fweb-artifacts-builder\u002FSKILL.md",[172],{"categoryNo":93,"categoryName":94,"taxonomyType":90,"taxonomyTypeDesc":91},[174,175,176,107,177,178,179,27,180,181,101,182,183,184,185,186,187,188,189,190],"builder","artifacts builder","artifacts","web artifacts builder","single-file","css","Tailwind","ui components","single","use","file","components","react","multi","state","routing","state management",{"skillNo":192,"name":193,"nameZh":6,"description":194,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":195,"sourceHtmlUrl":196,"categories":197,"keywords":207,"publishedAt":39},"01M71CXZB60QJJ1H4S3NN94WMZ","frontend-design","Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML\u002FCSS layouts, or when styling\u002Fbeautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.","https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fskills\u002Fby-category\u002Fsearch-retrieval-web-automation\u002Fofficial-reference\u002Ffrontend-design\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fskills\u002Fby-category\u002Fsearch-retrieval-web-automation\u002Fofficial-reference\u002Ffrontend-design\u002FSKILL.md",[198,199,202],{"categoryNo":93,"categoryName":94,"taxonomyType":90,"taxonomyTypeDesc":91},{"categoryNo":200,"categoryName":201,"taxonomyType":90,"taxonomyTypeDesc":91},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":203,"categoryName":204,"taxonomyType":205,"taxonomyTypeDesc":206},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[101,208,209,179,210,211,212,99,213,214,183,128,176,215,185,216,186,217,218,29],"design","frontend design","ui design","generic","aesthetics","landing","pages","code","web ui","react components","examples",{"skillNo":220,"name":221,"nameZh":6,"description":222,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":223,"categories":224,"keywords":225,"publishedAt":39},"01M71CVZ54WFBTVA7R16PFY1ZE","zarr-python","Chunked N-D arrays for cloud storage. Compressed arrays, parallel I\u002FO, S3\u002FGCS integration, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fskills\u002Fby-category\u002Fscience-research-data-analysis\u002Flatest-release-community\u002Fzarr-python\u002FSKILL.md",[],[226,227,228,229,230,231,232,35,233,27,234,235,236,237,238,239,31,240],"zarr python","python","zarr","arrays","Cloud Storage","scientific","storage","dask","numpy","gcs","s3","integration","scientific computing","cloud","pipelines"]