spark中的graphframe模块

Yangstal 2020-06-21 04:49:15
# Build `tripGraph` GraphFrame
# This GraphFrame builds up on the vertices and edges based on our trips (flights)
tripGraph = GraphFrame(tripVertices, tripEdges)
print (tripGraph)

# Build `tripGraphPrime` GraphFrame
# This graphframe contains a smaller subset of data to make it easier to display motifs and subgraphs (below)
tripEdgesPrime = departureDelays_geo.select("tripid", "delay", "src", "dst")
tripGraphPrime = GraphFrame(tripVertices, tripEdgesPrime)


error
java.lang.NoSuchMethodError: scala.Predef$.refArrayOps([Ljava/lang/Object;)[Ljava/lang/Object;
---------------------------------------------------------------------------
Py4JJavaError Traceback (most recent call last)
<command-3237926837849918> in <module>
1 # Build `tripGraph` GraphFrame
2 # This GraphFrame builds up on the vertices and edges based on our trips (flights)
----> 3 tripGraph = GraphFrame(tripVertices, tripEdges)
4 print (tripGraph)
5

/local_disk0/spark-bed27070-0715-4fbc-9995-65337586a164/userFiles-9ef7087e-7659-49df-a57f-5770515b198c/addedFile506950925074357278graphframes_0_8_0_spark3_0_s_2_12-a07ea.jar/graphframes/graphframe.py in __init__(self, v, e)
87 .format(self.DST, ",".join(e.columns)))
88
---> 89 self._jvm_graph = self._jvm_gf_api.createGraph(v._jdf, e._jdf)
90
91 @property

/databricks/spark/python/lib/py4j-0.10.7-src.zip/py4j/java_gateway.py in __call__(self, *args)
1255 answer = self.gateway_client.send_command(command)
1256 return_value = get_return_value(
-> 1257 answer, self.gateway_client, self.target_id, self.name)
...全文
136 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
Yangstal 2020-06-21
  • 打赏
  • 举报
回复
程序总是跑错

1,269

社区成员

发帖
与我相关
我的任务
社区描述
Spark由Scala写成,是UC Berkeley AMP lab所开源的类Hadoop MapReduce的通用的并行计算框架,Spark基于MapReduce算法实现的分布式计算。
社区管理员
  • Spark
  • shiter
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧