本文整理了Java中com.linkedin.parseq.Task.setTraceValueSerializer()
方法的一些代码示例,展示了Task.setTraceValueSerializer()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.setTraceValueSerializer()
方法的具体详情如下:
包路径:com.linkedin.parseq.Task
类名称:Task
方法名:setTraceValueSerializer
[英]Allows adding String representation of value computed by this task to trace. When this task is finished successfully, value will be converted to String using given serializer and it will be included in this task's trace.
Failures are automatically included in a trace.
[中]允许将此任务计算的值的字符串表示形式添加到跟踪中。当此任务成功完成时,将使用给定的序列化程序将值转换为字符串,并将其包含在此任务的跟踪中。
故障会自动包含在跟踪中。
代码示例来源:origin: linkedin/parseq
@Override
public void setTraceValueSerializer(Function<Tuple6<T1, T2, T3, T4, T5, T6>, String> serializer) {
_task.setTraceValueSerializer(serializer);
}
代码示例来源:origin: linkedin/parseq
@Override
public void setTraceValueSerializer(Function<Tuple7<T1, T2, T3, T4, T5, T6, T7>, String> serializer) {
_task.setTraceValueSerializer(serializer);
}
代码示例来源:origin: linkedin/parseq
@Override
public void setTraceValueSerializer(Function<Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, String> serializer) {
_task.setTraceValueSerializer(serializer);
}
代码示例来源:origin: linkedin/parseq
@Override
public void setTraceValueSerializer(Function<Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>, String> serializer) {
_task.setTraceValueSerializer(serializer);
}
代码示例来源:origin: linkedin/parseq
@Override
public void setTraceValueSerializer(Function<Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, String> serializer) {
_task.setTraceValueSerializer(serializer);
}
代码示例来源:origin: linkedin/parseq
@Override
public void setTraceValueSerializer(Function<Tuple2<T1, T2>, String> serializer) {
_task.setTraceValueSerializer(serializer);
}
代码示例来源:origin: linkedin/parseq
@Override
public void setTraceValueSerializer(Function<Tuple5<T1, T2, T3, T4, T5>, String> serializer) {
_task.setTraceValueSerializer(serializer);
}
代码示例来源:origin: linkedin/parseq
@Override
public void setTraceValueSerializer(Function<Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9>, String> serializer) {
_task.setTraceValueSerializer(serializer);
}
代码示例来源:origin: linkedin/parseq
@Override
public void setTraceValueSerializer(Function<Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, String> serializer) {
_task.setTraceValueSerializer(serializer);
}
代码示例来源:origin: linkedin/parseq
@Override
public void setTraceValueSerializer(Function<Tuple4<T1, T2, T3, T4>, String> serializer) {
_task.setTraceValueSerializer(serializer);
}
代码示例来源:origin: linkedin/parseq
@Override
public void setTraceValueSerializer(Function<Tuple3<T1, T2, T3>, String> serializer) {
_task.setTraceValueSerializer(serializer);
}
代码示例来源:origin: linkedin/parseq
@Override
public void setTraceValueSerializer(Function<Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, String> serializer) {
_task.setTraceValueSerializer(serializer);
}
代码示例来源:origin: linkedin/parseq
@Override
public void setTraceValueSerializer(Function<Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, String> serializer) {
_task.setTraceValueSerializer(serializer);
}
代码示例来源:origin: linkedin/parseq
@Override
public void setTraceValueSerializer(Function<Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, String> serializer) {
_task.setTraceValueSerializer(serializer);
}
代码示例来源:origin: linkedin/parseq
@Test
public void testSingleTaskCombinations() throws InterruptedException {
final String taskValue = "value";
final String[] loggers = new String[] { ALL_LOGGER, ROOT_LOGGER, planClassLogger(Task.value("dummy", "dummy")) };
final int[] levels = new int[] { ListLogger.LEVEL_DEBUG, ListLogger.LEVEL_TRACE };
for (String logger : loggers) {
for (int level : levels) {
resetLoggers();
final Task<?> task = Task.value("t1", taskValue);
task.setTraceValueSerializer(Object::toString);
setLogLevel(logger, level);
runAndWait("TestTaskLogging.testSingleTaskCombinations", task);
for (String checkLogger : loggers) {
if (logger.equals(checkLogger)) {
assertTaskLogged(task, taskValue, checkLogger, level);
} else {
assertEquals(Collections.emptyList(), getLogEntries(checkLogger));
}
}
}
}
}
代码示例来源:origin: linkedin/parseq
@SuppressWarnings("deprecation")
@Test
public void testCompositeTaskWithAllLoggerTrace() throws InterruptedException {
final Task<?> child1 = Task.value("t1", "value");
child1.setTraceValueSerializer(Object::toString);
final Task<?> child2 = TestUtil.noop();
final Task<?> parent = Tasks.seq(child1, child2);
setLogLevel(ALL_LOGGER, ListLogger.LEVEL_TRACE);
runAndWait("TestTaskLogging.testCompositeTaskWithAllLoggerTrace", parent);
assertTaskLogged(parent, "null", ALL_LOGGER, ListLogger.LEVEL_TRACE);
assertTaskLogged(child1, "value", ALL_LOGGER, ListLogger.LEVEL_TRACE);
assertTaskLogged(child2, "null", ALL_LOGGER, ListLogger.LEVEL_TRACE);
}
代码示例来源:origin: linkedin/parseq
@SuppressWarnings("deprecation")
@Test
public void testCompositeTaskWithPlanClassLoggerTrace() throws InterruptedException {
final Task<?> child1 = Task.value("t1", "value");
child1.setTraceValueSerializer(Object::toString);
final Task<?> child2 = TestUtil.noop();
final Task<?> parent = Tasks.seq(child1, child2);
final String planClassLogger = planClassLogger(parent);
setLogLevel(planClassLogger, ListLogger.LEVEL_TRACE);
runAndWait("TestTaskLogging.testCompositeTaskWithPlanClassLoggerTrace", parent);
assertTaskLogged(parent, "null", planClassLogger, ListLogger.LEVEL_TRACE);
assertTaskLogged(child1, "value", planClassLogger, ListLogger.LEVEL_TRACE);
assertTaskLogged(child2, "null", planClassLogger, ListLogger.LEVEL_TRACE);
}
代码示例来源:origin: com.linkedin.parseq/parseq
@Override
public void setTraceValueSerializer(Function<Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, String> serializer) {
_task.setTraceValueSerializer(serializer);
}
代码示例来源:origin: com.linkedin.parseq/parseq
@Override
public void setTraceValueSerializer(Function<Tuple4<T1, T2, T3, T4>, String> serializer) {
_task.setTraceValueSerializer(serializer);
}
代码示例来源:origin: com.linkedin.parseq/parseq
@Override
public void setTraceValueSerializer(Function<Tuple3<T1, T2, T3>, String> serializer) {
_task.setTraceValueSerializer(serializer);
}
内容来源于网络,如有侵权,请联系作者删除!