[
https://issues.apache.org/jira/browse/METRON-1294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16240739#comment-16240739
]
ASF GitHub Bot commented on METRON-1294:
----------------------------------------
Github user merrimanr commented on a diff in the pull request:
https://github.com/apache/metron/pull/827#discussion_r149176509
--- 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 --
As far as I know the only place the UI uses this endpoint directly is when
it presents a list of fields a user can select to display in the UI. I think
we would want it to show up there so including it with a type set to OTHER
makes sense to me.
If you're ok with it I will proceed with this change and add a big fat
`LOG.error` call.
> IP addresses are not formatted correctly in facet and group results
> -------------------------------------------------------------------
>
> Key: METRON-1294
> URL: https://issues.apache.org/jira/browse/METRON-1294
> Project: Metron
> Issue Type: Bug
> Reporter: Ryan Merriman
> Assignee: Ryan Merriman
>
> Fields that are of type IP address are being returned in numerical format
> whereas they should be returned in string format.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)