Package org.apache.accumulo.server.master.state

Examples of org.apache.accumulo.server.master.state.ZooTabletStateStore


  }
 
  private long totalMinorCompactions;
 
  private static Pair<Text,KeyExtent> verifyRootTablet(KeyExtent extent, TServerInstance instance) throws DistributedStoreException, AccumuloException {
    ZooTabletStateStore store = new ZooTabletStateStore();
    if (!store.iterator().hasNext()) {
      throw new AccumuloException("Illegal state: location is not set in zookeeper");
    }
    TabletLocationState next = store.iterator().next();
    if (!instance.equals(next.future)) {
      throw new AccumuloException("Future location is not to this server for the root tablet");
    }
   
    if (next.current != null) {
View Full Code Here


      }
    });
   
    TCredentials systemAuths = SecurityConstants.getSystemCredentials();
    final TabletStateStore stores[] = {
        new ZooTabletStateStore(new ZooStore(zroot)),
        new RootTabletStateStore(instance, systemAuths, this),
        new MetaDataStateStore(instance, systemAuths, this)
    };
    watchers.add(new TabletGroupWatcher(stores[2], null));
    watchers.add(new TabletGroupWatcher(stores[1], watchers.get(0)));
View Full Code Here

    migrationCleanupThread.start();
   
    tserverSet.startListeningForTabletServerChanges();
   
    AuthInfo systemAuths = SecurityConstants.getSystemCredentials();
    final TabletStateStore stores[] = {new ZooTabletStateStore(new ZooStore(zroot)), new RootTabletStateStore(instance, systemAuths, this),
        new MetaDataStateStore(instance, systemAuths, this)};
    watchers.add(new TabletGroupWatcher(stores[2], null));
    watchers.add(new TabletGroupWatcher(stores[1], watchers.get(0)));
    watchers.add(new TabletGroupWatcher(stores[0], watchers.get(1)));
    for (TabletGroupWatcher watcher : watchers) {
View Full Code Here

      String clientAddress, ZooLock lock) throws AccumuloSecurityException, DistributedStoreException {
    for (int tries = 0; tries < 3; tries++) {
      try {
        log.debug("verifying extent " + extent);
        if (extent.equals(Constants.ROOT_TABLET_EXTENT)) {
          ZooTabletStateStore store = new ZooTabletStateStore();
          if (!store.iterator().hasNext()) {
            log.warn("Illegal state: location is not set in zookeeper");
            return null;
          }
          TabletLocationState next = store.iterator().next();
          if (!instance.equals(next.future)) {
            log.warn("Future location is not to this server for the root tablet");
            return null;
          }
          TreeMap<KeyExtent,Text> set = new TreeMap<KeyExtent,Text>();
View Full Code Here

      }
    });
   
    TCredentials systemAuths = SecurityConstants.getSystemCredentials();
    final TabletStateStore stores[] = {
        new ZooTabletStateStore(new ZooStore(zroot)),
        new RootTabletStateStore(instance, systemAuths, this),
        new MetaDataStateStore(instance, systemAuths, this)
    };
    watchers.add(new TabletGroupWatcher(stores[2], null));
    watchers.add(new TabletGroupWatcher(stores[1], watchers.get(0)));
View Full Code Here

  }
 
  private long totalMinorCompactions;
 
  private static Pair<Text,KeyExtent> verifyRootTablet(KeyExtent extent, TServerInstance instance) throws DistributedStoreException, AccumuloException {
    ZooTabletStateStore store = new ZooTabletStateStore();
    if (!store.iterator().hasNext()) {
      throw new AccumuloException("Illegal state: location is not set in zookeeper");
    }
    TabletLocationState next = store.iterator().next();
    if (!instance.equals(next.future)) {
      throw new AccumuloException("Future location is not to this server for the root tablet");
    }
   
    if (next.current != null) {
View Full Code Here

  }

  private long totalMinorCompactions;

  private static Pair<Text,KeyExtent> verifyRootTablet(KeyExtent extent, TServerInstance instance) throws DistributedStoreException, AccumuloException {
    ZooTabletStateStore store = new ZooTabletStateStore();
    if (!store.iterator().hasNext()) {
      throw new AccumuloException("Illegal state: location is not set in zookeeper");
    }
    TabletLocationState next = store.iterator().next();
    if (!instance.equals(next.future)) {
      throw new AccumuloException("Future location is not to this server for the root tablet");
    }

    if (next.current != null) {
View Full Code Here

    });

    Credentials systemCreds = SystemCredentials.get();
    watchers.add(new TabletGroupWatcher(this, new MetaDataStateStore(instance, systemCreds, this), null));
    watchers.add(new TabletGroupWatcher(this, new RootTabletStateStore(instance, systemCreds, this), watchers.get(0)));
    watchers.add(new TabletGroupWatcher(this, new ZooTabletStateStore(new ZooStore(zroot)), watchers.get(1)));
    for (TabletGroupWatcher watcher : watchers) {
      watcher.start();
    }

    // Once we are sure the upgrade is complete, we can safely allow fate use.
View Full Code Here

      String clientAddress, ZooLock lock) throws AccumuloSecurityException, DistributedStoreException {
    for (int tries = 0; tries < 3; tries++) {
      try {
        log.debug("verifying extent " + extent);
        if (extent.equals(Constants.ROOT_TABLET_EXTENT)) {
          ZooTabletStateStore store = new ZooTabletStateStore();
          if (!store.iterator().hasNext()) {
            log.warn("Illegal state: location is not set in zookeeper");
            return null;
          }
          TabletLocationState next = store.iterator().next();
          if (!instance.equals(next.future)) {
            log.warn("Future location is not to this server for the root tablet");
            return null;
          }
          TreeMap<KeyExtent,Text> set = new TreeMap<KeyExtent,Text>();
View Full Code Here

    migrationCleanupThread.start();
   
    tserverSet.startListeningForTabletServerChanges();
   
    AuthInfo systemAuths = SecurityConstants.getSystemCredentials();
    final TabletStateStore stores[] = {new ZooTabletStateStore(new ZooStore(zroot)), new RootTabletStateStore(instance, systemAuths, this),
        new MetaDataStateStore(instance, systemAuths, this)};
    watchers.add(new TabletGroupWatcher(stores[2], null));
    watchers.add(new TabletGroupWatcher(stores[1], watchers.get(0)));
    watchers.add(new TabletGroupWatcher(stores[0], watchers.get(1)));
    for (TabletGroupWatcher watcher : watchers) {
View Full Code Here

TOP

Related Classes of org.apache.accumulo.server.master.state.ZooTabletStateStore

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.