[ 
https://issues.apache.org/jira/browse/HIVE-487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Todd Lipcon updated HIVE-487:
-----------------------------

    Attachment: hive-487.txt

Here's a patch which adds a project called "shims" with separate source 
directories for 0.17, 0.18, 0.19, and 0.20. Inside each there is an 
implementation of JettyShims and HadoopShims which encapsulate all of the 
version-dependent code. The build.xml is set in such a way that 
${hadoop.version} determines which one gets compiled.

This probably needs a bit more javadoc before it's commitable, but I think it's 
worth considering this approach over reflection.

Also, it seems like hadoop.version may be 0.18.0, 0.18.1, 0.18.2, etc. As long 
as it's kosher by Apache SVN standards, we should put a symlink for each of 
those versions in the shims/src/ directory pointing to 0.18, and same for the 
other minor releases. If symlinks aren't kosher, we need some way of parsing 
out the major version from within ant.

Not being a regular contributor, I don't have a good test environment set up, 
but I've verified that this at least builds in all of the above versions.

> Hive does not compile with Hadoop 0.20.0
> ----------------------------------------
>
>                 Key: HIVE-487
>                 URL: https://issues.apache.org/jira/browse/HIVE-487
>             Project: Hadoop Hive
>          Issue Type: Bug
>    Affects Versions: 0.3.0
>            Reporter: Aaron Kimball
>            Assignee: Justin Lynn
>             Fix For: 0.4.0
>
>         Attachments: dynamic-proxy.tar.gz, HIVE-487-2.patch, 
> hive-487-jetty-2.diff, hive-487-jetty.patch, hive-487.3.patch, 
> hive-487.4.patch, HIVE-487.patch, hive-487.txt, jetty-patch.patch, 
> junit-patch1.html
>
>
> Attempting to compile Hive with Hadoop 0.20.0 fails:
> aa...@jargon:~/src/ext/svn/hive-0.3.0$ ant -Dhadoop.version=0.20.0 package
> (several lines elided)
> compile:
>      [echo] Compiling: hive
>     [javac] Compiling 261 source files to 
> /home/aaron/src/ext/svn/hive-0.3.0/build/ql/classes
>     [javac] 
> /home/aaron/src/ext/svn/hive-0.3.0/build/ql/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java:94:
>  cannot find symbol
>     [javac] symbol  : method getCommandLineConfig()
>     [javac] location: class org.apache.hadoop.mapred.JobClient
>     [javac]       Configuration commandConf = 
> JobClient.getCommandLineConfig();
>     [javac]                                            ^
>     [javac] 
> /home/aaron/src/ext/svn/hive-0.3.0/build/ql/java/org/apache/hadoop/hive/ql/io/HiveInputFormat.java:241:
>  cannot find symbol
>     [javac] symbol  : method validateInput(org.apache.hadoop.mapred.JobConf)
>     [javac] location: interface org.apache.hadoop.mapred.InputFormat
>     [javac]       inputFormat.validateInput(newjob);
>     [javac]                  ^
>     [javac] Note: Some input files use or override a deprecated API.
>     [javac] Note: Recompile with -Xlint:deprecation for details.
>     [javac] Note: Some input files use unchecked or unsafe operations.
>     [javac] Note: Recompile with -Xlint:unchecked for details.
>     [javac] 2 errors
> BUILD FAILED
> /home/aaron/src/ext/svn/hive-0.3.0/build.xml:145: The following error 
> occurred while executing this line:
> /home/aaron/src/ext/svn/hive-0.3.0/ql/build.xml:135: Compile failed; see the 
> compiler error output for details.

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