You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by yu...@apache.org on 2012/07/27 17:19:39 UTC
[33/50] [abbrv] git commit: remove dead assignment
remove dead assignment
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7af91424
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7af91424
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7af91424
Branch: refs/heads/cassandra-1.1
Commit: 7af91424d9b2929a72138c3f8ee75e09256aa5ef
Parents: 201fe94
Author: Dave Brosius <db...@apache.org>
Authored: Wed Jul 18 21:18:21 2012 -0400
Committer: Dave Brosius <db...@apache.org>
Committed: Wed Jul 18 21:18:21 2012 -0400
----------------------------------------------------------------------
src/java/org/apache/cassandra/db/SystemTable.java | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/7af91424/src/java/org/apache/cassandra/db/SystemTable.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/SystemTable.java b/src/java/org/apache/cassandra/db/SystemTable.java
index 9634515..48d9151 100644
--- a/src/java/org/apache/cassandra/db/SystemTable.java
+++ b/src/java/org/apache/cassandra/db/SystemTable.java
@@ -159,7 +159,7 @@ public class SystemTable
{
String req = "INSERT INTO system.%s (token_bytes, peer) VALUES ('%s', '%s')";
String tokenBytes = ByteBufferUtil.bytesToHex(p.getTokenFactory().toByteArray(token));
- processInternal(String.format(req, PEERS_CF, tokenBytes, ep.getHostAddress()));
+ processInternal(String.format(req, PEERS_CF, tokenBytes, ep.getHostAddress()));
}
forceBlockingFlush(PEERS_CF);
}
@@ -175,7 +175,7 @@ public class SystemTable
{
String req = "DELETE FROM system.%s WHERE token_bytes = '%s'";
String tokenBytes = ByteBufferUtil.bytesToHex(p.getTokenFactory().toByteArray(token));
- processInternal(String.format(req, PEERS_CF, tokenBytes));
+ processInternal(String.format(req, PEERS_CF, tokenBytes));
}
forceBlockingFlush(PEERS_CF);
}
@@ -185,8 +185,6 @@ public class SystemTable
*/
public static synchronized void updateTokens(Collection<Token> tokens)
{
- IPartitioner p = StorageService.getPartitioner();
-
String req = "INSERT INTO system.%s (key, token_bytes) VALUES ('%s', '%s')";
String tokenBytes = ByteBufferUtil.bytesToHex(serializeTokens(tokens));
processInternal(String.format(req, LOCAL_CF, LOCAL_KEY, tokenBytes));
@@ -214,15 +212,15 @@ public class SystemTable
newToks.put(toks);
toks = newToks;
}
-
+
toks.putShort((short)tokenBytes.remaining());
toks.put(tokenBytes);
}
-
+
toks.flip();
return toks;
}
-
+
private static Collection<Token> deserializeTokens(ByteBuffer tokenBytes)
{
List<Token> tokens = new ArrayList<Token>();