private static Map<String, Map<String, Table>> getTempTables(String msg) {
    SessionState ss = SessionState.get();
    if (ss == null) {
      LOG.debug("No current SessionState, skipping temp tables for " + msg);
      return Collections.emptyMap();
    }
    return ss.getTempTables();
  }
@param dbName actual database name
@param tblName actual table name or search pattern (for error message)
ql/src/java/org/apache/hadoop/hive/ql/metadata/SessionHiveMetaStoreClient.java