You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/03/03 11:23:05 UTC
[1/3] camel git commit: Fixed CS
Repository: camel
Updated Branches:
refs/heads/master 00e27d6de -> 010411af1
Fixed CS
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/010411af
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/010411af
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/010411af
Branch: refs/heads/master
Commit: 010411af1dbcd7263e274d0f95cee30c40c23064
Parents: 0f51e57
Author: Claus Ibsen <da...@apache.org>
Authored: Fri Mar 3 11:59:12 2017 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Mar 3 12:22:58 2017 +0100
----------------------------------------------------------------------
.../main/java/org/apache/camel/main/MainDurationEventNotifier.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/010411af/camel-core/src/main/java/org/apache/camel/main/MainDurationEventNotifier.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/main/MainDurationEventNotifier.java b/camel-core/src/main/java/org/apache/camel/main/MainDurationEventNotifier.java
index e8e6bbe..b50d3de 100644
--- a/camel-core/src/main/java/org/apache/camel/main/MainDurationEventNotifier.java
+++ b/camel-core/src/main/java/org/apache/camel/main/MainDurationEventNotifier.java
@@ -148,7 +148,7 @@ public class MainDurationEventNotifier extends EventNotifierSupport {
}
}
};
- executorService.scheduleAtFixedRate(task, 1,1, TimeUnit.SECONDS);
+ executorService.scheduleAtFixedRate(task, 1, 1, TimeUnit.SECONDS);
}
}
[3/3] camel git commit: CAMEL-10084: Improve javadoc
Posted by da...@apache.org.
CAMEL-10084: Improve javadoc
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d9caf8c7
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d9caf8c7
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d9caf8c7
Branch: refs/heads/master
Commit: d9caf8c736f2de29fe0fd0a8d64aff23539b34b4
Parents: 00e27d6
Author: Claus Ibsen <da...@apache.org>
Authored: Fri Mar 3 10:48:24 2017 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Mar 3 12:22:58 2017 +0100
----------------------------------------------------------------------
.../org/apache/camel/processor/aggregate/AggregationStrategy.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/d9caf8c7/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregationStrategy.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregationStrategy.java b/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregationStrategy.java
index c593fa4..145ae80 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregationStrategy.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregationStrategy.java
@@ -54,7 +54,7 @@ public interface AggregationStrategy {
*
* @param oldExchange the oldest exchange (is <tt>null</tt> on first aggregation as we only have the new exchange)
* @param newExchange the newest exchange (can be <tt>null</tt> if there was no data possible to acquire)
- * @return a combined composite of the two exchanges
+ * @return a combined composite of the two exchanges, favor returning the <tt>oldExchange</tt> whenever possible
*/
Exchange aggregate(Exchange oldExchange, Exchange newExchange);
}
[2/3] camel git commit: CAMEL-10084: Add WARN log if there is a
potential issue with the aggregator and the recoverable repo.
Posted by da...@apache.org.
CAMEL-10084: Add WARN log if there is a potential issue with the aggregator and the recoverable repo.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0f51e575
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0f51e575
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0f51e575
Branch: refs/heads/master
Commit: 0f51e575a3208381949f8af7b666d6fab373b251
Parents: d9caf8c
Author: Claus Ibsen <da...@apache.org>
Authored: Fri Mar 3 11:52:32 2017 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Mar 3 12:22:58 2017 +0100
----------------------------------------------------------------------
.../camel/processor/aggregate/AggregateProcessor.java | 11 +++++++++++
1 file changed, 11 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/0f51e575/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java b/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
index 00b3d94..f11d459 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
@@ -27,6 +27,7 @@ import java.util.concurrent.ConcurrentSkipListSet;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.locks.Lock;
@@ -90,6 +91,7 @@ public class AggregateProcessor extends ServiceSupport implements AsyncProcessor
private static final Logger LOG = LoggerFactory.getLogger(AggregateProcessor.class);
private final Lock lock = new ReentrantLock();
+ private final AtomicBoolean aggregateRepositoryWarned = new AtomicBoolean();
private final CamelContext camelContext;
private final Processor processor;
private String id;
@@ -453,6 +455,15 @@ public class AggregateProcessor extends ServiceSupport implements AsyncProcessor
throw new CamelExchangeException("AggregationStrategy " + aggregationStrategy + " returned null which is not allowed", newExchange);
}
+ // special for some repository implementations
+ if (aggregationRepository instanceof RecoverableAggregationRepository) {
+ boolean valid = oldExchange == null || answer.getExchangeId().equals(oldExchange.getExchangeId());
+ if (!valid && aggregateRepositoryWarned.compareAndSet(false, true)) {
+ LOG.warn("AggregationStrategy should return the oldExchange instance instead of the newExchange whenever possible"
+ + " as otherwise this can lead to unexpected behavior with some RecoverableAggregationRepository implementations");
+ }
+ }
+
// update the aggregated size
answer.setProperty(Exchange.AGGREGATED_SIZE, size);