Package com.alibaba.wasp

Examples of com.alibaba.wasp.TableNotDisabledException


    // Check if table exists
    if (!FMetaReader.tableExists(server.getConfiguration(), this.tableNameStr)) {
      throw new TableNotFoundException(tableNameStr);
    }
    if (!this.assignmentManager.getZKTable().isDisabledTable(tableNameStr)) {
      throw new TableNotDisabledException(tableNameStr);
    }
    ftable = FMetaReader.getTable(server.getConfiguration(), tableNameStr);
    if (ftable.isRootTable()) {
      List<FTable> childTables = FMetaReader.getChildTable(
          server.getConfiguration(), tableNameStr);
View Full Code Here


    String tableNameStr = Bytes.toString(tableName);
    if (!FMetaReader.tableExists(this.conf, tableNameStr)) {
      throw new TableNotFoundException(tableNameStr);
    }
    if (!getAssignmentManager().getZKTable().isDisabledTable(tableNameStr)) {
      throw new TableNotDisabledException(tableName);
    }
  }
View Full Code Here

              MasterAdminProtos.DeleteTableRequest request = RequestConverter
                  .buildDeleteTableRequest(byteName);
              responses.add(masterAdminKeepAliveConnection.deleteTable(null,
                  request));
            } else {
              throw new TableNotDisabledException(tableName);
            }
          }
          return ResponseConverter.buildListExecuteResponse(responses);
        } else if (executePlan instanceof TruncateTablePlan) {
          List<TruncateTableResponse> responses = new ArrayList<TruncateTableResponse>();
          for (String tableName : ((TruncateTablePlan) executePlan)
              .getTableNames()) {
            byte[] byteName = Bytes.toBytes(tableName);
            if (this.connection.isTableDisabled(byteName)) {
              MasterAdminProtos.TruncateTableRequest request = RequestConverter
                  .buildTruncateTableRequest(byteName);
              responses.add(masterAdminKeepAliveConnection.truncateTable(null,
                  request));
            } else {
              throw new TableNotDisabledException(tableName);
            }
          }
        }
      }
View Full Code Here

        try {
          if (!this.assignmentManager.getZKTable()
              .checkDisabledAndSetEnablingTable(this.tableNameStr)) {
            LOG.info("Table " + tableNameStr
                + " isn't disabled; skipping enable");
            throw new TableNotDisabledException(this.tableNameStr);
          }
        } catch (KeeperException e) {
          tableLockManager.unlockTable(tableNameStr);
          throw new IOException("Unable to ensure that the table will be"
              + " enabling because of a ZooKeeper issue", e);
View Full Code Here

TOP

Related Classes of com.alibaba.wasp.TableNotDisabledException

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.