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

Examples of org.apache.hadoop.hbase.master.handler.EnableTableHandler


        LOG.info("The table " + tableName
            + " is in ENABLING state.  Hence recovering by moving the table"
            + " to ENABLED state.");
        // enableTable in sync way during master startup,
        // no need to invoke coprocessor
        new EnableTableHandler(this.master, tableName.getBytes(),
            catalogTracker, this, true).process();
      }
    }
  }
View Full Code Here


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

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

    AssignmentManagerWithExtrasForTesting am = setUpMockedAssignmentManager(server,
        this.serverManager);
    try {
      // set table in enabling state.
      am.getZKTable().setEnablingTable(REGIONINFO.getTable());
      new EnableTableHandler(server, REGIONINFO.getTable(),
          am.getCatalogTracker(), am, new NullTableLockManager(), true).prepare()
          .process();
      assertEquals("Number of assignments should be 1.", 1, assignmentCount);
      assertTrue("Table should be enabled.",
          am.getZKTable().isEnabledTable(REGIONINFO.getTable()));
View Full Code Here

        LOG.info("The table " + tableName
            + " is in ENABLING state.  Hence recovering by moving the table"
            + " to ENABLED state.");
        // enableTable in sync way during master startup,
        // no need to invoke coprocessor
        new EnableTableHandler(this.server, tableName,
            catalogTracker, this, tableLockManager, true).prepare().process();
      }
    }
  }
View Full Code Here

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

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

        LOG.info("The table " + tableName
            + " is in ENABLING state.  Hence recovering by moving the table"
            + " to ENABLED state.");
        // enableTable in sync way during master startup,
        // no need to invoke coprocessor
        new EnableTableHandler(this.master, tableName.getBytes(),
            catalogTracker, this, true).process();
      }
    }
  }
View Full Code Here

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

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

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

            // partially enabled or disabled they will be processed as part of recovery
            // enabling/disabling tables.
            // if user table is in ENABLED state and index table is in DISABLED state means master
            // restarted as soon as user table enabled. So here we need to enable index table.
            if (zkTable.isEnabledTable(tableName) && zkTable.isDisabledTable(indexTableName)) {
              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),
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.master.handler.EnableTableHandler

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.