2016-07-11 76 views
0

後,我打電話BFS 20+次以這種方式出現的OutOfMemoryError:java.lang.OutOfMemoryError相關星火Graphframe BFS

list_locals = [] 
#g is the graphframe with > 3 million nodes and > 15 million edges. 

def fn(row): 
    arg1 = "id = '%s'" %row.arg1 
    arg2 = "id = '%s'" %row.arg2 
    results = g.bfs(arg1, arg2, maxPathLength = 4) 
    list_locals.append(results.rdd.collect()) 
    results = None 

# t is a list of row objects 
for i in range(101): 
    fn(t[i]) 
print i 

從日誌中,我可以看到,BFS創作了大量廣播的變量,並試圖清除它們。我想知道廣播變量的清除是否沒有完成?我附上了最新的錯誤消息。謝謝!

16/07/11 09:44:28 INFO storage.BlockManagerInfo: Removed  broadcast_922_piece0 on dsg-cluster-server-s06.xxx:40047 
內存

(尺寸:8.1 KB,自由:3.0 GB)

16/07/11 09:44:38 INFO storage.MemoryStore: Block broadcast_924 stored as values in memory (estimated size 24.4 KB, free 2.8 MB)                  

Exception in thread "dag-scheduler-event-loop" java.lang.OutOfMoryError: Java heap space 

回答

1
Exception in thread "dag-scheduler-event-loop" java.lang.OutOfMoryError: Java heap space 

這是在驅動過程中的異常,你應該增加你的驅動器的存儲器。

+0

感謝您的回覆。但驅動程序的內存設置爲32G,這應該是綽綽有餘。 。設置(「spark.driver.memory」,「16g」) – Yiliang

+0

您是否以客戶端模式運行(默認),因爲在客戶端模式下,您必須在提交應用程序時使用-driver-memory設置驅動程序內存。 – Dikei

+0

謝謝!問題已解決。我在客戶端模式下運行並通過提交參數設置spark.driver.memory。 – Yiliang