Package org.apache.hadoop.hbase.hbql.client

Examples of org.apache.hadoop.hbase.hbql.client.HBqlException


        this.validateTableName(tableName);
        try {
            return this.getHBaseAdmin().isTableEnabled(tableName);
        }
        catch (IOException e) {
            throw new HBqlException(e);
        }
    }
View Full Code Here


        try {
            final byte[] tableNameBytes = tableName.getBytes();
            this.getHBaseAdmin().deleteTable(tableNameBytes);
        }
        catch (IOException e) {
            throw new HBqlException(e);
        }
    }
View Full Code Here

    }

    public void disableTable(final String tableName) throws HBqlException {
        try {
            if (!this.tableEnabled(tableName))
                throw new HBqlException("Cannot disable disabled table: " + tableName);
            this.getHBaseAdmin().disableTable(tableName);
        }
        catch (IOException e) {
            throw new HBqlException(e);
        }
    }
View Full Code Here

        validateTableDisabled(tableName, "enable");
        try {
            this.getHBaseAdmin().enableTable(tableName);
        }
        catch (IOException e) {
            throw new HBqlException(e);
        }
    }
View Full Code Here

            for (final HTableDescriptor table : admin.listTables())
                tableSet.add(table.getNameAsString());
            return tableSet;
        }
        catch (IOException e) {
            throw new HBqlException(e);
        }
    }
View Full Code Here

    // The value returned from this call must be eventually released.
    public CompletionQueueExecutor getQueryExecutorForConnection() throws HBqlException {

        if (!Utils.isValidString(this.getQueryExecutorPoolName()))
            throw new HBqlException("Connection not assigned a QueryExecutorPool name");

        this.validateQueryExecutorPoolNameExists(this.getQueryExecutorPoolName());

        final QueryExecutorPool pool = QueryExecutorPoolManager.getQueryExecutorPool(this.getQueryExecutorPoolName());
        final CompletionQueueExecutor executorQueue = ((QueryExecutorPoolImpl)pool).take();
View Full Code Here

    // The value returned from this call must eventually be released.
    public AsyncExecutorImpl getAsyncExecutorForConnection() throws HBqlException {

        if (!Utils.isValidString(this.getAsyncExecutorName()))
            throw new HBqlException("Connection not assigned an AsyncExecutor name");

        this.validateAsyncExecutorNameExists(this.getAsyncExecutorName());

        final AsyncExecutor executor = AsyncExecutorManager.getAsyncExecutor(this.getAsyncExecutorName());
View Full Code Here

        return new HBatch<T>(this);
    }

    public void validateTableName(final String tableName) throws HBqlException {
        if (!this.tableExists(tableName))
            throw new HBqlException("Table not found: " + tableName);
    }
View Full Code Here

            throw new HBqlException("Table not found: " + tableName);
    }

    public void validateTableDisabled(final String tableName, final String action) throws HBqlException {
        if (this.tableEnabled(tableName))
            throw new HBqlException("Cannot " + action + " enabled table: " + tableName);
    }
View Full Code Here

            throw new HBqlException("Cannot " + action + " enabled table: " + tableName);
    }

    public void validateFamilyExistsForTable(final String familyName, final String tableName) throws HBqlException {
        if (!this.familyExistsForTable(familyName, tableName))
            throw new HBqlException("Family " + familyName + " not defined for table " + tableName);
    }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.hbql.client.HBqlException

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.