Github user pkuwm commented on a diff in the pull request:

    https://github.com/apache/incubator-eagle/pull/359#discussion_r75359890
  
    --- Diff: 
eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/runner/AlertBolt.java
 ---
    @@ -111,9 +111,12 @@ public void execute(Tuple input) {
                         pe.getEvent().setMetaVersion(specVersion);
                     }
                     // check if specVersion is older than stream_event_version
    -                else if (specVersion != null && stream_event_version != 
null && specVersion.contains("spec_version_") && 
specVersion.contains("spec_version_")){
    -                    Long timestamp_of_specVersion = 
Long.valueOf(specVersion.split("spec_version_")[1]);
    -                    Long timestamp_of_streamEventVersion = 
Long.valueOf(stream_event_version.split("spec_version_")[1]);
    +                else if (specVersion != null && stream_event_version != 
null &&
    +                        specVersion.contains("spec_version_") && 
stream_event_version.contains("spec_version_")){
    +//                    Long timestamp_of_specVersion = 
Long.valueOf(specVersion.split("spec_version_")[1]);
    +//                    Long timestamp_of_streamEventVersion = 
Long.valueOf(stream_event_version.split("spec_version_")[1]);
    +                    Long timestamp_of_specVersion = 
Long.valueOf(specVersion.substring(13));
    --- End diff --
    
    What I got for "specVersion" is "spec_version_1471478137249". split[1] 
would be out of array index.
    So I just substring the timestamp.


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

Reply via email to