Search in sources :

Example 6 with TRange

use of org.apache.accumulo.core.data.thrift.TRange in project accumulo by apache.

the class RangeTest method testThrift_Check.

public void testThrift_Check() {
    Range r = new Range(new Key(new Text("soup")), true, false, new Key(new Text("nuts")), true, false);
    TRange tr = r.toThrift();
    try {
        @SuppressWarnings("unused") Range r2 = new Range(tr);
        fail("Thrift constructor allowed invalid range");
    } catch (IllegalArgumentException exc) {
    /* good! */
    }
}
Also used : TRange(org.apache.accumulo.core.data.thrift.TRange) Text(org.apache.hadoop.io.Text) TRange(org.apache.accumulo.core.data.thrift.TRange)

Aggregations

TRange (org.apache.accumulo.core.data.thrift.TRange)6 Range (org.apache.accumulo.core.data.Range)4 ArrayList (java.util.ArrayList)3 List (java.util.List)3 KeyExtent (org.apache.accumulo.core.data.impl.KeyExtent)3 MultiScanResult (org.apache.accumulo.core.data.thrift.MultiScanResult)3 TKeyExtent (org.apache.accumulo.core.data.thrift.TKeyExtent)3 IOException (java.io.IOException)2 Entry (java.util.Map.Entry)2 SampleNotPresentException (org.apache.accumulo.core.client.SampleNotPresentException)2 ThriftSecurityException (org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException)2 Key (org.apache.accumulo.core.data.Key)2 InitialMultiScan (org.apache.accumulo.core.data.thrift.InitialMultiScan)2 TKeyValue (org.apache.accumulo.core.data.thrift.TKeyValue)2 TabletClientService (org.apache.accumulo.core.tabletserver.thrift.TabletClientService)2 Text (org.apache.hadoop.io.Text)2 SimpleImmutableEntry (java.util.AbstractMap.SimpleImmutableEntry)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 TreeMap (java.util.TreeMap)1