Member since
04-22-2016
931
Posts
46
Kudos Received
26
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 1852 | 10-11-2018 01:38 AM | |
| 2217 | 09-26-2018 02:24 AM | |
| 2244 | 06-29-2018 02:35 PM | |
| 2913 | 06-29-2018 02:34 PM | |
| 6093 | 06-20-2018 04:30 PM |
06-08-2018
08:26 PM
I am running a simple HBASE JAva code to create a table but I am getting this error .6.4.0-91/phoenix/phoenix-client.jar:/usr/hdp/2.6.4.0-91/phoenix/phoenix-server.jar://usr/hdp/2.6.4.0-91/hbase/conf/hbase-site.xml:.
18/06/08 16:19:41 INFO zookeeper.ZooKeeper: Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
18/06/08 16:19:41 INFO zookeeper.ZooKeeper: Client environment:java.io.tmpdir=/tmp
18/06/08 16:19:41 INFO zookeeper.ZooKeeper: Client environment:java.compiler=<NA>
18/06/08 16:19:41 INFO zookeeper.ZooKeeper: Client environment:os.name=Linux
18/06/08 16:19:41 INFO zookeeper.ZooKeeper: Client environment:os.arch=amd64
18/06/08 16:19:41 INFO zookeeper.ZooKeeper: Client environment:os.version=2.6.32-642.6.2.el6.x86_64
18/06/08 16:19:41 INFO zookeeper.ZooKeeper: Client environment:user.name=root
18/06/08 16:19:41 INFO zookeeper.ZooKeeper: Client environment:user.home=/root
18/06/08 16:19:41 INFO zookeeper.ZooKeeper: Client environment:user.dir=/root
18/06/08 16:19:41 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=90000 watcher=org.apache.hadoop.hbase.zookeeper.PendingWatcher@5158b42f
18/06/08 16:19:41 DEBUG zookeeper.ClientCnxn: zookeeper.disableAutoWatchReset is false
18/06/08 16:19:41 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
18/06/08 16:19:41 INFO zookeeper.ClientCnxn: Socket connection established, initiating session, client: /127.0.0.1:39668, server: localhost/127.0.0.1:2181
18/06/08 16:19:41 DEBUG zookeeper.ClientCnxn: Session establishment request sent on localhost/127.0.0.1:2181
18/06/08 16:19:41 INFO zookeeper.ClientCnxn: Session establishment complete on server localhost/127.0.0.1:2181, sessionid = 0x163891d95120b7c, negotiated timeout = 60000
18/06/08 16:19:41 DEBUG zookeeper.ZooKeeperWatcher: hconnection-0x402bba4f0x0, quorum=localhost:2181, baseZNode=/hbase Received ZooKeeper Event, type=None, state=SyncConnected, path=null
18/06/08 16:19:41 DEBUG zookeeper.ZooKeeperWatcher: hconnection-0x402bba4f-0x163891d95120b7c connected
18/06/08 16:19:41 DEBUG zookeeper.ClientCnxn: Reading reply sessionid:0x163891d95120b7c, packet:: clientPath:null serverPath:null finished:false header:: 1,3 replyHeader:: 1,8595911618,-101 request:: '/hbase/hbaseid,F response::
18/06/08 16:19:41 INFO client.ZooKeeperRegistry: ClusterId read in ZooKeeper is null
18/06/08 16:19:41 DEBUG client.ConnectionManager$HConnectionImplementation: clusterid came back null, using default default-cluster
18/06/08 16:19:41 DEBUG ipc.AbstractRpcClient: Codec=org.apache.hadoop.hbase.codec.KeyValueCodec@44c03695, compressor=null, tcpKeepAlive=true, tcpNoDelay=true, connectTO=10000, readTO=20000, writeTO=60000, minIdleTimeBeforeClose=120000, maxRetries=0, fallbackAllowed=false, bind address=null
18/06/08 16:19:41 DEBUG zookeeper.ClientCnxn: Reading reply sessionid:0x163891d95120b7c, packet:: clientPath:null serverPath:null finished:false header:: 2,4 replyHeader:: 2,8595911618,-101 request:: '/hbase/meta-region-server,F response::
18/06/08 16:19:41 DEBUG zookeeper.ZKUtil: hconnection-0x402bba4f-0x163891d95120b7c, quorum=localhost:2181, baseZNode=/hbase Unable to get data of znode /hbase/meta-region-server because node does not exist (not an error)
18/06/08 16:19:41 DEBUG zookeeper.ClientCnxn: Reading reply sessionid:0x163891d95120b7c, packet:: clientPath:null serverPath:null finished:false header:: 3,4 replyHeader:: 3,8595911618,-101 request:: '/hbase/meta-region-server,F response::
18/06/08 16:19:41 DEBUG zookeeper.ZKUtil: hconnection-0x402bba4f-0x163891d95120b7c, quorum=localhost:2181, baseZNode=/hbase Unable to get data of znode /hbase/meta-region-server because node does not exist (not an error)
18/06/08 16:19:41 DEBUG zookeeper.ClientCnxn: Reading reply sessionid:0x163891d95120b7c, packet:: clientPath:null serverPath:null finished:false header:: 4,4 replyHeader:: 4,8595911618,-101 request:: '/hbase/meta-region-server,F response::
18/06/08 16:19:41 DEBUG zookeeper.ZKUtil: hconnection-0x402bba4f-0x163891d95120b7c, quorum=localhost:2181, baseZNode=/hbase Unable to get data of znode /hbase/meta-region-server because node does not exist (not an error)
18/06/08 16:19:42 DEBUG zookeeper.ClientCnxn: Reading reply sessionid:0x163891d95120b7c, packet:: clientPath:null serverPath:null finished:false header:: 5,4 replyHeader:: 5,8595911618,-101 request:: '/hbase/meta-region-server,F response::
18/06/08 16:19:42 DEBUG zookeeper.ZKUtil: hconnection-0x402bba4f-0x163891d95120b7c, quorum=localhost:2181, baseZNode=/hbase Unable to get data of znode /hbase/meta-region-server because node does not exist (not an error)
18/06/08 16:19:42 DEBUG zookeeper.ClientCnxn: Reading reply sessionid:0x163891d95120b7c, packet:: clientPath:null serverPath:null finished:false header:: 6,4 replyHeader:: 6,8595911622,-101 request:: '/hbase/meta-region-server,F response::
18/06/08 16:19:42 DEBUG zookeeper.ZKUtil: hconnection-0x402bba4f-0x163891d95120b7c, quorum=localhost:2181, baseZNode=/hbase Unable to get data of znode /hbase/meta-region-server because node does not exist (not an error)
18/06/08 16:19:42 DEBUG zookeeper.ClientCnxn: Reading reply sessionid:0x163891d95120b7c, packet:: clientPath:null serverPath:null finished:false header:: 7,4 replyHeader:: 7,8595911622,-101 request:: '/hbase/meta-region-server,F response::
18/06/08 16:19:42 DEBUG zookeeper.ZKUtil: hconnection-0x402bba4f-0x163891d95120b7c, quorum=localhost:2181, baseZNode=/hbase Unable to get data of znode /hbase/meta-region-server because node does not exist (not an error)
18/06/08 16:19:42 DEBUG zookeeper.ClientCnxn: Reading reply sessionid:0x163891d95120b7c, packet:: clientPath:null serverPath:null finished:false header:: 8,4 replyHeader:: 8,8595911622,-101 request:: '/hbase/meta-region-server,F response::
18/06/08 16:19:42 DEBUG zookeeper.ZKUtil: hconnection-0x402bba4f-0x163891d95120b7c, quorum=localhost:2181, baseZNode=/hbase Unable to get data of znode /hbase/meta-region-server because node does not exist (not an error)
18/06/08 16:19:42 DEBUG zookeeper.ClientCnxn: Reading reply sessionid:0x163891d95120b7c, packet:: clientPath:null serverPath:null finished:false header:: 9,4 replyHeader:: 9,8595911622,-101 request:: '/hbase/meta-region-server,F response::
18/06/08 16:19:42 DEBUG zookeeper.ZKUtil: hconnection-0x402bba4f-0x163891d95120b7c, quorum=localhost:2181, baseZNode=/hbase Unable to get data of znode /hbase/meta-region-server because node does not exist (not an error)
18/06/08 16:19:43 DEBUG zookeeper.ClientCnxn: Reading reply sessionid:0x163891d95120b7c, packet:: clientPath:null serverPath:null finished:false header:: 10,4 replyHeader:: 10,8595911622,-101 request:: '/hbase/meta-region-server,F response::
18/06/08 16:19:43 DEBUG zookeeper.ZKUtil: hconnection-0x402bba4f-0x163891d95120b7c, quorum=localhost:2181, baseZNode=/hbase Unable to get data of znode /hbase/meta-region-server because node does not exist (not an error)
18/06/08 16:19:43 DEBUG zookeeper.ClientCnxn: Reading reply sessionid:0x163891d95120b7c, packet:: clientPath:null serverPath:null finished:false header:: 11,4 replyHeader:: 11,8595911624,-101 request
... View more
Labels:
06-08-2018
07:43 PM
as you see the connection is established it says but I don't see the "got connection" message that's posted in the code .
... View more
06-08-2018
07:05 PM
I am trying to run a java code which queries a phoenix view but I am getting errors . The code and error results are shown below.
[root@hadoop1 ~]# more phoenixTest.java
import java.sql.*;
import java.util.*;
import org.apache.phoenix.jdbc.PhoenixDriver;
public class phoenixTest {
public static void main(String args[]) throws Exception {
Connection conn;
Properties prop = new Properties();
Class.forName("org.apache.phoenix.jdbc.PhoenixDriver");
conn = DriverManager.getConnection("jdbc:phoenix:hadoop1:2181:/hbase-unsecure");
System.out.println("got connection");
ResultSet rst = conn.createStatement().executeQuery("select ufmid,list1,txntm from ufm");
while (rst.next()) {
System.out.println(rst.getString(1) + " " + rst.getString(2));
}
conn.commit();
}
}
18/06/08 14:57:35 INFO zookeeper.ZooKeeper: Client environment:os.arch=amd64
18/06/08 14:57:35 INFO zookeeper.ZooKeeper: Client environment:os.version=2.6.32-642.6.2.el6.x86_64
18/06/08 14:57:35 INFO zookeeper.ZooKeeper: Client environment:user.name=root
18/06/08 14:57:35 INFO zookeeper.ZooKeeper: Client environment:user.home=/root
18/06/08 14:57:35 INFO zookeeper.ZooKeeper: Client environment:user.dir=/root
18/06/08 14:57:35 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=hadoop1:2181 sessionTimeout=90000 watcher=org.apache.hadoop.hbase.zookeeper.PendingWatcher@740773a3
18/06/08 14:57:35 DEBUG zookeeper.ClientCnxn: zookeeper.disableAutoWatchReset is false
18/06/08 14:57:35 INFO zookeeper.ClientCnxn: Opening socket connection to server hadoop1.tolls.dot.state.fl.us/10.100.44.17:2181. Will not attempt to authenticate using SASL (unknown error)
18/06/08 14:57:35 INFO zookeeper.ClientCnxn: Socket connection established, initiating session, client: /10.100.44.17:57104, server: hadoop1.tolls.dot.state.fl.us/10.100.44.17:2181
18/06/08 14:57:35 DEBUG zookeeper.ClientCnxn: Session establishment request sent on hadoop1.tolls.dot.state.fl.us/10.100.44.17:2181
18/06/08 14:57:35 INFO zookeeper.ClientCnxn: Session establishment complete on server hadoop1.tolls.dot.state.fl.us/10.100.44.17:2181, sessionid = 0x163891d95120b6f, negotiated timeout = 60000
18/06/08 14:57:35 DEBUG zookeeper.ZooKeeperWatcher: hconnection-0x2e3774000x0, quorum=hadoop1:2181, baseZNode=/hbase-unsecure Received ZooKeeper Event, type=None, state=SyncConnected, path=null
18/06/08 14:57:35 DEBUG zookeeper.ZooKeeperWatcher: hconnection-0x2e377400-0x163891d95120b6f connected
18/06/08 14:57:35 DEBUG zookeeper.ClientCnxn: Reading reply sessionid:0x163891d95120b6f, packet:: clientPath:null serverPath:null finished:false header:: 1,3 replyHeader:: 1,8595902057,0 request:: '/hbase-unsecure/hbaseid,F response:: s{4294967631,8590066278,1522792678572,1522935216432,4,0,0,0,67,0,4294967631}
18/06/08 14:57:35 DEBUG zookeeper.ClientCnxn: Reading reply sessionid:0x163891d95120b6f, packet:: clientPath:null serverPath:null finished:false header:: 2,4 replyHeader:: 2,8595902057,0 request:: '/hbase-unsecure/hbaseid,F response:: #ffffffff000146d61737465723a3136303030ffffff8bffffff92ffffff8f343cffffffb1fffffff75a50425546a2431393337393739322d626566622d343261372d613061352d653161323939323037343330,s{4294967631,8590066278,1522792678572,1522935216432,4,0,0,0,67,0,4294967631}
18/06/08 14:57:36 DEBUG ipc.AbstractRpcClient: Codec=org.apache.hadoop.hbase.codec.KeyValueCodec@28b46423, compressor=null, tcpKeepAlive=true, tcpNoDelay=true, connectTO=10000, readTO=20000, writeTO=60000, minIdleTimeBeforeClose=120000, maxRetries=0, fallbackAllowed=false, bind address=null
18/06/08 14:57:36 WARN util.Tracing: Tracing will outputs will not be written to any metrics sink! No TraceMetricsSink found on the classpath
java.lang.RuntimeException: Could not create interface org.apache.phoenix.trace.PhoenixSpanReceiver Is the hadoop compatibility jar on the classpath?
at org.apache.hadoop.hbase.CompatibilityFactory.getInstance(CompatibilityFactory.java:60)
at org.apache.phoenix.trace.TracingCompat.newTraceMetricSource(TracingCompat.java:40)
at org.apache.phoenix.trace.util.Tracing.addTraceMetricsSource(Tracing.java:294)
at org.apache.phoenix.jdbc.PhoenixConnection.<clinit>(PhoenixConnection.java:125)
at org.apache.phoenix.query.ConnectionQueryServicesImpl$9.call(ConnectionQueryServicesImpl.java:1516)
at org.apache.phoenix.query.ConnectionQueryServicesImpl$9.call(ConnectionQueryServicesImpl.java:1489)
... View more
Labels:
06-08-2018
05:52 PM
I am getting runtime error when running a phoenix java code . Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/phoenix/trace/TracingCompat I cant find this class .. which package it belongs to ? I downloaded phoenix-4.1.0.jar its not there.
... View more
Labels:
06-08-2018
03:31 PM
found the issue .. the phoenix view should have the same name as the HBASE table .. Phoenix document does not state this
... View more
06-08-2018
03:17 PM
I have a HBASE table as follows with 1000 rows , if I try to create a view on this from phoenix I get " ERROR 505 (42000): Table is read only" error if I create a table instead of a view it creates the table but I see no rows there . hbase(main):001:0> describe 'UFM'
Table UFM is ENABLED
UFM
COLUMN FAMILIES DESCRIPTION
{NAME => 'EXLIST', BLOOMFILTER => 'ROW', VERSIONS => '1', IN_MEMORY => 'false', KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'NONE', TTL => 'FOREVER', COM
PRESSION => 'NONE', MIN_VERSIONS => '0', BLOCKCACHE => 'true', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'}
{NAME => 'F1', BLOOMFILTER => 'ROW', VERSIONS => '1', IN_MEMORY => 'false', KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'NONE', TTL => 'FOREVER', COMPRES
SION => 'NONE', MIN_VERSIONS => '0', BLOCKCACHE => 'true', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'}
2 row(s) in 0.3070 seconds
I create the phoenix view as follows : CREATE VIEW "UFM_PHX" (
UFMID VARCHAR PRIMARY KEY,
"EXLIST"."LIST1" varchar,
"EXLIST"."LIST2" varchar,
"EXLIST"."LIST3" varchar,
"EXLIST"."LIST4" varchar,
"EXLIST"."LIST5" varchar,
"EXLIST"."LIST6" varchar,
"EXLIST"."LIST7" varchar,
"EXLIST"."LIST8" varchar,
"EXLIST"."LIST9" varchar,
"EXLIST"."LIST10" varchar,
"EXLIST"."LIST11" varchar,
"EXLIST"."LIST12" varchar,
"EXLIST"."LIST13" varchar,
"EXLIST"."LIST14" varchar,
"EXLIST"."LIST15" varchar,
"EXLIST"."LIST16" varchar,
"EXLIST"."LIST17" varchar,
"EXLIST"."LIST18" varchar,
"EXLIST"."LIST19" varchar,
"EXLIST"."LIST20" varchar,
"EXLIST"."LIST21" varchar,
"F1"."INSERT_TIME" date,
"F1"."LANEID" varchar,
"F1"."LANEUFMSEQNO" varchar,
"F1"."PLAZAID" varchar,
"F1"."TIPUFMSEQ" varchar,
"F1"."TIP_ID" varchar,
"F1"."TXNTM" date)
... View more
Labels:
06-08-2018
03:03 PM
hi Jay i am not using a package .. how do I compile ? # more RetriveData.java
import java.io.IOException;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.client.Get;
import org.apache.hadoop.hbase.client.HTable;
import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.util.Bytes;
public class RetriveData{
public static void main(String[] args) throws IOException, Exception{
// Instantiating Configuration class
Configuration config = HBaseConfiguration.create();
// Instantiating HTable class
HTable table = new HTable(config, "PUR_ACCT_PHX");
// Instantiating Get class
Get g = new Get(Bytes.toBytes("1001181"));
// Reading the data
Result result = table.get(g);
// Reading values from Result class object
byte [] value = result.getValue(Bytes.toBytes("cf1"),Bytes.toBytes("PUR_ID"));
byte [] value1 = result.getValue(Bytes.toBytes("cf1"),Bytes.toBytes("PUR_TRANS_DATE"));
// Printing the values
String purchaseID = Bytes.toString(value);
String purchaseDate = Bytes.toString(value1);
System.out.println("PURCASE ID: " + purchaseID + " PUR_TRANS_DATE: " + purchaseDate);
}
}
... View more
06-06-2018
08:54 PM
if I use that path then I get another error [root@hadoop1 ~]# java -classpath /usr/hdp/2.6.4.0-91/hbase/lib/*:. RetriveData
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/conf/Configuration
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
... View more