use of org.apache.accumulo.proxy.thrift.IteratorScope in project accumulo by apache.
the class TestProxyNamespaceOperations method namespaceIteratorConflict.
@Test(expected = AccumuloException.class)
public void namespaceIteratorConflict() throws TException {
IteratorSetting setting = new IteratorSetting(40, "DebugTheThings", "org.apache.accumulo.core.iterators.DebugIterator", new HashMap<>());
Set<IteratorScope> scopes = new HashSet<>();
scopes.add(IteratorScope.SCAN);
tpc.proxy().attachNamespaceIterator(userpass, testnamespace, setting, scopes);
tpc.proxy().checkNamespaceIteratorConflicts(userpass, testnamespace, setting, scopes);
}
use of org.apache.accumulo.proxy.thrift.IteratorScope in project accumulo by apache.
the class TestProxyNamespaceOperations method namespaceIterators.
@Test
public void namespaceIterators() throws TException {
IteratorSetting setting = new IteratorSetting(40, "DebugTheThings", "org.apache.accumulo.core.iterators.DebugIterator", new HashMap<>());
Set<IteratorScope> scopes = new HashSet<>();
scopes.add(IteratorScope.SCAN);
tpc.proxy().attachNamespaceIterator(userpass, testnamespace, setting, scopes);
assertEquals(setting, tpc.proxy().getNamespaceIteratorSetting(userpass, testnamespace, "DebugTheThings", IteratorScope.SCAN));
assertTrue(tpc.proxy().listNamespaceIterators(userpass, testnamespace).containsKey("DebugTheThings"));
Set<IteratorScope> scopes2 = new HashSet<>();
scopes2.add(IteratorScope.MINC);
tpc.proxy().checkNamespaceIteratorConflicts(userpass, testnamespace, setting, scopes2);
tpc.proxy().removeNamespaceIterator(userpass, testnamespace, "DebugTheThings", scopes);
assertFalse(tpc.proxy().listNamespaceIterators(userpass, testnamespace).containsKey("DebugTheThings"));
}
Aggregations