Github user merrimanr commented on a diff in the pull request: https://github.com/apache/metron/pull/1190#discussion_r222823946 --- Diff: metron-platform/metron-indexing/src/main/java/org/apache/metron/indexing/dao/MultiIndexDao.java --- @@ -282,4 +276,27 @@ public Document getLatest(final String guid, String sensorType) throws IOExcepti public List<IndexDao> getIndices() { return indices; } + + private Document getDocument(List<DocumentContainer> documentContainers) throws IOException { + Document ret = null; + List<String> error = new ArrayList<>(); + for(DocumentContainer dc : documentContainers) { + if(dc.getException().isPresent()) { + Throwable e = dc.getException().get(); + error.add(e.getMessage() + "\n" + ExceptionUtils.getStackTrace(e)); + } + else { + if(dc.getDocument().isPresent()) { + Document d = dc.getDocument().get(); + if(ret == null || ret.getTimestamp() < d.getTimestamp()) { + ret = d; + } + } + } + } --- End diff -- Looks good to me. Latest commit includes this change.
---