Azure Batch libraries for Java


Run large-scale parallel and high-performance computing applications efficiently in the cloud with Azure Batch.

To get started with Azure Batch, see Create a Batch account with the Azure portal.

Client library

The Azure Batch client libraries let you configure compute nodes and pools, define tasks and configure them to run in jobs, and set up a job manager to control and monitor job execution. Learn more about using these objects to run large-scale parallel compute solutions.

Add a dependency to your Maven pom.xml file to use the client library in your project.



Set up a pool of Linux compute nodes in a batch account:

// create the batch client for an account using its URI and keys
BatchClient client = BatchSharedKeyCredentials("", "fabrikambatch", batchKey));

// configure a pool of VMs to use 
VirtualMachineConfiguration configuration = new VirtualMachineConfiguration();
configuration.withNodeAgentSKUId("batch.node.ubuntu 16.04");
client.poolOperations().createPool(poolId, poolVMSize, configuration, poolVMCount);

Management API

Use the Azure Batch management libraries to create and delete batch accounts, read and regenerate batch account keys, and manage batch account storage.

Add a dependency to your Maven pom.xml file to use the management API in your project.



Create an Azure Batch account and configure a new application and Azure storage account for it.

BatchAccount batchAccount = azure.batchAccounts().define("newBatchAcct")


Manage Batch accounts

Explore more sample Java code for Azure Batch you can use in your apps.