phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Enis Soztutar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf
Date Wed, 22 Jun 2016 21:00:20 GMT

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

Enis Soztutar commented on PHOENIX-2931:
----------------------------------------

Thanks Alicia, this is looking better. 

bq. This part of code is used by psql.py. If we did not provide connection string in the command
line, the first arg would be a file. There is no guarantee the first one is a connection string.
We are already checking whether the arg ends with .csv or .sql above. So my suggestion just
simplifies the above, you don't have to have parameter named "j". Can you please try it like
this: 
{code}
             int i = 0;
             // remove j here
             for (String arg : argList) {
                 if (execCmd.isUpgrade || arg.endsWith(CSV_FILE_EXT) || arg.endsWith(SQL_FILE_EXT))
{
                     inputFiles.add(arg);
                 } else {
                   if (i ==0) {
                    execCmd.connectionString = arg;
                   } else {
                    usageError("Don't know how to interpret argument '" + arg + "'", options);
                   }
                 }
                i++;
            }
            // remove if (j > 0) check
{code}

I've just noticed two more things. 
 - in ConnectionInfo.create(), we are constructing the JDBC string by concatenating, only
to be parsed back immediately again to be returned as a ConnectionInfo object. We should instead
directly return ConnectionInfo created from default configuration. 
 - ConnectionInfo can carry the principal and keytab as well. [~elserj] do you know whether
there are corresponding hbase-site.xml properties for these? Can we obtain them in any way
for the client side if it does not come from the URL?  

> Phoenix client asks users to provide configs in cli that are present on the machine in
hbase conf
> -------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-2931
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2931
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Alicia Ying Shu
>            Assignee: Alicia Ying Shu
>            Priority: Minor
>             Fix For: 4.9.0
>
>         Attachments: PHOENIX-2931-v1.patch, PHOENIX-2931-v2.patch, PHOENIX-2931-v3.patch,
PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. Phoenix should
read these configs from the system instead of having the user supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, default zookeeper
quorum and port will be taken from hbase configs. Otherwise, users can specify their own.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message