Azure의 pool, job, task, compute node를 사용하여 대규모 병렬 및 고성능 컴퓨팅 배치 작업을 실행합니다.
- GitHub 스타
- 3,194
- 파일
- 2
- 마지막 커밋
- 2026년 11월 11일
- 라이선스
- MIT
- 허용된 도구
- —
azure-compute-batch-java skill은 무엇을 하나요?
azure-compute-batch-java은(는) agent skill입니다. Azure의 pool, job, task, compute node를 사용하여 대규모 병렬 및 고성능 컴퓨팅 배치 작업을 실행합니다.
skill의 SKILL.md에서 생성된 요약입니다.
azure-compute-batch-java skill 정보
고성능 컴퓨팅 워크로드를 관리하는 개발자는 이 Java SDK를 사용하여 Azure 내에서 대규모 병렬 배치 작업을 오케스트레이션할 수 있습니다. 이 SKILL은 가상 머신 노드 풀 생성부터 반복적인 작업 스케줄링까지 컴퓨팅 리소스의 전체 수명 주기를 관리하는 데 필요한 도구를 제공합니다. 복잡한 계산 작업을 논리적인 job으로 그룹화하고 task라는 개별 작업 단위로 실행하여 자동화하려는 엔지니어를 위해 설계되었습니다.
사용자가 컴퓨팅 인프라를 프로비저닝하거나, 기존 pool의 규모를 조정하거나, 분산 워크로드의 진행 상황을 모니터링해야 할 때 에이전트가 이 SKILL을 로드해야 합니다. 이 라이브러리는 동기 및 비동기 클라이언트를 모두 지원하여 다양한 애플리케이션 아키텍처에 유연하게 통합할 수 있습니다. 사용자는 pool, job, task, node와 같은 특정 구성 요소와 상호 작용하는 동시에, 리소스 사용량과 비용을 최적화하기 위해 auto-scaling formula 및 job schedule과 같은 기능을 활용할 수 있습니다. 인증은 Microsoft Entra ID 또는 공유 키 자격 증명을 통해 처리할 수 있으며, AZURE_BATCH_ENDPOINT와 같은 필수 환경 변수가 구성되어 있어야 합니다.
agent가 수행할 수 있는 작업
- 1컴퓨팅 인프라 프로비저닝특정 Ubuntu 이미지와 전용 노드 수를 사용하여 새로운 compute node pool을 생성합니다.
- 2리소스 동적 확장수요에 맞춰 기존 pool의 전용 및 low-priority node 수를 조정합니다.
- 3병렬 워크로드 실행대량의 개별 계산 task를 특정 job에 제출하여 실행합니다.
- 4반복적인 계산 자동화특정 job을 정기적인 간격으로 트리거하는 job schedule을 설정합니다.
- 5job 진행 상황 모니터링특정 job 내에서 활성, 실행 중 및 완료된 task의 수를 조회합니다.
skill의 SKILL.md를 기반으로 작성되었습니다. 모든 사용 사례는 해당 문서의 인용구와 대조 확인되었습니다.
azure-compute-batch-java skill 설치 방법
각 명령은 skill 폴더를 클라이언트의 skills 디렉터리에 복사합니다. 클라이언트를 재시작하거나 새 세션을 시작하여 로드하세요.Claude Code에 azure-compute-batch-java skill 설치
~/.claude/skills/azure-compute-batch-java/SKILL.md
$ npx degit microsoft/skills/.github/plugins/azure-sdk-java/skills/azure-compute-batch-java ~/.claude/skills/azure-compute-batch-javaClaude Code (project)에 azure-compute-batch-java skill 설치
.claude/skills/azure-compute-batch-java/SKILL.md
$ npx degit microsoft/skills/.github/plugins/azure-sdk-java/skills/azure-compute-batch-java .claude/skills/azure-compute-batch-javaCodex에 azure-compute-batch-java skill 설치
~/.agents/skills/azure-compute-batch-java/SKILL.md
$ npx degit microsoft/skills/.github/plugins/azure-sdk-java/skills/azure-compute-batch-java ~/.agents/skills/azure-compute-batch-javaGemini CLI에 azure-compute-batch-java skill 설치
~/.gemini/skills/azure-compute-batch-java/SKILL.md
$ npx degit microsoft/skills/.github/plugins/azure-sdk-java/skills/azure-compute-batch-java ~/.gemini/skills/azure-compute-batch-javaClaude.ai에 azure-compute-batch-java skill 설치
npx degit microsoft/skills/.github/plugins/azure-sdk-java/skills/azure-compute-batch-java azure-compute-batch-java && zip -r azure-compute-batch-java.zip azure-compute-batch-java # claude.ai → Customize → Skills → + → Create skill → Upload a skill → azure-compute-batch-java.zip
자동 검사
2026년 11월 14일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 보안 감사는 아닙니다. 에이전트가 실행하기 전에 스크립트를 읽어 보세요. 검사 방식
- 소스 저장소 연결 및 접근 가능microsoft/skills/.github/plugins/azure-sdk-java/skills/azure-compute-batch-java is public and reachablegithub.com/microsoft/skills/tree/HEAD/.github/plugins/azure- ↗통과
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit 2026-11-11github.com/microsoft/skills/commits ↗통과
- 스크립트에 다운로드 후 실행이나 자격 증명 탈취가 없음No scripts in the skill folder통과
- SKILL.md에 숨겨진 지침 없음No override phrases, safeguard switches, credential requests or hidden charactersgithub.com/microsoft/skills/blob/HEAD/.github/plugins/azure- ↗통과
- 사전 허용 도구가 제한됨No pre-approved tools; the agent asks before using onegithub.com/microsoft/skills/blob/HEAD/.github/plugins/azure- ↗통과
SKILL.md
GitHub에서 보기Azure Batch SDK for Java
Client library for running large-scale parallel and high-performance computing (HPC) batch jobs in Azure.
Installation
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-compute-batch</artifactId>
<version>1.0.0-beta.5</version>
</dependency>
Prerequisites
- Azure Batch account
- Pool configured with compute nodes
- Azure subscription
Environment Variables
AZURE_BATCH_ENDPOINT=https://<account>.<region>.batch.azure.com # Required for all auth methods
AZURE_BATCH_ACCOUNT=<account-name> # Only required for shared key auth
AZURE_BATCH_ACCESS_KEY=<account-key> # Only required for shared key auth
AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production
Client Creation
With Microsoft Entra ID (Recommended)
import com.azure.compute.batch.BatchClient;
import com.azure.compute.batch.BatchClientBuilder;
import com.azure.core.credential.TokenCredential;
import com.azure.identity.AzureIdentityEnvVars;
import com.azure.identity.DefaultAzureCredentialBuilder;
import com.azure.identity.ManagedIdentityCredentialBuilder;
// Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=<specific_credential>
TokenCredential credential = new DefaultAzureCredentialBuilder()
.requireEnvVars(AzureIdentityEnvVars.AZURE_TOKEN_CREDENTIALS)
.build();
// Or use a specific credential directly in production:
// See https://learn.microsoft.com/java/api/overview/azure/identity-readme?view=azure-java-stable#credential-classes
// TokenCredential credential = new ManagedIdentityCredentialBuilder().build();
BatchClient batchClient = new BatchClientBuilder()
.credential(credential)
.endpoint(System.getenv("AZURE_BATCH_ENDPOINT"))
.buildClient();
Async Client
import com.azure.compute.batch.BatchAsyncClient;
BatchAsyncClient batchAsyncClient = new BatchClientBuilder()
.credential(credential)
.endpoint(System.getenv("AZURE_BATCH_ENDPOINT"))
.buildAsyncClient();
With Shared Key Credentials
import com.azure.core.credential.AzureNamedKeyCredential;
String accountName = System.getenv("AZURE_BATCH_ACCOUNT");
String accountKey = System.getenv("AZURE_BATCH_ACCESS_KEY");
AzureNamedKeyCredential sharedKeyCreds = new AzureNamedKeyCredential(accountName, accountKey);
BatchClient batchClient = new BatchClientBuilder()
.credential(sharedKeyCreds)
.endpoint(System.getenv("AZURE_BATCH_ENDPOINT"))
.buildClient();
Key Concepts
| Concept | Description |
|---|---|
| Pool | Collection of compute nodes that run tasks |
| Job | Logical grouping of tasks |
| Task | Unit of computation (command/script) |
| Node | VM that executes tasks |
| Job Schedule | Recurring job creation |
Pool Operations
Create Pool
import com.azure.compute.batch.models.*;
batchClient.createPool(new BatchPoolCreateParameters("myPoolId", "STANDARD_DC2s_V2")
.setVirtualMachineConfiguration(
new VirtualMachineConfiguration(
new BatchVmImageReference()
.setPublisher("Canonical")
.setOffer("UbuntuServer")
.setSku("22_04-lts")
.setVersion("latest"),
"batch.node.ubuntu 22.04"))
.setTargetDedicatedNodes(2)
.setTargetLowPriorityNodes(0), null);
Get Pool
BatchPool pool = batchClient.getPool("myPoolId");
System.out.println("Pool state: " + pool.getState());
System.out.println("Current dedicated nodes: " + pool.getCurrentDedicatedNodes());
List Pools
import com.azure.core.http.rest.PagedIterable;
PagedIterable<BatchPool> pools = batchClient.listPools();
for (BatchPool pool : pools) {
System.out.println("Pool: " + pool.getId() + ", State: " + pool.getState());
}
Resize Pool
import com.azure.core.util.polling.SyncPoller;
BatchPoolResizeParameters resizeParams = new BatchPoolResizeParameters()
.setTargetDedicatedNodes(4)
.setTargetLowPriorityNodes(2);
SyncPoller<BatchPool, BatchPool> poller = batchClient.beginResizePool("myPoolId", resizeParams);
poller.waitForCompletion();
BatchPool resizedPool = poller.getFinalResult();
Enable AutoScale
BatchPoolEnableAutoScaleParameters autoScaleParams = new BatchPoolEnableAutoScaleParameters()
.setAutoScaleEvaluationInterval(Duration.ofMinutes(5))
.setAutoScaleFormula("$TargetDedicatedNodes = min(10, $PendingTasks.GetSample(TimeInterval_Minute * 5));");
batchClient.enablePoolAutoScale("myPoolId", autoScaleParams);
Delete Pool
SyncPoller<BatchPool, Void> deletePoller = batchClient.beginDeletePool("myPoolId");
deletePoller.waitForCompletion();
Job Operations
Create Job
batchClient.createJob(
new BatchJobCreateParameters("myJobId", new BatchPoolInfo().setPoolId("myPoolId"))
.setPriority(100)
.setConstraints(new BatchJobConstraints()
.setMaxWallClockTime(Duration.ofHours(24))
.setMaxTaskRetryCount(3)),
null);
Get Job
BatchJob job = batchClient.getJob("myJobId", null, null);
System.out.println("Job state: " + job.getState());
List Jobs
PagedIterable<BatchJob> jobs = batchClient.listJobs(new BatchJobsListOptions());
for (BatchJob job : jobs) {
System.out.println("Job: " + job.getId() + ", State: " + job.getState());
}
Get Task Counts
BatchTaskCountsResult counts = batchClient.getJobTaskCounts("myJobId");
System.out.println("Active: " + counts.getTaskCounts().getActive());
System.out.println("Running: " + counts.getTaskCounts().getRunning());
System.out.println("Completed: " + counts.getTaskCounts().getCompleted());
Terminate Job
BatchJobTerminateParameters terminateParams = new BatchJobTerminateParameters()
.setTerminationReason("Manual termination");
BatchJobTerminateOptions options = new BatchJobTerminateOptions().setParameters(terminateParams);
SyncPoller<BatchJob, BatchJob> poller = batchClient.beginTerminateJob("myJobId", options, null);
poller.waitForCompletion();
Delete Job
SyncPoller<BatchJob, Void> deletePoller = batchClient.beginDeleteJob("myJobId");
deletePoller.waitForCompletion();
Task Operations
Create Single Task
BatchTaskCreateParameters task = new BatchTaskCreateParameters("task1", "echo 'Hello World'");
batchClient.createTask("myJobId", task);
Create Task with Exit Conditions
batchClient.createTask("myJobId", new BatchTaskCreateParameters("task2", "cmd /c exit 3")
.setExitConditions(new ExitConditions()
.setExitCodeRanges(Arrays.asList(
new ExitCodeRangeMapping(2, 4,
new ExitOptions().setJobAction(BatchJobActionKind.TERMINATE)))))
.setUserIdentity(new UserIdentity()
.setAutoUser(new AutoUserSpecification()
.setScope(AutoUserScope.TASK)
.setElevationLevel(ElevationLevel.NON_ADMIN))),
null);
Create Task Collection (up to 100)
List<BatchTaskCreateParameters> taskList = Arrays.asList(
new BatchTaskCreateParameters("task1", "echo Task 1"),
new BatchTaskCreateParameters("task2", "echo Task 2"),
new BatchTaskCreateParameters("task3", "echo Task 3")
);
BatchTaskGroup taskGroup = new BatchTaskGroup(taskList);
BatchCreateTaskCollectionResult result = batchClient.createTaskCollection("myJobId", taskGroup);
Create Many Tasks (no limit)
List<BatchTaskCreateParameters> tasks = new ArrayList<>();
for (int i = 0; i < 1000; i++) {
tasks.add(new BatchTaskCreateParameters("task" + i, "echo Task " + i));
}
batchClient.createTasks("myJobId", tasks);
Get Task
BatchTask task = batchClient.getTask("myJobId", "task1");
System.out.println("Task state: " + task.getState());
System.out.println("Exit code: " + task.getExecutionInfo().getExitCode());
List Tasks
PagedIterable<BatchTask> tasks = batchClient.listTasks("myJobId");
for (BatchTask task : tasks) {
System.out.println("Task: " + task.getId() + ", State: " + task.getState());
}
Get Task Output
import com.azure.core.util.BinaryData;
import java.nio.charset.StandardCharsets;
BinaryData stdout = batchClient.getTaskFile("myJobId", "task1", "stdout.txt");
System.out.println(new String(stdout.toBytes(), StandardCharsets.UTF_8));
Terminate Task
batchClient.terminateTask("myJobId", "task1", null, null);
Node Operations
List Nodes
PagedIterable<BatchNode> nodes = batchClient.listNodes("myPoolId", new BatchNodesListOptions());
for (BatchNode node : nodes) {
System.out.println("Node: " + node.getId() + ", State: " + node.getState());
}
Reboot Node
SyncPoller<BatchNode, BatchNode> rebootPoller = batchClient.beginRebootNode("myPoolId", "nodeId");
rebootPoller.waitForCompletion();
Get Remote Login Settings
BatchNodeRemoteLoginSettings settings = batchClient.getNodeRemoteLoginSettings("myPoolId", "nodeId");
System.out.println("IP: " + settings.getRemoteLoginIpAddress());
System.out.println("Port: " + settings.getRemoteLoginPort());
Job Schedule Operations
Create Job Schedule
batchClient.createJobSchedule(new BatchJobScheduleCreateParameters("myScheduleId",
new BatchJobScheduleConfiguration()
.setRecurrenceInterval(Duration.ofHours(6))
.setDoNotRunUntil(OffsetDateTime.now().plusDays(1)),
new BatchJobSpecification(new BatchPoolInfo().setPoolId("myPoolId"))
.setPriority(50)),
null);
Get Job Schedule
BatchJobSchedule schedule = batchClient.getJobSchedule("myScheduleId");
System.out.println("Schedule state: " + schedule.getState());
Error Handling
import com.azure.compute.batch.models.BatchErrorException;
import com.azure.compute.batch.models.BatchError;
try {
batchClient.getPool("nonexistent-pool");
} catch (BatchErrorException e) {
BatchError error = e.getValue();
System.err.println("Error code: " + error.getCode());
System.err.println("Message: " + error.getMessage().getValue());
if ("PoolNotFound".equals(error.getCode())) {
System.err.println("The specified pool does not exist.");
}
}
Best Practices
- Use Entra ID — Preferred over shared key for authentication
- Use management SDK for pools —
azure-resourcemanager-batchsupports managed identities - Batch task creation — Use
createTaskCollectionorcreateTasksfor multiple tasks - Handle LRO properly — Pool resize, delete operations are long-running
- Monitor task counts — Use
getJobTaskCountsto track progress - Set constraints — Configure
maxWallClockTimeandmaxTaskRetryCount - Use low-priority nodes — Cost savings for fault-tolerant workloads
- Enable autoscale — Dynamically adjust pool size based on workload
Reference Links
| Resource | URL |
|---|---|
| Maven Package | https://central.sonatype.com/artifact/com.azure/azure-compute-batch |
| GitHub | https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/batch/azure-compute-batch |
| API Documentation | https://learn.microsoft.com/java/api/com.azure.compute.batch |
| Product Docs | https://learn.microsoft.com/azure/batch/ |
| REST API | https://learn.microsoft.com/rest/api/batchservice/ |
| Samples | https://github.com/azure/azure-batch-samples |
이 스킬의 파일
2azure-compute-batch-java skill 질문
Claude Code에 azure-compute-batch-java skill을 어떻게 설치하나요?
npx degit microsoft/skills/.github/plugins/azure-sdk-java/skills/azure-compute-batch-java ~/.claude/skills/azure-compute-batch-java를 실행합니다. Claude Code는 ~/.claude/skills(모든 프로젝트) 또는 .claude/skills(한 프로젝트)에서 skills를 로드하며, 설명이 작업과 일치할 때 skill을 사용합니다.
azure-compute-batch-java skill을 사용할 수 있는 클라이언트는 무엇인가요?
Agent Skills 형식을 읽는 모든 클라이언트(Claude Code, Codex, Gemini CLI, claude.ai(ZIP으로 업로드))가 사용할 수 있습니다. skill 내 스크립트는 클라이언트가 코드 실행을 허용하는 경우에만 실행됩니다.
Azure Batch의 핵심 구성 요소는 무엇인가요?
주요 개념에는 Pool(compute node 모음), Job(task의 논리적 그룹), Task(계산 단위), Node(task를 실행하는 VM), Job Schedule이 포함됩니다.