Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Error while running hive tpch: Exception in thread "main" java.lang.IllegalAccessError

avatar
Explorer

I am following the instructions to run hive tpch 

https://github.com/hortonworks/hive-testbench.git

 

 I am using Cloudera Enterprise Trial 7.3.1

 

I am running into following error. 

[root@test_mach hive-testbench]# ./tpch-setup.sh 3

+ '[' X3 = X ']'

+ '[' X = X ']'

+ DIR=/tmp/tpch-generate

+ '[' 3 -eq 1 ']'

+ hdfs dfs -mkdir -p /tmp/tpch-generate

+ hdfs dfs -ls /tmp/tpch-generate/3/lineitem

ls: `/tmp/tpch-generate/3/lineitem': No such file or directory

+ '[' 1 -ne 0 ']'

+ echo 'Generating data at scale factor 3.'

Generating data at scale factor 3.

+ cd tpch-gen

+ 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

1 ACCEPTED SOLUTION

avatar
Explorer

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>

 

View solution in original post

1 REPLY 1

avatar
Explorer

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>