當前位置:首頁 » 操作系統 » kettle源碼

kettle源碼

發布時間: 2022-01-21 23:13:19

Ⅰ 如何使用kettle源碼更改spoon的東西

1.2. 編譯源碼
將項目載入到eclipse
將kettle項目拷貝到eclipse的workspace目錄下,在eclipse中新建java project,項目名稱和你拷貝過來的kettle文件夾名稱一致

項目導入到eclipse中會出現一個錯誤,如下圖,將這個文件的源碼全部注釋掉

編譯
打開build.xml, 在右邊的。Outline 點擊kettle->run as ->ant build

第一次編譯的時候需要從網上下載幾個文件,放在C:\Documents and Settings\Administrator\.subfloor,網路不好的話下載會比較慢,也可以直接文件放在C:\Documents and Settings\Administrator\下。編譯完成後將bin目錄下的.bat文件拷貝到Kettle目錄下點擊Spoon.bat運行,運行成功代表編譯已近通過
用源碼運行Spoon
Kettle源碼工程本身可能是在linux64位機器上調試的,swt配置是linux64的庫,所有在運行源碼前需要修改成win32的swt,步驟如下:工程à屬性àJava Build Pathàlibrariesàadd jars

然後將linux64的SWT庫刪除

最後打開src-uiàorg.pentaho.di.ui.spoonàSpoon.java, Run As àjava application
二.源碼分析
2.1. 修改kettle界面
修改初始化界面
打開package org.pentaho.di.ui.spoon的Spoon.Java,找到main函數,該main函數為Spoon工具的入口,找到如下語句

Splash splash = new Splash(display);

該語句為spoon初始化顯示的界面,跳到定義Splash.java,下面函數

canvas.addPaintListener(new PaintListener() {
publicvoid paintControl(PaintEvent e) {
String versionText = BaseMessages.getString(PKG, "SplashDialog.Version") + " " + Const.VERSION; //$NON-NLS-1$ //$NON-NLS-2$

StringBuilder sb = new StringBuilder();
String line = null;

try {
BufferedReader reader = new BufferedReader(newInputStreamReader(Splash.class.getClassLoader().getResourceAsStream("org/pentaho/di/ui/core/dialog/license/license.txt")));//$NON-NLS-1$

while((line = reader.readLine()) != null) {
sb.append(line + System.getProperty("line.separator")); //$NON-NLS-1$
}
} catch (Exception ex) {
sb.append(""); //$NON-NLS-1$
Log.warn(BaseMessages.getString(PKG, "SplashDialog.LicenseTextNotFound")); //$NON-NLS-1$
}

String licenseText = sb.toString();
e.gc.drawImage(kettle_image, 0, 0);

// If this is a Milestone or RC release, warn the user
if (Const.RELEASE.equals(Const.ReleaseType.MILESTONE)) {
versionText = BaseMessages.getString(PKG, "SplashDialog.DeveloperRelease") + " - " + versionText; //$NON-NLS-1$ //$NON-NLS-2$
drawVersionWarning(e);
} elseif (Const.RELEASE.equals(Const.ReleaseType.RELEASE_CANDIDATE)) {
versionText = BaseMessages.getString(PKG, "SplashDialog.ReleaseCandidate") + " - " + versionText; //$NON-NLS-1$//$NON-NLS-2$
}
elseif (Const.RELEASE.equals(Const.ReleaseType.PREVIEW)) {
versionText = BaseMessages.getString(PKG, "SplashDialog.PreviewRelease") + " - " + versionText; //$NON-NLS-1$//$NON-NLS-2$
}
elseif (Const.RELEASE.equals(Const.ReleaseType.GA)) {
versionText = BaseMessages.getString(PKG, "SplashDialog.GA") + " - " + versionText; //$NON-NLS-1$//$NON-NLS-2$
}

Font verFont = new Font(e.display, "Helvetica", 11, SWT.BOLD); //$NON-NLS-1$
e.gc.setFont(verFont);
e.gc.drawText(versionText, 290, 205, true);

// try using the desired font size for the license text
int fontSize = 8;
Font licFont = new Font(e.display, "Helvetica", fontSize, SWT.NORMAL); //$NON-NLS-1$
e.gc.setFont(licFont);

// if the text will not fit the allowed space
while (!willLicenseTextFit(licenseText, e.gc)) {
fontSize--;
licFont = new Font(e.display, "Helvetica", fontSize, SWT.NORMAL); //$NON-NLS-1$
e.gc.setFont(licFont);
}

e.gc.drawText(licenseText, 290, 290, true);
}
});

1. 修改背景圖片
找到ui/image/下面的kettle_splash.png,替換該圖片
2. 修改版本信息
找到e.gc.drawText(versionText, 290, 205, true); 改為e.gc.drawText("海康威視數據交換平台V1.0", 290, 205, true);
3. 修改下面的描述性文字
找到e.gc.drawText(licenseText, 290, 290, true);改為e.gc.drawText("作者:海康", 290, 290, true);
4. 預覽效果

Ⅱ kettle 中怎樣將java代碼返回的值,解析並插入資料庫

java調用kettle資料庫類型資源庫中的ktr 此問題在1個月前或許已經接觸,單是一直木有怎麼用到,就被耽擱至今;問題的解決要來源於網路,其實我還想說問題的解決更多的是要靠我們自己的思想,不過多的言情,我們接下來直接進入主題吧!

Ⅲ kettle 源碼 怎麼運行"repositories"插件

1.2. 編譯源碼
項目載入eclipse
kettle項目拷貝eclipseworkspace目錄eclipse新建java project項目名稱拷貝kettle文件夾名稱致

項目導入eclipse現錯誤圖文件源碼全部注釋掉

編譯
打build.xml, 右邊Outline 點擊kettle->run as ->ant build

第編譯候需要網載幾文件放C:\Documents and Settings\Administrator\.subfloor網路載比較慢直接文件放C:\Documents and Settings\Administrator\編譯完bin目錄.bat文件拷貝Kettle目錄點擊Spoon.bat運行運行功代表編譯已近通
用源碼運行Spoon
Kettle源碼工程本身能linux64位機器調試swt配置linux64庫所運行源碼前需要修改win32swt步驟:工程à屬性àJava Build Pathàlibrariesàadd jars

linux64SWT庫刪除

打src-uiàorg.pentaho.di.ui.spoonàSpoon.java Run As àjava application
二.源碼析
2.1. 修改kettle界面
修改初始化界面
打package org.pentaho.di.ui.spoonSpoon.Java找main函數該main函數Spoon工具入口找語句

Splash splash = new Splash(display);

該語句spoon初始化顯示界面跳定義Splash.java面函數

canvas.addPaintListener(new PaintListener() {
publicvoid paintControl(PaintEvent e) {
String versionText = BaseMessages.getString(PKG, "SplashDialog.Version") + " " + Const.VERSION; //$NON-NLS-1$ //$NON-NLS-2$

StringBuilder sb = new StringBuilder();
String line = null;

try {
BufferedReader reader = new BufferedReader(newInputStreamReader(Splash.class.getClassLoader().getResourceAsStream("org/pentaho/di/ui/core/dialog/license/license.txt")));//$NON-NLS-1$

while((line = reader.readLine()) != null) {
sb.append(line + System.getProperty("line.separator")); //$NON-NLS-1$
}
} catch (Exception ex) {
sb.append(""); //$NON-NLS-1$
Log.warn(BaseMessages.getString(PKG, "SplashDialog.LicenseTextNotFound")); //$NON-NLS-1$
}

String licenseText = sb.toString();
e.gc.drawImage(kettle_image, 0, 0);

// If this is a Milestone or RC release, warn the user
if (Const.RELEASE.equals(Const.ReleaseType.MILESTONE)) {
versionText = BaseMessages.getString(PKG, "SplashDialog.DeveloperRelease") + " - " + versionText; //$NON-NLS-1$ //$NON-NLS-2$
drawVersionWarning(e);
} elseif (Const.RELEASE.equals(Const.ReleaseType.RELEASE_CANDIDATE)) {
versionText = BaseMessages.getString(PKG, "SplashDialog.ReleaseCandidate") + " - " + versionText; //$NON-NLS-1$//$NON-NLS-2$
}
elseif (Const.RELEASE.equals(Const.ReleaseType.PREVIEW)) {
versionText = BaseMessages.getString(PKG, "SplashDialog.PreviewRelease") + " - " + versionText; //$NON-NLS-1$//$NON-NLS-2$
}
elseif (Const.RELEASE.equals(Const.ReleaseType.GA)) {
versionText = BaseMessages.getString(PKG, "SplashDialog.GA") + " - " + versionText; //$NON-NLS-1$//$NON-NLS-2$
}

Font verFont = new Font(e.display, "Helvetica", 11, SWT.BOLD); //$NON-NLS-1$
e.gc.setFont(verFont);
e.gc.drawText(versionText, 290, 205, true);

// try using the desired font size for the license text
int fontSize = 8;
Font licFont = new Font(e.display, "Helvetica", fontSize, SWT.NORMAL); //$NON-NLS-1$
e.gc.setFont(licFont);

// if the text will not fit the allowed space
while (!willLicenseTextFit(licenseText, e.gc)) {
fontSize--;
licFont = new Font(e.display, "Helvetica", fontSize, SWT.NORMAL); //$NON-NLS-1$
e.gc.setFont(licFont);
}

e.gc.drawText(licenseText, 290, 290, true);
}
});

1. 修改背景圖片
找ui/image/面kettle_splash.png替換該圖片
2. 修改版本信息
找e.gc.drawText(versionText, 290, 205, true); 改e.gc.drawText("海康威視數據交換平台V1.0", 290, 205, true);
3. 修改面描述性文字
找e.gc.drawText(licenseText, 290, 290, true);改e.gc.drawText("作者:海康", 290, 290, true);
4. 預覽效

Ⅳ 使用kettle整合新的三層結構的資料庫,該怎麼玩,怎麼修改代碼

  • 資源庫

    默認資料庫連接為全局共有

  • 非資源庫

    a) 將資料庫連接進行共享,view-database connections-share

    b) 設置為全局變數,在kettle.properties文件中,將資料庫連接各屬性配置為變數

Ⅳ etl kettle 需要寫代碼 嗎

ETL(Extract-Transform-Load的縮寫,即數據抽取、轉換、裝載的過程),對於企業或行業應用來說,我們經常會遇到各種數據的處理,轉換,遷移,所以了解並掌握一種etl工具的使用

Ⅵ 我看到你關於kettle不釋放內存的回答,想要一下你改完後org.pentaho.di.core.logging.LoggingRegistr源碼

你留個郵箱或者qq吧 網路hi怎麼發文件我還不怎麼清楚

Ⅶ kettle源碼搭建運行時出現錯誤

將安裝包pdi-ce-5.4.0.1-130\data-integration\ui目錄下的所有文件拷貝到源碼包pentaho-kettle-5.4.0.1-R\ui目錄下,即可解決~~

Ⅷ 求Kettle 源代碼 下載地址及 Kettle java api教程...

http://kettle.pentaho.com/下載地址!想要什麼自己選
http://wiki.pentaho.com/display/EAI/Getting+Started基礎教程
http://wiki.pentaho.com/display/EAI/Pentaho+Data+Integration+Steps詳細教程

Ⅸ kettle源碼是完全公開的嗎

太懂意思
需要截取某段代碼作自發程序使用復制
至於復制段代碼許類許函數需要自析
看看哪些自定義類函數
既工程文件直接打工程文件進行查看呢面應該跟蹤啊

Ⅹ kettle源碼在idea上部署運行時出錯

如果java_home設置了,下面可以不用設置,如果提示JVM不能正常啟動
Could not find themain class. Program will exit!
可以設置環境變數:pentaho_java_home,例如:C:\Program Files\Java\jdk1.7.0_79,其實就是你的java安裝目錄,1.6以上即可。windows下
如果啟動還報錯「could not create the Java virtual machine」,不是java虛擬機出了問題,修改一下spoon.bat里內存配置
if "%PENTAHO_DI_JAVA_OPTIONS%"=="" setPENTAHO_DI_JAVA_OPTIONS="-Xms2058m" "-Xmx1024m""-XX:MaxPermSize=256m"
改為
if "%PENTAHO_DI_JAVA_OPTIONS%"=="" setPENTAHO_DI_JAVA_OPTIONS="-Xms512m" "-Xmx512m" "-XX:MaxPermSize=256m"

熱點內容
跳轉頁源碼 發布:2024-09-17 03:13:05 瀏覽:542
html文件上傳表單 發布:2024-09-17 03:08:02 瀏覽:783
聊天軟體編程 發布:2024-09-17 03:00:07 瀏覽:725
linuxoracle安裝路徑 發布:2024-09-17 01:57:29 瀏覽:688
兩個安卓手機照片怎麼同步 發布:2024-09-17 01:51:53 瀏覽:207
cf編譯後沒有黑框跳出來 發布:2024-09-17 01:46:54 瀏覽:249
安卓怎麼禁用應用讀取列表 發布:2024-09-17 01:46:45 瀏覽:524
win10設密碼在哪裡 發布:2024-09-17 01:33:32 瀏覽:662
情逢敵手迅雷下載ftp 發布:2024-09-17 01:32:35 瀏覽:337
安卓如何讓軟體按照步驟自動運行 發布:2024-09-17 01:28:27 瀏覽:197