Examples of ConfigBuilder


Examples of org.apache.hadoop.metrics2.impl.ConfigBuilder

  /**
   * Filters should accepts unmatched item when both include and
   * exclude patterns are present.
   */
  @Test public void shouldAcceptUnmatchedWhenBothAreConfigured() {
    SubsetConfiguration c = new ConfigBuilder()
        .add("p.include", "foo")
        .add("p.include.tags", "foo:f")
        .add("p.exclude", "bar")
        .add("p.exclude.tags", "bar:b").subset("p");
    shouldAccept(c, "foo");
View Full Code Here

Examples of org.apache.hadoop.metrics2.impl.ConfigBuilder

  /**
   * Include patterns should take precedence over exclude patterns
   */
  @Test public void includeShouldOverrideExclude() {
    SubsetConfiguration c = new ConfigBuilder()
        .add("p.include", "foo")
        .add("p.include.tags", "foo:f")
        .add("p.exclude", "foo")
        .add("p.exclude.tags", "foo:f").subset("p");
    shouldAccept(c, "foo");
View Full Code Here

Examples of org.xtreemfs.babudb.config.ConfigBuilder

     */
    public static void main(String[] args) throws BabuDBException {
       
        System.out.println("Setting up the BabuDB instances ... ");
       
        ConfigBuilder builder0 = new ConfigBuilder();
        builder0.setDataPath("/tmp/babudb0", "/tmp/babudb0/log").setLogAppendSyncMode(SyncMode.SYNC_WRITE);
        builder0.addPlugin("myBabuDBPath/pluginConfig0.properties");
        BabuDBConfig config0 = builder0.build();

        ConfigBuilder builder1 = new ConfigBuilder();
        builder1.setDataPath("/tmp/babudb1", "/tmp/babudb1/log").setLogAppendSyncMode(SyncMode.SYNC_WRITE);
        builder1.addPlugin("myBabuDBPath/pluginConfig1.properties");
        BabuDBConfig config1 = builder1.build();

        BabuDB babuDB0 = BabuDBFactory.createBabuDB(config0);
        BabuDB babuDB1 = BabuDBFactory.createBabuDB(config1);
       
        System.out.println("Creating database \"myDatabase\" ... ");
View Full Code Here

Examples of org.xtreemfs.babudb.config.ConfigBuilder

     *             if an error occurs while dumping the database
     */
    public static void dumpDB(String dbDir, String logDir, boolean compression, RecordFormatter formatter,
        PrintStream out) throws BabuDBException {
       
        BabuDB databaseSystem = BabuDBFactory.createBabuDB(new ConfigBuilder().setDataPath(dbDir, logDir)
                .setCompressed(compression).build());
       
        out.println("<BabuDB version=\"" + BabuDBFactory.BABUDB_VERSION + "\">");
       
        Map<String, Database> dbs = databaseSystem.getDatabaseManager().getDatabases();
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.