camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [1/2] git commit: CAMEL-7264 Added file path header when HDFS consumer pull the message
Date Wed, 05 Mar 2014 03:23:23 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.11.x 5d183c825 -> d26d7c52f
  refs/heads/camel-2.12.x 90daf3818 -> 6c5d4cc69


CAMEL-7264 Added file path header when HDFS consumer pull the message


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

Branch: refs/heads/camel-2.12.x
Commit: 6c5d4cc692ffb5589c66c76600a2f1089711b283
Parents: 90daf38
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Wed Mar 5 11:16:12 2014 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Wed Mar 5 11:22:11 2014 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/camel/component/hdfs/HdfsConsumer.java | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/6c5d4cc6/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsConsumer.java
b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsConsumer.java
index 84c7e92..2c78740 100644
--- a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsConsumer.java
+++ b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsConsumer.java
@@ -138,6 +138,7 @@ public final class HdfsConsumer extends ScheduledPollConsumer {
                     Message message = new DefaultMessage();
                     String fileName = StringUtils.substringAfterLast(status.getPath().toString(),
"/");
                     message.setHeader(Exchange.FILE_NAME, fileName);
+                    message.setHeader(Exchange.FILE_PATH, status.getPath().toString());
                     if (key.value != null) {
                         message.setHeader(HdfsHeader.KEY.name(), key.value);
                     }


Mime
View raw message