diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-11-21 18:20:11 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-11-21 18:20:11 +0100 |
commit | feae72d24fb9d5e1089b2c251fae48bc65f65bfa (patch) | |
tree | 7f3aab2f7dc009ebb207b6be2aa74ea2ebfb0389 /vdslib/src/main | |
parent | aaaa5efdde6562a44e3fa4e6168783029d0d5a98 (diff) |
GC unused code (using BobHash)
Diffstat (limited to 'vdslib/src/main')
-rw-r--r-- | vdslib/src/main/java/com/yahoo/vdslib/distribution/Distribution.java | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/vdslib/src/main/java/com/yahoo/vdslib/distribution/Distribution.java b/vdslib/src/main/java/com/yahoo/vdslib/distribution/Distribution.java index 04a577db554..bafe56e92ae 100644 --- a/vdslib/src/main/java/com/yahoo/vdslib/distribution/Distribution.java +++ b/vdslib/src/main/java/com/yahoo/vdslib/distribution/Distribution.java @@ -1,7 +1,6 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vdslib.distribution; -import com.yahoo.collections.BobHash; import com.yahoo.config.subscription.ConfigSubscriber; import com.yahoo.vdslib.state.ClusterState; import com.yahoo.vdslib.state.Node; @@ -55,7 +54,7 @@ public class Distribution { StringTokenizer st = new StringTokenizer(path, "."); int[] p = new int[st.countTokens()]; for (int i=0; i<p.length; ++i) { - p[i] = Integer.valueOf(st.nextToken()); + p[i] = Integer.parseInt(st.nextToken()); } return p; } @@ -334,23 +333,6 @@ public class Distribution { } } - private int getDiskSeed(BucketId bucket, int nodeIndex) { - // Assumes MODULO_BID for now. - - long currentid = bucket.withoutCountBits(); - byte[] ordered = new byte[8]; - ordered[0] = (byte)(currentid >> (0*8)); - ordered[1] = (byte)(currentid >> (1*8)); - ordered[2] = (byte)(currentid >> (2*8)); - ordered[3] = (byte)(currentid >> (3*8)); - ordered[4] = (byte)(currentid >> (4*8)); - ordered[5] = (byte)(currentid >> (5*8)); - ordered[6] = (byte)(currentid >> (6*8)); - ordered[7] = (byte)(currentid >> (7*8)); - int initval = (1664525 * nodeIndex + 0xdeadbeef); - return BobHash.hash(ordered, initval); - } - List<Integer> getIdealStorageNodes(ClusterState clusterState, BucketId bucket, String upStates) throws TooFewBucketBitsInUseException { List<Integer> resultNodes = new ArrayList<>(); |