Compare commits

..

33 Commits

Author SHA1 Message Date
hzhao-talendbj
d4397012d4 code changes (#3726)
* code changes

* change to official mvn
2020-10-15 22:51:22 +08:00
hzhao-talendbj
7781a255b9 add repository for Could not find artifact (#3719)
* add repository for Could not find artifact
org.talend.libraries:javax.ws.rs-api-2.0-m10:jar:6.0.0

* add repository talend-update to every pom

* change zip order
2020-10-14 14:27:09 +08:00
Jenkins Continuous Build server
0861f03e4b Set version to 7.4.1 M3 2020-10-13 17:04:40 +02:00
Jenkins Continuous Build server
46b951139c Set runtime version to 7.4.1 M3 2020-10-13 13:34:57 +02:00
kjwang
4b99767b6a Kjwang/feat tup 27762 new version of ci (#3656) (#3706)
* TUP-28274 Shared Studio: Can't find EMR 5.29 option in Hadoop Cluster
wizard after enable shared studio mode
https://jira.talendforge.org/browse/TUP-28274
2020-10-13 14:29:29 +08:00
chmyga
5a8ef4838a Dchmyga/tdi 44962 backport to master (#3704)
* Revert "fix(TDI-44826): Missing line in Resume log (#3640)" (#3691)

This reverts commit cf52e1e004.

Co-authored-by: Dmytro Chmyga <dmytro.chmyga@synapse.com>

* fix(TDI-44962): fix stream closed exception (#3692)

* Recreate FileWriter with append after writing header

* Add csv writer to shared writer map

Co-authored-by: Dmytro Chmyga <dmytro.chmyga@synapse.com>

Co-authored-by: Dmytro Chmyga <dmytro.chmyga@synapse.com>
2020-10-12 14:30:39 +03:00
jiezhang-tlnd
f815b15476 fix(TUP-28839)NPE when retrieve schema for JDBC connection of postgresql (#3700)
https://jira.talendforge.org/browse/TUP-28839
2020-10-12 16:47:33 +08:00
hzhao-talendbj
c362cc49a9 change to filter CI case (#3696) 2020-10-12 12:46:50 +08:00
hzhao-talendbj
ea8eedc571 remove some jars (#3630)
* remove some jars

* add commons-codec to lib when build studio

* add back httpcore and httpclient

* modify pom structure

* add fluent-hc to pom

* add common-cli

* add jar commons-cli-2.0-SANPSHOT back

* fix junit error

* add asm plugin into apache common

* add new pom,  add plugin.xml

* fix pom artifact id

* change relativePath to ../../

* add repositories/studio-auto-test-libs-releases/

* remove jars that can't be downloaded
2020-10-12 12:17:44 +08:00
Zhiwei Xue
3ee3097e32 fix(TUP-28656): Run restclient job get error 'Error: Could not find or (#3684)
load main class' when using jdk11
2020-10-12 10:28:58 +08:00
wang wei
470175ccf6 fix(TDI-44937): TalendDate.formatDateLocale()gives random value for FR country code in java 11.(#3679) 2020-10-12 10:15:12 +08:00
Chao MENG
93f4ff36ee fix(TUP-27076): Unable to connect to codecommit GIT after the first (#3672)
login.
https://jira.talendforge.org/browse/TUP-27076
2020-10-10 10:42:56 +08:00
jiezhang-tlnd
80273d36e1 feat(TUP-28811)update color for login page (#3699)
https://jira.talendforge.org/browse/TUP-28811
2020-10-10 10:12:29 +08:00
hzhao-talendbj
61493a76a4 remove exception log (#3687) 2020-10-09 11:10:38 +08:00
hzhao-talendbj
afb9b3ff0c tup-26713 (#3553)
* tup-26713

* add include groupids

* remove jars

* remove all jars and modify pom

* add extentions

* modify org.talendlibraries.mdm

* keep only three jars

* add new cxf pom

* remove pom

* add module

* add javax.ws.rs-api-2.0-m10

* try add javax.ws.rs-api to manifest and classpath

* try add to pom and copy during build

* modify plugin.xml

* try rename jar to javax.ws.rs-api-2.0-m10-6.0.0.jar

* add stripVersion , add cxf-core

* add back dependencies to pom but not in build properties

* change to copy-dependencies

* add to pom

* remove stripVersion because it will strip all jars version

* modify mistake cxf-rt-frontend-simple
2020-10-09 10:14:54 +08:00
hzhao-talendbj
56f428c944 tup 28319 remove jdbc plugins (#3563)
* tup 28319  remove jdbc plugins

* fix pom
2020-10-09 09:27:36 +08:00
vyu-talend
16fc19571c fix(TDI-44726):add some necessary annotation. (#3666) (#3682) 2020-09-27 16:14:50 +08:00
kjwang
a68463d184 Fix TUP-28603 'Export item' missing signature (#3643) (#3678)
* Fix TUP-28603 'Export item' missing signature
https://jira.talendforge.org/browse/TUP-28603
2020-09-27 15:34:29 +08:00
Jane Ding
d04f7db182 feat(TUP-27654):Databricks Delta Lake - Support ELT & MERGE (#3592) (#3667)
* feat(TUP-27654):Databricks Delta Lake - Support ELT & MERGE (#3592)

* feat(TUP-27654):Databricks Delta Lake - Support ELT & MERGE
https://jira.talendforge.org/browse/TUP-27654

* feat(TUP-27654):Databricks Delta Lake - Support ELT & MERGE
https://jira.talendforge.org/browse/TUP-27654

Signed-off-by: jding-tlnd <jding@talend.com>

* feat(TUP-27654):Databricks Delta Lake - Support ELT & MERGE
https://jira.talendforge.org/browse/TUP-27654

Signed-off-by: jding-tlnd <jding@talend.com>

* feat(TUP-27654):Databricks Delta Lake - Support ELT & MERGE
TUP-28615:[Bug] Save the property to metadata will change Delta Lake to
JDBC.
https://jira.talendforge.org/browse/TUP-27654

* feat(TUP-27654):Databricks Delta Lake - Support ELT & MERGE
https://jira.talendforge.org/browse/TUP-27654

* feat(TUP-27654):Databricks Delta Lake - Support ELT & MERGE
https://jira.talendforge.org/browse/TUP-27654

* feat(TUP-27654):Databricks Delta Lake - Support ELT & MERGE
https://jira.talendforge.org/browse/TUP-27654

* feat(TUP-27654):Databricks Delta Lake - Support ELT & MERGE (#3670)

https://jira.talendforge.org/browse/TUP-27654
2020-09-24 09:12:47 +08:00
sbliu
dd201ac7fa feat(TUP-28434) fix the test failure. 2020-09-23 10:03:01 +08:00
bhe-talendbj
7ce1c256dd feat(TUP-28666): Extract TalendTextUtils (#3648)
* feat(TUP-28666): Extract TalendTextUtils

* feat(TUP-28666): call new TalendTextUtils

* feat(TUP-28666): fix removeQuotesIfExist

* feat(TUP-28666): rename TalendTextUtils
2020-09-22 21:32:23 +08:00
Jane Ding
199f4dde6e fix(TUP-28519):Update org.talend.libraries.apache.google jars (#3631)
remove org.talend.libraries.apache.google plugin
https://jira.talendforge.org/browse/TUP-28519
2020-09-22 15:10:56 +08:00
Zhiwei Xue
c029f53402 feat(TUP-28323):Improve the maven build time spent during login project (#3649) 2020-09-21 15:17:16 +08:00
Chao MENG
8aea05339a Cmeng/workitem/tup 28063 improve start (#3565)
* workitem(TUP-28063): Improve studio bundles reloading logic
https://jira.talendforge.org/browse/TUP-28063

* workitem(TUP-28063): Improve studio bundles reloading logic
https://jira.talendforge.org/browse/TUP-28063

* workitem(TUP-28063): Improve studio bundles reloading logic
https://jira.talendforge.org/browse/TUP-28063

* workitem(TUP-28063): Improve studio bundles reloading logic
https://jira.talendforge.org/browse/TUP-28063

* workitem(TUP-28063): Improve studio bundles reloading logic
https://jira.talendforge.org/browse/TUP-28063
2020-09-21 14:12:47 +08:00
wang wei
cf19586e10 fix(TDI-44745): FileInputDelimited fails to properly consume CipherInputStream(#3590) (#3661) 2020-09-18 15:10:03 +08:00
wang wei
c68419a4e2 fix(TDI-44623): [OBSERVABILITY] : add PID and (Thread-ID OR UUID) information (#3614) (#3662)
* fix(TDI-44623): [OBSERVABILITY] : add PID and (Thread-ID OR UUID)
information

* decrease the expensive call number for getting pid

* fix(TDI-44807): Observability: initialize moment only when necessary

* fix(TDI-44806): Observability: Add customization for event frequency
2020-09-18 15:06:44 +08:00
Chao MENG
819477f327 fix(TUP-26413): Be able to compare metadata connection conflicts (#3658)
https://jira.talendforge.org/browse/TUP-26413
2020-09-18 12:27:18 +08:00
hzhao-talendbj
eab0938fb0 update PSQL_V9_X to 42.2.14 (#3617) 2020-09-17 16:10:29 +08:00
hcyi
40da0e6196 feat(TUP-23827): Runtime Lineage (#3646)
* feat(TUP-23827):Runtime Lineage for studio.

* fix(TUP-28635):[bug] output path always be changed when path contains
2020-09-17 14:55:09 +08:00
sbliu
8264ddedf8 feature(TUP-28405) Collect hardware info. also add function to measure performance( IO speed, startup time), show them in preference..
performance data show in preference won't show unit.
2020-09-17 14:37:48 +08:00
Chao MENG
b76af1a75a fix(TUP-28682): Connection info missing when create dataset for tck (#3654)
components

https://jira.talendforge.org/browse/TUP-28682
2020-09-17 11:06:29 +08:00
hcyi
eecc3eff20 fix(TUP-27518):revert the code since get some error log . (#3650) 2020-09-16 18:33:34 +08:00
Haiting Yin
b8293db502 TMDM-12594 [Component] Legacy 5 version is no more supported (#3647) 2020-09-16 15:27:13 +08:00
413 changed files with 2990 additions and 1612 deletions

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.common.ui.runtime.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.commons.runtime.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.commons.ui.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core.repository.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core.runtime.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core.ui.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.cwm.mip.edit.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.cwm.mip.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.maven.ui.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.help.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.helpers.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.librariesmanager.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.librariesmanager.ui.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.metadata.managment.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.metadata.managment.ui.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.migrationTool.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.model.edit.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.model.migration.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.model.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.presentation.onboarding.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.rcp.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.registration.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.items.importexport.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.items.importexport.ui.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.localprovider.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.mdm.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.metadata.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.view.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.resources.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.commons.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.fragment.jars.common.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.help.di.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.help.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.jdt.feature</artifactId>

View File

@@ -4,14 +4,7 @@
<description url="http://www.example.com/description">[Enter Feature Description here.]</description>
<copyright url="http://www.example.com/copyright">[Enter Copyright Description here.]</copyright>
<license url="http://www.example.com/license">[Enter License Description here.]</license>
<plugin id="org.talend.libraries.jdbc.access" download-size="0" install-size="0" version="0.0.0"/>
<plugin id="org.talend.libraries.jdbc.as400" download-size="0" install-size="0" version="0.0.0"/>
<plugin id="org.talend.libraries.jdbc.exasol" download-size="0" install-size="0" version="0.0.0"/>
<plugin id="org.talend.libraries.jdbc.h2" download-size="0" install-size="0" version="0.0.0"/>
<plugin id="org.talend.libraries.jdbc.hsql" download-size="0" install-size="0" version="0.0.0"/>
<plugin id="org.talend.libraries.jdbc.ingres" download-size="0" install-size="0" version="0.0.0"/>
<plugin id="org.talend.libraries.jdbc.mysql" download-size="0" install-size="0" version="0.0.0"/>
<plugin id="org.talend.libraries.jdbc.paraccel" download-size="0" install-size="0" version="0.0.0"/>
<plugin id="org.talend.libraries.jdbc.sqlite3" download-size="0" install-size="0" version="0.0.0"/>
<plugin id="org.talend.libraries.jdbc.teradata" download-size="0" install-size="0" version="0.0.0"/>
</feature>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.libraries.jdbc.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.m2e.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.model.migration.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.rcp.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.update.p2.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.updates.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.utils.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.common.ui.runtime</artifactId>

View File

@@ -24,11 +24,11 @@ public interface ColorConstants {
static final Color GREY_COLOR = new Color(null, 215, 215, 215);
static final Color YELLOW_GREEN_COLOR = new Color(null, 138, 188, 0);// 143, 163, 35
static final Color YELLOW_GREEN_COLOR = new Color(null, 88,153,24);// 143, 163, 35
static final Color YELLOW_COLOR = new Color(null, 255, 173, 37);// 254, 182, 84
static final Color RED_COLOR = new Color(null, new RGB(240, 0, 0));// 255
static final Color RED_COLOR = new Color(null, new RGB(204,87,89));// 255
static final Color VERTICAL_SEPERATOR_LINE_COLOR = new Color(null, 162, 179, 195);

View File

@@ -16,7 +16,8 @@ Require-Bundle: org.apache.log4j;visibility:=reexport,
org.talend.utils,
org.eclipse.core.net,
org.eclipse.m2e.core,
org.eclipse.m2e.maven.runtime
org.eclipse.m2e.maven.runtime,
org.eclipse.core.resources
Export-Package: org.talend.commons,
org.talend.commons.exception,
org.talend.commons.i18n,

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.commons.runtime</artifactId>

View File

@@ -12,7 +12,7 @@
<parent>
<groupId>org.talend</groupId>
<artifactId>org.talend.tos</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../pom_server.xml</relativePath>
</parent>

View File

@@ -150,6 +150,28 @@ public class NetworkUtil {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
String httpProxyHost = System.getProperty("http.proxyHost"); //$NON-NLS-1$
String httpProxyPort = System.getProperty("http.proxyPort"); //$NON-NLS-1$
String httpsProxyHost = System.getProperty("https.proxyHost"); //$NON-NLS-1$
String httpsProxyPort = System.getProperty("https.proxyPort"); //$NON-NLS-1$
String requestingHost = getRequestingHost();
int requestingPort = getRequestingPort();
String proxyHost = null;
String proxyPort = null;
boolean isHttp = false;
if ("http".equalsIgnoreCase(getRequestingScheme())) {
isHttp = true;
}
if (isHttp && StringUtils.isNotBlank(httpProxyHost)) {
proxyHost = httpProxyHost;
proxyPort = httpProxyPort;
} else {
proxyHost = httpsProxyHost;
proxyPort = httpsProxyPort;
}
if (!StringUtils.equals(proxyHost, requestingHost) || !StringUtils.equals(proxyPort, "" + requestingPort)) {
return null;
}
String httpProxyUser = System.getProperty("http.proxyUser"); //$NON-NLS-1$
String httpProxyPassword = System.getProperty("http.proxyPassword"); //$NON-NLS-1$
String httpsProxyUser = System.getProperty("https.proxyUser"); //$NON-NLS-1$
@@ -167,7 +189,11 @@ public class NetworkUtil {
proxyPassword = httpsProxyPassword.toCharArray();
}
}
return new PasswordAuthentication(proxyUser, proxyPassword);
if (StringUtils.isBlank(proxyUser)) {
return null;
} else {
return new PasswordAuthentication(proxyUser, proxyPassword);
}
}
});

View File

@@ -49,11 +49,17 @@ public class EclipseCommandLine {
*/
static public final String TALEND_PROJECT_TYPE_COMMAND = "-talendProjectType"; //$NON-NLS-1$
static public final String TALEND_LICENCE_PATH = "talend.licence.path"; //$NON-NLS-1$
static public final String ARG_TALEND_LICENCE_PATH = "-" + TALEND_LICENCE_PATH; //$NON-NLS-1$
/**
* for relaunch of the plugins when relaunching the Studio
*/
static public final String TALEND_RELOAD_COMMAND = "-talendReload"; //$NON-NLS-1$
static public final String LOGIN_ONLINE_UPDATE = "--loginOnlineUpdate";
static public final String ARG_TALEND_BUNDLES_CLEANED = "-talend.studio.bundles.cleaned"; //$NON-NLS-1$
static public final String PROP_TALEND_BUNDLES_DO_CLEAN = "-talend.studio.bundles.doclean"; //$NON-NLS-1$

View File

@@ -0,0 +1,368 @@
// ============================================================================
//
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.commons.utils.time;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.text.DecimalFormat;
import java.util.Properties;
import java.util.Random;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.Platform;
import org.talend.commons.exception.CommonExceptionHandler;
/**
* DOC sbliu class global comment. Detailled comment
*/
public class PerformanceStatisticUtil {
private static final DecimalFormat DF = new DecimalFormat("###.##");
private static final int MEGABYTE = 1024 * 1024;// MB = 1024*1024 byte
private static final int KILOBYTE = 1024;// kb=1024 byte
private static final int numOfBlocks = 256;
private static final int blockSizeKb = 512;
private static final String dataFile = "testio.data";
private static String recordingFileName = "performance_record";
private static File recordingFile = null;
private static enum BlockSequence {
SEQUENTIAL,
RANDOM;
}
public static enum StatisticKeys {
IO_COUNT("I/O.count"), // io count
IO_W_MB_SEC("I/O.write"), // write speed MB
IO_R_MB_SEC("I/O.read"), // read speed MB
IO_W_AVERAGE_MB_SEC("I/O.write.average"), // average speed of write MB
IO_R_AVERAGE_MB_SEC("I/O.read.average"), // average speed of read
STARTUP_AVERAGE("startup.average"),
STARTUP_MAX("startup.max"),
STARTUP_COUNT("startup.count");
private String key;
StatisticKeys(String _key) {
key = _key;
}
public String get() {
return key;
}
}
public static void recordStartupEpapsedTime(double elapsedTimeInSeconds) {
File file = getRecordingFile();
Properties props = read(file, true);
String propCount = props.getProperty(StatisticKeys.STARTUP_COUNT.get(), "0");
String propMax = props.getProperty(StatisticKeys.STARTUP_MAX.get(), "0");
String propAverage = props.getProperty(StatisticKeys.STARTUP_AVERAGE.get(), "0");
int iPropCount = Integer.parseInt(propCount);
double iPropMax = Double.parseDouble(propMax);
double iPropAverage = Double.parseDouble(propAverage);
iPropMax = iPropMax > elapsedTimeInSeconds ? iPropMax : elapsedTimeInSeconds;
iPropAverage = (iPropAverage * iPropCount + elapsedTimeInSeconds) / (iPropCount + 1);
iPropCount++;
props.setProperty(StatisticKeys.STARTUP_COUNT.get(), "" + iPropCount);
props.setProperty(StatisticKeys.STARTUP_MAX.get(), "" + iPropMax);
props.setProperty(StatisticKeys.STARTUP_AVERAGE.get(), "" + iPropAverage);
store(file, props);
}
public static File getRecordingFile() {
if (recordingFile != null) {
return recordingFile;
}
String configurationLocation = Platform.getConfigurationLocation().getURL().getPath();
File file = new File(configurationLocation + "/" + recordingFileName);
return file;
}
public static void setRecordingFile(File _recordingFile) {
recordingFile = _recordingFile;
}
public static synchronized Properties read(File recordFile, boolean createIfNotExist) {
Properties props = new Properties();
if (recordFile != null && exist(recordFile, createIfNotExist)) {
FileInputStream inStream = null;
try {
inStream = new FileInputStream(recordFile);
props.load(inStream);
} catch (Exception e) {
CommonExceptionHandler.log(e.getMessage());
} finally {
if (inStream != null) {
try {
inStream.close();
} catch (IOException e) {//
}
}
}
}
return props;
}
public static synchronized void store(File recordFile, Properties props) {
if (props == null) {
return;
}
if (recordFile != null && exist(recordFile, true)) {
FileOutputStream outputStream = null;
try {
outputStream = new FileOutputStream(recordFile);
props.store(outputStream, "");
} catch (IOException e) {
CommonExceptionHandler.log(e.getMessage());
} finally {
if (outputStream != null) {
try {
outputStream.close();
} catch (IOException e) {
//
}
}
}
}
}
private static boolean exist(File recordFile, boolean createIfNotExist) {
boolean exists = recordFile.exists();
if (!exists && createIfNotExist) {
try {
exists = recordFile.createNewFile();
if (!exists) {
throw new FileNotFoundException(recordFile.getName());
}
} catch (Exception e) {
CommonExceptionHandler.log(e.getMessage());
return false;
}
}
return exists;
}
private static Lock lock = new ReentrantLock();
private static Condition condition = lock.newCondition();
private static boolean measureIOFinished = true;
public static void waitUntilFinish() throws InterruptedException {
lock.lock();
try {
if(!measureIOFinished) {
condition.await(20, TimeUnit.SECONDS);
}
} finally {
lock.unlock();
}
}
public static void measureIO() {
new Thread() {
public void run() {
measureIOFinished = false;
try {
_measureIO();
} finally {
measureIOFinished = true;
}
}
}.start();
}
private static void _measureIO() {
File file = getRecordingFile();
Properties props = read(file, true);
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
File workspace = root.getLocation().makeAbsolute().toFile();
File locationDir = new File(workspace, "temp"); // here is workspace/temp dir
File testFile = detectTestDataFile(locationDir);
if (testFile != null) {
measureWrite(props, testFile);
measureRead(props, testFile);
store(file, props);
}
}
private static void measureWrite(Properties props, File testFile) {
int blockSize = blockSizeKb * KILOBYTE;
long startTime = System.nanoTime();
long totalBytesWrittenInMark = writeIO(numOfBlocks, BlockSequence.RANDOM, blockSize, testFile);
totalBytesWrittenInMark = totalBytesWrittenInMark + writeIO(numOfBlocks, BlockSequence.SEQUENTIAL, blockSize, testFile);
long endTime = System.nanoTime();
long elapsedTimeNs = endTime - startTime;
double sec = (double) elapsedTimeNs / (double) 1000000000;
double mbWritten = (double) totalBytesWrittenInMark / (double) MEGABYTE;
double bwMbSec = mbWritten / sec;
String ioCount = props.getProperty(StatisticKeys.IO_COUNT.get(), "0");
String ioWAverageMbSec = props.getProperty(StatisticKeys.IO_W_AVERAGE_MB_SEC.get(), "0");
String ioWMbSec = props.getProperty(StatisticKeys.IO_W_MB_SEC.get(), "0");
int digital_ioCount = Integer.parseInt(ioCount);
double digital_ioWAverageMbSec = Double.parseDouble(ioWAverageMbSec);
double digital_ioWMbSec = Double.parseDouble(ioWMbSec);
digital_ioWAverageMbSec = (digital_ioWAverageMbSec * digital_ioCount + bwMbSec) / (digital_ioCount + 1);
digital_ioWMbSec = bwMbSec;
props.setProperty(StatisticKeys.IO_W_AVERAGE_MB_SEC.get(), "" + DF.format(digital_ioWAverageMbSec));
props.setProperty(StatisticKeys.IO_W_MB_SEC.get(), "" + DF.format(digital_ioWMbSec));
}
private static long writeIO(int numOfBlocks, BlockSequence blockSequence, int blockSize, File testFile) {
byte[] blockArr = new byte[blockSize];
for (int b = 0; b < blockArr.length; b++) {
if (b % 2 == 0) {
blockArr[b] = (byte) 0xFF;
}
}
String mode = "rwd";// "rwd"
long totalBytesWrittenInMark = 0;
try {
try (RandomAccessFile rAccFile = new RandomAccessFile(testFile, mode)) {
for (int b = 0; b < numOfBlocks; b++) {
if (blockSequence == BlockSequence.RANDOM) {
int rLoc = randInt(0, numOfBlocks - 1);
rAccFile.seek(rLoc * blockSize);
} else {
rAccFile.seek(b * blockSize);
}
rAccFile.write(blockArr, 0, blockSize);
totalBytesWrittenInMark += blockSize;
}
}
} catch (IOException e) {
CommonExceptionHandler.log(e.getMessage());
}
return totalBytesWrittenInMark;
}
private static File detectTestDataFile(File location) {
if (!location.exists()) {
location.mkdirs();
}
File testFile = null;
try {
testFile = new File(location.getAbsolutePath() + File.separator + dataFile);
testFile.deleteOnExit();
testFile.createNewFile();
} catch (IOException e) {
CommonExceptionHandler.log(e.getMessage());
}
return testFile;
}
public static void measureRead(Properties props, File testFile) {
int blockSize = blockSizeKb * KILOBYTE;
long startTime = System.nanoTime();
long totalBytesReadInMark = readIO(numOfBlocks, BlockSequence.RANDOM, blockSize, testFile);
totalBytesReadInMark = totalBytesReadInMark + readIO(numOfBlocks, BlockSequence.SEQUENTIAL, blockSize, testFile);
long endTime = System.nanoTime();
long elapsedTimeNs = endTime - startTime;
double sec = (double) elapsedTimeNs / (double) 1000000000;
double mbRead = (double) totalBytesReadInMark / (double) MEGABYTE;
double bwMbSec = mbRead / sec;
String ioCount = props.getProperty(StatisticKeys.IO_COUNT.get(), "0");
String ioRAverageMbSec = props.getProperty(StatisticKeys.IO_R_AVERAGE_MB_SEC.get(), "0");
String ioRMbSec = props.getProperty(StatisticKeys.IO_R_MB_SEC.get(), "0");
int digital_ioCount = Integer.parseInt(ioCount);
double digital_ioRAverageMbSec = Double.parseDouble(ioRAverageMbSec);
double digital_ioRMbSec = Double.parseDouble(ioRMbSec);
digital_ioRAverageMbSec = (digital_ioRAverageMbSec * digital_ioCount + bwMbSec) / (digital_ioCount + 1);
digital_ioRMbSec = bwMbSec;
digital_ioCount++;
props.setProperty(StatisticKeys.IO_R_AVERAGE_MB_SEC.get(), "" + DF.format(digital_ioRAverageMbSec));
props.setProperty(StatisticKeys.IO_R_MB_SEC.get(), "" + DF.format(digital_ioRMbSec));
props.setProperty(StatisticKeys.IO_COUNT.get(), "" + digital_ioCount);
}
private static long readIO(int numOfBlocks, BlockSequence blockSequence, int blockSize, File testFile) {
long totalBytesReadInMark = 0;
byte[] blockArr = new byte[blockSize];
for (int b = 0; b < blockArr.length; b++) {
if (b % 2 == 0) {
blockArr[b] = (byte) 0xFF;
}
}
try {
try (RandomAccessFile rAccFile = new RandomAccessFile(testFile, "r")) {
for (int b = 0; b < numOfBlocks; b++) {
if (blockSequence == BlockSequence.RANDOM) {
int rLoc = randInt(0, numOfBlocks - 1);
rAccFile.seek(rLoc * blockSize);
} else {
rAccFile.seek(b * blockSize);
}
rAccFile.readFully(blockArr, 0, blockSize);
totalBytesReadInMark += blockSize;
}
}
} catch (IOException e) {
CommonExceptionHandler.log(e.getMessage());
}
return totalBytesReadInMark;
}
private static int randInt(int min, int max) {
// nextInt is normally exclusive of the top value,
// so add 1 to make it inclusive
int randomNum = new Random().nextInt((max - min) + 1) + min;
return randomNum;
}
}

View File

@@ -23,10 +23,14 @@ public class TimeMeasurePerformance extends TimeMeasure{
static private Logger logger;
private static HashMap<String, TimeStack> timers;
private static long startTime = -1L;
private static int indent = 0;
public static void begin(String idTimer) {
startTime = System.nanoTime();
init();
if (timers.containsKey(idTimer)) {
log(indent(indent) + "Warning (start): timer " + idTimer + " already exists"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -103,4 +107,10 @@ public class TimeMeasurePerformance extends TimeMeasure{
throw new RuntimeException("Error while initializing log properties.", e);
}
}
public static void afterStartup() {
double elapsedTimeInSeconds = (double)(System.nanoTime() - startTime)/1000000000;
PerformanceStatisticUtil.recordStartupEpapsedTime(elapsedTimeInSeconds);
PerformanceStatisticUtil.measureIO();
}
}

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.commons.ui</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core.repository</artifactId>

View File

@@ -838,7 +838,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
serializableAllVersion = getSerializableFromFolder(project, fullFolder, id, type, false, false, true, true);
if (serializableAllVersion.isEmpty()) {
// look in all folders for this item type
serializableAllVersion = getSerializableFromFolder(project, fullFolder, id, type, false, false, true, true, true);
serializableAllVersion = getSerializableFromFolder(project, fullFolder, id, type, false, true, true, true, true);
}
int size = serializableAllVersion.size();

View File

@@ -2281,6 +2281,8 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
// set the project mappings url
System.setProperty("talend.mappings.url", url.toString()); // $NON-NLS-1$
}
// for new added mapping file, sync to project mapping folder
MetadataTalendType.syncNewMappingFileToProject();
} catch (SystemException e) {
// ignore
ExceptionHandler.process(e);

View File

@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<mapping>
<dbms product="DATABRICKS_DELTA_LAKE" id="databricks_delta_lake_id" label="Mapping Databricks Delta Lake" default="true">
<dbms product="DATABRICKS_DELTA_LAKE" id="databricks_delta_lake_id" label="Mapping Delta Lake" default="true">
<dbTypes>
<dbType type="SMALLINT" ignoreLen="true" ignorePre="true"/>
<dbType type="FLOAT" ignoreLen="true" ignorePre="true"/>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core.runtime</artifactId>

View File

@@ -102,7 +102,7 @@ public enum EDatabaseVersion4Drivers {
GREENPLUM(new DbVersion4Drivers(EDatabaseTypeName.GREENPLUM, "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$
// PSQL_V10(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v10", "V10", "postgresql-42.2.5.jar")),
PSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v9 and later", "V9_X", "postgresql-42.2.9.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
PSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v9 and later", "V9_X", "postgresql-42.2.14.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
PSQL_PRIOR_TO_V9(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "Prior to v9", "PRIOR_TO_V9", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
PLUSPSQL_PRIOR_TO_V9(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL,

View File

@@ -13,6 +13,7 @@
package org.talend.core.model.metadata;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
@@ -31,8 +32,11 @@ import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ProjectScope;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
@@ -488,6 +492,42 @@ public final class MetadataTalendType {
}
}
public static void syncNewMappingFileToProject() throws SystemException {
try {
File sysMappingFiles = new File(MetadataTalendType.getSystemForderURLOfMappingsFile().getPath());
IFolder projectMappingFolder = ResourceUtils.getProject(ProjectManager.getInstance().getCurrentProject())
.getFolder(MetadataTalendType.PROJECT_MAPPING_FOLDER);
File projectMappingFiles = projectMappingFolder.getFullPath().toFile();
if (sysMappingFiles.list().length == new File(projectMappingFolder.getLocationURI()).list().length) {
return;
}
for (File sysMapping : sysMappingFiles.listFiles()) {
IFile projectMapping = projectMappingFolder.getFile(sysMapping.getName());
if (!projectMapping.exists()) {
FileInputStream fis = null;
try {
fis = new FileInputStream(sysMapping);
projectMapping.create(fis, true, null);
} catch (CoreException coreExc) {
throw new SystemException(coreExc);
} finally {
if (fis != null) {
try {
fis.close();
} catch (IOException ioExc) {
throw new SystemException(ioExc);
}
}
}
}
}
} catch (Exception e) {
throw new SystemException(e);
}
}
/**
*
* Load db types and mapping with the current activated language (Java, Perl, ...).

View File

@@ -18,6 +18,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.widgets.Display;
@@ -71,6 +72,7 @@ import org.talend.core.model.utils.ContextParameterUtils;
import org.talend.core.model.utils.IDragAndDropServiceHandler;
import org.talend.core.runtime.i18n.Messages;
import org.talend.core.runtime.services.IGenericDBService;
import org.talend.core.runtime.services.IGenericWizardService;
import org.talend.core.utils.TalendQuoteUtils;
import org.talend.cwm.helper.ConnectionHelper;
import org.talend.cwm.helper.PackageHelper;
@@ -366,6 +368,21 @@ public class ComponentToRepositoryProperty {
if (para.getRepositoryValue().endsWith(EDatabaseTypeName.GENERAL_JDBC.getProduct())) {
connection.setDatabaseType(EDatabaseTypeName.GENERAL_JDBC.getProduct());
connection.setProductId(EDatabaseTypeName.GENERAL_JDBC.getProduct());
if (!node.getComponent().getDisplayName().equals(node.getComponent().getName())) {
// additional JDBC e.g. Delta Lake
if (GlobalServiceRegister.getDefault().isServiceRegistered(IGenericWizardService.class)) {
IGenericWizardService service = GlobalServiceRegister.getDefault()
.getService(IGenericWizardService.class);
if (service != null) {
String database = service.getDatabseNameByNode(node);
if (StringUtils.isNotBlank(database)) {
connection.setProductId(database);
}
}
}
}
}
// vertica output component have no TYPE ElementParameter .
if (para.getRepositoryValue().endsWith(EDatabaseTypeName.VERTICA.getProduct())) {

View File

@@ -813,13 +813,7 @@ public class RepositoryToComponentProperty {
* @return
*/
private static Object getMDMValue(MDMConnection connection, String value, IMetadataTable table) {
if ("MDM_VERSION".equals(value)) {//$NON-NLS-1$
if (connection.getVersion() == null || "".equals(connection.getVersion())) {
return MDMVersions.MDM_S56.getKey();
} else {
return connection.getVersion();
}
} else if ("MDMURL".equals(value)) { //$NON-NLS-1$
if ("MDMURL".equals(value)) { //$NON-NLS-1$
if (isContextMode(connection, connection.getServerUrl())) {
return connection.getServerUrl();
} else {

View File

@@ -46,7 +46,11 @@ import org.talend.core.model.process.IElementParameter;
import org.talend.core.model.process.INode;
import org.talend.core.model.process.INodeConnector;
import org.talend.core.model.process.IProcess;
import org.talend.core.model.process.IProcess2;
import org.talend.core.model.process.ProcessUtils;
import org.talend.core.model.properties.Property;
import org.talend.core.runtime.IAdditionalInfo;
import org.talend.core.runtime.projectsetting.RuntimeLineageManager;
import org.talend.designer.core.ICamelDesignerCoreService;
/**
@@ -866,6 +870,170 @@ public class NodeUtil {
}
throw new IllegalArgumentException();
}
public static String getRuntimeParameterValue(INode node, IElementParameter ep) {
if (EParameterFieldType.TABLE.equals(ep.getFieldType())) {
Map<String, IElementParameter> types = new HashMap<String, IElementParameter>();
Object[] itemsValue = ep.getListItemsValue();
if (itemsValue != null) {
for (Object o : itemsValue) {
IElementParameter cep = (IElementParameter) o;
if (cep.isShow(node.getElementParameters())) {
types.put(cep.getName(), cep);
}
}
}
List<Map<String, String>> lines = (List<Map<String, String>>) ElementParameterParser.getObjectValue(node,
"__" + ep.getName() + "__");
StringBuilder value = new StringBuilder();
// implement List & Map toString(), different is the value of Map
Iterator<Map<String, String>> linesIter = lines.iterator();
if (!linesIter.hasNext()) {
return "\"[]\"";
}
value.append("new StringBuilder().append(\"[");
for (;;) {
Map<String, String> columns = linesIter.next();
Iterator<Entry<String, String>> columnsIter = columns.entrySet().iterator();
value.append("{");
Entry<String, String> column = null;
boolean printedColumnExist = false;
while (columnsIter.hasNext()) {
column = columnsIter.next();
if (types.get(column.getKey()) == null) {
continue;
}
printedColumnExist = true;
value.append(column.getKey());
value.append("=\").append(");
value.append(getRuntimeParameterValue(column.getValue(), types.get(column.getKey()), true));
value.append(").append(\"");
if (columnsIter.hasNext()) {
value.append(", ");
}
}
if (printedColumnExist && column != null && (types.get(column.getKey()) == null)) {
value.setLength(value.length() - 2);
}
value.append("}");
if (!linesIter.hasNext()) {
return value.append("]\").toString()").toString();
}
value.append(",").append(" ");
}
} else {
String value = ElementParameterParser.getValue(node, "__" + ep.getName() + "__");
if (EParameterFieldType.TABLE_BY_ROW.equals(ep.getFieldType())) {
value = ep.getValue().toString();
}
return getRuntimeParameterValue(value, ep, false);
}
}
private static String getRuntimeParameterValue(String value, IElementParameter ep, boolean itemFromTable) {
if (value == null) {
value = "";
}
value = value.trim();
boolean isMemo = false;
List<EParameterFieldType> needRemoveCRLFList = Arrays.asList(EParameterFieldType.MEMO, EParameterFieldType.MEMO_JAVA,
EParameterFieldType.MEMO_SQL, EParameterFieldType.MEMO_IMPORT, EParameterFieldType.MEMO_MESSAGE);
if (needRemoveCRLFList.contains(ep.getFieldType())) {
isMemo = true;
value = value.replaceAll("[\r\n]", " ");
}
List<EParameterFieldType> needQuoteList = Arrays.asList(EParameterFieldType.CLOSED_LIST,
EParameterFieldType.COMPONENT_LIST, EParameterFieldType.COLUMN_LIST, EParameterFieldType.PREV_COLUMN_LIST,
EParameterFieldType.CONNECTION_LIST, EParameterFieldType.LOOKUP_COLUMN_LIST,
EParameterFieldType.CONTEXT_PARAM_NAME_LIST, EParameterFieldType.PROCESS_TYPE, EParameterFieldType.COLOR,
EParameterFieldType.TABLE_BY_ROW, EParameterFieldType.HADOOP_JARS_DIALOG, EParameterFieldType.UNIFIED_COMPONENTS);
List<EParameterFieldType> needQuoteListForItem = itemFromTable ? Arrays.asList(EParameterFieldType.SCHEMA_TYPE,
EParameterFieldType.SAP_SCHEMA_TYPE, EParameterFieldType.MODULE_LIST) : new ArrayList<EParameterFieldType>();
// TODO: add RAW attribute when SCHEMA_COLUMN generated by BASED_ON_SCHEMA
List<String> needQuoteListByName = Arrays.asList("SCHEMA_COLUMN");// SCHEMA_COLUMN for BASED_ON_SCHEMA="true"
if (needQuoteList.contains(ep.getFieldType()) || needQuoteListForItem.contains(ep.getFieldType())
|| needQuoteListByName.contains(ep.getName()) || ep.isRaw()) {
value = value.replaceAll("\\\\", "\\\\\\\\");
value = value.replaceAll("\\\"", "\\\\\\\"");
return "\"" + value + "\"";
}
if (itemFromTable) {
if ("*".equals(value)) {
return "\"" + value + "\"";
}
if (value.endsWith(";")) {
value = value.substring(0, value.length() - 1);
}
}
if("".equals(value) || "\"\"".equals(value)) {
return "\"\"";
} else if("null".equals(value)) {
return "(Object)null";
}
// copied it from Log4jFileUtil.javajet but need more comment for this script
if ("\"\\n\"".equals(value) || "\"\\r\"".equals(value) || "\"\\r\\n\"".equals(value)) {
// for the value is "\n" "\r" "\r\n"
return value.replaceAll("\\\\", "\\\\\\\\");
} else if ("\"\"\"".equals(value)) {
return "\"" + "\\" + "\"" + "\"";
} else if ("\"\"\\r\\n\"\"".equals(value)) {
return "\"\\\\r\\\\n\"";
} else if ("\"\"\\r\"\"".equals(value)) {
return "\"\\\\r\"";
} else if ("\"\"\\n\"\"".equals(value)) {
return "\"\\\\n\"";
}
// ftom 20141008 - patch to fix javajet compilation errors due to hard-coded studio TableEditor mechanism
// linked to BUILDIN properties checks, this item is a boolean set to TRUE or FALSE
// fix is just transforming into true or false to make logging OK
else if ("BUILDIN".equals(ep.getName())) {
return value.toLowerCase();
}
//suppose all memo fields are processed well already, no need to go though this with dangerous
if (!isMemo && !org.talend.core.model.utils.ContextParameterUtils.isDynamic(value)) {
if(value.length() > 1 && value.startsWith("\"") && value.endsWith("\"")) {
if(itemFromTable && "ARGS".equals(ep.getName())) {
value = value.substring(1, value.length());
value = value.substring(0, value.length() - 1);
return "\"" + checkStringQuotationMarks(value) + "\"";
} else {
//do nothing
return value;
}
} else {
return "\"" + checkStringQuotationMarks(value) + "\"";
}
}
//TODO remove it
if (value.endsWith("*")) {
return value.substring(0, value.length() - 1) + "\"*\"";
}
return value;
}
private static String checkStringQuotationMarks(String str) {
String result = str;
if (result.contains("\"")) {
result = result.replace("\"", "\\\"");
}
return result;
}
public static String getNormalizeParameterValue(INode node, IElementParameter ep) {
if (EParameterFieldType.TABLE.equals(ep.getFieldType())) {
@@ -1189,7 +1357,7 @@ public class NodeUtil {
} else if (ComponentCategory.CATEGORY_4_CAMEL.getName().equals(node.getComponent().getType())) {
INodeConnector tmp = null;
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICamelDesignerCoreService.class)) {
ICamelDesignerCoreService camelService = (ICamelDesignerCoreService) GlobalServiceRegister.getDefault()
ICamelDesignerCoreService camelService = GlobalServiceRegister.getDefault()
.getService(ICamelDesignerCoreService.class);
tmp = node.getConnectorFromType(camelService.getTargetConnectionType(node));
} else {
@@ -1232,4 +1400,37 @@ public class NodeUtil {
return true;
}
public static boolean isJobUsingRuntimeLineage(IProcess process) {
// Just support DI jobs now
boolean isSupport = isStandardJob(process) && !ProcessUtils.isTestContainer(process) && !isGuessSchemaJob(process);
if (!isSupport) {
return false;
}
RuntimeLineageManager runtimeLineageManager = new RuntimeLineageManager();
if (runtimeLineageManager.isUseRuntimeLineageAll()) {
return true;
}
if (runtimeLineageManager.getSelectedJobIds().isEmpty()) {
runtimeLineageManager.load();
}
return runtimeLineageManager.isRuntimeLineageSetting(process.getId());
}
public static boolean isStandardJob(IProcess process) {
if (process != null && process instanceof IProcess2) {
Property property = ((IProcess2) process).getProperty();
return property != null && property.getItem() != null
&& ComponentCategory.CATEGORY_4_DI.getName().equals(process.getComponentsType());
}
return false;
}
public static boolean isGuessSchemaJob(IProcess process) {
if (process != null && process instanceof IProcess2) {
Property property = ((IProcess2) process).getProperty();
return property != null && "ID".equals(property.getId()) && "Mock_job_for_Guess_schema".equals(property.getLabel()); //$NON-NLS-1$ //$NON-NLS-2$
}
return false;
}
}

View File

@@ -0,0 +1,156 @@
// ============================================================================
//
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core.runtime.projectsetting;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.talend.commons.exception.PersistenceException;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
import org.talend.commons.utils.workbench.resources.ResourceUtils;
import org.talend.repository.ProjectManager;
import org.talend.repository.model.RepositoryConstants;
import org.talend.repository.model.RepositoryNode;
import org.talend.utils.json.JSONObject;
import us.monoid.json.JSONArray;
/**
* created by hcyi on Jul 27, 2020
* Detailled comment
*
*/
public class RuntimeLineageManager {
public static final String RUNTIMELINEAGE_RESOURCES = "org.talend.runtimelineage"; //$NON-NLS-1$
public static final String RUNTIMELINEAGE_ALL = "runtimelineage.all"; //$NON-NLS-1$
public static final String RUNTIMELINEAGE_SELECTED = "runtimelineage.selected"; //$NON-NLS-1$
public static final String JOB_ID = "id"; //$NON-NLS-1$
public static final String RUNTIMELINEAGE_OUTPUT_PATH = "-Druntime.lineage.outputpath="; //$NON-NLS-1$
public static final String OUTPUT_PATH = "output.path"; //$NON-NLS-1$
private List<String> selectedJobIds = new ArrayList<String>();
private ProjectPreferenceManager prefManager = null;
private boolean useRuntimeLineageAll = false;
private String outputPath = null;
public RuntimeLineageManager() {
if (prefManager == null) {
prefManager = new ProjectPreferenceManager(RUNTIMELINEAGE_RESOURCES, true);
}
useRuntimeLineageAll = prefManager.getBoolean(RUNTIMELINEAGE_ALL);
outputPath = prefManager.getValue(OUTPUT_PATH);
}
public void load() {
try {
String jobsJsonStr = prefManager.getValue(RUNTIMELINEAGE_SELECTED);
if (StringUtils.isNotBlank(jobsJsonStr)) {
JSONArray jobsJsonArray = new JSONArray(jobsJsonStr);
for (int i = 0; i < jobsJsonArray.length(); i++) {
Object jobJsonObj = jobsJsonArray.get(i);
JSONObject jobJson = new JSONObject(String.valueOf(jobJsonObj));
Iterator sortedKeys = jobJson.sortedKeys();
String jobId = null;
while (sortedKeys.hasNext()) {
String key = (String) sortedKeys.next();
if (JOB_ID.equals(key)) {
jobId = jobJson.getString(key);
}
}
if (jobId != null) {
selectedJobIds.add(jobId);
}
}
}
} catch (Exception e) {
ExceptionHandler.process(e);
}
}
public void save(List<RepositoryNode> checkedObjects, boolean all) {
try {
JSONArray jobsJson = new JSONArray();
if (!all) {
for (RepositoryNode node : checkedObjects) {
JSONObject jobJson = new JSONObject();
if (!jobsJson.toString().contains(node.getId())) {
jobJson.put(JOB_ID, node.getId());
jobsJson.put(jobJson);
}
}
}
prefManager.setValue(RUNTIMELINEAGE_ALL, all);
prefManager.setValue(RUNTIMELINEAGE_SELECTED, jobsJson.toString());
prefManager.setValue(OUTPUT_PATH, outputPath);
prefManager.save();
} catch (Exception e) {
ExceptionHandler.process(e);
}
}
public boolean isRuntimeLineageSetting(String id) {
return selectedJobIds.contains(id);
}
public boolean isRuntimeLineagePrefsExist() {
try {
IProject project = ResourceUtils.getProject(ProjectManager.getInstance().getCurrentProject());
IFolder prefSettingFolder = ResourceUtils.getFolder(project, RepositoryConstants.SETTING_DIRECTORY, false);
IFile presRuntimeLineageFile = prefSettingFolder.getFile(RUNTIMELINEAGE_RESOURCES + ".prefs"); //$NON-NLS-1$
if (presRuntimeLineageFile.exists()) {
return true;
}
} catch (PersistenceException e) {
e.printStackTrace();
}
return false;
}
public boolean isUseRuntimeLineageAll() {
return this.useRuntimeLineageAll;
}
public ProjectPreferenceManager getPrefManager() {
return this.prefManager;
}
public List<String> getSelectedJobIds() {
return this.selectedJobIds;
}
public void setSelectedJobIds(List<String> selectedJobIds) {
this.selectedJobIds = selectedJobIds;
}
public String getOutputPath() {
return this.outputPath;
}
public void setOutputPath(String outputPath) {
this.outputPath = outputPath;
}
}

View File

@@ -18,6 +18,7 @@ import java.util.Map;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.IService;
import org.talend.core.model.components.IComponent;
import org.talend.core.model.metadata.builder.connection.Connection;
import org.talend.core.model.process.IElementParameter;
import org.talend.core.model.process.INode;
@@ -46,6 +47,8 @@ public interface IGenericService extends IService {
public boolean isTcompv0(IComponent component);
public void validateGenericConnection(Connection conn) throws Exception;
public static IGenericService getService() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IGenericService.class)) {
return GlobalServiceRegister.getDefault().getService(IGenericService.class);

View File

@@ -22,9 +22,11 @@ import org.talend.components.api.properties.ComponentProperties;
import org.talend.core.IService;
import org.talend.core.model.metadata.IMetadataTable;
import org.talend.core.model.metadata.builder.connection.Connection;
import org.talend.core.model.metadata.builder.connection.DatabaseConnection;
import org.talend.core.model.metadata.builder.connection.MetadataTable;
import org.talend.core.model.process.EComponentCategory;
import org.talend.core.model.process.Element;
import org.talend.core.model.process.IElement;
import org.talend.core.model.process.INode;
import org.talend.core.model.properties.Item;
import org.talend.core.model.repository.ERepositoryObjectType;
@@ -146,4 +148,14 @@ public interface IGenericWizardService extends IService {
* @return the default action which will be invoked when double click the node.
*/
public ITreeContextualAction getDefaultAction(RepositoryNode node);
public void initAdditionalJDBCRepositoryObjType();
public boolean getIfAdditionalJDBCDBType(String dbType);
public void initAdditonalJDBCConnectionValue(DatabaseConnection connection, Composite dynamicForm, String dbType,
String propertyId);
public String getDatabseNameByNode(IElement node);
}

View File

@@ -0,0 +1,83 @@
// ============================================================================
//
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core.runtime.util;
import java.io.File;
import java.io.IOException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.service.IUpdateService;
import org.talend.utils.io.FilesUtils;
public class SharedStudioUtils {
public static final String FILE_EXTRA_FEATURE_INDEX = "extra_feature.index"; //$NON-NLS-1$
public static final String SIGNATURE_FILE_NAME_SUFFIX = ".sig"; //$NON-NLS-1$
public static boolean updateExtraFeatureFile() {
File userConfigFolder = new File(Platform.getConfigurationLocation().getURL().getPath());
File studioConfigFolder = new File(Platform.getInstallLocation().getURL().getPath(), "configuration");//$NON-NLS-1$
if (!userConfigFolder.getAbsolutePath().equals(studioConfigFolder.getAbsolutePath())) {
File studioExtraFile = new File(studioConfigFolder, FILE_EXTRA_FEATURE_INDEX);
File studioExtraSignFile = new File(studioConfigFolder, FILE_EXTRA_FEATURE_INDEX + SIGNATURE_FILE_NAME_SUFFIX);
File userExtraFile = new File(userConfigFolder, FILE_EXTRA_FEATURE_INDEX);
File userExtraSignFile = new File(userConfigFolder, FILE_EXTRA_FEATURE_INDEX + SIGNATURE_FILE_NAME_SUFFIX);
boolean isNeedUpdate = false;
if (!studioExtraSignFile.exists() && userExtraSignFile.exists()) {
userExtraSignFile.delete();
if (userExtraFile.exists()) {
userExtraFile.delete();
}
return true;
} else if (studioExtraSignFile.exists()) {
isNeedUpdate = true;
}
if (isNeedUpdate) {
try {
FilesUtils.copyFile(studioExtraFile, userExtraFile);
FilesUtils.copyFile(studioExtraSignFile, userExtraSignFile);
} catch (IOException ex) {
ExceptionHandler.process(ex);
}
return true;
}
}
return false;
}
public static boolean isSharedStudioMode() {
File configFolder = new File (Platform.getConfigurationLocation().getURL().getFile());
File studioFolder = new File (Platform.getInstallLocation().getURL().getFile());
if (configFolder != null && studioFolder != null && configFolder.getParentFile() != null
&& configFolder.getParentFile().getAbsolutePath().equals(studioFolder.getAbsolutePath())) {
return false;
}
return true;
}
public static boolean installedPatch() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IUpdateService.class)) {
IUpdateService updateService = GlobalServiceRegister.getDefault().getService(IUpdateService.class);
try {
return updateService.syncSharedStudioLibraryInPatch(new NullProgressMonitor());
} catch (Exception e) {
ExceptionHandler.process(e);
}
}
return false;
}
}

View File

@@ -12,10 +12,12 @@
// ============================================================================
package org.talend.core.service;
import org.eclipse.core.runtime.IProgressMonitor;
import org.talend.core.IService;
public interface IUpdateService extends IService {
boolean checkComponentNexusUpdate();
public boolean syncSharedStudioLibraryInPatch(IProgressMonitor monitor) throws Exception;
}

View File

@@ -13,6 +13,7 @@
package org.talend.core.ui;
import org.talend.core.IService;
import org.talend.core.runtime.maven.MavenArtifact;
/**
* @author hwang
@@ -21,5 +22,7 @@ import org.talend.core.IService;
public interface IInstalledPatchService extends IService {
public String getLatestInstalledVersion(boolean isBar);
public MavenArtifact getLastIntalledP2Patch();
}

View File

@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="lib/jna-platform.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jna.jar"/>
<classpathentry exported="true" kind="lib" path="lib/oshi-core.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/main/java"/>

View File

@@ -33,7 +33,8 @@ Require-Bundle: org.apache.commons.lang,
org.talend.core,
org.apache.commons.io,
org.apache.httpcomponents.httpcore,
org.apache.httpcomponents.httpclient
org.apache.httpcomponents.httpclient,
org.slf4j.api
Import-Package: org.eclipse.jdt.internal.ui.workingsets
Export-Package: org.talend.core.ui,
org.talend.core.ui.actions,
@@ -81,3 +82,7 @@ Bundle-Vendor: .Talend SA.
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.talend.core.ui.CoreUIPlugin
Bundle-Localization: plugin
Bundle-ClassPath: lib/jna-platform.jar,
lib/jna.jar,
lib/oshi-core.jar,
.

View File

@@ -5,4 +5,7 @@ bin.includes = .,\
icons/,\
plugin.properties,\
schema/,\
META-INF/
META-INF/,\
lib/jna-platform.jar,\
lib/jna.jar,\
lib/oshi-core.jar

View File

@@ -24,6 +24,12 @@
id="org.talend.core.runtime.defaultProvider"
name="default">
</provider>
<provider
collector="org.talend.core.ui.token.PerformanceTokenCollector"
description="collect such as hardware info, I/O info, startup time"
id="org.talend.core.ui.token.PerformanceProvider"
name="performance">
</provider>
</extension>
<extension

View File

@@ -4,9 +4,47 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core.ui</artifactId>
<packaging>eclipse-plugin</packaging>
<dependencies>
<dependency>
<groupId>com.github.oshi</groupId>
<artifactId>oshi-core</artifactId>
<version>5.2.5</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.0.2</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<includeScope>runtime</includeScope>
<outputDirectory>${project.basedir}/lib</outputDirectory>
<stripVersion>true</stripVersion>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -81,7 +81,7 @@ public class DefaultTokenCollector extends AbstractTokenCollector {
jsonObject.put("os.arch", System.getProperty("os.arch"));
jsonObject.put("os.version", System.getProperty("os.version"));
tokenStudioObject.put(OS.getKey(), jsonObject);
final IPreferenceStore preferenceStore = CoreUIPlugin.getDefault().getPreferenceStore();
long syncNb = preferenceStore.getLong(COLLECTOR_SYNC_NB);
tokenStudioObject.put(SYNC_NB.getKey(), syncNb);
@@ -91,6 +91,7 @@ public class DefaultTokenCollector extends AbstractTokenCollector {
} else {
tokenStudioObject.put(STOP_COLLECTOR.getKey(), "0"); //$NON-NLS-1$
}
return tokenStudioObject;
}
}

View File

@@ -0,0 +1,83 @@
// ============================================================================
//
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core.ui.token;
import java.util.Properties;
import org.talend.commons.exception.CommonExceptionHandler;
import org.talend.commons.utils.time.PerformanceStatisticUtil;
import org.talend.commons.utils.time.PerformanceStatisticUtil.StatisticKeys;
import oshi.SystemInfo;
import oshi.hardware.Baseboard;
import oshi.hardware.CentralProcessor;
import oshi.hardware.CentralProcessor.ProcessorIdentifier;
import oshi.hardware.ComputerSystem;
import oshi.hardware.GlobalMemory;
import oshi.hardware.HardwareAbstractionLayer;
import us.monoid.json.JSONObject;
/**
* DOC sbliu class global comment. Detailled comment
*/
public class PerformanceTokenCollector extends AbstractTokenCollector {
/* (non-Javadoc)
* @see org.talend.core.ui.token.AbstractTokenCollector#collect()
*/
@Override
public JSONObject collect() throws Exception {
checkAndWait();
JSONObject tokenStudioObject = new JSONObject();
//
JSONObject jsonObjectHDInfo = new JSONObject();
SystemInfo si = new SystemInfo();
HardwareAbstractionLayer hal = si.getHardware();
CentralProcessor processor = hal.getProcessor();
ProcessorIdentifier processorIdentifier = processor.getProcessorIdentifier();
ComputerSystem cs = hal.getComputerSystem();//computer system
Baseboard baseboard = cs.getBaseboard();//motherboard
GlobalMemory memory = hal.getMemory();
jsonObjectHDInfo.put("computer vendor", cs.getManufacturer());
jsonObjectHDInfo.put("board vendor", baseboard.getManufacturer());
jsonObjectHDInfo.put("board version", baseboard.getVersion());
jsonObjectHDInfo.put("processor", processorIdentifier.getName());
jsonObjectHDInfo.put("physical memory", Math.ceil((memory.getTotal() /(1024d*1024*1024))) + "GB");
tokenStudioObject.put("hardware", jsonObjectHDInfo);
//
JSONObject jsonObjectIOInfo = new JSONObject();
Properties props = PerformanceStatisticUtil.read(PerformanceStatisticUtil.getRecordingFile(),false);
jsonObjectIOInfo.put(StatisticKeys.STARTUP_AVERAGE.get(), props.getProperty(StatisticKeys.STARTUP_AVERAGE.get()));
jsonObjectIOInfo.put(StatisticKeys.STARTUP_MAX.get(), props.getProperty(StatisticKeys.STARTUP_MAX.get()));
jsonObjectIOInfo.put(StatisticKeys.IO_R_MB_SEC.get(), props.getProperty(StatisticKeys.IO_R_MB_SEC.get()));
jsonObjectIOInfo.put(StatisticKeys.IO_R_AVERAGE_MB_SEC.get(), props.getProperty(StatisticKeys.IO_R_AVERAGE_MB_SEC.get()));
jsonObjectIOInfo.put(StatisticKeys.IO_W_MB_SEC.get(), props.getProperty(StatisticKeys.IO_W_MB_SEC.get()));
jsonObjectIOInfo.put(StatisticKeys.IO_W_AVERAGE_MB_SEC.get(), props.getProperty(StatisticKeys.IO_W_AVERAGE_MB_SEC.get()));
tokenStudioObject.put("performance", jsonObjectIOInfo);
return tokenStudioObject;
}
private void checkAndWait() {
try {
PerformanceStatisticUtil.waitUntilFinish();
} catch (InterruptedException e) {
CommonExceptionHandler.log(e.getMessage());
}
}
}

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core</artifactId>

View File

@@ -462,19 +462,25 @@ public class TalendTextUtils {
return TalendQuoteUtils.removeQuotes(text);
}
/**
* @Deprecated use org.talend.utils.string.StudioContextUtils.removeQuotesIfExist instead
*/
@Deprecated
public static String removeQuotesIfExist(String text) {
return TalendQuoteUtils.removeQuotesIfExist(text);
return org.talend.utils.string.StudioContextUtils.removeQuotesIfExist(text,
org.talend.utils.string.StudioContextUtils.QUOTATION_MARK);
}
/**
* qzhang Comment method "removeQuotes".
* @Deprecated use org.talend.utils.string.StudioContextUtils.removeQuotes
*
* @param text
* @param quotation_mark2
* @return
*/
@Deprecated
public static String removeQuotes(String text, String quotation) {
return TalendQuoteUtils.removeQuotes(text, quotation);
return org.talend.utils.string.StudioContextUtils.removeQuotes(text, quotation);
}
public static boolean isEnclosed(String text) {
@@ -489,41 +495,12 @@ public class TalendTextUtils {
return TalendQuoteUtils.getStringDeclare();
}
/**
* @Deprecated use org.talend.utils.string.StudioContextUtils.encodeValue instead
*/
@Deprecated
public static String trimParameter(String value) {
if (value == null) {
return null;
}
int length = value.length();
String result = removeQuotes(value);
if (length > 1
&& (((value.startsWith("\"") && value.endsWith("\""))) || (value.startsWith("\'") && value.endsWith("\'")))) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
result = value.substring(1, length - 1);
if (result.contains("\\")) { //$NON-NLS-1$
result = result.replaceAll("\\\\n", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
result = result.replaceAll("\\\\b", "\b"); //$NON-NLS-1$ //$NON-NLS-2$
result = result.replaceAll("\\\\f", "\f"); //$NON-NLS-1$ //$NON-NLS-2$
result = result.replaceAll("\\\\r", "\r"); //$NON-NLS-1$ //$NON-NLS-2$
result = result.replaceAll("\\\\t", "\t"); //$NON-NLS-1$ //$NON-NLS-2$
result = result.replaceAll("\\\\\"", "\""); //$NON-NLS-1$ //$NON-NLS-2$
result = result.replaceAll("\\\\\\\\", "\\\\"); //$NON-NLS-1$ //$NON-NLS-2$
// handle unicode
if (result.contains("\\u")) {
for (int indexStart = 0; result.indexOf("\\u", indexStart) >= 0; indexStart = result.indexOf("\\u", indexStart)) {
if (result.indexOf("\\u", indexStart) + 5 <= result.length()) { //$NON-NLS-1$
int unicodeStart = result.indexOf("\\u"); //$NON-NLS-1$
int unicodeEnd = unicodeStart + 5;
result = result.substring(0, Math.max(0, unicodeStart))
+ StringEscapeUtils.unescapeJava(result.substring(unicodeStart, unicodeEnd + 1))
+ result.substring(Math.min(unicodeEnd + 1, result.length()), result.length());
}
}
}
}
}
return result;
return org.talend.utils.string.StudioContextUtils.encodeValue(value);
}
public static String getQuoteChar() {

View File

@@ -23,9 +23,11 @@ import org.eclipse.emf.common.util.URI;
import org.osgi.service.prefs.BackingStoreException;
import org.talend.commons.exception.PersistenceException;
import org.talend.commons.exception.SystemException;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.IService;
import org.talend.core.model.general.Project;
import org.talend.core.model.process.INode;
import org.talend.core.model.properties.Property;
import org.talend.core.runtime.maven.MavenArtifact;
/**
@@ -78,4 +80,18 @@ public interface ICoreTisService extends IService {
Set<String> getComponentBlackList();
public void afterImport (Property property) throws PersistenceException;
boolean hasNewPatchInPatchesFolder();
boolean isDefaultLicenseAndProjectType();
void refreshPatchesFolderCache();
static ICoreTisService get() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreTisService.class)) {
return GlobalServiceRegister.getDefault().getService(ICoreTisService.class);
}
return null;
}
}

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.cwm.mip.edit</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.cwm.mip.editor</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.cwm.mip</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.datatools.xml</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.maven.aether</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.maven.tos</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>studio-maven-repository-tos</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>build-helper-maven-plugin-3-0-0-tos</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>studio-maven-repository-tos</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>karaf-maven-plugin-4-2-4-tos</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>studio-maven-repository-tos</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>maven-bundle-plugin-2-3-7-tos</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>studio-maven-repository-tos</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>maven-bundle-plugin-2-5-3-tos</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>studio-maven-repository-tos</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>maven-install-plugin-2-5-1-tos</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>studio-maven-repository-tos</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>talend-ci-osgihelper-maven-plugin-tos</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>studio-maven-repository-tos</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>talend-compiler-plugin-tos</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>studio-maven-repository-tos</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../</relativePath>
</parent>
<artifactId>studio-maven-repository-build</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>studio-maven-repository-tos</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../</relativePath>
</parent>
<artifactId>studio-components-dependencies</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../../../../</relativePath>
</parent>
<artifactId>studio-maven-repository-tos</artifactId>
@@ -16,7 +16,7 @@
<module>tacokit/pom.xml</module>
<module>tcompv1/pom.xml</module>
<module>surefire/pom.xml</module>
<module>zip/pom.xml</module>
<module>zip/pom.xml</module>
</modules>
<properties>
<m2.fasterxml.jackson.version>2.10.1</m2.fasterxml.jackson.version>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>studio-maven-repository-tos</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../</relativePath>
</parent>
<artifactId>studio-surefire-dependencies</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>studio-maven-repository-tos</artifactId>
<version>7.4.1-M2</version>
<version>7.4.1-M3</version>
<relativePath>../</relativePath>
</parent>
<artifactId>studio-tacokit-dependencies</artifactId>

Some files were not shown because too many files have changed in this diff Show More