org.apache.hadoop.hive.ql.hooks.ExecuteWithHookContext Java Examples
The following examples show how to use
org.apache.hadoop.hive.ql.hooks.ExecuteWithHookContext.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HiveHook.java From atlas with Apache License 2.0 | 6 votes |
private void initialize() { if (LOG.isDebugEnabled()) { LOG.debug("==> HiveHook.initialize()"); } try { atlasPluginClassLoader = AtlasPluginClassLoader.getInstance(ATLAS_PLUGIN_TYPE, this.getClass()); @SuppressWarnings("unchecked") Class<ExecuteWithHookContext> cls = (Class<ExecuteWithHookContext>) Class .forName(ATLAS_HIVE_HOOK_IMPL_CLASSNAME, true, atlasPluginClassLoader); activatePluginClassLoader(); hiveHookImpl = cls.newInstance(); } catch (Exception excp) { LOG.error("Error instantiating Atlas hook implementation", excp); } finally { deactivatePluginClassLoader(); } if (LOG.isDebugEnabled()) { LOG.debug("<== HiveHook.initialize()"); } }
Example #2
Source File: HiveHook.java From incubator-atlas with Apache License 2.0 | 6 votes |
private void initialize() { if (LOG.isDebugEnabled()) { LOG.debug("==> HiveHook.initialize()"); } try { atlasPluginClassLoader = AtlasPluginClassLoader.getInstance(ATLAS_PLUGIN_TYPE, this.getClass()); @SuppressWarnings("unchecked") Class<ExecuteWithHookContext> cls = (Class<ExecuteWithHookContext>) Class .forName(ATLAS_HIVE_HOOK_IMPL_CLASSNAME, true, atlasPluginClassLoader); activatePluginClassLoader(); hiveHookImpl = cls.newInstance(); } catch (Exception excp) { LOG.error("Error instantiating Atlas hook implementation", excp); } finally { deactivatePluginClassLoader(); } if (LOG.isDebugEnabled()) { LOG.debug("<== HiveHook.initialize()"); } }