public void closeCUDFLoaders() {
    lock.lock();
    try {
      try {
        for(ClassLoader loader: mSessionUDFLoaders) {
          JavaUtils.closeClassLoader(loader);
        }
      } catch (IOException ie) {
          LOG.error("Error in close loader: " + ie);
      }
      mSessionUDFLoaders.clear();
    } finally {
      lock.unlock();
    }
  }
Unregisters all the functions belonging to the specified database
@param dbName database name
@throws HiveException
ql/src/java/org/apache/hadoop/hive/ql/exec/Registry.java