private String getNsOrDefault(String ns) {
    // This is only needed for old clients not setting NS in requests.
    // Not clear how to handle this... this is properly a HS2 config but metastore needs its default
    // value for backward compat, and we don't want it configurable separately because it's also
    // used in upgrade scripts, were it cannot be configured.
     return normalizeIdentifier(ns == null ? "default" : ns);
  }
This is a cleanup method which is used to rollback a active transaction
if the success flag is false and close the associated Query object. This method is used
internally and visible for testing purposes only
@param success Rollback the current active transaction if false
@param query Query object which needs to be closed
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java