cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [21/28] [3649] Remove underscores on variables
Date Mon, 27 Feb 2012 10:16:00 GMT
http://git-wip-us.apache.org/repos/asf/cassandra/blob/910b663b/src/java/org/apache/cassandra/thrift/CustomTHsHaServer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/thrift/CustomTHsHaServer.java b/src/java/org/apache/cassandra/thrift/CustomTHsHaServer.java
index 9bfb4f7..0376e6e 100644
--- a/src/java/org/apache/cassandra/thrift/CustomTHsHaServer.java
+++ b/src/java/org/apache/cassandra/thrift/CustomTHsHaServer.java
@@ -51,7 +51,7 @@ public class CustomTHsHaServer extends TNonblockingServer
 {
     private static final Logger LOGGER = LoggerFactory.getLogger(CustomTHsHaServer.class.getName());
     private Set<SelectorThread> ioThreads = new HashSet<SelectorThread>();
-    private volatile boolean stopped_ = true;
+    private volatile boolean stopped = true;
     private ExecutorService invoker;
 
     /**
@@ -110,7 +110,7 @@ public class CustomTHsHaServer extends TNonblockingServer
 
     protected boolean startThreads()
     {
-        stopped_ = false;
+        stopped = false;
         // start all the threads.
         for (SelectorThread thread : ioThreads)
             thread.start();
@@ -139,7 +139,7 @@ public class CustomTHsHaServer extends TNonblockingServer
     public void stop()
     {
         stopListening();
-        stopped_ = true;
+        stopped = true;
         for (SelectorThread thread : ioThreads)
             thread.wakeupSelector();
         joinSelector();
@@ -173,7 +173,7 @@ public class CustomTHsHaServer extends TNonblockingServer
         {
             try
             {
-                while (!stopped_)
+                while (!stopped)
                 {
                     select();
                 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/910b663b/src/java/org/apache/cassandra/thrift/CustomTThreadPoolServer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/thrift/CustomTThreadPoolServer.java b/src/java/org/apache/cassandra/thrift/CustomTThreadPoolServer.java
index 161ff12..8212ba7 100644
--- a/src/java/org/apache/cassandra/thrift/CustomTThreadPoolServer.java
+++ b/src/java/org/apache/cassandra/thrift/CustomTThreadPoolServer.java
@@ -47,13 +47,13 @@ import org.apache.thrift.transport.TTransportException;
 public class CustomTThreadPoolServer extends TServer
 {
 
-    private static final Logger LOGGER = LoggerFactory.getLogger(CustomTThreadPoolServer.class.getName());
+    private static final Logger logger = LoggerFactory.getLogger(CustomTThreadPoolServer.class.getName());
 
     // Executor service for handling client connections
-    private ExecutorService executorService_;
+    private ExecutorService executorService;
 
     // Flag for stopping the server
-    private volatile boolean stopped_;
+    private volatile boolean stopped;
 
     // Server options
     private TThreadPoolServer.Args args;
@@ -64,7 +64,7 @@ public class CustomTThreadPoolServer extends TServer
     
     public CustomTThreadPoolServer(TThreadPoolServer.Args args, ExecutorService executorService)
{
         super(args);
-        executorService_ = executorService;
+        this.executorService = executorService;
         this.args = args;
     }
     
@@ -76,12 +76,12 @@ public class CustomTThreadPoolServer extends TServer
         }
         catch (TTransportException ttx)
         {
-            LOGGER.error("Error occurred during listening.", ttx);
+            logger.error("Error occurred during listening.", ttx);
             return;
         }
 
-        stopped_ = false;
-        while (!stopped_)
+        stopped = false;
+        while (!stopped)
         {
             // block until we are under max clients
             while (activeClients.get() >= args.maxWorkerThreads)
@@ -101,31 +101,31 @@ public class CustomTThreadPoolServer extends TServer
                 TTransport client = serverTransport_.accept();
                 activeClients.incrementAndGet();
                 WorkerProcess wp = new WorkerProcess(client);
-                executorService_.execute(wp);
+                executorService.execute(wp);
             }
             catch (TTransportException ttx)
             {
                 if (ttx.getCause() instanceof SocketTimeoutException) // thrift sucks
                     continue;
 
-                if (!stopped_)
+                if (!stopped)
                 {
-                    LOGGER.warn("Transport error occurred during acceptance of message.",
ttx);
+                    logger.warn("Transport error occurred during acceptance of message.",
ttx);
                 }
             }
 
             if (activeClients.get() >= args.maxWorkerThreads)
-                LOGGER.warn("Maximum number of clients " + args.maxWorkerThreads + " reached");
+                logger.warn("Maximum number of clients " + args.maxWorkerThreads + " reached");
         }
 
-        executorService_.shutdown();
+        executorService.shutdown();
         // Thrift's default shutdown waits for the WorkerProcess threads to complete.  We
do not,
         // because doing that allows a client to hold our shutdown "hostage" by simply not
sending
         // another message after stop is called (since process will block indefinitely trying
to read
         // the next meessage header).
         //
         // The "right" fix would be to update thrift to set a socket timeout on client connections
-        // (and tolerate unintentional timeouts until stopped_ is set).  But this requires
deep
+        // (and tolerate unintentional timeouts until stopped is set).  But this requires
deep
         // changes to the code generator, so simply setting these threads to daemon (in our
custom
         // CleaningThreadPool) and ignoring them after shutdown is good enough.
         //
@@ -141,7 +141,7 @@ public class CustomTThreadPoolServer extends TServer
 
     public void stop()
     {
-        stopped_ = true;
+        stopped = true;
         serverTransport_.interrupt();
     }
 
@@ -180,11 +180,11 @@ public class CustomTThreadPoolServer extends TServer
                 outputTransport = outputTransportFactory_.getTransport(client_);
                 inputProtocol = inputProtocolFactory_.getProtocol(inputTransport);
                 outputProtocol = outputProtocolFactory_.getProtocol(outputTransport);
-                // we check stopped_ first to make sure we're not supposed to be shutting
+                // we check stopped first to make sure we're not supposed to be shutting
                 // down. this is necessary for graceful shutdown.  (but not sufficient,
                 // since process() can take arbitrarily long waiting for client input.
                 // See comments at the end of serve().)
-                while (!stopped_ && processor.process(inputProtocol, outputProtocol))
+                while (!stopped && processor.process(inputProtocol, outputProtocol))
                 {
                     inputProtocol = inputProtocolFactory_.getProtocol(inputTransport);
                     outputProtocol = outputProtocolFactory_.getProtocol(outputTransport);
@@ -194,15 +194,15 @@ public class CustomTThreadPoolServer extends TServer
             {
                 // Assume the client died and continue silently
                 // Log at debug to allow debugging of "frame too large" errors (see CASSANDRA-3142).
-                LOGGER.debug("Thrift transport error occurred during processing of message.",
ttx);
+                logger.debug("Thrift transport error occurred during processing of message.",
ttx);
             }
             catch (TException tx)
             {
-                LOGGER.error("Thrift error occurred during processing of message.", tx);
+                logger.error("Thrift error occurred during processing of message.", tx);
             }
             catch (Exception x)
             {
-                LOGGER.error("Error occurred during processing of message.", x);
+                logger.error("Error occurred during processing of message.", x);
             }
             finally
             {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/910b663b/src/java/org/apache/cassandra/thrift/TCustomServerSocket.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/thrift/TCustomServerSocket.java b/src/java/org/apache/cassandra/thrift/TCustomServerSocket.java
index 3be5e56..c46fdc2 100644
--- a/src/java/org/apache/cassandra/thrift/TCustomServerSocket.java
+++ b/src/java/org/apache/cassandra/thrift/TCustomServerSocket.java
@@ -46,7 +46,7 @@ public class TCustomServerSocket extends TServerTransport
     /**
      * Underlying serversocket object
      */
-    private ServerSocket serverSocket_ = null;
+    private ServerSocket serverSocket = null;
 
     private final boolean keepAlive;
     private final Integer sendBufferSize;
@@ -68,15 +68,15 @@ public class TCustomServerSocket extends TServerTransport
         try
         {
             // Make server socket
-            serverSocket_ = new ServerSocket();
+            serverSocket = new ServerSocket();
             // Prevent 2MSL delay problem on server restarts
-            serverSocket_.setReuseAddress(true);
+            serverSocket.setReuseAddress(true);
             // Bind to listening port
-            serverSocket_.bind(bindAddr);
+            serverSocket.bind(bindAddr);
         }
         catch (IOException ioe)
         {
-            serverSocket_ = null;
+            serverSocket = null;
             throw new TTransportException("Could not create ServerSocket on address " + bindAddr.toString()
+ ".");
         }
 
@@ -89,14 +89,14 @@ public class TCustomServerSocket extends TServerTransport
     protected TCustomSocket acceptImpl() throws TTransportException
     {
 
-        if (serverSocket_ == null)
+        if (serverSocket == null)
             throw new TTransportException(TTransportException.NOT_OPEN, "No underlying server
socket.");
 
         TCustomSocket tsocket = null;
         Socket socket = null;
         try
         {
-            socket = serverSocket_.accept();
+            socket = serverSocket.accept();
             tsocket = new TCustomSocket(socket);
             tsocket.setTimeout(0);
         }
@@ -145,11 +145,11 @@ public class TCustomServerSocket extends TServerTransport
     public void listen() throws TTransportException
     {
         // Make sure not to block on accept
-        if (serverSocket_ != null)
+        if (serverSocket != null)
         {
             try
             {
-                serverSocket_.setSoTimeout(100);
+                serverSocket.setSoTimeout(100);
             }
             catch (SocketException sx)
             {
@@ -161,17 +161,17 @@ public class TCustomServerSocket extends TServerTransport
     @Override
     public void close()
     {
-        if (serverSocket_ != null)
+        if (serverSocket != null)
         {
             try
             {
-                serverSocket_.close();
+                serverSocket.close();
             }
             catch (IOException iox)
             {
                 logger.warn("Could not close server socket.", iox);
             }
-            serverSocket_ = null;
+            serverSocket = null;
         }
     }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/910b663b/src/java/org/apache/cassandra/thrift/TCustomSocket.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/thrift/TCustomSocket.java b/src/java/org/apache/cassandra/thrift/TCustomSocket.java
index 90e5713..054af4a 100644
--- a/src/java/org/apache/cassandra/thrift/TCustomSocket.java
+++ b/src/java/org/apache/cassandra/thrift/TCustomSocket.java
@@ -44,22 +44,22 @@ public class TCustomSocket extends TIOStreamTransport {
   /**
    * Wrapped Socket object
    */
-  private Socket socket_ = null;
+  private Socket socket = null;
  
   /**
    * Remote host
    */
-  private String host_  = null;
+  private String host  = null;
  
   /**
    * Remote port
    */
-  private int port_ = 0;
+  private int port = 0;
  
   /**
    * Socket timeout
    */
-  private int timeout_ = 0;
+  private int timeout = 0;
  
   /**
    * Constructor that takes an already created socket.
@@ -68,18 +68,18 @@ public class TCustomSocket extends TIOStreamTransport {
    * @throws TTransportException if there is an error setting up the streams
    */
   public TCustomSocket(Socket socket) throws TTransportException {
-    socket_ = socket;
+    this.socket = socket;
     try {
-      socket_.setSoLinger(false, 0);
-      socket_.setTcpNoDelay(true);
+      socket.setSoLinger(false, 0);
+      socket.setTcpNoDelay(true);
     } catch (SocketException sx) {
       LOGGER.warn("Could not configure socket.", sx);
     }
  
     if (isOpen()) {
       try {
-        inputStream_ = new BufferedInputStream(socket_.getInputStream(), 1024);
-        outputStream_ = new BufferedOutputStream(socket_.getOutputStream(), 1024);
+        inputStream_ = new BufferedInputStream(socket.getInputStream(), 1024);
+        outputStream_ = new BufferedOutputStream(socket.getOutputStream(), 1024);
       } catch (IOException iox) {
         close();
         throw new TTransportException(TTransportException.NOT_OPEN, iox);
@@ -107,9 +107,9 @@ public class TCustomSocket extends TIOStreamTransport {
    * @param timeout Socket timeout
    */
   public TCustomSocket(String host, int port, int timeout) {
-    host_ = host;
-    port_ = port;
-    timeout_ = timeout;
+    this.host = host;
+    this.port = port;
+    this.timeout = timeout;
     initSocket();
   }
  
@@ -117,11 +117,11 @@ public class TCustomSocket extends TIOStreamTransport {
    * Initializes the socket object
    */
   private void initSocket() {
-    socket_ = new Socket();
+    socket = new Socket();
     try {
-      socket_.setSoLinger(false, 0);
-      socket_.setTcpNoDelay(true);
-      socket_.setSoTimeout(timeout_);
+      socket.setSoLinger(false, 0);
+      socket.setTcpNoDelay(true);
+      socket.setSoTimeout(timeout);
     } catch (SocketException sx) {
       LOGGER.error("Could not configure socket.", sx);
     }
@@ -133,9 +133,9 @@ public class TCustomSocket extends TIOStreamTransport {
    * @param timeout Milliseconds timeout
    */
   public void setTimeout(int timeout) {
-    timeout_ = timeout;
+    this.timeout = timeout;
     try {
-      socket_.setSoTimeout(timeout);
+      socket.setSoTimeout(timeout);
     } catch (SocketException sx) {
       LOGGER.warn("Could not set socket timeout.", sx);
     }
@@ -145,20 +145,20 @@ public class TCustomSocket extends TIOStreamTransport {
    * Returns a reference to the underlying socket.
    */
   public Socket getSocket() {
-    if (socket_ == null) {
+    if (socket == null) {
       initSocket();
     }
-    return socket_;
+    return socket;
   }
  
   /**
    * Checks whether the socket is connected.
    */
   public boolean isOpen() {
-    if (socket_ == null) {
+    if (socket == null) {
       return false;
     }
-    return socket_.isConnected();
+    return socket.isConnected();
   }
  
   /**
@@ -169,21 +169,21 @@ public class TCustomSocket extends TIOStreamTransport {
       throw new TTransportException(TTransportException.ALREADY_OPEN, "Socket already connected.");
     }
  
-    if (host_.length() == 0) {
+    if (host.length() == 0) {
       throw new TTransportException(TTransportException.NOT_OPEN, "Cannot open null host.");
     }
-    if (port_ <= 0) {
+    if (port <= 0) {
       throw new TTransportException(TTransportException.NOT_OPEN, "Cannot open without port.");
     }
  
-    if (socket_ == null) {
+    if (socket == null) {
       initSocket();
     }
  
     try {
-      socket_.connect(new InetSocketAddress(host_, port_), timeout_);
-      inputStream_ = new BufferedInputStream(socket_.getInputStream(), 1024);
-      outputStream_ = new BufferedOutputStream(socket_.getOutputStream(), 1024);
+      socket.connect(new InetSocketAddress(host, port), timeout);
+      inputStream_ = new BufferedInputStream(socket.getInputStream(), 1024);
+      outputStream_ = new BufferedOutputStream(socket.getOutputStream(), 1024);
     } catch (IOException iox) {
       close();
       throw new TTransportException(TTransportException.NOT_OPEN, iox);
@@ -198,14 +198,14 @@ public class TCustomSocket extends TIOStreamTransport {
     super.close();
  
     // Close the socket
-    if (socket_ != null) {
+    if (socket != null) {
       try {
-        socket_.close();
+        socket.close();
       } catch (IOException iox) {
         LOGGER.warn("Could not close socket.", iox);
       }
-      socket_ = null;
+      socket = null;
     }
   }
  
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/cassandra/blob/910b663b/src/java/org/apache/cassandra/utils/BloomFilter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/BloomFilter.java b/src/java/org/apache/cassandra/utils/BloomFilter.java
index 03554f4..b7a68d0 100644
--- a/src/java/org/apache/cassandra/utils/BloomFilter.java
+++ b/src/java/org/apache/cassandra/utils/BloomFilter.java
@@ -29,7 +29,7 @@ public class BloomFilter extends Filter
 {
     private static final Logger logger = LoggerFactory.getLogger(BloomFilter.class);
     private static final int EXCESS = 20;
-    static BloomFilterSerializer serializer_ = new BloomFilterSerializer();
+    static BloomFilterSerializer serializer = new BloomFilterSerializer();
 
     public OpenBitSet bitset;
 
@@ -46,7 +46,7 @@ public class BloomFilter extends Filter
 
     public static BloomFilterSerializer serializer()
     {
-        return serializer_;
+        return serializer;
     }
 
     private static OpenBitSet bucketsFor(long numElements, int bucketsPer)
@@ -136,6 +136,6 @@ public class BloomFilter extends Filter
 
     public long serializedSize()
     {
-        return serializer_.serializedSize(this);
+        return serializer.serializedSize(this);
     }
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/910b663b/src/java/org/apache/cassandra/utils/FBUtilities.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/FBUtilities.java b/src/java/org/apache/cassandra/utils/FBUtilities.java
index 7736d4c..a75ac14 100644
--- a/src/java/org/apache/cassandra/utils/FBUtilities.java
+++ b/src/java/org/apache/cassandra/utils/FBUtilities.java
@@ -61,12 +61,12 @@ import org.apache.thrift.TSerializer;
 
 public class FBUtilities
 {
-    private static Logger logger_ = LoggerFactory.getLogger(FBUtilities.class);
+    private static Logger logger = LoggerFactory.getLogger(FBUtilities.class);
 
     public static final BigInteger TWO = new BigInteger("2");
 
-    private static volatile InetAddress localInetAddress_;
-    private static volatile InetAddress broadcastInetAddress_;
+    private static volatile InetAddress localInetAddress;
+    private static volatile InetAddress broadcastInetAddress;
 
     private static final ThreadLocal<MessageDigest> localMD5Digest = new ThreadLocal<MessageDigest>()
     {
@@ -123,10 +123,10 @@ public class FBUtilities
      */
     public static InetAddress getLocalAddress()
     {
-        if (localInetAddress_ == null)
+        if (localInetAddress == null)
             try
             {
-                localInetAddress_ = DatabaseDescriptor.getListenAddress() == null
+                localInetAddress = DatabaseDescriptor.getListenAddress() == null
                                     ? InetAddress.getLocalHost()
                                     : DatabaseDescriptor.getListenAddress();
             }
@@ -134,16 +134,16 @@ public class FBUtilities
             {
                 throw new RuntimeException(e);
             }
-        return localInetAddress_;
+        return localInetAddress;
     }
 
     public static InetAddress getBroadcastAddress()
     {
-        if (broadcastInetAddress_ == null)
-            broadcastInetAddress_ = DatabaseDescriptor.getBroadcastAddress() == null
-                                ? getLocalAddress()
-                                : DatabaseDescriptor.getBroadcastAddress();
-        return broadcastInetAddress_;
+        if (broadcastInetAddress == null)
+            broadcastInetAddress = DatabaseDescriptor.getBroadcastAddress() == null
+                                 ? getLocalAddress()
+                                 : DatabaseDescriptor.getBroadcastAddress();
+        return broadcastInetAddress;
     }
 
     /**
@@ -342,7 +342,7 @@ public class FBUtilities
         }
         catch (Exception e)
         {
-            logger_.warn("Unable to load version.properties", e);
+            logger.warn("Unable to load version.properties", e);
             return "debug version";
         }
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/910b663b/src/java/org/apache/cassandra/utils/LegacyBloomFilter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/LegacyBloomFilter.java b/src/java/org/apache/cassandra/utils/LegacyBloomFilter.java
index cc670dd..d210270 100644
--- a/src/java/org/apache/cassandra/utils/LegacyBloomFilter.java
+++ b/src/java/org/apache/cassandra/utils/LegacyBloomFilter.java
@@ -29,19 +29,19 @@ public class LegacyBloomFilter extends Filter
 {
     private static final int EXCESS = 20;
     private static final Logger logger = LoggerFactory.getLogger(LegacyBloomFilter.class);
-    static LegacyBloomFilterSerializer serializer_ = new LegacyBloomFilterSerializer();
+    static LegacyBloomFilterSerializer serializer = new LegacyBloomFilterSerializer();
 
     public static LegacyBloomFilterSerializer serializer()
     {
-        return serializer_;
+        return serializer;
     }
 
-    private BitSet filter_;
+    private BitSet filter;
 
     LegacyBloomFilter(int hashes, BitSet filter)
     {
         hashCount = hashes;
-        filter_ = filter;
+        this.filter = filter;
     }
 
     private static BitSet bucketsFor(long numElements, int bucketsPer)
@@ -83,19 +83,19 @@ public class LegacyBloomFilter extends Filter
 
     public void clear()
     {
-        filter_.clear();
+        filter.clear();
     }
 
     int buckets()
     {
-        return filter_.size();
+        return filter.size();
     }
 
     public boolean isPresent(ByteBuffer key)
     {
         for (int bucketIndex : getHashBuckets(key))
         {
-            if (!filter_.get(bucketIndex))
+            if (!filter.get(bucketIndex))
             {
                 return false;
             }
@@ -105,20 +105,20 @@ public class LegacyBloomFilter extends Filter
 
     /*
      @param key -- value whose hash is used to fill
-     the filter_.
+     the filter.
      This is a general purpose API.
      */
     public void add(ByteBuffer key)
     {
         for (int bucketIndex : getHashBuckets(key))
         {
-            filter_.set(bucketIndex);
+            filter.set(bucketIndex);
         }
     }
 
     public String toString()
     {
-        return filter_.toString();
+        return filter.toString();
     }
 
     int emptyBuckets()
@@ -126,7 +126,7 @@ public class LegacyBloomFilter extends Filter
         int n = 0;
         for (int i = 0; i < buckets(); i++)
         {
-            if (!filter_.get(i))
+            if (!filter.get(i))
             {
                 n++;
             }
@@ -165,6 +165,6 @@ public class LegacyBloomFilter extends Filter
     }
 
     public BitSet getBitSet(){
-      return filter_;
+      return filter;
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/cassandra/blob/910b663b/test/unit/org/apache/cassandra/db/ReadMessageTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/ReadMessageTest.java b/test/unit/org/apache/cassandra/db/ReadMessageTest.java
index d5b1066..eaa0b64 100644
--- a/test/unit/org/apache/cassandra/db/ReadMessageTest.java
+++ b/test/unit/org/apache/cassandra/db/ReadMessageTest.java
@@ -75,9 +75,9 @@ public class ReadMessageTest extends SchemaLoader
         DataOutputBuffer dos = new DataOutputBuffer();
         ByteArrayInputStream bis;
 
-        rms.serialize(rm, dos, MessagingService.version_);
+        rms.serialize(rm, dos, MessagingService.current_version);
         bis = new ByteArrayInputStream(dos.getData(), 0, dos.getLength());
-        return rms.deserialize(new DataInputStream(bis), MessagingService.version_);
+        return rms.deserialize(new DataInputStream(bis), MessagingService.current_version);
     }
     
     @Test

http://git-wip-us.apache.org/repos/asf/cassandra/blob/910b663b/test/unit/org/apache/cassandra/db/SerializationsTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/SerializationsTest.java b/test/unit/org/apache/cassandra/db/SerializationsTest.java
index 1fa03d8..335dfe6 100644
--- a/test/unit/org/apache/cassandra/db/SerializationsTest.java
+++ b/test/unit/org/apache/cassandra/db/SerializationsTest.java
@@ -68,12 +68,12 @@ public class SerializationsTest extends AbstractSerializationsTester
         IPartitioner part = StorageService.getPartitioner();
         AbstractBounds<RowPosition> bounds = new Range<Token>(part.getRandomToken(),
part.getRandomToken()).toRowBounds();
         
-        Message namesCmd = new RangeSliceCommand(Statics.KS, "Standard1", null, namesPred,
bounds, 100).getMessage(MessagingService.version_);
-        Message emptyRangeCmd = new RangeSliceCommand(Statics.KS, "Standard1", null, emptyRangePred,
bounds, 100).getMessage(MessagingService.version_);
-        Message regRangeCmd = new RangeSliceCommand(Statics.KS, "Standard1", null,  nonEmptyRangePred,
bounds, 100).getMessage(MessagingService.version_);
-        Message namesCmdSup = new RangeSliceCommand(Statics.KS, "Super1", Statics.SC, namesPred,
bounds, 100).getMessage(MessagingService.version_);
-        Message emptyRangeCmdSup = new RangeSliceCommand(Statics.KS, "Super1", Statics.SC,
emptyRangePred, bounds, 100).getMessage(MessagingService.version_);
-        Message regRangeCmdSup = new RangeSliceCommand(Statics.KS, "Super1", Statics.SC,
 nonEmptyRangePred, bounds, 100).getMessage(MessagingService.version_);
+        Message namesCmd = new RangeSliceCommand(Statics.KS, "Standard1", null, namesPred,
bounds, 100).getMessage(MessagingService.current_version);
+        Message emptyRangeCmd = new RangeSliceCommand(Statics.KS, "Standard1", null, emptyRangePred,
bounds, 100).getMessage(MessagingService.current_version);
+        Message regRangeCmd = new RangeSliceCommand(Statics.KS, "Standard1", null,  nonEmptyRangePred,
bounds, 100).getMessage(MessagingService.current_version);
+        Message namesCmdSup = new RangeSliceCommand(Statics.KS, "Super1", Statics.SC, namesPred,
bounds, 100).getMessage(MessagingService.current_version);
+        Message emptyRangeCmdSup = new RangeSliceCommand(Statics.KS, "Super1", Statics.SC,
emptyRangePred, bounds, 100).getMessage(MessagingService.current_version);
+        Message regRangeCmdSup = new RangeSliceCommand(Statics.KS, "Super1", Statics.SC,
 nonEmptyRangePred, bounds, 100).getMessage(MessagingService.current_version);
         
         DataOutputStream dout = getOutput("db.RangeSliceCommand.bin");
         

http://git-wip-us.apache.org/repos/asf/cassandra/blob/910b663b/test/unit/org/apache/cassandra/gms/GossipDigestTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/gms/GossipDigestTest.java b/test/unit/org/apache/cassandra/gms/GossipDigestTest.java
index df2f591..46189af 100644
--- a/test/unit/org/apache/cassandra/gms/GossipDigestTest.java
+++ b/test/unit/org/apache/cassandra/gms/GossipDigestTest.java
@@ -49,10 +49,10 @@ public class GossipDigestTest
         
         //test the serialization and equals
         DataOutputBuffer output = new DataOutputBuffer();
-        GossipDigest.serializer().serialize(expected, output, MessagingService.version_);
+        GossipDigest.serializer().serialize(expected, output, MessagingService.current_version);
         
         ByteArrayInputStream input = new ByteArrayInputStream(output.getData(), 0, output.getLength());
-        GossipDigest actual = GossipDigest.serializer().deserialize(new DataInputStream(input),
MessagingService.version_);
+        GossipDigest actual = GossipDigest.serializer().deserialize(new DataInputStream(input),
MessagingService.current_version);
         assertEquals(0, expected.compareTo(actual));
     }
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/910b663b/test/unit/org/apache/cassandra/io/LazilyCompactedRowTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/io/LazilyCompactedRowTest.java b/test/unit/org/apache/cassandra/io/LazilyCompactedRowTest.java
index 65b2e7e..94e2316 100644
--- a/test/unit/org/apache/cassandra/io/LazilyCompactedRowTest.java
+++ b/test/unit/org/apache/cassandra/io/LazilyCompactedRowTest.java
@@ -232,7 +232,7 @@ public class LazilyCompactedRowTest extends CleanupHelper
             rm.add(new QueryPath("Standard1", null, ByteBufferUtil.bytes(i)), ByteBufferUtil.EMPTY_BYTE_BUFFER,
0);
         rm.apply();
         DataOutputBuffer out = new DataOutputBuffer();
-        RowMutation.serializer().serialize(rm, out, MessagingService.version_);
+        RowMutation.serializer().serialize(rm, out, MessagingService.current_version);
         assert out.getLength() > DatabaseDescriptor.getColumnIndexSize();
         cfs.forceBlockingFlush();
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/910b663b/test/unit/org/apache/cassandra/service/RemoveTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/service/RemoveTest.java b/test/unit/org/apache/cassandra/service/RemoveTest.java
index 7ee7d69..571deb2 100644
--- a/test/unit/org/apache/cassandra/service/RemoveTest.java
+++ b/test/unit/org/apache/cassandra/service/RemoveTest.java
@@ -142,7 +142,7 @@ public class RemoveTest extends CleanupHelper
 
         for (InetAddress host : hosts)
         {
-            Message msg = new Message(host, StorageService.Verb.REPLICATION_FINISHED, new
byte[0], MessagingService.version_);
+            Message msg = new Message(host, StorageService.Verb.REPLICATION_FINISHED, new
byte[0], MessagingService.current_version);
             MessagingService.instance().sendRR(msg, FBUtilities.getBroadcastAddress());
         }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/910b663b/test/unit/org/apache/cassandra/streaming/StreamUtil.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/streaming/StreamUtil.java b/test/unit/org/apache/cassandra/streaming/StreamUtil.java
index e029666..6c3cad4 100644
--- a/test/unit/org/apache/cassandra/streaming/StreamUtil.java
+++ b/test/unit/org/apache/cassandra/streaming/StreamUtil.java
@@ -41,7 +41,7 @@ public class StreamUtil
 
         try
         {
-            StreamRequestMessage srm = StreamRequestMessage.serializer().deserialize(new
DataInputStream(bufIn), MessagingService.version_);
+            StreamRequestMessage srm = StreamRequestMessage.serializer().deserialize(new
DataInputStream(bufIn), MessagingService.current_version);
             StreamInSession session = StreamInSession.get(to, srm.sessionId);
             session.closeIfFinished();
         }


Mime
View raw message