[
https://issues.apache.org/jira/browse/OOZIE-2845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15946797#comment-15946797
]
Peter Bacsko commented on OOZIE-2845:
-------------------------------------
{{-1 TESTS - patch does not compile, cannot run testcases}}
Looking at the build, this is not the case, everything is passed, but there
were problems during findbugs diff:
{code}
[TRACE] Downloading FindBugs diff JAR from
https://repo1.maven.org/maven2/me/andrz/findbugs/findbugs-diff/0.1.0/findbugs-diff-0.1.0-all.jar
[TRACE] FindBugs diff JAR downloaded
grep:
/home/jenkins/jenkins-slave/workspace/oozie-trunk-precommit-build/bin/findbugs-diff-0.1.0-all.jar.md5sum:
No such file or directory
[TRACE] FindBugs diff JAR checked, is safe to use
[TRACE] Performing FindBugs diffs
bin/test-patch-11-findbugs-diff: line 253: : No such file or directory
bin/test-patch-11-findbugs-diff: line 255: [: -le: unary operator expected
Exception in thread "main" groovy.lang.GroovyRuntimeException: Ambiguous method
overloading for method java.io.File#<init>.
Cannot resolve which method to invoke for [null] due to overlapping prototypes
between:
[class java.lang.String]
[class java.net.URI]
at
groovy.lang.MetaClassImpl.chooseMostSpecificParams(MetaClassImpl.java:3202)
at
groovy.lang.MetaClassImpl.chooseMethodInternal(MetaClassImpl.java:3154)
at groovy.lang.MetaClassImpl.chooseMethod(MetaClassImpl.java:3097)
at
groovy.lang.MetaClassImpl.createConstructorSite(MetaClassImpl.java:3384)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallConstructorSite(CallSiteArray.java:88)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
at
me.andrz.findbugs.diff.FindBugsDiff.diffFromFilePaths(FindBugsDiff.groovy:33)
at me.andrz.findbugs.diff.FindBugsDiff$diffFromFilePaths.call(Unknown
Source)
...
{code}
[~andras.piros] please take a look at this.
> Replace reflection-based code which sets variable in HiveConf
> -------------------------------------------------------------
>
> Key: OOZIE-2845
> URL: https://issues.apache.org/jira/browse/OOZIE-2845
> Project: Oozie
> Issue Type: Improvement
> Components: core
> Reporter: Peter Bacsko
> Assignee: Peter Bacsko
> Attachments: OOZIE-2845-001.patch
>
>
> In different places, we use the following reflection-based code to reset a
> variable inside {{HiveConf.java}}
> {code}
> public static void resetHiveConfStaticVariables() throws Exception {
> // HiveConf initializes location of hive-site.xml in static block.
> // So this is needed so that tests like TestHiveMain that create
> hive-site.xml don't fail.
> Field declaredField = HiveConf.class.getDeclaredField("hiveSiteURL");
> declaredField.setAccessible(true);
> declaredField.set(null,
> HiveConf.class.getClassLoader().getResource("hive-site.xml"));
> }
> {code}
> Note that HiveConf has supported setting {{hiveSiteURL}} for a long time.
> Even version 0.13.0 has the static setter method:
> https://github.com/apache/hive/blob/branch-0.13/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java#L1493-L1495
> Therefore reflection-based solution should be modified.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)