phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kleiton Silva <kleiton.cont...@gmail.com>
Subject Re: Help to Connect via SQuirrel
Date Wed, 02 Apr 2014 20:10:54 GMT
Hey Jeffrey,

Now i face another error, i couldn't connect because it receive connection
refuse, as shown below.

My Hbase is ok, this is my hbase-site.xml (HBASE/conf):

<configuration>
  <property>
    <name>hbase.rootdir</name>
    <value>hdfs://oak:54310/data/hbase</value>
  </property>
  <property>
    <name>hbase.zookeeper.property.dataDir</name>
    <value>/usr/lib/hbase/hbase-0.98.0-hadoop1/data/zookeeper</value>
  </property>
  <property>
    <name>hbase.zookeeper.property.clientPort</name>
    <value>2181</value>
  </property>
  <property>
    <name>hbase.zookeeper.quorum</name>
    <value>oak.local</value>
 </property>
</configuration>


My host file:

10.2.103.214    oak
10.2.103.214    localhost
10.2.103.214    oak.local


The error that i receive:

2014-04-02 17:03:27,034 [Thread-11-SendThread(oak:2811)] WARN
 org.apache.zookeeper.ClientCnxn  - Session 0x0 for server null, unexpected
error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:599)
at
org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068)




Doubt:

My HBASE already have a table called 'test', this would be shown with the
!table  command or not?

Because i will use Phoenix with Sqoop to transfer data between from one
Hbase to another Hbase.

Thank you.

Kleiton


On Wed, Apr 2, 2014 at 10:48 AM, Jeffrey Zhong <jzhong@hortonworks.com>wrote:

>
> Hey Kleiton,
>
> Just to make sure you are aware of that Phoenix 4.0 is supposed to running
> against Hbase 0.98.1. You need to create a table firstly in Phoenix in
> order to be seen from !table command from sqlline.
>
> Thanks,
> -Jeffrey
>
> From: Jeffrey Zhong <jzhong@hortonworks.com>
> Date: Wednesday, April 2, 2014 10:27 AM
> To: <user@phoenix.incubator.apache.org>
> Subject: Re: Help to Connect via SQuirrel
>
>
> You can put the following configuration settings in hbase-site.xml under
> the bin folder and invoke the sqlline.py from bin folder OR you can set
> PHOENIX_LIB_DIR env variable such as  export PHOENIX_LIB_DIR=<path to the
> hbase-site.xml>:<path to your phoenix home folder> and then invoke sqlline
> again.
>
>   <property>
>
>        <name>hbase.defaults.for.version.skip</name>
>
>         <value>true</value>
>
>   </property>
>
>
> From: Kleiton Silva <kleiton.contato@gmail.com>
> Reply-To: <user@phoenix.incubator.apache.org>
> Date: Wednesday, April 2, 2014 7:43 AM
> To: <user@phoenix.incubator.apache.org>
> Subject: Help to Connect via SQuirrel
>
> I am trying to do the same configuration as in
> http://phoenix.incubator.apache.org/download.html#SQL-Client, to connect
> with Squirrel, but a receive the error bellow:
>
> *Environment*:
>
> HBASE: /usr/lib/hbase/hbase-0.98.0-hadoop1/bin
> PHOENIX: phoenix-4.0.0-incubating
> HADOOP: /usr/lib/hadoop/hadoop-1.2.1
>
> HBase test(Commands):
>
> *OAK:bin eduardofilho$ ./hbase shell*
> HBase Shell; enter 'help<RETURN>' for list of supported commands.
> Type "exit<RETURN>" to leave the HBase Shell
> Version 0.98.0-hadoop1, r1565492, Thu Feb  6 16:20:15 PST 2014
>
> *hbase(main):001:0> scan 'test'*
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in
> [jar:file:/usr/lib/hbase/hbase-0.98.0-hadoop1/lib/slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in
> [jar:file:/usr/lib/hadoop/hadoop-1.2.1/lib/slf4j-log4j12-1.4.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
> explanation.
> ROW                   COLUMN+CELL
>
>  row1                 column=cf:a, timestamp=1396129288479, value=value1
>
>  row2                 column=cf:b, timestamp=1396129295034, value=value2
>
>  row3                 column=cf:c, timestamp=1396129303288, value=value3
>
> 3 row(s) in 0.1700 seconds
>
> *Phoenix Test(Commands)*
>
> OAK:bin eduardofilho$ ./sqlline.py oak.local
> Setting property: [isolation, TRANSACTION_READ_COMMITTED]
> issuing: !connect jdbc:phoenix:oak.local none none
> org.apache.phoenix.jdbc.PhoenixDriver
> Connecting to jdbc:phoenix:oak.local
> Connected to: Phoenix (version 4.0)
> Driver: org.apache.phoenix.jdbc.PhoenixDriver (version 4.0)
> Autocommit status: true
> Transaction isolation: TRANSACTION_READ_COMMITTED
> Building list of tables and columns for tab-completion (set fastconnect to
> true to skip)...
> 53/53 (100%) Done
> Done
> sqlline version 1.1.2
> 0: jdbc:phoenix:oak.local> !tables
>
> +------------+-------------+------------+------------+------------+------------+
> | TABLE_CAT  | TABLE_SCHEM | TABLE_NAME | TABLE_TYPE |  REMARKS   |
> TYPE_NAME  |
>
> +------------+-------------+------------+------------+------------+------------+
> | null       | SYSTEM      | CATALOG    | SYSTEM TABLE | null       | null
>     |
> | null       | SYSTEM      | SEQUENCE   | SYSTEM TABLE | null       | null
>     |
>
> +------------+-------------+------------+------------+------------+------------+
> 0: jdbc:phoenix:oak.local>
>
>
> This command not show my table 'test'
>
> *ERROR*:
>
> 2014-04-02 11:19:48,368 [Thread-8] ERROR
> net.sourceforge.squirrel_sql.client.gui.db.ConnectToAliasCallBack  -
> Unexpected Error occured attempting to open an SQL connection.
> java.lang.RuntimeException: hbase-default.xml file seems to be for and old
> version of HBase (null), this version is 0.98.1-hadoop1
> at
> org.apache.hadoop.hbase.HBaseConfiguration.checkDefaultsVersion(HBaseConfiguration.java:70)
> at
> org.apache.hadoop.hbase.HBaseConfiguration.addHbaseResources(HBaseConfiguration.java:102)
> at
> org.apache.hadoop.hbase.HBaseConfiguration.create(HBaseConfiguration.java:113)
> at
> org.apache.phoenix.query.ConfigurationFactory$ConfigurationFactoryImpl.getConfiguration(ConfigurationFactory.java:41)
> at
> org.apache.phoenix.query.QueryServicesOptions.withDefaults(QueryServicesOptions.java:146)
> at
> org.apache.phoenix.query.QueryServicesImpl.<init>(QueryServicesImpl.java:34)
> at
> org.apache.phoenix.jdbc.PhoenixDriver.getQueryServices(PhoenixDriver.java:96)
> at
> org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:114)
> at
> org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:112)
> at
> net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:133)
> at
> net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.execute(OpenConnectionCommand.java:97)
> at
> net.sourceforge.squirrel_sql.client.mainframe.action.ConnectToAliasCommand$SheetHandler.run(ConnectToAliasCommand.java:280)
> at
> net.sourceforge.squirrel_sql.fw.util.TaskExecuter.run(TaskExecuter.java:82)
> at java.lang.Thread.run(Thread.java:695)
>
>
>
> I Would appreciate if someone could me help.
>
> Thanks.
>
> Kleiton
>
>
>
> 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.
>

Mime
View raw message