Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A2D17D422 for ; Fri, 27 Jul 2012 15:19:47 +0000 (UTC) Received: (qmail 90446 invoked by uid 500); 27 Jul 2012 15:19:40 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 90367 invoked by uid 500); 27 Jul 2012 15:19:40 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 89221 invoked by uid 99); 27 Jul 2012 15:19:39 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jul 2012 15:19:39 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 3B27819636; Fri, 27 Jul 2012 15:19:39 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: yukim@apache.org To: commits@cassandra.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [33/50] [abbrv] git commit: remove dead assignment Message-Id: <20120727151939.3B27819636@tyr.zones.apache.org> Date: Fri, 27 Jul 2012 15:19:39 +0000 (UTC) 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 Authored: Wed Jul 18 21:18:21 2012 -0400 Committer: Dave Brosius 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 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 deserializeTokens(ByteBuffer tokenBytes) { List tokens = new ArrayList();