Examples of GlobalMemoryManager


Examples of com.salesforce.phoenix.memory.GlobalMemoryManager

    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

Examples of com.salesforce.phoenix.memory.GlobalMemoryManager

        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

Examples of org.apache.phoenix.memory.GlobalMemoryManager

    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

Examples of org.apache.phoenix.memory.GlobalMemoryManager

        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

Examples of org.apache.phoenix.memory.GlobalMemoryManager

        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

Examples of org.apache.phoenix.memory.GlobalMemoryManager

    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

Examples of org.apache.phoenix.memory.GlobalMemoryManager

        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

Examples of org.apache.phoenix.memory.GlobalMemoryManager

    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
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.