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

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


        for (final SelectExpressionContext element : this.getValueList()) {
            element.validate(this.getInsertStatement().getMappingContext(), conn);

            // Make sure values do not have column references
            if (element.hasAColumnReference())
                throw new HBqlException("Column reference " + element.asString() + " not valid in " + this.asString());
        }
    }
View Full Code Here


                get.setTimeStamp(this.getLower());
            else
                get.setTimeRange(this.getLower(), this.getUpper());
        }
        catch (IOException e) {
            throw new HBqlException(e);
        }
    }
View Full Code Here

                scan.setTimeStamp(this.getLower());
            else
                scan.setTimeRange(this.getLower(), this.getUpper());
        }
        catch (IOException e) {
            throw new HBqlException(e);
        }
    }
View Full Code Here

    }

    public ExecutionResults executeUpdate(final HBqlStatement statement) throws HBqlException {

        if (Utils.isSelectStatement(statement)) {
            throw new HBqlException("executeUpdate() requires a non-SELECT statement");
        }
        else if (Utils.isConnectionStatemet(statement)) {
            return ((ConnectionStatement)statement).evaluatePredicateAndExecute(this.getHConnectionImpl());
        }
        else if (Utils.isNonConectionStatemet(statement)) {
View Full Code Here

    protected <T> HResultSet<T> executeQuery(final HBqlStatement statement,
                                             final Class clazz,
                                             final QueryListener<T>... listeners) throws HBqlException {

        if (!Utils.isSelectStatement(statement))
            throw new HBqlException("executeQuery() requires a SELECT statement");

        final Query<T> query = Query.newQuery(this.getHConnectionImpl(), (SelectStatement)statement, clazz, listeners);

        this.resultSet = query.newResultSet(this.getIgnoreQueryExecutor());
View Full Code Here

    protected <T> QueryFuture executeQueryAsync(final HBqlStatement statement,
                                                final Class clazz,
                                                final QueryListener<T>... listeners) throws HBqlException {

        if (!Utils.isSelectStatement(statement))
            throw new HBqlException("executeQueryAsync() requires a SELECT statement");

        final AsyncExecutorImpl asyncExecutor = this.getHConnectionImpl().getAsyncExecutorForConnection();

        final Query<T> query = Query.newQuery(this.getHConnectionImpl(), (SelectStatement)statement, clazz, listeners);
View Full Code Here

    public void apply(final HTableInterface table) throws HBqlException {
        try {
            table.delete(this.getActionValue());
        }
        catch (IOException e) {
            throw new HBqlException(e);
        }
    }
View Full Code Here

                if (!firstTime)
                    sbuf.append(", ");
                sbuf.append(str);
                firstTime = false;
            }
            throw new HBqlException("Select args specificed multiple times: " + sbuf);
        }
    }
View Full Code Here

        final ColumnWidth columnWidth = keyAttrib.getColumnDefinition().getColumnWidth();
        if (columnWidth.isWidthSpecified()) {
            for (final String rangeValue : rangeValues) {
                final int width = columnWidth.getWidth();
                if (width > 0 && rangeValue.length() != width)
                    throw new HBqlException("Invalid key range length in " + this.asString()
                                            + " expecting width " + width + " but found " + rangeValue.length()
                                            + " with key \"" + rangeValue + "\"");
            }
        }
    }
View Full Code Here

                if (this.getAtomicHbaseAdmin().get() == null) {
                    try {
                        this.getAtomicHbaseAdmin().set(new HBaseAdmin(this.getConfiguration()));
                    }
                    catch (MasterNotRunningException e) {
                        throw new HBqlException(e);
                    }
                    catch (ZooKeeperConnectionException e) {
                        throw new HBqlException(e);
                    }
                }
            }
        }
        return this.getAtomicHbaseAdmin().get();
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.