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:22:57 UTC

[1/2] camel git commit: Fixed CS

Repository: camel
Updated Branches:
  refs/heads/camel-2.19.x 9d6bc075a -> 4a506b06b


Fixed CS


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4a506b06
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4a506b06
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4a506b06

Branch: refs/heads/camel-2.19.x
Commit: 4a506b06b2efe533a1908629b062907aea33b736
Parents: 337252c
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:22:43 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/4a506b06/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);


[2/2] camel git commit: CAMEL-11920: camel-hdfs2 not working in osgi using documented HdfsOsgiHelper

Posted by ac...@apache.org.
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/337252c5
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/337252c5
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/337252c5

Branch: refs/heads/camel-2.19.x
Commit: 337252c5e44d9e6f24c98a6bf93812da5b3829f7
Parents: 9d6bc07
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:22:43 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/337252c5/components/camel-hdfs2/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-hdfs2/pom.xml b/components/camel-hdfs2/pom.xml
index ca3705a..d54857d 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/337252c5/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);
         }
     }