ihuzenko 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_r266400219
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/store/httpd/HttpdLogFormatPlugin.java
##########
@@ -169,11 +116,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 = new HashMap<>();
for (final SchemaPath sp : getColumns()) {
- final String drillField = sp.getRootSegment().getPath();
- final String parserField =
HttpdParser.parserFormattedFieldName(drillField);
- fieldMapping.put(drillField, parserField);
+ String drillField = sp.getRootSegment().getPath();
+ try {
+ String parserField =
HttpdParser.parserFormattedFieldName(drillField);
+ fieldMapping.put(drillField, parserField);
+ } catch (Exception e) {
+ LOG.info("Putting field: " + drillField + " into map", e);
Review comment:
Maybe it would be more useful to use warning log level here?
----------------------------------------------------------------
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