当前位置:首页 » 操作系统 » 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"

热点内容
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
Z包解压命令 发布:2024-09-17 01:27:51 浏览:221