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

Aaron T. Myers commented on HADOOP-6671:
----------------------------------------

I've figured out the issue. {{UserGroupInformation.createUserForTesting(...)}} 
replaces {{UserGroupInformation}}'s static reference to {{groups}} with an 
instance of {{TestingGroups}}. Once this occurs in a JVM, no subsequent calls 
to {{UserGroupInformation.getGroupNames(...)}} will work for any real users on 
the system. The test case in question compares the groups of the real user 
running the tests with the groups of that same user as determined by the 
{{UserGroupInformation}} class.

The explanation for why this fails under maven when run as part of the suite, 
but not under maven when run in isolation or under ant is that those must run 
the test cases in different orders.

The solution is that tests which call {{createUserForTesting}} should reset the 
static reference when they complete. I can work on a patch for this. 
Tom/Alejandro - do you think this should be done as a separate JIRA? Or part of 
this one?

> To use maven for hadoop common builds
> -------------------------------------
>
>                 Key: HADOOP-6671
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6671
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: build
>    Affects Versions: 0.22.0
>            Reporter: Giridharan Kesavan
>            Assignee: Alejandro Abdelnur
>         Attachments: HADOOP-6671-cross-project-HDFS.patch, 
> HADOOP-6671-e.patch, HADOOP-6671-f.patch, HADOOP-6671-g.patch, 
> HADOOP-6671.patch, HADOOP-6671b.patch, HADOOP-6671c.patch, 
> HADOOP-6671d.patch, build.png, hadoop-commons-maven.patch, mvn-layout-e.sh, 
> mvn-layout-f.sh, mvn-layout.sh, mvn-layout.sh, mvn-layout2.sh, mvn-layout2.sh
>
>
> We are now able to publish hadoop artifacts to the maven repo successfully [ 
> Hadoop-6382]
> Drawbacks with the current approach:
> * Use ivy for dependency management with ivy.xml
> * Use maven-ant-task for artifact publishing to the maven repository
> * pom files are not generated dynamically 
> To address this I propose we use maven to build hadoop-common, which would 
> help us to manage dependencies, publish artifacts and have one single xml 
> file(POM) for dependency management and artifact publishing.
> I would like to have a branch created to work on mavenizing  hadoop common.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to