Examples of ZooReader


Examples of org.apache.accumulo.fate.zookeeper.ZooReader

      auths = new Authorizations();
    }
  }

  public void enableTracing(Opts opts) throws Exception {
    DistributedTrace.enable(opts.getInstance(), new ZooReader(opts.getInstance().getZooKeepers(), 1000), "myHost", "myApp");
  }
View Full Code Here

Examples of org.apache.accumulo.fate.zookeeper.ZooReader

      throw new RuntimeException(ex);
    }
  }
 
  private static boolean verifyAccumuloIsDown(Instance inst, String oldPassword) {
    ZooReader zooReader = new ZooReaderWriter(inst.getZooKeepers(), inst.getZooKeepersSessionTimeOut(), oldPassword);
    String root = ZooUtil.getRoot(inst);
    final List<String> ephemerals = new ArrayList<String>();
    recurse(zooReader, root, new Visitor() {
      public void visit(ZooReader zoo, String path) throws Exception {
        Stat stat = zoo.getStatus(path);
View Full Code Here

Examples of org.apache.accumulo.fate.zookeeper.ZooReader

    opts.parseArgs(TestIngest.class.getName(), args, bwOpts);
   
    Instance instance = opts.getInstance();
   
    String name = TestIngest.class.getSimpleName();
    DistributedTrace.enable(instance, new ZooReader(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut()), name, null);
   
    try {
      opts.startTracing(name);
     
      if (opts.debug)
View Full Code Here

Examples of org.apache.accumulo.fate.zookeeper.ZooReader

import org.apache.accumulo.fate.zookeeper.ZooReader;
import org.apache.zookeeper.KeeperException;

public class MonitorUtil {
  public static String getLocation(Instance instance) throws KeeperException, InterruptedException {
    ZooReader zr = new ZooReader(instance.getZooKeepers(), 5000);
    byte[] loc = zr.getData(ZooUtil.getRoot(instance) + Constants.ZMONITOR_HTTP_ADDR, null);
    return loc==null ? null : new String(loc, Constants.UTF8);
  }
View Full Code Here

Examples of org.apache.accumulo.fate.zookeeper.ZooReader

   
    String tableName = getUniqueNames(1)[0];
    conn.tableOperations().create(tableName);
    conn.tableOperations().deleteRows("trace", null, null);

    DistributedTrace.enable(conn.getInstance(), new ZooReader(conn.getInstance().getZooKeepers(), 30*1000), "testTrace", "localhost");
    Span root = Trace.on("traceTest");
    ConditionalWriter cw = conn.createConditionalWriter(tableName, new ConditionalWriterConfig());

    // mutation conditional on column tx:seq not exiting
    ConditionalMutation cm0 = new ConditionalMutation("99006", new Condition("tx", "seq"));
View Full Code Here

Examples of org.apache.accumulo.fate.zookeeper.ZooReader

    opts.parseArgs(VerifyIngest.class.getName(), args, scanOpts);
    Instance instance = opts.getInstance();
    try {
      if (opts.trace) {
        String name = VerifyIngest.class.getSimpleName();
        DistributedTrace.enable(instance, new ZooReader(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut()), name, null);
        Trace.on(name);
        Trace.currentTrace().data("cmdLine", Arrays.asList(args).toString());
      }

      verifyIngest(opts.getConnector(), opts, scanOpts);
View Full Code Here

Examples of org.apache.accumulo.fate.zookeeper.ZooReader

  static synchronized void listInstances(String keepers, boolean printAll, boolean printErrors) {
    errors = 0;

    System.out.println("INFO : Using ZooKeepers " + keepers);
    ZooReader rdr = new ZooReader(keepers, ZOOKEEPER_TIMER_MILLIS);
    ZooCache cache = new ZooCache(keepers, ZOOKEEPER_TIMER_MILLIS);

    TreeMap<String,UUID> instanceNames = getInstanceNames(rdr, printErrors);
   
    System.out.println();
View Full Code Here

Examples of org.apache.accumulo.fate.zookeeper.ZooReader

          this.token = new PasswordToken(password);
        }
      }

      if (!options.isFake()) {
        ZooReader zr = new ZooReader(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut());
        DistributedTrace.enable(instance, zr, "shell", InetAddress.getLocalHost().getHostName());
      }

      this.setTableName("");
      this.principal = user;
View Full Code Here

Examples of org.apache.accumulo.fate.zookeeper.ZooReader

public class StopTabletServer extends Test {
 
  Set<TServerInstance> getTServers(Instance instance) throws KeeperException, InterruptedException {
    Set<TServerInstance> result = new HashSet<TServerInstance>();
    ZooReader rdr = new ZooReader(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut());
    String base = ZooUtil.getRoot(instance) + Constants.ZTSERVERS;
    for (String child : rdr.getChildren(base)) {
      try {
        List<String> children = rdr.getChildren(base + "/" + child);
        if (children.size() > 0) {
          Collections.sort(children);
          Stat stat = new Stat();
          byte[] data = rdr.getData(base + "/" + child + "/" + children.get(0), stat);
          if (!"master".equals(new String(data, Constants.UTF8))) {
            result.add(new TServerInstance(AddressUtil.parseAddress(child, false), stat.getEphemeralOwner()));
          }
        }
      } catch (KeeperException.NoNodeException ex) {
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.