Package org.apache.hadoop.hbase.client.tableindexed

Examples of org.apache.hadoop.hbase.client.tableindexed.IndexedTable


    public ResultScanner getResultScanner(final Mapping mapping,
                                          final WithArgs withArgs,
                                          final HTableInterface table) throws HBqlException {

        final IndexedTable index = (IndexedTable)table;

        byte[] startKey = null;
        byte[] stopKey = null;

        if (this.getStartRow() != HConstants.EMPTY_START_ROW) {
            final TableMapping tableMapping = (TableMapping)mapping;
            tableMapping.validateKeyInfo(withArgs.getIndexName());
            final int width = tableMapping.getKeyInfo().getWidth();
            startKey = Bytes.add(this.getStartRow(), Util.getFixedWidthString(Character.MIN_VALUE, width));
        }

        if (this.getStopRow() != HConstants.EMPTY_END_ROW) {
            final TableMapping tableMapping = (TableMapping)mapping;
            tableMapping.validateKeyInfo(withArgs.getIndexName());
            final int width = tableMapping.getKeyInfo().getWidth();
            stopKey = Bytes.add(this.getStopRow(), Util.getFixedWidthString(Character.MAX_VALUE, width));
        }

        try {
            return index.getIndexedScanner(withArgs.getIndexName(),
                                           startKey,
                                           stopKey,
                                           withArgs.getColumnsUsedInIndexWhereExpr(),
                                           withArgs.getFilterForTableIndex(),
                                           getColumns());
View Full Code Here


        this.checkIfClosed();

        try {
            if (withArgs != null && withArgs.hasAnIndex())
                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);
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.client.tableindexed.IndexedTable

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.