kettle內存溢出解決方法

KETTLE——Weka處理大數據量內存溢出問題

2012年09月02日 ⁄ 綜合 ⁄ 共 1057字 ⁄ 字號    ⁄ 評論關閉
<iframe id="iframeu1788635_0" src="http://pos.baidu.com/xccm?rdid=1788635&amp;dc=2&amp;di=u1788635&amp;dri=0&amp;dis=0&amp;dai=2&amp;ps=236x888&amp;dcb=BAIDU_SSP_define&amp;dtm=HTML_POST&amp;dvi=0.0&amp;dci=-1&amp;dpt=none&amp;tsr=0&amp;tpr=1475115001679&amp;ti=KETTLE%E2%80%94%E2%80%94Weka%E5%A4%84%E7%90%86%E5%A4%A7%E6%95%B0%E6%8D%AE%E9%87%8F%E5%86%85%E5%AD%98%E6%BA%A2%E5%87%BA%E9%97%AE%E9%A2%98%20%7C%20%E5%AD%A6%E6%AD%A5%E5%9B%AD&amp;ari=2&amp;dbv=2&amp;drs=1&amp;pcs=1325x611&amp;pss=1325x256&amp;cfv=0&amp;cpl=18&amp;chi=1&amp;cce=true&amp;cec=UTF-8&amp;tlm=1475115001&amp;rw=611&amp;ltu=http%3A%2F%2Fwww.xuebuyuan.com%2F483152.html&amp;ecd=1&amp;psr=1366x768&amp;par=1366x728&amp;pis=-1x-1&amp;ccd=24&amp;cja=true&amp;cmi=42&amp;col=zh-CN&amp;cdo=-1&amp;tcn=1475115002&amp;qn=02a071a7f708eb97&amp;tt=1475115001518.225.670.674" width="336" height="280" align="center,center" vspace="0" hspace="0" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" allowtransparency="true" style="margin: 0px; padding: 0px; border-width: 0px; border-style: initial; vertical-align: bottom; background: transparent;"></iframe>

現在做的一個項目ETL採用KETTLE,通過Perl腳本進行分天表、月表及年表的創建,並修改KETTLE創建的抽取任務模板。即使這樣在處理天表表近百萬數據量時,Kettle也會有時發生內存溢出現象,導致抽取任務失敗。今天發現了一哥們BLOG中的解決辦法,特分享。

 

以Spoon.bat爲例,其他組件和.sh操作類似

 

用文本編輯器打開Spoon.bat找到:

 

REM ******************************************************************

REM ** Set java runtime options                                     **

REM ** Change 256m to higher values in case you run out of memory.  **

REM ******************************************************************

 

set OPT=-Xmx1444m -cp %CLASSPATH% -Djava.library.path=libswt\win32\ -DKETTLE_HOME="%KETTLE_HOME%" -DKETTLE_REPOSITORY="%KETTLE_REPOSITORY%" -DKETTLE_USER="%

KETTLE_USER%" -DKETTLE_PASSWORD="%KETTLE_PASSWORD%" -DKETTLE_PLUGIN_PACKAGES="%KETTLE_PLUGIN_PACKAGES%"

 

修改這裏的數字...-Xmx1444m...

我裝的是jdk-1_5_0_14這裏的1444m是極限了.大家可以在自己的機器上試驗不同的數值.

 

 

 

WEKA(感謝網友:comcome84)

 

用文本編輯器打開RunWeka.ini找到:

 

# placeholders ("#bla#" in command gets replaced with content of key "bla")

# Note: "#wekajar#" gets replaced by the launcher class, since that jar gets

#       provided as parameter

maxheap=1444m

 

這裏同樣被我修改成1444m.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章