[ 
https://issues.apache.org/jira/browse/HDFS-12321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16135912#comment-16135912
 ] 

Anu Engineer commented on HDFS-12321:
-------------------------------------

[~vagarychen] Thanks for adding this amazing capability to ozone debug tool. I 
am sure this one tool will save countless hours for each one of us. Thank you 
very much for taking care of this. The patch looks excellent. Some minor 
comments.

* SQLQueryCLI
{code}
  if (filePath == null) {
      throw new IOException("Requires setting " +
          OZONE_CLI_USER_COMMAND_FILE_KEY);
    }
{code}
Instead of throwing here, can we please print the text that is commented out 
right after this line, and return a
failure code to the OS ? So say "Requires setting " + 
OZONE_CLI_USER_COMMAND_FILE_KEY, and then print out the text that you already 
have. 

* *At some point in the future* -- not in this patch, we might have to support 
passing arguments to queries. So that json might need the argument names -- so 
that user can specify them in the command line. For example, think about a 
query that lists all buckets under a volume, you need a way to pass volume name 
into this function.

* Just a *very wild thought*: I am not suggesting we have to do this, just 
sharing a thought that I had. How about we read the json file and add the 
commands to the Options -- like {{getOptions}}, no idea how hard it will be, 
but it will look like we have first class commands via Json.  If you would like 
to explore this more, we can chat about this.







> 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
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to