本文整理了Java中org.apache.storm.utils.Utils.readAndLogStream()
方法的一些代码示例,展示了Utils.readAndLogStream()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.readAndLogStream()
方法的具体详情如下:
包路径:org.apache.storm.utils.Utils
类名称:Utils
方法名:readAndLogStream
暂无
代码示例来源:origin: apache/storm
public static int processLauncherAndWait(Map<String, Object> conf, String user, List<String> args,
final Map<String, String> environment, final String logPreFix)
throws IOException {
int ret = 0;
Process process = processLauncher(conf, user, null, args, environment, logPreFix, null, null);
if (StringUtils.isNotBlank(logPreFix)) {
Utils.readAndLogStream(logPreFix, process.getInputStream());
}
try {
process.waitFor();
} catch (InterruptedException e) {
LOG.info("{} interrupted.", logPreFix);
}
ret = process.exitValue();
return ret;
}
代码示例来源:origin: apache/storm
public Long call() {
if (logPrefix != null) {
Utils.readAndLogStream(logPrefix,
process.getInputStream());
}
if (exitCodeCallback != null) {
try {
process.waitFor();
exitCodeCallback.call(process.exitValue());
} catch (InterruptedException ie) {
LOG.info("{} interrupted", logPrefix);
exitCodeCallback.call(-1);
}
}
return null; // Run only once.
}
});
代码示例来源:origin: org.apache.storm/storm-core
public static int processLauncherAndWait(Map<String, Object> conf, String user, List<String> args, final Map<String, String> environment, final String logPreFix)
throws IOException {
int ret = 0;
Process process = processLauncher(conf, user, null, args, environment, logPreFix, null, null);
if (StringUtils.isNotBlank(logPreFix))
Utils.readAndLogStream(logPreFix, process.getInputStream());
try {
process.waitFor();
} catch (InterruptedException e) {
LOG.info("{} interrupted.", logPreFix);
}
ret = process.exitValue();
return ret;
}
代码示例来源:origin: org.apache.storm/storm-core
public Object call() {
if (logPrefix != null ) {
Utils.readAndLogStream(logPrefix,
process.getInputStream());
}
if (exitCodeCallback != null) {
try {
process.waitFor();
exitCodeCallback.call(process.exitValue());
} catch (InterruptedException ie) {
LOG.info("{} interrupted", logPrefix);
exitCodeCallback.call(-1);
}
}
return null; // Run only once.
}
});
内容来源于网络,如有侵权,请联系作者删除!