HBASE-19740 Repeated error message for NamespaceExistException

This commit is contained in:
tedyu 2018-01-10 18:26:23 -08:00
parent d524768528
commit 47326729fe
2 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ public class NamespaceExistException extends DoNotRetryIOException {
public NamespaceExistException() { public NamespaceExistException() {
} }
public NamespaceExistException(String namespace) { public NamespaceExistException(String msg) {
super("Namespace " + namespace + " already exists"); super(msg);
} }
} }

View File

@ -192,7 +192,7 @@ public class CreateNamespaceProcedure
*/ */
private void prepareCreate(final MasterProcedureEnv env) throws IOException { private void prepareCreate(final MasterProcedureEnv env) throws IOException {
if (getTableNamespaceManager(env).doesNamespaceExist(nsDescriptor.getName())) { if (getTableNamespaceManager(env).doesNamespaceExist(nsDescriptor.getName())) {
throw new NamespaceExistException(nsDescriptor.getName()); throw new NamespaceExistException("Namespace " + nsDescriptor.getName() + " already exists");
} }
getTableNamespaceManager(env).validateTableAndRegionCount(nsDescriptor); getTableNamespaceManager(env).validateTableAndRegionCount(nsDescriptor);
} }