Uploaded image for project: 'Samza'
  1. Samza
  2. SAMZA-780

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 0.10.0
    • Fix Version/s: None
    • Component/s: yarn
    • Labels:
      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

        Attachments

        1. SAMZA-780.patch
          1 kB
          Michael Martin

          Activity

            People

            • Assignee:
              anaerobic Michael Martin
              Reporter:
              anaerobic Michael Martin
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: