ZihanLi58 commented on a change in pull request #3345:
URL: https://github.com/apache/gobblin/pull/3345#discussion_r681245048
##########
File path:
gobblin-yarn/src/main/java/org/apache/gobblin/yarn/GobblinYarnAppLauncher.java
##########
@@ -574,19 +592,21 @@ private String sanitizeApplicationId(String
applicationId) {
@VisibleForTesting
Optional<ApplicationId> getReconnectableApplicationId() throws
YarnException, IOException {
- List<ApplicationReport> applicationReports =
- this.yarnClient.getApplications(APPLICATION_TYPES,
RECONNECTABLE_APPLICATION_STATES);
- if (applicationReports == null || applicationReports.isEmpty()) {
- return Optional.absent();
- }
+ for (YarnClient yarnClient: potentialYarnClients.values()) {
+ List<ApplicationReport> applicationReports =
yarnClient.getApplications(APPLICATION_TYPES, RECONNECTABLE_APPLICATION_STATES);
+ if (applicationReports == null || applicationReports.isEmpty()) {
+ continue;
+ }
- // Try to find an application with a matching application name
- for (ApplicationReport applicationReport : applicationReports) {
- if (this.applicationName.equals(applicationReport.getName())) {
- String applicationId =
sanitizeApplicationId(applicationReport.getApplicationId().toString());
- LOGGER.info("Found reconnectable application with application ID: " +
applicationId);
- LOGGER.info("Application Tracking URL: " +
applicationReport.getTrackingUrl());
- return Optional.of(applicationReport.getApplicationId());
+ // Try to find an application with a matching application name
+ for (ApplicationReport applicationReport : applicationReports) {
Review comment:
yeah, in that case, we will continue to check next potential clusters,
and if we found nothing in all clusters, we will return Optional.absent on line
613
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]