You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by wangperry <gi...@git.apache.org> on 2016/06/30 11:55:09 UTC

[GitHub] storm pull request #1531: STORM-1937 Fix WindowTridentProcessor cause NullPo...

GitHub user wangperry opened a pull request:

    https://github.com/apache/storm/pull/1531

    STORM-1937 Fix WindowTridentProcessor cause NullPointerException

    I'm working with trident and try to use windows support, under the local model is fine, but in distributed mode we got the NullPointerException

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/wangperry/storm-1 1.0.x-branch

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/storm/pull/1531.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1531
    
----
commit 2d18e893d5b5a883ffbd441ef7a1a6117e33568b
Author: wangperry <33...@163.com>
Date:   2016-06-30T10:51:08Z

    Update WindowTridentProcessor.java
    
    STORM-1937

commit b15492ead9def496ee5e5db255ac4eff4a411079
Author: wangperry <33...@163.com>
Date:   2016-06-30T11:38:20Z

    Merge pull request #1 from wangperry/wangperry-patch-1
    
    Fix WindowTridentProcessor cause NullPointerException

----


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

[GitHub] storm issue #1531: STORM-1937 Fix WindowTridentProcessor cause NullPointerEx...

Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on the issue:

    https://github.com/apache/storm/pull/1531
  
    @wangperry Sorry I've occupied a bit. I can handle it so you don't need to worry. :) +1


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

[GitHub] storm issue #1531: STORM-1937 Fix WindowTridentProcessor cause NullPointerEx...

Posted by satishd <gi...@git.apache.org>.
Github user satishd commented on the issue:

    https://github.com/apache/storm/pull/1531
  
    @wangperry Can you squash the commits?


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

[GitHub] storm pull request #1531: STORM-1937 Fix WindowTridentProcessor cause NullPo...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/storm/pull/1531


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

[GitHub] storm issue #1531: STORM-1937 Fix WindowTridentProcessor cause NullPointerEx...

Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on the issue:

    https://github.com/apache/storm/pull/1531
  
    @wangperry +1 except nit style comment. 
    Please squash the commits into one, and I'd recommend you to create pull request against master branch, but if you mind to do I'll take care of it.


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

[GitHub] storm issue #1531: STORM-1937 Fix WindowTridentProcessor cause NullPointerEx...

Posted by wangperry <gi...@git.apache.org>.
Github user wangperry commented on the issue:

    https://github.com/apache/storm/pull/1531
  
    @HeartSaVioR ,  I am newbie, could you help me squash multi commits into one? Thanks


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

[GitHub] storm pull request #1531: STORM-1937 Fix WindowTridentProcessor cause NullPo...

Posted by satishd <gi...@git.apache.org>.
Github user satishd commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1531#discussion_r69145885
  
    --- Diff: storm-core/src/jvm/org/apache/storm/trident/windowing/WindowTridentProcessor.java ---
    @@ -163,11 +163,14 @@ public void finishBatch(ProcessorContext processorContext) {
             Iterable<Object> triggerValues = null;
     
             if (retriedAttempt(batchId)) {
    -            pendingTriggerIds = (List<Integer>) windowStore.get(inprocessTriggerKey(batchTxnId));
    -            for (Integer pendingTriggerId : pendingTriggerIds) {
    -                triggerKeys.add(triggerKey(pendingTriggerId));
    +            Object triggerIds = windowStore.get(inprocessTriggerKey(batchTxnId));
    --- End diff --
    
    @wangperry Can you remove creating one more variable. You need to wrap with a simple null check like below.
    
    ```java
    if(pendingTriggerIds != null)  {
        for (Integer pendingTriggerId : pendingTriggerIds) {
          triggerKeys.add(triggerKey(pendingTriggerId));
       }
       triggerValues = windowStore.get(triggerKeys);
    }
    ```


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

[GitHub] storm pull request #1531: STORM-1937 Fix WindowTridentProcessor cause NullPo...

Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1531#discussion_r69260206
  
    --- Diff: storm-core/src/jvm/org/apache/storm/trident/windowing/WindowTridentProcessor.java ---
    @@ -164,10 +164,12 @@ public void finishBatch(ProcessorContext processorContext) {
     
             if (retriedAttempt(batchId)) {
                 pendingTriggerIds = (List<Integer>) windowStore.get(inprocessTriggerKey(batchTxnId));
    -            for (Integer pendingTriggerId : pendingTriggerIds) {
    -                triggerKeys.add(triggerKey(pendingTriggerId));
    +            if (pendingTriggerIds != null){
    --- End diff --
    
    nit: space between ) and {


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

[GitHub] storm issue #1531: STORM-1937 Fix WindowTridentProcessor cause NullPointerEx...

Posted by wangperry <gi...@git.apache.org>.
Github user wangperry commented on the issue:

    https://github.com/apache/storm/pull/1531
  
    Thanks @satishd 


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

[GitHub] storm issue #1531: STORM-1937 Fix WindowTridentProcessor cause NullPointerEx...

Posted by wangperry <gi...@git.apache.org>.
Github user wangperry commented on the issue:

    https://github.com/apache/storm/pull/1531
  
    Thanks @satishd 


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

[GitHub] storm issue #1531: STORM-1937 Fix WindowTridentProcessor cause NullPointerEx...

Posted by satishd <gi...@git.apache.org>.
Github user satishd commented on the issue:

    https://github.com/apache/storm/pull/1531
  
    +1


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