use of com.google.container.v1.Cluster in project java-dataproc by googleapis.
the class SubmitHadoopFsJobTest method setUp.
@Before
public void setUp() throws IOException, ExecutionException, InterruptedException {
bout = new ByteArrayOutputStream();
System.setOut(new PrintStream(bout));
ClusterControllerSettings clusterControllerSettings = ClusterControllerSettings.newBuilder().setEndpoint(ENDPOINT).build();
try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create(clusterControllerSettings)) {
// Create the Dataproc cluster.
Cluster cluster = Cluster.newBuilder().setClusterName(CLUSTER_NAME).build();
OperationFuture<Cluster, ClusterOperationMetadata> createClusterAsyncRequest = clusterControllerClient.createClusterAsync(PROJECT_ID, REGION, cluster);
createClusterAsyncRequest.get();
}
}
use of com.google.container.v1.Cluster in project java-dataproc by googleapis.
the class SubmitJobTest method setUp.
@Before
public void setUp() throws IOException, ExecutionException, InterruptedException {
bout = new ByteArrayOutputStream();
System.setOut(new PrintStream(bout));
ClusterControllerSettings clusterControllerSettings = ClusterControllerSettings.newBuilder().setEndpoint(ENDPOINT).build();
try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create(clusterControllerSettings)) {
// Create the Dataproc cluster.
Cluster cluster = Cluster.newBuilder().setClusterName(CLUSTER_NAME).build();
OperationFuture<Cluster, ClusterOperationMetadata> createClusterAsyncRequest = clusterControllerClient.createClusterAsync(PROJECT_ID, REGION, cluster);
createClusterAsyncRequest.get();
}
}
Aggregations