hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vinod K V (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-6346) Add support for specifying unpack pattern regex to RunJar.unJar
Date Tue, 17 Nov 2009 05:37:39 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-6346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778734#action_12778734
] 

Vinod K V commented on HADOOP-6346:
-----------------------------------

bq. Are you suggesting opening up the jar with a new JarFile instance inside RunJar.main,
and then using the pattern to determine what strings to put on classpath? That seems not-quite-right
to me, since we want to unjar classes/*/.class, but only added classes/ to the classpath,
right?
hm.. I see the problem. But It's odd that we may not unjar "classes" directory depending on
the pattern but still put it on the classpath. May be we should only put the workDir and the
direct contents of it on the classpath? Thoughts? Any other ideas? Or leave the classpath
alone?

bq. What jar should I use to test this with? There are not currently any jars generated in
the build/test directory. I could either (a) add a new ant target to generate a test.jar with
some files in it, or (b) generate the test jar from within the test case using JarOutputStream.
Any preference which I do?
Two choices:
 - Either you can add dummy directories/files under {{src/test/mapred/testjar/}} and build
the jar(search for testjar in build.xml).
 - Or, (this is what I would do) build a jar yourselves using {{JarOutputStream}} inside the
test itself, and create entries(ZipEntries) corresponding to dirs/files you want RunJar to
unjar. Something similar is written for {{TestTaskTrackerLocalization.uploadJobJar()}}. After
building the jar, we can then call {{RunJar.unJar()}} and verify that only dirs that are specified
via the pattern are unjarred.

> Add support for specifying unpack pattern regex to RunJar.unJar
> ---------------------------------------------------------------
>
>                 Key: HADOOP-6346
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6346
>             Project: Hadoop Common
>          Issue Type: Task
>          Components: conf, util
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>             Fix For: 0.22.0
>
>         Attachments: hadoop-6346.txt, hadoop-6346.txt
>
>
> The changes in Common necessary for MAPREDUCE-967:
> - Adds support for Pattern types to Configuration (plus unit test)
> - Adds support to specify a Pattern to RunJar.unJar to decide which files get unpacked

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


Mime
View raw message