chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ey...@apache.org
Subject svn commit: r788432 - in /hadoop/chukwa/trunk/src: java/org/apache/hadoop/chukwa/util/ test/org/apache/hadoop/chukwa/datacollection/adaptor/ test/org/apache/hadoop/chukwa/datacollection/agent/ test/org/apache/hadoop/chukwa/datacollection/writer/ test/o...
Date Thu, 25 Jun 2009 17:02:16 GMT
Author: eyang
Date: Thu Jun 25 17:02:16 2009
New Revision: 788432

URL: http://svn.apache.org/viewvc?rev=788432&view=rev
Log:
CHUKWA-330. Commit missing test cases. (Ari Rabkin via Eric Yang)

Modified:
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/ConstRateAdaptor.java
    hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/TestDirTailingAdaptor.java
    hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/agent/TestAgent.java
    hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/writer/TestChukwaWriters.java
    hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/tools/backfilling/TestBackfillingLoader.java

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/ConstRateAdaptor.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/ConstRateAdaptor.java?rev=788432&r1=788431&r2=788432&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/ConstRateAdaptor.java (original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/ConstRateAdaptor.java Thu Jun
25 17:02:16 2009
@@ -61,7 +61,7 @@
       //("bad argument to const rate adaptor: ["  + bytesPerSecParam + "]");
       return null;
     }
-    return this.type;
+    return bytesPerSecParam;
   }
 
   public void run() {

Modified: hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/TestDirTailingAdaptor.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/TestDirTailingAdaptor.java?rev=788432&r1=788431&r2=788432&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/TestDirTailingAdaptor.java
(original)
+++ hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/TestDirTailingAdaptor.java
Thu Jun 25 17:02:16 2009
@@ -36,6 +36,8 @@
     Configuration conf = new Configuration();
     baseDir = new File(System.getProperty("test.build.data", "/tmp"));
     conf.set("chukwaAgent.checkpoint.dir", baseDir.getCanonicalPath());
+    conf.set("chukwaAgent.checkpoint.name", "checkpoint_test_"+System.currentTimeMillis());
+    conf.setInt("chukwaAgent.control.port", 0);
     conf.setBoolean("chukwaAgent.checkpoint.enabled", false);
     
     agent = new ChukwaAgent(conf);

Modified: hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/agent/TestAgent.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/agent/TestAgent.java?rev=788432&r1=788431&r2=788432&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/agent/TestAgent.java
(original)
+++ hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/agent/TestAgent.java
Thu Jun 25 17:02:16 2009
@@ -19,6 +19,7 @@
 
 
 import java.util.ArrayList;
+import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.chukwa.conf.ChukwaConfiguration;
 import org.apache.hadoop.chukwa.datacollection.agent.ChukwaAgent;
 import org.apache.hadoop.chukwa.datacollection.controller.ChukwaAgentController;
@@ -30,12 +31,13 @@
   public void testStopAndStart() {
 
     try {
-      ChukwaAgent agent = new ChukwaAgent();
+      Configuration conf = new Configuration();
+      conf.setInt("chukwaAgent.control.port", 0);
+      ChukwaAgent agent = new ChukwaAgent(conf);
       ConsoleOutConnector conn = new ConsoleOutConnector(agent, true);
       conn.start();
 
-      ChukwaConfiguration cc = new ChukwaConfiguration();
-      int portno = cc.getInt("chukwaAgent.control.port", 9093);
+      int portno = agent.getControllerPort();
       ChukwaAgentController cli = new ChukwaAgentController("localhost", portno);
 
       for (int i = 1; i < 20; ++i) {
@@ -58,7 +60,9 @@
   public void testMultiStopAndStart() {
 
     try {
-      ChukwaAgent agent = new ChukwaAgent();
+      Configuration conf = new Configuration();
+      conf.setInt("chukwaAgent.control.port", 0);
+      ChukwaAgent agent = new ChukwaAgent(conf);
       ConsoleOutConnector conn = new ConsoleOutConnector(agent, true);
       conn.start();
       int count = agent.adaptorCount();

Modified: hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/writer/TestChukwaWriters.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/writer/TestChukwaWriters.java?rev=788432&r1=788431&r2=788432&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/writer/TestChukwaWriters.java
(original)
+++ hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/writer/TestChukwaWriters.java
Thu Jun 25 17:02:16 2009
@@ -90,6 +90,8 @@
       String localWriterOutputDir = outputDirectory +"/localWriter/localOutputDir";
       confLocalWriter.set("chukwaCollector.localOutputDir",localWriterOutputDir);
       confLocalWriter.set("chukwaCollector.rotateInterval", "300000");
+      confLocalWriter.set("chukwaCollector.minPercentFreeDisk", "2");//so unit tests pass
on 
+      //machines with mostly-full disks
 
       
       String localWriterFile = null;

Modified: hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/tools/backfilling/TestBackfillingLoader.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/tools/backfilling/TestBackfillingLoader.java?rev=788432&r1=788431&r2=788432&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/tools/backfilling/TestBackfillingLoader.java
(original)
+++ hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/tools/backfilling/TestBackfillingLoader.java
Thu Jun 25 17:02:16 2009
@@ -218,7 +218,8 @@
     conf.set("chukwaCollector.rotateInterval", "" + (Integer.MAX_VALUE -1));
     conf.set("chukwaCollector.localOutputDir", dataDir  + "/log/");
     conf.set("chukwaCollector.writerClass", "org.apache.hadoop.chukwa.datacollection.writer.localfs.LocalWriter");
-    
+    conf.set("chukwaCollector.minPercentFreeDisk", "2");//so unit tests pass on machines
with full-ish disks
+
     String cluster = "MyCluster_" + ts;
     String machine = "machine_" + ts;
     String adaptorName = "org.apache.hadoop.chukwa.datacollection.adaptor.filetailer.CharFileTailingAdaptorUTF8NewLineEscaped";



Mime
View raw message