Examples of ReInit()


Examples of krati.util.LinearHashing.reinit()

                _config.getIndexesCached());
        _unitCapacity = DynamicConstants.SUB_ARRAY_SIZE;
       
        // Compute maxLevel
        LinearHashing h = new LinearHashing(_unitCapacity);
        h.reinit(Integer.MAX_VALUE);
        _maxLevel = h.getLevel();
       
        int initLevel = StoreParams.getDynamicStoreInitialLevel(_config.getInitialCapacity());
        if(initLevel > _maxLevel) {
            _log.warn("initLevel reset from " + initLevel + " to " + _maxLevel);
View Full Code Here

Examples of krati.util.LinearHashing.reinit()

                          double segmentCompactFactor,
                          double hashLoadFactor,
                          HashFunction<byte[]> hashFunction) throws Exception {
        // Compute maxLevel
        LinearHashing h = new LinearHashing(DynamicConstants.SUB_ARRAY_SIZE);
        h.reinit(Integer.MAX_VALUE);
        _maxLevel = h.getLevel();
       
        // Compute initialCapacity
        int initialCapacity = DynamicConstants.SUB_ARRAY_SIZE;
        if(initLevel >= 0) {
View Full Code Here

Examples of krati.util.LinearHashing.reinit()

       
        DynamicDataStore store = StoreFactory.createDynamicDataStore(config);
       
        // Compute maxLevel
        LinearHashing h = new LinearHashing(DynamicConstants.SUB_ARRAY_SIZE);
        h.reinit(Integer.MAX_VALUE);
        int maxLevel = h.getLevel();
       
        // Check store initLevel
        assertEquals(maxLevel, store.getLevel());
       
View Full Code Here

Examples of krati.util.LinearHashing.reinit()

                _config.getIndexesCached());
        _unitCapacity = DynamicConstants.SUB_ARRAY_SIZE;
       
        // Compute maxLevel
        LinearHashing h = new LinearHashing(_unitCapacity);
        h.reinit(Integer.MAX_VALUE);
        _maxLevel = h.getLevel();
       
        int initLevel = StoreParams.getDynamicStoreInitialLevel(_config.getInitialCapacity());
        if(initLevel > _maxLevel) {
            _log.warn("initLevel reset from " + initLevel + " to " + _maxLevel);
View Full Code Here

Examples of krati.util.LinearHashing.reinit()

                            double segmentCompactFactor,
                            double hashLoadFactor,
                            HashFunction<byte[]> hashFunction) throws Exception {
        // Compute maxLevel
        LinearHashing h = new LinearHashing(DynamicConstants.SUB_ARRAY_SIZE);
        h.reinit(Integer.MAX_VALUE);
        _maxLevel = h.getLevel();
       
        // Compute initialCapacity
        int initialCapacity = DynamicConstants.SUB_ARRAY_SIZE;
        if(initLevel >= 0) {
View Full Code Here

Examples of krati.util.LinearHashing.reinit()

        assertEquals(0, h.getSplit());
        assertEquals(0, h.getLevel());
        assertEquals(unitCapacity, h.getLevelCapacity());
       
        capacity = unitCapacity << 1;
        h.reinit(capacity);
        assertEquals(0, h.getSplit());
        assertEquals(0, h.getLevel());
        assertEquals(unitCapacity, h.getLevelCapacity());
       
        capacity = unitCapacity << 2;
View Full Code Here

Examples of krati.util.LinearHashing.reinit()

        assertEquals(0, h.getSplit());
        assertEquals(0, h.getLevel());
        assertEquals(unitCapacity, h.getLevelCapacity());
       
        capacity = unitCapacity << 2;
        h.reinit(capacity);
        assertEquals(unitCapacity, h.getSplit());
        assertEquals(1, h.getLevel());
        assertEquals(unitCapacity << 1, h.getLevelCapacity());
       
        capacity = unitCapacity << 3;
View Full Code Here

Examples of krati.util.LinearHashing.reinit()

        assertEquals(unitCapacity, h.getSplit());
        assertEquals(1, h.getLevel());
        assertEquals(unitCapacity << 1, h.getLevelCapacity());
       
        capacity = unitCapacity << 3;
        h.reinit(capacity);
        assertEquals((unitCapacity << 2) - unitCapacity, h.getSplit());
        assertEquals(2, h.getLevel());
        assertEquals(unitCapacity << 2, h.getLevelCapacity());
       
        capacity = (unitCapacity << 3) - 1;
View Full Code Here

Examples of krati.util.LinearHashing.reinit()

        assertEquals((unitCapacity << 2) - unitCapacity, h.getSplit());
        assertEquals(2, h.getLevel());
        assertEquals(unitCapacity << 2, h.getLevelCapacity());
       
        capacity = (unitCapacity << 3) - 1;
        h.reinit(capacity);
        assertEquals((unitCapacity << 2) - 2 * unitCapacity, h.getSplit());
        assertEquals(2, h.getLevel());
        assertEquals(unitCapacity << 2, h.getLevelCapacity());

        capacity = (unitCapacity << 3) - unitCapacity + 1;
View Full Code Here

Examples of krati.util.LinearHashing.reinit()

        assertEquals((unitCapacity << 2) - 2 * unitCapacity, h.getSplit());
        assertEquals(2, h.getLevel());
        assertEquals(unitCapacity << 2, h.getLevelCapacity());

        capacity = (unitCapacity << 3) - unitCapacity + 1;
        h.reinit(capacity);
        assertEquals((unitCapacity << 2) - 2 * unitCapacity, h.getSplit());
        assertEquals(2, h.getLevel());
        assertEquals(unitCapacity << 2, h.getLevelCapacity());
       
        capacity = (unitCapacity << 3) - unitCapacity;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.