Member since
04-22-2016
931
Posts
46
Kudos Received
26
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 1855 | 10-11-2018 01:38 AM | |
| 2217 | 09-26-2018 02:24 AM | |
| 2246 | 06-29-2018 02:35 PM | |
| 2923 | 06-29-2018 02:34 PM | |
| 6100 | 06-20-2018 04:30 PM |
07-07-2017
04:54 PM
I am running pig with -useHCatalog option but getting the following errors : [hdfs@hadoop1 pig]$ pig -useHCatalog
ls: cannot access /usr/hdp/2.5.3.0-37/hive/lib/slf4j-api-*.jar: No such file or directory
ls: cannot access /usr/hdp/2.5.3.0-37/hive-hcatalog/lib/*hbase-storage-handler-*.jar: No such file or directory
... View more
Labels:
07-06-2017
02:53 PM
I have installed the pig service but in the views I don't see any pig view? ambari version is 2.5.1.0. please see the attached screenshot of all the views.capture.jpg I did follow the steps as per link below https://docs.hortonworks.com/HDPDocuments/Ambari-2.5.0.3/bk_ambari-views/content/setup_HDFS_user_directory_pig_view.html [root@hadoop1 ~]# pig -i
Apache Pig version 0.16.0.2.5.3.0-37 (rexported)
compiled Nov 30 2016, 02:28:11
... View more
Labels:
07-06-2017
02:18 PM
but I said I used port 10000 and its not working either what other reasons could be for this error ?
... View more
07-05-2017
08:00 PM
hi Jay I saw a post on this site advising to use this port since that's the port thrift hive server is using , I tried both , 10000 and 10001 but both fails with connection refused.
... View more
07-05-2017
07:43 PM
hi Jay hostname -f gives hadoop2.tolls.dot.state.fl.us and telnet works fine to this FQDN also from hadoop1 [hdfs@hadoop1 ~]$ telnet hadoop2.tolls.dot.state.fl.us 10000
Trying 10.100.44.16...
Connected to hadoop2.tolls.dot.state.fl.us.
Escape character is '^]'.
^]
telnet> quit
[hdfs@hadoop1 ~]$
... View more
07-05-2017
07:30 PM
I am running the hive jdbc example with the following connect line : Connection con = DriverManager.getConnection("jdbc:hive2://hadoop2.tolls.dot.state.fl.us:10001/default", "", ""); it compiles fine but on run time I get this error : [hdfs@hadoop1 ~]$ java -cp .:$HADOOP_CLASSPATH:/usr/hdp/2.5.3.0-37/* HiveAlterRenameTo
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
Exception in thread "main" java.sql.SQLException: Could not open client transport with JDBC Uri: jdbc:hive2://hadoop2.tolls.dot.state.fl.us:10001/default: java.net.ConnectException: Connection refused (Connection refused)
at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:209)
at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107)
here is what I have already tried : 1- changed port from 10000 to 10001 2- checked if port is listening and if FW is not blocking it . port is up and listening and not blocked from the client. [root@hadoop2 hive]# netstat -tnlpa | grep 10000
tcp 0 0 0.0.0.0:10000 0.0.0.0:* LISTEN 723/java
tcp 0 0 10.100.44.16:33288 10.100.44.16:10000 TIME_WAIT -
[root@hadoop2 hive]#
... 8 more
[hdfs@hadoop1 ~]$ telnet hadoop2 10000
Trying 10.100.44.16...
Connected to hadoop2.
Escape character is '^]'.
^]
telnet>
... View more
Labels:
07-05-2017
07:05 PM
still getting connection refused , I also tried port 10001 but same result.
my hive2 server is running on hadoop2 so I changed the line as below . I tried both ports 10000 and 10001 with same results. // get connection
Connection con = DriverManager.getConnection("jdbc:hive2://hadoop2:10001/default", "", "");
... View more
07-05-2017
06:51 PM
ok I tried including all the hive2 and hadoop jar directories and it fixed the issue but now I am getting connection refused , please advise $ HADOOP_CLASSPATH=/usr/hdp/2.5.3.0-37/hive2/lib/*:/usr/hdp/2.5.3.0-37/hadoop/*:/usr/hdp/2.5.3.0-37/hadoop-mapreduce/*
$ export HADOOP_CLASSPATH
[hdfs@hadoop1 ~]$ java -cp .:$HADOOP_CLASSPATH:/usr/hdp/2.5.3.0-37/* HiveAlterRenameTo
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
Exception in thread "main" java.sql.SQLException: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000/default: java.net.ConnectException: Connection refused (Connection refused)
at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:209)
... View more
07-05-2017
06:11 PM
thanks ! I did the first change you asked and it compiled but now its failing when I run it . I changed "hive" to "hive2" but getting the error : [hdfs@hadoop1 ~]$ grep hive2 HiveAlterRenameTo.java
Connection con = DriverManager.getConnection("jdbc:hive2://localhost:10000/default", "", "");
[hdfs@hadoop1 ~
[hdfs@hadoop1 ~]$ java -cp .:$HADOOP_CLASSPATH:/usr/hdp/2.5.3.0-37/hive2/lib/* HiveAlterRenameTo
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/conf/Configuration
at org.apache.hive.jdbc.HiveConnection.createUnderlyingTransport(HiveConnection.java:418)
at org.apache.hive.jdbc.HiveConnection.createBinaryTransport(HiveConnection.java:438)
at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:225)
at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:182)
at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at HiveAlterRenameTo.main(HiveAlterRenameTo.java:16)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.conf.Configuration
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 8 more
... View more
07-05-2017
06:01 PM
I posted this question before but got no response . I am unable to compile this java code even though I am specifiying the right jars . please advise [hdfs@hadoop1 ~]$ HADOOP_CLASSPATH=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-0.b15.el6_8.x86_64/lib/tools.jar
[hdfs@hadoop1 ~]$ export HADOOP_CLASSPATH
[hdfs@hadoop1 ~]$ javac -cp $HADOOP_CLASSPATH:/usr/hdp/2.5.3.0-37/hive2/lib/* HiveAlterRenameTo.java
HiveAlterRenameTo.java:13: error: unreported exception ClassNotFoundException; must be caught or declared to be thrown
Class.forName(driverName);
^
1 error
[hdfs@hadoop1 ~]$ more HiveAlterRenameTo.java
import java.sql.SQLException;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.sql.DriverManager;
public class HiveAlterRenameTo {
private static String driverName = "org.apache.hive.jdbc.HiveDriver";
public static void main(String[] args) throws SQLException {
// Register driver and create driver instance
Class.forName(driverName);
// get connection
Connection con = DriverManager.getConnection("jdbc:hive://localhost:10000/default", "", "");
// create statement
Statement stmt = con.createStatement();
// execute statement
stmt.executeQuery("ALTER TABLE PA_LANE_TXN_ORC RENAME TO PA_LANE_TXN;");
System.out.println("Table Renamed Successfully");
con.close();
}
}
... View more
Labels: