[ 
https://issues.apache.org/jira/browse/HDFS-12321?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Anu Engineer updated HDFS-12321:
--------------------------------
    Attachment: HDFS-12321-HDFS-7240.007.patch

[~vagarychen] Thanks for updating the v6 patch. Based on your patch, I have 
prototyped what I was discussing earlier. The ability to make the commands 
written in a JSON file as first class commands in the SQLQueryCLI.

Here are the changes in the patch.
* Changed the format of JSON file. Now we have an array of Command Objects.
* Added 2 classes to make it easy to parse JSON and also makes it easy to add 
or remove fields from the JSON object.
* Added a command file to the resources directory, so we can add more sql 
commands to that file. Also, removes the headache of formatting JSON as a Java 
string.
* Added the ability to parse arguments out of SQL -- The new format is 
:argumentName: inside SQL and we will pick up and add that as an option. 
Eventually, we might need an arguments section in the JSON file, since 
arguments in SQL strings may collide.
* Added a Test case to test that sql query CLI works as expected.
* *Please note:* As regards core functionality and testing of SQL queries, I 
have not attempted to do it. You will need to take this patch and extend it to 
support the actual queries. In other words, the SQL execution path is probably 
not complete and we will need to fix that part. Please treat this patch as a 
demonstration of an idea that was discussed earlier.




> Ozone : debug cli: add support to load user-provided SQL query
> --------------------------------------------------------------
>
>                 Key: HDFS-12321
>                 URL: https://issues.apache.org/jira/browse/HDFS-12321
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Chen Liang
>            Assignee: Chen Liang
>             Fix For: ozone
>
>         Attachments: HDFS-12321-HDFS-7240.001.patch, 
> HDFS-12321-HDFS-7240.002.patch, HDFS-12321-HDFS-7240.003.patch, 
> HDFS-12321-HDFS-7240.004.patch, HDFS-12321-HDFS-7240.005.patch, 
> HDFS-12321-HDFS-7240.006.patch, HDFS-12321-HDFS-7240.007.patch
>
>
> This JIRA extends SQL CLI to support loading a user-provided file that 
> includes any sql query the user wants to run on the SQLite db obtained by 
> converting Ozone metadata db.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to