flume-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arv...@apache.org
Subject svn commit: r1333104 - /incubator/flume/trunk/flume-ng-node/src/main/java/org/apache/flume/conf/file/AbstractFileConfigurationProvider.java
Date Wed, 02 May 2012 16:45:31 GMT
Author: arvind
Date: Wed May  2 16:45:31 2012
New Revision: 1333104

URL: http://svn.apache.org/viewvc?rev=1333104&view=rev
Log:
FLUME-1128. Configuration poller should use schedule with fixed delay.

(Hari Shreedharan via Arvind Prabhakar)

Modified:
    incubator/flume/trunk/flume-ng-node/src/main/java/org/apache/flume/conf/file/AbstractFileConfigurationProvider.java

Modified: incubator/flume/trunk/flume-ng-node/src/main/java/org/apache/flume/conf/file/AbstractFileConfigurationProvider.java
URL: http://svn.apache.org/viewvc/incubator/flume/trunk/flume-ng-node/src/main/java/org/apache/flume/conf/file/AbstractFileConfigurationProvider.java?rev=1333104&r1=1333103&r2=1333104&view=diff
==============================================================================
--- incubator/flume/trunk/flume-ng-node/src/main/java/org/apache/flume/conf/file/AbstractFileConfigurationProvider.java
(original)
+++ incubator/flume/trunk/flume-ng-node/src/main/java/org/apache/flume/conf/file/AbstractFileConfigurationProvider.java
Wed May  2 16:45:31 2012
@@ -69,8 +69,7 @@ public abstract class AbstractFileConfig
     Preconditions.checkState(file != null,
         "The parameter file must not be null");
 
-    executorService = Executors
-        .newScheduledThreadPool(1,
+    executorService = Executors.newSingleThreadScheduledExecutor(
             new ThreadFactoryBuilder().setNameFormat("conf-file-poller-%d")
                 .build());
 
@@ -79,7 +78,7 @@ public abstract class AbstractFileConfig
     fileWatcherRunnable.file = file;
     fileWatcherRunnable.counterGroup = counterGroup;
 
-    executorService.scheduleAtFixedRate(fileWatcherRunnable, 0, 30,
+    executorService.scheduleWithFixedDelay(fileWatcherRunnable, 0, 30,
         TimeUnit.SECONDS);
 
     lifecycleState = LifecycleState.START;



Mime
View raw message