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-11724 - Camel-Hdfs2: No need for initialDelay and delay as configuration properties since they are already parameters of ScheduledPollConsumer
Date Tue, 29 Aug 2017 10:07:58 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.18.x 566599d9d -> 5f1488cdd


CAMEL-11724 - Camel-Hdfs2: No need for initialDelay and delay as configuration properties
since they are already parameters of ScheduledPollConsumer

Conflicts:
	components/camel-hdfs2/src/main/docs/hdfs2-component.adoc


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

Branch: refs/heads/camel-2.18.x
Commit: 5f1488cdd29da456b6d796c3306d1630408cc728
Parents: 566599d
Author: Andrea Cosentino <ancosen@gmail.com>
Authored: Tue Aug 29 12:03:01 2017 +0200
Committer: Andrea Cosentino <ancosen@gmail.com>
Committed: Tue Aug 29 12:07:28 2017 +0200

----------------------------------------------------------------------
 .../src/main/docs/hdfs2-component.adoc          |  6 ++---
 .../component/hdfs2/HdfsConfiguration.java      | 28 --------------------
 .../camel/component/hdfs2/HdfsConsumer.java     |  3 ---
 3 files changed, 2 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/5f1488cd/components/camel-hdfs2/src/main/docs/hdfs2-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-hdfs2/src/main/docs/hdfs2-component.adoc b/components/camel-hdfs2/src/main/docs/hdfs2-component.adoc
index 4db8de9..8ec7ad9 100644
--- a/components/camel-hdfs2/src/main/docs/hdfs2-component.adoc
+++ b/components/camel-hdfs2/src/main/docs/hdfs2-component.adoc
@@ -94,8 +94,6 @@ The HDFS2 component supports 41 endpoint options which are listed below:
 | owner | common |  | String | The file owner must match this owner for the consumer to pickup
the file. Otherwise the file is skipped.
 | valueType | common | BYTES | WritableType | The type for the key in case of sequence or
map files
 | bridgeErrorHandler | consumer | false | boolean | Allows for bridging the consumer to the
Camel routing Error Handler which mean any exceptions occurred while the consumer is trying
to pickup incoming messages or the likes will now be processed as a message and handled by
the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler
to deal with exceptions that will be logged at WARN/ERROR level and ignored.
-| delay | consumer | 1000 | long | The interval (milliseconds) between the directory scans.
-| initialDelay | consumer | 10000 | long | For the consumer how much to wait (milliseconds)
before to start scanning the directory.
 | pattern | consumer | * | String | The pattern used for scanning the directory
 | sendEmptyMessageWhenIdle | consumer | false | boolean | If the polling consumer did not
poll any files you can enable this option to send an empty message (no body) instead.
 | exceptionHandler | consumer (advanced) |  | ExceptionHandler | To let the consumer use
a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options
is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR
level and ignored.
@@ -117,7 +115,9 @@ The HDFS2 component supports 41 endpoint options which are listed below:
 | backoffErrorThreshold | scheduler |  | int | The number of subsequent error polls (failed
due some error) that should happen before the backoffMultipler should kick-in.
 | backoffIdleThreshold | scheduler |  | int | The number of subsequent idle polls that should
happen before the backoffMultipler should kick-in.
 | backoffMultiplier | scheduler |  | int | To let the scheduled polling consumer backoff
if there has been a number of subsequent idles/errors in a row. The multiplier is then the
number of polls that will be skipped before the next actual attempt is happening again. When
this option is in use then backoffIdleThreshold and/or backoffErrorThreshold must also be
configured.
+| delay | scheduler | 500 | long | Milliseconds before the next poll. You can also specify
time values using units such as 60s (60 seconds) 5m30s (5 minutes and 30 seconds) and 1h (1
hour).
 | greedy | scheduler | false | boolean | If greedy is enabled then the ScheduledPollConsumer
will run immediately again if the previous run polled 1 or more messages.
+| initialDelay | scheduler | 1000 | long | Milliseconds before the first poll starts. You
can also specify time values using units such as 60s (60 seconds) 5m30s (5 minutes and 30
seconds) and 1h (1 hour).
 | runLoggingLevel | scheduler | TRACE | LoggingLevel | The consumer logs a start/complete
log line when it polls. This option allows you to configure the logging level for that.
 | scheduledExecutorService | scheduler |  | ScheduledExecutorService | Allows for configuring
a custom/shared thread pool to use for the consumer. By default each consumer has its own
single threaded thread pool.
 | scheduler | scheduler | none | ScheduledPollConsumerScheduler | To use a cron scheduler
from either camel-spring or camel-quartz2 component
@@ -130,8 +130,6 @@ The HDFS2 component supports 41 endpoint options which are listed below:
 // endpoint options: END
 
 
-
-
 [[HDFS2-KeyTypeandValueType]]
 KeyType and ValueType
 +++++++++++++++++++++

http://git-wip-us.apache.org/repos/asf/camel/blob/5f1488cd/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 90020e3..82ae366 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,10 +70,6 @@ public class HdfsConfiguration {
     private String openedSuffix = HdfsConstants.DEFAULT_OPENED_SUFFIX;
     @UriParam(label = "advanced", defaultValue = HdfsConstants.DEFAULT_READ_SUFFIX)
     private String readSuffix = HdfsConstants.DEFAULT_READ_SUFFIX;
-    @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)
     private String pattern = HdfsConstants.DEFAULT_PATTERN;
     @UriParam(label = "advanced", defaultValue = "" + HdfsConstants.DEFAULT_BUFFERSIZE)
@@ -237,8 +233,6 @@ public class HdfsConfiguration {
         valueType = getWritableType(hdfsSettings, "valueType", valueType);
         openedSuffix = getString(hdfsSettings, "openedSuffix", openedSuffix);
         readSuffix = getString(hdfsSettings, "readSuffix", readSuffix);
-        initialDelay = getLong(hdfsSettings, "initialDelay", initialDelay);
-        delay = getLong(hdfsSettings, "delay", delay);
         pattern = getString(hdfsSettings, "pattern", pattern);
         chunkSize = getInteger(hdfsSettings, "chunkSize", chunkSize);
         splitStrategies = getSplitStrategies(hdfsSettings);
@@ -433,28 +427,6 @@ public class HdfsConfiguration {
     }
 
     /**
-     * For the consumer, how much to wait (milliseconds) before to start scanning the directory.
-     */
-    public void setInitialDelay(long initialDelay) {
-        this.initialDelay = initialDelay;
-    }
-
-    public long getInitialDelay() {
-        return initialDelay;
-    }
-
-    /**
-     * The interval (milliseconds) between the directory scans.
-     */
-    public void setDelay(long delay) {
-        this.delay = delay;
-    }
-
-    public long getDelay() {
-        return delay;
-    }
-
-    /**
      * The pattern used for scanning the directory
      */
     public void setPattern(String pattern) {

http://git-wip-us.apache.org/repos/asf/camel/blob/5f1488cd/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 3d5d8d4..1c65625 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
@@ -48,9 +48,6 @@ public final class HdfsConsumer extends ScheduledPollConsumer {
         this.config = config;
         this.hdfsPath = config.getFileSystemType().getHdfsPath(config);
         this.processor = processor;
-
-        setInitialDelay(config.getInitialDelay());
-        setDelay(config.getDelay());
         setUseFixedDelay(true);
     }
 


Mime
View raw message