Package org.apache.hadoop.hbase.master.handler

Examples of org.apache.hadoop.hbase.master.handler.DisableTableHandler$BulkDisabler


    checkInitialized();
    if (cpHost != null) {
      cpHost.preDisableTable(tableName);
    }
    LOG.info(getClientIdAuditPrefix() + " disable " + tableName);
    this.executorService.submit(new DisableTableHandler(this, tableName,
      catalogTracker, assignmentManager, tableLockManager, false).prepare());
    if (cpHost != null) {
      cpHost.postDisableTable(tableName);
    }
  }
View Full Code Here


    checkInitialized();
    if (cpHost != null) {
      cpHost.preDisableTable(tableName);
    }
    LOG.info(getClientIdAuditPrefix() + " disable " + tableName);
    this.executorService.submit(new DisableTableHandler(this, tableName,
      catalogTracker, assignmentManager, tableLockManager, false).prepare());
    if (cpHost != null) {
      cpHost.postDisableTable(tableName);
    }
  }
View Full Code Here

      for (String tableName : disablingTables) {
        // Recover by calling DisableTableHandler
        LOG.info("The table " + tableName
            + " is in DISABLING state.  Hence recovering by moving the table"
            + " to DISABLED state.");
        new DisableTableHandler(this.master, tableName.getBytes(),
            catalogTracker, this, true).process();
      }
    }
    return isWatcherCreated;
  }
View Full Code Here

  public void disableTable(final byte [] tableName) throws IOException {
    checkInitialized();
    if (cpHost != null) {
      cpHost.preDisableTable(tableName);
    }
    this.executorService.submit(new DisableTableHandler(this, tableName,
        catalogTracker, assignmentManager, false));

    if (cpHost != null) {
      cpHost.postDisableTable(tableName);
    }
View Full Code Here

    byte[] tableNameInBytes = Bytes.toBytes(tableName);
    LOG.error(tableName + " already exists.  Disabling and deleting table " + tableName + '.');
    boolean disabled = master.getAssignmentManager().getZKTable().isDisabledTable(tableName);
    if (false == disabled) {
      LOG.info("Disabling table " + tableName + '.');
      new DisableTableHandler(master, tableNameInBytes, master.getCatalogTracker(),
          master.getAssignmentManager(), false).process();
      if (false == master.getAssignmentManager().getZKTable().isDisabledTable(tableName)) {
        throw new IOException("Table " + tableName + " not disabled.");
      }
    }
View Full Code Here

    new CreateTableHandler(master, master.getMasterFileSystem(), master.getServerManager(),
        indexTableDesc, master.getConfiguration(), newRegions, master.getCatalogTracker(),
        master.getAssignmentManager()).process();
    // Disable the index table so that when we enable the main table both can be enabled
    if (disableTable) {
      new DisableTableHandler(master, Bytes.toBytes(indexTableName), master.getCatalogTracker(),
          master.getAssignmentManager(), false).process();
    }
    LOG.info("Created secondary index table " + indexTableName + " for table "
        + iDesc.getNameAsString() + '.');
View Full Code Here

          // Both user table and index table should not be in enabling/disabling state at a time.
          // If disable is progress for user table then index table should be in ENABLED state.
          // If enable is progress for index table wait until table enabled.
          waitUntilTableEnabled(timeout, indexTableName, am.getZKTable());
          if (waitUntilTableEnabled(timeout, indexTableName, am.getZKTable())) {
            new DisableTableHandler(master, Bytes.toBytes(indexTableName),
                master.getCatalogTracker(), am, false).process();
          } else {
            if (LOG.isDebugEnabled()) {
              LOG.debug("Table " + indexTableName + " not in ENABLED state to disable.");
            }
View Full Code Here

              new EnableTableHandler(master, Bytes.toBytes(indexTableName),
                  master.getCatalogTracker(), am, false).process();
            } else if (zkTable.isDisabledTable(tableName) && zkTable.isEnabledTable(indexTableName)) {
              // If user table is in DISABLED state and index table is in ENABLED state means master
              // restarted as soon as user table disabled. So here we need to disable index table.
              new DisableTableHandler(master, Bytes.toBytes(indexTableName),
                  master.getCatalogTracker(), am, false).process();
              // clear index table region plans in secondary index load balancer.
              clearRegionPlans((HMaster) master, indexTableName);

            }
View Full Code Here

      for (String tableName : disablingTables) {
        // Recover by calling DisableTableHandler
        LOG.info("The table " + tableName
            + " is in DISABLING state.  Hence recovering by moving the table"
            + " to DISABLED state.");
        new DisableTableHandler(this.master, tableName.getBytes(),
            catalogTracker, this, true).process();
      }
    }
    return isWatcherCreated;
  }
View Full Code Here

      for (TableName tableName : disablingTables) {
        // Recover by calling DisableTableHandler
        LOG.info("The table " + tableName
            + " is in DISABLING state.  Hence recovering by moving the table"
            + " to DISABLED state.");
        new DisableTableHandler(this.server, tableName, catalogTracker,
            this, tableLockManager, true).prepare().process();
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.master.handler.DisableTableHandler$BulkDisabler

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.