spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wanbo <gewa...@163.com>
Subject DoNotRetryIOException: IllegalAccessError
Date Tue, 17 Jun 2014 07:04:23 GMT
I use spark to access hbase data. The code below:

try {
	SparkConf conf = new SparkConf().setAppName("WordCountTest");
	JavaSparkContext sc = new JavaSparkContext(conf);
		
	String tableName = "test";

	Configuration hbConf = HBaseConfiguration.create();
	hbConf.set("hbase.zookeeper.quorum", "BJtest223");
	hbConf.set(TableInputFormat.INPUT_TABLE, tableName);
		
	HBaseAdmin admin = new HBaseAdmin(hbConf);
		
	if(!admin.isTableAvailable(tableName)){
		HTableDescriptor tableDesc = new
HTableDescriptor(TableName.valueOf(tableName));
		admin.createTable(tableDesc);
	}
			
	JavaPairRDD<ImmutableBytesWritable, Result> hbaseRDD = sc
					.newAPIHadoopRDD(hbConf, TableInputFormat.class,
							ImmutableBytesWritable.class, Result.class);

	System.out.println("------------------------------------------------");
	System.out.println("Count: " + hbaseRDD.count());
	System.out.println("------------------------------------------------");
			
	sc.stop();

} catch (Exception e) {
	throw e;
}

When I submit this job, it throws exceptions:

14/06/17 14:31:33 INFO zookeeper.ZooKeeper: Initiating client connection,
connectString=BJtest223:2181 sessionTimeout=90000
watcher=hconnection-0x415aa2b5, quorum=BJtest223:2181, baseZNode=/hbase
14/06/17 14:31:33 INFO zookeeper.RecoverableZooKeeper: Process
identifier=hconnection-0x415aa2b5 connecting to ZooKeeper
ensemble=BJtest223:2181
14/06/17 14:31:33 INFO zookeeper.ClientCnxn: Opening socket connection to
server BJtest223/172.27.10.223:2181. Will not attempt to authenticate using
SASL (unknown error)
14/06/17 14:31:33 INFO zookeeper.ClientCnxn: Socket connection established
to BJtest223/172.27.10.223:2181, initiating session
14/06/17 14:31:33 INFO zookeeper.ClientCnxn: Session establishment plete on
server BJtest223/172.27.10.223:2181, sessionid = 0x146a87b3ac10002,
negotiated timeout = 40000
Exception in thread "main" org.apache.hadoop.hbase.DoNotRetryIOException:
java.lang.IllegalAccessError: class .google.protobuf.HBaseZeroCopyByteString
cannot access its superclass .google.protobuf.LiteralByteString
        at
org.apache.hadoop.hbase.client.RpcRetryingCaller.translateException(RpcRetryingCaller.java:210)
        at
org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:121)
        at
org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:90)
        at
org.apache.hadoop.hbase.client.ClientScanner.nextScanner(ClientScanner.java:282)
        at
org.apache.hadoop.hbase.client.ClientScanner.initializeScannerInConstruction(ClientScanner.java:187)
        at
org.apache.hadoop.hbase.client.ClientScanner.<init>(ClientScanner.java:182)
        at
org.apache.hadoop.hbase.client.ClientScanner.<init>(ClientScanner.java:109)
        at org.apache.hadoop.hbase.client.HTable.getScanner(HTable.java:738)
        at
org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:178)
        at
org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:82)
        at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.isTableAvailable(HConnectionManager.java:963)
        at
org.apache.hadoop.hbase.client.HBaseAdmin.isTableAvailable(HBaseAdmin.java:1081)
        at
org.apache.hadoop.hbase.client.HBaseAdmin.isTableAvailable(HBaseAdmin.java:1089)
        at .ft.jobs.WordCount.main(WordCount.java:41)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at
org.apache.spark.deploy.SparkSubmit$.launch(SparkSubmit.scala:292)
        at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:55)
        at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Caused by: java.lang.IllegalAccessError: class
.google.protobuf.HBaseZeroCopyByteString cannot access its superclass
.google.protobuf.LiteralByteString
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:792)
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at
org.apache.hadoop.hbase.protobuf.RequestConverter.buildRegionSpecifier(RequestConverter.java:930)
        at
org.apache.hadoop.hbase.protobuf.RequestConverter.buildScanRequest(RequestConverter.java:434)
        at
org.apache.hadoop.hbase.client.ScannerCallable.openScanner(ScannerCallable.java:303)
        at
org.apache.hadoop.hbase.client.ScannerCallable.call(ScannerCallable.java:164)
        at
org.apache.hadoop.hbase.client.ScannerCallable.call(ScannerCallable.java:59)
        at
org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:114)
        ... 19 more







--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/DoNotRetryIOException-IllegalAccessError-tp7714.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

Mime
View raw message