Search in sources :

Example 1 with ReflectionUtils

use of org.apache.hadoop.util.ReflectionUtils in project hive by apache.

the class ResourceMaps method clearReflectionUtilsCache.

private void clearReflectionUtilsCache() {
    Method clearCacheMethod;
    try {
        clearCacheMethod = ReflectionUtils.class.getDeclaredMethod("clearCache");
        if (clearCacheMethod != null) {
            clearCacheMethod.setAccessible(true);
            clearCacheMethod.invoke(null);
            LOG.debug("Cleared Hadoop ReflectionUtils CONSTRUCTOR_CACHE");
        }
    } catch (Exception e) {
        LOG.info("Failed to clear up Hadoop ReflectionUtils CONSTRUCTOR_CACHE", e);
    }
}
Also used : Method(java.lang.reflect.Method) ReflectionUtils(org.apache.hadoop.util.ReflectionUtils) LockException(org.apache.hadoop.hive.ql.lockmgr.LockException) CancellationException(java.util.concurrent.CancellationException) IOException(java.io.IOException) MetaException(org.apache.hadoop.hive.metastore.api.MetaException) URISyntaxException(java.net.URISyntaxException) HiveException(org.apache.hadoop.hive.ql.metadata.HiveException)

Aggregations

IOException (java.io.IOException)1 Method (java.lang.reflect.Method)1 URISyntaxException (java.net.URISyntaxException)1 CancellationException (java.util.concurrent.CancellationException)1 MetaException (org.apache.hadoop.hive.metastore.api.MetaException)1 LockException (org.apache.hadoop.hive.ql.lockmgr.LockException)1 HiveException (org.apache.hadoop.hive.ql.metadata.HiveException)1 ReflectionUtils (org.apache.hadoop.util.ReflectionUtils)1