hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anu Engineer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-12321) Ozone : debug cli: add support to load user-provided SQL query
Date Thu, 24 Aug 2017 18:18:00 GMT

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

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

bq. the CLI Parser must be able to recognize these two options "-volumeName" and "-bucketName"

if you look at the patch v7, you will see that we first parse the SQL and pull out the arguments
out of the SQL. if we get an SQL of the form , "Text :argument1: Text :argument2:", the SQLCommand#processSQL
will return a SQL of the form "Text ? Text ?" and will also populate an arguments array --
which will look like this, 
{{Arguments[] = [ argument1, argument2].}}

Once we have this argument array with us, we can add them to the Options via a function called
Options.addOption -- so these options are available on the command line. It does not matter
how many options we have since we will invoke addOption on each one of these arguments. 



bq. something to parse options by their given order (which would be a bit odd to me...). In
this case, things might become easier.

We don't need to read the options in a given order at all. We know the order in which we need
to bind the SQL arguments. The array of arguments already gives us that information. So we
can get the right argument from the command line and bind them at the right location.


Please let me know if it makes sense for me to create a working code rather a prototype? Would
that be helpful? 

> 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-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message