Hey Anil,

In classpath, when you point to configuration files, you can only specify
folder name(in your case it should be /etc/hbase/conf). The wildcard "*"
only works for files with extension .jar. In addition, you can move the
/etc/hbase/conf to the very beginning of your class path(before the "."
current folder)

-Jeffrey

On 4/21/14 10:32 AM, "anil gupta" <anilgupt...@gmail.com> wrote:

>$1= <zk>:<keytab>:<principal>
>
>This work is part of https://issues.apache.org/jira/browse/PHOENIX-19 .
>So,
>i modified the connection string to extra params. The patch is attached to
>the jira. I'll also upload the most recent patch.
>
>I also tried your recommendation:
>$1= <zk>:<port>:<root_dir>:<keytab>:<principal>
>
>Still, i get the same error. It seems like the conf files for my
>distributed cluster is not getting picked up or some other conf file is
>also present in the classpath. Is there anyway i can specify the exact
>path
>of conf file in java code so that i can debug this? Or Is there a way to
>know which files Configuration is using to instantiate the Configuration
>object?
>
>
>On Mon, Apr 21, 2014 at 9:57 AM, Jeffrey Zhong
><jzh...@hortonworks.com>wrote:
>
>>
>> What's the value for your following "$1"? You need to specify the value
>>as
>> <hbase zookeeper quorum host string(without port)>:<zookeeper
>>port>:<hbase
>> root node>
>>
>> A sample value is quorumhost1,quoruamhost2,quorumhost3:2181:/hbase
>>
>> On 4/21/14 12:48 AM, "anil gupta" <anilgupt...@gmail.com> wrote:
>>
>> >Hi All,
>> >
>> >Phoenix is trying to connect to a Standalone hbase rather than my Fully
>> >distributed HBase cluster. Hence, it is getting
>>MasterNotRunningException.
>> >
>> >This is my current command to invoke Phoenix:
>> >java -cp
>> 
>>>".:/etc/hbase/conf/*:../sqlline-1.1.2.jar:../jline-2.11.jar:../phoenix-c
>>>or
>> 
>>>e-3.0.0-SNAPSHOT.jar:$phoenix_client_jar:/opt/cloudera/parcels/CDH/lib/h
>>>ba
>> 
>>>se/hbase-0.94.15-cdh4.6.0-security.jar:/opt/cloudera/parcels/CDH/lib/hba
>>>se
>> 
>>>/lib/*:/opt/cloudera/parcels/CDH/lib/hadoop/*:/opt/cloudera/parcels/CDH/
>>>li
>> >b/hadoop/lib/*"
>> >-Dlog4j.configuration=file:$current_dir/log4j.properties
>>sqlline.SqlLine
>> >-d
>> >org.apache.phoenix.jdbc.PhoenixDriver -u jdbc:phoenix:$1 -n none -p
>>none
>> >--color=true --fastConnect=false --verbose=true
>> >--isolation=TRANSACTION_READ_COMMITTED $sqlfile
>> >
>> >As you can see that i have added /etc/hbase/conf/* in classpath. I also
>> >verified that correct files are present in /etc/hbase/conf/ folder.
>>Then
>> >also Phoenix is not picking up the conf and its trying to connect to
>>local
>> >cluster where hbase.rootdir="file:///tmp/hbase-intuit/hbase" . I am
>>unable
>> >to figure out why Phoenix is not picking up the conf. IMO, adding
>> >/etc/hbase/conf/* in classpath should be enough but it seems like this
>>is
>> >not sufficient. Any ideas/suggestions on how to make Phoenix pick up
>>the
>> >correct configuration?
>> >
>> >Thanks,
>> >Anil Gupta
>> >
>> >
>> >On Sun, Apr 20, 2014 at 11:47 PM, anil gupta <anilgupt...@gmail.com>
>> >wrote:
>> >
>> >> It seems like Phoenix is unable to connect to master. I am able to
>>use
>> >> hbase shell from that node. So, everything should be fine. I have
>>also
>> >> included hbase conf directories in classpath. Is there any other
>>thing
>> >>i am
>> >> missing?
>> >>
>> >> This is the error i got:
>> >>
>> >> Found quorum: pprf1:2181,pprf2:2181,pprf3:2181,pprf4:2181,pprf5:2181
>> >> Error: Retried 14 times (state=08000,code=101)
>> >> org.apache.phoenix.exception.PhoenixIOException: Retried 14 times
>> >>     at
>> >>
>> 
>>>>org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java
>>>>:9
>> >>9)
>> >>     at
>> >>
>> 
>>>>org.apache.phoenix.query.ConnectionQueryServicesImpl.ensureTableCreated
>>>>(C
>> >>onnectionQueryServicesImpl.java:680)
>> >>     at
>> >>
>> 
>>>>org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(Connec
>>>>ti
>> >>onQueryServicesImpl.java:821)
>> >>     at
>> >>
>> 
>>>>org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataCl
>>>>ie
>> >>nt.java:988)
>> >>     at
>> >>
>> 
>>>>org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.jav
>>>>a:
>> >>384)
>> >>     at
>> >>
>> 
>>>>org.apache.phoenix.compile.CreateTableCompiler$2.execute(CreateTableCom
>>>>pi
>> >>ler.java:168)
>> >>     at
>> >>
>> 
>>>>org.apache.phoenix.jdbc.PhoenixStatement$ExecutableCreateTableStatement
>>>>.e
>> >>xecuteUpdate(PhoenixStatement.java:350)
>> >>     at
>> >>
>> 
>>>>org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement
>>>>.j
>> >>ava:1047)
>> >>     at
>> >>
>> 
>>>>org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQue
>>>>ry
>> >>ServicesImpl.java:1016)
>> >>     at
>> >>
>> 
>>>>org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(Phoeni
>>>>xD
>> >>river.java:79)
>> >>     at
>> >>
>> 
>>>>org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDr
>>>>iv
>> >>er.java:107)
>> >>     at sqlline.SqlLine$DatabaseConnection.connect(SqlLine.java:4650)
>> >>     at
>> >>sqlline.SqlLine$DatabaseConnection.getConnection(SqlLine.java:4701)
>> >>     at sqlline.SqlLine$Commands.connect(SqlLine.java:3942)
>> >>     at sqlline.SqlLine$Commands.connect(SqlLine.java:3851)
>> >>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> >>     at
>> >>
>> 
>>>>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
>>>>va
>> >>:57)
>> >>     at
>> >>
>> 
>>>>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
>>>>rI
>> >>mpl.java:43)
>> >>     at java.lang.reflect.Method.invoke(Method.java:606)
>> >>     at
>> >>sqlline.SqlLine$ReflectiveCommandHandler.execute(SqlLine.java:2810)
>> >>     at sqlline.SqlLine.dispatch(SqlLine.java:817)
>> >>     at sqlline.SqlLine.initArgs(SqlLine.java:633)
>> >>     at sqlline.SqlLine.begin(SqlLine.java:680)
>> >>     at sqlline.SqlLine.mainWithInputRedirection(SqlLine.java:441)
>> >>     at sqlline.SqlLine.main(SqlLine.java:424)
>> >> Caused by: org.apache.hadoop.hbase.MasterNotRunningException:
>>Retried 14
>> >> times
>> >>     at
>> >> org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:139)
>> >>     at
>> >>
>> 
>>>>org.apache.phoenix.query.ConnectionQueryServicesImpl.ensureTableCreated
>>>>(C
>> >>onnectionQueryServicesImpl.java:606)
>> >>     ... 23 more
>> >>
>> >>
>> >>
>> >> On Sun, Apr 20, 2014 at 9:18 PM, anil gupta <anilgupt...@gmail.com>
>> >>wrote:
>> >>
>> >>> I just fixed couple of  initialization errors by putting phoenix
>>jars,
>> >>> sqlline and jline jars before hbase jars in classpath and added
>>Hadoop
>> >>> jars. Now the command is:
>> >>> *java -cp
>> >>>
>> 
>>>>>".:/etc/hadoop/conf:/etc/hbase/conf:../sqlline-1.1.2.jar:../jline-2.11
>>>>>.j
>> 
>>>>>ar:../phoenix-core-3.0.0-SNAPSHOT.jar:$phoenix_client_jar:/opt/clouder
>>>>>a/
>> 
>>>>>parcels/CDH/lib/hbase/hbase-0.94.15-cdh4.6.0-security.jar:/opt/clouder
>>>>>a/
>> 
>>>>>parcels/CDH/lib/hbase/lib/*:/opt/cloudera/parcels/CDH/lib/hadoop/*:/op
>>>>>t/
>> >>>cloudera/parcels/CDH/lib/hadoop/lib/*"
>> >>> *-Dlog4j.configuration=file:$current_dir/log4j.properties
>> >>> sqlline.SqlLine -d org.apache.phoenix.jdbc.PhoenixDriver -u
>> >>>jdbc:phoenix:$1
>> >>> -n none -p none --color=true --fastConnect=false --verbose=true
>> >>> --isolation=TRANSACTION_READ_COMMITTED $sqlfile
>> >>>
>> >>> At present, it seems like the classpath errors are fixed. I see
>>this on
>> >>> the console, but its stuck at this line.:
>> >>> Found quorum: pprf1:2181,pprf2:2181,pprf3:2181,pprf4:2181,pprf5:2181
>> >>>
>> >>> Can anyone tell me where it is probably stuck?
>> >>>
>> >>> Thanks,
>> >>> Anil Gupta
>> >>>
>> >>>
>> >>> On Sun, Apr 20, 2014 at 9:02 PM, anil gupta
>> >>><anilgupt...@gmail.com>wrote:
>> >>>
>> >>>> Hi All,
>> >>>>
>> >>>> Due to issues faced in Phoenix-19 we cannot use
>> >>>> phoenix-3.0.0-SNAPSHOT-client.jar, i am trying to run Phoenix on
>> >>>> commandline with phoenix-3.0.0-SNAPSHOT-client-without-hbase.jar.
>> >>>>Modified
>> >>>> command to invoke phoenix in sqlline.sh looks like this:
>> >>>> java -cp "
>> >>>>
>> 
>>>>>>*.:/etc/hadoop/conf:/etc/hbase/conf:/opt/cloudera/parcels/CDH/lib/hba
>>>>>>se
>> 
>>>>>>/hbase-0.94.15-cdh4.6.0-security.jar:/opt/cloudera/parcels/CDH/lib/hb
>>>>>>as
>> 
>>>>>>e/lib/*:../sqlline-1.1.2.jar:../jline-2.11.jar:../phoenix-core-3.0.0-
>>>>>>SN
>> >>>>APSHOT.jar*:$phoenix_client_jar"
>> >>>> -Dlog4j.configuration=file:$current_dir/log4j.properties
>> >>>>sqlline.SqlLine -d
>> >>>> org.apache.phoenix.jdbc.PhoenixDriver -u jdbc:phoenix:$1 -n none -p
>> >>>>none
>> >>>> --color=true --fastConnect=false --verbose=true
>> >>>> --isolation=TRANSACTION_READ_COMMITTED $sqlfile
>> >>>>
>> >>>> At present, i get the following error:
>> >>>> [ERROR] Terminal initialization failed; falling back to unsupported
>> >>>> java.lang.IncompatibleClassChangeError: Found class jline.Terminal,
>> >>>>but
>> >>>> interface was expected
>> >>>>     at jline.TerminalFactory.create(TerminalFactory.java:101)
>> >>>>     at jline.TerminalFactory.get(TerminalFactory.java:159)
>> >>>>     at sqlline.SqlLine$Opts.<init>(SqlLine.java:4846)
>> >>>>     at sqlline.SqlLine.<init>(SqlLine.java:175)
>> >>>>     at sqlline.SqlLine.mainWithInputRedirection(SqlLine.java:440)
>> >>>>     at sqlline.SqlLine.main(SqlLine.java:424)
>> >>>>
>> >>>> Exception in thread "main" java.lang.IncompatibleClassChangeError:
>> >>>>Found
>> >>>> class jline.Terminal, but interface was expected
>> >>>>     at sqlline.SqlLine$Opts.<init>(SqlLine.java:4846)
>> >>>>     at sqlline.SqlLine.<init>(SqlLine.java:175)
>> >>>>     at sqlline.SqlLine.mainWithInputRedirection(SqlLine.java:440)
>> >>>>     at sqlline.SqlLine.main(SqlLine.java:424)
>> >>>>
>> >>>> Please let me know what am i missing now? Or What's wrong with the
>> >>>> initialization command?
>> >>>> I am using cdh4.6 with HBase0.94.15.
>> >>>>
>> >>>>
>> >>>> --
>> >>>> Thanks & Regards,
>> >>>> Anil Gupta
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Thanks & Regards,
>> >>> Anil Gupta
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> Thanks & Regards,
>> >> Anil Gupta
>> >>
>> >
>> >
>> >
>> >--
>> >Thanks & Regards,
>> >Anil Gupta
>>
>>
>>
>> --
>> CONFIDENTIALITY NOTICE
>> NOTICE: This message is intended for the use of the individual or
>>entity to
>> which it is addressed and may contain information that is confidential,
>> privileged and exempt from disclosure under applicable law. If the
>>reader
>> of this message is not the intended recipient, you are hereby notified
>>that
>> any printing, copying, dissemination, distribution, disclosure or
>> forwarding of this communication is strictly prohibited. If you have
>> received this communication in error, please contact the sender
>>immediately
>> and delete it from your system. Thank You.
>>
>
>
>
>-- 
>Thanks & Regards,
>Anil Gupta



-- 
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to 
which it is addressed and may contain information that is confidential, 
privileged and exempt from disclosure under applicable law. If the reader 
of this message is not the intended recipient, you are hereby notified that 
any printing, copying, dissemination, distribution, disclosure or 
forwarding of this communication is strictly prohibited. If you have 
received this communication in error, please contact the sender immediately 
and delete it from your system. Thank You.

Reply via email to