metron-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (METRON-1849) Elasticsearch Index Write Functionality Should be Shared
Date Wed, 05 Dec 2018 13:00:00 GMT

    [ https://issues.apache.org/jira/browse/METRON-1849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16710029#comment-16710029
] 

ASF GitHub Bot commented on METRON-1849:
----------------------------------------

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

    https://github.com/apache/metron/pull/1254#discussion_r239054070
  
    --- Diff: metron-platform/metron-indexing/src/main/java/org/apache/metron/indexing/dao/update/Document.java
---
    @@ -89,46 +91,29 @@ public void setGuid(String guid) {
         this.guid = guid;
       }
     
    -  @Override
    -  public String toString() {
    -    return "Document{" +
    -        "timestamp=" + timestamp +
    -        ", document=" + document +
    -        ", guid='" + guid + '\'' +
    -        ", sensorType='" + sensorType + '\'' +
    -        '}';
    -  }
    -
       @Override
       public boolean equals(Object o) {
    -    if (this == o) {
    -      return true;
    -    }
    -    if (o == null || getClass() != o.getClass()) {
    -      return false;
    -    }
    -
    +    if (this == o) return true;
    +    if (!(o instanceof Document)) return false;
         Document document1 = (Document) o;
    -
    -    if (timestamp != null ? !timestamp.equals(document1.timestamp) : document1.timestamp
!= null) {
    -      return false;
    -    }
    -    if (document != null ? !document.equals(document1.document) : document1.document
!= null) {
    -      return false;
    -    }
    -    if (guid != null ? !guid.equals(document1.guid) : document1.guid != null) {
    -      return false;
    -    }
    -    return sensorType != null ? sensorType.equals(document1.sensorType)
    -        : document1.sensorType == null;
    +    return Objects.equals(timestamp, document1.timestamp) &&
    --- End diff --
    
    It is an auto-create from IntelliJ.  It changed when on a previous iteration, I added
a field to the Document class.  I since backed that out and went with another approach.  So
there really is no need for this to change now.  I will back this out.


> Elasticsearch Index Write Functionality Should be Shared
> --------------------------------------------------------
>
>                 Key: METRON-1849
>                 URL: https://issues.apache.org/jira/browse/METRON-1849
>             Project: Metron
>          Issue Type: Bug
>            Reporter: Nick Allen
>            Assignee: Nick Allen
>            Priority: Major
>
> The index write functionality is currently duplicated between the ElasticsearchWriter
and the ElasticsearchUpdateDao.  This functionality should be de-duplicated and shared between
the two.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message