Skip to content

Commit b952e5b

Browse files
committed
fixed lint errors and added comments to sample exceptions
1 parent e7ddc78 commit b952e5b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

dataproc/src/main/java/CreateClusterWithAutoscaling.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ public static void createClusterwithAutoscaling(
154154
System.out.printf("Cluster created successfully: %s", response.getClusterName());
155155

156156
} catch (ExecutionException e) {
157+
// If cluster creation does not complete successfully, print the error message.
157158
System.err.println(String.format("createClusterWithAutoscaling: %s ", e.getMessage()));
158159
}
159160
}

dataproc/src/main/java/SubmitHadoopFSJob.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public static void submitHadoopFSJob(
7676

7777
Job response = submitJobAsOperationAsyncRequest.get();
7878

79-
// Print output from Google Cloud Storage
79+
// Print output from Google Cloud Storage.
8080
Matcher matches =
8181
Pattern.compile("gs://(.*?)/(.*)").matcher(response.getDriverOutputResourceUri());
8282
matches.matches();
@@ -88,6 +88,7 @@ public static void submitHadoopFSJob(
8888
String.format("Job finished successfully: %s", new String(blob.getContent())));
8989

9090
} catch (ExecutionException e) {
91+
// If the job does not complete successfully, print the error message.
9192
System.err.println(String.format("submitHadoopFSJob: %s ", e.getMessage()));
9293
}
9394
}

0 commit comments

Comments
 (0)