hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asrab...@apache.org
Subject svn commit: r749827 - /hadoop/core/trunk/src/contrib/chukwa/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/FileTailingAdaptor.java
Date Tue, 03 Mar 2009 23:10:32 GMT
Author: asrabkin
Date: Tue Mar  3 23:10:32 2009
New Revision: 749827

URL: http://svn.apache.org/viewvc?rev=749827&view=rev
Log:
Fixes HADOOP-5087
(This time for real.)  My patch, eric's +1.

Modified:
    hadoop/core/trunk/src/contrib/chukwa/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/FileTailingAdaptor.java

Modified: hadoop/core/trunk/src/contrib/chukwa/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/FileTailingAdaptor.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/FileTailingAdaptor.java?rev=749827&r1=749826&r2=749827&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/FileTailingAdaptor.java
(original)
+++ hadoop/core/trunk/src/contrib/chukwa/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/FileTailingAdaptor.java
Tue Mar  3 23:10:32 2009
@@ -81,13 +81,12 @@
 
 	public void start(long adaptorID, String type, String params, long bytes, ChunkReceiver
dest) {
 	    //in this case params = filename 
-		log.info("started file tailer on file " + params);
 		this.adaptorID = adaptorID;
 	    this.type = type;
 	    this.dest = dest;
 	    this.attempts = 0;
 			
-	    Pattern cmd = Pattern.compile("(\\d+)\\s+(.+)\\s");
+	    Pattern cmd = Pattern.compile("(\\d+)\\s+(.+)\\s?");
 	    Matcher m = cmd.matcher(params);
 	    if(m.matches()) {
 	        offsetOfFirstByte = Long.parseLong(m.group(1));
@@ -95,6 +94,7 @@
 	    } else {
 	        toWatch = new File(params.trim());
 	    }
+	  log.info("started file tailer on file " + toWatch + " with first byte at offset "+offsetOfFirstByte);
 	  
 		this.fileReadOffset= bytes;
 		tailer.startWatchingFile(this);



Mime
View raw message