运行 hive tpch-setup 时出错:java.lang.IllegalAccessError:类 org.apache.hadoop.hdfs.web.HftpFileSystem 无法访问其超级接口

发布于 2025-01-09 09:08:32 字数 3173 浏览 1 评论 0原文

我正在尝试按照 https://github.com/hortonworks/ 的指令运行 hive tpcdh hive-testbench.git 。我遇到了以下错误。 tpcds-setup 中未出现此问题。

这不适用于 CDP Trial 7.3.1、CDH 版本:Cloudera Enterprise 6.3.4,但适用于 Apache Ambari 版本 2.6.2.2

[tech_mach hive-testbench]# ./tpch-setup.sh 3
+ hadoop jar target/tpch-gen-1.0-SNAPSHOT.jar -d /tmp/tpch-generate/3/ -s 3
WARNING: Use "yarn jar" to launch YARN applications.
Exception in thread "main" java.lang.IllegalAccessError: class org.apache.hadoop.hdfs.web.HftpFileSystem cannot access its superinterface org.apache.hadoop.hdfs.web.TokenAspect$TokenManagementDelegator
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:370)
    at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
    at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
    at org.apache.hadoop.fs.FileSystem.loadFileSystems(FileSystem.java:3337)
    at org.apache.hadoop.fs.FileSystem.getFileSystemClass(FileSystem.java:3382)
    at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:3422)
    at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:158)
    at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:3485)
    at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:3453)
    at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:518)
    at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:266)
    at org.notmysock.tpch.GenTable.genInput(GenTable.java:171)
    at org.notmysock.tpch.GenTable.run(GenTable.java:98)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
    at org.notmysock.tpch.GenTable.main(GenTable.java:54)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.hadoop.util.RunJar.run(RunJar.java:318)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:232)
+ hdfs dfs -ls /tmp/tpch-generate/3/lineitem
ls: `/tmp/tpch-generate/3/lineitem': No such file or directory
+ '[' 1 -ne 0 ']'
+ echo 'Data generation failed, exiting.'
Data generation failed, exiting.
+ exit 1

I am trying to run hive tpcdh by following the instruction from https://github.com/hortonworks/hive-testbench.git . I am running into the following error. This issue is not seen for tpcds-setup.

This is not working on CDP Trial 7.3.1, CDH Version: Cloudera Enterprise 6.3.4 but working on Apache Ambari Version 2.6.2.2

[tech_mach hive-testbench]# ./tpch-setup.sh 3
+ hadoop jar target/tpch-gen-1.0-SNAPSHOT.jar -d /tmp/tpch-generate/3/ -s 3
WARNING: Use "yarn jar" to launch YARN applications.
Exception in thread "main" java.lang.IllegalAccessError: class org.apache.hadoop.hdfs.web.HftpFileSystem cannot access its superinterface org.apache.hadoop.hdfs.web.TokenAspect$TokenManagementDelegator
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:370)
    at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
    at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
    at org.apache.hadoop.fs.FileSystem.loadFileSystems(FileSystem.java:3337)
    at org.apache.hadoop.fs.FileSystem.getFileSystemClass(FileSystem.java:3382)
    at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:3422)
    at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:158)
    at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:3485)
    at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:3453)
    at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:518)
    at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:266)
    at org.notmysock.tpch.GenTable.genInput(GenTable.java:171)
    at org.notmysock.tpch.GenTable.run(GenTable.java:98)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
    at org.notmysock.tpch.GenTable.main(GenTable.java:54)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.hadoop.util.RunJar.run(RunJar.java:318)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:232)
+ hdfs dfs -ls /tmp/tpch-generate/3/lineitem
ls: `/tmp/tpch-generate/3/lineitem': No such file or directory
+ '[' 1 -ne 0 ']'
+ echo 'Data generation failed, exiting.'
Data generation failed, exiting.
+ exit 1

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

温暖的光 2025-01-16 09:08:32

在 hive-testbench/tpch-gen/pom.xml 中,更改了 hadoop 版本,问题得到解决

<dependencies>
  <dependency>
    <groupId>org.apache.hadoop</groupId>
    <artifactId>hadoop-client</artifactId>
    <version>2.4.0</version>
    <scope>compile</scope>
  </dependency>
 ```

In hive-testbench/tpch-gen/pom.xml, changed the hadoop version and the issue got resolved

<dependencies>
  <dependency>
    <groupId>org.apache.hadoop</groupId>
    <artifactId>hadoop-client</artifactId>
    <version>2.4.0</version>
    <scope>compile</scope>
  </dependency>
 ```
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文