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

Rodrigo Schmidt commented on MAPREDUCE-1579:
--------------------------------------------

Yes, that's exactly what I mean. The code looks much better with HarEntry.

Another thing I just noticed in your path is that you are calling checkSpace 
inside relPathToRoot() and outside it on writeTopLevelDirs(). 

I think it is better to check for spaces outside relPathToRoot() since checking 
for spaces is something that we would like to do in the beginning of the 
execution only (and relPathToRoot() is an auxiliary function we might want to 
use several times throughout the execution). 

If you agree with that, you can just remove checkSpace from inside 
relPathToRoot() and place it also after the relPathToRoot() call on method 
archive(). 

If you prefer to leave the checkSpace() call inside relPathToRoot(), then you 
can probably remove the checkSpace(relPath) call on writeTopLevelDirs().

> archive: check and possibly replace the space charater in paths
> ---------------------------------------------------------------
>
>                 Key: MAPREDUCE-1579
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1579
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: harchive
>            Reporter: Tsz Wo (Nicholas), SZE
>            Assignee: Mahadev konar
>         Attachments: m1579_20100310.patch
>
>
> Since the space character is used as a separator in the index files, it won't 
> work if there are spaces in the path (see also HADOOP-6591).  The archive 
> tools should 
> # detect if there are spaces in the paths and 
> # provide an option to replace it with some other characters.

-- 
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