コード例 #1
0
  @Before
  public void setUp() throws Exception {
    super.setUp(builder, false);
    initializeCatalog(1, 1, NUM_PARTITIONS);
    this.anticache_dir = FileUtil.getTempDirectory();

    // Just make sure that the Table has the evictable flag set to true
    this.locators = new int[TARGET_TABLES.length];
    for (int i = 0; i < TARGET_TABLES.length; i++) {
      Table catalog_tbl = getTable(TARGET_TABLES[i]);
      assertTrue(catalog_tbl.getEvictable());
      this.locators[i] = catalog_tbl.getRelativeIndex();
    } // FOR

    Site catalog_site = CollectionUtil.first(catalogContext.sites);
    this.hstore_conf = HStoreConf.singleton();
    this.hstore_conf.site.anticache_enable = true;
    this.hstore_conf.site.anticache_profiling = true;
    this.hstore_conf.site.anticache_check_interval = Integer.MAX_VALUE;
    this.hstore_conf.site.anticache_dir = this.anticache_dir.getAbsolutePath();

    this.hstore_site = createHStoreSite(catalog_site, hstore_conf);
    this.executor = hstore_site.getPartitionExecutor(0);
    assertNotNull(this.executor);
    this.ee = executor.getExecutionEngine();
    assertNotNull(this.executor);
    this.profiler = hstore_site.getAntiCacheManager().getDebugContext().getProfiler(0);
    assertNotNull(profiler);

    this.client = createClient();
  }
コード例 #2
0
  @Override
  protected void setUp() throws Exception {
    super.setUp(ProjectType.TPCC);
    addPartitions(NUM_PARTITONS);

    Site catalog_site = CollectionUtil.first(CatalogUtil.getCluster(catalog).getSites());
    assertNotNull(catalog_site);
    hstore_site = HStore.initialize(catalog_site, HStoreConf.singleton());
    for (int p = 0; p < NUM_PARTITONS; p++) {
      PartitionExecutor site = new MockPartitionExecutor(p, catalog, p_estimator);
      hstore_site.addPartitionExecutor(p, site);
    } // FOR

    this.queue = new TransactionQueueManager(hstore_site);
  }