Author: billie
Date: Wed Jun 13 18:06:40 2012
New Revision: 1349977

URL: http://svn.apache.org/viewvc?rev=1349977&view=rev
Log:
ACCUMULO-634 fixed table not found exceptions

Modified:
    
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java

Modified: 
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java?rev=1349977&r1=1349976&r2=1349977&view=diff
==============================================================================
--- 
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java
 (original)
+++ 
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java
 Wed Jun 13 18:06:40 2012
@@ -47,17 +47,23 @@ public class MockConnector extends Conne
   
   @Override
   public BatchScanner createBatchScanner(String tableName, Authorizations 
authorizations, int numQueryThreads) throws TableNotFoundException {
+    if (acu.tables.get(tableName) == null)
+      throw new TableNotFoundException(tableName, tableName, "no such table");
     return acu.createBatchScanner(tableName, authorizations);
   }
   
   @Override
   public BatchDeleter createBatchDeleter(String tableName, Authorizations 
authorizations, int numQueryThreads, long maxMemory, long maxLatency,
       int maxWriteThreads) throws TableNotFoundException {
+    if (acu.tables.get(tableName) == null)
+      throw new TableNotFoundException(tableName, tableName, "no such table");
     return new MockBatchDeleter(acu, tableName, authorizations);
   }
   
   @Override
   public BatchWriter createBatchWriter(String tableName, long maxMemory, long 
maxLatency, int maxWriteThreads) throws TableNotFoundException {
+    if (acu.tables.get(tableName) == null)
+      throw new TableNotFoundException(tableName, tableName, "no such table");
     return new MockBatchWriter(acu, tableName);
   }
   


Reply via email to