use of org.apache.accumulo.proxy.thrift.NamespaceNotFoundException in project accumulo by apache.
the class SimpleProxyBase method namespaceNotFound.
@Test
public void namespaceNotFound() throws Exception {
final String doesNotExist = "doesNotExists";
try {
client.deleteNamespace(creds, doesNotExist);
fail("exception not thrown");
} catch (NamespaceNotFoundException ex) {
}
try {
client.renameNamespace(creds, doesNotExist, "abcdefg");
fail("exception not thrown");
} catch (NamespaceNotFoundException ex) {
}
try {
client.setNamespaceProperty(creds, doesNotExist, "table.compaction.major.ratio", "4");
fail("exception not thrown");
} catch (NamespaceNotFoundException ex) {
}
try {
client.removeNamespaceProperty(creds, doesNotExist, "table.compaction.major.ratio");
fail("exception not thrown");
} catch (NamespaceNotFoundException ex) {
}
try {
client.getNamespaceProperties(creds, doesNotExist);
fail("exception not thrown");
} catch (NamespaceNotFoundException ex) {
}
try {
IteratorSetting setting = new IteratorSetting(100, "DebugTheThings", DebugIterator.class.getName(), Collections.emptyMap());
client.attachNamespaceIterator(creds, doesNotExist, setting, EnumSet.allOf(IteratorScope.class));
fail("exception not thrown");
} catch (NamespaceNotFoundException ex) {
}
try {
client.removeNamespaceIterator(creds, doesNotExist, "DebugTheThings", EnumSet.allOf(IteratorScope.class));
fail("exception not thrown");
} catch (NamespaceNotFoundException ex) {
}
try {
client.getNamespaceIteratorSetting(creds, doesNotExist, "DebugTheThings", IteratorScope.SCAN);
fail("exception not thrown");
} catch (NamespaceNotFoundException ex) {
}
try {
client.listNamespaceIterators(creds, doesNotExist);
fail("exception not thrown");
} catch (NamespaceNotFoundException ex) {
}
try {
IteratorSetting setting = new IteratorSetting(100, "DebugTheThings", DebugIterator.class.getName(), Collections.emptyMap());
client.checkNamespaceIteratorConflicts(creds, doesNotExist, setting, EnumSet.allOf(IteratorScope.class));
fail("exception not thrown");
} catch (NamespaceNotFoundException ex) {
}
try {
client.addNamespaceConstraint(creds, doesNotExist, MaxMutationSize.class.getName());
fail("exception not thrown");
} catch (NamespaceNotFoundException ex) {
}
try {
client.removeNamespaceConstraint(creds, doesNotExist, 1);
fail("exception not thrown");
} catch (NamespaceNotFoundException ex) {
}
try {
client.listNamespaceConstraints(creds, doesNotExist);
fail("exception not thrown");
} catch (NamespaceNotFoundException ex) {
}
try {
client.testNamespaceClassLoad(creds, doesNotExist, DebugIterator.class.getName(), SortedKeyValueIterator.class.getName());
fail("exception not thrown");
} catch (NamespaceNotFoundException ex) {
}
}
Aggregations