You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2021/05/06 19:12:16 UTC

[GitHub] [accumulo-examples] EdColeman commented on a change in pull request #74: Avoid checking Accumulo table exists before creation

EdColeman commented on a change in pull request #74:
URL: https://github.com/apache/accumulo-examples/pull/74#discussion_r627696869



##########
File path: spark/src/main/java/org/apache/accumulo/spark/CopyPlus5K.java
##########
@@ -76,8 +78,20 @@ private static void cleanupAndCreateTables(Properties props) throws Exception {
         client.tableOperations().delete(outputTable);
       }
       // Create tables
-      client.tableOperations().create(inputTable);
-      client.tableOperations().create(outputTable);
+      try {
+        client.tableOperations().create(inputTable);
+      } catch (TableExistsException e) {
+        low.error("Something went wrong. Table '{}' should have been deleted prior to creation "

Review comment:
       Should this be log?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org