metron-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nickwallen <...@git.apache.org>
Subject [GitHub] metron pull request #827: METRON-1294: IP addresses are not formatted correc...
Date Mon, 06 Nov 2017 18:25:13 GMT
Github user nickwallen commented on a diff in the pull request:

    https://github.com/apache/metron/pull/827#discussion_r149161245
  
    --- Diff: metron-platform/metron-indexing/src/test/java/org/apache/metron/indexing/dao/InMemoryDao.java
---
    @@ -221,12 +222,24 @@ public void batchUpdate(Map<Document, Optional<String>>
updates) throws IOExcept
         }
       }
     
    -  public Map<String, Map<String, FieldType>> getColumnMetadata(List<String>
indices) throws IOException {
    -    Map<String, Map<String, FieldType>> columnMetadata = new HashMap<>();
    +  @Override
    +  public Map<String, FieldType> getColumnMetadata(List<String> indices) throws
IOException {
    +    Map<String, FieldType> indexColumnMetadata = new HashMap<>();
         for(String index: indices) {
    -      columnMetadata.put(index, new HashMap<>(COLUMN_METADATA.get(index)));
    +      Map<String, FieldType> columnMetadata = COLUMN_METADATA.get(index);
    +      for (Entry entry: columnMetadata.entrySet()) {
    +        String field = (String) entry.getKey();
    +        FieldType type = (FieldType) entry.getValue();
    +        if (indexColumnMetadata.containsKey(field)) {
    +          if (!type.equals(indexColumnMetadata.get(field))) {
    +            indexColumnMetadata.remove(field);
    --- End diff --
    
    And actually my comments here are tagged on the `InMemoryDao`.  I should have started
this conversation on the `ElasticsearchDao`, not here.


---

Mime
View raw message