Change these knobs-and-dials to config parameters. For an example, see QueryServices.MAX_SERVER_CACHE_TIME_TO_LIVE_MS and QueryServicesOptions.DEFAULT_MAX_SERVER_CACHE_TIME_TO_LIVE_MS and how they're used. In this way, customers can override then in their hbase-sites.xml and we can override them in unit tests (i.e. to force spilling). For an example of how to override this in a unit test, see MutableIndexTest, as you must override them before the server is started like this:

    @BeforeClass 
    public static void doSetup() throws Exception {
        Map<String,String> props = Maps.newHashMapWithExpectedSize(2);
        // Don't split intra region so we can more easily know that the n-way parallelization is for the explain plan
        props.put(QueryServices.MAX_INTRA_REGION_PARALLELIZATION_ATTRIB, Integer.toString(1));
        // Forces server cache to be used
        props.put(QueryServices.INDEX_MUTATE_BATCH_SIZE_THRESHOLD_ATTRIB, Integer.toString(2));
        // Must update config before starting server
        startServer(getUrl(), new ReadOnlyProps(props.entrySet().iterator()));
    }