gianm commented on a change in pull request #6302: Add SQL id, request logs, 
and metrics
URL: https://github.com/apache/incubator-druid/pull/6302#discussion_r246156359
 
 

 ##########
 File path: server/src/main/java/org/apache/druid/server/RequestLogLine.java
 ##########
 @@ -58,10 +78,12 @@ public String getLine(ObjectMapper objectMapper) throws 
JsonProcessingException
     );
   }
 
-  @JsonProperty("timestamp")
-  public DateTime getTimestamp()
+  public String getSqlQueryLine(ObjectMapper objectMapper) throws 
JsonProcessingException
 
 Review comment:
   This format should be documented, but also, IMO, adjusted. Firstly, it 
should be on one line (this makes it easier to parse); secondly, it should be 
the same rough format as getNativeQueryLine (so the same parser can handle 
both). That means a TSV. How about doing:
   
   ```java
       return JOINER.join(
           Arrays.asList(
               timestamp,
               remoteAddr,
               objectMapper.writeValueAsString(ImmutableMap.of("queryType", 
"sql", "sql", sql)),
               objectMapper.writeValueAsString(queryStats)
           )
       );
   ```
   
   It's sort of using a fake queryType of 'sql', which is a little weird, but 
makes parsing pretty easy.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to