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

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


        else if (this.useInteger)
            return (int)result;
        else if (this.useLong)
            return result;
        else
            throw new HBqlException("Invalid class: " + this.getRankingClass().getName());
    }
View Full Code Here


        if (this.useFloat)
            return (float)result;
        else if (this.useDouble)
            return result;
        else
            throw new HBqlException("Invalid class: " + this.getRankingClass().getName());
    }
View Full Code Here

                final Element<T> emptyItem = Element.newEmptyToken();
                this.getReusableElementQueue().put(emptyItem);
            }
        }
        catch (InterruptedException e) {
            throw new HBqlException(e);
        }
    }
View Full Code Here

        try {
            final Element<T> element = Element.getElement(this.getReusableElementQueue().take(), val);
            this.getElementQueue().put(element);
        }
        catch (InterruptedException e) {
            throw new HBqlException(e);
        }
    }
View Full Code Here

                this.getReusableElementQueue().put(element);

            return element;
        }
        catch (InterruptedException e) {
            throw new HBqlException(e);
        }
    }
View Full Code Here

    public static SingleColumnIndex newIndex(final String indexName,
                                             final List<String> indexList,
                                             final List<String> includeList) throws HBqlException {

        if (indexList.size() != 1)
            throw new HBqlException("Invalid index " + indexName + ". Only single column indexes allowed.");

        return new SingleColumnIndex(indexName,
                                     Util.getStringsAsBytes(indexList),
                                     Util.getStringsAsBytes(includeList));
    }
View Full Code Here

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

                familyMapping.validate();

                final String familyName = familyMapping.getFamilyName();
                if (nameSet.contains(familyName))
                    throw new HBqlException("Family name already mapped: " + familyName);

                nameSet.add(familyName);
            }
        }
    }
View Full Code Here

        final List<Class<? extends GenericValue>> columnsTypeList = this.getColumnsTypeList();
        final List<Class<? extends GenericValue>> valuesTypeList = this.getInsertValuesSource().getValuesTypeList();

        if (columnsTypeList.size() != valuesTypeList.size())
            throw new HBqlException("Number of columns not equal to number of values in " + this.asString());

        for (int i = 0; i < columnsTypeList.size(); i++) {

            final Class<? extends GenericValue> type1 = columnsTypeList.get(i);
            final Class<? extends GenericValue> type2 = valuesTypeList.get(i);

            // Skip Default values
            if (type2 == DefaultKeyword.class) {
                final String name = this.getInsertColumnList().get(i).asString();
                final ColumnAttrib attrib = this.getMappingContext().getMapping().getAttribByVariableName(name);
                if (!attrib.hasDefaultArg())
                    throw new HBqlException("No DEFAULT value specified for " + attrib.getNameToUseInExceptions()
                                            + " in " + this.asString());
                continue;
            }

            if (type2.equals(NullLiteral.class)) {
View Full Code Here

    }

    public int setStatementParameter(final String name, final Object val) throws HBqlException {
        final int cnt = this.getInsertValuesSource().setInsertSourceParameter(name, val);
        if (cnt == 0)
            throw new HBqlException("Parameter name " + name + " does not exist in " + this.asString());
        return cnt;
    }
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.