Package org.apache.hadoop.hbase.catalog

Examples of org.apache.hadoop.hbase.catalog.CatalogTracker


        // the conf from the master; the conf will already have an HConnection
        // associate so the below mocking of a connection will fail.
        HConnection connection =
          HConnectionTestingUtility.getMockedConnectionAndDecorate(TESTUTIL.getConfiguration(),
            rs0, rs0, rs0.getServerName(), HRegionInfo.FIRST_META_REGIONINFO);
        return new CatalogTracker(zk, conf, connection, abortable);
      }

      @Override
      void initNamespace() {
      }
View Full Code Here


        // conf will already have an HConnection associate so the below mocking
        // of a connection will fail.
        HConnection connection =
          HConnectionTestingUtility.getMockedConnectionAndDecorate(TESTUTIL.getConfiguration(),
            rs0, rs0, rs0.getServerName(), HRegionInfo.FIRST_META_REGIONINFO);
        return new CatalogTracker(zk, conf, connection, abortable);
      }

      @Override
      void initNamespace() {
      }
View Full Code Here

        // the conf from the master; the conf will already have an HConnection
        // associate so the below mocking of a connection will fail.
        HConnection connection =
          HConnectionTestingUtility.getMockedConnectionAndDecorate(TESTUTIL.getConfiguration(),
            rs0, rs0, rs0.getServerName(), HRegionInfo.FIRST_META_REGIONINFO);
        return new CatalogTracker(zk, conf, connection, abortable);
      }

      @Override
      void initNamespace() {
      }
View Full Code Here

   * @throws IOException
   * @see #cleanupCatalogTracker(CatalogTracker)
   */
  private synchronized CatalogTracker getCatalogTracker()
  throws ZooKeeperConnectionException, IOException {
    CatalogTracker ct = null;
    try {
      ct = new CatalogTracker(this.conf);
      ct.start();
    } catch (InterruptedException e) {
      // Let it out as an IOE for now until we redo all so tolerate IEs
      throw (InterruptedIOException)new InterruptedIOException("Interrupted").initCause(e);
    }
    return ct;
View Full Code Here

   * @throws IOException
   */
  public boolean tableExists(final TableName tableName)
  throws IOException {
    boolean b = false;
    CatalogTracker ct = getCatalogTracker();
    try {
      b = MetaReader.tableExists(ct, tableName);
    } finally {
      cleanupCatalogTracker(ct);
    }
View Full Code Here

   * <code> host187.example.com,60020,1289493121758</code>
   * @throws IOException if a remote or network exception occurs
   */
  public void closeRegion(final byte [] regionname, final String serverName)
  throws IOException {
    CatalogTracker ct = getCatalogTracker();
    try {
      if (serverName != null) {
        Pair<HRegionInfo, ServerName> pair = MetaReader.getRegion(ct, regionname);
        if (pair == null || pair.getFirst() == null) {
          throw new UnknownRegionException(Bytes.toStringBinary(regionname));
View Full Code Here

   * @throws IOException if a remote or network exception occurs
   * @throws InterruptedException
   */
  public void flush(final byte[] tableNameOrRegionName)
  throws IOException, InterruptedException {
    CatalogTracker ct = getCatalogTracker();
    try {
      Pair<HRegionInfo, ServerName> regionServerPair
        = getRegion(tableNameOrRegionName, ct);
      if (regionServerPair != null) {
        if (regionServerPair.getSecond() == null) {
View Full Code Here

   * @throws InterruptedException
   */
  private void compact(final byte[] tableNameOrRegionName,
    final byte[] columnFamily,final boolean major)
  throws IOException, InterruptedException {
    CatalogTracker ct = getCatalogTracker();
    try {
      Pair<HRegionInfo, ServerName> regionServerPair
        = getRegion(tableNameOrRegionName, ct);
      if (regionServerPair != null) {
        if (regionServerPair.getSecond() == null) {
View Full Code Here

   * @throws IOException if a remote or network exception occurs
   * @throws InterruptedException interrupt exception occurred
   */
  public void split(final byte[] tableNameOrRegionName,
      final byte [] splitPoint) throws IOException, InterruptedException {
    CatalogTracker ct = getCatalogTracker();
    try {
      Pair<HRegionInfo, ServerName> regionServerPair
        = getRegion(tableNameOrRegionName, ct);
      if (regionServerPair != null) {
        if (regionServerPair.getSecond() == null) {
View Full Code Here

        HRegionInfo.FIRST_META_REGIONINFO.getRegionName())
          || Bytes.equals(regionNameOrEncodedRegionName,
            HRegionInfo.FIRST_META_REGIONINFO.getEncodedNameAsBytes())) {
      return HRegionInfo.FIRST_META_REGIONINFO.getRegionName();
    }
    CatalogTracker ct = getCatalogTracker();
    byte[] tmp = regionNameOrEncodedRegionName;
    try {
      Pair<HRegionInfo, ServerName> regionServerPair
        = getRegion(regionNameOrEncodedRegionName, ct);
      if (regionServerPair != null && regionServerPair.getFirst() != null) {
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.catalog.CatalogTracker

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.