我正在尝试在纱线上运行一个独立的python脚本,使用anaconda来计算平均移位(使用here中的代码)。我可以在本地运行此代码,但是当我使用启动命令Dim intRowCount As Integer = 0
Dim intCurrentRow As Integer = 0
Public Overrides Sub PreExecute()
MyBase.PreExecute()
intRowCount = Variables.FileRowCount
End Sub
Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
intCurrentRow += 1
Process_recs(Row.AOS, Row.Session, Row.AOSTitle, CInt(Row.ResourceHrs), CInt(Row.TotalTargetNo))
If intCurrentRow = intRowCount Then
MsgBox("LAST RECORD " & CStr(QTUT_count))
do_output_data(QTUT_count, strAOS, IntTargetplusHours, StrQTUT)
End If
End Sub
Public Sub Process_recs(ByRef subAOS As String, ByRef subSession As String, ByRef subAOStitle As String, ByRef subResourceHrs As Integer, ByVal subTotalTargetNo As Integer)
'code here collects data in an aray and sends to output on change of key
do_output_data(QTUT_count, strAOS, IntTargetplusHours, StrQTUT)
End Sub
Public Sub do_output_data(ByVal QT_count As Integer, ByVal aos() As String, ByVal hrs() As Integer, ByVal QTUT() As String)
'data moved from array and output
.AddRow()
.Group = Trim(aos(k)) + StrSuffix
.SubGroup = Trim(aos(intindex))
End Sub
将应用程序提交给YARN时,我从YARN收到错误声明:
python MeanShift.py
查看YARN应用程序日志,我可以看到这是因为以下错误:
Exit code: 1
Stack trace: ExitCodeException exitCode=1:
at org.apache.hadoop.util.Shell.runCommand(Shell.java:576)
at org.apache.hadoop.util.Shell.run(Shell.java:487)
at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:753)
at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerExecutor.java:212)
at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:303)
at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:82)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
我已将Anaconda添加到我的YARN群集中所有节点的PATH中。是否有一个我错过的配置告诉YARN使用哪个python解释器?我是否需要使用其他命令来启动脚本?
谢谢!