use of org.apache.hadoop.hive.ql.log.PerfLogger in project hive by apache.
the class HookRunner method invokeGeneralHook.
private static void invokeGeneralHook(List<ExecuteWithHookContext> hooks, String prefix, HookContext hookContext) throws HiveException {
if (hooks.isEmpty()) {
return;
}
try {
PerfLogger perfLogger = SessionState.getPerfLogger();
for (ExecuteWithHookContext hook : hooks) {
perfLogger.PerfLogBegin(CLASS_NAME, prefix + hook.getClass().getName());
hook.run(hookContext);
perfLogger.PerfLogEnd(CLASS_NAME, prefix + hook.getClass().getName());
}
} catch (HiveException e) {
throw e;
} catch (Exception e) {
throw new HiveException("Error while invoking " + prefix + " hooks: " + HiveStringUtils.stringifyException(e), e);
}
}
use of org.apache.hadoop.hive.ql.log.PerfLogger in project hive by apache.
the class Transform method endPerfLogging.
public void endPerfLogging() {
PerfLogger perfLogger = SessionState.getPerfLogger();
perfLogger.PerfLogEnd(this.getClass().getName(), PerfLogger.OPTIMIZER);
}
use of org.apache.hadoop.hive.ql.log.PerfLogger in project hive by apache.
the class Transform method endPerfLogging.
public void endPerfLogging(String additionalInfo) {
PerfLogger perfLogger = SessionState.getPerfLogger();
perfLogger.PerfLogEnd(this.getClass().getName(), PerfLogger.OPTIMIZER, additionalInfo);
}
use of org.apache.hadoop.hive.ql.log.PerfLogger in project hive by apache.
the class SerializationUtilities method serializePlan.
private static void serializePlan(Kryo kryo, Object plan, OutputStream out, boolean cloningPlan) {
PerfLogger perfLogger = SessionState.getPerfLogger();
perfLogger.PerfLogBegin(CLASS_NAME, PerfLogger.SERIALIZE_PLAN);
LOG.info("Serializing " + plan.getClass().getSimpleName() + " using kryo");
if (cloningPlan) {
serializeObjectByKryo(kryo, plan, out);
} else {
serializeObjectByKryo(kryo, plan, out);
}
perfLogger.PerfLogEnd(CLASS_NAME, PerfLogger.SERIALIZE_PLAN);
}
use of org.apache.hadoop.hive.ql.log.PerfLogger in project hive by apache.
the class SerializationUtilities method deserializePlan.
private static <T> T deserializePlan(Kryo kryo, InputStream in, Class<T> planClass, boolean cloningPlan) {
PerfLogger perfLogger = SessionState.getPerfLogger();
perfLogger.PerfLogBegin(CLASS_NAME, PerfLogger.DESERIALIZE_PLAN);
T plan;
LOG.info("Deserializing " + planClass.getSimpleName() + " using kryo");
if (cloningPlan) {
plan = deserializeObjectByKryo(kryo, in, planClass);
} else {
plan = deserializeObjectByKryo(kryo, in, planClass);
}
perfLogger.PerfLogEnd(CLASS_NAME, PerfLogger.DESERIALIZE_PLAN);
return plan;
}
Aggregations