camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject camel git commit: CAMEL-10948: Camel-hdfs2: initialDelay option is overwritten with default value
Date Mon, 06 Mar 2017 12:22:51 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.17.x 9d4789c57 -> 5aa518ef6


CAMEL-10948: Camel-hdfs2: initialDelay option is overwritten with default value


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

Branch: refs/heads/camel-2.17.x
Commit: 5aa518ef6872e4768e96b12cd1155e666489e461
Parents: 9d4789c
Author: Andrea Cosentino <ancosen@gmail.com>
Authored: Mon Mar 6 12:59:10 2017 +0100
Committer: Andrea Cosentino <ancosen@gmail.com>
Committed: Mon Mar 6 13:22:15 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/camel/component/hdfs2/HdfsConfiguration.java | 4 ++--
 .../main/java/org/apache/camel/component/hdfs2/HdfsConsumer.java | 2 ++
 .../main/java/org/apache/camel/component/hdfs2/HdfsEndpoint.java | 1 +
 3 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/5aa518ef/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsConfiguration.java
b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsConfiguration.java
index 01b5680..d785f34 100644
--- a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsConfiguration.java
+++ b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsConfiguration.java
@@ -70,8 +70,8 @@ public class HdfsConfiguration {
     private String openedSuffix = HdfsConstants.DEFAULT_OPENED_SUFFIX;
     @UriParam(defaultValue = HdfsConstants.DEFAULT_READ_SUFFIX)
     private String readSuffix = HdfsConstants.DEFAULT_READ_SUFFIX;
-    @UriParam(label = "consumer")
-    private long initialDelay;
+    @UriParam(label = "consumer", defaultValue = "" + HdfsConsumer.DEFAULT_CONSUMER_INITIAL_DELAY)
+    private long initialDelay = HdfsConsumer.DEFAULT_CONSUMER_INITIAL_DELAY;
     @UriParam(label = "consumer", defaultValue = "" + HdfsConstants.DEFAULT_DELAY)
     private long delay = HdfsConstants.DEFAULT_DELAY;
     @UriParam(label = "consumer", defaultValue = HdfsConstants.DEFAULT_PATTERN)

http://git-wip-us.apache.org/repos/asf/camel/blob/5aa518ef/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsConsumer.java
b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsConsumer.java
index 395f00b..8bb17b8 100644
--- a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsConsumer.java
+++ b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsConsumer.java
@@ -40,6 +40,8 @@ public final class HdfsConsumer extends ScheduledPollConsumer {
     private final Processor processor;
     private final ReadWriteLock rwlock = new ReentrantReadWriteLock();
     private volatile HdfsInputStream istream;
+    
+    public static final long DEFAULT_CONSUMER_INITIAL_DELAY = 10 * 1000L;
 
     public HdfsConsumer(HdfsEndpoint endpoint, Processor processor, HdfsConfiguration config)
{
         super(endpoint, processor);

http://git-wip-us.apache.org/repos/asf/camel/blob/5aa518ef/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsEndpoint.java
b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsEndpoint.java
index baecdcc..3e9d81d 100644
--- a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsEndpoint.java
+++ b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsEndpoint.java
@@ -41,6 +41,7 @@ public class HdfsEndpoint extends ScheduledPollEndpoint {
         super(endpointUri, context);
         this.config = new HdfsConfiguration();
         this.config.parseURI(new URI(endpointUri));
+        setInitialDelay(HdfsConsumer.DEFAULT_CONSUMER_INITIAL_DELAY);
     }
 
     @Override


Mime
View raw message