[ 
https://issues.apache.org/jira/browse/OOZIE-1806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13990074#comment-13990074
 ] 

Rohini Palaniswamy commented on OOZIE-1806:
-------------------------------------------

addToCache() does a lot of checks and processing and is not required in this 
case. Can you just replace DistributedCache.addFileToClassPath with a utility 
class method addFileToClassPath() in JobUtils.java that has below code? 

{code}
// Hadoop 0.20/1.x.
                    Configuration defaultConf = new Configuration();
                    XConfiguration.copy(conf, defaultConf);
                    DistributedCache.addFileToClassPath(file, defaultConf);
                    if (defaultConf.get("mapred.job.classpath.files") != null) {
                        // Duplicate hadoop 1.x code to workaround 
MAPREDUCE-2361 in Hadoop 0.20
                        // Refer OOZIE-1806.
                        String filepath = file.toUri().getPath();
                        String classpath = 
conf.get("mapred.job.classpath.files");
                        conf.set("mapred.job.classpath.files", classpath == null
                            ? filepath
                            : classpath + System.getProperty("path.separator") 
+ filepath);
                        URI uri = 
file.getFileSystem(defaultConf).makeQualified(file).toUri();
                        DistributedCache.addCacheFile(uri, conf);
                    }
                    else { // Hadoop 0.23/2.x
                        DistributedCache.addFileToClassPath(file, conf);
                    }
{code}

> Java Action type jobs are failing with hadoop-0.20.0 and earlier versions on 
> oozie trunk
> ----------------------------------------------------------------------------------------
>
>                 Key: OOZIE-1806
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1806
>             Project: Oozie
>          Issue Type: Bug
>    Affects Versions: 4.1.0
>            Reporter: Satish Mittal
>            Assignee: Satish Mittal
>            Priority: Blocker
>             Fix For: 4.1.0
>
>         Attachments: OOZIE-1806.patch.1.txt, OOZIE-1806.patch.txt
>
>
> With oozie trunk, all java action type jobs are failing with hadoop 0.20.2 
> and earlier versions. This is a regression since oozie 4.0. The map tasks are 
> failing with ClassNotFoundException for OozieLauncherInputFormat.EmptySplit 
> class.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to