Tag Archives: Hive Error

Hive Error: root is not allowed to impersonate root (state=08S01,code=0)

Add the following content in Hadoop’s core-site.xml and restart

<property>
    <name>hadoop.proxyuser.root.groups</name>
    <value>root</value>
    <description>Allow the superuser oozie to impersonate any members of the group group1 and group2</description>
</property>


<property>
    <name>hadoop.proxyuser.root.hosts</name>
    <value>*</value>
    <description>The superuser can connect only from host1 and host2 to impersonate a user</description>
</property>

[Solved] Hive Error: java.sql.SQLException: No suitable driver found for jdbc:hive://localhost:10000/default

Error:

java.sql.SQLException: No suitable driver found for jdbc:hive://localhost:10000/default
    at java.sql.DriverManager.getConnection(DriverManager.java:596)
    at java.sql.DriverManager.getConnection(DriverManager.java:233)
    at demo.utils.JDBCUtils.getConnection(JDBCUtils.java:25)
    at demo.hive.HiveJDBCDemo.main(HiveJDBCDemo.java:16)
Exception in thread "main" java.lang.NullPointerException
    at demo.hive.HiveJDBCDemo.main(HiveJDBCDemo.java:18)

Solution:

url->change hive to hive2

before:

private static String driverString = "org.apache.hive.jdbc.HiveDriver";
private static String urlString = "jdbc:hive://localhost:10000/default";

after:

private static String driverString = "org.apache.hive.jdbc.HiveDriver";
private static String urlString = "jdbc:hive2://localhost:10000/default";

Hive Error: Error while compiling statement: FAILED: ParseException line 1:7 Failed to recognize

Execute hive SQL statement“   The error of “select out from XXX” is as follows:

Error: Error while compiling statement: FAILED: ParseException line 1:7 Failed to recognize predicate ‘out’. Failed rule: ‘identifier’ in table or column identifier (state=42000,code=40000)

My intention is to take out the value of the out field in my table. The bug in this sentence means that out is a reserved word. Although a column in my table is also called out, it can’t directly execute the select out field. It is modified as follows:
select  ` out`   from XXX

That is to say, put counter quotation marks on both sides of out to solve the problem~