現在做的一個項目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.
感謝本文方法來源:http://blog.csdn.net/senaku/archive/2008/07/03/2609021.aspx