Package org.voltdb

Examples of org.voltdb.TheHashinator


    @Test
    public void testExpectNonZeroHash() throws Exception {
        int partitionCount = 3;
        byte[] configBytes;
        HashinatorLite h1;
        TheHashinator h2;

        configBytes = LegacyHashinator.getConfigureBytes(partitionCount);
        h1 = new HashinatorLite(partitionCount);
        h2 = TheHashinator.getHashinator(HashinatorType.LEGACY.hashinatorClass, configBytes, false);
        testExpectNonZeroHash(h1, h2, partitionCount);
View Full Code Here


    @Test
    public void testSameLongHash1() throws Exception {
        int partitionCount = 2;
        byte[] configBytes;
        HashinatorLite h1;
        TheHashinator h2;

        configBytes = LegacyHashinator.getConfigureBytes(partitionCount);
        h1 = new HashinatorLite(partitionCount);
        h2 = TheHashinator.getHashinator(HashinatorType.LEGACY.hashinatorClass, configBytes, false);
        testSameLongHash1(h1, h2, partitionCount);
View Full Code Here

    @Test
    public void testSizeChanges() {
        int partitionCount;
        byte[] configBytes;
        HashinatorLite h1;
        TheHashinator h2;

        // try with lots of partition counts
        for (partitionCount = 1; partitionCount <= 11; partitionCount++) {
            configBytes = LegacyHashinator.getConfigureBytes(partitionCount);
            h1 = new HashinatorLite(partitionCount);
View Full Code Here

    @Test
    public void testEdgeCases() throws Exception {
        int partitionCount;
        byte[] configBytes;
        HashinatorLite h1;
        TheHashinator h2;

        // try with lots of partition counts
        for (int i = 0; i < 50; i++) {
            partitionCount = r.nextInt(1000) + 1;
View Full Code Here

    @Test
    public void testSameLongHash() throws Exception {
        int partitionCount;
        byte[] configBytes;
        HashinatorLite h1;
        TheHashinator h2;

        // try with lots of partition counts
        for (int i = 0; i < 50; i++) {
            partitionCount = r.nextInt(1000) + 1;
View Full Code Here

    @Test
    public void testSameStringHash() throws Exception {
        int partitionCount;
        byte[] configBytes;
        HashinatorLite h1;
        TheHashinator h2;

        // try with lots of partition counts
        for (int i = 0; i < 50; i++) {
            partitionCount = r.nextInt(1000) + 1;
View Full Code Here

    @Test
    public void testNulls() throws Exception {
        int partitionCount = 3;
        byte[] configBytes;
        HashinatorLite h1;
        TheHashinator h2;

        configBytes = LegacyHashinator.getConfigureBytes(partitionCount);
        h1 = new HashinatorLite(partitionCount);
        h2 = TheHashinator.getHashinator(HashinatorType.LEGACY.hashinatorClass, configBytes, false);
        testNulls(h1, h2, partitionCount);
View Full Code Here

    @Test
    public void testSameBytesHash() throws Exception {
        int partitionCount;
        byte[] configBytes;
        HashinatorLite h1;
        TheHashinator h2;

        // try with lots of partition counts
        for (int i = 0; i < 50; i++) {
            partitionCount = r.nextInt(1000) + 1;
View Full Code Here

TOP

Related Classes of org.voltdb.TheHashinator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.