Examples of Replication


Examples of org.apache.hadoop.hbase.replication.regionserver.Replication

    System.exit(ret);
  }

  @Override
  public int run(String[] args) throws Exception {
    Replication replication;
    ReplicationSourceManager manager;
    FileSystem fs;
    Path oldLogDir, logDir, rootDir;
    ZooKeeperWatcher zkw;

    Abortable abortable = new Abortable() {
      @Override
      public void abort(String why, Throwable e) {
      }

      @Override
      public boolean isAborted() {
        return false;
      }
    };

    zkw =
        new ZooKeeperWatcher(conf, "syncupReplication" + System.currentTimeMillis(), abortable,
            true);

    rootDir = FSUtils.getRootDir(conf);
    fs = FileSystem.get(conf);
    oldLogDir = new Path(rootDir, HConstants.HREGION_OLDLOGDIR_NAME);
    logDir = new Path(rootDir, HConstants.HREGION_LOGDIR_NAME);

    System.out.println("Start Replication Server start");
    replication = new Replication(new DummyServer(zkw), fs, logDir, oldLogDir);
    manager = replication.getReplicationManager();
    manager.init();

    try {
      int numberOfOldSource = 1; // default wait once
      while (numberOfOldSource > 0) {
View Full Code Here

Examples of org.apache.hadoop.hbase.replication.regionserver.Replication

    // Instantiate replication manager if replication enabled.  Pass it the
    // log directories.
    try {
      this.replicationHandler = Replication.isReplication(this.conf)?
        new Replication(this, this.fs, logdir, oldLogDir): null;
    } catch (KeeperException e) {
      throw new IOException("Failed replication handler create", e);
    }
    return instantiateHLog(logdir, oldLogDir);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.replication.regionserver.Replication

    // Instantiate replication manager if replication enabled.  Pass it the
    // log directories.
    try {
      this.replicationHandler = Replication.isReplication(this.conf)?
        new Replication(this, this.fs, logdir, oldLogDir): null;
    } catch (KeeperException e) {
      throw new IOException("Failed replication handler create", e);
    }
    return instantiateHLog(logdir, oldLogDir);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.replication.regionserver.Replication

    // Instantiate replication manager if replication enabled.  Pass it the
    // log directories.
    try {
      this.replicationHandler = Replication.isReplication(this.conf)?
        new Replication(this, this.fs, logdir, oldLogDir): null;
    } catch (KeeperException e) {
      throw new IOException("Failed replication handler create", e);
    }
    return instantiateHLog(logdir, oldLogDir);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.replication.regionserver.Replication

    if (fs.exists(logdir)) {
      throw new RegionServerRunningException("region server already " +
        "running at " + this.serverInfo.getServerName() +
        " because logdir " + logdir.toString() + " exists");
    }
    this.replicationHandler = new Replication(this.conf,this.serverInfo,
        this.fs, logdir, oldLogDir, stopRequested);
    HLog log = instantiateHLog(logdir, oldLogDir);
    this.replicationHandler.addLogEntryVisitor(log);
    return log;
  }
View Full Code Here

Examples of org.apache.harmony.pack200.NewAttributeBands.Replication

        MockNewAttributeBands newAttributeBands = new MockNewAttributeBands(1,
                null, null, new AttributeDefinition(35,
                        AttributeDefinitionBands.CONTEXT_CLASS, name, layout));
        List layoutElements = newAttributeBands.getLayoutElements();
        assertEquals(1, layoutElements.size());
        Replication element = (Replication) layoutElements.get(0);
        Integral countElement = element.getCountElement();
        assertEquals("H", countElement.getTag());
        List replicatedElements = element.getLayoutElements();
        assertEquals(5, replicatedElements.size());
        Integral firstElement = (Integral) replicatedElements.get(0);
        assertEquals("PH", firstElement.getTag());
        Integral secondElement = (Integral) replicatedElements.get(1);
        assertEquals("OH", secondElement.getTag());
View Full Code Here

Examples of org.apache.harmony.pack200.NewAttributeBands.Replication

        Callable firstCallable = (Callable) layoutElements.get(0);
        Callable secondCallable = (Callable) layoutElements.get(1);
        Callable thirdCallable = (Callable) layoutElements.get(2);
        List firstBody = firstCallable.getBody();
        assertEquals(1, firstBody.size());
        Replication rep = (Replication) firstBody.get(0);
        List repBody = rep.getLayoutElements();
        assertEquals(1, repBody.size());
        Call call = (Call) repBody.get(0);
        assertEquals(1, call.getCallableIndex());
        assertEquals(secondCallable, call.getCallable());
    }
View Full Code Here

Examples of org.openntf.domino.Replication

  }

  @Override
  public boolean isReplicationDisabled() {
    if (this.isReplicationDisabled_ == null) {
      Replication repl = getReplicationInfo();
      isReplicationDisabled_ = repl.isDisabled();
    }
    return isReplicationDisabled_.booleanValue();
  }
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.