drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "abdelhakim deneche" <adene...@gmail.com>
Subject Re: Review Request 28173: DRILL-1545 - Json files can only be read when they have a .json extension
Date Fri, 21 Nov 2014 23:40:29 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28173/
-----------------------------------------------------------

(Updated Nov. 21, 2014, 11:40 p.m.)


Review request for drill.


Changes
-------

JSONFormatConfig has been updated to better handle existing json configurations without "extensions"
attribute. When a user updates Drill, it doesn't need to update json format config


Bugs: DRILL-1545
    https://issues.apache.org/jira/browse/DRILL-1545


Repository: drill-git


Description
-------

updated JSONFormatPlugin, adding an extensions array into JSONFormatConfig. I used TextFormatPlugin
as a reference.
Now the user can set the following format in Web UI:
    "json": {
      "type": "json",
      "extensions": [
        "json",
        "log"
      ]
    }

The user can also write a separate config for json and log like this:
    "json": {
      "type": "json",
      "extensions": [
        "json"
      ]
    },
    "log": {
      "type": "json",
      "extensions": [
        "log"
      ]
    }


Diffs (updated)
-----

  exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/json/JSONFormatPlugin.java
e1165a2 
  exec/java-exec/src/main/resources/bootstrap-storage-plugins.json 4a20bea 

Diff: https://reviews.apache.org/r/28173/diff/


Testing
-------

created two copies of the same .json data file, one with .json extension and another with
.log extension.

updated "json" format like this:

    "json": {
      "type": "json",
        "extensions": [
          "json",
          "log"
        ]
    }

once the change was done, I was able to query both files from sqlline.


Thanks,

abdelhakim deneche


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message