Removed some unnecessary functions from this file.

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@756736 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Avinash Lakshman 2009-03-20 19:50:59 +00:00
parent da5c6b8fc6
commit 0237abc765
1 changed files with 0 additions and 28 deletions

View File

@ -214,25 +214,6 @@ public class TestRunner
System.out.println("Done ...");
}
private static int max_ = 24;
private static BigInteger ONE = BigInteger.ONE;
private static BigInteger prime_ = BigInteger.valueOf(255L);
private static BigInteger hash(String key)
{
BigInteger h = BigInteger.ZERO;
char val[] = key.toCharArray();
for (int i = 0; i < max_; i++)
{
if( i < val.length )
h = prime_.multiply(h).add( BigInteger.valueOf(val[i]) );
else
h = prime_.multiply(h).add( ONE );
}
return h;
}
public static void main(String[] args) throws Throwable
{
// System.out.println( lastIndexOf("ababcbc", "abc") );
@ -254,15 +235,6 @@ public class TestRunner
f.close();
*/
String s1 = "ab";
String s2 = "b";
if ( s1.compareTo(s2) >= 0 )
System.out.println("s1 is greater than s2");
else
System.out.println("s2 is greater than s1");
System.out.println("s1 : " + hash(s1));
System.out.println("s2 : " + hash(s2));
//LogUtil.init();
//StorageService s = StorageService.instance();
//s.start();