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

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


            if (cnt > 0)
                table.flushCommits();
            return cnt;
        }
        catch (IOException e) {
            throw new HBqlException(e);
        }
    }
View Full Code Here


    }

    public int setStatementParameter(final String name, final Object val) throws HBqlException {
        final int cnt = this.getWithArgs().setParameter(name, val);
        if (cnt == 0)
            throw new HBqlException("Parameter name " + name + " does not exist in " + this.asString());
        return cnt;
    }
View Full Code Here

        try {
            conn.getIndexTableAdmin().addIndex(mapping.getTableNameAsBytes(), spec);
        }
        catch (IOException e) {
            throw new HBqlException(e);
        }

        return new ExecutionResults(this.getCreateIndexMsg(indexList, includeList));
    }
View Full Code Here

                    retval.add(familyName);
                }
                else {
                    final ColumnAttrib columnAttrib = mapping.getAttribByVariableName(column);
                    if (columnAttrib == null)
                        throw new HBqlException("Unknown " +
                                                ((!column.contains(":")) ? "alias" : "column")
                                                + " " + column + " in mapping " + this.getMappingContext()
                                                                                      .getMappingName());
                    else
                        retval.add(columnAttrib.getFamilyQualifiedName());
View Full Code Here

        try {
            conn.getHBaseAdmin().split(this.getTableName());
        }
        catch (IOException e) {
            throw new HBqlException(e);
        }
        catch (InterruptedException e) {
            throw new HBqlException(e);
        }
        return new ExecutionResults("Table " + this.getTableName() + " split.");
    }
View Full Code Here

        try {
            conn.validateFamilyExistsForTable(this.getFamilyName(), tableName);
            admin.deleteColumn(tableName, this.getFamilyName());
        }
        catch (IOException e) {
            throw new HBqlException(e);
        }
    }
View Full Code Here

        try {
            conn.getHBaseAdmin().enableTable(this.getTableName());
        }
        catch (IOException e) {
            throw new HBqlException(e);
        }

        return new ExecutionResults("Table " + this.getTableName() + " enabled.");
    }
View Full Code Here

                this.familyName = this.getColumnAttrib().getFamilyName();
                this.columnName = this.getColumnAttrib().getColumnName();
            }
            else {
                if (!name.contains(":"))
                    throw new HBqlException("Unknown select value: " + name);
                final String[] strs = name.split(":");
                this.familyName = strs[0];
                this.columnName = strs[1];
                final Collection<String> families = this.getTableMapping().getMappingFamilyNames();
                if (!families.contains(this.getFamilyName()))
                    throw new HBqlException("Unknown family name: " + this.getFamilyName());
            }

            this.familyNameBytes = IO.getSerialization().getStringAsBytes(this.getFamilyName());
            this.columnNameBytes = IO.getSerialization().getStringAsBytes(this.getColumnName());
        }
View Full Code Here

    protected ExecutionResults execute(final HConnectionImpl conn) throws HBqlException {
        try {
            conn.getHBaseAdmin().disableTable(this.getTableName());
        }
        catch (IOException e) {
            throw new HBqlException(e);
        }

        return new ExecutionResults("Table " + this.getTableName() + " disabled.");
    }
View Full Code Here

        throw new SQLFeatureNotSupportedException();
    }

    public void clearParameters() throws HBqlException {
        if (!(this.getStatement() instanceof StatementWithParameters)) {
            throw new HBqlException(this.getStatement().getClass().getSimpleName()
                                    + " statements do not support parameters");
        }

        final StatementWithParameters paramStmt = (StatementWithParameters)this.getStatement();
        paramStmt.resetParameters();
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.