public static void main(String[] args) throws InterruptedException {
        final TestConsistHashWithComp testConsistHashWithComp = new TestConsistHashWithComp();
        Set<Node> ips = new HashSet<Node>();
        ips.add(new Node("192.168.1.1"));
        ips.add(new Node("192.168.1.2"));
        ips.add(new Node("192.168.1.3"));
        ips.add(new Node("192.168.1.4"));
        ips.add(new Node("192.168.1.5"));
        ips.add(new Node("192.168.1.6"));
        ips.add(new Node("192.168.1.7"));
        ips.add(new Node("192.168.1.8"));
        ips.add(new Node("192.168.1.9"));
        ips.add(new Node("192.168.1.10"));

        final ConsistantHash hash = ConsistantHash.getInstance();
        hash.setNodeList(ips);
//        hash.setAlg(HashAlgorithm.LUA_HASH);
//    	hash.set(1024);
//    	hash.setAlg(HashAlgorithm.CRC32_HASH);
        hash.buildHashCycle();

        long start = System.currentTimeMillis();

        for (int i = 0; i < 100; i++) {
            final String name = "thread" + i;
            Thread t = new Thread(new Runnable() {
                @Override
                public void run() {
                    for (int h = 0; h < 100000; h++) {
                        Node node = hash.findNodeByKey(name + h);
                        testConsistHashWithComp.send(node);
                    }
                    testConsistHashWithComp.print();
                }
            }, name);
            t.start();
        }
        System.out.println(System.currentTimeMillis() - start);
        Thread.sleep(1000 * 20);
        testConsistHashWithComp.print();
    }