You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cassandra.apache.org by Paul Sabou <pa...@gmail.com> on 2009/11/14 13:01:59 UTC

2 problems running Cassandra as a developper

Hi,

I'am new to Cassandra. I'am trying to run it in Eclipse and I seems to
fail because some trivial reasons.

I have an Ubuntu 9.04 and I use MyEclipse.
I have checked out Cassandra from SVN and after I have installed
thrift I could run the
nosetests script succesfully.

I have imported the trunk folder into MyEclipse with the following steps :
(1) runned "mvn eclipse:eclipse" in the trunk folder
(2) imported the project as an existing maven project

and everything is ok up to here.

I want to do two things now with the Cassandra project (that don't
work) in MyEclipse :

(1) I want to run it from main :
- I followed the IDE instructions from
http://wiki.apache.org/cassandra/HowToContribute
running  "org.apache.cassandra.service.CassandraDaemon" class  with
the following VM arguments : "-ea -Xmx1G -Dstorage-config=conf
-Dcassandra-foreground"
- I get the following stack trace :

--------------------------------------------
Exception encountered during startup.
java.io.EOFException
	at java.io.DataInputStream.readFully(DataInputStream.java:180)
	at java.io.DataInputStream.readUTF(DataInputStream.java:592)
	at java.io.DataInputStream.readUTF(DataInputStream.java:547)
	at org.apache.cassandra.db.ColumnFamilySerializer.readComparator(ColumnFamilySerializer.java:115)
	at org.apache.cassandra.db.ColumnFamilySerializer.deserialize(ColumnFamilySerializer.java:98)
	at org.apache.cassandra.db.RowMutationSerializer.defreezeTheMaps(RowMutation.java:310)
	at org.apache.cassandra.db.RowMutationSerializer.deserialize(RowMutation.java:320)
	at org.apache.cassandra.db.RowMutationSerializer.deserialize(RowMutation.java:1)
	at org.apache.cassandra.db.CommitLog.recover(CommitLog.java:327)
	at org.apache.cassandra.db.RecoveryManager.doRecovery(RecoveryManager.java:65)
	at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:90)
	at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:166)

----------------------------------------------

It seems that the RecoveryManager doesn't work as it was expected =>
if I comment the line 90 in CassandraDaemon.java
"recoveryMgr.doRecovery();" everything starts up correctly.

I think I'am missing some config file or something similar. Can you
please tell me what should I do?

(2) I want to run the test suite :
- When I run the test suite many tests fail with something like :
-----------------------------------------------
java.lang.NoClassDefFoundError: Could not initialize class
org.apache.cassandra.config.DatabaseDescriptor
	at org.apache.cassandra.db.Table$TableMetadata.<clinit>(Table.java:70)
	at org.apache.cassandra.db.Table.<init>(Table.java:354)
	at org.apache.cassandra.db.Table.open(Table.java:184)
	at org.apache.cassandra.db.RemoveSuperColumnTest.testRemoveSuperColumn(RemoveSuperColumnTest.java:43)
	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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:44)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
	at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
-----------------------------------------------


I think that this is also my fault for not putting the right config
file in the right place. Can you please tell me what to do?


best regards
Paul.

Re: 2 problems running Cassandra as a developper

Posted by Paul Sabou <pa...@gmail.com>.
You are right. I have donea new svn chekout of the trunk and all the test
run smothly.
Thank you for your assistance. Sorry for bothering you with such trivial
things.

On Sat, Nov 14, 2009 at 5:29 PM, Michael Greene <mi...@gmail.com>wrote:

> They pass for me too.  Here is a good sample to pull out:
>
> [junit]
> [junit] Testcase: testSameCFs(org.apache.cassandra.db.MultitableTest):
> Caused an ERROR
> [junit] null
> [junit] java.lang.NullPointerException
> [junit] at
>
> org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
> [junit] at
> org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
> [junit] at
> org.apache.cassandra.db.MultitableTest.testSameCFs(MultitableTest.java:51)
>
> In trunk (at least in my working copy) getComparator doesn't span 896.
> I think some(?) of your files may be out of date.
>
> On Sat, Nov 14, 2009 at 10:17 AM, Jonathan Ellis <jb...@gmail.com>
> wrote:
> > I don't know what is wrong with your setup.  svn trunk tests pass for
> > me and for hudson:
> > http://hudson.zones.apache.org/hudson/job/Cassandra/
> >
> > On Sat, Nov 14, 2009 at 10:05 AM, Paul Sabou <pa...@gmail.com>
> wrote:
> >> Hi,
> >>
> >> Thank you for the advice.
> >> The project can be build with "ant build" OK
> >> The project can be cleaned with "ant clean" OK
> >> But when I run :
> >> ant clean
> >> ant test
> >>
> >> I still get a bunch of test failures. The "ant test" outuput is below :
> >> -------------------------------------
> >> Buildfile: build.xml
> >>
> >> build-subprojects:
> >>
> >> init:
> >> [mkdir] Created dir: /root/software/cassandra/trunk/build/classes
> >> [mkdir] Created dir: /root/software/cassandra/trunk/build/test/classes
> >> [mkdir] Created dir: /root/software/cassandra/trunk/src/gen-java
> >>
> >> check-gen-cli-grammar:
> >>
> >> gen-cli-grammar:
> >> [echo] Building Grammar
> >> /root/software/cassandra/trunk/src/java/org/apache/cassandra/cli/Cli.g
> ....
> >>
> >> build-project:
> >> [echo] apache-cassandra-incubating:
> /root/software/cassandra/trunk/build.xml
> >> [javac] Compiling 241 source files to
> >> /root/software/cassandra/trunk/build/classes
> >> [javac] Note: Some input files use or override a deprecated API.
> >> [javac] Note: Recompile with -Xlint:deprecation for details.
> >> [javac] Note: Some input files use unchecked or unsafe operations.
> >> [javac] Note: Recompile with -Xlint:unchecked for details.
> >>
> >> build:
> >>
> >> build-test:
> >> [javac] Compiling 48 source files to
> >> /root/software/cassandra/trunk/build/test/classes
> >> [javac] Note: Some input files use or override a deprecated API.
> >> [javac] Note: Recompile with -Xlint:deprecation for details.
> >> [javac] Note: Some input files use unchecked or unsafe operations.
> >> [javac] Note: Recompile with -Xlint:unchecked for details.
> >>
> >> test:
> >> [echo] running tests
> >> [mkdir] Created dir: /root/software/cassandra/trunk/build/test/cassandra
> >> [mkdir] Created dir: /root/software/cassandra/trunk/build/test/output
> >> [junit] Testsuite: org.apache.cassandra.config.DatabaseDescriptorTest
> >> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.883 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.db.ColumnFamilyStoreTest
> >> [junit] Tests run: 3, Failures: 0, Errors: 1, Time elapsed: 1.121 sec
> >> [junit]
> >> [junit] Testcase:
> >> testAntiCompaction1(org.apache.cassandra.db.ColumnFamilyStoreTest):
> Caused
> >> an ERROR
> >> [junit] java.util.concurrent.ExecutionException:
> >> java.lang.ClassCastException: [B cannot be cast to java.math.BigInteger
> >> [junit] java.lang.RuntimeException:
> java.util.concurrent.ExecutionException:
> >> java.lang.ClassCastException: [B cannot be cast to java.math.BigInteger
> >> [junit] at
> >>
> org.apache.cassandra.db.ColumnFamilyStore.forceAntiCompaction(ColumnFamilyStore.java:307)
> >> [junit] at
> >>
> org.apache.cassandra.db.ColumnFamilyStoreTest.testAntiCompaction(ColumnFamilyStoreTest.java:126)
> >> [junit] at
> >>
> org.apache.cassandra.db.ColumnFamilyStoreTest.testAntiCompaction1(ColumnFamilyStoreTest.java:133)
> >> [junit] Caused by: java.util.concurrent.ExecutionException:
> >> java.lang.ClassCastException: [B cannot be cast to java.math.BigInteger
> >> [junit] at
> >> java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
> >> [junit] at java.util.concurrent.FutureTask.get(FutureTask.java:83)
> >> [junit] at
> >>
> org.apache.cassandra.db.ColumnFamilyStore.forceAntiCompaction(ColumnFamilyStore.java:301)
> >> [junit] Caused by: java.lang.ClassCastException: [B cannot be cast to
> >> java.math.BigInteger
> >> [junit] at
> >>
> org.apache.cassandra.dht.BigIntegerToken.compareTo(BigIntegerToken.java:38)
> >> [junit] at org.apache.cassandra.dht.Range.contains(Range.java:102)
> >> [junit] at
> org.apache.cassandra.dht.Range.isTokenInRanges(Range.java:144)
> >> [junit] at
> >>
> org.apache.cassandra.db.ColumnFamilyStore.doFileAntiCompaction(ColumnFamilyStore.java:819)
> >> [junit] at
> >>
> org.apache.cassandra.db.ColumnFamilyStore.doAntiCompaction(ColumnFamilyStore.java:735)
> >> [junit] at
> >>
> org.apache.cassandra.db.CompactionManager$FileCompactor2.call(CompactionManager.java:95)
> >> [junit] at
> >>
> org.apache.cassandra.db.CompactionManager$FileCompactor2.call(CompactionManager.java:75)
> >> [junit] at
> >> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> >> [junit] at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> >> [junit] at
> >>
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> >> [junit] at
> >>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> >> [junit] at java.lang.Thread.run(Thread.java:619)
> >> [junit]
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.db.ColumnFamilyTest
> >> [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.803 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.db.CommitLogTest
> >> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.951 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.db.CompactionsTest
> >> [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 5.94 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.db.MultitableTest
> >> [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.783 sec
> >> [junit]
> >> [junit] Testcase: testSameCFs(org.apache.cassandra.db.MultitableTest):
> >> Caused an ERROR
> >> [junit] null
> >> [junit] java.lang.NullPointerException
> >> [junit] at
> >>
> org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
> >> [junit] at
> org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
> >> [junit] at
> >>
> org.apache.cassandra.db.MultitableTest.testSameCFs(MultitableTest.java:51)
> >> [junit]
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.db.NameSortTest
> >> [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 4.197 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.db.OneCompactionTest
> >> [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 1.108 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.db.ReadMessageTest
> >> [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.729 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.db.RecoveryManager2Test
> >> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.783 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.db.RecoveryManagerTest
> >> [junit] Tests run: 2, Failures: 0, Errors: 1, Time elapsed: 0.551 sec
> >> [junit]
> >> [junit] Testcase: testOne(org.apache.cassandra.db.RecoveryManagerTest):
> >> Caused an ERROR
> >> [junit] null
> >> [junit] java.lang.NullPointerException
> >> [junit] at
> >>
> org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
> >> [junit] at
> org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
> >> [junit] at
> >>
> org.apache.cassandra.db.RecoveryManagerTest.testOne(RecoveryManagerTest.java:58)
> >> [junit]
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.db.RemoveColumnFamilyTest
> >> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.77 sec
> >> [junit]
> >> [junit] Testsuite:
> org.apache.cassandra.db.RemoveColumnFamilyWithFlush1Test
> >> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.716 sec
> >> [junit]
> >> [junit] Testsuite:
> org.apache.cassandra.db.RemoveColumnFamilyWithFlush2Test
> >> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.847 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.db.RemoveColumnTest
> >> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.815 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.db.RemoveSubColumnTest
> >> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.723 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.db.RemoveSuperColumnTest
> >> [junit] Tests run: 3, Failures: 0, Errors: 2, Time elapsed: 0.909 sec
> >> [junit]
> >> [junit] Testcase:
> >>
> testRemoveDeletedSubColumn(org.apache.cassandra.db.RemoveSuperColumnTest):
> >> Caused an ERROR
> >> [junit] null
> >> [junit] java.lang.NullPointerException
> >> [junit] at
> >>
> org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
> >> [junit] at
> org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
> >> [junit] at org.apache.cassandra.db.RowMutation.add(RowMutation.java:157)
> >> [junit] at org.apache.cassandra.Util.addMutation(Util.java:39)
> >> [junit] at
> >>
> org.apache.cassandra.db.RemoveSuperColumnTest.testRemoveDeletedSubColumn(RemoveSuperColumnTest.java:76)
> >> [junit]
> >> [junit]
> >> [junit] Testcase:
> >>
> testRemoveSuperColumnWithNewData(org.apache.cassandra.db.RemoveSuperColumnTest):
> >> Caused an ERROR
> >> [junit] null
> >> [junit] java.lang.NullPointerException
> >> [junit] at
> >>
> org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
> >> [junit] at
> org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
> >> [junit] at org.apache.cassandra.db.RowMutation.add(RowMutation.java:157)
> >> [junit] at org.apache.cassandra.Util.addMutation(Util.java:39)
> >> [junit] at
> >>
> org.apache.cassandra.db.RemoveSuperColumnTest.testRemoveSuperColumnWithNewData(RemoveSuperColumnTest.java:128)
> >> [junit]
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.db.RowTest
> >> [junit] Tests run: 3, Failures: 0, Errors: 1, Time elapsed: 0.485 sec
> >> [junit]
> >> [junit] Testcase: testRepair(org.apache.cassandra.db.RowTest): Caused an
> >> ERROR
> >> [junit] null
> >> [junit] java.lang.NullPointerException
> >> [junit] at
> >>
> org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
> >> [junit] at
> org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
> >> [junit] at org.apache.cassandra.db.RowTest.testRepair(RowTest.java:72)
> >> [junit]
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.db.SuperColumnTest
> >> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.163 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.db.SystemTableTest
> >> [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.457 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.db.TableTest
> >> [junit] Tests run: 10, Failures: 2, Errors: 1, Time elapsed: 2.06 sec
> >> [junit]
> >> [junit] Testcase:
> testGetRowNoColumns(org.apache.cassandra.db.TableTest):
> >> Caused an ERROR
> >> [junit] null
> >> [junit] java.lang.NullPointerException
> >> [junit] at
> >>
> org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
> >> [junit] at
> org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
> >> [junit] at
> >> org.apache.cassandra.db.TableTest.testGetRowNoColumns(TableTest.java:74)
> >> [junit]
> >> [junit]
> >> [junit] Testcase:
> testGetSliceWithCutoff(org.apache.cassandra.db.TableTest):
> >> FAILED
> >> [junit] Unexpected column index size, block boundaries won't be where
> tests
> >> expect them.
> >> [junit] junit.framework.AssertionFailedError: Unexpected column index
> size,
> >> block boundaries won't be where tests expect them.
> >> [junit] at org.apache.cassandra.db.TableTest$3.run(TableTest.java:201)
> >> [junit] at org.apache.cassandra.db.TableTest.reTest(TableTest.java:55)
> >> [junit] at
> >>
> org.apache.cassandra.db.TableTest.testGetSliceWithCutoff(TableTest.java:232)
> >> [junit]
> >> [junit]
> >> [junit] Testcase:
> testGetSliceFromLarge(org.apache.cassandra.db.TableTest):
> >> FAILED
> >> [junit] null
> >> [junit] junit.framework.AssertionFailedError
> >> [junit] at
> >>
> org.apache.cassandra.db.TableTest.testGetSliceFromLarge(TableTest.java:376)
> >> [junit]
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.db.TimeSortTest
> >> [junit] Tests run: 2, Failures: 0, Errors: 2, Time elapsed: 0.472 sec
> >> [junit]
> >> [junit] Testcase:
> testMixedSources(org.apache.cassandra.db.TimeSortTest):
> >> Caused an ERROR
> >> [junit] null
> >> [junit] java.lang.NullPointerException
> >> [junit] at
> >>
> org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
> >> [junit] at
> org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
> >> [junit] at org.apache.cassandra.db.RowMutation.add(RowMutation.java:157)
> >> [junit] at
> >>
> org.apache.cassandra.db.TimeSortTest.testMixedSources(TimeSortTest.java:45)
> >> [junit]
> >> [junit]
> >> [junit] Testcase: testTimeSort(org.apache.cassandra.db.TimeSortTest):
> Caused
> >> an ERROR
> >> [junit] null
> >> [junit] java.lang.NullPointerException
> >> [junit] at
> >>
> org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
> >> [junit] at
> org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
> >> [junit] at org.apache.cassandra.db.RowMutation.add(RowMutation.java:157)
> >> [junit] at
> >> org.apache.cassandra.db.TimeSortTest.testTimeSort(TimeSortTest.java:69)
> >> [junit]
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.db.marshal.AsciiTypeTest
> >> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.15 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.db.marshal.BytesTypeTest
> >> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.156 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.db.marshal.UTF8TypeTest
> >> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.106 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.dht.BootStrapperTest
> >> [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 1.029 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.dht.BootstrapTest
> >> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.71 sec
> >> [junit]
> >> [junit] Testsuite:
> >> org.apache.cassandra.dht.CollatingOrderPreservingPartitionerTest
> >> [junit] Tests run: 8, Failures: 0, Errors: 0, Time elapsed: 0.601 sec
> >> [junit]
> >> [junit] Testsuite:
> org.apache.cassandra.dht.OrderPreservingPartitionerTest
> >> [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0.489 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.dht.RandomPartitionerTest
> >> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.16 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.dht.RangeTest
> >> [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.085 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.gms.ArrivalWindowTest
> >> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.158 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.gms.GossipDigestTest
> >> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.086 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.io.DataInputBufferTest
> >> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.084 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.io.SSTableTest
> >> [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 1.239 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.locator.RackUnawareStrategyTest
> >> [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.61 sec
> >> [junit]
> >> [junit] Testsuite:
> >> org.apache.cassandra.net.CompactEndPointSerializationHelperTest
> >> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.497 sec
> >> [junit]
> >> [junit] ------------- Standard Output ---------------
> >> [junit] 4
> >> [junit] /127.0.0.1
> >> [junit] ------------- ---------------- ---------------
> >> [junit] Testsuite: org.apache.cassandra.service.CassandraServerTest
> >> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.404 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.utils.BloomFilterTest
> >> [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.789 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.utils.BoundedStatsDequeTest
> >> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.07 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.utils.FBUtilitiesTest
> >> [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.171 sec
> >> [junit]
> >> [junit] Testsuite: org.apache.cassandra.utils.FilterTest
> >> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.429 sec
> >> [junit]
> >> -----------------------------------------------------
> >>
> >>
> >> best regards
> >> Paul.
> >>
> >>
> >> On Sat, Nov 14, 2009 at 4:26 PM, Michael Greene <
> michael.greene@gmail.com>wrote:
> >>
> >>> > What can I do to run the tests?
> >>> `ant test` will run the unit tests
> >>>
> >>> ant gen-thrift-py
> >>> nosetests
> >>>
> >>> will run the system tests if you have python and nose available
> >>>
> >>> Michael
> >>>
> >>
> >
>

Re: 2 problems running Cassandra as a developper

Posted by Michael Greene <mi...@gmail.com>.
They pass for me too.  Here is a good sample to pull out:

[junit]
[junit] Testcase: testSameCFs(org.apache.cassandra.db.MultitableTest):
Caused an ERROR
[junit] null
[junit] java.lang.NullPointerException
[junit] at
org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
[junit] at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
[junit] at
org.apache.cassandra.db.MultitableTest.testSameCFs(MultitableTest.java:51)

In trunk (at least in my working copy) getComparator doesn't span 896.
I think some(?) of your files may be out of date.

On Sat, Nov 14, 2009 at 10:17 AM, Jonathan Ellis <jb...@gmail.com> wrote:
> I don't know what is wrong with your setup.  svn trunk tests pass for
> me and for hudson:
> http://hudson.zones.apache.org/hudson/job/Cassandra/
>
> On Sat, Nov 14, 2009 at 10:05 AM, Paul Sabou <pa...@gmail.com> wrote:
>> Hi,
>>
>> Thank you for the advice.
>> The project can be build with "ant build" OK
>> The project can be cleaned with "ant clean" OK
>> But when I run :
>> ant clean
>> ant test
>>
>> I still get a bunch of test failures. The "ant test" outuput is below :
>> -------------------------------------
>> Buildfile: build.xml
>>
>> build-subprojects:
>>
>> init:
>> [mkdir] Created dir: /root/software/cassandra/trunk/build/classes
>> [mkdir] Created dir: /root/software/cassandra/trunk/build/test/classes
>> [mkdir] Created dir: /root/software/cassandra/trunk/src/gen-java
>>
>> check-gen-cli-grammar:
>>
>> gen-cli-grammar:
>> [echo] Building Grammar
>> /root/software/cassandra/trunk/src/java/org/apache/cassandra/cli/Cli.g ....
>>
>> build-project:
>> [echo] apache-cassandra-incubating: /root/software/cassandra/trunk/build.xml
>> [javac] Compiling 241 source files to
>> /root/software/cassandra/trunk/build/classes
>> [javac] Note: Some input files use or override a deprecated API.
>> [javac] Note: Recompile with -Xlint:deprecation for details.
>> [javac] Note: Some input files use unchecked or unsafe operations.
>> [javac] Note: Recompile with -Xlint:unchecked for details.
>>
>> build:
>>
>> build-test:
>> [javac] Compiling 48 source files to
>> /root/software/cassandra/trunk/build/test/classes
>> [javac] Note: Some input files use or override a deprecated API.
>> [javac] Note: Recompile with -Xlint:deprecation for details.
>> [javac] Note: Some input files use unchecked or unsafe operations.
>> [javac] Note: Recompile with -Xlint:unchecked for details.
>>
>> test:
>> [echo] running tests
>> [mkdir] Created dir: /root/software/cassandra/trunk/build/test/cassandra
>> [mkdir] Created dir: /root/software/cassandra/trunk/build/test/output
>> [junit] Testsuite: org.apache.cassandra.config.DatabaseDescriptorTest
>> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.883 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.db.ColumnFamilyStoreTest
>> [junit] Tests run: 3, Failures: 0, Errors: 1, Time elapsed: 1.121 sec
>> [junit]
>> [junit] Testcase:
>> testAntiCompaction1(org.apache.cassandra.db.ColumnFamilyStoreTest): Caused
>> an ERROR
>> [junit] java.util.concurrent.ExecutionException:
>> java.lang.ClassCastException: [B cannot be cast to java.math.BigInteger
>> [junit] java.lang.RuntimeException: java.util.concurrent.ExecutionException:
>> java.lang.ClassCastException: [B cannot be cast to java.math.BigInteger
>> [junit] at
>> org.apache.cassandra.db.ColumnFamilyStore.forceAntiCompaction(ColumnFamilyStore.java:307)
>> [junit] at
>> org.apache.cassandra.db.ColumnFamilyStoreTest.testAntiCompaction(ColumnFamilyStoreTest.java:126)
>> [junit] at
>> org.apache.cassandra.db.ColumnFamilyStoreTest.testAntiCompaction1(ColumnFamilyStoreTest.java:133)
>> [junit] Caused by: java.util.concurrent.ExecutionException:
>> java.lang.ClassCastException: [B cannot be cast to java.math.BigInteger
>> [junit] at
>> java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
>> [junit] at java.util.concurrent.FutureTask.get(FutureTask.java:83)
>> [junit] at
>> org.apache.cassandra.db.ColumnFamilyStore.forceAntiCompaction(ColumnFamilyStore.java:301)
>> [junit] Caused by: java.lang.ClassCastException: [B cannot be cast to
>> java.math.BigInteger
>> [junit] at
>> org.apache.cassandra.dht.BigIntegerToken.compareTo(BigIntegerToken.java:38)
>> [junit] at org.apache.cassandra.dht.Range.contains(Range.java:102)
>> [junit] at org.apache.cassandra.dht.Range.isTokenInRanges(Range.java:144)
>> [junit] at
>> org.apache.cassandra.db.ColumnFamilyStore.doFileAntiCompaction(ColumnFamilyStore.java:819)
>> [junit] at
>> org.apache.cassandra.db.ColumnFamilyStore.doAntiCompaction(ColumnFamilyStore.java:735)
>> [junit] at
>> org.apache.cassandra.db.CompactionManager$FileCompactor2.call(CompactionManager.java:95)
>> [junit] at
>> org.apache.cassandra.db.CompactionManager$FileCompactor2.call(CompactionManager.java:75)
>> [junit] at
>> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>> [junit] at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>> [junit] at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>> [junit] at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>> [junit] at java.lang.Thread.run(Thread.java:619)
>> [junit]
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.db.ColumnFamilyTest
>> [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.803 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.db.CommitLogTest
>> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.951 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.db.CompactionsTest
>> [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 5.94 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.db.MultitableTest
>> [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.783 sec
>> [junit]
>> [junit] Testcase: testSameCFs(org.apache.cassandra.db.MultitableTest):
>> Caused an ERROR
>> [junit] null
>> [junit] java.lang.NullPointerException
>> [junit] at
>> org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
>> [junit] at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
>> [junit] at
>> org.apache.cassandra.db.MultitableTest.testSameCFs(MultitableTest.java:51)
>> [junit]
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.db.NameSortTest
>> [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 4.197 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.db.OneCompactionTest
>> [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 1.108 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.db.ReadMessageTest
>> [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.729 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.db.RecoveryManager2Test
>> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.783 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.db.RecoveryManagerTest
>> [junit] Tests run: 2, Failures: 0, Errors: 1, Time elapsed: 0.551 sec
>> [junit]
>> [junit] Testcase: testOne(org.apache.cassandra.db.RecoveryManagerTest):
>> Caused an ERROR
>> [junit] null
>> [junit] java.lang.NullPointerException
>> [junit] at
>> org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
>> [junit] at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
>> [junit] at
>> org.apache.cassandra.db.RecoveryManagerTest.testOne(RecoveryManagerTest.java:58)
>> [junit]
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.db.RemoveColumnFamilyTest
>> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.77 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.db.RemoveColumnFamilyWithFlush1Test
>> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.716 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.db.RemoveColumnFamilyWithFlush2Test
>> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.847 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.db.RemoveColumnTest
>> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.815 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.db.RemoveSubColumnTest
>> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.723 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.db.RemoveSuperColumnTest
>> [junit] Tests run: 3, Failures: 0, Errors: 2, Time elapsed: 0.909 sec
>> [junit]
>> [junit] Testcase:
>> testRemoveDeletedSubColumn(org.apache.cassandra.db.RemoveSuperColumnTest):
>> Caused an ERROR
>> [junit] null
>> [junit] java.lang.NullPointerException
>> [junit] at
>> org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
>> [junit] at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
>> [junit] at org.apache.cassandra.db.RowMutation.add(RowMutation.java:157)
>> [junit] at org.apache.cassandra.Util.addMutation(Util.java:39)
>> [junit] at
>> org.apache.cassandra.db.RemoveSuperColumnTest.testRemoveDeletedSubColumn(RemoveSuperColumnTest.java:76)
>> [junit]
>> [junit]
>> [junit] Testcase:
>> testRemoveSuperColumnWithNewData(org.apache.cassandra.db.RemoveSuperColumnTest):
>> Caused an ERROR
>> [junit] null
>> [junit] java.lang.NullPointerException
>> [junit] at
>> org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
>> [junit] at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
>> [junit] at org.apache.cassandra.db.RowMutation.add(RowMutation.java:157)
>> [junit] at org.apache.cassandra.Util.addMutation(Util.java:39)
>> [junit] at
>> org.apache.cassandra.db.RemoveSuperColumnTest.testRemoveSuperColumnWithNewData(RemoveSuperColumnTest.java:128)
>> [junit]
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.db.RowTest
>> [junit] Tests run: 3, Failures: 0, Errors: 1, Time elapsed: 0.485 sec
>> [junit]
>> [junit] Testcase: testRepair(org.apache.cassandra.db.RowTest): Caused an
>> ERROR
>> [junit] null
>> [junit] java.lang.NullPointerException
>> [junit] at
>> org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
>> [junit] at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
>> [junit] at org.apache.cassandra.db.RowTest.testRepair(RowTest.java:72)
>> [junit]
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.db.SuperColumnTest
>> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.163 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.db.SystemTableTest
>> [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.457 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.db.TableTest
>> [junit] Tests run: 10, Failures: 2, Errors: 1, Time elapsed: 2.06 sec
>> [junit]
>> [junit] Testcase: testGetRowNoColumns(org.apache.cassandra.db.TableTest):
>> Caused an ERROR
>> [junit] null
>> [junit] java.lang.NullPointerException
>> [junit] at
>> org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
>> [junit] at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
>> [junit] at
>> org.apache.cassandra.db.TableTest.testGetRowNoColumns(TableTest.java:74)
>> [junit]
>> [junit]
>> [junit] Testcase: testGetSliceWithCutoff(org.apache.cassandra.db.TableTest):
>> FAILED
>> [junit] Unexpected column index size, block boundaries won't be where tests
>> expect them.
>> [junit] junit.framework.AssertionFailedError: Unexpected column index size,
>> block boundaries won't be where tests expect them.
>> [junit] at org.apache.cassandra.db.TableTest$3.run(TableTest.java:201)
>> [junit] at org.apache.cassandra.db.TableTest.reTest(TableTest.java:55)
>> [junit] at
>> org.apache.cassandra.db.TableTest.testGetSliceWithCutoff(TableTest.java:232)
>> [junit]
>> [junit]
>> [junit] Testcase: testGetSliceFromLarge(org.apache.cassandra.db.TableTest):
>> FAILED
>> [junit] null
>> [junit] junit.framework.AssertionFailedError
>> [junit] at
>> org.apache.cassandra.db.TableTest.testGetSliceFromLarge(TableTest.java:376)
>> [junit]
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.db.TimeSortTest
>> [junit] Tests run: 2, Failures: 0, Errors: 2, Time elapsed: 0.472 sec
>> [junit]
>> [junit] Testcase: testMixedSources(org.apache.cassandra.db.TimeSortTest):
>> Caused an ERROR
>> [junit] null
>> [junit] java.lang.NullPointerException
>> [junit] at
>> org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
>> [junit] at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
>> [junit] at org.apache.cassandra.db.RowMutation.add(RowMutation.java:157)
>> [junit] at
>> org.apache.cassandra.db.TimeSortTest.testMixedSources(TimeSortTest.java:45)
>> [junit]
>> [junit]
>> [junit] Testcase: testTimeSort(org.apache.cassandra.db.TimeSortTest): Caused
>> an ERROR
>> [junit] null
>> [junit] java.lang.NullPointerException
>> [junit] at
>> org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
>> [junit] at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
>> [junit] at org.apache.cassandra.db.RowMutation.add(RowMutation.java:157)
>> [junit] at
>> org.apache.cassandra.db.TimeSortTest.testTimeSort(TimeSortTest.java:69)
>> [junit]
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.db.marshal.AsciiTypeTest
>> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.15 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.db.marshal.BytesTypeTest
>> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.156 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.db.marshal.UTF8TypeTest
>> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.106 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.dht.BootStrapperTest
>> [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 1.029 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.dht.BootstrapTest
>> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.71 sec
>> [junit]
>> [junit] Testsuite:
>> org.apache.cassandra.dht.CollatingOrderPreservingPartitionerTest
>> [junit] Tests run: 8, Failures: 0, Errors: 0, Time elapsed: 0.601 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.dht.OrderPreservingPartitionerTest
>> [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0.489 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.dht.RandomPartitionerTest
>> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.16 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.dht.RangeTest
>> [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.085 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.gms.ArrivalWindowTest
>> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.158 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.gms.GossipDigestTest
>> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.086 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.io.DataInputBufferTest
>> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.084 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.io.SSTableTest
>> [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 1.239 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.locator.RackUnawareStrategyTest
>> [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.61 sec
>> [junit]
>> [junit] Testsuite:
>> org.apache.cassandra.net.CompactEndPointSerializationHelperTest
>> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.497 sec
>> [junit]
>> [junit] ------------- Standard Output ---------------
>> [junit] 4
>> [junit] /127.0.0.1
>> [junit] ------------- ---------------- ---------------
>> [junit] Testsuite: org.apache.cassandra.service.CassandraServerTest
>> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.404 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.utils.BloomFilterTest
>> [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.789 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.utils.BoundedStatsDequeTest
>> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.07 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.utils.FBUtilitiesTest
>> [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.171 sec
>> [junit]
>> [junit] Testsuite: org.apache.cassandra.utils.FilterTest
>> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.429 sec
>> [junit]
>> -----------------------------------------------------
>>
>>
>> best regards
>> Paul.
>>
>>
>> On Sat, Nov 14, 2009 at 4:26 PM, Michael Greene <mi...@gmail.com>wrote:
>>
>>> > What can I do to run the tests?
>>> `ant test` will run the unit tests
>>>
>>> ant gen-thrift-py
>>> nosetests
>>>
>>> will run the system tests if you have python and nose available
>>>
>>> Michael
>>>
>>
>

Re: 2 problems running Cassandra as a developper

Posted by Jonathan Ellis <jb...@gmail.com>.
I don't know what is wrong with your setup.  svn trunk tests pass for
me and for hudson:
http://hudson.zones.apache.org/hudson/job/Cassandra/

On Sat, Nov 14, 2009 at 10:05 AM, Paul Sabou <pa...@gmail.com> wrote:
> Hi,
>
> Thank you for the advice.
> The project can be build with "ant build" OK
> The project can be cleaned with "ant clean" OK
> But when I run :
> ant clean
> ant test
>
> I still get a bunch of test failures. The "ant test" outuput is below :
> -------------------------------------
> Buildfile: build.xml
>
> build-subprojects:
>
> init:
> [mkdir] Created dir: /root/software/cassandra/trunk/build/classes
> [mkdir] Created dir: /root/software/cassandra/trunk/build/test/classes
> [mkdir] Created dir: /root/software/cassandra/trunk/src/gen-java
>
> check-gen-cli-grammar:
>
> gen-cli-grammar:
> [echo] Building Grammar
> /root/software/cassandra/trunk/src/java/org/apache/cassandra/cli/Cli.g ....
>
> build-project:
> [echo] apache-cassandra-incubating: /root/software/cassandra/trunk/build.xml
> [javac] Compiling 241 source files to
> /root/software/cassandra/trunk/build/classes
> [javac] Note: Some input files use or override a deprecated API.
> [javac] Note: Recompile with -Xlint:deprecation for details.
> [javac] Note: Some input files use unchecked or unsafe operations.
> [javac] Note: Recompile with -Xlint:unchecked for details.
>
> build:
>
> build-test:
> [javac] Compiling 48 source files to
> /root/software/cassandra/trunk/build/test/classes
> [javac] Note: Some input files use or override a deprecated API.
> [javac] Note: Recompile with -Xlint:deprecation for details.
> [javac] Note: Some input files use unchecked or unsafe operations.
> [javac] Note: Recompile with -Xlint:unchecked for details.
>
> test:
> [echo] running tests
> [mkdir] Created dir: /root/software/cassandra/trunk/build/test/cassandra
> [mkdir] Created dir: /root/software/cassandra/trunk/build/test/output
> [junit] Testsuite: org.apache.cassandra.config.DatabaseDescriptorTest
> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.883 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.db.ColumnFamilyStoreTest
> [junit] Tests run: 3, Failures: 0, Errors: 1, Time elapsed: 1.121 sec
> [junit]
> [junit] Testcase:
> testAntiCompaction1(org.apache.cassandra.db.ColumnFamilyStoreTest): Caused
> an ERROR
> [junit] java.util.concurrent.ExecutionException:
> java.lang.ClassCastException: [B cannot be cast to java.math.BigInteger
> [junit] java.lang.RuntimeException: java.util.concurrent.ExecutionException:
> java.lang.ClassCastException: [B cannot be cast to java.math.BigInteger
> [junit] at
> org.apache.cassandra.db.ColumnFamilyStore.forceAntiCompaction(ColumnFamilyStore.java:307)
> [junit] at
> org.apache.cassandra.db.ColumnFamilyStoreTest.testAntiCompaction(ColumnFamilyStoreTest.java:126)
> [junit] at
> org.apache.cassandra.db.ColumnFamilyStoreTest.testAntiCompaction1(ColumnFamilyStoreTest.java:133)
> [junit] Caused by: java.util.concurrent.ExecutionException:
> java.lang.ClassCastException: [B cannot be cast to java.math.BigInteger
> [junit] at
> java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
> [junit] at java.util.concurrent.FutureTask.get(FutureTask.java:83)
> [junit] at
> org.apache.cassandra.db.ColumnFamilyStore.forceAntiCompaction(ColumnFamilyStore.java:301)
> [junit] Caused by: java.lang.ClassCastException: [B cannot be cast to
> java.math.BigInteger
> [junit] at
> org.apache.cassandra.dht.BigIntegerToken.compareTo(BigIntegerToken.java:38)
> [junit] at org.apache.cassandra.dht.Range.contains(Range.java:102)
> [junit] at org.apache.cassandra.dht.Range.isTokenInRanges(Range.java:144)
> [junit] at
> org.apache.cassandra.db.ColumnFamilyStore.doFileAntiCompaction(ColumnFamilyStore.java:819)
> [junit] at
> org.apache.cassandra.db.ColumnFamilyStore.doAntiCompaction(ColumnFamilyStore.java:735)
> [junit] at
> org.apache.cassandra.db.CompactionManager$FileCompactor2.call(CompactionManager.java:95)
> [junit] at
> org.apache.cassandra.db.CompactionManager$FileCompactor2.call(CompactionManager.java:75)
> [junit] at
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> [junit] at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> [junit] at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> [junit] at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> [junit] at java.lang.Thread.run(Thread.java:619)
> [junit]
> [junit]
> [junit] Testsuite: org.apache.cassandra.db.ColumnFamilyTest
> [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.803 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.db.CommitLogTest
> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.951 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.db.CompactionsTest
> [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 5.94 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.db.MultitableTest
> [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.783 sec
> [junit]
> [junit] Testcase: testSameCFs(org.apache.cassandra.db.MultitableTest):
> Caused an ERROR
> [junit] null
> [junit] java.lang.NullPointerException
> [junit] at
> org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
> [junit] at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
> [junit] at
> org.apache.cassandra.db.MultitableTest.testSameCFs(MultitableTest.java:51)
> [junit]
> [junit]
> [junit] Testsuite: org.apache.cassandra.db.NameSortTest
> [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 4.197 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.db.OneCompactionTest
> [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 1.108 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.db.ReadMessageTest
> [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.729 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.db.RecoveryManager2Test
> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.783 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.db.RecoveryManagerTest
> [junit] Tests run: 2, Failures: 0, Errors: 1, Time elapsed: 0.551 sec
> [junit]
> [junit] Testcase: testOne(org.apache.cassandra.db.RecoveryManagerTest):
> Caused an ERROR
> [junit] null
> [junit] java.lang.NullPointerException
> [junit] at
> org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
> [junit] at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
> [junit] at
> org.apache.cassandra.db.RecoveryManagerTest.testOne(RecoveryManagerTest.java:58)
> [junit]
> [junit]
> [junit] Testsuite: org.apache.cassandra.db.RemoveColumnFamilyTest
> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.77 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.db.RemoveColumnFamilyWithFlush1Test
> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.716 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.db.RemoveColumnFamilyWithFlush2Test
> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.847 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.db.RemoveColumnTest
> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.815 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.db.RemoveSubColumnTest
> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.723 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.db.RemoveSuperColumnTest
> [junit] Tests run: 3, Failures: 0, Errors: 2, Time elapsed: 0.909 sec
> [junit]
> [junit] Testcase:
> testRemoveDeletedSubColumn(org.apache.cassandra.db.RemoveSuperColumnTest):
> Caused an ERROR
> [junit] null
> [junit] java.lang.NullPointerException
> [junit] at
> org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
> [junit] at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
> [junit] at org.apache.cassandra.db.RowMutation.add(RowMutation.java:157)
> [junit] at org.apache.cassandra.Util.addMutation(Util.java:39)
> [junit] at
> org.apache.cassandra.db.RemoveSuperColumnTest.testRemoveDeletedSubColumn(RemoveSuperColumnTest.java:76)
> [junit]
> [junit]
> [junit] Testcase:
> testRemoveSuperColumnWithNewData(org.apache.cassandra.db.RemoveSuperColumnTest):
> Caused an ERROR
> [junit] null
> [junit] java.lang.NullPointerException
> [junit] at
> org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
> [junit] at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
> [junit] at org.apache.cassandra.db.RowMutation.add(RowMutation.java:157)
> [junit] at org.apache.cassandra.Util.addMutation(Util.java:39)
> [junit] at
> org.apache.cassandra.db.RemoveSuperColumnTest.testRemoveSuperColumnWithNewData(RemoveSuperColumnTest.java:128)
> [junit]
> [junit]
> [junit] Testsuite: org.apache.cassandra.db.RowTest
> [junit] Tests run: 3, Failures: 0, Errors: 1, Time elapsed: 0.485 sec
> [junit]
> [junit] Testcase: testRepair(org.apache.cassandra.db.RowTest): Caused an
> ERROR
> [junit] null
> [junit] java.lang.NullPointerException
> [junit] at
> org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
> [junit] at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
> [junit] at org.apache.cassandra.db.RowTest.testRepair(RowTest.java:72)
> [junit]
> [junit]
> [junit] Testsuite: org.apache.cassandra.db.SuperColumnTest
> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.163 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.db.SystemTableTest
> [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.457 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.db.TableTest
> [junit] Tests run: 10, Failures: 2, Errors: 1, Time elapsed: 2.06 sec
> [junit]
> [junit] Testcase: testGetRowNoColumns(org.apache.cassandra.db.TableTest):
> Caused an ERROR
> [junit] null
> [junit] java.lang.NullPointerException
> [junit] at
> org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
> [junit] at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
> [junit] at
> org.apache.cassandra.db.TableTest.testGetRowNoColumns(TableTest.java:74)
> [junit]
> [junit]
> [junit] Testcase: testGetSliceWithCutoff(org.apache.cassandra.db.TableTest):
> FAILED
> [junit] Unexpected column index size, block boundaries won't be where tests
> expect them.
> [junit] junit.framework.AssertionFailedError: Unexpected column index size,
> block boundaries won't be where tests expect them.
> [junit] at org.apache.cassandra.db.TableTest$3.run(TableTest.java:201)
> [junit] at org.apache.cassandra.db.TableTest.reTest(TableTest.java:55)
> [junit] at
> org.apache.cassandra.db.TableTest.testGetSliceWithCutoff(TableTest.java:232)
> [junit]
> [junit]
> [junit] Testcase: testGetSliceFromLarge(org.apache.cassandra.db.TableTest):
> FAILED
> [junit] null
> [junit] junit.framework.AssertionFailedError
> [junit] at
> org.apache.cassandra.db.TableTest.testGetSliceFromLarge(TableTest.java:376)
> [junit]
> [junit]
> [junit] Testsuite: org.apache.cassandra.db.TimeSortTest
> [junit] Tests run: 2, Failures: 0, Errors: 2, Time elapsed: 0.472 sec
> [junit]
> [junit] Testcase: testMixedSources(org.apache.cassandra.db.TimeSortTest):
> Caused an ERROR
> [junit] null
> [junit] java.lang.NullPointerException
> [junit] at
> org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
> [junit] at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
> [junit] at org.apache.cassandra.db.RowMutation.add(RowMutation.java:157)
> [junit] at
> org.apache.cassandra.db.TimeSortTest.testMixedSources(TimeSortTest.java:45)
> [junit]
> [junit]
> [junit] Testcase: testTimeSort(org.apache.cassandra.db.TimeSortTest): Caused
> an ERROR
> [junit] null
> [junit] java.lang.NullPointerException
> [junit] at
> org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
> [junit] at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
> [junit] at org.apache.cassandra.db.RowMutation.add(RowMutation.java:157)
> [junit] at
> org.apache.cassandra.db.TimeSortTest.testTimeSort(TimeSortTest.java:69)
> [junit]
> [junit]
> [junit] Testsuite: org.apache.cassandra.db.marshal.AsciiTypeTest
> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.15 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.db.marshal.BytesTypeTest
> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.156 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.db.marshal.UTF8TypeTest
> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.106 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.dht.BootStrapperTest
> [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 1.029 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.dht.BootstrapTest
> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.71 sec
> [junit]
> [junit] Testsuite:
> org.apache.cassandra.dht.CollatingOrderPreservingPartitionerTest
> [junit] Tests run: 8, Failures: 0, Errors: 0, Time elapsed: 0.601 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.dht.OrderPreservingPartitionerTest
> [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0.489 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.dht.RandomPartitionerTest
> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.16 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.dht.RangeTest
> [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.085 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.gms.ArrivalWindowTest
> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.158 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.gms.GossipDigestTest
> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.086 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.io.DataInputBufferTest
> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.084 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.io.SSTableTest
> [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 1.239 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.locator.RackUnawareStrategyTest
> [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.61 sec
> [junit]
> [junit] Testsuite:
> org.apache.cassandra.net.CompactEndPointSerializationHelperTest
> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.497 sec
> [junit]
> [junit] ------------- Standard Output ---------------
> [junit] 4
> [junit] /127.0.0.1
> [junit] ------------- ---------------- ---------------
> [junit] Testsuite: org.apache.cassandra.service.CassandraServerTest
> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.404 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.utils.BloomFilterTest
> [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.789 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.utils.BoundedStatsDequeTest
> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.07 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.utils.FBUtilitiesTest
> [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.171 sec
> [junit]
> [junit] Testsuite: org.apache.cassandra.utils.FilterTest
> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.429 sec
> [junit]
> -----------------------------------------------------
>
>
> best regards
> Paul.
>
>
> On Sat, Nov 14, 2009 at 4:26 PM, Michael Greene <mi...@gmail.com>wrote:
>
>> > What can I do to run the tests?
>> `ant test` will run the unit tests
>>
>> ant gen-thrift-py
>> nosetests
>>
>> will run the system tests if you have python and nose available
>>
>> Michael
>>
>

Re: 2 problems running Cassandra as a developper

Posted by Paul Sabou <pa...@gmail.com>.
Hi,

Thank you for the advice.
The project can be build with "ant build" OK
The project can be cleaned with "ant clean" OK
But when I run :
ant clean
ant test

I still get a bunch of test failures. The "ant test" outuput is below :
-------------------------------------
Buildfile: build.xml

build-subprojects:

init:
[mkdir] Created dir: /root/software/cassandra/trunk/build/classes
[mkdir] Created dir: /root/software/cassandra/trunk/build/test/classes
[mkdir] Created dir: /root/software/cassandra/trunk/src/gen-java

check-gen-cli-grammar:

gen-cli-grammar:
[echo] Building Grammar
/root/software/cassandra/trunk/src/java/org/apache/cassandra/cli/Cli.g ....

build-project:
[echo] apache-cassandra-incubating: /root/software/cassandra/trunk/build.xml
[javac] Compiling 241 source files to
/root/software/cassandra/trunk/build/classes
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.

build:

build-test:
[javac] Compiling 48 source files to
/root/software/cassandra/trunk/build/test/classes
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.

test:
[echo] running tests
[mkdir] Created dir: /root/software/cassandra/trunk/build/test/cassandra
[mkdir] Created dir: /root/software/cassandra/trunk/build/test/output
[junit] Testsuite: org.apache.cassandra.config.DatabaseDescriptorTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.883 sec
[junit]
[junit] Testsuite: org.apache.cassandra.db.ColumnFamilyStoreTest
[junit] Tests run: 3, Failures: 0, Errors: 1, Time elapsed: 1.121 sec
[junit]
[junit] Testcase:
testAntiCompaction1(org.apache.cassandra.db.ColumnFamilyStoreTest): Caused
an ERROR
[junit] java.util.concurrent.ExecutionException:
java.lang.ClassCastException: [B cannot be cast to java.math.BigInteger
[junit] java.lang.RuntimeException: java.util.concurrent.ExecutionException:
java.lang.ClassCastException: [B cannot be cast to java.math.BigInteger
[junit] at
org.apache.cassandra.db.ColumnFamilyStore.forceAntiCompaction(ColumnFamilyStore.java:307)
[junit] at
org.apache.cassandra.db.ColumnFamilyStoreTest.testAntiCompaction(ColumnFamilyStoreTest.java:126)
[junit] at
org.apache.cassandra.db.ColumnFamilyStoreTest.testAntiCompaction1(ColumnFamilyStoreTest.java:133)
[junit] Caused by: java.util.concurrent.ExecutionException:
java.lang.ClassCastException: [B cannot be cast to java.math.BigInteger
[junit] at
java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
[junit] at java.util.concurrent.FutureTask.get(FutureTask.java:83)
[junit] at
org.apache.cassandra.db.ColumnFamilyStore.forceAntiCompaction(ColumnFamilyStore.java:301)
[junit] Caused by: java.lang.ClassCastException: [B cannot be cast to
java.math.BigInteger
[junit] at
org.apache.cassandra.dht.BigIntegerToken.compareTo(BigIntegerToken.java:38)
[junit] at org.apache.cassandra.dht.Range.contains(Range.java:102)
[junit] at org.apache.cassandra.dht.Range.isTokenInRanges(Range.java:144)
[junit] at
org.apache.cassandra.db.ColumnFamilyStore.doFileAntiCompaction(ColumnFamilyStore.java:819)
[junit] at
org.apache.cassandra.db.ColumnFamilyStore.doAntiCompaction(ColumnFamilyStore.java:735)
[junit] at
org.apache.cassandra.db.CompactionManager$FileCompactor2.call(CompactionManager.java:95)
[junit] at
org.apache.cassandra.db.CompactionManager$FileCompactor2.call(CompactionManager.java:75)
[junit] at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
[junit] at java.util.concurrent.FutureTask.run(FutureTask.java:138)
[junit] at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[junit] at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[junit] at java.lang.Thread.run(Thread.java:619)
[junit]
[junit]
[junit] Testsuite: org.apache.cassandra.db.ColumnFamilyTest
[junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.803 sec
[junit]
[junit] Testsuite: org.apache.cassandra.db.CommitLogTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.951 sec
[junit]
[junit] Testsuite: org.apache.cassandra.db.CompactionsTest
[junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 5.94 sec
[junit]
[junit] Testsuite: org.apache.cassandra.db.MultitableTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.783 sec
[junit]
[junit] Testcase: testSameCFs(org.apache.cassandra.db.MultitableTest):
Caused an ERROR
[junit] null
[junit] java.lang.NullPointerException
[junit] at
org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
[junit] at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
[junit] at
org.apache.cassandra.db.MultitableTest.testSameCFs(MultitableTest.java:51)
[junit]
[junit]
[junit] Testsuite: org.apache.cassandra.db.NameSortTest
[junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 4.197 sec
[junit]
[junit] Testsuite: org.apache.cassandra.db.OneCompactionTest
[junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 1.108 sec
[junit]
[junit] Testsuite: org.apache.cassandra.db.ReadMessageTest
[junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.729 sec
[junit]
[junit] Testsuite: org.apache.cassandra.db.RecoveryManager2Test
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.783 sec
[junit]
[junit] Testsuite: org.apache.cassandra.db.RecoveryManagerTest
[junit] Tests run: 2, Failures: 0, Errors: 1, Time elapsed: 0.551 sec
[junit]
[junit] Testcase: testOne(org.apache.cassandra.db.RecoveryManagerTest):
Caused an ERROR
[junit] null
[junit] java.lang.NullPointerException
[junit] at
org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
[junit] at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
[junit] at
org.apache.cassandra.db.RecoveryManagerTest.testOne(RecoveryManagerTest.java:58)
[junit]
[junit]
[junit] Testsuite: org.apache.cassandra.db.RemoveColumnFamilyTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.77 sec
[junit]
[junit] Testsuite: org.apache.cassandra.db.RemoveColumnFamilyWithFlush1Test
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.716 sec
[junit]
[junit] Testsuite: org.apache.cassandra.db.RemoveColumnFamilyWithFlush2Test
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.847 sec
[junit]
[junit] Testsuite: org.apache.cassandra.db.RemoveColumnTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.815 sec
[junit]
[junit] Testsuite: org.apache.cassandra.db.RemoveSubColumnTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.723 sec
[junit]
[junit] Testsuite: org.apache.cassandra.db.RemoveSuperColumnTest
[junit] Tests run: 3, Failures: 0, Errors: 2, Time elapsed: 0.909 sec
[junit]
[junit] Testcase:
testRemoveDeletedSubColumn(org.apache.cassandra.db.RemoveSuperColumnTest):
Caused an ERROR
[junit] null
[junit] java.lang.NullPointerException
[junit] at
org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
[junit] at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
[junit] at org.apache.cassandra.db.RowMutation.add(RowMutation.java:157)
[junit] at org.apache.cassandra.Util.addMutation(Util.java:39)
[junit] at
org.apache.cassandra.db.RemoveSuperColumnTest.testRemoveDeletedSubColumn(RemoveSuperColumnTest.java:76)
[junit]
[junit]
[junit] Testcase:
testRemoveSuperColumnWithNewData(org.apache.cassandra.db.RemoveSuperColumnTest):
Caused an ERROR
[junit] null
[junit] java.lang.NullPointerException
[junit] at
org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
[junit] at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
[junit] at org.apache.cassandra.db.RowMutation.add(RowMutation.java:157)
[junit] at org.apache.cassandra.Util.addMutation(Util.java:39)
[junit] at
org.apache.cassandra.db.RemoveSuperColumnTest.testRemoveSuperColumnWithNewData(RemoveSuperColumnTest.java:128)
[junit]
[junit]
[junit] Testsuite: org.apache.cassandra.db.RowTest
[junit] Tests run: 3, Failures: 0, Errors: 1, Time elapsed: 0.485 sec
[junit]
[junit] Testcase: testRepair(org.apache.cassandra.db.RowTest): Caused an
ERROR
[junit] null
[junit] java.lang.NullPointerException
[junit] at
org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
[junit] at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
[junit] at org.apache.cassandra.db.RowTest.testRepair(RowTest.java:72)
[junit]
[junit]
[junit] Testsuite: org.apache.cassandra.db.SuperColumnTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.163 sec
[junit]
[junit] Testsuite: org.apache.cassandra.db.SystemTableTest
[junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.457 sec
[junit]
[junit] Testsuite: org.apache.cassandra.db.TableTest
[junit] Tests run: 10, Failures: 2, Errors: 1, Time elapsed: 2.06 sec
[junit]
[junit] Testcase: testGetRowNoColumns(org.apache.cassandra.db.TableTest):
Caused an ERROR
[junit] null
[junit] java.lang.NullPointerException
[junit] at
org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
[junit] at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
[junit] at
org.apache.cassandra.db.TableTest.testGetRowNoColumns(TableTest.java:74)
[junit]
[junit]
[junit] Testcase: testGetSliceWithCutoff(org.apache.cassandra.db.TableTest):
FAILED
[junit] Unexpected column index size, block boundaries won't be where tests
expect them.
[junit] junit.framework.AssertionFailedError: Unexpected column index size,
block boundaries won't be where tests expect them.
[junit] at org.apache.cassandra.db.TableTest$3.run(TableTest.java:201)
[junit] at org.apache.cassandra.db.TableTest.reTest(TableTest.java:55)
[junit] at
org.apache.cassandra.db.TableTest.testGetSliceWithCutoff(TableTest.java:232)
[junit]
[junit]
[junit] Testcase: testGetSliceFromLarge(org.apache.cassandra.db.TableTest):
FAILED
[junit] null
[junit] junit.framework.AssertionFailedError
[junit] at
org.apache.cassandra.db.TableTest.testGetSliceFromLarge(TableTest.java:376)
[junit]
[junit]
[junit] Testsuite: org.apache.cassandra.db.TimeSortTest
[junit] Tests run: 2, Failures: 0, Errors: 2, Time elapsed: 0.472 sec
[junit]
[junit] Testcase: testMixedSources(org.apache.cassandra.db.TimeSortTest):
Caused an ERROR
[junit] null
[junit] java.lang.NullPointerException
[junit] at
org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
[junit] at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
[junit] at org.apache.cassandra.db.RowMutation.add(RowMutation.java:157)
[junit] at
org.apache.cassandra.db.TimeSortTest.testMixedSources(TimeSortTest.java:45)
[junit]
[junit]
[junit] Testcase: testTimeSort(org.apache.cassandra.db.TimeSortTest): Caused
an ERROR
[junit] null
[junit] java.lang.NullPointerException
[junit] at
org.apache.cassandra.config.DatabaseDescriptor.getComparator(DatabaseDescriptor.java:896)
[junit] at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:72)
[junit] at org.apache.cassandra.db.RowMutation.add(RowMutation.java:157)
[junit] at
org.apache.cassandra.db.TimeSortTest.testTimeSort(TimeSortTest.java:69)
[junit]
[junit]
[junit] Testsuite: org.apache.cassandra.db.marshal.AsciiTypeTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.15 sec
[junit]
[junit] Testsuite: org.apache.cassandra.db.marshal.BytesTypeTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.156 sec
[junit]
[junit] Testsuite: org.apache.cassandra.db.marshal.UTF8TypeTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.106 sec
[junit]
[junit] Testsuite: org.apache.cassandra.dht.BootStrapperTest
[junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 1.029 sec
[junit]
[junit] Testsuite: org.apache.cassandra.dht.BootstrapTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.71 sec
[junit]
[junit] Testsuite:
org.apache.cassandra.dht.CollatingOrderPreservingPartitionerTest
[junit] Tests run: 8, Failures: 0, Errors: 0, Time elapsed: 0.601 sec
[junit]
[junit] Testsuite: org.apache.cassandra.dht.OrderPreservingPartitionerTest
[junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0.489 sec
[junit]
[junit] Testsuite: org.apache.cassandra.dht.RandomPartitionerTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.16 sec
[junit]
[junit] Testsuite: org.apache.cassandra.dht.RangeTest
[junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.085 sec
[junit]
[junit] Testsuite: org.apache.cassandra.gms.ArrivalWindowTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.158 sec
[junit]
[junit] Testsuite: org.apache.cassandra.gms.GossipDigestTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.086 sec
[junit]
[junit] Testsuite: org.apache.cassandra.io.DataInputBufferTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.084 sec
[junit]
[junit] Testsuite: org.apache.cassandra.io.SSTableTest
[junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 1.239 sec
[junit]
[junit] Testsuite: org.apache.cassandra.locator.RackUnawareStrategyTest
[junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.61 sec
[junit]
[junit] Testsuite:
org.apache.cassandra.net.CompactEndPointSerializationHelperTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.497 sec
[junit]
[junit] ------------- Standard Output ---------------
[junit] 4
[junit] /127.0.0.1
[junit] ------------- ---------------- ---------------
[junit] Testsuite: org.apache.cassandra.service.CassandraServerTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.404 sec
[junit]
[junit] Testsuite: org.apache.cassandra.utils.BloomFilterTest
[junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.789 sec
[junit]
[junit] Testsuite: org.apache.cassandra.utils.BoundedStatsDequeTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.07 sec
[junit]
[junit] Testsuite: org.apache.cassandra.utils.FBUtilitiesTest
[junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.171 sec
[junit]
[junit] Testsuite: org.apache.cassandra.utils.FilterTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.429 sec
[junit]
-----------------------------------------------------


best regards
Paul.


On Sat, Nov 14, 2009 at 4:26 PM, Michael Greene <mi...@gmail.com>wrote:

> > What can I do to run the tests?
> `ant test` will run the unit tests
>
> ant gen-thrift-py
> nosetests
>
> will run the system tests if you have python and nose available
>
> Michael
>

Re: 2 problems running Cassandra as a developper

Posted by Michael Greene <mi...@gmail.com>.
> What can I do to run the tests?
`ant test` will run the unit tests

ant gen-thrift-py
nosetests

will run the system tests if you have python and nose available

Michael

Re: 2 problems running Cassandra as a developper

Posted by Jonathan Ellis <jb...@gmail.com>.
More here: http://wiki.apache.org/cassandra/HowToContribute

On Sat, Nov 14, 2009 at 9:43 AM, Jonathan Ellis <jb...@gmail.com> wrote:
> ant test
> nosetests
>
> On Sat, Nov 14, 2009 at 9:12 AM, Paul Sabou <pa...@gmail.com> wrote:
>> Hi,
>>
>> Thank you for your quick answer. Now it works. You are perfectly right.
>>
>> On Sat, Nov 14, 2009 at 3:23 PM, Jonathan Ellis <jb...@gmail.com> wrote:
>>
>>> first just get it working: ant; bin/cassandra -f
>>>
>>> the EOF during recovery looks like you are trying to run trunk against
>>> 0.4 commitlog files, which doesn't work (flush the 0.4 install first
>>> to clean out commit logs)
>>>
>>
>>
>> What happened :
>> (1) cassandra uses two places to store stuff (log's, commit logs, etc.) :
>> - "/var/lib/cassandra"
>> - "/var/log/cassandra"
>> (2) before downloading the trunk I have installed the cassandra binary
>> (version 0.4) and runned it
>> (3) cassandra (0.4) dumbed some commit logs in those directories
>> (4) i downloaded the source files from trunk that belong to a version > 0.4
>> (5) when I tried to run it from eclipse (from the main class) it tried to
>> reload the commit logs from the two directories ("/var/lib/cassandra" and
>> "/var/log/cassndra") but because the log files had an old format (0.4
>> format) => it crashed
>>
>> After i have deleted the commit log files I can start it from main. Great.
>>
>> What can I do to run the tests?
>>
>>
>> best regards
>> Paul.
>>
>>
>>
>>>
>>> On Sat, Nov 14, 2009 at 8:10 AM, Paul Sabou <pa...@gmail.com> wrote:
>>> > Hi,
>>> >
>>> > Thank you for the advice. I have reimported the Eclipse project as a
>>> > standard JAVA project and builded it again with ant and both problems
>>> still
>>> > persist.
>>> >
>>> >
>>> > In the first case (not beeing able to run from main) it seems that it is
>>> > missing some files from where it want to deserialise something
>>> > (I assume the RecoveryManager -> CommitLog looks for some log files that
>>> > store serialized objects) and it seems that the log files are not there.
>>> >
>>> >
>>> > What can I do to make it work? Should I try another IDE (like Idea) or
>>> what?
>>> > It seems to be a rather trivial problem and any new developper interested
>>> in
>>> > Cassandra will run in the same problems when trying to run it in
>>> > Eclipse/Linux.
>>> >
>>> > Any help/suggestion is appreciated.
>>> >
>>> > best regards
>>> > Paul.
>>> >
>>> >
>>> >
>>> > On Sat, Nov 14, 2009 at 2:06 PM, Jonathan Ellis <jb...@gmail.com>
>>> wrote:
>>> >
>>> >> It's not a maven project.  It just has a pom.xml to help other project
>>> >> that do use maven and want cassandra as a dependency.  Looks like
>>> >> importing it as a maven project results in an incomplete build.
>>> >>
>>> >> On Sat, Nov 14, 2009 at 6:01 AM, Paul Sabou <pa...@gmail.com>
>>> wrote:
>>> >> > Hi,
>>> >> >
>>> >> > I'am new to Cassandra. I'am trying to run it in Eclipse and I seems to
>>> >> > fail because some trivial reasons.
>>> >> >
>>> >> > I have an Ubuntu 9.04 and I use MyEclipse.
>>> >> > I have checked out Cassandra from SVN and after I have installed
>>> >> > thrift I could run the
>>> >> > nosetests script succesfully.
>>> >> >
>>> >> > I have imported the trunk folder into MyEclipse with the following
>>> steps
>>> >> :
>>> >> > (1) runned "mvn eclipse:eclipse" in the trunk folder
>>> >> > (2) imported the project as an existing maven project
>>> >> >
>>> >> > and everything is ok up to here.
>>> >> >
>>> >> > I want to do two things now with the Cassandra project (that don't
>>> >> > work) in MyEclipse :
>>> >> >
>>> >> > (1) I want to run it from main :
>>> >> > - I followed the IDE instructions from
>>> >> > http://wiki.apache.org/cassandra/HowToContribute
>>> >> > running  "org.apache.cassandra.service.CassandraDaemon" class  with
>>> >> > the following VM arguments : "-ea -Xmx1G -Dstorage-config=conf
>>> >> > -Dcassandra-foreground"
>>> >> > - I get the following stack trace :
>>> >> >
>>> >> > --------------------------------------------
>>> >> > Exception encountered during startup.
>>> >> > java.io.EOFException
>>> >> >        at java.io.DataInputStream.readFully(DataInputStream.java:180)
>>> >> >        at java.io.DataInputStream.readUTF(DataInputStream.java:592)
>>> >> >        at java.io.DataInputStream.readUTF(DataInputStream.java:547)
>>> >> >        at
>>> >>
>>> org.apache.cassandra.db.ColumnFamilySerializer.readComparator(ColumnFamilySerializer.java:115)
>>> >> >        at
>>> >>
>>> org.apache.cassandra.db.ColumnFamilySerializer.deserialize(ColumnFamilySerializer.java:98)
>>> >> >        at
>>> >>
>>> org.apache.cassandra.db.RowMutationSerializer.defreezeTheMaps(RowMutation.java:310)
>>> >> >        at
>>> >>
>>> org.apache.cassandra.db.RowMutationSerializer.deserialize(RowMutation.java:320)
>>> >> >        at
>>> >>
>>> org.apache.cassandra.db.RowMutationSerializer.deserialize(RowMutation.java:1)
>>> >> >        at
>>> org.apache.cassandra.db.CommitLog.recover(CommitLog.java:327)
>>> >> >        at
>>> >>
>>> org.apache.cassandra.db.RecoveryManager.doRecovery(RecoveryManager.java:65)
>>> >> >        at
>>> >>
>>> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:90)
>>> >> >        at
>>> >>
>>> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:166)
>>> >> >
>>> >> > ----------------------------------------------
>>> >> >
>>> >> > It seems that the RecoveryManager doesn't work as it was expected =>
>>> >> > if I comment the line 90 in CassandraDaemon.java
>>> >> > "recoveryMgr.doRecovery();" everything starts up correctly.
>>> >> >
>>> >> > I think I'am missing some config file or something similar. Can you
>>> >> > please tell me what should I do?
>>> >> >
>>> >> > (2) I want to run the test suite :
>>> >> > - When I run the test suite many tests fail with something like :
>>> >> > -----------------------------------------------
>>> >> > java.lang.NoClassDefFoundError: Could not initialize class
>>> >> > org.apache.cassandra.config.DatabaseDescriptor
>>> >> >        at
>>> >> org.apache.cassandra.db.Table$TableMetadata.<clinit>(Table.java:70)
>>> >> >        at org.apache.cassandra.db.Table.<init>(Table.java:354)
>>> >> >        at org.apache.cassandra.db.Table.open(Table.java:184)
>>> >> >        at
>>> >>
>>> org.apache.cassandra.db.RemoveSuperColumnTest.testRemoveSuperColumn(RemoveSuperColumnTest.java:43)
>>> >> >        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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>>> >> >        at
>>> >>
>>> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>>> >> >        at
>>> >>
>>> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>>> >> >        at
>>> >>
>>> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
>>> >> >        at
>>> >>
>>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>>> >> >        at
>>> >>
>>> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>>> >> >        at
>>> >>
>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
>>> >> >        at
>>> >>
>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:44)
>>> >> >        at
>>> >> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
>>> >> >        at
>>> org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
>>> >> >        at
>>> >> org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
>>> >> >        at
>>> >>
>>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>>> >> >        at
>>> >>
>>> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>>> >> >        at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
>>> >> >        at
>>> >>
>>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
>>> >> >        at
>>> >>
>>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>>> >> >        at
>>> >>
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>>> >> >        at
>>> >>
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>>> >> >        at
>>> >>
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>>> >> >        at
>>> >>
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>>> >> > -----------------------------------------------
>>> >> >
>>> >> >
>>> >> > I think that this is also my fault for not putting the right config
>>> >> > file in the right place. Can you please tell me what to do?
>>> >> >
>>> >> >
>>> >> > best regards
>>> >> > Paul.
>>> >> >
>>> >>
>>> >
>>>
>>
>

Re: 2 problems running Cassandra as a developper

Posted by Jonathan Ellis <jb...@gmail.com>.
ant test
nosetests

On Sat, Nov 14, 2009 at 9:12 AM, Paul Sabou <pa...@gmail.com> wrote:
> Hi,
>
> Thank you for your quick answer. Now it works. You are perfectly right.
>
> On Sat, Nov 14, 2009 at 3:23 PM, Jonathan Ellis <jb...@gmail.com> wrote:
>
>> first just get it working: ant; bin/cassandra -f
>>
>> the EOF during recovery looks like you are trying to run trunk against
>> 0.4 commitlog files, which doesn't work (flush the 0.4 install first
>> to clean out commit logs)
>>
>
>
> What happened :
> (1) cassandra uses two places to store stuff (log's, commit logs, etc.) :
> - "/var/lib/cassandra"
> - "/var/log/cassandra"
> (2) before downloading the trunk I have installed the cassandra binary
> (version 0.4) and runned it
> (3) cassandra (0.4) dumbed some commit logs in those directories
> (4) i downloaded the source files from trunk that belong to a version > 0.4
> (5) when I tried to run it from eclipse (from the main class) it tried to
> reload the commit logs from the two directories ("/var/lib/cassandra" and
> "/var/log/cassndra") but because the log files had an old format (0.4
> format) => it crashed
>
> After i have deleted the commit log files I can start it from main. Great.
>
> What can I do to run the tests?
>
>
> best regards
> Paul.
>
>
>
>>
>> On Sat, Nov 14, 2009 at 8:10 AM, Paul Sabou <pa...@gmail.com> wrote:
>> > Hi,
>> >
>> > Thank you for the advice. I have reimported the Eclipse project as a
>> > standard JAVA project and builded it again with ant and both problems
>> still
>> > persist.
>> >
>> >
>> > In the first case (not beeing able to run from main) it seems that it is
>> > missing some files from where it want to deserialise something
>> > (I assume the RecoveryManager -> CommitLog looks for some log files that
>> > store serialized objects) and it seems that the log files are not there.
>> >
>> >
>> > What can I do to make it work? Should I try another IDE (like Idea) or
>> what?
>> > It seems to be a rather trivial problem and any new developper interested
>> in
>> > Cassandra will run in the same problems when trying to run it in
>> > Eclipse/Linux.
>> >
>> > Any help/suggestion is appreciated.
>> >
>> > best regards
>> > Paul.
>> >
>> >
>> >
>> > On Sat, Nov 14, 2009 at 2:06 PM, Jonathan Ellis <jb...@gmail.com>
>> wrote:
>> >
>> >> It's not a maven project.  It just has a pom.xml to help other project
>> >> that do use maven and want cassandra as a dependency.  Looks like
>> >> importing it as a maven project results in an incomplete build.
>> >>
>> >> On Sat, Nov 14, 2009 at 6:01 AM, Paul Sabou <pa...@gmail.com>
>> wrote:
>> >> > Hi,
>> >> >
>> >> > I'am new to Cassandra. I'am trying to run it in Eclipse and I seems to
>> >> > fail because some trivial reasons.
>> >> >
>> >> > I have an Ubuntu 9.04 and I use MyEclipse.
>> >> > I have checked out Cassandra from SVN and after I have installed
>> >> > thrift I could run the
>> >> > nosetests script succesfully.
>> >> >
>> >> > I have imported the trunk folder into MyEclipse with the following
>> steps
>> >> :
>> >> > (1) runned "mvn eclipse:eclipse" in the trunk folder
>> >> > (2) imported the project as an existing maven project
>> >> >
>> >> > and everything is ok up to here.
>> >> >
>> >> > I want to do two things now with the Cassandra project (that don't
>> >> > work) in MyEclipse :
>> >> >
>> >> > (1) I want to run it from main :
>> >> > - I followed the IDE instructions from
>> >> > http://wiki.apache.org/cassandra/HowToContribute
>> >> > running  "org.apache.cassandra.service.CassandraDaemon" class  with
>> >> > the following VM arguments : "-ea -Xmx1G -Dstorage-config=conf
>> >> > -Dcassandra-foreground"
>> >> > - I get the following stack trace :
>> >> >
>> >> > --------------------------------------------
>> >> > Exception encountered during startup.
>> >> > java.io.EOFException
>> >> >        at java.io.DataInputStream.readFully(DataInputStream.java:180)
>> >> >        at java.io.DataInputStream.readUTF(DataInputStream.java:592)
>> >> >        at java.io.DataInputStream.readUTF(DataInputStream.java:547)
>> >> >        at
>> >>
>> org.apache.cassandra.db.ColumnFamilySerializer.readComparator(ColumnFamilySerializer.java:115)
>> >> >        at
>> >>
>> org.apache.cassandra.db.ColumnFamilySerializer.deserialize(ColumnFamilySerializer.java:98)
>> >> >        at
>> >>
>> org.apache.cassandra.db.RowMutationSerializer.defreezeTheMaps(RowMutation.java:310)
>> >> >        at
>> >>
>> org.apache.cassandra.db.RowMutationSerializer.deserialize(RowMutation.java:320)
>> >> >        at
>> >>
>> org.apache.cassandra.db.RowMutationSerializer.deserialize(RowMutation.java:1)
>> >> >        at
>> org.apache.cassandra.db.CommitLog.recover(CommitLog.java:327)
>> >> >        at
>> >>
>> org.apache.cassandra.db.RecoveryManager.doRecovery(RecoveryManager.java:65)
>> >> >        at
>> >>
>> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:90)
>> >> >        at
>> >>
>> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:166)
>> >> >
>> >> > ----------------------------------------------
>> >> >
>> >> > It seems that the RecoveryManager doesn't work as it was expected =>
>> >> > if I comment the line 90 in CassandraDaemon.java
>> >> > "recoveryMgr.doRecovery();" everything starts up correctly.
>> >> >
>> >> > I think I'am missing some config file or something similar. Can you
>> >> > please tell me what should I do?
>> >> >
>> >> > (2) I want to run the test suite :
>> >> > - When I run the test suite many tests fail with something like :
>> >> > -----------------------------------------------
>> >> > java.lang.NoClassDefFoundError: Could not initialize class
>> >> > org.apache.cassandra.config.DatabaseDescriptor
>> >> >        at
>> >> org.apache.cassandra.db.Table$TableMetadata.<clinit>(Table.java:70)
>> >> >        at org.apache.cassandra.db.Table.<init>(Table.java:354)
>> >> >        at org.apache.cassandra.db.Table.open(Table.java:184)
>> >> >        at
>> >>
>> org.apache.cassandra.db.RemoveSuperColumnTest.testRemoveSuperColumn(RemoveSuperColumnTest.java:43)
>> >> >        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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>> >> >        at
>> >>
>> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>> >> >        at
>> >>
>> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>> >> >        at
>> >>
>> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
>> >> >        at
>> >>
>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>> >> >        at
>> >>
>> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>> >> >        at
>> >>
>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
>> >> >        at
>> >>
>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:44)
>> >> >        at
>> >> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
>> >> >        at
>> org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
>> >> >        at
>> >> org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
>> >> >        at
>> >>
>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>> >> >        at
>> >>
>> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>> >> >        at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
>> >> >        at
>> >>
>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
>> >> >        at
>> >>
>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>> >> >        at
>> >>
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>> >> >        at
>> >>
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>> >> >        at
>> >>
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>> >> >        at
>> >>
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>> >> > -----------------------------------------------
>> >> >
>> >> >
>> >> > I think that this is also my fault for not putting the right config
>> >> > file in the right place. Can you please tell me what to do?
>> >> >
>> >> >
>> >> > best regards
>> >> > Paul.
>> >> >
>> >>
>> >
>>
>

Re: 2 problems running Cassandra as a developper

Posted by Paul Sabou <pa...@gmail.com>.
Hi,

Thank you for your quick answer. Now it works. You are perfectly right.

On Sat, Nov 14, 2009 at 3:23 PM, Jonathan Ellis <jb...@gmail.com> wrote:

> first just get it working: ant; bin/cassandra -f
>
> the EOF during recovery looks like you are trying to run trunk against
> 0.4 commitlog files, which doesn't work (flush the 0.4 install first
> to clean out commit logs)
>


What happened :
(1) cassandra uses two places to store stuff (log's, commit logs, etc.) :
- "/var/lib/cassandra"
- "/var/log/cassandra"
(2) before downloading the trunk I have installed the cassandra binary
(version 0.4) and runned it
(3) cassandra (0.4) dumbed some commit logs in those directories
(4) i downloaded the source files from trunk that belong to a version > 0.4
(5) when I tried to run it from eclipse (from the main class) it tried to
reload the commit logs from the two directories ("/var/lib/cassandra" and
"/var/log/cassndra") but because the log files had an old format (0.4
format) => it crashed

After i have deleted the commit log files I can start it from main. Great.

What can I do to run the tests?


best regards
Paul.



>
> On Sat, Nov 14, 2009 at 8:10 AM, Paul Sabou <pa...@gmail.com> wrote:
> > Hi,
> >
> > Thank you for the advice. I have reimported the Eclipse project as a
> > standard JAVA project and builded it again with ant and both problems
> still
> > persist.
> >
> >
> > In the first case (not beeing able to run from main) it seems that it is
> > missing some files from where it want to deserialise something
> > (I assume the RecoveryManager -> CommitLog looks for some log files that
> > store serialized objects) and it seems that the log files are not there.
> >
> >
> > What can I do to make it work? Should I try another IDE (like Idea) or
> what?
> > It seems to be a rather trivial problem and any new developper interested
> in
> > Cassandra will run in the same problems when trying to run it in
> > Eclipse/Linux.
> >
> > Any help/suggestion is appreciated.
> >
> > best regards
> > Paul.
> >
> >
> >
> > On Sat, Nov 14, 2009 at 2:06 PM, Jonathan Ellis <jb...@gmail.com>
> wrote:
> >
> >> It's not a maven project.  It just has a pom.xml to help other project
> >> that do use maven and want cassandra as a dependency.  Looks like
> >> importing it as a maven project results in an incomplete build.
> >>
> >> On Sat, Nov 14, 2009 at 6:01 AM, Paul Sabou <pa...@gmail.com>
> wrote:
> >> > Hi,
> >> >
> >> > I'am new to Cassandra. I'am trying to run it in Eclipse and I seems to
> >> > fail because some trivial reasons.
> >> >
> >> > I have an Ubuntu 9.04 and I use MyEclipse.
> >> > I have checked out Cassandra from SVN and after I have installed
> >> > thrift I could run the
> >> > nosetests script succesfully.
> >> >
> >> > I have imported the trunk folder into MyEclipse with the following
> steps
> >> :
> >> > (1) runned "mvn eclipse:eclipse" in the trunk folder
> >> > (2) imported the project as an existing maven project
> >> >
> >> > and everything is ok up to here.
> >> >
> >> > I want to do two things now with the Cassandra project (that don't
> >> > work) in MyEclipse :
> >> >
> >> > (1) I want to run it from main :
> >> > - I followed the IDE instructions from
> >> > http://wiki.apache.org/cassandra/HowToContribute
> >> > running  "org.apache.cassandra.service.CassandraDaemon" class  with
> >> > the following VM arguments : "-ea -Xmx1G -Dstorage-config=conf
> >> > -Dcassandra-foreground"
> >> > - I get the following stack trace :
> >> >
> >> > --------------------------------------------
> >> > Exception encountered during startup.
> >> > java.io.EOFException
> >> >        at java.io.DataInputStream.readFully(DataInputStream.java:180)
> >> >        at java.io.DataInputStream.readUTF(DataInputStream.java:592)
> >> >        at java.io.DataInputStream.readUTF(DataInputStream.java:547)
> >> >        at
> >>
> org.apache.cassandra.db.ColumnFamilySerializer.readComparator(ColumnFamilySerializer.java:115)
> >> >        at
> >>
> org.apache.cassandra.db.ColumnFamilySerializer.deserialize(ColumnFamilySerializer.java:98)
> >> >        at
> >>
> org.apache.cassandra.db.RowMutationSerializer.defreezeTheMaps(RowMutation.java:310)
> >> >        at
> >>
> org.apache.cassandra.db.RowMutationSerializer.deserialize(RowMutation.java:320)
> >> >        at
> >>
> org.apache.cassandra.db.RowMutationSerializer.deserialize(RowMutation.java:1)
> >> >        at
> org.apache.cassandra.db.CommitLog.recover(CommitLog.java:327)
> >> >        at
> >>
> org.apache.cassandra.db.RecoveryManager.doRecovery(RecoveryManager.java:65)
> >> >        at
> >>
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:90)
> >> >        at
> >>
> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:166)
> >> >
> >> > ----------------------------------------------
> >> >
> >> > It seems that the RecoveryManager doesn't work as it was expected =>
> >> > if I comment the line 90 in CassandraDaemon.java
> >> > "recoveryMgr.doRecovery();" everything starts up correctly.
> >> >
> >> > I think I'am missing some config file or something similar. Can you
> >> > please tell me what should I do?
> >> >
> >> > (2) I want to run the test suite :
> >> > - When I run the test suite many tests fail with something like :
> >> > -----------------------------------------------
> >> > java.lang.NoClassDefFoundError: Could not initialize class
> >> > org.apache.cassandra.config.DatabaseDescriptor
> >> >        at
> >> org.apache.cassandra.db.Table$TableMetadata.<clinit>(Table.java:70)
> >> >        at org.apache.cassandra.db.Table.<init>(Table.java:354)
> >> >        at org.apache.cassandra.db.Table.open(Table.java:184)
> >> >        at
> >>
> org.apache.cassandra.db.RemoveSuperColumnTest.testRemoveSuperColumn(RemoveSuperColumnTest.java:43)
> >> >        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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
> >> >        at
> >>
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
> >> >        at
> >>
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
> >> >        at
> >>
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
> >> >        at
> >>
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> >> >        at
> >>
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> >> >        at
> >>
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> >> >        at
> >>
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:44)
> >> >        at
> >> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
> >> >        at
> org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
> >> >        at
> >> org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
> >> >        at
> >>
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> >> >        at
> >>
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> >> >        at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
> >> >        at
> >>
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
> >> >        at
> >>
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> >> >        at
> >>
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> >> >        at
> >>
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> >> >        at
> >>
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> >> >        at
> >>
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> >> > -----------------------------------------------
> >> >
> >> >
> >> > I think that this is also my fault for not putting the right config
> >> > file in the right place. Can you please tell me what to do?
> >> >
> >> >
> >> > best regards
> >> > Paul.
> >> >
> >>
> >
>

Re: 2 problems running Cassandra as a developper

Posted by Jonathan Ellis <jb...@gmail.com>.
first just get it working: ant; bin/cassandra -f

the EOF during recovery looks like you are trying to run trunk against
0.4 commitlog files, which doesn't work (flush the 0.4 install first
to clean out commit logs)

On Sat, Nov 14, 2009 at 8:10 AM, Paul Sabou <pa...@gmail.com> wrote:
> Hi,
>
> Thank you for the advice. I have reimported the Eclipse project as a
> standard JAVA project and builded it again with ant and both problems still
> persist.
>
>
> In the first case (not beeing able to run from main) it seems that it is
> missing some files from where it want to deserialise something
> (I assume the RecoveryManager -> CommitLog looks for some log files that
> store serialized objects) and it seems that the log files are not there.
>
>
> What can I do to make it work? Should I try another IDE (like Idea) or what?
> It seems to be a rather trivial problem and any new developper interested in
> Cassandra will run in the same problems when trying to run it in
> Eclipse/Linux.
>
> Any help/suggestion is appreciated.
>
> best regards
> Paul.
>
>
>
> On Sat, Nov 14, 2009 at 2:06 PM, Jonathan Ellis <jb...@gmail.com> wrote:
>
>> It's not a maven project.  It just has a pom.xml to help other project
>> that do use maven and want cassandra as a dependency.  Looks like
>> importing it as a maven project results in an incomplete build.
>>
>> On Sat, Nov 14, 2009 at 6:01 AM, Paul Sabou <pa...@gmail.com> wrote:
>> > Hi,
>> >
>> > I'am new to Cassandra. I'am trying to run it in Eclipse and I seems to
>> > fail because some trivial reasons.
>> >
>> > I have an Ubuntu 9.04 and I use MyEclipse.
>> > I have checked out Cassandra from SVN and after I have installed
>> > thrift I could run the
>> > nosetests script succesfully.
>> >
>> > I have imported the trunk folder into MyEclipse with the following steps
>> :
>> > (1) runned "mvn eclipse:eclipse" in the trunk folder
>> > (2) imported the project as an existing maven project
>> >
>> > and everything is ok up to here.
>> >
>> > I want to do two things now with the Cassandra project (that don't
>> > work) in MyEclipse :
>> >
>> > (1) I want to run it from main :
>> > - I followed the IDE instructions from
>> > http://wiki.apache.org/cassandra/HowToContribute
>> > running  "org.apache.cassandra.service.CassandraDaemon" class  with
>> > the following VM arguments : "-ea -Xmx1G -Dstorage-config=conf
>> > -Dcassandra-foreground"
>> > - I get the following stack trace :
>> >
>> > --------------------------------------------
>> > Exception encountered during startup.
>> > java.io.EOFException
>> >        at java.io.DataInputStream.readFully(DataInputStream.java:180)
>> >        at java.io.DataInputStream.readUTF(DataInputStream.java:592)
>> >        at java.io.DataInputStream.readUTF(DataInputStream.java:547)
>> >        at
>> org.apache.cassandra.db.ColumnFamilySerializer.readComparator(ColumnFamilySerializer.java:115)
>> >        at
>> org.apache.cassandra.db.ColumnFamilySerializer.deserialize(ColumnFamilySerializer.java:98)
>> >        at
>> org.apache.cassandra.db.RowMutationSerializer.defreezeTheMaps(RowMutation.java:310)
>> >        at
>> org.apache.cassandra.db.RowMutationSerializer.deserialize(RowMutation.java:320)
>> >        at
>> org.apache.cassandra.db.RowMutationSerializer.deserialize(RowMutation.java:1)
>> >        at org.apache.cassandra.db.CommitLog.recover(CommitLog.java:327)
>> >        at
>> org.apache.cassandra.db.RecoveryManager.doRecovery(RecoveryManager.java:65)
>> >        at
>> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:90)
>> >        at
>> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:166)
>> >
>> > ----------------------------------------------
>> >
>> > It seems that the RecoveryManager doesn't work as it was expected =>
>> > if I comment the line 90 in CassandraDaemon.java
>> > "recoveryMgr.doRecovery();" everything starts up correctly.
>> >
>> > I think I'am missing some config file or something similar. Can you
>> > please tell me what should I do?
>> >
>> > (2) I want to run the test suite :
>> > - When I run the test suite many tests fail with something like :
>> > -----------------------------------------------
>> > java.lang.NoClassDefFoundError: Could not initialize class
>> > org.apache.cassandra.config.DatabaseDescriptor
>> >        at
>> org.apache.cassandra.db.Table$TableMetadata.<clinit>(Table.java:70)
>> >        at org.apache.cassandra.db.Table.<init>(Table.java:354)
>> >        at org.apache.cassandra.db.Table.open(Table.java:184)
>> >        at
>> org.apache.cassandra.db.RemoveSuperColumnTest.testRemoveSuperColumn(RemoveSuperColumnTest.java:43)
>> >        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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>> >        at
>> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>> >        at
>> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>> >        at
>> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
>> >        at
>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>> >        at
>> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>> >        at
>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
>> >        at
>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:44)
>> >        at
>> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
>> >        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
>> >        at
>> org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
>> >        at
>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>> >        at
>> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>> >        at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
>> >        at
>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
>> >        at
>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>> >        at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>> >        at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>> >        at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>> >        at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>> > -----------------------------------------------
>> >
>> >
>> > I think that this is also my fault for not putting the right config
>> > file in the right place. Can you please tell me what to do?
>> >
>> >
>> > best regards
>> > Paul.
>> >
>>
>

Re: 2 problems running Cassandra as a developper

Posted by Paul Sabou <pa...@gmail.com>.
Hi,

Thank you for the advice. I have reimported the Eclipse project as a
standard JAVA project and builded it again with ant and both problems still
persist.


In the first case (not beeing able to run from main) it seems that it is
missing some files from where it want to deserialise something
(I assume the RecoveryManager -> CommitLog looks for some log files that
store serialized objects) and it seems that the log files are not there.


What can I do to make it work? Should I try another IDE (like Idea) or what?
It seems to be a rather trivial problem and any new developper interested in
Cassandra will run in the same problems when trying to run it in
Eclipse/Linux.

Any help/suggestion is appreciated.

best regards
Paul.



On Sat, Nov 14, 2009 at 2:06 PM, Jonathan Ellis <jb...@gmail.com> wrote:

> It's not a maven project.  It just has a pom.xml to help other project
> that do use maven and want cassandra as a dependency.  Looks like
> importing it as a maven project results in an incomplete build.
>
> On Sat, Nov 14, 2009 at 6:01 AM, Paul Sabou <pa...@gmail.com> wrote:
> > Hi,
> >
> > I'am new to Cassandra. I'am trying to run it in Eclipse and I seems to
> > fail because some trivial reasons.
> >
> > I have an Ubuntu 9.04 and I use MyEclipse.
> > I have checked out Cassandra from SVN and after I have installed
> > thrift I could run the
> > nosetests script succesfully.
> >
> > I have imported the trunk folder into MyEclipse with the following steps
> :
> > (1) runned "mvn eclipse:eclipse" in the trunk folder
> > (2) imported the project as an existing maven project
> >
> > and everything is ok up to here.
> >
> > I want to do two things now with the Cassandra project (that don't
> > work) in MyEclipse :
> >
> > (1) I want to run it from main :
> > - I followed the IDE instructions from
> > http://wiki.apache.org/cassandra/HowToContribute
> > running  "org.apache.cassandra.service.CassandraDaemon" class  with
> > the following VM arguments : "-ea -Xmx1G -Dstorage-config=conf
> > -Dcassandra-foreground"
> > - I get the following stack trace :
> >
> > --------------------------------------------
> > Exception encountered during startup.
> > java.io.EOFException
> >        at java.io.DataInputStream.readFully(DataInputStream.java:180)
> >        at java.io.DataInputStream.readUTF(DataInputStream.java:592)
> >        at java.io.DataInputStream.readUTF(DataInputStream.java:547)
> >        at
> org.apache.cassandra.db.ColumnFamilySerializer.readComparator(ColumnFamilySerializer.java:115)
> >        at
> org.apache.cassandra.db.ColumnFamilySerializer.deserialize(ColumnFamilySerializer.java:98)
> >        at
> org.apache.cassandra.db.RowMutationSerializer.defreezeTheMaps(RowMutation.java:310)
> >        at
> org.apache.cassandra.db.RowMutationSerializer.deserialize(RowMutation.java:320)
> >        at
> org.apache.cassandra.db.RowMutationSerializer.deserialize(RowMutation.java:1)
> >        at org.apache.cassandra.db.CommitLog.recover(CommitLog.java:327)
> >        at
> org.apache.cassandra.db.RecoveryManager.doRecovery(RecoveryManager.java:65)
> >        at
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:90)
> >        at
> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:166)
> >
> > ----------------------------------------------
> >
> > It seems that the RecoveryManager doesn't work as it was expected =>
> > if I comment the line 90 in CassandraDaemon.java
> > "recoveryMgr.doRecovery();" everything starts up correctly.
> >
> > I think I'am missing some config file or something similar. Can you
> > please tell me what should I do?
> >
> > (2) I want to run the test suite :
> > - When I run the test suite many tests fail with something like :
> > -----------------------------------------------
> > java.lang.NoClassDefFoundError: Could not initialize class
> > org.apache.cassandra.config.DatabaseDescriptor
> >        at
> org.apache.cassandra.db.Table$TableMetadata.<clinit>(Table.java:70)
> >        at org.apache.cassandra.db.Table.<init>(Table.java:354)
> >        at org.apache.cassandra.db.Table.open(Table.java:184)
> >        at
> org.apache.cassandra.db.RemoveSuperColumnTest.testRemoveSuperColumn(RemoveSuperColumnTest.java:43)
> >        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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
> >        at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
> >        at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
> >        at
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
> >        at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> >        at
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> >        at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> >        at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:44)
> >        at
> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
> >        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
> >        at
> org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
> >        at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> >        at
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> >        at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
> >        at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
> >        at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> >        at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> >        at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> >        at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> >        at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> > -----------------------------------------------
> >
> >
> > I think that this is also my fault for not putting the right config
> > file in the right place. Can you please tell me what to do?
> >
> >
> > best regards
> > Paul.
> >
>

Re: overriding directories from command line

Posted by Jonathan Ellis <jb...@gmail.com>.
in theory I am okay with that as long as it doesn't make maintaining
DatabaseDescriptor even more of a chore :)

2009/11/16 Ted Zlatanov <tz...@lifelogs.com>:
> On Mon, 16 Nov 2009 09:54:45 -0600 Jonathan Ellis <jb...@gmail.com> wrote:
>
>>> A general configuration facility to allow named variables and
>>> interpolation, similar to what the Apache Commons Configuration classes
>>> do for XML Property files
>>> (http://commons.apache.org/configuration/apidocs/org/apache/commons/configuration/XMLPropertiesConfiguration.html),
>>> would be really nice too.
>
> JE> I'd rather move away from XML entirely to something like
> JE> http://jyaml.sourceforge.net/tutorial.html personally.
>
> Whatever is used, I'm suggesting that named variables and interpolation
> would be nice to have.  Do you think that's OK?  It would address all my
> points and probably make life easier for other people, too.
>
> Ted
>
>

Re: overriding directories from command line

Posted by Ted Zlatanov <tz...@lifelogs.com>.
On Mon, 16 Nov 2009 09:54:45 -0600 Jonathan Ellis <jb...@gmail.com> wrote: 

>> A general configuration facility to allow named variables and
>> interpolation, similar to what the Apache Commons Configuration classes
>> do for XML Property files
>> (http://commons.apache.org/configuration/apidocs/org/apache/commons/configuration/XMLPropertiesConfiguration.html),
>> would be really nice too.

JE> I'd rather move away from XML entirely to something like
JE> http://jyaml.sourceforge.net/tutorial.html personally.

Whatever is used, I'm suggesting that named variables and interpolation
would be nice to have.  Do you think that's OK?  It would address all my
points and probably make life easier for other people, too.

Ted


Re: overriding directories from command line

Posted by Ted Zlatanov <tz...@lifelogs.com>.
On Thu, 19 Nov 2009 21:00:20 -0600 Jonathan Mischo <jm...@quagility.com> wrote: 

JM> On Nov 16, 2009, at 9:54 AM, Jonathan Ellis wrote:

>> I'd rather move away from XML entirely to something like
>> http://jyaml.sourceforge.net/tutorial.html personally.

JM> +10 on moving to YAML for config files, as it's FAR more legible

I'd rather not worry about the format.  This is why I suggest the
Apache Commons Configuration classes, which can be easily adapted to
support YAML or whatever format (or a JDBC read, etc.) in a uniform
way.

Ted


Re: overriding directories from command line (was: 2 problems running Cassandra as a developper)

Posted by Jonathan Mischo <jm...@quagility.com>.
+10 on moving to YAML for config files, as it's FAR more legible

On Nov 16, 2009, at 9:54 AM, Jonathan Ellis wrote:

> 2009/11/16 Ted Zlatanov <tz...@lifelogs.com>:
>> - allow a prefix here, e.g. /usr/local/cassandra instead of the  
>> default /var
>
> -1 on this, I think it makes it too easy to shoot yourself in the  
> foot.
>
>> - allow passing the prefix and any of the directories from the  
>> command
>>  line
>
> -1 on this too; we've already made it easy to run different config
> files from the same binaries --
> http://wiki.apache.org/cassandra/RunningCassandra -- and
> search-and-replace is easy enough.
>
>> A general configuration facility to allow named variables and
>> interpolation, similar to what the Apache Commons Configuration  
>> classes
>> do for XML Property files
>> (http://commons.apache.org/configuration/apidocs/org/apache/commons/configuration/XMLPropertiesConfiguration.html 
>> ),
>> would be really nice too.
>
> I'd rather move away from XML entirely to something like
> http://jyaml.sourceforge.net/tutorial.html personally.
>
> -Jonathan
>


Re: overriding directories from command line

Posted by Ted Zlatanov <tz...@lifelogs.com>.
I created http://issues.apache.org/jira/browse/CASSANDRA-743 as a wish
item to address just includes.  I can implement it for XML but it may be
better to make it a dependency of the YAML work in
http://issues.apache.org/jira/browse/CASSANDRA-671.

Ted

On Fri, 20 Nov 2009 15:11:27 -0600 (CST) "Stu Hood" <st...@rackspace.com> wrote: 

SH> I would vote for this one as well, if somebody wants to create the issue.
SH> -----Original Message-----
SH> From: "Ted Zlatanov" <tz...@lifelogs.com>
SH> Sent: Friday, November 20, 2009 3:01pm
SH> To: cassandra-dev@incubator.apache.org
SH> Subject: Re: overriding directories from command line

SH> On Mon, 16 Nov 2009 09:39:15 -0800 Anthony Molinaro <an...@alumni.caltech.edu> wrote: 

AM> If you are thinking about config file changes I'd like to request some
AM> sort of inclusion mechanism.   For instance, if you could had 2 keyspaces
AM> which you want to deploy on separate clusters in production but allow
AM> developers to install simultaneously on their development box, it would
AM> be great if you could do this by have 3 files. One of which has settings
AM> specific to the developer box (ie, memory settings), and one for each
AM> keyspace.  Then I could create 5 packages (RPM or deb)

AM> 1. one with the developer box settings which includes both keyspace configs
AM> 2. one with the production box settings for the cluster controlling keyspace1
AM> which includes keyspace1 config.
AM> 3. one with the production box settings for the cluster controlling keyspace2
AM> which includes keyspace2 config.
AM> 4. one with just the keyspace1 config.
AM> 5. one with just the keyspace2 config.

AM> I could do all this with a bunch of preprocessing at package build time,
AM> but that gets a little annoying.  And right now I just have the config
AM> copied and everytime I need to change a CF I need to change it in 3
AM> places (devel, qa, and prod configs).

AM> One great solution would be to support the loading of multiple configs
AM> from a directory.  You already see this a lot, for instance /etc/init.d
AM> or /etc/httpd/conf.d on most unix systems.

SH> This is actually my situation too.  I have to roll out slightly
SH> customized Cassandra instances to several colos and it's unpleasant to
SH> use cfengine or Puppet to edit XML files, so I'd rather have some simple
SH> inclusion and interpolation mechanism.


Re: overriding directories from command line

Posted by Ted Zlatanov <tz...@lifelogs.com>.
On Fri, 20 Nov 2009 15:33:48 -0600 Jonathan Ellis <jb...@gmail.com> wrote: 

JE> I'm not familiar enough with that library to be able to predict
JE> success / failure here, but like I said last time, I am okay with
JE> trying anything that doesn't make maintaining DatabaseDescriptor even
JE> more of a chore.

OK, I'll submit a patch when I get to that point.  IMHO it is much
easier than the current setup, so I hope you'll like it.  Thanks for
your help.

Ted


Re: overriding directories from command line

Posted by Jonathan Ellis <jb...@gmail.com>.
I'm not familiar enough with that library to be able to predict
success / failure here, but like I said last time, I am okay with
trying anything that doesn't make maintaining DatabaseDescriptor even
more of a chore.

2009/11/20 Ted Zlatanov <tz...@lifelogs.com>:
> On Fri, 20 Nov 2009 15:11:27 -0600 (CST) "Stu Hood" <st...@rackspace.com> wrote:
>
> SH> I would vote for this one as well, if somebody wants to create the issue.
>
> I'll let Jonathan Ellis decide if my suggestion to use the Apache
> Commons Configuration classes makes sense.  I can't get to this until my
> auth work is done anyhow, since I'd rather not try to tackle too much at
> once.  But I do want to work on it after the auth code is out.
>
> Thanks
> Ted
>
>

Re: overriding directories from command line

Posted by Ted Zlatanov <tz...@lifelogs.com>.
On Fri, 20 Nov 2009 15:11:27 -0600 (CST) "Stu Hood" <st...@rackspace.com> wrote: 

SH> I would vote for this one as well, if somebody wants to create the issue.

I'll let Jonathan Ellis decide if my suggestion to use the Apache
Commons Configuration classes makes sense.  I can't get to this until my
auth work is done anyhow, since I'd rather not try to tackle too much at
once.  But I do want to work on it after the auth code is out.

Thanks
Ted


Re: overriding directories from command line

Posted by Stu Hood <st...@rackspace.com>.
I would vote for this one as well, if somebody wants to create the issue.

-----Original Message-----
From: "Ted Zlatanov" <tz...@lifelogs.com>
Sent: Friday, November 20, 2009 3:01pm
To: cassandra-dev@incubator.apache.org
Subject: Re: overriding directories from command line

On Mon, 16 Nov 2009 09:39:15 -0800 Anthony Molinaro <an...@alumni.caltech.edu> wrote: 

AM>   If you are thinking about config file changes I'd like to request some
AM> sort of inclusion mechanism.   For instance, if you could had 2 keyspaces
AM> which you want to deploy on separate clusters in production but allow
AM> developers to install simultaneously on their development box, it would
AM> be great if you could do this by have 3 files. One of which has settings
AM> specific to the developer box (ie, memory settings), and one for each
AM> keyspace.  Then I could create 5 packages (RPM or deb)

AM>  1. one with the developer box settings which includes both keyspace configs
AM>  2. one with the production box settings for the cluster controlling keyspace1
AM>     which includes keyspace1 config.
AM>  3. one with the production box settings for the cluster controlling keyspace2
AM>     which includes keyspace2 config.
AM>  4. one with just the keyspace1 config.
AM>  5. one with just the keyspace2 config.

AM> I could do all this with a bunch of preprocessing at package build time,
AM> but that gets a little annoying.  And right now I just have the config
AM> copied and everytime I need to change a CF I need to change it in 3
AM> places (devel, qa, and prod configs).

AM> One great solution would be to support the loading of multiple configs
AM> from a directory.  You already see this a lot, for instance /etc/init.d
AM> or /etc/httpd/conf.d on most unix systems.

This is actually my situation too.  I have to roll out slightly
customized Cassandra instances to several colos and it's unpleasant to
use cfengine or Puppet to edit XML files, so I'd rather have some simple
inclusion and interpolation mechanism.

Ted




Re: overriding directories from command line

Posted by Ted Zlatanov <tz...@lifelogs.com>.
On Mon, 16 Nov 2009 09:39:15 -0800 Anthony Molinaro <an...@alumni.caltech.edu> wrote: 

AM>   If you are thinking about config file changes I'd like to request some
AM> sort of inclusion mechanism.   For instance, if you could had 2 keyspaces
AM> which you want to deploy on separate clusters in production but allow
AM> developers to install simultaneously on their development box, it would
AM> be great if you could do this by have 3 files. One of which has settings
AM> specific to the developer box (ie, memory settings), and one for each
AM> keyspace.  Then I could create 5 packages (RPM or deb)

AM>  1. one with the developer box settings which includes both keyspace configs
AM>  2. one with the production box settings for the cluster controlling keyspace1
AM>     which includes keyspace1 config.
AM>  3. one with the production box settings for the cluster controlling keyspace2
AM>     which includes keyspace2 config.
AM>  4. one with just the keyspace1 config.
AM>  5. one with just the keyspace2 config.

AM> I could do all this with a bunch of preprocessing at package build time,
AM> but that gets a little annoying.  And right now I just have the config
AM> copied and everytime I need to change a CF I need to change it in 3
AM> places (devel, qa, and prod configs).

AM> One great solution would be to support the loading of multiple configs
AM> from a directory.  You already see this a lot, for instance /etc/init.d
AM> or /etc/httpd/conf.d on most unix systems.

This is actually my situation too.  I have to roll out slightly
customized Cassandra instances to several colos and it's unpleasant to
use cfengine or Puppet to edit XML files, so I'd rather have some simple
inclusion and interpolation mechanism.

Ted


Re: overriding directories from command line (was: 2 problems running Cassandra as a developper)

Posted by Anthony Molinaro <an...@alumni.caltech.edu>.
Hi,

  If you are thinking about config file changes I'd like to request some
sort of inclusion mechanism.   For instance, if you could had 2 keyspaces
which you want to deploy on separate clusters in production but allow
developers to install simultaneously on their development box, it would
be great if you could do this by have 3 files. One of which has settings
specific to the developer box (ie, memory settings), and one for each
keyspace.  Then I could create 5 packages (RPM or deb)

 1. one with the developer box settings which includes both keyspace configs
 2. one with the production box settings for the cluster controlling keyspace1
    which includes keyspace1 config.
 3. one with the production box settings for the cluster controlling keyspace2
    which includes keyspace2 config.
 4. one with just the keyspace1 config.
 5. one with just the keyspace2 config.

I could do all this with a bunch of preprocessing at package build time,
but that gets a little annoying.  And right now I just have the config
copied and everytime I need to change a CF I need to change it in 3
places (devel, qa, and prod configs).

One great solution would be to support the loading of multiple configs
from a directory.  You already see this a lot, for instance /etc/init.d
or /etc/httpd/conf.d on most unix systems.

Anyway, just throwing it out there.

-Anthony

On Mon, Nov 16, 2009 at 09:54:45AM -0600, Jonathan Ellis wrote:
> 2009/11/16 Ted Zlatanov <tz...@lifelogs.com>:
> > - allow a prefix here, e.g. /usr/local/cassandra instead of the default /var
> 
> -1 on this, I think it makes it too easy to shoot yourself in the foot.
> 
> > - allow passing the prefix and any of the directories from the command
> >  line
> 
> -1 on this too; we've already made it easy to run different config
> files from the same binaries --
> http://wiki.apache.org/cassandra/RunningCassandra -- and
> search-and-replace is easy enough.
> 
> > A general configuration facility to allow named variables and
> > interpolation, similar to what the Apache Commons Configuration classes
> > do for XML Property files
> > (http://commons.apache.org/configuration/apidocs/org/apache/commons/configuration/XMLPropertiesConfiguration.html),
> > would be really nice too.
> 
> I'd rather move away from XML entirely to something like
> http://jyaml.sourceforge.net/tutorial.html personally.
> 
> -Jonathan

-- 
------------------------------------------------------------------------
Anthony Molinaro                           <an...@alumni.caltech.edu>

Re: overriding directories from command line (was: 2 problems running Cassandra as a developper)

Posted by Jonathan Ellis <jb...@gmail.com>.
2009/11/16 Ted Zlatanov <tz...@lifelogs.com>:
> - allow a prefix here, e.g. /usr/local/cassandra instead of the default /var

-1 on this, I think it makes it too easy to shoot yourself in the foot.

> - allow passing the prefix and any of the directories from the command
>  line

-1 on this too; we've already made it easy to run different config
files from the same binaries --
http://wiki.apache.org/cassandra/RunningCassandra -- and
search-and-replace is easy enough.

> A general configuration facility to allow named variables and
> interpolation, similar to what the Apache Commons Configuration classes
> do for XML Property files
> (http://commons.apache.org/configuration/apidocs/org/apache/commons/configuration/XMLPropertiesConfiguration.html),
> would be really nice too.

I'd rather move away from XML entirely to something like
http://jyaml.sourceforge.net/tutorial.html personally.

-Jonathan

RE: overriding directories from command line (was: 2 problems running Cassandra as a developper)

Posted by "Coe, Robin" <ro...@bluecoat.com>.
My personal take is that it's easier to edit the file than pass in parameters as lengthy as directory paths.  I also like the explicit path locations; there's no confusion.
 
-----Original Message-----
From: news [mailto:news@ger.gmane.org] On Behalf Of Ted Zlatanov
Sent: November 16, 2009 10:28 AM
To: cassandra-dev@incubator.apache.org
Subject: overriding directories from command line (was: 2 problems running Cassandra as a developper)

The default config file has:

  <!--
   ~ Directories: Specify where Cassandra should store different data on
   ~ disk.  Keep the data disks and the CommitLog disks separate for best
   ~ performance
  -->
  <CommitLogDirectory>/var/lib/cassandra/commitlog</CommitLogDirectory>
  <DataFileDirectories>
      <DataFileDirectory>/var/lib/cassandra/data</DataFileDirectory>
  </DataFileDirectories>
  <CalloutLocation>/var/lib/cassandra/callouts</CalloutLocation>
  <BootstrapFileDirectory>/var/lib/cassandra/bootstrap</BootstrapFileDirectory>
  <StagingFileDirectory>/var/lib/cassandra/staging</StagingFileDirectory>

I'm wondering if it would make sense to:

- allow a prefix here, e.g. /usr/local/cassandra instead of the default /var

- allow passing the prefix and any of the directories from the command
  line

The first one makes modularizing Cassandra easier.  The second makes it
easier to set up multiple Cassandra instances with the same
configuration but different roots for experiments.

A general configuration facility to allow named variables and
interpolation, similar to what the Apache Commons Configuration classes
do for XML Property files
(http://commons.apache.org/configuration/apidocs/org/apache/commons/configuration/XMLPropertiesConfiguration.html),
would be really nice too.  The setup in DatabaseDescriptor.java may need
some work because of the nested properties, but in theory switching to
XMLPropertiesConfiguration should not be too painful.  I plan to use
XMLPropertiesConfiguration for my auth* work anyhow.

Does that make sense?
Ted


overriding directories from command line (was: 2 problems running Cassandra as a developper)

Posted by Ted Zlatanov <tz...@lifelogs.com>.
The default config file has:

  <!--
   ~ Directories: Specify where Cassandra should store different data on
   ~ disk.  Keep the data disks and the CommitLog disks separate for best
   ~ performance
  -->
  <CommitLogDirectory>/var/lib/cassandra/commitlog</CommitLogDirectory>
  <DataFileDirectories>
      <DataFileDirectory>/var/lib/cassandra/data</DataFileDirectory>
  </DataFileDirectories>
  <CalloutLocation>/var/lib/cassandra/callouts</CalloutLocation>
  <BootstrapFileDirectory>/var/lib/cassandra/bootstrap</BootstrapFileDirectory>
  <StagingFileDirectory>/var/lib/cassandra/staging</StagingFileDirectory>

I'm wondering if it would make sense to:

- allow a prefix here, e.g. /usr/local/cassandra instead of the default /var

- allow passing the prefix and any of the directories from the command
  line

The first one makes modularizing Cassandra easier.  The second makes it
easier to set up multiple Cassandra instances with the same
configuration but different roots for experiments.

A general configuration facility to allow named variables and
interpolation, similar to what the Apache Commons Configuration classes
do for XML Property files
(http://commons.apache.org/configuration/apidocs/org/apache/commons/configuration/XMLPropertiesConfiguration.html),
would be really nice too.  The setup in DatabaseDescriptor.java may need
some work because of the nested properties, but in theory switching to
XMLPropertiesConfiguration should not be too painful.  I plan to use
XMLPropertiesConfiguration for my auth* work anyhow.

Does that make sense?
Ted


Re: 2 problems running Cassandra as a developper

Posted by Jonathan Ellis <jb...@gmail.com>.
It's not a maven project.  It just has a pom.xml to help other project
that do use maven and want cassandra as a dependency.  Looks like
importing it as a maven project results in an incomplete build.

On Sat, Nov 14, 2009 at 6:01 AM, Paul Sabou <pa...@gmail.com> wrote:
> Hi,
>
> I'am new to Cassandra. I'am trying to run it in Eclipse and I seems to
> fail because some trivial reasons.
>
> I have an Ubuntu 9.04 and I use MyEclipse.
> I have checked out Cassandra from SVN and after I have installed
> thrift I could run the
> nosetests script succesfully.
>
> I have imported the trunk folder into MyEclipse with the following steps :
> (1) runned "mvn eclipse:eclipse" in the trunk folder
> (2) imported the project as an existing maven project
>
> and everything is ok up to here.
>
> I want to do two things now with the Cassandra project (that don't
> work) in MyEclipse :
>
> (1) I want to run it from main :
> - I followed the IDE instructions from
> http://wiki.apache.org/cassandra/HowToContribute
> running  "org.apache.cassandra.service.CassandraDaemon" class  with
> the following VM arguments : "-ea -Xmx1G -Dstorage-config=conf
> -Dcassandra-foreground"
> - I get the following stack trace :
>
> --------------------------------------------
> Exception encountered during startup.
> java.io.EOFException
>        at java.io.DataInputStream.readFully(DataInputStream.java:180)
>        at java.io.DataInputStream.readUTF(DataInputStream.java:592)
>        at java.io.DataInputStream.readUTF(DataInputStream.java:547)
>        at org.apache.cassandra.db.ColumnFamilySerializer.readComparator(ColumnFamilySerializer.java:115)
>        at org.apache.cassandra.db.ColumnFamilySerializer.deserialize(ColumnFamilySerializer.java:98)
>        at org.apache.cassandra.db.RowMutationSerializer.defreezeTheMaps(RowMutation.java:310)
>        at org.apache.cassandra.db.RowMutationSerializer.deserialize(RowMutation.java:320)
>        at org.apache.cassandra.db.RowMutationSerializer.deserialize(RowMutation.java:1)
>        at org.apache.cassandra.db.CommitLog.recover(CommitLog.java:327)
>        at org.apache.cassandra.db.RecoveryManager.doRecovery(RecoveryManager.java:65)
>        at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:90)
>        at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:166)
>
> ----------------------------------------------
>
> It seems that the RecoveryManager doesn't work as it was expected =>
> if I comment the line 90 in CassandraDaemon.java
> "recoveryMgr.doRecovery();" everything starts up correctly.
>
> I think I'am missing some config file or something similar. Can you
> please tell me what should I do?
>
> (2) I want to run the test suite :
> - When I run the test suite many tests fail with something like :
> -----------------------------------------------
> java.lang.NoClassDefFoundError: Could not initialize class
> org.apache.cassandra.config.DatabaseDescriptor
>        at org.apache.cassandra.db.Table$TableMetadata.<clinit>(Table.java:70)
>        at org.apache.cassandra.db.Table.<init>(Table.java:354)
>        at org.apache.cassandra.db.Table.open(Table.java:184)
>        at org.apache.cassandra.db.RemoveSuperColumnTest.testRemoveSuperColumn(RemoveSuperColumnTest.java:43)
>        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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
>        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
>        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:44)
>        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
>        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
>        at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
>        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>        at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
>        at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
>        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> -----------------------------------------------
>
>
> I think that this is also my fault for not putting the right config
> file in the right place. Can you please tell me what to do?
>
>
> best regards
> Paul.
>