This commit is contained in:
xingwu1 2017-02-23 15:46:14 -08:00
Родитель 2af9a96003
Коммит 939af5b9e7
2 изменённых файлов: 16 добавлений и 32 удалений

Просмотреть файл

@ -2,12 +2,12 @@
#Azure Batch Libraries for Java #Azure Batch Libraries for Java
This README is based on the latest released preview version Azure Batch SDK (1.0.0-beta2). If you are looking for other releases, see [More Information](#more-information) This README is based on the latest released version Azure Batch SDK (1.0.0). If you are looking for other releases, see [More Information](#more-information)
The Azure Batch Libraries for Java is a higher-level, object-oriented API for interacting with the Azure Batch service. The Azure Batch Libraries for Java is a higher-level, object-oriented API for interacting with the Azure Batch service.
> **1.0.0-beta2** is a developer preview that supports major parts of Azure Batch. The next preview version of the Azure Batch Libraries for Java is a work in-progress. We will be adding support for more new featuresand tweaking the API over the next few months. > **1.0.0** is a release that supports all features of Azure Batch service with API version "2017-01-01.4.0". We will be adding support for more new features and tweaking the API associated with Azure Batch service newer release.
**Azure Batch Authentication** **Azure Batch Authentication**
@ -16,7 +16,7 @@ The `BatchClient` class is the simplest entry point for creating and interacting
```java ```java
BatchSharedKeyCredentials cred = new BatchSharedKeyCredentials(batchUri, batchAccount, batchKey); BatchSharedKeyCredentials cred = new BatchSharedKeyCredentials(batchUri, batchAccount, batchKey);
BatchClient client = BatchClient.Open(cred); BatchClient client = BatchClient.open(cred);
``` ```
**Create a pool using an Azure Marketplace image** **Create a pool using an Azure Marketplace image**
@ -27,8 +27,8 @@ You can create a pool of Azure virtual machines which can be used to execute tas
System.out.println("Created a pool using an Azure Marketplace image."); System.out.println("Created a pool using an Azure Marketplace image.");
VirtualMachineConfiguration configuration = new VirtualMachineConfiguration(); VirtualMachineConfiguration configuration = new VirtualMachineConfiguration();
configuration.setNodeAgentSKUId(skuId).setImageReference(imageRef); configuration.withNodeAgentSKUId(skuId).withImageReference(imageRef);
client.getPoolOperations().createPool(poolId, poolVMSize, configuration, poolVMCount); client.poolOperations().createPool(poolId, poolVMSize, configuration, poolVMCount);
System.out.println("Created a Pool: " + poolId); System.out.println("Created a Pool: " + poolId);
``` ```
@ -39,8 +39,8 @@ You can create a job by using the recently created pool.
```java ```java
PoolInformation poolInfo = new PoolInformation(); PoolInformation poolInfo = new PoolInformation();
poolInfo.setPoolId(poolId); poolInfo.withPoolId(poolId);
client.getJobOperations().createJob(jobId, poolInfo); client.jobOperations().createJob(jobId, poolInfo);
``` ```
#Sample Code #Sample Code
@ -51,25 +51,25 @@ You can find sample code that illustrates Batch usage scenarios in https://githu
# Download # Download
**1.0.0-beta2** **1.0.0**
If you are using released builds from 1.0.0-beta2, add the following to your POM file: If you are using released builds from 1.0.0, add the following to your POM file:
```xml ```xml
<dependency> <dependency>
<groupId>com.microsoft.azure</groupId> <groupId>com.microsoft.azure</groupId>
<artifactId>azure-batch</artifactId> <artifactId>azure-batch</artifactId>
<version>1.0.0-beta2</version> <version>1.0.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.microsoft.rest</groupId> <groupId>com.microsoft.rest</groupId>
<artifactId>client-runtime</artifactId> <artifactId>client-runtime</artifactId>
<version>1.0.0-beta2</version> <version>1.0.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.microsoft.azure</groupId> <groupId>com.microsoft.azure</groupId>
<artifactId>azure-client-runtime</artifactId> <artifactId>azure-client-runtime</artifactId>
<version>1.0.0-beta2</version> <version>1.0.0</version>
</dependency> </dependency>
``` ```
@ -103,11 +103,8 @@ If you would like to become an active contributor to this project please follow
| Version | SHA1 | Remarks | | Version | SHA1 | Remarks |
|-------------------|-------------------------------------------------------------------------------------------|-------------------------------------------------------| |-------------------|-------------------------------------------------------------------------------------------|-------------------------------------------------------|
| 1.0.0-beta2 | [1.0.0-beta2](https://github.com/Azure/azure-sdk-for-java/tree/1.0.0-beta2) | Tagged release for 1.0.0-beta2 version of Azure management libraries | | 1.0.0 | [1.0.0](https://github.com/Azure/azure-sdk-for-java/tree/master) | Tagged release for 1.0.0 version of Azure Batch libraries |
| 1.0.0-beta1 | [1.0.0-beta1](https://github.com/Azure/azure-sdk-for-java/tree/1.0.0-beta1) | Maintenance branch for AutoRest generated raw clients | | 1.0.0-beta2 | [1.0.0-beta2](https://github.com/Azure/azure-sdk-for-java/tree/1.0.0-beta2) | Tagged release for 1.0.0-beta2 version of Azure Batch libraries |
| 1.0.0-beta1+fixes | [v1.0.0-beta1+fixes](https://github.com/Azure/azure-sdk-for-java/tree/v1.0.0-beta1+fixes) | Stable build for AutoRest generated raw clients |
| 0.9.x-SNAPSHOTS | [0.9](https://github.com/Azure/azure-sdk-for-java/tree/0.9) | Maintenance branch for service management libraries |
| 0.9.3 | [v0.9.3](https://github.com/Azure/azure-sdk-for-java/tree/v0.9.3) | Latest release for service management libraries |
--- ---

17
pom.xml
Просмотреть файл

@ -8,7 +8,7 @@
<groupId>com.microsoft.azure</groupId> <groupId>com.microsoft.azure</groupId>
<artifactId>azure-batch</artifactId> <artifactId>azure-batch</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<version>1.0.0-beta6-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>
<name>Microsoft Azure Batch SDK Root</name> <name>Microsoft Azure Batch SDK Root</name>
<description>This package contains the root module of Microsoft Azure Batch SDK.</description> <description>This package contains the root module of Microsoft Azure Batch SDK.</description>
@ -40,24 +40,11 @@
</developer> </developer>
</developers> </developers>
<repositories>
<repository>
<id>ossrh</id>
<name>Sonatype Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<layout>default</layout>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.microsoft.azure</groupId> <groupId>com.microsoft.azure</groupId>
<artifactId>azure-client-runtime</artifactId> <artifactId>azure-client-runtime</artifactId>
<version>1.0.0-rc-SNAPSHOT</version> <version>1.0.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.microsoft.azure</groupId> <groupId>com.microsoft.azure</groupId>