cgivre commented on issue #1635: DRILL-7021: HTTPD Throws NPE and Doesn't 
Recognize Timeformat
URL: https://github.com/apache/drill/pull/1635#issuecomment-472325612
 
 
   All changes have been addressed.  Thanks!
   
   > On Mar 12, 2019, at 06:30, Bohdan Kazydub <[email protected]> wrote:
   > 
   > @KazydubB commented on this pull request.
   > 
   > @cgivre <https://github.com/cgivre> did you have a chance to address 
requested changes? Looks like some of them a still not addressed.
   > 
   > In 
exec/java-exec/src/main/java/org/apache/drill/exec/store/httpd/HttpdLogFormatPlugin.java
 <https://github.com/apache/drill/pull/1635#discussion_r264604328>:
   > 
   > > -    public boolean equals(Object o) {
   > -      if (this == o) {
   > -        return true;
   > -      }
   > -      if (o == null || getClass() != o.getClass()) {
   > -        return false;
   > -      }
   > -
   > -      HttpdLogFormatConfig that = (HttpdLogFormatConfig) o;
   > -
   > -      if (logFormat != null ? !logFormat.equals(that.logFormat) : 
that.logFormat != null) {
   > -        return false;
   > -      }
   > -      return timestampFormat != null ? 
timestampFormat.equals(that.timestampFormat) : that.timestampFormat == null;
   > -    }
   > +            Lists.newArrayList(PLUGIN_EXTENSION), PLUGIN_EXTENSION);
   > It is clearer that the list will contain one element only and won't be 
modifiable. Also no new backing array will be created.
   > 
   > (Plus no Guava dependency will be used (though that's debatable whether 
this should be the case).)
   > 
   > In 
exec/java-exec/src/main/java/org/apache/drill/exec/store/httpd/HttpdLogFormatPlugin.java
 <https://github.com/apache/drill/pull/1635#discussion_r264606778>:
   > 
   > > @@ -169,11 +119,15 @@ public HttpdLogRecordReader(final FragmentContext 
context, final DrillFileSystem
   >       * @return Map with Drill field names as a key and Parser Field names 
as a value
   >       */
   >      private Map<String, String> makeParserFields() {
   > -      final Map<String, String> fieldMapping = Maps.newHashMap();
   > +      Map<String, String> fieldMapping = Maps.newHashMap();
   > According to Maps docs 
<https://google.github.io/guava/releases/23.0/api/docs/com/google/common/collect/Maps.html#newHashMap-->
 newHashMap() [...] method is now unnecessary and should be treated as 
deprecated. Instead, use the HashMap constructor directly, taking advantage of 
the new "diamond" syntax.
   > 
   > In exec/java-exec/src/main/resources/bootstrap-storage-plugins.json 
<https://github.com/apache/drill/pull/1635#discussion_r264609402>:
   > 
   > >              "jpg", "jpeg", "jpe", "tif", "tiff", "dng", "psd", "png", 
"bmp", "gif",
   >              "ico", "pcx", "wav", "wave", "avi", "webp", "mov", "mp4", 
"m4a", "m4p",
   >              "m4b", "m4r", "m4v", "3gp", "3g2", "eps", "epsf", "epsi", 
"ai", "arw",
   >              "crw", "cr2", "nef", "orf", "raf", "rw2", "rwl", "srw", "x3f"
   >            ]
   >          }
   >        },
   > -      enabled : true
   > +      "enabled" : true
   >      },
   >  
   >      s3: {
   > Thanks a lot for wrapping field names with quotes. There are 4 (3 in s3 
plugin and the last one is cp.formats.csvh.extractHeader) more left unwrap - 
could you wrap it as well, please?
   > 
   > —
   > You are receiving this because you were mentioned.
   > Reply to this email directly, view it on GitHub 
<https://github.com/apache/drill/pull/1635#pullrequestreview-213296577>, or 
mute the thread 
<https://github.com/notifications/unsubscribe-auth/AFQfvl7soAxBroqpFDf8L5ltPmrRlnoKks5vV4GwgaJpZM4akCf->.
   > 
   
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to