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

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


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


                final String poolName = (String)this.getExprArg(0).getValue(null, null);
                return QueryExecutorPoolManager.queryExecutorPoolExists(poolName);
            }

            default:
                throw new HBqlException("Invalid function: " + this.getFunctionType());
        }
    }
View Full Code Here

                                           withArgs.getColumnsUsedInIndexWhereExpr(),
                                           withArgs.getFilterForTableIndex(),
                                           getColumns());
        }
        catch (IOException e) {
            throw new HBqlException(e);
        }
    }
View Full Code Here

                                          final HTableInterface table) throws HBqlException {
        try {
            return table.getScanner(this.getScanValue());
        }
        catch (IOException e) {
            throw new HBqlException(e);
        }
    }
View Full Code Here

                    sbuf.append(val);
                return sbuf.toString();
            }

            default:
                throw new HBqlException("Invalid function: " + this.getFunctionType());
        }
    }
View Full Code Here

        }
        else {
            // Only has one family
            final String familyName = this.getFamilyNameList().get(0);
            if (!familyList.contains(familyName))
                throw new HBqlException("Invalid family name: " + familyName);

            this.getAttribsUsedInExpr().add(new SelectFamilyAttrib(familyName));
        }

        for (final String familyName : this.getFamilyNameList())
View Full Code Here

                try {
                    return formatter.parse(datestr).getTime();
                }
                catch (ParseException e) {
                    throw new HBqlException(e.getMessage());
                }
            }

            case DATEINTERVAL: {
                final Number num = (Number)this.getExprArg(0).getValue(conn, object);
                final long val = num.longValue();
                return val * this.getIntervalType().getIntervalMillis();
            }

            case DATECONSTANT: {
                return this.dateValue.getValue(conn, object);
            }

            case RANDOMDATE: {
                return Math.abs(GenericFunction.randomVal.nextLong());
            }

            case LONGTODATE: {
                final Number num = (Number)this.getExprArg(0).getValue(conn, object);
                final long val = num.longValue();
                this.dateValue = new DateLiteral(val);
                return this.dateValue.getValue(conn, object);
            }

            default:
                throw new HBqlException("Invalid function: " + this.getFunctionType());
        }
    }
View Full Code Here

                }
            };
        }
        catch (IOException e) {
            throw new HBqlException(e);
        }
    }
View Full Code Here

            final HBqlStatement stmt = ParserUtil.parseHBqlStatement(sql);

            if (!Utils.isSelectStatement(stmt)
                && !(stmt instanceof ConnectionStatement)
                && !(stmt instanceof NonConnectionStatement))
                throw new HBqlException("Unsupported statement type: " + stmt.getClass().getSimpleName() + " - " + sql);

            if (stmt instanceof MappingContext) {
                final MappingContext mappingContext = (MappingContext)stmt;
                mappingContext.setResultAccessor(new HRecordResultAccessor(mappingContext));
            }

            return stmt;
        }
        catch (ParseException e) {
            throw new HBqlException(e.getErrorMessage());
        }
    }
View Full Code Here

    public void validate() throws HBqlException {
        if (this.isWidthSpecified()) {
            this.width = ((Number)this.evaluateConstant(0, false)).intValue();
            if (this.getWidth() <= 0)
                throw new HBqlException("Invalid column width: " + this.getWidth());
        }
    }
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.