apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tweise <...@git.apache.org>
Subject [GitHub] incubator-apex-core pull request: APEXCORE-393 #resolve Adding Dag...
Date Tue, 22 Mar 2016 23:26:22 GMT
Github user tweise commented on a diff in the pull request:

    https://github.com/apache/incubator-apex-core/pull/274#discussion_r57087518
  
    --- Diff: engine/src/main/java/com/datatorrent/stram/StreamingAppMasterService.java ---
    @@ -781,18 +794,19 @@ private void execute() throws YarnException, IOException
          /* Remove nodes from blacklist after timeout */
           long currentTime = System.currentTimeMillis();
           List<String> blacklistRemovals = new ArrayList<String>();
    -      for (Iterator<Pair<Long, List<String>>> it = blacklistedNodesQueueWithTimeStamp.iterator();
it.hasNext();) {
    -        Pair<Long, List<String>> entry = it.next();
    -        Long timeDiff = currentTime - entry.getFirst();
    -        if (timeDiff > blacklistRemovalTime) {
    -          blacklistRemovals.addAll(entry.getSecond());
    -          it.remove();
    -        } else {
    -          break;
    +      for (String hostname : failedBlackListedNodes) {
    +        Long timeDiff = currentTime - failedContainerNodesMap.get(hostname).blackListAdditionTime;
    +        if (timeDiff >= blacklistRemovalTime) {
    +          blacklistRemovals.add(hostname);
    +          failedContainerNodesMap.remove(hostname);
             }
           }
    +
           if (!blacklistRemovals.isEmpty()) {
             amRmClient.updateBlacklist(null, blacklistRemovals);
    +        LOG.info("Removing nodes {} from blacklist: time elapsed since last blacklisting
due to failure is greater than specified timeout", blacklistRemovals.toString());
    +
    --- End diff --
    
    Minor nit, there are a few extra blank lines added...


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message