我正在设置一个集群以在 google 云平台上运行 Jupyter notebook,但需要自动化集群关闭过程以节省资金,如果有人正在运行某些东西,则中断关闭脚本。
如何使用 shell 脚本检查是否有任何正在运行的笔记本?
在进行 pyspark 数据帧自联接时,我收到一条错误消息:
Py4JJavaError: An error occurred while calling o1595.join.
: org.apache.spark.sql.AnalysisException: Resolved attribute(s) un_val#5997 missing from day#290,item_listed#281,filename#286 in operator !Project [...]. Attribute(s) with the same name appear in the operation: un_val. Please check if the right attribute(s) are used.;;
Run Code Online (Sandbox Code Playgroud)
这是一个简单的数据帧自连接,如下所示,工作正常,但在对数据帧进行了几次操作(例如添加列或与其他数据帧连接)后,会引发上述错误。
df.join(df,on='item_listed')
Run Code Online (Sandbox Code Playgroud)
使用像波纹管这样的数据帧别名也不起作用,并且会引发相同的错误消息:
df.alias('A').join(df.alias('B'), col('A.my_id') == col('B.my_id'))
Run Code Online (Sandbox Code Playgroud)