Java 类org.apache.hadoop.hbase.zookeeper.MetaNodeTracker 实例源码

项目:LCIndex-HBase-0.94.16    文件:CatalogTracker.java   
CatalogTracker(final ZooKeeperWatcher zk, final Configuration conf,
    HConnection connection, Abortable abortable)
throws IOException {
  this.connection = connection;
  if (abortable == null) {
    // A connection is abortable.
    this.abortable = this.connection;
  }
  Abortable throwableAborter = new Abortable() {

    @Override
    public void abort(String why, Throwable e) {
      throw new RuntimeException(why, e);
    }

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

  };
  if (zk == null) {
    // Create our own.  Set flag so we tear it down on stop.
    this.zookeeper =
      new ZooKeeperWatcher(conf, "catalogtracker-on-" + connection.toString(),
        abortable);
    instantiatedzkw = true;
  } else {
    this.zookeeper = zk;
  }
  this.rootRegionTracker = new RootRegionTracker(zookeeper, throwableAborter);
  final CatalogTracker ct = this;
  // Override nodeDeleted so we get notified when meta node deleted
  this.metaNodeTracker = new MetaNodeTracker(zookeeper, throwableAborter) {
    public void nodeDeleted(String path) {
      if (!path.equals(node)) return;
      ct.resetMetaLocation();
    }
  };
}
项目:IRIndex    文件:CatalogTracker.java   
CatalogTracker(final ZooKeeperWatcher zk, final Configuration conf,
    HConnection connection, Abortable abortable)
throws IOException {
  this.connection = connection;
  if (abortable == null) {
    // A connection is abortable.
    this.abortable = this.connection;
  }
  Abortable throwableAborter = new Abortable() {

    @Override
    public void abort(String why, Throwable e) {
      throw new RuntimeException(why, e);
    }

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

  };
  if (zk == null) {
    // Create our own.  Set flag so we tear it down on stop.
    this.zookeeper =
      new ZooKeeperWatcher(conf, "catalogtracker-on-" + connection.toString(),
        abortable);
    instantiatedzkw = true;
  } else {
    this.zookeeper = zk;
  }
  this.rootRegionTracker = new RootRegionTracker(zookeeper, throwableAborter);
  final CatalogTracker ct = this;
  // Override nodeDeleted so we get notified when meta node deleted
  this.metaNodeTracker = new MetaNodeTracker(zookeeper, throwableAborter) {
    public void nodeDeleted(String path) {
      if (!path.equals(node)) return;
      ct.resetMetaLocation();
    }
  };
}
项目:HBase-Research    文件:CatalogTracker.java   
CatalogTracker(final ZooKeeperWatcher zk, final Configuration conf,
    HConnection connection, Abortable abortable)
throws IOException {
  this.connection = connection;
  if (abortable == null) {
    // A connection is abortable.
    this.abortable = this.connection;
  }
  Abortable throwableAborter = new Abortable() {

    @Override
    public void abort(String why, Throwable e) {
      throw new RuntimeException(why, e);
    }

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

  };
  if (zk == null) {
    // Create our own.  Set flag so we tear it down on stop.
    this.zookeeper =
      new ZooKeeperWatcher(conf, "catalogtracker-on-" + connection.toString(),
        abortable);
    instantiatedzkw = true;
  } else {
    this.zookeeper = zk;
  }
  this.rootRegionTracker = new RootRegionTracker(zookeeper, throwableAborter);
  final CatalogTracker ct = this;
  // Override nodeDeleted so we get notified when meta node deleted
  this.metaNodeTracker = new MetaNodeTracker(zookeeper, throwableAborter) {
    public void nodeDeleted(String path) {
      if (!path.equals(node)) return;
      ct.resetMetaLocation();
    }
  };
}
项目:hbase-0.94.8-qod    文件:CatalogTracker.java   
CatalogTracker(final ZooKeeperWatcher zk, final Configuration conf,
    HConnection connection, Abortable abortable)
throws IOException {
  this.connection = connection;
  if (abortable == null) {
    // A connection is abortable.
    this.abortable = this.connection;
  }
  Abortable throwableAborter = new Abortable() {

    @Override
    public void abort(String why, Throwable e) {
      throw new RuntimeException(why, e);
    }

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

  };
  if (zk == null) {
    // Create our own.  Set flag so we tear it down on stop.
    this.zookeeper =
      new ZooKeeperWatcher(conf, "catalogtracker-on-" + connection.toString(),
        abortable);
    instantiatedzkw = true;
  } else {
    this.zookeeper = zk;
  }
  this.rootRegionTracker = new RootRegionTracker(zookeeper, throwableAborter);
  final CatalogTracker ct = this;
  // Override nodeDeleted so we get notified when meta node deleted
  this.metaNodeTracker = new MetaNodeTracker(zookeeper, throwableAborter) {
    public void nodeDeleted(String path) {
      if (!path.equals(node)) return;
      ct.resetMetaLocation();
    }
  };
}
项目:hbase-0.94.8-qod    文件:CatalogTracker.java   
CatalogTracker(final ZooKeeperWatcher zk, final Configuration conf,
    HConnection connection, Abortable abortable)
throws IOException {
  this.connection = connection;
  if (abortable == null) {
    // A connection is abortable.
    this.abortable = this.connection;
  }
  Abortable throwableAborter = new Abortable() {

    @Override
    public void abort(String why, Throwable e) {
      throw new RuntimeException(why, e);
    }

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

  };
  if (zk == null) {
    // Create our own.  Set flag so we tear it down on stop.
    this.zookeeper =
      new ZooKeeperWatcher(conf, "catalogtracker-on-" + connection.toString(),
        abortable);
    instantiatedzkw = true;
  } else {
    this.zookeeper = zk;
  }
  this.rootRegionTracker = new RootRegionTracker(zookeeper, throwableAborter);
  final CatalogTracker ct = this;
  // Override nodeDeleted so we get notified when meta node deleted
  this.metaNodeTracker = new MetaNodeTracker(zookeeper, throwableAborter) {
    public void nodeDeleted(String path) {
      if (!path.equals(node)) return;
      ct.resetMetaLocation();
    }
  };
}
项目:hindex    文件:CatalogTracker.java   
CatalogTracker(final ZooKeeperWatcher zk, final Configuration conf,
    HConnection connection, Abortable abortable)
throws IOException {
  this.connection = connection;
  if (abortable == null) {
    // A connection is abortable.
    this.abortable = this.connection;
  }
  Abortable throwableAborter = new Abortable() {

    @Override
    public void abort(String why, Throwable e) {
      throw new RuntimeException(why, e);
    }

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

  };
  if (zk == null) {
    // Create our own.  Set flag so we tear it down on stop.
    this.zookeeper =
      new ZooKeeperWatcher(conf, "catalogtracker-on-" + connection.toString(),
        abortable);
    instantiatedzkw = true;
  } else {
    this.zookeeper = zk;
  }
  this.rootRegionTracker = new RootRegionTracker(zookeeper, throwableAborter);
  final CatalogTracker ct = this;
  // Override nodeDeleted so we get notified when meta node deleted
  this.metaNodeTracker = new MetaNodeTracker(zookeeper, throwableAborter) {
    public void nodeDeleted(String path) {
      if (!path.equals(node)) return;
      ct.resetMetaLocation();
    }
  };
}
项目:LCIndex-HBase-0.94.16    文件:CatalogTracker.java   
MetaNodeTracker getMetaNodeTracker() {
  return this.metaNodeTracker;
}
项目:IRIndex    文件:CatalogTracker.java   
MetaNodeTracker getMetaNodeTracker() {
  return this.metaNodeTracker;
}
项目:RStore    文件:CatalogTracker.java   
CatalogTracker(final ZooKeeperWatcher zk, final Configuration conf,
    HConnection connection, Abortable abortable, final int defaultTimeout)
throws IOException {
  this.connection = connection;
  if (abortable == null) {
    // A connection is abortable.
    this.abortable = this.connection;
  }
  Abortable throwableAborter = new Abortable() {

    @Override
    public void abort(String why, Throwable e) {
      throw new RuntimeException(why, e);
    }

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

  };
  if (zk == null) {
    // Create our own.  Set flag so we tear it down on stop.
    this.zookeeper =
      new ZooKeeperWatcher(conf, "catalogtracker-on-" + connection.toString(),
        abortable);
    instantiatedzkw = true;
  } else {
    this.zookeeper = zk;
  }
  this.rootRegionTracker = new RootRegionTracker(zookeeper, throwableAborter);
  final CatalogTracker ct = this;
  // Override nodeDeleted so we get notified when meta node deleted
  this.metaNodeTracker = new MetaNodeTracker(zookeeper, throwableAborter) {
    public void nodeDeleted(String path) {
      if (!path.equals(node)) return;
      ct.resetMetaLocation();
    }
  };
  this.defaultTimeout = defaultTimeout;
}
项目:RStore    文件:CatalogTracker.java   
MetaNodeTracker getMetaNodeTracker() {
  return this.metaNodeTracker;
}
项目:HBase-Research    文件:CatalogTracker.java   
MetaNodeTracker getMetaNodeTracker() {
  return this.metaNodeTracker;
}
项目:hbase-0.94.8-qod    文件:CatalogTracker.java   
MetaNodeTracker getMetaNodeTracker() {
  return this.metaNodeTracker;
}
项目:hbase-0.94.8-qod    文件:CatalogTracker.java   
MetaNodeTracker getMetaNodeTracker() {
  return this.metaNodeTracker;
}
项目:DominoHBase    文件:CatalogTracker.java   
public CatalogTracker(final ZooKeeperWatcher zk, final Configuration conf,
    HConnection connection, Abortable abortable, final int defaultTimeout)
throws IOException {
  this.connection = connection;
  if (abortable == null) {
    // A connection is abortable.
    this.abortable = this.connection;
  }
  Abortable throwableAborter = new Abortable() {

    @Override
    public void abort(String why, Throwable e) {
      throw new RuntimeException(why, e);
    }

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

  };
  if (zk == null) {
    // Create our own.  Set flag so we tear it down on stop.
    this.zookeeper =
      new ZooKeeperWatcher(conf, "catalogtracker-on-" + connection.toString(),
        abortable);
    instantiatedzkw = true;
  } else {
    this.zookeeper = zk;
  }
  this.rootRegionTracker = new RootRegionTracker(zookeeper, throwableAborter);
  final CatalogTracker ct = this;
  // Override nodeDeleted so we get notified when meta node deleted
  this.metaNodeTracker = new MetaNodeTracker(zookeeper, throwableAborter) {
    public void nodeDeleted(String path) {
      if (!path.equals(node)) return;
      ct.resetMetaLocation();
    }
  };
  this.defaultTimeout = defaultTimeout;
}
项目:DominoHBase    文件:CatalogTracker.java   
MetaNodeTracker getMetaNodeTracker() {
  return this.metaNodeTracker;
}
项目:hindex    文件:CatalogTracker.java   
MetaNodeTracker getMetaNodeTracker() {
  return this.metaNodeTracker;
}