Package com.nearinfinity.honeycomb

Examples of com.nearinfinity.honeycomb.Scanner


        Table t = store.openTable(tableName);
        TableSchema schema = store.getSchema(tableName);
        IndexSchema indexSchema = schema.getIndexSchema(indexName);

        QueryKey key = new QueryKey(indexName, QueryType.EXACT_KEY, row.getRecords());
        Scanner scanner = t.indexScanExact(key);

        try {
            while (scanner.hasNext()) {
                Row next = Row.deserialize(scanner.next());
                if (!next.getUUID().equals(row.getUUID())) {
                    // Special case for inserting nulls
                    for (String column : indexSchema.getColumns()) {
                        boolean isNullInRecord = !row.getRecords().containsKey(column);
                        if (isNullInRecord) {
View Full Code Here


    @Override
    public void insertTableIndex(final IndexSchema indexSchema) {
        checkNotNull(indexSchema, "The index schema is invalid");
        final Collection<IndexSchema> indices = ImmutableList.of(indexSchema);
        final Scanner scanner = tableScan();
        while (scanner.hasNext()) {
            HBaseOperations.performPut(hTable,
                    mutationFactory.insertIndices(tableId, Row.deserialize(scanner.next()), indices));
        }

        Util.closeQuietly(scanner);
    }
View Full Code Here

TOP

Related Classes of com.nearinfinity.honeycomb.Scanner

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.