[ 
https://issues.apache.org/jira/browse/MAPREDUCE-1901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12891812#action_12891812
 ] 

Arun C Murthy commented on MAPREDUCE-1901:
------------------------------------------

Joydeep - Maybe we are talking past each other, yet ...

The DistributedCache _already_ tracks mtimes for files. Each TT, via the 
DistributedCache, localizes the file based on <absolute-path-on-hdfs, mtime>.

This seems sufficient for the use case as I understand it.

Here is the flow:

Admin installs pig/hive on hdfs:
/share/hive/v1/hive.jar
/share/hive/v2/hive.jar

The pig/hive framework, in fact, any MR job then does:

JobConf job = new JobConf();
job.setRemoteJar(new Path("/share/hive/v1/hive.jar")
JobConf.submitJob(job);


That's it. The JobClient has the smarts to use 
DistributedCache.addArchiveToClassPath as the implementation of 
JobConf.setRemoteJar.

If you want a new version of hive.jar, you change hive to use 
/share/hive/v2/hive.jar.

What am I missing here?

> Jobs should not submit the same jar files over and over again
> -------------------------------------------------------------
>
>                 Key: MAPREDUCE-1901
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1901
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>            Reporter: Joydeep Sen Sarma
>         Attachments: 1901.PATCH
>
>
> Currently each Hadoop job uploads the required resources 
> (jars/files/archives) to a new location in HDFS. Map-reduce nodes involved in 
> executing this job would then download these resources into local disk.
> In an environment where most of the users are using a standard set of jars 
> and files (because they are using a framework like Hive/Pig) - the same jars 
> keep getting uploaded and downloaded repeatedly. The overhead of this 
> protocol (primarily in terms of end-user latency) is significant when:
> - the jobs are small (and conversantly - large in number)
> - Namenode is under load (meaning hdfs latencies are high and made worse, in 
> part, by this protocol)
> Hadoop should provide a way for jobs in a cooperative environment to not 
> submit the same files over and again. Identifying and caching execution 
> resources by a content signature (md5/sha) would be a good alternative to 
> have available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to