apache/camel — pull request #110 by grgrzybek (2014-03-12 09:11:45+00:00)
Title: [CAMEL-7249] camel-hdfs2 component

Finally I've managed to adapt camel-hdfs component to work with hadoop-2.3.0 libraries.
Thanks to Jean-Baptiste Onofré for providing hadoop-client-2.3.0 OSGi bundle. It'd be hard to use OSGi bundle per hadoop-*.jar artifact because of split packages. So aggregate `hadoop-client` is ok.

Information:
* Generally camel-hdfs2 component is repackaged version of camel-hdfs component with Maven dependencies switched to hadoop-common:2.3.0 and hadoop-hdfs:2.3.0
* Some deprecated API usage was replaced by 2.3.0 equivalents
* This component works in OSGi environment (e.g., inside Apache Karaf) both as classic bundle and blueprint definition
* There are some quirks related to OSGi:
* - Hadoop uses `java.util.ServiceLocator` to find filesystem implementations, so some static code initialization must be performed to replace this mechanism (works both in pure OSGi and Blueprint container)
* - `Import-Package` is not just a list generated by *maven-bundle-plugin* - it must be adjusted to contain all packages reachable by reflection (e.g. `org.apache.hadoop.hdfs*`)
* - I didn't touch some bundle versions in parent POM and instead I used hardcoded versions for example in AVRO in `platforms/karaf/features/src/main/resources/features.xml`, as the one used in parent POM requires OSGi package `sun.misc`
* - I had to tweak `org.osgi.framework.system.packages.extra` property in `camel-itest-osgi/**/itest/karaf/config.properties` to contain Xerces packages
* The documentation must be added for new component