Search in sources :

Example 6 with IndexInfo

use of datawave.query.index.lookup.IndexInfo in project datawave by NationalSecurityAgency.

the class RangeStreamScanner method readInfoFromValue.

public IndexInfo readInfoFromValue(Value value) {
    try {
        IndexInfo info = new IndexInfo();
        info.readFields(new DataInputStream(new ByteArrayInputStream(value.get())));
        if (log.isTraceEnabled()) {
            for (IndexMatch match : info.uids()) {
                log.trace("match is " + StringUtils.split(match.getUid(), '\u0000')[1]);
            }
        }
        return info;
    } catch (IOException e) {
        log.error(e);
        throw new DatawaveFatalQueryException(e);
    }
}
Also used : ByteArrayInputStream(java.io.ByteArrayInputStream) IndexMatch(datawave.query.index.lookup.IndexMatch) DatawaveFatalQueryException(datawave.query.exceptions.DatawaveFatalQueryException) IndexInfo(datawave.query.index.lookup.IndexInfo) IOException(java.io.IOException) DataInputStream(java.io.DataInputStream)

Aggregations

IndexInfo (datawave.query.index.lookup.IndexInfo)6 EntryParser (datawave.query.index.lookup.EntryParser)4 ScannerStream (datawave.query.index.lookup.ScannerStream)4 ASTEQNode (org.apache.commons.jexl2.parser.ASTEQNode)4 Test (org.junit.Test)4 Tuple2 (datawave.query.util.Tuple2)2 DatawaveFatalQueryException (datawave.query.exceptions.DatawaveFatalQueryException)1 IndexMatch (datawave.query.index.lookup.IndexMatch)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 DataInputStream (java.io.DataInputStream)1 IOException (java.io.IOException)1 Entry (java.util.Map.Entry)1 Key (org.apache.accumulo.core.data.Key)1 Value (org.apache.accumulo.core.data.Value)1 PeekingIterator (org.apache.accumulo.core.util.PeekingIterator)1 DescriptiveStatistics (org.apache.commons.math3.stat.descriptive.DescriptiveStatistics)1 Text (org.apache.hadoop.io.Text)1