Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions contrib/import-control.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
<allow pkg="org.apache.accumulo.core.conf"/>

<!-- TODO refactor code to remove the following exceptions -->
<allow class="org.apache.accumulo.core.clientImpl.thrift.TableOperationExceptionType"/>
<allow class="org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException"/>
<allow class="org.apache.accumulo.core.metadata.MetadataTable"/>
<allow class="org.apache.accumulo.core.replication.ReplicationTable"/>
<allow class="org.apache.accumulo.core.spi.scan.HintScanPrioritizer"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import java.util.SortedSet;

import org.apache.accumulo.core.client.AccumuloException;
import org.apache.accumulo.core.clientImpl.thrift.TableOperationExceptionType;
import org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException;
import org.apache.accumulo.core.client.NamespaceNotFoundException;
import org.apache.accumulo.core.client.TableNotFoundException;
import org.apache.accumulo.core.conf.Property;
import org.apache.accumulo.testing.randomwalk.RandWalkEnv;
import org.apache.accumulo.testing.randomwalk.State;
Expand Down Expand Up @@ -131,10 +131,8 @@ public void visit(State state, RandWalkEnv env, Properties props) throws Excepti
env.getAccumuloClient().tableOperations().setProperty(table, property.getKey(),
property.getDefaultValue());
} catch (AccumuloException ex) {
if (ex.getCause() instanceof ThriftTableOperationException) {
ThriftTableOperationException ttoe = (ThriftTableOperationException) ex.getCause();
if (ttoe.type == TableOperationExceptionType.NOTFOUND)
return;
if (ex.getCause() instanceof TableNotFoundException) {
return;
}
throw ex;
}
Expand All @@ -153,10 +151,8 @@ public void visit(State state, RandWalkEnv env, Properties props) throws Excepti
env.getAccumuloClient().namespaceOperations().setProperty(namespace, property.getKey(),
property.getDefaultValue());
} catch (AccumuloException ex) {
if (ex.getCause() instanceof ThriftTableOperationException) {
ThriftTableOperationException ttoe = (ThriftTableOperationException) ex.getCause();
if (ttoe.type == TableOperationExceptionType.NAMESPACE_NOTFOUND)
return;
if (ex.getCause() instanceof NamespaceNotFoundException) {
return;
}
throw ex;
}
Expand Down Expand Up @@ -197,10 +193,8 @@ private void changeTableSetting(RandomDataGenerator random, State state, RandWal
env.getAccumuloClient().tableOperations().setProperty(table, setting.property.getKey(),
"" + newValue);
} catch (AccumuloException ex) {
if (ex.getCause() instanceof ThriftTableOperationException) {
ThriftTableOperationException ttoe = (ThriftTableOperationException) ex.getCause();
if (ttoe.type == TableOperationExceptionType.NOTFOUND)
return;
if (ex.getCause() instanceof TableNotFoundException) {
return;
}
throw ex;
}
Expand Down Expand Up @@ -228,10 +222,8 @@ private void changeNamespaceSetting(RandomDataGenerator random, State state, Ran
env.getAccumuloClient().namespaceOperations().setProperty(namespace,
setting.property.getKey(), "" + newValue);
} catch (AccumuloException ex) {
if (ex.getCause() instanceof ThriftTableOperationException) {
ThriftTableOperationException ttoe = (ThriftTableOperationException) ex.getCause();
if (ttoe.type == TableOperationExceptionType.NAMESPACE_NOTFOUND)
return;
if (ex.getCause() instanceof NamespaceNotFoundException) {
return;
}
throw ex;
}
Expand Down