incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Everton Lima <>
Subject Upgrade
Date Tue, 27 Nov 2012 11:28:57 GMT
Hello people.
I was using cassandra 1.1.6 and use the Object CassandraServer() to create
keyspaces by my code.

But when I update to version 1.2.0-beta2, my code starts to throw Exception
(NullPointerException) in the method:

*in version 1.1.6*
CassandraServer -> state() ->
       SocketAddress remoteSocket =
       if (remoteSocket == null)
           return clientState.get();

       ClientState cState =
       if (cState == null)
           cState = new ClientState();
       return cState;

*in version 1.2.0*
CassandraServer -> state() ->
      return ThriftSessionManager.instance.currentSession();
         SocketAddress socket = remoteSocket.get();
        assert socket != null;

        ThriftClientState cState = activeSocketSessions.get(socket);
        if (cState == null)
            cState = new ThriftClientState();
            activeSocketSessions.put(socket, cState);
        return cState;

So, in version 1.1.6, it verify if has  a remote connection, it not it try
to get o local. In the version 1.2.0 it try to get a remote connection and
apply it
to a ThriftClientState, but if does not have a remote connection (like in
1.1.6) it will throw a NullPointerException in line:
ThriftClientState cState = activeSocketSessions.get(socket);

Is any way to use CassandraServer in the new version??



Everton Lima Aleixo
Bacharel em Ciencia da Computação
Universidade Federal de Goiás

View raw message