camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r824291 - in /camel/trunk/camel-core/src/main/java/org/apache/camel/component/file: ./ strategy/
Date Mon, 12 Oct 2009 10:48:08 GMT
Author: davsclaus
Date: Mon Oct 12 10:48:07 2009
New Revision: 824291

URL: http://svn.apache.org/viewvc?rev=824291&view=rev
Log:
CAMEL-2062: file component uses a 10 sec timeout on read locks. Also log at WARN level if
cannot acquire the lock to help end users easier identify issues.

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileChangedExclusiveReadLockStrategy.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileLockExclusiveReadLockStrategy.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/GenericFileRenameExclusiveReadLockStrategy.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java?rev=824291&r1=824290&r2=824291&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java
Mon Oct 12 10:48:07 2009
@@ -76,7 +76,7 @@
     protected Comparator<GenericFile<T>> sorter;
     protected Comparator<Exchange> sortBy;
     protected String readLock = "none";
-    protected long readLockTimeout;
+    protected long readLockTimeout = 10000;
     protected GenericFileExclusiveReadLockStrategy exclusiveReadLockStrategy;
 
     public GenericFileEndpoint() {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileChangedExclusiveReadLockStrategy.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileChangedExclusiveReadLockStrategy.java?rev=824291&r1=824290&r2=824291&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileChangedExclusiveReadLockStrategy.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileChangedExclusiveReadLockStrategy.java
Mon Oct 12 10:48:07 2009
@@ -52,7 +52,7 @@
                 if (timeout > 0) {
                     long delta = System.currentTimeMillis() - start;
                     if (delta > timeout) {
-                        LOG.debug("Cannot acquire read lock within " + timeout + " millis.
Will skip the file: " + file);
+                        LOG.warn("Cannot acquire read lock within " + timeout + " millis.
Will skip the file: " + file);
                         // we could not get the lock within the timeout period, so return
false
                         return false;
                     }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileLockExclusiveReadLockStrategy.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileLockExclusiveReadLockStrategy.java?rev=824291&r1=824290&r2=824291&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileLockExclusiveReadLockStrategy.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileLockExclusiveReadLockStrategy.java
Mon Oct 12 10:48:07 2009
@@ -60,7 +60,7 @@
                 if (timeout > 0) {
                     long delta = System.currentTimeMillis() - start;
                     if (delta > timeout) {
-                        LOG.debug("Cannot acquire read lock within " + timeout + " millis.
Will skip the file: " + target);
+                        LOG.warn("Cannot acquire read lock within " + timeout + " millis.
Will skip the file: " + target);
                         // we could not get the lock within the timeout period, so return
false
                         return false;
                     }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/GenericFileRenameExclusiveReadLockStrategy.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/GenericFileRenameExclusiveReadLockStrategy.java?rev=824291&r1=824290&r2=824291&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/GenericFileRenameExclusiveReadLockStrategy.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/GenericFileRenameExclusiveReadLockStrategy.java
Mon Oct 12 10:48:07 2009
@@ -54,7 +54,7 @@
             if (timeout > 0) {
                 long delta = System.currentTimeMillis() - start;
                 if (delta > timeout) {
-                    LOG.debug("Cannot acquire read lock within " + timeout + " millis. Will
skip the file: " + file);
+                    LOG.warn("Cannot acquire read lock within " + timeout + " millis. Will
skip the file: " + file);
                     // we could not get the lock within the timeout period, so return false
                     return false;
                 }



Mime
View raw message