accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bil...@apache.org
Subject svn commit: r1349977 - /accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java
Date Wed, 13 Jun 2012 18:06:40 GMT
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);
   }
   



Mime
View raw message