cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r769517 - in /incubator/cassandra/trunk/src/org/apache/cassandra: config/ db/ gms/ io/ loader/ service/ utils/
Date Tue, 28 Apr 2009 19:55:34 GMT
Author: jbellis
Date: Tue Apr 28 19:55:33 2009
New Revision: 769517

URL: http://svn.apache.org/viewvc?rev=769517&view=rev
Log:
remove unused variables.  patch by johano; reviewed by jbellis for CASSANDRA-113

Modified:
    incubator/cassandra/trunk/src/org/apache/cassandra/config/DatabaseDescriptor.java
    incubator/cassandra/trunk/src/org/apache/cassandra/db/CommitLog.java
    incubator/cassandra/trunk/src/org/apache/cassandra/db/CommitLogEntry.java
    incubator/cassandra/trunk/src/org/apache/cassandra/db/IdentityFilter.java
    incubator/cassandra/trunk/src/org/apache/cassandra/db/SystemTable.java
    incubator/cassandra/trunk/src/org/apache/cassandra/db/Table.java
    incubator/cassandra/trunk/src/org/apache/cassandra/gms/Gossiper.java
    incubator/cassandra/trunk/src/org/apache/cassandra/io/BufferedRandomAccessFile.java
    incubator/cassandra/trunk/src/org/apache/cassandra/io/IndexHelper.java
    incubator/cassandra/trunk/src/org/apache/cassandra/loader/Loader.java
    incubator/cassandra/trunk/src/org/apache/cassandra/loader/PreLoad.java
    incubator/cassandra/trunk/src/org/apache/cassandra/service/ReadRepairManager.java
    incubator/cassandra/trunk/src/org/apache/cassandra/service/StorageService.java
    incubator/cassandra/trunk/src/org/apache/cassandra/utils/FBUtilities.java

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/config/DatabaseDescriptor.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/config/DatabaseDescriptor.java?rev=769517&r1=769516&r2=769517&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/config/DatabaseDescriptor.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/config/DatabaseDescriptor.java Tue
Apr 28 19:55:33 2009
@@ -125,7 +125,6 @@
         try
         {
             String file = System.getProperty("storage-config") + System.getProperty("file.separator")
+ "storage-conf.xml";
-            String os = System.getProperty("os.name");
             XMLUtils xmlUtils = new XMLUtils(file);
 
             /* Cluster Name */

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/db/CommitLog.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/db/CommitLog.java?rev=769517&r1=769516&r2=769517&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/db/CommitLog.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/db/CommitLog.java Tue Apr 28 19:55:33
2009
@@ -338,7 +338,6 @@
             IFileReader reader = SequenceFile.reader(file.getAbsolutePath());
             try
             {
-                Map<String, Row> rows = new HashMap<String, Row>();
                 reader.readDirect(header);
                 /* deserialize the commit log header */
                 bufIn.reset(header, 0, header.length);

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/db/CommitLogEntry.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/db/CommitLogEntry.java?rev=769517&r1=769516&r2=769517&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/db/CommitLogEntry.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/db/CommitLogEntry.java Tue Apr 28 19:55:33
2009
@@ -18,10 +18,8 @@
 
 package org.apache.cassandra.db;
 
-import java.util.concurrent.atomic.AtomicInteger;
-import java.io.ByteArrayInputStream;
-import java.io.DataOutputStream;
 import java.io.DataInputStream;
+import java.io.DataOutputStream;
 import java.io.IOException;
 
 import org.apache.cassandra.io.ICompactSerializer;
@@ -36,7 +34,6 @@
  */
 class CommitLogEntry
 {    
-    private static AtomicInteger lsnGenerator_ = new AtomicInteger(0);
     private static ICompactSerializer<CommitLogEntry> serializer_;
     static
     {

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/db/IdentityFilter.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/db/IdentityFilter.java?rev=769517&r1=769516&r2=769517&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/db/IdentityFilter.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/db/IdentityFilter.java Tue Apr 28 19:55:33
2009
@@ -24,7 +24,7 @@
     	String[] values = RowMutation.getColumnAndColumnFamily(cfString);
     	if( columnFamily == null )
     		return columnFamily;
-		String cfName = columnFamily.name();
+
 		if (values.length == 2 && !columnFamily.isSuper())
 		{
 			Collection<IColumn> columns = columnFamily.getAllColumns();

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/db/SystemTable.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/db/SystemTable.java?rev=769517&r1=769516&r2=769517&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/db/SystemTable.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/db/SystemTable.java Tue Apr 28 19:55:33
2009
@@ -95,7 +95,6 @@
     */
     public Row get(String key) throws IOException
     {
-        String file = getFileName();
         DataOutputBuffer bufOut = new DataOutputBuffer();
         reader_.next(bufOut);
 

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/db/Table.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/db/Table.java?rev=769517&r1=769516&r2=769517&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/db/Table.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/db/Table.java Tue Apr 28 19:55:33 2009
@@ -117,7 +117,7 @@
                     bufIn.reset(bufOut.getData(), bufOut.getLength());
 
                     /* The key is the table name */
-                    String key = bufIn.readUTF();
+                    bufIn.readUTF();
                     /* read the size of the data we ignore this value */
                     bufIn.readInt();
                     tableMetadata_ = Table.TableMetadata.serializer().deserialize(bufIn);

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/gms/Gossiper.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/gms/Gossiper.java?rev=769517&r1=769516&r2=769517&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/gms/Gossiper.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/gms/Gossiper.java Tue Apr 28 19:55:33
2009
@@ -117,8 +117,6 @@
     private EndPoint localEndPoint_;
     private long aVeryLongTime_;
     private Random random_ = new Random();
-    /* index used previously */
-    private int prevIndex_ = 0;
     /* round robin index through live endpoint set */
     private int rrIndex_ = 0;
 
@@ -320,7 +318,6 @@
         int maxVersion = getMaxEndPointStateVersion(epState);
         gDigests.add( new GossipDigest(localEndPoint_, generation, maxVersion) );
 
-        int size = liveEndpoints_.size();
         List<EndPoint> endpoints = new ArrayList<EndPoint>( liveEndpoints_ );
         Collections.shuffle(endpoints, random_);
         for ( EndPoint liveEndPoint : endpoints )

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/io/BufferedRandomAccessFile.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/io/BufferedRandomAccessFile.java?rev=769517&r1=769516&r2=769517&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/io/BufferedRandomAccessFile.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/io/BufferedRandomAccessFile.java Tue
Apr 28 19:55:33 2009
@@ -18,11 +18,12 @@
 
 package org.apache.cassandra.io;
 
-import java.io.*;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.RandomAccessFile;
 import java.util.Arrays;
 
-import org.apache.log4j.Logger;
-
 /**
  * A <code>BufferedRandomAccessFile</code> is like a
  * <code>RandomAccessFile</code>, but it uses a private buffer so that most
@@ -38,7 +39,6 @@
 
 public final class BufferedRandomAccessFile extends RandomAccessFile
 {
-    private static final Logger logger_ = Logger.getLogger(BufferedRandomAccessFile.class);
     static final int LogBuffSz_ = 16; // 64K buffer
     public static final int BuffSz_ = (1 << LogBuffSz_);
     static final long BuffMask_ = ~(((long) BuffSz_) - 1L);
@@ -48,7 +48,6 @@
      * "Rd", "Wr", "RdClass", and "WrClass" interfaces.
      */
     private boolean dirty_; // true iff unflushed bytes exist
-    private boolean closed_; // true iff the file is closed
     private long curr_; // current position in file
     private long lo_, hi_; // bounds on characters in "buff"
     private byte[] buff_; // local buffer
@@ -145,7 +144,7 @@
     
     private void init(int size)
     {
-        this.dirty_ = this.closed_ = false;
+        this.dirty_ = false;
         this.lo_ = this.curr_ = this.hi_ = 0;
         this.buff_ = (size > BuffSz_) ? new byte[size] : new byte[BuffSz_];
         this.maxHi_ = (long) BuffSz_;
@@ -156,7 +155,6 @@
     public void close() throws IOException
     {
         this.flush();
-        this.closed_ = true;
         super.close();
     }
     

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/io/IndexHelper.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/io/IndexHelper.java?rev=769517&r1=769516&r2=769517&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/io/IndexHelper.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/io/IndexHelper.java Tue Apr 28 19:55:33
2009
@@ -160,9 +160,6 @@
 		/* now deserialize the index list */
         DataInputBuffer indexIn = new DataInputBuffer();
         indexIn.reset(indexOut.getData(), indexOut.getLength());
-        String columnName;
-        int position;
-        int numCols;
         
         TypeInfo typeInfo = DatabaseDescriptor.getTypeInfo(cfName);
         if ( DatabaseDescriptor.getColumnFamilyType(cfName).equals("Super") || DatabaseDescriptor.isNameSortingEnabled(cfName)
)

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/loader/Loader.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/loader/Loader.java?rev=769517&r1=769516&r2=769517&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/loader/Loader.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/loader/Loader.java Tue Apr 28 19:55:33
2009
@@ -316,9 +316,6 @@
          * the SSTables and reset the load state in the StorageService. 
         */
         SSTable.delete(ssTables.get(0));
-//        File commitLogDirectory = new File( DatabaseDescriptor.getLogFileLocation() );
-//        FileUtils.delete(commitLogDirectory.listFiles());
-        storageService_.resetLoadState();
         logger_.info("Finished all the requisite clean up ...");
     }
     

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/loader/PreLoad.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/loader/PreLoad.java?rev=769517&r1=769516&r2=769517&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/loader/PreLoad.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/loader/PreLoad.java Tue Apr 28 19:55:33
2009
@@ -117,7 +117,6 @@
          * the SSTables and reset the load state in the StorageService. 
         */
         SSTable.delete(ssTables.get(0));
-        storageService_.resetLoadState();
         logger_.info("Finished all the requisite clean up ...");
     }
 

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/service/ReadRepairManager.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/service/ReadRepairManager.java?rev=769517&r1=769516&r2=769517&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/service/ReadRepairManager.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/service/ReadRepairManager.java Tue
Apr 28 19:55:33 2009
@@ -64,7 +64,6 @@
 	static class ReadRepairPerformer implements
 			ICacheExpungeHook<String, Message>
 	{
-		private static Logger logger_ = Logger.getLogger(ReadRepairPerformer.class);
 		/*
 		 * The hook fn which takes the end point and the row mutation that 
 		 * needs to be sent to the end point in order 

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/service/StorageService.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/service/StorageService.java?rev=769517&r1=769516&r2=769517&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/service/StorageService.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/service/StorageService.java Tue Apr
28 19:55:33 2009
@@ -188,14 +188,6 @@
         }
     }
 
-    private class ShutdownTimerTask extends TimerTask
-    {
-    	public void run()
-    	{
-    		StorageService.instance().shutdown();
-    	}
-    }
-
     /*
      * Factory method that gets an instance of the StorageService
      * class.
@@ -235,8 +227,6 @@
      *
      */
     private IEndPointSnitch endPointSnitch_;
-    /* Uptime of this node - we use this to determine if a bootstrap can be performed by
this node */
-    private long uptime_ = 0L;
 
     /* This abstraction maintains the token/endpoint metadata information */
     private TokenMetadata tokenMetadata_ = new TokenMetadata();
@@ -247,11 +237,6 @@
      * for a clean exit.
     */
     private Set<IComponentShutdown> components_ = new HashSet<IComponentShutdown>();
-    /*
-     * This boolean indicates if we are in loading state. If we are then we do not want any
-     * distributed algorithms w.r.t change in token state to kick in.
-    */
-    private boolean isLoadState_ = false;
     /* Timer is used to disseminate load information */
     private Timer loadTimer_ = new Timer(false);
 
@@ -298,7 +283,6 @@
     public StorageService()
     {
         init();
-        uptime_ = System.currentTimeMillis();        
         storageLoadBalancer_ = new StorageLoadBalancer(this);
         endPointSnitch_ = new EndPointSnitch();
         
@@ -768,7 +752,6 @@
     {
     	if ( keys.length > 0 )
     	{
-	        isLoadState_ = true;
             Token token = tokenMetadata_.getToken(StorageService.tcpAddr_);
 	        Map<Token, EndPoint> tokenToEndPointMap = tokenMetadata_.cloneTokenEndPointMap();
 	        Token[] tokens = tokenToEndPointMap.keySet().toArray(new Token[tokenToEndPointMap.keySet().size()]);
@@ -779,15 +762,6 @@
 	        updateToken(newToken);
     	}
     }
-
-    /*
-     * This is used to indicate that this node is done
-     * with the loading of data.
-    */
-    public void resetLoadState()
-    {
-        isLoadState_ = false;
-    }
     
     /**
      * This method takes a colon separated string of nodes that need

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/utils/FBUtilities.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/utils/FBUtilities.java?rev=769517&r1=769516&r2=769517&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/utils/FBUtilities.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/utils/FBUtilities.java Tue Apr 28 19:55:33
2009
@@ -50,7 +50,6 @@
 {
 
     private static InetAddress localInetAddress_;
-    private static String host_;
 
     public static String getTimestamp()
     {



Mime
View raw message