This is an automated email from the ASF dual-hosted git repository.

ddanielr pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/2.1 by this push:
     new 5572d22c41 Fixes creating table and copying splits from table w/ no 
splits (#5975)
5572d22c41 is described below

commit 5572d22c4169b71ec3dd0dc35ca7e68665117ce4
Author: Keith Turner <[email protected]>
AuthorDate: Thu Nov 13 11:12:08 2025 -0500

    Fixes creating table and copying splits from table w/ no splits (#5975)
---
 .../java/org/apache/accumulo/shell/commands/CreateTableCommand.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/shell/src/main/java/org/apache/accumulo/shell/commands/CreateTableCommand.java
 
b/shell/src/main/java/org/apache/accumulo/shell/commands/CreateTableCommand.java
index 633b419973..a500e2d607 100644
--- 
a/shell/src/main/java/org/apache/accumulo/shell/commands/CreateTableCommand.java
+++ 
b/shell/src/main/java/org/apache/accumulo/shell/commands/CreateTableCommand.java
@@ -99,8 +99,10 @@ public class CreateTableCommand extends Command {
       if (!shellState.getAccumuloClient().tableOperations().exists(oldTable)) {
         throw new TableNotFoundException(null, oldTable, null);
       }
-      ntc.withSplits(
-          new 
TreeSet<>(shellState.getAccumuloClient().tableOperations().listSplits(oldTable)));
+      var splits = 
shellState.getAccumuloClient().tableOperations().listSplits(oldTable);
+      if (!splits.isEmpty()) {
+        ntc.withSplits(new TreeSet<>(splits));
+      }
     }
 
     // exclude parent properties; only valid with copy config

Reply via email to