Thanks Jonathan. The error is gone after I update the config. On Wed, Mar 11, 2009 at 3:08 PM, Jonathan Ellis <[email protected]> wrote:
> Also, it will not work AT ALL with data from the old version. you > need to start fresh. > > -Jonathan > > On Wed, Mar 11, 2009 at 4:00 PM, Jonathan Ellis <[email protected]> wrote: > > the config format changed. now you need to specify the cfname as an > attribute: > > > > <ColumnFamily Index="Name" Name="Standard1"/> > > > > -Jonathan > > > > On Wed, Mar 11, 2009 at 3:52 PM, Jiansheng Huang <[email protected]> > wrote: > >> > >> > >> ---------- Forwarded message ---------- > >> From: Jiansheng Huang <[email protected]> > >> Date: Wed, Mar 11, 2009 at 2:49 PM > >> Subject: NPE in apache cassandra > >> To: [email protected], Avinash Lakshman > >> <[email protected]>, Prashant Malik <[email protected]> > >> Cc: [email protected] > >> > >> > >> Hi folks, I checked out the new code from apache and compiled it. When I > >> start up the server with a clean installation base (i.e., without using > any > >> system/user data from previous installation), > >> I got the following. > >> > >> UNCAUGHT EXCEPTION IN main() > >> java.lang.NullPointerException > >> at java.io.DataOutputStream.writeUTF(DataOutputStream.java:347) > >> at java.io.DataOutputStream.writeUTF(DataOutputStream.java:323) > >> at > >> > org.apache.cassandra.db.Table$TableMetadataSerializer.serialize(Table.java:254) > >> at > >> > org.apache.cassandra.db.Table$TableMetadataSerializer.serialize(Table.java:244) > >> at org.apache.cassandra.db.Table$TableMetadata.apply(Table.java:209) > >> at > org.apache.cassandra.db.DBManager.storeMetadata(DBManager.java:150) > >> at org.apache.cassandra.db.DBManager.<init>(DBManager.java:102) > >> at org.apache.cassandra.db.DBManager.instance(DBManager.java:61) > >> at > >> > org.apache.cassandra.service.StorageService.start(StorageService.java:465) > >> at > >> > org.apache.cassandra.service.CassandraServer.start(CassandraServer.java:110) > >> at > >> > org.apache.cassandra.service.CassandraServer.main(CassandraServer.java:1078) > >> Disconnected from the target VM, address: '127.0.0.1:45693', transport: > >> 'socket' > >> > >> I did some debugging and found that in the following code, the first > entry > >> in cfNames is always null. Is it safe to say that if cfName is null, > then we > >> don't want to do the writings? > >> > >> public void serialize(TableMetadata tmetadata, DataOutputStream dos) > throws > >> IOException > >> { > >> int size = tmetadata.cfIdMap_.size(); > >> dos.writeInt(size); > >> Set<String> cfNames = tmetadata.cfIdMap_.keySet(); > >> > >> for ( String cfName : cfNames ) > >> { > >> dos.writeUTF(cfName); > >> dos.writeInt( tmetadata.cfIdMap_.get(cfName).intValue() > ); > >> dos.writeUTF(tmetadata.getColumnFamilyType(cfName)); > >> } > >> } > >> > >> A related question I have is what's the procedure for us to check in > code? I > >> have made some changes for adding latency counters in the server and > >> exposing them through http. Would be good to check in the changes and > minor > >> fixes so that I don't have to risk of losing them ... > >> > >> Thanks, > >> > >> Jiansheng > >> > >> > >> > >> > > >
