HBASE-19740 Repeated error message for NamespaceExistException

This commit is contained in:
tedyu 2018-01-10 18:25:45 -08:00
parent ee3accb370
commit b568cf4ebd
2 changed files with 3 additions and 3 deletions

View File

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

View File

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