apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chandnisingh <...@git.apache.org>
Subject [GitHub] apex-malhar pull request #334: APEXMALHAR-2136 1) Fixed the null pointer exc...
Date Thu, 07 Jul 2016 06:42:15 GMT
Github user chandnisingh commented on a diff in the pull request:

    https://github.com/apache/apex-malhar/pull/334#discussion_r69857656
  
    --- Diff: library/src/main/java/org/apache/apex/malhar/lib/state/managed/AbstractManagedStateImpl.java
---
    @@ -203,7 +203,12 @@ public void setup(OperatorContext context)
           //delete all the wal files with windows > activationWindow.
           //All the wal files with windows <= activationWindow are loaded and kept separately
as recovered data.
           try {
    -        for (long recoveredWindow : checkpointManager.getWindowIds(operatorContext.getId()))
{
    +        long[] recoveredWindows = checkpointManager.getWindowIds(operatorContext.getId());
    +        if (recoveredWindows == null) {
    +          readerService = Executors.newFixedThreadPool(numReaders, new NameableThreadFactory("managedStateReaders"));
    +          return;
    +        }
    +        for (long recoveredWindow : recoveredWindows) {
    --- End diff --
    
    You can put this block within ```if (recoveredWindows == null)```


---
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