hadoop streaming: how to see application logs?(hadoop 流:如何查看应用程序日志?)
问题描述
我可以在我的 /usr/local/hadoop/logs
路径上看到所有 hadoop 日志
I can see all hadoop logs on my /usr/local/hadoop/logs
path
但是我在哪里可以看到应用程序级别的日志?例如:
but where can I see application level logs? for example :
mapper.py
import logging
def main():
logging.info("starting map task now")
// -- do some task -- //
print statement
reducer.py
reducer.py
import logging
def main():
for line in sys.stdin:
logging.info("received input to reducer - " + line)
// -- do some task -- //
print statement
在哪里可以看到 logging.info
或我的应用程序的相关日志语句?
我正在使用 Python
并使用 hadoop-streaming
Where I can see logging.info
or related log statements of my application?
I am using Python
and using hadoop-streaming
谢谢
推荐答案
Hadoop流使用STDIN/STDOUT 用于在映射器和化简器之间传递键/值对,因此必须将日志消息写入特定的日志文件 - 检查 示例代码 和 python 日志记录文档 了解更多详情.这个查询也可能有帮助.
Hadoop streaming uses STDIN/STDOUT for passing the key/value pairs between the mappers and reducers, so the log messages have to be written to a specific log file - check the sample code and the python logging documentation for more details. This Query might also help.
这篇关于hadoop 流:如何查看应用程序日志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:hadoop 流:如何查看应用程序日志?


基础教程推荐
- 在同一图形上绘制Bokeh的烛台和音量条 2022-01-01
- 包装空间模型 2022-01-01
- Plotly:如何设置绘图图形的样式,使其不显示缺失日期的间隙? 2022-01-01
- PANDA VALUE_COUNTS包含GROUP BY之前的所有值 2022-01-01
- 使用大型矩阵时禁止 Pycharm 输出中的自动换行符 2022-01-01
- 无法导入 Pytorch [WinError 126] 找不到指定的模块 2022-01-01
- 修改列表中的数据帧不起作用 2022-01-01
- 在Python中从Azure BLOB存储中读取文件 2022-01-01
- PermissionError: pip 从 8.1.1 升级到 8.1.2 2022-01-01
- 求两个直方图的卷积 2022-01-01