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

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


                if (this.getAtomicIndexTableAdmin().get() == null) {
                    try {
                        this.getAtomicIndexTableAdmin().set(new IndexedTableAdmin(this.getConfiguration()));
                    }
                    catch (MasterNotRunningException e) {
                        throw new HBqlException(e);
                    }
                    catch (ZooKeeperConnectionException e) {
                        throw new HBqlException(e);
                    }
                }
            }
        }
        return this.getAtomicIndexTableAdmin().get();
View Full Code Here


        try {
            final HTableDescriptor tableDesc = this.getHTableDescriptor(tableName);
            return new IndexedTableDescriptor(tableDesc);
        }
        catch (IOException e) {
            throw new HBqlException(e);
        }
    }
View Full Code Here

                get.setMaxVersions();
            else
                get.setMaxVersions(max);
        }
        catch (IOException e) {
            throw new HBqlException(e);
        }
    }
View Full Code Here

        try {
            final IndexedTableAdmin ita = this.getIndexTableAdmin();
            ita.removeIndex(tableName.getBytes(), indexName);
        }
        catch (IOException e) {
            throw new HBqlException(e);
        }
    }
View Full Code Here

        }
    }

    private void checkIfClosed() throws HBqlException {
        if (this.isClosed())
            throw new HBqlException("Connection is closed");
    }
View Full Code Here

    // Table Routines
    public void createTable(final HTableDescriptor tableDesc) throws HBqlException {
        this.checkIfClosed();
        final String tableName = tableDesc.getNameAsString();
        if (this.tableExists(tableName))
            throw new HBqlException("Table already exists: " + tableName);

        try {
            this.getHBaseAdmin().createTable(tableDesc);
        }
        catch (IOException e) {
            throw new HBqlException(e);
        }
    }
View Full Code Here

                return new HTableWrapper(new IndexedTable(this.getConfiguration(), tableName.getBytes()), null);
            else
                return new HTableWrapper(this.getTablePool().getTable(tableName), this.getTablePool());
        }
        catch (IOException e) {
            throw new HBqlException(e);
        }
        catch (RuntimeException e) {
            throw new HBqlException("Invalid table name: " + tableName);
        }
    }
View Full Code Here

    public boolean tableExists(final String tableName) throws HBqlException {
        try {
            return this.getHBaseAdmin().tableExists(tableName);
        }
        catch (MasterNotRunningException e) {
            throw new HBqlException(e);
        }
        catch (IOException e) {
            throw new HBqlException(e);
        }
    }
View Full Code Here

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

        this.validateTableName(tableName);
        try {
            return this.getHBaseAdmin().isTableAvailable(tableName);
        }
        catch (IOException e) {
            throw new HBqlException(e);
        }
    }
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.