Package org.xtreemfs.babudb.config

Examples of org.xtreemfs.babudb.config.ReplicationConfig


        FSUtils.delTree(new File(conf0.getDbLogDir()));
        FSUtils.delTree(new File(conf1.getDbLogDir()));
        FSUtils.delTree(new File(conf2.getDbLogDir()));
       
        FSUtils.delTree(new File(
                new ReplicationConfig("config/replication_server0.test", conf0).getTempDir()));
        FSUtils.delTree(new File(
                new ReplicationConfig("config/replication_server1.test", conf1).getTempDir()));
        FSUtils.delTree(new File(
                new ReplicationConfig("config/replication_server2.test", conf2).getTempDir()));
    }
View Full Code Here


     * @throws Exception
     */
    @Before
    public void setUp() throws Exception {
       
        config = new ReplicationConfig("config/replication_server0.test", conf0);
        dispatcher = new RequestDispatcher(config);
        dispatcher.setLifeCycleListener(this);
       
        // registers heartbeat operation at the handler
        Map<Integer, Operation> ops = new HashMap<Integer, Operation>();
View Full Code Here

    /**
     * @throws java.lang.Exception
     */
    @Before
    public void setUp() throws Exception {
        config = new ReplicationConfig("config/replication_server0.test", conf0);
       
        dispatcher = new RequestDispatcher(config);
        dispatcher.setLifeCycleListener(this);
       
        client = new RPCNIOSocketClient(config.getSSLOptions(), RQ_TIMEOUT, CON_TIMEOUT);
View Full Code Here

    private final String logDirFile = "logDir.file";
    private final String logTestString = "log";
           
    @Before
    public void setUpBefore() throws Exception {  
        conf = new ReplicationConfig("config/replication_server0.test", TestParameters.conf0);
        FSUtils.delTree(new File(conf.getBabuDBConfig().getBaseDir()));
        FSUtils.delTree(new File(conf.getBabuDBConfig().getDbLogDir()));
        FSUtils.delTree(new File(conf.getTempDir()));
        fileIO = new FileIO(conf);
    }
View Full Code Here

    /**
     * @throws java.lang.Exception
     */
    @Before
    public void setUp() throws Exception {
        config = new ReplicationConfig("config/replication_server0.test", conf0);
        dispatcher = new RequestDispatcher(config);
        dispatcher.setLifeCycleListener(this);
       
        Map<Integer, Operation> testOps = new HashMap<Integer, Operation>();
        testOps.put(operationId, operation);
View Full Code Here

    @Override
    public BabuDBInternal start(BabuDBInternal babuDB, String configPath)
            throws BabuDBException {
       
        // load the plugins configuration
        ReplicationConfig configuration;
        try {
            configuration = new ReplicationConfig(configPath, babuDB.getConfig());
        } catch (IOException ioe) {
            throw new BabuDBException(ErrorCode.REPLICATION_FAILURE,
                    "Replication configuration is broken.", ioe.getCause());
        }
       
        // replay the backup, if available
        try {
            new FileIO(configuration).replayBackupFiles();
        } catch (IOException io) {
            Logging.logMessage(Logging.LEVEL_ERROR, this, "Could not retrieve" +
                " the slave backup files, because: ", io.getMessage());
        }
       
        // initialize the replication services
        ReplicationManager replMan;
        try {
            replMan = new ReplicationManager(babuDB, configuration);          
        } catch (Exception e) {
            if (e.getMessage() == null) Logging.logError(Logging.LEVEL_ERROR, this, e);
            throw new BabuDBException(ErrorCode.REPLICATION_FAILURE,
                    e.getMessage(), e.getCause());
        }
       
        // initialize the BabuDB proxy interface
        return new BabuDBProxy(babuDB, replMan, configuration.getReplicationPolicy());
    }
View Full Code Here

    @BeforeClass
    public static void setUpBeforeClass() throws Exception {
        Logging.start(Logging.LEVEL_ERROR, Category.all);
        TimeSync.initializeLocal(TIMESYNC_GLOBAL, TIMESYNC_LOCAL);
       
        config = new ReplicationConfig("config/replication_server0.test", conf0);
       
        FSUtils.delTree(new File(config.getBabuDBConfig().getBaseDir()));
        FSUtils.delTree(new File(config.getBabuDBConfig().getDbLogDir()));
        FSUtils.delTree(new File(config.getTempDir()));
       
View Full Code Here

    @BeforeClass
    public static void setUpBeforeClass() throws Exception {
        Logging.start(Logging.LEVEL_ERROR, Category.all);
        TimeSync.initializeLocal(TIMESYNC_GLOBAL, TIMESYNC_LOCAL);
       
        config = new ReplicationConfig("config/replication_server0.test", conf0);
       
        rpcClient = new RPCNIOSocketClient(config.getSSLOptions(), RQ_TIMEOUT, CON_TIMEOUT);
        rpcClient.start();
        rpcClient.waitForStartup();
        testEntry.assignId(testLSN.getViewId(), testLSN.getSequenceNo());
View Full Code Here

TOP

Related Classes of org.xtreemfs.babudb.config.ReplicationConfig

Copyright © 2018 www.massapicom. 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.