The Altair Community is migrating to a new platform to provide a better experience for you. The RapidMiner Community will merge with the Altair Community at the same time. In preparation for the migration, both communities are on read-only mode from July 15th - July 24th, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here.
Options

Hive Test Connection Exception

jan_bauerjan_bauer Member Posts: 8 Contributor II
edited November 2018 in Help

Hello,

 

when i am trying to connect Radoop in a multi node cluster i get an error at the hive test.

We dont know where the error exactly came from. I attached the error. I hope someone can help us with this.

 

[Nov 15, 2016 9:39:58 PM]: Using Radoop version 7.2.0.
[Nov 15, 2016 9:39:58 PM]: Running tests: [Kerberos, Hive connection, Fetch dynamic settings, Java version, NameNode networking, DataNode networking, YARN services networking, HDFS, MapReduce, Radoop temporary directory, MapReduce staging directory, Spark staging directory, Spark assembly jar existence, UDF jar upload, Create permanent UDFs, HDFS upload, Radoop jar upload, Hive load data, Import job, SQL query (aggregation), Spark job, Hive export, Job kill, Mahout clustering job, Pig script, UDF query, Distributed Cache, UDAF query] [Nov 15, 2016 9:39:58 PM]: Running test 1/28: Kerberos [Nov 15, 2016 9:39:58 PM]: Supported algorithms: [AES128, ArcFourHmac, DESede] [Nov 15, 2016 9:39:58 PM]: Test succeeded: Kerberos (0.001s) [Nov 15, 2016 9:39:58 PM]: Running test 2/28: Hive connection [Nov 15, 2016 9:39:58 PM]: Hive server 2 connection (<ip-address>) test started.
[Nov 15, 2016 9:39:58 PM] SEVERE: Test failed: Hive connection
[Nov 15, 2016 9:39:58 PM]: Cleaning after test: Hive connection
[Nov 15, 2016 9:39:58 PM]: Cleaning after test: Kerberos [Nov 15, 2016 9:39:58 PM]: Total time: 0.769s
[Nov 15, 2016 9:39:58 PM]: com.rapidminer.operator.OperatorException: Error retrieving Hive object list. Please check your Hive server 2 connection settings.
 at eu.radoop.datahandler.hive.HiveHandler.getSimpleListFast(HiveHandler.java:2695)
 at eu.radoop.datahandler.hive.HiveHandler.getTableList(HiveHandler.java:2615)
 at eu.radoop.connections.service.test.connection.TestHiveConnection.call(TestHiveConnection.java:51)
 at eu.radoop.connections.service.test.connection.TestHiveConnection.call(TestHiveConnection.java:25)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 at java.lang.Thread.run(Thread.java:745)
Caused by: eu.radoop.exception.ConnectionException: Hive server 2 connection test failed. Please check that the server/daemon runs and is accessible on the address and port you specified.
 at eu.radoop.datahandler.hive.HiveHandler.initFastStatement(HiveHandler.java:731)
 at eu.radoop.datahandler.hive.HiveHandler.runFastQueryPrivilegedAction(HiveHandler.java:1134)
 at eu.radoop.datahandler.hive.HiveHandler.access$200(HiveHandler.java:117)
 at eu.radoop.datahandler.hive.HiveHandler$3.run(HiveHandler.java:1100)
 at eu.radoop.datahandler.hive.HiveHandler$3.run(HiveHandler.java:1096)
 at java.security.AccessController.doPrivileged(Native Method)
 at javax.security.auth.Subject.doAs(Subject.java:422)
 at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
 at eu.radoop.datahandler.hive.HiveHandler.runFastQuery(HiveHandler.java:1096)
 at eu.radoop.datahandler.hive.HiveHandler.getSimpleListFast(HiveHandler.java:2684)
 ... 7 more
Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:4 cannot recognize input near '<EOF>' '<EOF>' '<EOF>' in switch database statement
 at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:231)
 at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:217)
 at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:254)
 at eu.radoop.datahandler.hive.HiveHandler.executeStatement(HiveHandler.java:1024)
 at eu.radoop.datahandler.hive.HiveHandler.initFastStatement(HiveHandler.java:723)
 ... 16 more
Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:4 cannot recognize input near '<EOF>' '<EOF>' '<EOF>' in switch database statement
 at org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:315)
 at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:112)
 at org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:181)
 at org.apache.hive.service.cli.operation.Operation.run(Operation.java:257)
 at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:419)
 at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:406)
 at org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:276)
 at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:486)
 at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1317)
 at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1302)
 at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
 at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
 at org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge$Server$TUGIAssumingProcessor.process(HadoopThriftAuthBridge.java:562)
 at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:285)
 ... 3 more
Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.parse.ParseException:line 1:4 cannot recognize input near '<EOF>' '<EOF>' '<EOF>' in switch database statement
 at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:205)
 at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:166)
 at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:431)
 at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:316)
 at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1189)
 at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1183)
 at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:110)
 ... 15 more

[Nov 15, 2016 9:39:58 PM] SEVERE: OperatorException: Error retrieving Hive object list. Please check your Hive server 2 connection settings.
[Nov 15, 2016 9:39:58 PM] SEVERE: Hive server 2 connection test failed. Please check that the server/daemon runs and is accessible on the address and port you specified.

Tagged:

Best Answer

  • Options
    phellingerphellinger Employee, Member Posts: 103 RM Engineering
    Solution Accepted

    Hi,

     

    RapidMiner Radoop adds its own functions to the Hive database that is configured in the connection. It can only do it automatically, if it has the privileges to do so. Can you grant the CREATE FUNCTION privilege to the "rapidminer" user in this database?

     

    If you are using a cluster that has Apache Ranger (Hortonworks, IBM, etc. distribution), granting this permission on the Ranger Admin UI should be simple. However, if your cluster has Apache Sentry (Cloudera distribution), you may need to install the Hive User-defined Functions manually. Both cases are covered on this page:

    http://docs.rapidminer.com/radoop/installation/hadoop-security.html

     

     

    Best,

    Peter

Answers

  • Options
    phellingerphellinger Employee, Member Posts: 103 RM Engineering

    Hi,

     

    my guess is that the "Database Name" in the connection is empty.

    Can you please try to set it to "default" or any other name that exists in your Hive instance?

    (The error seems to report that an empty "USE " command is submitted instead of "USE <database_name>".)

     

    Best,

    Peter

  • Options
    jan_bauerjan_bauer Member Posts: 8 Contributor II

    We solved the problem but got now an error with a missing hive database. Can we just create one for the rapidminer user or do we have to use the default one?

    Error 10072: Database does not exist

  • Options
    phellingerphellinger Employee, Member Posts: 103 RM Engineering

    Hi,

     

    an arbitrary Hive database is required that Radoop can use. The user specified in the connection must have proper privileges in that database. Details may depend on what security configuration you have in Hive.

    Data that resides in other databases can also be used in processes, this is just a workspace or sandbox database for the software.

     

    Usually, the data someone wants to analyze with RapidMiner Radoop already resides on the cluster (HDFS, with the metadata defined in Hive). But for all scenaries, see the following guide in the documentation (after the connection test succeeds):

    http://docs.rapidminer.com/radoop/overview/import-guide.html

     

    Best,

    Peter

     

     

  • Options
    jan_bauerjan_bauer Member Posts: 8 Contributor II

    We are getting this error message:

     

    Error while compiling statement: FAILED: HiveAccessControlException Permission denied: Principal [name=rapidminer, type=USER] does not have following privileges for operation CREATEFUNCTION [[ADMIN PRIVILEGE] on Object [type=DATABASE, name=rapidminer], [ADMIN PRIVILEGE] on Object [type=DFS_URI, name=hdfs://<ip-address>:8020/tmp/radoop/_shared/db_rapidminer/radoop_hive-v3.jar], [ADMIN PRIVILEGE] on Object [type=FUNCTION, name=rapidminer.r3_pivot_createtable_v3]])

     

     

Sign In or Register to comment.