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

    https://github.com/apache/metron/pull/824#discussion_r150872247
  
    --- Diff: 
metron-platform/metron-indexing/src/main/java/org/apache/metron/indexing/dao/HBaseDao.java
 ---
    @@ -135,8 +138,9 @@ private Document getDocumentFromResult(Result result) 
throws IOException {
         Map.Entry<byte[], byte[]> entry= columns.lastEntry();
         Long ts = Bytes.toLong(entry.getKey());
         if(entry.getValue()!= null) {
    -      String json = new String(entry.getValue());
    -      return new Document(json, Bytes.toString(result.getRow()), null, ts);
    +      Map<String, Object> json = JSONUtils.INSTANCE.load(new 
String(entry.getValue()), new TypeReference<Map<String, Object>>() {
    +      });
    +      return new Document(json, Bytes.toString(result.getRow()), (String) 
json.get(SOURCE_TYPE), ts);
    --- End diff --
    
    I agree with @cestella, I'd rather use the existing abstraction. Setting a 
field transformer is a cleaner way of doing things, in my opinion, than 
requiring the user to know know and input where all the GUIDs are coming from.
    
    Another concern about ES5 is that PR may live for awhile, even after we're 
fairly confident in it (there's going to be a lot of testing involved there). 
Casey's PR is a pretty simple way of handling it (set a config, pass it in, use 
it basically the same way you set it up).


---

Reply via email to