chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asrab...@apache.org
Subject svn commit: r785773 - in /hadoop/chukwa/trunk: CHANGES.txt bin/VERSION src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileExpirationPolicy.java
Date Wed, 17 Jun 2009 20:07:49 GMT
Author: asrabkin
Date: Wed Jun 17 20:07:49 2009
New Revision: 785773

URL: http://svn.apache.org/viewvc?rev=785773&view=rev
Log:
CHUKWA-301. Set TestFileExpirationPolicy controller port to 0 to avoid race condition. Contributed
by Jerome Boulon.

Modified:
    hadoop/chukwa/trunk/CHANGES.txt
    hadoop/chukwa/trunk/bin/VERSION
    hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileExpirationPolicy.java

Modified: hadoop/chukwa/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/CHANGES.txt?rev=785773&r1=785772&r2=785773&view=diff
==============================================================================
--- hadoop/chukwa/trunk/CHANGES.txt (original)
+++ hadoop/chukwa/trunk/CHANGES.txt Wed Jun 17 20:07:49 2009
@@ -64,6 +64,8 @@
 
   BUG FIXES
 
+    CHUKWA-301. Set TestFileExpirationPolicy controller port to 0 to avoid race condition.
(Jerome Boulon via asrabkin)
+
     CHUKWA-302. Removed hard coded dependency of Hadoop jar file. (Eric Yang)
 
     CHUKWA-298. Update branch 0.2 and trunk version number. (Eric Yang)

Modified: hadoop/chukwa/trunk/bin/VERSION
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/bin/VERSION?rev=785773&r1=785772&r2=785773&view=diff
==============================================================================
--- hadoop/chukwa/trunk/bin/VERSION (original)
+++ hadoop/chukwa/trunk/bin/VERSION Wed Jun 17 20:07:49 2009
@@ -1 +1 @@
-0.1.2
+0.3.0

Modified: hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileExpirationPolicy.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileExpirationPolicy.java?rev=785773&r1=785772&r2=785773&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileExpirationPolicy.java
(original)
+++ hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileExpirationPolicy.java
Wed Jun 17 20:07:49 2009
@@ -26,6 +26,7 @@
 import org.apache.hadoop.chukwa.conf.ChukwaConfiguration;
 import org.apache.hadoop.chukwa.datacollection.agent.ChukwaAgent;
 import org.apache.hadoop.chukwa.datacollection.controller.ChukwaAgentController;
+import org.apache.hadoop.conf.Configuration;
 
 public class TestFileExpirationPolicy extends TestCase {
 
@@ -33,11 +34,13 @@
     ChukwaAgent agent = null;
 
     try {
-      agent = new ChukwaAgent();
+      Configuration conf = new ChukwaConfiguration();
+      conf.set("chukwaAgent.control.port", "0");
+      agent = new ChukwaAgent(conf);
       // Remove any adaptor left over from previous run
-      ChukwaConfiguration cc = new ChukwaConfiguration();
-      int portno = cc.getInt("chukwaAgent.control.port", 9093);
-      ChukwaAgentController cli = new ChukwaAgentController("localhost", portno);
+      
+ 
+      ChukwaAgentController cli = new ChukwaAgentController("localhost", agent.getControllerPort());
       cli.removeAll();
       // sleep for some time to make sure we don't get chunk from existing
       // streams
@@ -78,11 +81,12 @@
       String logFile = tempDir.getPath() + "/chukwatestExpiration.txt";
       testFile = makeTestFile(logFile, 8000);
 
-      agent = new ChukwaAgent();
+      Configuration conf = new ChukwaConfiguration();
+      conf.set("chukwaAgent.control.port", "0");
+      agent = new ChukwaAgent(conf);
       // Remove any adaptor left over from previous run
-      ChukwaConfiguration cc = new ChukwaConfiguration();
-      int portno = cc.getInt("chukwaAgent.control.port", 9093);
-      ChukwaAgentController cli = new ChukwaAgentController("localhost", portno);
+
+      ChukwaAgentController cli = new ChukwaAgentController("localhost", agent.getControllerPort());
       cli.removeAll();
       // sleep for some time to make sure we don't get chunk from existing
       // streams



Mime
View raw message