コード例 #1
0
  private ConfigurationCopy createSystemConfig() {
    Map<String, String> conf = new HashMap<>();
    conf.put(Property.INSTANCE_RPC_SASL_ENABLED.getKey(), "false");
    conf.put(Property.GC_CYCLE_START.getKey(), "1");
    conf.put(Property.GC_CYCLE_DELAY.getKey(), "20");
    conf.put(Property.GC_DELETE_THREADS.getKey(), "2");
    conf.put(Property.GC_TRASH_IGNORE.getKey(), "false");
    conf.put(Property.GC_FILE_ARCHIVE.getKey(), "false");

    return new ConfigurationCopy(conf);
  }
コード例 #2
0
  @BeforeClass
  public static void setupMiniCluster() throws Exception {
    FileUtils.deleteQuietly(testDir);
    testDir.mkdir();
    Logger.getLogger("org.apache.zookeeper").setLevel(Level.ERROR);

    macConfig = new MiniAccumuloConfig(testDir, passwd);
    macConfig.setNumTservers(1);

    // Turn on the garbage collector
    macConfig.runGC(true);

    // And tweak the settings to make it run often
    Map<String, String> config =
        ImmutableMap.of(
            Property.GC_CYCLE_DELAY.getKey(), "1s", Property.GC_CYCLE_START.getKey(), "0s");
    macConfig.setSiteConfig(config);

    accumulo = new MiniAccumuloCluster(macConfig);
    accumulo.start();
  }