Examples of HashIndex


Examples of krati.store.index.HashIndex

        indexConfig.setSegmentFileSizeMB(indexSegmentFileSizeMB);
        indexConfig.setSegmentCompactFactor(indexSegmentCompactFactor);
        indexConfig.setHashLoadFactor(config.getHashLoadFactor());
        indexConfig.setHashFunction(config.getHashFunction());
        indexConfig.setDataHandler(config.getDataHandler());
        _index = new HashIndex(indexConfig);
        initIndexPersistableListener();
       
        _logger.info("opened indexHome=" + _indexHome.getAbsolutePath() + " storeHome=" + _storeHome.getAbsolutePath());
    }
View Full Code Here

Examples of krati.store.index.HashIndex

        StoreConfig indexConfig = new StoreConfig(_indexHome, indexInitialCapacity);
        indexConfig.setBatchSize(batchSize);
        indexConfig.setNumSyncBatches(numSyncBatches);
        indexConfig.setSegmentFileSizeMB(indexSegmentFileSizeMB);
        indexConfig.setSegmentFactory(indexSegmentFactory);
        _index = new HashIndex(indexConfig);
        initIndexPersistableListener();
       
        _logger.info("opened indexHome=" + _indexHome.getAbsolutePath() + " storeHome=" + _storeHome.getAbsolutePath());
    }
View Full Code Here

Examples of krati.store.index.HashIndex

        StoreConfig indexConfig = new StoreConfig(_indexHome, indexInitialCapacity);
        indexConfig.setBatchSize(batchSize);
        indexConfig.setNumSyncBatches(numSyncBatches);
        indexConfig.setSegmentFileSizeMB(indexSegmentFileSizeMB);
        indexConfig.setSegmentFactory(indexSegmentFactory);
        _index = new HashIndex(indexConfig);
        initIndexPersistableListener();
       
        _logger.info("opened indexHome=" + _indexHome.getAbsolutePath() + " storeHome=" + _storeHome.getAbsolutePath());
    }
View Full Code Here

Examples of org.apache.activemq.kaha.impl.index.hash.HashIndex

        if (index == null) {
            if (persistentIndex) {
                String name = containerId.getDataContainerName() + "_" + containerId.getKey();
                name=IOHelper.toFileSystemSafeName(name);
                try {
                    HashIndex hashIndex = new HashIndex(directory, name, indexManager);
                    hashIndex.setNumberOfBins(getIndexBinSize());
                    hashIndex.setKeySize(getIndexKeySize());
                    hashIndex.setPageSize(getIndexPageSize());
                    this.index = hashIndex;
                } catch (IOException e) {
                    LOG.error("Failed to create HashIndex", e);
                    throw new RuntimeException(e);
                }
View Full Code Here

Examples of org.apache.activemq.kaha.impl.index.hash.HashIndex

        if (index == null) {
            if (persistentIndex) {
                String name = containerId.getDataContainerName() + "_" + containerId.getKey();
                name=IOHelper.toFileSystemSafeName(name);
                try {
                    HashIndex hashIndex = new HashIndex(directory, name, indexManager);
                    hashIndex.setNumberOfBins(getIndexBinSize());
                    hashIndex.setKeySize(getIndexKeySize());
                    hashIndex.setPageSize(getIndexPageSize());
                    hashIndex.setMaximumCapacity(getIndexMaxBinSize());
                    hashIndex.setLoadFactor(getIndexLoadFactor());
                    this.index = hashIndex;
                } catch (IOException e) {
                    LOG.error("Failed to create HashIndex", e);
                    throw new RuntimeException(e);
                }
View Full Code Here

Examples of org.apache.activemq.kaha.impl.index.hash.HashIndex

        super.init();
        if (index == null) {
            if (persistentIndex) {
                String name = containerId.getDataContainerName() + "_" + containerId.getKey();
                try {
                    HashIndex hashIndex = new HashIndex(directory, name, indexManager);
                    hashIndex.setNumberOfBins(getIndexBinSize());
                    hashIndex.setKeySize(getIndexKeySize());
                    hashIndex.setPageSize(getIndexPageSize());
                    hashIndex.setMaximumCapacity(getIndexMaxBinSize());
                    hashIndex.setLoadFactor(getIndexLoadFactor());
                    this.index = hashIndex;
                } catch (IOException e) {
                    LOG.error("Failed to create HashIndex", e);
                    throw new RuntimeException(e);
                }
View Full Code Here

Examples of org.apache.activemq.kaha.impl.index.hash.HashIndex

        super.init();
        if (index == null) {
            if (persistentIndex) {
                String name = containerId.getDataContainerName() + "_" + containerId.getKey();
                try {
                    HashIndex hashIndex = new HashIndex(directory, name, indexManager);
                    hashIndex.setNumberOfBins(getIndexBinSize());
                    hashIndex.setKeySize(getIndexKeySize());
                    hashIndex.setPageSize(getIndexPageSize());
                    hashIndex.setMaximumCapacity(getIndexMaxBinSize());
                    hashIndex.setLoadFactor(getIndexLoadFactor());
                    this.index = hashIndex;
                } catch (IOException e) {
                    LOG.error("Failed to create HashIndex", e);
                    throw new RuntimeException(e);
                }
View Full Code Here

Examples of org.apache.activemq.kaha.impl.index.hash.HashIndex

public class HashIndexBenchMark extends IndexBenchmark {

    @Override
    protected Index createIndex(File root, String name) throws Exception {
        HashIndex index = new HashIndex(root, name, indexManager);
        index.setNumberOfBins(12);
        index.setPageSize(32 * 1024);
        index.setKeyMarshaller(Store.STRING_MARSHALLER);
        return index;
    }
View Full Code Here

Examples of org.apache.activemq.kaha.impl.index.hash.HashIndex

        super.init();
        if (index == null) {
            if (persistentIndex) {
                String name = containerId.getDataContainerName() + "_" + containerId.getKey();
                try {
                    HashIndex hashIndex = new HashIndex(directory, name, indexManager);
                    hashIndex.setNumberOfBins(getIndexBinSize());
                    hashIndex.setKeySize(getIndexKeySize());
                    hashIndex.setPageSize(getIndexPageSize());
                    hashIndex.setMaximumCapacity(getIndexMaxBinSize());
                    hashIndex.setLoadFactor(getIndexLoadFactor());
                    this.index = hashIndex;
                } catch (IOException e) {
                    LOG.error("Failed to create HashIndex", e);
                    throw new RuntimeException(e);
                }
View Full Code Here

Examples of org.apache.activemq.kaha.impl.index.hash.HashIndex

        if (index == null) {
            if (persistentIndex) {
                String name = containerId.getDataContainerName() + "_" + containerId.getKey();
                name=IOHelper.toFileSystemSafeName(name);
                try {
                    HashIndex hashIndex = new HashIndex(directory, name, indexManager);
                    hashIndex.setNumberOfBins(getIndexBinSize());
                    hashIndex.setKeySize(getIndexKeySize());
                    hashIndex.setPageSize(getIndexPageSize());
                    this.index = hashIndex;
                } catch (IOException e) {
                    LOG.error("Failed to create HashIndex", e);
                    throw new RuntimeException(e);
                }
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.