drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [drill] cgivre commented on a change in pull request #1635: DRILL-7021: HTTPD Throws NPE and Doesn't Recognize Timeformat
Date Tue, 12 Mar 2019 12:27:16 GMT
cgivre commented on a change in pull request #1635: DRILL-7021: HTTPD Throws NPE and Doesn't
Recognize Timeformat
URL: https://github.com/apache/drill/pull/1635#discussion_r264651966
 
 

 ##########
 File path: exec/java-exec/src/main/java/org/apache/drill/exec/store/httpd/HttpdLogRecord.java
 ##########
 @@ -20,31 +20,40 @@
 import org.apache.drill.shaded.guava.com.google.common.base.Charsets;
 import org.apache.drill.shaded.guava.com.google.common.collect.Maps;
 import io.netty.buffer.DrillBuf;
+
 import java.util.EnumSet;
 import java.util.Map;
+
 import nl.basjes.parse.core.Casts;
 import nl.basjes.parse.core.Parser;
 import org.apache.drill.exec.vector.complex.writer.BaseWriter.MapWriter;
 import org.apache.drill.exec.vector.complex.writer.BigIntWriter;
 import org.apache.drill.exec.vector.complex.writer.Float8Writer;
 import org.apache.drill.exec.vector.complex.writer.VarCharWriter;
+import org.apache.drill.exec.vector.complex.writer.TimeStampWriter;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
 public class HttpdLogRecord {
 
   private static final Logger LOG = LoggerFactory.getLogger(HttpdLogRecord.class);
   private final Map<String, VarCharWriter> strings = Maps.newHashMap();
   private final Map<String, BigIntWriter> longs = Maps.newHashMap();
   private final Map<String, Float8Writer> doubles = Maps.newHashMap();
+  private final Map<String, TimeStampWriter> times = Maps.newHashMap();
   private final Map<String, MapWriter> wildcards = Maps.newHashMap();
   private final Map<String, String> cleanExtensions = Maps.newHashMap();
   private final Map<String, MapWriter> startedWildcards = Maps.newHashMap();
   private final Map<String, MapWriter> wildcardWriters = Maps.newHashMap();
   private DrillBuf managedBuffer;
+  private String timeFormat;
 
-  public HttpdLogRecord(final DrillBuf managedBuffer) {
+  public HttpdLogRecord(final DrillBuf managedBuffer, String timeFormat) {
 
 Review comment:
   Fixed.  Good call.  I moved it to the constructor so that it only happens once. 

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


With regards,
Apache Git Services

Mime
View raw message