chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asrab...@apache.org
Subject svn commit: r825608 - in /hadoop/chukwa/branches/chukwa-0.3: CHANGES.txt build.xml src/test/org/apache/hadoop/chukwa/datacollection/adaptor/TestDirTailingAdaptor.java
Date Thu, 15 Oct 2009 18:34:38 GMT
Author: asrabkin
Date: Thu Oct 15 18:34:38 2009
New Revision: 825608

URL: http://svn.apache.org/viewvc?rev=825608&view=rev
Log:
CHUKWA-401. Fix race condition in Dir Tailing adaptor test case.

Modified:
    hadoop/chukwa/branches/chukwa-0.3/CHANGES.txt
    hadoop/chukwa/branches/chukwa-0.3/build.xml
    hadoop/chukwa/branches/chukwa-0.3/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/TestDirTailingAdaptor.java

Modified: hadoop/chukwa/branches/chukwa-0.3/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.3/CHANGES.txt?rev=825608&r1=825607&r2=825608&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.3/CHANGES.txt (original)
+++ hadoop/chukwa/branches/chukwa-0.3/CHANGES.txt Thu Oct 15 18:34:38 2009
@@ -150,6 +150,8 @@
 
   BUG FIXES
 
+    CHUKWA-401. Fix race condition in Dir Tailing adaptor test case. (asrabkin) 
+
     CHUKWA-398. Make ConstRateAdaptor more deterministic. (asrabkin)
 
     CHUKWA-386. Fix a bug in echo id to the browser for the iframe servlet. (Eric Yang)

Modified: hadoop/chukwa/branches/chukwa-0.3/build.xml
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.3/build.xml?rev=825608&r1=825607&r2=825608&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.3/build.xml (original)
+++ hadoop/chukwa/branches/chukwa-0.3/build.xml Thu Oct 15 18:34:38 2009
@@ -484,7 +484,7 @@
                     <include name="hicc.war" />
                   </fileset>
                 </copy>
-                <copy file="${basedir}/conf/chukwa-demux-conf.xml.template" tofile="${test.build.dir}/conf/chukwa-demux-conf.xml"></copy>
+                <copy file="${basedir}/conf/chukwa-demux-conf.xml" tofile="${test.build.dir}/conf/chukwa-demux-conf.xml"></copy>
                 <copy file="${basedir}/conf/log4j.properties" tofile="${test.build.dir}/conf/log4j.properties"></copy>
                 <copy file="${build.dir}/hicc.war" tofile="${test.build.classes}/webapps/hicc.war"></copy>
 		<junit showoutput="${test.output}" fork="yes" printsummary="${test.printsummary}" forkmode="${test.junit.fork.mode}"
maxmemory="${test.junit.maxmemory}" dir="${test.build.dir}/classes/" timeout="${test.timeout}"
errorProperty="tests.failed" failureProperty="tests.failed">
@@ -1018,6 +1018,9 @@
 			</fileset>
 		</copy>
 
+		<copy file="${basedir}/conf/jdbc.conf.template" tofile="${build.dir}/conf/jdbc.conf.template">
+		</copy>
+
 		<copy file="${basedir}/conf/alert.template" tofile="${build.dir}/conf/alert">
 			<filterchain>
 				<replacetokens>
@@ -1123,11 +1126,13 @@
                 <mkdir dir="${build.dir}/${final.name}/script" />
                 <mkdir dir="${build.dir}/${final.name}/script/pig" />
 		<mkdir dir="${build.dir}/${final.name}/docs" />
+		<mkdir dir="${build.dir}/${final.name}/ivy" />
+		<mkdir dir="${build.dir}/${final.name}/logs" />
 		<mkdir dir="${build.dir}/${final.name}/opt" />
+		<mkdir dir="${build.dir}/${final.name}/test" />
 		<mkdir dir="${build.dir}/${final.name}/tools" />
 		<mkdir dir="${build.dir}/${final.name}/var" />
 		<mkdir dir="${build.dir}/${final.name}/var/run" />
-		<mkdir dir="${build.dir}/${final.name}/logs" />
 		<mkdir dir="${build.dir}/${final.name}/webapps" />
 		<mkdir dir="${build.dir}/${final.name}/webapps/sandbox" />
 		
@@ -1176,6 +1181,10 @@
 			<fileset dir="${basedir}/contrib/chukwa-pig" />
 		</copy>
 		
+		<copy todir="${build.dir}/${final.name}/contrib/xtrace" failonerror="false">
+			<fileset dir="${basedir}/contrib/xtrace" />
+		</copy>
+		
 		<copy todir="${build.dir}/${final.name}/tools">
 			<fileset dir="${tools.dir}" />
 		</copy>
@@ -1215,6 +1224,14 @@
 		</copy>
 
 		<copy todir="${build.dir}/${final.name}" file="build.xml" />
+		<copy todir="${build.dir}/${final.name}" file="ivy.xml" />
+		<copy todir="${build.dir}/${final.name}" file="default.properties" />
+		<copy todir="${build.dir}/${final.name}/ivy">
+			<fileset dir="ivy"/>
+		</copy>
+		<copy todir="${build.dir}/${final.name}/test">
+			<fileset dir="test"/>
+		</copy>
 
 	</target>
 

Modified: hadoop/chukwa/branches/chukwa-0.3/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/TestDirTailingAdaptor.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.3/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/TestDirTailingAdaptor.java?rev=825608&r1=825607&r2=825608&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.3/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/TestDirTailingAdaptor.java
(original)
+++ hadoop/chukwa/branches/chukwa-0.3/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/TestDirTailingAdaptor.java
Thu Oct 15 18:34:38 2009
@@ -29,6 +29,7 @@
 
   ChukwaAgent agent;
   File baseDir;
+  static final int SCAN_INTERVAL = 1000;
 
   public void testDirTailer() throws IOException,
   ChukwaAgent.AlreadyRunningException, InterruptedException {
@@ -38,6 +39,7 @@
     File checkpointDir = new File(baseDir, "dirtailerTestCheckpoints");
     createEmptyDir(checkpointDir);
     
+    conf.setInt("adaptor.dirscan.intervalMs", SCAN_INTERVAL);
     conf.set("chukwaAgent.checkpoint.dir", checkpointDir.getCanonicalPath());
     conf.set("chukwaAgent.checkpoint.name", "checkpoint_");
     conf.setInt("chukwaAgent.control.port", 0);
@@ -73,7 +75,8 @@
     anOldFile.setLastModified(10);//just after epoch
     agent = new ChukwaAgent(conf); //restart agent.
     
-
+    Thread.sleep(3 * SCAN_INTERVAL); //wait a bit for the new file to be detected.
+    
     //make sure we started tailing the new, not the old, file.
     for(Map.Entry<String, String> adaptors : agent.getAdaptorList().entrySet()) {
       System.out.println(adaptors.getKey() +": " + adaptors.getValue());



Mime
View raw message