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

Raja Aluri commented on HADOOP-9008:
------------------------------------

+1 for the change. A minor nit, if you may choose to change,
I was wondering if the following code can eliminate some of the 'else' loops.
{code}
  def filter_func(tar_info):
    if tar_info.name == root:
      return tar_info
    elif tar_info.isfile() or tar_info.issym():
      if file_name_filter(basename(tar_info.name)):
        return tar_info
      else:
        return None
    else:
      return None
  return filter_func
{code}
I just thought the code will be more concise
{code}
  def filter_func(tar_info):
    if tar_info.name == root:
      return tar_info
    if tar_info.isfile() or tar_info.issym():
      if file_name_filter(basename(tar_info.name)):
        return tar_info
     return None
  return filter_func
{code}
                
> Building hadoop tarball fails on Windows
> ----------------------------------------
>
>                 Key: HADOOP-9008
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9008
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: trunk-win
>            Reporter: Ivan Mitic
>            Assignee: Chris Nauroth
>         Attachments: HADOOP-9008-branch-trunk-win.patch, 
> HADOOP-9008-branch-trunk-win.patch
>
>
> Trying to build Hadoop trunk tarball via {{mvn package -Pdist -DskipTests 
> -Dtar}} fails on Windows.
> Build system generates sh scripts that execute build tasks what does not work 
> on Windows without Cygwin. It might make sense to apply the same pattern as 
> in HADOOP-8924, and use python instead of sh.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to