Member since
04-22-2016
931
Posts
46
Kudos Received
26
Solutions
05-22-2019
07:21 PM
In installing hive if I use the driver that came with HDP the DB connection test fails , but if I use the older driver I have(don't know the version) the check succeeds . [root@hadoop1 resources]# pwd /var/lib/ambari-server/resources [root@hadoop1 resources]# ls -al mysql-connector-java.jar lrwxrwxrwx. 1 root root 64 May 22 14:56 mysql-connector-java.jar -> /var/lib/ambari-server/resources/mysql-connector-java-8.0.15.jar [root@hadoop1 resources]#
... View more
Labels:
- Labels:
-
Apache Hive
02-28-2019
07:29 PM
I am loading a phoenix table but in hbase this table row key is shown as hex values. how can I correct this to see the ASCII values ? that is the integer value
sqlline version 1.1.8
0: jdbc:phoenix:localhost:2181:/hbase-unsecur> SELECT * FROM EXAMPLE;
+--------+-------------+------------+
| MY_PK | FIRST_NAME | LAST_NAME |
+--------+-------------+------------+
| 12345 | John | Doe |
| 67890 | Mary | Jane |
+--------+-------------+------------+
2 rows selected (0.053 seconds)
Version 1.1.2.2.6.5.0-292, r897822d4dd5956ca186974c10382e9094683fa29, Fri May 11 08:01:42 UTC 2018
hbase(main):001:0> scan 'EXAMPLE'ROW COLUMN+CELL \x80\x00\x00\x00\x00\x0009 column=M:FIRST_NAME, timestamp=1551381906272, value=John \x80\x00\x00\x00\x00\x0009 column=M:LAST_NAME, timestamp=1551381906272, value=Doe \x80\x00\x00\x00\x00\x0009 column=M:_0, timestamp=1551381906272, value=x \x80\x00\x00\x00\x00\x01\x092 column=M:FIRST_NAME, timestamp=1551381906272, value=Mary \x80\x00\x00\x00\x00\x01\x092 column=M:LAST_NAME, timestamp=1551381906272, value=Jane \x80\x00\x00\x00\x00\x01\x092 column=M:_0, timestamp=1551381906272, value=x2 row(s) in 0.2030 seconds
... View more
Labels:
02-25-2019
08:55 PM
I have Hadoop classpath defined but when I use it as per documentation I am getting error [root@hadoop1 conf]# hadoop classpath
/usr/hdp/2.6.5.0-292/hadoop/conf:/usr/hdp/2.6.5.0-292/hadoop/lib/*:/usr/hdp/2.6.5.0-292/hadoop/.//*:/usr/hdp/2.6.5.0-292/hadoop-hdfs/./:/usr/hdp/2.6.5.0-292/hadoop-hdfs/lib/*:/usr/hdp/2.6.5.0-292/hadoop-hdfs/.//*:/usr/hdp/2.6.5.0-292/hadoop-yarn/lib/*:/usr/hdp/2.6.5.0-292/hadoop-yarn/.//*:/usr/hdp/2.6.5.0-292/hadoop-mapreduce/lib/*:/usr/hdp/2.6.5.0-292/hadoop-mapreduce/.//*:/usr/jdk64/jdk1.8.0_112/lib/tools.jar:mysql-connector-java-5.1.17.jar:mysql-connector-java.jar:ojdbc6.jar:/usr/hdp/2.6.5.0-292/tez/*:/usr/hdp/2.6.5.0-292/tez/lib/*:/usr/hdp/2.6.5.0-292/tez/conf
[root@hadoop1 conf]#
[root@hadoop1 conf]#
[root@hadoop1 conf]# echo $JAVA_HOME
/usr/jdk64/jdk1.8.0_112
[root@hadoop1 conf]#
[root@hadoop1 conf]# javac -cp `hadoop classpath` TestHbaseTable.java
TestHbaseTable.java:3: error: package org.apache.hadoop.hbase does not exist
import org.apache.hadoop.hbase.HBaseConfiguration;
^
TestHbaseTable.java:4: error: package org.apache.hadoop.hbase does not exist
import org.apache.hadoop.hbase.HColumnDescriptor;
^
TestHbaseTable.java:5: error: package org.apache.hadoop.hbase does not exist
import org.apache.hadoop.hbase.HTableDescriptor;
^
TestHbaseTable.java:6: error: package org.apache.hadoop.hbase.client does not exist
import org.apache.hadoop.hbase.client.HBaseAdmin;
^
TestHbaseTable.java:12: error: cannot find symbol
HBaseConfiguration hconfig = new HBaseConfiguration(new Configuration());
^
symbol: class HBaseConfiguration
location: class TestHbaseTable
TestHbaseTable.java:12: error: cannot find symbol
HBaseConfiguration hconfig = new HBaseConfiguration(new Configuration());
^
... View more
Labels:
- Labels:
-
Hortonworks Data Platform (HDP)
02-25-2019
04:52 PM
hi Josh how can I do it via 'get' command ? since we will be using java to get these rows
... View more
02-25-2019
04:05 PM
I can select a particular version from a table , but how can I select a range of versions ? e.g say I want to select all the rows from timestamp 1551108073557 to 1551108018724 ? hbase(main):005:0> scan 'PERSON',{NAME => 'student',VERSIONS => 5} ROW COLUMN+CELL r1 column=student:student_name, timestamp=1551108086986, value=John r1 column=student:student_name, timestamp=1551108073557, value=Mary r1 column=student:student_name, timestamp=1551108037609, value=Nancy r1 column=student:student_name, timestamp=1551108018724, value=Ram r1 column=student:student_name, timestamp=1551108002231, value=Sam 1 row(s) in 0.0190 seconds hbase(main):006:0> hbase(main):007:0* hbase(main):008:0* get 'PERSON','r1',{COLUMN => 'student', TIMESTAMP => 1551108018724} COLUMN CELL student:student_name timestamp=1551108018724, value=Ram
... View more
Labels: