You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2017/10/18 06:23:23 UTC
[1/2] camel git commit: CAMEL-11920: camel-hdfs2 not working in osgi
using documented HdfsOsgiHelper
Repository: camel
Updated Branches:
refs/heads/camel-2.20.x a9a289d28 -> fd32e1cb8
CAMEL-11920: camel-hdfs2 not working in osgi using documented HdfsOsgiHelper
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1da22b26
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1da22b26
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1da22b26
Branch: refs/heads/camel-2.20.x
Commit: 1da22b26cd67750dd6bcbea1d4e0ce762b3b5215
Parents: a9a289d
Author: Andrea Tarocchi <at...@redhat.com>
Authored: Tue Oct 17 19:11:40 2017 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Wed Oct 18 08:18:31 2017 +0200
----------------------------------------------------------------------
components/camel-hdfs2/pom.xml | 4 +++-
.../java/org/apache/camel/component/hdfs2/HdfsOsgiHelper.java | 6 +++++-
2 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/1da22b26/components/camel-hdfs2/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-hdfs2/pom.xml b/components/camel-hdfs2/pom.xml
index 8bcee5a..dd53600 100644
--- a/components/camel-hdfs2/pom.xml
+++ b/components/camel-hdfs2/pom.xml
@@ -44,7 +44,9 @@
org.apache.hadoop.hdfs.security.token.delegation,
org.apache.hadoop.hdfs.protocol,
org.apache.hadoop.hdfs.protocol.proto,
- org.apache.hadoop.hdfs.protocol.datatransfer
+ org.apache.hadoop.hdfs.protocol.datatransfer,
+ org.apache.hadoop.net,
+ org.apache.hadoop.ipc
</camel.osgi.import.additional>
<camel.osgi.activator>
org.apache.camel.component.hdfs2.osgi.HdfsActivator
http://git-wip-us.apache.org/repos/asf/camel/blob/1da22b26/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsOsgiHelper.java
----------------------------------------------------------------------
diff --git a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsOsgiHelper.java b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsOsgiHelper.java
index 5077fbd..d63a592 100644
--- a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsOsgiHelper.java
+++ b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsOsgiHelper.java
@@ -41,13 +41,17 @@ public class HdfsOsgiHelper {
// get bundle classloader for camel-hdfs2 bundle
ClassLoader cl = getClass().getClassLoader();
Configuration conf = new Configuration();
+ // set that as the hdfs configuration's classloader
+ conf.setClassLoader(cl);
for (String key : fileSystems.keySet()) {
URI uri = URI.create(key);
conf.setClass(String.format("fs.%s.impl", uri.getScheme()), cl.loadClass(fileSystems.get(key)), FileSystem.class);
+ LOG.debug("Successfully loaded class: {}", fileSystems.get(key) );
FileSystem.get(uri, conf);
+ LOG.debug("Successfully got uri: {} from FileSystem Object", uri );
}
} catch (Exception e) {
- LOG.debug(e.getMessage());
+ LOG.debug(e.getMessage(), e);
}
}
[2/2] camel git commit: Fixed CS
Posted by ac...@apache.org.
Fixed CS
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/fd32e1cb
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/fd32e1cb
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/fd32e1cb
Branch: refs/heads/camel-2.20.x
Commit: fd32e1cb8a0de65a0852ac77281fa5afd3164e91
Parents: 1da22b2
Author: Andrea Cosentino <an...@gmail.com>
Authored: Wed Oct 18 08:18:04 2017 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Wed Oct 18 08:18:40 2017 +0200
----------------------------------------------------------------------
.../java/org/apache/camel/component/hdfs2/HdfsOsgiHelper.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/fd32e1cb/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsOsgiHelper.java
----------------------------------------------------------------------
diff --git a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsOsgiHelper.java b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsOsgiHelper.java
index d63a592..2373408 100644
--- a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsOsgiHelper.java
+++ b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsOsgiHelper.java
@@ -46,9 +46,9 @@ public class HdfsOsgiHelper {
for (String key : fileSystems.keySet()) {
URI uri = URI.create(key);
conf.setClass(String.format("fs.%s.impl", uri.getScheme()), cl.loadClass(fileSystems.get(key)), FileSystem.class);
- LOG.debug("Successfully loaded class: {}", fileSystems.get(key) );
+ LOG.debug("Successfully loaded class: {}", fileSystems.get(key));
FileSystem.get(uri, conf);
- LOG.debug("Successfully got uri: {} from FileSystem Object", uri );
+ LOG.debug("Successfully got uri: {} from FileSystem Object", uri);
}
} catch (Exception e) {
LOG.debug(e.getMessage(), e);