This unit test is to test the function that SeqFile writer used to calculate the actual delay between file rotation. For example, if the file should close at 5:00:00AM, but it took HDFS longer to close the file, and the actual closed time is 5:00:01AM, the next rotation time is set to 5:05:00AM. The delay between the next rotation should happen in 4 minutes and 59 seconds. This function is not used by default unless you are using SeqFileWriter to stream data to HDFS.
For troubleshooting more, it would be helpful to look at the test case log file. It should show the exact calculation of the previous rotation time and next rotation time. The output should help us identify why the delay calculation result is incorrect. I suspect that text date conversion to epoch time may be different than the hard coded epoch time in the test case in recent version of Java. There was a leap second introduced in 2012, which cases the test case to fail. regards, Eric On Tue, Feb 21, 2012 at 9:12 AM, tincup <[email protected]> wrote: > hello Eric, > > I got a same test failure at TestChukwaWriters > > This is the error message: > > ------------------------------------------------------------------------------- > Test set: org.apache.hadoop.chukwa.datacollection.writer.TestChukwaWriters > ------------------------------------------------------------------------------- > Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 24.773 sec > <<< FAILURE! > testFixedIntervalOffsetCalculation(org.apache.hadoop.chukwa.datacollection.writer.TestChukwaWriters) > Time elapsed: 0.023 sec <<< FAILURE! > junit.framework.AssertionFailedError: Exception in TestChukwaWriters - > testFixedIntervalOffsetCalculation(),Incorrect value for delay > at junit.framework.Assert.fail(Assert.java:50) > at > org.apache.hadoop.chukwa.datacollection.writer.TestChukwaWriters.testFixedIntervalOffsetCalculation(TestChukwaWriters.java:441) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at junit.framework.TestCase.runTest(TestCase.java:168) > at junit.framework.TestCase.runBare(TestCase.java:134) > at junit.framework.TestResult$1.protect(TestResult.java:110) > at junit.framework.TestResult.runProtected(TestResult.java:128) > at junit.framework.TestResult.run(TestResult.java:113) > at junit.framework.TestCase.run(TestCase.java:124) > at junit.framework.TestSuite.runTest(TestSuite.java:243) > at junit.framework.TestSuite.run(TestSuite.java:238) > at > org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83) > at > org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53) > at > org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123) > at > org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164) > at > org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110) > at > org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175) > at > org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:81) > at > org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68) > > > --------- > Regards, > > > -- > View this message in context: > http://apache-chukwa.679492.n3.nabble.com/chukwa-build-error-0-5-0-tp3733930p3764176.html > Sent from the Chukwa - Users mailing list archive at Nabble.com.
