Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
0.10.0
-
None
-
None
Description
When running a Samza job in Hadoop 2.6.0 against the latest source code I get the following error:
java version "1.8.0_60" Java(TM) SE Runtime Environment (build 1.8.0_60-b27) Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode) Exception in thread "Container Allocator Thread" java.lang.ClassCastException: org.apache.hadoop.security.token.Token cannot be cast to org.apache.hadoop.security.token.TokenIdentifier at org.apache.samza.job.yarn.ContainerUtil.startContainer(ContainerUtil.java:174) at org.apache.samza.job.yarn.ContainerUtil.runContainer(ContainerUtil.java:109) at org.apache.samza.job.yarn.ContainerAllocator.run(ContainerAllocator.java:66) at java.lang.Thread.run(Thread.java:745)
The offending line of code is attempting an invalid cast, and instead should be doing something like:
TokenIdentifier token = ((Token) iter.next()).decodeIdentifier();
See https://github.com/apache/hadoop/blob/release-2.6.0/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/Token.java for reference