Github user hyunsik commented on a diff in the pull request:
https://github.com/apache/tajo/pull/748#discussion_r39006028
--- Diff:
tajo-core/src/main/java/org/apache/tajo/ha/HdfsServiceTracker.java ---
@@ -458,21 +454,37 @@ public InetSocketAddress getMasterHttpInfo() throws
ServiceTrackerException {
throw new ServiceTrackerException("Active master base path must be
a directory.");
}
- FileStatus[] files = fs.listStatus(activeMasterBaseDir);
/* wait for active master from HDFS */
int pause =
conf.getIntVar(ConfVars.TAJO_MASTER_HA_CLIENT_RETRY_PAUSE_TIME);
int maxRetry =
conf.getIntVar(ConfVars.TAJO_MASTER_HA_CLIENT_RETRY_MAX_NUM);
int retry = 0;
- while (files.length < 2 && retry < maxRetry) {
+ FileStatus[] files = fs.listStatus(activeMasterBaseDir);
--- End diff --
It would be better if it is moved into the inner loop. If so, it will
handle the case where the master entry is created during retrying.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---