我导入了两个库urllib和from urllib.request import urlopen。当我检查代码并尝试删除from urllib.request import urlopen行时,我得到了这样的消息:AttributeError: 'module' object has no attribute 'request'有谁能解释一下原因吗?
i
val res = rdd.map(function) }import mylibrary.runFunction这个库打包在jar中,我现在也想在python中使用它。我想要做的是在Python中加载这个库,并将一个python函数传递给它。Python中的用法如下:
spark._jvm.mylibrary.runFunction(myPythonRdd, myPythonFu