Wednesday, January 7, 2015

Oozie pig job fails with "Provider org.apache.hadoop.hdfs.HftpFileSystem$TokenManager not found"

Env:

MapR 4.0.0 or above.

Symptom:

Oozie pig job fails with below errors by running command "oozie job -log <jobID>":
Error starting action [pig-node]. ErrorType [TRANSIENT], ErrorCode [JA009], Message [JA009: java.util.ServiceConfigurationError: org.apache.hadoop.security.token.TokenRenewer: Provider org.apache.hadoop.hdfs.HftpFileSystem$TokenManager not found
        at java.util.ServiceLoader.fail(ServiceLoader.java:231)
        at java.util.ServiceLoader.access$300(ServiceLoader.java:181)
        at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:365)
        at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
        at org.apache.hadoop.security.token.Token.getRenewer(Token.java:350)
        at org.apache.hadoop.security.token.Token.isManaged(Token.java:366)
        at org.apache.hadoop.mapreduce.security.token.DelegationTokenRenewal.registerDelegationTokensForRenewal(DelegationTokenRenewal.java:185)
        at org.apache.hadoop.mapred.JobInProgress.<init>(JobInProgress.java:606)
        at org.apache.hadoop.mapred.JobTracker.submitJob(JobTracker.java:4461)
        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.hadoop.ipc.WritableRpcEngine$Server$WritableRpcInvoker.call(WritableRpcEngine.java:481)
        at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:928)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2000)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1996)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:415)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1469)
        at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1994)
]
Even sample oozie pig job fails in this case.

Root Cause:

For MapR 4.0.0 or above version, oozie pig job should use PIG JARs under sub-directory "pig-2" of share lib. For MapR versions earlier than 4.0.0, it should use the Pig JARs from the "pig" sub-directory of share lib.
In this case, the root cause is most likely that the PIG JARs are using wrong ones.

Solution:

1. On oozie node, identify the MapR-FS path of the share lib used by oozie.

Check "oozie.service.WorkflowAppService.system.libpath" from /opt/mapr/oozie/oozie-<version>/conf/oozie-site.xml.
By default:
    <property>
        <name>oozie.service.WorkflowAppService.system.libpath</name>
        <value>/oozie/share/lib</value>
        <description>
            System library path to use for workflow applications.
            This path is added to workflow application if their job properties sets
            the property 'oozie.use.system.libpath' to true.
        </description>
    </property>

2. Confirm if the PIG JARs exist in the "pig-2" sub-directory of share lib.

For example:

hadoop fs -ls /oozie/share/lib/pig-2

3. Add below configuration to the oozie job's workflow.xml and then push it on the expected HDFS path.


<property>
   <name>oozie.action.sharelib.for.pig</name>
   <value>pig-2</value>
</property>

4. Re-run the oozie example pig job to confirm it works fine.



No comments:

Post a Comment

Popular Posts