Package org.apache.phoenix.memory

Examples of org.apache.phoenix.memory.GlobalMemoryManager$GlobalMemoryChunk


    public BaseQueryServicesImpl(ReadOnlyProps defaultProps, QueryServicesOptions options) {
        this.executor =  JobManager.createThreadPoolExec(
                options.getKeepAliveMs(),
                options.getThreadPoolSize(),
                options.getQueueSize());
        this.memoryManager = new GlobalMemoryManager(
                Runtime.getRuntime().maxMemory() * options.getMaxMemoryPerc() / 100,
                options.getMaxMemoryWaitMs());
        this.props = options.getProps(defaultProps);
        this.queryOptimizer = new QueryOptimizer(this);
    }
View Full Code Here


        maxSize = Math.min(maxSize, config.getLong(MAX_MEMORY_SIZE_ATTRIB, Long.MAX_VALUE));
        return maxSize;
    }
   
    private GlobalCache(Configuration config) {
        super(new GlobalMemoryManager(getMaxMemorySize(config),
                                      config.getInt(MAX_MEMORY_WAIT_MS_ATTRIB, QueryServicesOptions.DEFAULT_MAX_MEMORY_WAIT_MS)),
              config.getInt(QueryServices.MAX_SERVER_CACHE_TIME_TO_LIVE_MS_ATTRIB, QueryServicesOptions.DEFAULT_MAX_SERVER_CACHE_TIME_TO_LIVE_MS));
        this.config = config;
    }
View Full Code Here

        Tuple[] expectedResults = new Tuple[] {
                new SingleKeyValueTuple(new KeyValue(A, SINGLE_COLUMN_FAMILY, SINGLE_COLUMN, Bytes.toBytes(1))),
                new SingleKeyValueTuple(new KeyValue(B, SINGLE_COLUMN_FAMILY, SINGLE_COLUMN, Bytes.toBytes(1))),
            };

        MemoryManager memoryManager = new DelegatingMemoryManager(new GlobalMemoryManager(threshold, 0));
        ResultIterator scanner = new SpoolingResultIterator(iterator, memoryManager, threshold, maxSizeSpool);
        AssertResults.assertResults(scanner, expectedResults);
    }
View Full Code Here

    public BaseQueryServicesImpl(QueryServicesOptions options) {
        this.executor =  JobManager.createThreadPoolExec(
                options.getKeepAliveMs(),
                options.getThreadPoolSize(),
                options.getQueueSize());
        this.memoryManager = new GlobalMemoryManager(
                Runtime.getRuntime().totalMemory() * options.getMaxMemoryPerc() / 100,
                options.getMaxMemoryWaitMs());
        this.props = options.getProps();
        this.queryOptimizer = new QueryOptimizer(this);
    }
View Full Code Here

        TenantCache tenantCache = tenantId == null ? globalCache : globalCache.getChildTenantCache(tenantId);     
        return tenantCache;
    }
   
    private GlobalCache(Configuration config) {
        super(new GlobalMemoryManager(Runtime.getRuntime().totalMemory() *
                                          config.getInt(MAX_MEMORY_PERC_ATTRIB, QueryServicesOptions.DEFAULT_MAX_MEMORY_PERC) / 100,
                                      config.getInt(MAX_MEMORY_WAIT_MS_ATTRIB, QueryServicesOptions.DEFAULT_MAX_MEMORY_WAIT_MS)),
              config.getInt(QueryServices.MAX_SERVER_CACHE_TIME_TO_LIVE_MS, QueryServicesOptions.DEFAULT_MAX_SERVER_CACHE_TIME_TO_LIVE_MS));
        this.config = config;
    }
View Full Code Here

    public BaseQueryServicesImpl(QueryServicesOptions options) {
        this.executor =  JobManager.createThreadPoolExec(
                options.getKeepAliveMs(),
                options.getThreadPoolSize(),
                options.getQueueSize());
        this.memoryManager = new GlobalMemoryManager(
                Runtime.getRuntime().maxMemory() * options.getMaxMemoryPerc() / 100,
                options.getMaxMemoryWaitMs());
        this.props = options.getProps();
        this.queryOptimizer = new QueryOptimizer(this);
    }
View Full Code Here

TOP

Related Classes of org.apache.phoenix.memory.GlobalMemoryManager$GlobalMemoryChunk

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.