使用java jdbc连接到配置单元时出现org.apache.hadoop.ipc.remoteexception

ogsagwnx  于 2021-06-26  发布在  Hive
关注(0)|答案(0)|浏览(182)

我的hiveserver2已启动并运行。我正在尝试使用javajdbc连接到hive

Class.forName("org.apache.hive.jdbc.HiveDriver");
Connection con = DriverManager.getConnection("jdbc:hive2://localhost:10000/sample", "", "");

我面临以下例外

Exception in thread "main" org.apache.hive.service.cli.HiveSQLException: Failed to open new session: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: hduser is not allowed to impersonate anonymous

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题