[
https://issues.apache.org/jira/browse/MAPREDUCE-4498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Kanter updated MAPREDUCE-4498:
-------------------------------------
Attachment: MAPREDUCE-4498-v2.patch
Alejandro and I tried to modify the example to use reflection to pick up the
hsql jar from the -libjars argument, but that just caused it to fail in the
DBInputFormat because DriverManager tries to instantiate the JDBC driver from
the bootstrap classloader (-libjars is a different classloader). This approach
also made the example's code unnecessarily complicated because of all of the
reflection.
Instead, we left the example's code alone, but moved the hsqldb 2.x jar out of
the mapred/lib/ dir of the TAR and into a new mapred/lib-examples/ dir. Then
to run the DBCountPageView example, you would do:
{noformat}
$ export HADOOP_CLASSPATH=share/hadoop/mapreduce/lib-examples/hsqldb-2.0.0.jar
$ bin/hadoop jar
share/hadoop/mapreduce/hadoop-mapreduce-examples-3.0.0-SNAPSHOT.jar dbcount
-libjars share/hadoop/mapreduce/lib-examples/hsqldb-2.0.0.jar
{noformat}
> Remove hsqldb jar from Hadoop runtime classpath
> -----------------------------------------------
>
> Key: MAPREDUCE-4498
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-4498
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Components: build, examples
> Affects Versions: 2.2.0-alpha
> Reporter: Robert Kanter
> Assignee: Robert Kanter
> Priority: Critical
> Fix For: 2.2.0-alpha
>
> Attachments: MAPREDUCE-4498-v2.patch, MAPREDUCE-4498.patch
>
>
> The hsqldb jar is included in hadoop for the DBCountPageView example only.
> Currently the example is using hsqldb version 2.x; however, 2.x is
> incompatible with 1.8.x -- having this jar in the hadoop class path conflicts
> with dependent projects like Oozie, Hive, and Pig which still use 1.8.x. As
> there are no features hsqldb 2.x that are used by the example, we should
> remove it from Hadoop's runtime classpath.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira