chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asrab...@apache.org
Subject svn commit: r1028416 - in /incubator/chukwa/trunk: CHANGES.txt src/java/org/apache/hadoop/chukwa/datacollection/adaptor/DirTailingAdaptor.java
Date Thu, 28 Oct 2010 18:25:11 GMT
Author: asrabkin
Date: Thu Oct 28 18:25:11 2010
New Revision: 1028416

URL: http://svn.apache.org/viewvc?rev=1028416&view=rev
Log:
CHUKWA-525. Extensible DirTailingAdaptor. Contributed by Jaydeep Ayachit

Modified:
    incubator/chukwa/trunk/CHANGES.txt
    incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/DirTailingAdaptor.java

Modified: incubator/chukwa/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/CHANGES.txt?rev=1028416&r1=1028415&r2=1028416&view=diff
==============================================================================
--- incubator/chukwa/trunk/CHANGES.txt (original)
+++ incubator/chukwa/trunk/CHANGES.txt Thu Oct 28 18:25:11 2010
@@ -4,6 +4,8 @@ Trunk (unreleased changes)
 
   NEW FEATURES
 
+    CHUKWA-527  Configuration spellcheck. (Ari Rabkin)
+
     CHUKWA-520. Implemented graphing rest api and graph explorer for plotting HBase data
to graph.  (Eric Yang)
 
     CHUKWA-530. Implemented Syslog Adaptor for mappig Syslog facility name to Chukwa data
type.  (Eric Yang)

Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/DirTailingAdaptor.java
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/DirTailingAdaptor.java?rev=1028416&r1=1028415&r2=1028416&view=diff
==============================================================================
--- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/DirTailingAdaptor.java
(original)
+++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/DirTailingAdaptor.java
Thu Oct 28 18:25:11 2010
@@ -51,7 +51,9 @@ public class DirTailingAdaptor extends A
   File baseDir;
   String baseDirName; 
   long scanInterval;
-  String adaptorName; //name of adaptors to start
+
+	protected String adaptorName; // name of adaptors to start
+
   IOFileFilter fileFilter;
 
   @Override
@@ -94,8 +96,8 @@ public class DirTailingAdaptor extends A
     if(!dir.isDirectory()) {
       //Don't start tailing if we would have gotten it on the last pass
       if(dir.lastModified() >= lastSweepStartTime) {
-            String newAdaptorID = control.processAddCommand(
-                "add " + adaptorName +" " + type + " " + dir.getCanonicalPath() + " 0");
+				String newAdaptorID = control.processAddCommand(getAdaptorAddCommand(dir));
+
             log.info("DirTailingAdaptor " + adaptorID +  "  started new adaptor " + newAdaptorID);
        }
       
@@ -108,6 +110,9 @@ public class DirTailingAdaptor extends A
       }
   }
   
+	protected String getAdaptorAddCommand(File dir) throws IOException {
+		return "add " + adaptorName + " " + type + " " + dir.getCanonicalPath() + " 0";
+	}
 
   @Override
   public String getCurrentStatus() {
@@ -143,4 +148,3 @@ public class DirTailingAdaptor extends A
   }
 
 }
-



Mime
View raw message