hadoop jar /usr/lib/hadoop-mapreduce/hadoop-streaming.jar -files lib.py,main.py -mapper "./main.py map" -reducer "./main.py reduce" -input input -output output
如何导入lib.py?
import sys
sys.path.append('./')
import lib
hadoop jar /usr/lib/hadoop-mapreduce/hadoop-streaming.jar -files lib.py,main.py -mapper "./main.py map" -reducer "./main.py reduce" -input input -output output
如何导入lib.py?
import sys
sys.path.append('./')
import lib
本文标题:如何在mapreduce中导入自定义模块?【python】
本文链接:https://www.haomeiwen.com/subject/enxdvttx.html
网友评论