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

Enis Soztutar commented on PHOENIX-2449:
----------------------------------------

This particular issue touches upon the more generic problem of Phoenix's 
current packaging model based on bigtop (at least for our deployment model).
 
Phoenix has taken the approach of shipping a fatjar and relying on HBase at the 
server side for its configuration, and classpath and {{java.library.path}} 
issues. HBase already classpaths its own configuration, the config from Hadoop, 
classpath from Hadoop and native libraries (java.library.path) from Hadoop. 
Thus, it works pretty well when Phoenix is piggybacking on the HBase 
regionservers. 

The problem is with the Phoenix client side and the first daemon component PQS. 
Since the current scripts lack a "-env" equivalent or bigtop-like 
/usr/bin/phoenix-XXX wrappers to hardcode HBASE_CONF_DIR and HADOOP_CONF_DIR, 
both the client side and PQS cannot include these in the classpath easily. 

I think we should do these changes in the longer term: 
 - Make bigtop packaging changes so that phoenix-sqlline.py etc are wrappers 
and just call the actual phoenix-sqlline.py from the distribution (like 
{{hbase.distro}}). These will hard code the HBASE_CONF_DIR and HADOOP_CONF_DIR 
similar to how hbase and hadoop scripts operate. 
 - phoenix_utils.py should add HBASE_CONF_DIR and HADOOP_CONF_DIR to the 
classpath if found in env variables. 
 - phoenix-sqlline and other scripts should not need the user to specify the 
zookeeper quorum, and parent znode node etc. Instead the way should be to 
source the whole of HBASE_CONF_DIR (otherwise client config settings are not 
picked up). 

Now, coming back to this patch, for the short term, I think this patch is fine. 
Except that can you please move the defaulting logic inside phoenix_utils 
instead. This allows the client side also see the hadoop configuration which is 
needed for security setup. 
We can even add the hard coded HBASE_CONF_DIR while we are at it if you like.  




> QueryServer needs Hadoop configuration on classpath with Kerberos
> -----------------------------------------------------------------
>
>                 Key: PHOENIX-2449
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2449
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Josh Elser
>            Assignee: Josh Elser
>             Fix For: 4.7.0
>
>         Attachments: PHOENIX-2449.patch
>
>
> [~cartershanklin] pointed out to me that PQS fails to perform Kerberos login 
> using queryserver.py out of the box. It looks like this is ultimately because 
> the login is dependent on the value for {{hadoop.security.authentication}}. 
> Thus, without those configs, PQS never logs in, and just spews errors because 
> the HBase RPC fails without the ticket.
> Should be simple enough to pull HADOOP_CONF_DIR out and include it on the 
> classpath.



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

Reply via email to