Compare commits

..

25 Commits

Author SHA1 Message Date
undx
1418263629 fix(TCOMP-2150): fix guessSchema for processors 2022-06-03 15:24:03 +02:00
pyzhou
8767e96bcd fix(TDI-48069):tRedshiftBulkExec wrong version (#7608) 2022-06-02 19:39:27 +08:00
Jill Yan
26dcedadef fix compile error (#7605)
Co-authored-by: jillyan <yan955599@gmail.com>
2022-06-02 11:00:48 +08:00
hcyi
58a39c8fb8 feat(TUP-34854):Setup custom JKS for signature by System Property (#7382)
* feat(TUP-34854):Setup custom JKS for signature by System Property

* feat(TUP-34854):improve for Setup custom JKS for signature by System
Property

* feat(TUP-34855):Setup custom JKS for job signature from GUI.

* feat(TUP-34855):Setup custom JKS for job signature from GUI.

* feat(TUP-34855):Setup custom JKS for job signature from GUI.
2022-06-02 10:58:37 +08:00
Chao MENG
7cf738b911 Cmeng/fix/tup 35585 zero install tck (#7568)
* fix(TUP-35585): Zero install fail to install custom tck component in
801.
https://jira.talendforge.org/browse/TUP-35585
2022-06-02 09:55:26 +08:00
Jill Yan
42b7a46dee APPINT-34618 add mssql driver to import-package if used in child job (#7587)
Co-authored-by: jillyan <yan955599@gmail.com>
2022-06-02 09:10:13 +08:00
Jane Ding
70314bd2b4 feat(TUP-35301):[JDBC TCK]: Support MODULE_LIST field for studio tck (#7517) (#7599)
* feat(TUP-35301):[JDBC TCK]: Support MODULE_LIST field for studio tck
plugin
https://jira.talendforge.org/browse/TUP-35301

* feat(TUP-35301):[JDBC TCK]: Support MODULE_LIST field for studio tck
plugin
https://jira.talendforge.org/browse/TUP-35301

* feat(TUP-35301):[JDBC TCK]: Support MODULE_LIST field for studio tck
plugin
https://jira.talendforge.org/browse/TUP-35301

* feat(TUP-35301):[JDBC TCK]: Support MODULE_LIST field for studio tck
plugin
https://jira.talendforge.org/browse/TUP-35301
fix(TUP-35716):[bug] new JDBC driver column will be always set to mvn
after reopen wizard
https://jira.talendforge.org/browse/TUP-35716
driver table contains path=mvn:xxxx/xxxx

* feat(TUP-35301):[JDBC TCK]: Support MODULE_LIST field for studio tck
plugin
https://jira.talendforge.org/browse/TUP-35301
2022-06-01 16:22:23 +08:00
zshen-talend
d42dc6e42e test to avoid project name lowercase (#7598) 2022-06-01 16:14:15 +08:00
wang wei
b824673188 fix(TDI-47803): Compile error after applying Patch_20220107_R2022-01_v1-7.3.1 (#7474) (#7597) 2022-06-01 11:42:11 +08:00
jiezhang-tlnd
c34725bbef feat(TUP-28853)tRunjob is ok, need handle joblet (#7484) (#7594)
* feat(TUP-28853)tRunjob is ok, need handle joblet

* generation document is ok from standard process

* format code

* reduce the same item to improve performance

* Remove duplicates to improve performance and fix preview picture missing
issue

* handle latest version on tRunjob

* handle version for joblet

* hanlde version

* improve performance with VersionList

* handle BD process part

* handle BD process

* handle route process

* code formate

* format code
2022-05-31 17:41:50 +08:00
Dmytro Sylaiev
f517e56b83 feat(TDI-44884): Correct missing label change (#7593) 2022-05-31 11:52:32 +03:00
Oleksandr Zhelezniak
9ed98d4f9d fix(TDI-47895): oracle input float length (#7545)
* force to use 38 as length for NUMBER (FLOAT) in oracle when getPrecision returns value bigger than 38
* getPrecision for Float Oracle returns 126.
* It's expected binary precision for FLOAT Oracle type. The decimal precision for it is 38.
2022-05-31 11:03:01 +03:00
bhe-talendbj
7a9ff69e14 chore(TUP-35685): upgrade database driver version (#7576) (#7592) 2022-05-31 14:35:00 +08:00
Chao MENG
8acb79fbd4 fix(TUP-35633): 'Use local Update settings' checkbox should not be (#7577)
fix(TUP-35633): 'Use local Update settings' checkbox should not be displayed in studio update settings when TMC update config is not set
for the project.
https://jira.talendforge.org/browse/TUP-35633
2022-05-31 10:20:33 +08:00
Oleksandr Zhelezniak
04b7d3251e fix(TDI-45946): greenplum mapping (#7514)
* add mapping type in XML for input and output
* migration task, replace mapping type from postgres_id to greenplum_id
2022-05-30 16:09:33 +03:00
Alexiane Yvonet
e64b5d2e23 Add localized files (#7588)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-05-30 15:41:58 +08:00
jzhangbj
ed74850972 Add localized files (#7583)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-05-30 10:12:14 +08:00
tsasada-talend
caed4cf474 Add localized files (#7582)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-05-30 09:41:38 +08:00
sponomarova
971e661a0e feat(TBD-13581): Dataproc 2.x support for di jobs (#7488) (#7537) 2022-05-27 13:29:11 +03:00
Zhiwei Xue
8a87f281f9 fix(TUP-35613):Can't display the dataset settings of AzureAdlsGen2 (#7581)
metadata wizard with CSV format in default GUI size
2022-05-27 10:35:32 +08:00
Chao MENG
c54b8ed321 fix(TUP-35608): Stat and Logs screen - Database connection dropdown incorrect (#7559)
* fix(TUP-35608): Stat and Logs screen - Database connection dropdown
incorrect
https://jira.talendforge.org/browse/TUP-35608
2022-05-27 09:52:15 +08:00
hcyi
62301ff268 fix(TUP-35326):[JDBC TCK]: can't pass table value to runtime when use existed connection (#7506)
* fix(TUP-35326):[JDBC TCK]: can't pass table value to runtime when use
existed connection

* fix(TUP-35326):[JDBC TCK]: can't pass table value to runtime when use
existed connection
2022-05-26 15:29:09 +08:00
Zhiwei Xue
1f2d1e0820 fix(TUP-31233):Routine pom is not updated after installed the required (#7548)
* fix(TUP-31233):Routine pom is not updated after installed the required
jar of user routine

* fix(TUP-31233):Routine pom is not updated after installed the required
jar of user routine

* fix(TUP-31233):Routine pom is not updated after installed the required
jar of user routine
2022-05-25 18:05:03 +08:00
hzhao-talendbj
9eb840b026 Revert "chore(TUP-34757): Add a getOriginalName() in IConnection (#7301)" (#7563)
This reverts commit 5c9a80937a.
2022-05-25 17:28:19 +08:00
Dmytro Sylaiev
bc5d868c62 feat(TDI-44884): Change the label of Sybase SA (#7558) 2022-05-24 15:53:43 +03:00
104 changed files with 1624 additions and 346 deletions

View File

@@ -126,9 +126,9 @@ SERVICE_ACCESS_SECURITY_GROUP.NAME=\u30B5\u30FC\u30D3\u30B9\u30A2\u30AF\u30BB\u3
CLUSTER_FINAL_ID.NAME=\u30AF\u30E9\u30B9\u30BF\u30FCID
CLUSTER_FINAL_NAME.NAME=\u30AF\u30E9\u30B9\u30BF\u30FC\u540D
PREDICATES.NAME=\u8FF0\u8A9E
PREDICATES.ITEM.RUNNING=\u3059\u3079\u3066\u306E\u30AF\u30E9\u30B9\u30BF\u30FC\u3092\u8D77\u52D5
PREDICATES.ITEM.RUNNING_WITH_NAME=\u4E8B\u524D\u306B\u5B9A\u7FA9\u6E08\u307F\u306E\u540D\u524D\u3067\u30AF\u30E9\u30B9\u30BF\u30FC\u3092\u8D77\u52D5
PREDICATES.ITEM.RUNNING_WITH_ID=\u4E8B\u524D\u306B\u5B9A\u7FA9\u6E08\u307F\u306EID\u3067\u30AF\u30E9\u30B9\u30BF\u30FC\u3092\u8D77\u52D5
PREDICATES.ITEM.RUNNING=\u5B9F\u884C\u4E2D\u306E\u3059\u3079\u3066\u306E\u30AF\u30E9\u30B9\u30BF\u30FC
PREDICATES.ITEM.RUNNING_WITH_NAME=\u4E8B\u524D\u5B9A\u7FA9\u6E08\u307F\u306E\u540D\u524D\u3067\u5B9F\u884C\u4E2D\u306E\u3059\u3079\u3066\u306E\u30AF\u30E9\u30B9\u30BF\u30FC
PREDICATES.ITEM.RUNNING_WITH_ID=\u4E8B\u524D\u5B9A\u7FA9\u6E08\u307F\u306EID\u3067\u5B9F\u884C\u4E2D\u306E\u30AF\u30E9\u30B9\u30BF\u30FC
NAME_OF_CLUSTER.NAME=\u30AF\u30E9\u30B9\u30BF\u30FC\u540D
ID_OF_CLUSTER.NAME=\u30AF\u30E9\u30B9\u30BF\u30FCID
WAIT_FOR_CLUSTER_READY.NAME=\u30AF\u30E9\u30B9\u30BF\u30FC\u306E\u6E96\u5099\u304C\u3067\u304D\u308B\u307E\u3067\u5F85\u6A5F

View File

@@ -132,7 +132,7 @@ MSSQL_DRIVER.ITEM.MSSQL_PROP=Microsoft
DB_SYBASE_VERSION.NAME=DB Version
DB_SYBASE_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_SYBASE_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_SYBASE_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_SYBASE_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere) and above
ACCOUNT.NAME=Account
ROLE.NAME=Role
ENFORCE_DELIMITED_IDENTIFIERS.NAME=Enforce database delimited identifiers

View File

@@ -59,7 +59,7 @@ MSSQL_ACTIVE_DIR_AUTH.NAME=Azure Active Directory\u3092\u4F7F\u3063\u3066\u8A8D\
RUNNING_MODE.ITEM.HSQLDB_INPROGRESS_PERSISTENT=\u51E6\u7406\u7D99\u7D9A\u4E2D\u306EHSQLD\uFF42
RUNNING_MODE.ITEM.HSQLDB_SERVER=HSQLDb\u30B5\u30FC\u30D0
RUNNING_MODE.ITEM.HSQLDB_WEBSERVER=HSQLDb Web\u30B5\u30FC\u30D0
RUNNING_MODE.NAME=\u30E9\u30F3\u30CB\u30F3\u30B0\u30E2\u30FC\u30C9
RUNNING_MODE.NAME=\u5B9F\u884C\u30E2\u30FC\u30C9
LOCAL_SERVICE_NAME.NAME=\u30ED\u30FC\u30AB\u30EB\u30B5\u30FC\u30D3\u30B9\u540D
SCHEMA_DB.NAME=\u30B9\u30AD\u30FC\u30DE
TABLE.NAME=\u30C6\u30FC\u30D6\u30EB\u540D

View File

@@ -20,4 +20,4 @@ CONNECTION.NAME=Component List
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere) and above

View File

@@ -20,4 +20,4 @@ CONNECTION.NAME=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u30EA\u30B9\u30C8
DB_VERSION.NAME=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30D0\u30FC\u30B8\u30E7\u30F3
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)\u4EE5\u964D

View File

@@ -20,4 +20,4 @@ CONNECTION.NAME=\u7EC4\u4EF6\u5217\u8868
DB_VERSION.NAME=\u6570\u636E\u5E93\u7248\u672C
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere) \u53CA\u66F4\u9AD8\u7248\u672C

View File

@@ -46,11 +46,11 @@ TRUST_ALL_SERVER.NAME=Faire confiance \u00E0 tous les serveurs
SAVE_COOKIE.NAME=Sauvegarder le cookie
READ_COOKIE.NAME=Lire le cookie
COOKIE_DIR.NAME=R\u00E9pertoire des cookies
COOKIE_POLICY.NAME=Politique relative aux cookies
COOKIE_POLICY.NAME=Politique de cookies (d\u00E9pr\u00E9ci\u00E9e)
COOKIE_POLICY.ITEM.DEFAULT=D\u00E9faut
COOKIE_POLICY.ITEM.BROWSER_COMPATIBILITY=BROWSER_COMPATIBILITY
COOKIE_POLICY.ITEM.BROWSER_COMPATIBILITY=BROWSER_COMPATIBILITY (d\u00E9pr\u00E9ci\u00E9e)
COOKIE_POLICY.ITEM.NETSCAPE=NETSCAPE
COOKIE_POLICY.ITEM.RFC_2109=RFC_2109
COOKIE_POLICY.ITEM.RFC_2109=RFC_2109 (d\u00E9pr\u00E9ci\u00E9e)
SINGLE_COOKIE.NAME=En-t\u00EAte du cookie
ADD_HEADER.NAME=Ajouter un en-t\u00EAte
HEADERS.NAME=En-t\u00EAtes

View File

@@ -46,11 +46,11 @@ TRUST_ALL_SERVER.NAME=\u4FE1\u4EFB\u6240\u6709\u670D\u52A1\u5668
SAVE_COOKIE.NAME=\u4FDD\u5B58 cookie
READ_COOKIE.NAME=\u8BFB\u53D6 cookie
COOKIE_DIR.NAME=Cookie\u76EE\u5F55
COOKIE_POLICY.NAME=Cookie\u7B56\u7565
COOKIE_POLICY.NAME=Cookie \u7B56\u7565 (\u5DF2\u5F03\u7528)
COOKIE_POLICY.ITEM.DEFAULT=\u9ED8\u8BA4
COOKIE_POLICY.ITEM.BROWSER_COMPATIBILITY=\u6D4F\u89C8\u5668\u517C\u5BB9\u6027
COOKIE_POLICY.ITEM.BROWSER_COMPATIBILITY=BROWSER_COMPATIBILITY (\u5DF2\u5F03\u7528)
COOKIE_POLICY.ITEM.NETSCAPE=NETSCAPE
COOKIE_POLICY.ITEM.RFC_2109=RFC_2109
COOKIE_POLICY.ITEM.RFC_2109=RFC_2109 (\u5DF2\u5F03\u7528)
SINGLE_COOKIE.NAME=\u5355\u4E2A cookie \u6807\u5934
ADD_HEADER.NAME=\u6DFB\u52A0\u6807\u9898
HEADERS.NAME=\u6587\u4EF6\u5934

View File

@@ -118,6 +118,8 @@
<PARAMETER NAME="MAPPING" FIELD="MAPPING_TYPE" NUM_ROW="16"
SHOW="false">
<DEFAULT IF="DB_DRIVER=='GREENPLUM'">greenplum_id</DEFAULT>
<DEFAULT IF="DB_DRIVER=='POSTGRESQL'">postgres_id</DEFAULT>
<DEFAULT>postgres_id</DEFAULT>
</PARAMETER>

View File

@@ -42,6 +42,8 @@
NUM_ROW="18"
SHOW="false"
>
<DEFAULT IF="DB_DRIVER=='GREENPLUM'">greenplum_id</DEFAULT>
<DEFAULT IF="DB_DRIVER=='POSTGRESQL'">postgres_id</DEFAULT>
<DEFAULT>postgres_id</DEFAULT>
</PARAMETER>

View File

@@ -182,6 +182,8 @@
NUM_ROW="10"
SHOW="false"
>
<DEFAULT IF="DB_DRIVER=='GREENPLUM'">greenplum_id</DEFAULT>
<DEFAULT IF="DB_DRIVER=='POSTGRESQL'">postgres_id</DEFAULT>
<DEFAULT>postgres_id</DEFAULT>
</PARAMETER>

View File

@@ -213,6 +213,8 @@
NUM_ROW="10"
SHOW="false"
>
<DEFAULT IF="DB_DRIVER=='GREENPLUM'">greenplum_id</DEFAULT>
<DEFAULT IF="DB_DRIVER=='POSTGRESQL'">postgres_id</DEFAULT>
<DEFAULT>postgres_id</DEFAULT>
</PARAMETER>

View File

@@ -158,7 +158,9 @@
FIELD="MAPPING_TYPE"
NUM_ROW="18"
SHOW="false"
>
>
<DEFAULT IF="DB_DRIVER=='GREENPLUM'">greenplum_id</DEFAULT>
<DEFAULT IF="DB_DRIVER=='POSTGRESQL'">postgres_id</DEFAULT>
<DEFAULT>postgres_id</DEFAULT>
</PARAMETER>

View File

@@ -13,7 +13,7 @@ RUNNING_MODE.ITEM.HSQLDB_INPROGRESS_TRANSIENT=\u4E00\u6642\u51E6\u7406\u4E2D\u30
RUNNING_MODE.ITEM.HSQLDB_IN_MEMORY=HSQLDb In Memory
RUNNING_MODE.ITEM.HSQLDB_SERVER=HSQLDb\u30B5\u30FC\u30D0
RUNNING_MODE.ITEM.HSQLDB_WEBSERVER=HSQLDb Web\u30B5\u30FC\u30D0
RUNNING_MODE.NAME=\u30E9\u30F3\u30CB\u30F3\u30B0\u30E2\u30FC\u30C9
RUNNING_MODE.NAME=\u5B9F\u884C\u30E2\u30FC\u30C9
SCHEMA.NAME=\u30B9\u30AD\u30FC\u30DE
TLS.NAME=TLS/SSL\u30BD\u30B1\u30C3\u30C8\u3092\u4F7F\u7528
USER.NAME=\u30E6\u30FC\u30B6\u30FC\u540D

View File

@@ -43,7 +43,7 @@ RUNNING_MODE.ITEM.HSQLDB_INPROGRESS_TRANSIENT=\u4E00\u6642\u51E6\u7406\u4E2D\u30
RUNNING_MODE.ITEM.HSQLDB_IN_MEMORY=HSQLDb In Memory
RUNNING_MODE.ITEM.HSQLDB_SERVER=HSQLDb\u30B5\u30FC\u30D0
RUNNING_MODE.ITEM.HSQLDB_WEBSERVER=HSQLDb Web\u30B5\u30FC\u30D0
RUNNING_MODE.NAME=\u30E9\u30F3\u30CB\u30F3\u30B0\u30E2\u30FC\u30C9
RUNNING_MODE.NAME=\u5B9F\u884C\u30E2\u30FC\u30C9
SCHEMA_FLOW.NAME=\u30B9\u30AD\u30FC\u30DE
SCHEMA_REJECT.NAME=\u30B9\u30AD\u30FC\u30DE\u306E\u30EA\u30B8\u30A7\u30AF\u30C8
TABLE.NAME=\u30C6\u30FC\u30D6\u30EB

View File

@@ -20,7 +20,7 @@ RUNNING_MODE.ITEM.HSQLDB_INPROGRESS_TRANSIENT=\u4E00\u6642\u51E6\u7406\u4E2D\u30
RUNNING_MODE.ITEM.HSQLDB_IN_MEMORY=HSQLDb In Memory
RUNNING_MODE.ITEM.HSQLDB_SERVER=HSQLDb\u30B5\u30FC\u30D0
RUNNING_MODE.ITEM.HSQLDB_WEBSERVER=HSQLDb Web\u30B5\u30FC\u30D0
RUNNING_MODE.NAME=\u30E9\u30F3\u30CB\u30F3\u30B0\u30E2\u30FC\u30C9
RUNNING_MODE.NAME=\u5B9F\u884C\u30E2\u30FC\u30C9
SCHEMA_DB.NAME=\u30B9\u30AD\u30FC\u30DE
TLS.NAME=TLS/SSL\u30BD\u30B1\u30C3\u30C8\u3092\u4F7F\u7528
USER.NAME=\u30E6\u30FC\u30B6\u30FC\u540D

View File

@@ -13,8 +13,8 @@ imports="
String theDistribution = ElementParameterParser.getValue(theNode, "__DISTRIBUTION__");
String theVersion = ElementParameterParser.getValue(theNode, "__HIVE_VERSION__");
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(theNode.getProcess(), "__LOG4J_ACTIVATE__"));
org.talend.hadoop.distribution.component.HiveComponent hiveDistrib = null;
try {
hiveDistrib = (org.talend.hadoop.distribution.component.HiveComponent) org.talend.hadoop.distribution.DistributionFactory.buildDistribution(theDistribution, theVersion);
} catch (java.lang.Exception e) {
@@ -22,12 +22,13 @@ imports="
return "";
}
boolean isCustom = hiveDistrib instanceof org.talend.hadoop.distribution.custom.CustomDistribution;
String connMode = ElementParameterParser.getValue(theNode, "__CONNECTION_MODE__");
if (hiveDistrib.isExecutedThroughWebHCat()) { // Connection through WebHCat api
%>
<%@ include file="@{org.talend.designer.components.localprovider}/components/tHiveConnection/tHiveConnection_azure.javajet"%>
<%
} else if (hiveDistrib.isGoogleDataprocDistribution()) { // Connection through Dataproc api
} else if("DATAPROC".equalsIgnoreCase(connMode)) { // Connection through Dataproc api
%>
<%@ include file="@{org.talend.designer.components.localprovider}/components/tHiveConnection/tHiveConnection_dataproc.javajet"%>
<%

View File

@@ -63,6 +63,8 @@
SHOW_IF="(DISTRIBUTION=='CUSTOM') OR DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportEmbeddedMode[]" />
<ITEM NAME="STANDALONE" VALUE="STANDALONE"
SHOW_IF="(DISTRIBUTION=='CUSTOM') OR (HIVE_SERVER == 'HIVE2' AND DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportStandaloneMode[]) OR (HIVE_SERVER == 'HIVE' AND DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportHive1Standalone[])" />
<ITEM NAME="DATAPROC" VALUE="DATAPROC"
SHOW_IF="DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportUniversalDataprocMode[]"/>
</ITEMS>
</PARAMETER>
<PARAMETER NAME="HIVE_SERVER" FIELD="CLOSED_LIST" NUM_ROW="15"
@@ -77,7 +79,7 @@
<PARAMETER NAME="HOST" FIELD="TEXT" NUM_ROW="20"
REPOSITORY_VALUE="SERVER_NAME" GROUP="CONNECTION"
SHOW_IF="!DISTRIB[DISTRIBUTION, HIVE_VERSION].useCloudLauncher[]">
SHOW_IF="!DISTRIB[DISTRIBUTION, HIVE_VERSION].useCloudLauncher[] AND (CONNECTION_MODE != 'DATAPROC')">
<DEFAULT>""</DEFAULT>
</PARAMETER>
@@ -88,7 +90,7 @@
<PARAMETER NAME="PORT" FIELD="TEXT" NUM_ROW="20"
REPOSITORY_VALUE="PORT" GROUP="CONNECTION"
SHOW_IF="!DISTRIB[DISTRIBUTION, HIVE_VERSION].useCloudLauncher[]">
SHOW_IF="!DISTRIB[DISTRIBUTION, HIVE_VERSION].useCloudLauncher[] AND (CONNECTION_MODE != 'DATAPROC')">
<DEFAULT>"10000"</DEFAULT>
</PARAMETER>
@@ -100,13 +102,13 @@
<PARAMETER NAME="USER" FIELD="TEXT" NUM_ROW="28"
REPOSITORY_VALUE="USERNAME" REQUIRED="true" GROUP="CONNECTION"
SHOW_IF="!DISTRIB[DISTRIBUTION, HIVE_VERSION].useCloudLauncher[]">
SHOW_IF="!DISTRIB[DISTRIBUTION, HIVE_VERSION].useCloudLauncher[] AND (CONNECTION_MODE != 'DATAPROC')">
<DEFAULT>""</DEFAULT>
</PARAMETER>
<PARAMETER NAME="PASS" FIELD="PASSWORD" NUM_ROW="28"
REPOSITORY_VALUE="PASSWORD" REQUIRED="true" GROUP="CONNECTION"
SHOW_IF="!DISTRIB[DISTRIBUTION, HIVE_VERSION].useCloudLauncher[]">
SHOW_IF="!DISTRIB[DISTRIBUTION, HIVE_VERSION].useCloudLauncher[] AND (CONNECTION_MODE != 'DATAPROC')">
<DEFAULT>""</DEFAULT>
</PARAMETER>
@@ -125,7 +127,7 @@
<PARAMETER NAME="USE_KRB" FIELD="CHECK" NUM_ROW="31"
REQUIRED="true" REPOSITORY_VALUE="USE_KRB"
SHOW_IF="(CONFIGURATIONS_FROM_CLASSPATH == 'false') AND ((DISTRIBUTION=='CUSTOM') OR (DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportKerberos[] AND ((DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportHive1[] AND DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportEmbeddedMode[] AND HIVE_SERVER=='HIVE' AND CONNECTION_MODE=='EMBEDDED') OR (DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportHive2[] AND HIVE_SERVER=='HIVE2'))))"
SHOW_IF="(CONNECTION_MODE!='DATAPROC') AND (CONFIGURATIONS_FROM_CLASSPATH == 'false') AND ((DISTRIBUTION=='CUSTOM') OR (DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportKerberos[] AND ((DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportHive1[] AND DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportEmbeddedMode[] AND HIVE_SERVER=='HIVE' AND CONNECTION_MODE=='EMBEDDED') OR (DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportHive2[] AND HIVE_SERVER=='HIVE2'))))"
GROUP="AUTHENTICATION">
<DEFAULT>false</DEFAULT>
</PARAMETER>
@@ -239,7 +241,6 @@
</PARAMETER>
<PARAMETER NAME="USE_SSL" FIELD="CHECK" NUM_ROW="49"
REPOSITORY_VALUE="USE_SSL" REQUIRED="true"
SHOW_IF="(CONFIGURATIONS_FROM_CLASSPATH == 'false') AND ((DISTRIBUTION=='CUSTOM' OR DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportHive2[]) AND HIVE_SERVER=='HIVE2') AND (DISTRIBUTION=='CUSTOM' OR DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportSSL[])"
@@ -293,7 +294,7 @@
<DEFAULT>"localhost:8032"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="SET_FS_DEFAULT_NAME" FIELD="CHECK" NUM_ROW="53"
SHOW_IF="(CONFIGURATIONS_FROM_CLASSPATH == 'false') AND !DISTRIB[DISTRIBUTION, HIVE_VERSION].useCloudLauncher[]"
SHOW_IF="(CONFIGURATIONS_FROM_CLASSPATH == 'false') AND !DISTRIB[DISTRIBUTION, HIVE_VERSION].useCloudLauncher[] AND (CONNECTION_MODE != 'DATAPROC')"
REQUIRED="true" GROUP="HADOOP_PROPS">
<DEFAULT IF="(CONNECTION_MODE == 'STANDALONE')">false</DEFAULT>
<DEFAULT IF="(CONNECTION_MODE == 'EMBEDDED')">true</DEFAULT>
@@ -424,44 +425,42 @@
SHOW_IF="DISTRIB[DISTRIBUTION, HIVE_VERSION].isExecutedThroughWebHCat[]">
<DEFAULT>""</DEFAULT>
</PARAMETER>
<!-- -->
<!-- GOOGLE DATAPROC -->
<PARAMETER NAME="GOOGLE_PROJECT_ID" REPOSITORY_VALUE="GOOGLE_PROJECT_ID" FIELD="TEXT" REQUIRED="true"
NUM_ROW="16" GROUP="CONNECTION"
SHOW_IF="DISTRIB[DISTRIBUTION, HIVE_VERSION].isGoogleDataprocDistribution[]">
SHOW_IF="CONNECTION_MODE=='DATAPROC'">
<DEFAULT>"my-google-project"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="GOOGLE_CLUSTER_ID" REPOSITORY_VALUE="GOOGLE_CLUSTER_ID" FIELD="TEXT" REQUIRED="true"
NUM_ROW="17" GROUP="CONNECTION"
SHOW_IF="DISTRIB[DISTRIBUTION, HIVE_VERSION].isGoogleDataprocDistribution[]">
SHOW_IF="CONNECTION_MODE=='DATAPROC'">
<DEFAULT>"my-cluster-id"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="GOOGLE_REGION" REPOSITORY_VALUE="GOOGLE_REGION" FIELD="TEXT" REQUIRED="true"
NUM_ROW="18" GROUP="CONNECTION"
SHOW_IF="DISTRIB[DISTRIBUTION, HIVE_VERSION].isGoogleDataprocDistribution[]">
SHOW_IF="CONNECTION_MODE=='DATAPROC'">
<DEFAULT>"global"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="GOOGLE_JARS_BUCKET" REPOSITORY_VALUE="GOOGLE_JARS_BUCKET" FIELD="TEXT" REQUIRED="true"
NUM_ROW="19" GROUP="CONNECTION"
SHOW_IF="DISTRIB[DISTRIBUTION, HIVE_VERSION].isGoogleDataprocDistribution[]">
SHOW_IF="CONNECTION_MODE=='DATAPROC'">
<DEFAULT>"gs://my-bucket/talend/jars"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="DEFINE_PATH_TO_GOOGLE_CREDENTIALS" REPOSITORY_VALUE="DEFINE_PATH_TO_GOOGLE_CREDENTIALS" FIELD="CHECK"
REQUIRED="true" NUM_ROW="50" GROUP="AUTHENTICATION"
SHOW_IF="DISTRIB[DISTRIBUTION, HIVE_VERSION].isGoogleDataprocDistribution[]">
SHOW_IF="CONNECTION_MODE=='DATAPROC'">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="PATH_TO_GOOGLE_CREDENTIALS" REPOSITORY_VALUE="PATH_TO_GOOGLE_CREDENTIALS" FIELD="FILE" REQUIRED="true"
NUM_ROW="51" GROUP="AUTHENTICATION"
SHOW_IF="((isShow[DEFINE_PATH_TO_GOOGLE_CREDENTIALS]) AND DEFINE_PATH_TO_GOOGLE_CREDENTIALS=='true' AND DISTRIB[DISTRIBUTION, HIVE_VERSION].isGoogleDataprocDistribution[])">
SHOW_IF="(isShow[DEFINE_PATH_TO_GOOGLE_CREDENTIALS]) AND (DEFINE_PATH_TO_GOOGLE_CREDENTIALS=='true') AND (CONNECTION_MODE=='DATAPROC')">
<DEFAULT>""</DEFAULT>
</PARAMETER>
<!-- END GOOGLE DATAPROC -->
<PARAMETER NAME="USE_SHARED_CONNECTION" FIELD="CHECK"
NUM_ROW="60" REQUIRED="true"
SHOW_IF="(!DISTRIB[DISTRIBUTION, HIVE_VERSION].useCloudLauncher[])">
@@ -484,7 +483,7 @@
<PARAMETER NAME="STORE_BY_HBASE" FIELD="CHECK" NUM_ROW="70"
REQUIRED="true"
SHOW_IF="(CONFIGURATIONS_FROM_CLASSPATH == 'true') OR ((CONNECTION_MODE != 'EMBEDDED' OR !DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportEmbeddedMode[]) AND DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportHBaseForHive[])"
SHOW_IF="(CONFIGURATIONS_FROM_CLASSPATH == 'true') AND (CONNECTION_MODE!='DATAPROC') OR ((CONNECTION_MODE != 'EMBEDDED' OR !DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportEmbeddedMode[]) AND DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportHBaseForHive[])"
GROUP="HBASE_GROUP">
<DEFAULT>false</DEFAULT>
</PARAMETER>
@@ -589,7 +588,7 @@
<PARAMETER NAME="HADOOP_ADVANCED_PROPERTIES"
REPOSITORY_VALUE="HADOOP_ADVANCED_PROPERTIES" FIELD="TABLE" REQUIRED="false"
SHOW_IF="!DISTRIB[DISTRIBUTION, HIVE_VERSION].useCloudLauncher[]"
SHOW_IF="!DISTRIB[DISTRIBUTION, HIVE_VERSION].useCloudLauncher[] AND (CONNECTION_MODE != 'DATAPROC')"
NUM_ROW="40" NB_LINES="3">
<ITEMS>
<ITEM NAME="PROPERTY" />
@@ -682,27 +681,22 @@
<IMPORT NAME="parquet-hive-bundle-1.5.0" MODULE="parquet-hive-bundle-1.5.0.jar"
MVN="mvn:org.talend.libraries/parquet-hive-bundle-1.5.0/6.0.0"
UrlPath="platform:/plugin/org.talend.libraries.hadoop/lib/parquet-hive-bundle-1.5.0.jar"
REQUIRED_IF="(DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportOldImportMode[] AND DISTRIBUTION!='PIVOTAL_HD' AND DISTRIBUTION!='CUSTOM' AND HIVE_VERSION!='MAPR2' AND HIVE_VERSION!='HDP_2_3' AND HIVE_VERSION!='APACHE_1_0_0' AND HIVE_VERSION!='APACHE_2_4_0_EMR_0_13_1')" />
REQUIRED_IF="(DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportOldImportMode[] AND DISTRIBUTION!='CUSTOM')" />
<IMPORT NAME="parquet-hive-bundle-1.3.2" MODULE="parquet-hive-bundle-1.3.2.jar"
MVN="mvn:org.talend.libraries/parquet-hive-bundle-1.3.2/6.0.0"
UrlPath="platform:/plugin/org.talend.libraries.hadoop/lib/parquet-hive-bundle-1.3.2.jar"
REQUIRED_IF="(DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportOldImportMode[] AND DISTRIBUTION=='PIVOTAL_HD' AND HIVE_VERSION!='PIVOTAL_HD_1_0_1')" />
REQUIRED_IF="(DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportOldImportMode[])" />
<IMPORT NAME="snappy-java-1.0.5.jar" MODULE="snappy-java-1.0.5.jar"
MVN="mvn:org.talend.libraries/snappy-java-1.0.5/6.0.0"
REQUIRED_IF="(DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportOldImportMode[] AND DISTRIBUTION!='CUSTOM' AND HIVE_VERSION!='MAPR2' AND HIVE_VERSION!='APACHE_1_0_0' AND HIVE_VERSION!='PIVOTAL_HD_1_0_1' AND HIVE_VERSION!='APACHE_2_4_0_EMR_0_13_1')" />
<!-- ############## -->
<IMPORT MODULE_GROUP="TEZ-LIB-HDP220"
REQUIRED_IF="(DISTRIBUTION == 'HORTONWORKS') AND (HIVE_VERSION == 'HDP_2_2') AND (EXECUTION_ENGINE == 'tez')" />
<IMPORT MODULE_GROUP="TEZ-SERVER-LIB-HDP220"
REQUIRED_IF="(DISTRIBUTION == 'HORTONWORKS') AND (HIVE_VERSION == 'HDP_2_2') AND (EXECUTION_ENGINE == 'tez') AND (TEZ_LIB == 'INSTALL')" />
<!-- Tez libraries for HDP_2_3 -->
<IMPORT MODULE_GROUP="TEZ-LIB-HDP_2_3"
REQUIRED_IF="(DISTRIBUTION == 'HORTONWORKS') AND (HIVE_VERSION == 'HDP_2_3') AND (EXECUTION_ENGINE == 'tez')" />
<!-- Tez Server libraries for HDP_2_3 -->
<IMPORT MODULE_GROUP="TEZ-SERVER-LIB-HDP_2_3"
REQUIRED_IF="(DISTRIBUTION == 'HORTONWORKS') AND (HIVE_VERSION == 'HDP_2_3') AND (EXECUTION_ENGINE == 'tez') AND (TEZ_LIB == 'INSTALL')" />
REQUIRED_IF="(DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportOldImportMode[] AND DISTRIBUTION!='CUSTOM')" />
<!-- Dataproc 2.x -->
<IMPORT MODULE_GROUP="DATAPROC-LAUNCHER-DI"
REQUIRED_IF="CONNECTION_MODE=='DATAPROC'" REQUIRED="false"/>
<!-- Spark universal 3.1.x -->
<IMPORT MODULE_GROUP="UNIVERSAL-SPARK-3.1.X"
REQUIRED_IF="(CONNECTION_MODE=='STANDALONE') AND DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportUniversalLocalMode[]" REQUIRED="false"/>
</IMPORTS>
</CODEGENERATION>

View File

@@ -36,6 +36,7 @@ HIVE_SERVER.ITEM.HIVE2=Hive 2
CONNECTION_MODE.NAME=Connection mode
CONNECTION_MODE.ITEM.EMBEDDED=Embedded
CONNECTION_MODE.ITEM.STANDALONE=Standalone
CONNECTION_MODE.ITEM.DATAPROC=Dataproc
HIVE_ADDITIONAL_JDBC.NAME=Additional JDBC Settings
SET_MAPRED_JT.NAME=Set Jobtracker URI
SET_FS_DEFAULT_NAME.NAME=Set Namenode URI

View File

@@ -84,26 +84,30 @@
<!-- GOOGLE DATAPROC -->
<PARAMETER NAME="GOOGLE_PROJECT_ID" FIELD="TEXT" REQUIRED="true"
NUM_ROW="16" GROUP="CONN">
<DEFAULT>""</DEFAULT>
<PARAMETER NAME="GOOGLE_PROJECT_ID" REPOSITORY_VALUE="GOOGLE_PROJECT_ID" FIELD="TEXT" REQUIRED="true"
NUM_ROW="16" GROUP="CONN"
SHOW_IF="(USE_EXISTING_CONNECTION=='false') AND (CONNECTION_MODE=='DATAPROC')">
<DEFAULT>"my-google-project"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="GOOGLE_CLUSTER_ID" FIELD="TEXT" REQUIRED="true"
NUM_ROW="17" GROUP="CONN">
<DEFAULT>""</DEFAULT>
<PARAMETER NAME="GOOGLE_CLUSTER_ID" REPOSITORY_VALUE="GOOGLE_CLUSTER_ID" FIELD="TEXT" REQUIRED="true"
NUM_ROW="17" GROUP="CONN"
SHOW_IF="(USE_EXISTING_CONNECTION=='false') AND (CONNECTION_MODE=='DATAPROC')">
<DEFAULT>"my-cluster-id"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="GOOGLE_REGION" FIELD="TEXT" REQUIRED="true"
NUM_ROW="18" GROUP="CONN">
<DEFAULT>""</DEFAULT>
<PARAMETER NAME="GOOGLE_REGION" REPOSITORY_VALUE="GOOGLE_REGION" FIELD="TEXT" REQUIRED="true"
NUM_ROW="18" GROUP="CONN"
SHOW_IF="(USE_EXISTING_CONNECTION=='false') AND (CONNECTION_MODE=='DATAPROC')">
<DEFAULT>"global"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="GOOGLE_JARS_BUCKET" FIELD="TEXT" REQUIRED="true"
NUM_ROW="19" GROUP="CONN">
<DEFAULT>""</DEFAULT>
<PARAMETER NAME="GOOGLE_JARS_BUCKET" REPOSITORY_VALUE="GOOGLE_JARS_BUCKET" FIELD="TEXT" REQUIRED="true"
NUM_ROW="19" GROUP="CONN"
SHOW_IF="(USE_EXISTING_CONNECTION=='false') AND (CONNECTION_MODE=='DATAPROC')">
<DEFAULT>"gs://my-bucket/talend/jars"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="AUTH_TYPE" NUM_ROW="20" REQUIRED="true"
FIELD="CLOSED_LIST" GROUP="CONN"
SHOW_IF="((DISTRIB[DISTRIBUTION, HIVE_VERSION].isGoogleDataprocDistribution[]) AND USE_EXISTING_CONNECTION=='false') OR (USE_EXISTING_CONNECTION=='true' AND DISTRIB[#LINK@NODE.CONNECTION.DISTRIBUTION, #LINK@NODE.CONNECTION.HIVE_VERSION].isGoogleDataprocDistribution[])">
SHOW_IF="(CONNECTION_MODE=='DATAPROC') AND (USE_EXISTING_CONNECTION=='false')">
<ITEMS DEFAULT="USER_ACCOUNT_HMAC">
<ITEM NAME="USER_ACCOUNT_HMAC" VALUE="USER_ACCOUNT_HMAC"/>
<ITEM NAME="SERVICE_ACCOUNT" VALUE="SERVICE_ACCOUNT"/>
@@ -113,22 +117,24 @@
<PARAMETER
NAME="ACCESS_KEY" FIELD="TEXT" REQUIRED="true"
NUM_ROW="20" GROUP="CONN"
SHOW_IF="(DISTRIB[DISTRIBUTION, HIVE_VERSION].isGoogleDataprocDistribution[]) AND (AUTH_TYPE=='USER_ACCOUNT_HMAC')">
SHOW_IF="(isShow[AUTH_TYPE]) AND (AUTH_TYPE=='USER_ACCOUNT_HMAC') AND (CONNECTION_MODE=='DATAPROC')">
<DEFAULT>""</DEFAULT>
</PARAMETER>
<PARAMETER
NAME="SECRET_KEY" FIELD="PASSWORD" REQUIRED="true"
NUM_ROW="21" GROUP="CONN"
SHOW_IF="(DISTRIB[DISTRIBUTION, HIVE_VERSION].isGoogleDataprocDistribution[]) AND (AUTH_TYPE=='USER_ACCOUNT_HMAC')">
SHOW_IF="(isShow[AUTH_TYPE]) AND (AUTH_TYPE=='USER_ACCOUNT_HMAC') AND (CONNECTION_MODE=='DATAPROC')">
<DEFAULT>""</DEFAULT>
</PARAMETER>
<PARAMETER NAME="DEFINE_PATH_TO_GOOGLE_CREDENTIALS" FIELD="CHECK" REQUIRED="true"
NUM_ROW="51" GROUP="AUTHENTICATION">
NUM_ROW="51" GROUP="AUTHENTICATION"
SHOW_IF="(USE_EXISTING_CONNECTION=='false') AND (CONNECTION_MODE=='DATAPROC')">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="PATH_TO_GOOGLE_CREDENTIALS" FIELD="FILE" REQUIRED="true"
NUM_ROW="51" GROUP="AUTHENTICATION">
NUM_ROW="51" GROUP="AUTHENTICATION"
SHOW_IF="((isShow[DEFINE_PATH_TO_GOOGLE_CREDENTIALS]) AND DEFINE_PATH_TO_GOOGLE_CREDENTIALS=='true' AND CONNECTION_MODE=='DATAPROC')">
<DEFAULT>""</DEFAULT>
</PARAMETER>
<!-- END GOOGLE DATAPROC -->
@@ -180,35 +186,13 @@
<CODEGENERATION>
<IMPORTS>
<!-- MICROSOFT HD INSIGHT 3.1 -->
<IMPORT NAME="talend-bigdata-launcher-1.1.0-20160405" MODULE="talend-bigdata-launcher-1.1.0-20160405.jar" MVN="mvn:org.talend.libraries/talend-bigdata-launcher-1.1.0-20160405/6.0.0"
REQUIRED_IF="(USE_EXISTING_CONNECTION=='false') AND (DISTRIBUTION=='MICROSOFT_HD_INSIGHT') AND (DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportOldImportMode[])" />
<IMPORT NAME="cxf-api-2.7.7" MODULE="cxf-api-2.7.7.jar" MVN="mvn:org.talend.libraries/cxf-api-2.7.7/6.0.0"
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-api-2.7.7.jar"
REQUIRED_IF="(USE_EXISTING_CONNECTION=='false') AND (DISTRIBUTION=='MICROSOFT_HD_INSIGHT') AND (DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportOldImportMode[])" />
<IMPORT NAME="cxf-rt-bindings-xml-2.7.7" MODULE="cxf-rt-bindings-xml-2.7.7.jar" MVN="mvn:org.talend.libraries/cxf-rt-bindings-xml-2.7.7/6.0.0"
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-bindings-xml-2.7.7.jar"
REQUIRED_IF="(USE_EXISTING_CONNECTION=='false') AND (DISTRIBUTION=='MICROSOFT_HD_INSIGHT') AND (DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportOldImportMode[])" />
<IMPORT NAME="cxf-rt-core-2.7.7" MODULE="cxf-rt-core-2.7.7.jar" MVN="mvn:org.talend.libraries/cxf-rt-core-2.7.7/6.0.0"
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-core-2.7.7.jar"
REQUIRED_IF="(USE_EXISTING_CONNECTION=='false') AND (DISTRIBUTION=='MICROSOFT_HD_INSIGHT') AND (DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportOldImportMode[])" />
<IMPORT NAME="cxf-rt-frontend-jaxrs-2.7.7" MODULE="cxf-rt-frontend-jaxrs-2.7.7.jar" MVN="mvn:org.talend.libraries/cxf-rt-frontend-jaxrs-2.7.7/6.0.0"
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-frontend-jaxrs-2.7.7.jar"
REQUIRED_IF="(USE_EXISTING_CONNECTION=='false') AND (DISTRIBUTION=='MICROSOFT_HD_INSIGHT') AND (DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportOldImportMode[])" />
<IMPORT NAME="cxf-rt-transports-http-2.7.7" MODULE="cxf-rt-transports-http-2.7.7.jar" MVN="mvn:org.talend.libraries/cxf-rt-transports-http-2.7.7/6.0.0"
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-transports-http-2.7.7.jar"
REQUIRED_IF="(USE_EXISTING_CONNECTION=='false') AND (DISTRIBUTION=='MICROSOFT_HD_INSIGHT') AND (DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportOldImportMode[])" />
<IMPORT NAME="json-simple" MODULE="json_simple-1.1.jar" MVN="mvn:org.talend.libraries/json_simple-1.1/6.0.0"
UrlPath="platform:/plugin/org.talend.libraries.jackson/lib/json_simple-1.1.jar"
REQUIRED_IF="(USE_EXISTING_CONNECTION=='false') AND (DISTRIBUTION=='MICROSOFT_HD_INSIGHT') AND (DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportOldImportMode[])" />
<IMPORT NAME="javax.ws.rs-api-2.0-m10" MODULE="javax.ws.rs-api-2.0-m10.jar" MVN="mvn:org.talend.libraries/javax.ws.rs-api-2.0-m10/6.0.0"
REQUIRED_IF="(USE_EXISTING_CONNECTION=='false') AND (DISTRIBUTION=='MICROSOFT_HD_INSIGHT') AND (DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportOldImportMode[])" />
<IMPORT NAME="WSDL4J-1_6_3" MODULE="wsdl4j-1.6.3.jar" MVN="mvn:wsdl4j/wsdl4j/1.6.3"
BundleID="org.apache.servicemix.bundles.wsdl4j" REQUIRED="false"
REQUIRED_IF="(USE_EXISTING_CONNECTION=='false') AND (DISTRIBUTION=='MICROSOFT_HD_INSIGHT') AND (DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportOldImportMode[])" />
<IMPORT NAME="azure-storage-1.2.0" MODULE="azure-storage-1.2.0.jar" MVN="mvn:org.talend.libraries/azure-storage-1.2.0/6.0.0"
REQUIRED_IF="(USE_EXISTING_CONNECTION=='false') AND (DISTRIBUTION=='MICROSOFT_HD_INSIGHT') AND (DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportOldImportMode[])" />
<!-- #################### -->
<!-- Dataproc 2.x -->
<IMPORT MODULE_GROUP="DATAPROC-LAUNCHER-DI"
REQUIRED_IF="(USE_EXISTING_CONNECTION=='false') AND (CONNECTION_MODE=='DATAPROC')" REQUIRED="false"/>
<!-- Spark universal 3.1.x -->
<IMPORT MODULE_GROUP="UNIVERSAL-SPARK-3.1.X"
REQUIRED_IF="(USE_EXISTING_CONNECTION=='false') AND (CONNECTION_MODE=='STANDALONE') AND DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportUniversalLocalMode[]" REQUIRED="false"/>
</IMPORTS>
</CODEGENERATION>

View File

@@ -33,7 +33,7 @@ imports="
String theDistribution = ElementParameterParser.getValue(node, "__DISTRIBUTION__");
String theVersion = ElementParameterParser.getValue(node, "__HIVE_VERSION__");
final String studioVersion = org.talend.commons.utils.VersionUtils.getDisplayVersion();
if ("true".equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"))) { //with connection
@@ -45,7 +45,7 @@ imports="
}
}
}
org.talend.hadoop.distribution.component.HiveComponent hiveDistrib = null;
try {
hiveDistrib = (org.talend.hadoop.distribution.component.HiveComponent) org.talend.hadoop.distribution.DistributionFactory.buildDistribution(theDistribution, theVersion);
@@ -95,7 +95,7 @@ bw_<%=cid%>.write("!set showHeader false\n");
<%
}
}
if (hiveDistrib.isGoogleDataprocDistribution()) {
if (hiveDistrib.doSupportUniversalDataprocMode()) {
%>
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Hive/GetDataprocConnection.javajet"%>
<%
@@ -193,7 +193,7 @@ bw_<%=cid%>.write("!set showHeader false\n");
<%
}
if (hiveDistrib.isGoogleDataprocDistribution()) {
if (hiveDistrib.doSupportUniversalDataprocMode()) {
if (isLog4jEnabled) {
%>
log.debug("Query for <%=cid%>: " + <%=dbquery%>.replace("';'", "'\\;'") + ";");

View File

@@ -30,19 +30,23 @@ imports="
boolean usePrepareStatement = "true".equals(ElementParameterParser.getValue(node,"__USE_PREPAREDSTATEMENT__"));
boolean useParquet = "true".equals(ElementParameterParser.getValue(node,"__USE_PARQUET__"));
String encryptedToken = null;
String theDistribution = ElementParameterParser.getValue(node, "__DISTRIBUTION__");
String theVersion = ElementParameterParser.getValue(node, "__HIVE_VERSION__");
String encryptedToken = null;
String connMode = ElementParameterParser.getValue(node, "__CONNECTION_MODE__");
if("true".equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"))) {
String connection = ElementParameterParser.getValue(node, "__CONNECTION__");
for (INode pNode : node.getProcess().getNodesOfType("tHiveConnection")) {
if(connection!=null && connection.equals(pNode.getUniqueName())) {
theDistribution = ElementParameterParser.getValue(pNode, "__DISTRIBUTION__");
theVersion = ElementParameterParser.getValue(pNode, "__HIVE_VERSION__");
}
}
node.getProcess().getNodesOfType("tHiveConnection").stream()
.filter(pNode -> connection!=null && connection.equals(pNode.getUniqueName()) )
.findFirst()
.ifPresent(pNode -> {
theDistribution = ElementParameterParser.getValue(pNode, "__DISTRIBUTION__");
theVersion = ElementParameterParser.getValue(pNode, "__HIVE_VERSION__");
connMode = ElementParameterParser.getValue(pNode, "__CONNECTION_MODE__");
});
}
org.talend.hadoop.distribution.component.HiveComponent hiveDistrib = null;
@@ -89,12 +93,12 @@ imports="
}
<%
}
} else if(hiveDistrib.isGoogleDataprocDistribution()) {
} else if ("DATAPROC".equalsIgnoreCase(connMode)) {
// Distribution: Google Dataproc
%>
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Hive/GetDataprocConnection.javajet"%>
<%
} else {
} else {
// Distribution: other than WebHCat, Dataproc
%>
<%@ include file="../templates/Hive/GetConnection.javajet"%>
@@ -231,7 +235,7 @@ imports="
}
}
if(!hiveDistrib.useCloudLauncher()) {
if(!hiveDistrib.useCloudLauncher() && !"DATAPROC".equalsIgnoreCase(connMode)) {
if (usePrepareStatement) {
%>
java.sql.PreparedStatement pstmt_<%=cid %> = conn_<%=cid%>.prepareStatement(<%=dbquery%>);
@@ -244,3 +248,4 @@ imports="
%>
String query_<%=cid %> = "";
boolean whetherReject_<%=cid%> = false;

View File

@@ -17,15 +17,19 @@ imports="
String theDistribution = ElementParameterParser.getValue(node, "__DISTRIBUTION__");
String theVersion = ElementParameterParser.getValue(node, "__HIVE_VERSION__");
String connMode = ElementParameterParser.getValue(node, "__CONNECTION_MODE__");
if("true".equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"))) {
String connection = ElementParameterParser.getValue(node, "__CONNECTION__");
for (INode pNode : node.getProcess().getNodesOfType("tHiveConnection")) {
if(connection!=null && connection.equals(pNode.getUniqueName())) {
theDistribution = ElementParameterParser.getValue(pNode, "__DISTRIBUTION__");
theVersion = ElementParameterParser.getValue(pNode, "__HIVE_VERSION__");
}
}
node.getProcess().getNodesOfType("tHiveConnection").stream()
.filter(pNode -> connection!=null && connection.equals(pNode.getUniqueName()) )
.findFirst()
.ifPresent(pNode -> {
theDistribution = ElementParameterParser.getValue(pNode, "__DISTRIBUTION__");
theVersion = ElementParameterParser.getValue(pNode, "__HIVE_VERSION__");
connMode = ElementParameterParser.getValue(pNode, "__CONNECTION_MODE__");
});
}
org.talend.hadoop.distribution.component.HiveComponent hiveDistrib = null;
@@ -37,10 +41,10 @@ imports="
}
boolean isCustom = hiveDistrib instanceof org.talend.hadoop.distribution.custom.CustomDistribution;
if(!hiveDistrib.useCloudLauncher()) {
if(!hiveDistrib.useCloudLauncher() && !"DATAPROC".equalsIgnoreCase(connMode)) {
if (usePrepareStatement) {
%>
pstmt_<%=cid %>.close();
pstmt_<%=cid %>.close();
<%
}
%>
@@ -99,3 +103,4 @@ imports="
<%
}
%>

View File

@@ -17,12 +17,12 @@
<CONNECTORS>
<CONNECTOR CTYPE="FLOW" MAX_INPUT="1" MAX_OUTPUT="1"
NOT_SHOW_IF="DISTRIB[DISTRIBUTION, HIVE_VERSION].isGoogleDataprocDistribution[]" />
NOT_SHOW_IF="CONNECTION_MODE=='DATAPROC'" />
<CONNECTOR NAME="REJECT" CTYPE="FLOW" MAX_INPUT="0"
MAX_OUTPUT="1" LINE_STYLE="2" COLOR="FF0000" BASE_SCHEMA="FLOW"
NOT_SHOW_IF="(DATA_ACTION == 'INSERT' OR DIE_ON_ERROR == 'true' OR DISTRIB[DISTRIBUTION, HIVE_VERSION].isGoogleDataprocDistribution[])" />
NOT_SHOW_IF="(DATA_ACTION == 'INSERT') OR (DIE_ON_ERROR=='true') OR (CONNECTION_MODE=='DATAPROC')" />
<CONNECTOR CTYPE="ITERATE" MAX_OUTPUT="1" MAX_INPUT="1"
NOT_SHOW_IF="DISTRIB[DISTRIBUTION, HIVE_VERSION].isGoogleDataprocDistribution[]" />
NOT_SHOW_IF="CONNECTION_MODE=='DATAPROC'" />
<CONNECTOR CTYPE="SUBJOB_OK" MAX_INPUT="1" />
<CONNECTOR CTYPE="SUBJOB_ERROR" MAX_INPUT="1" />
<CONNECTOR CTYPE="COMPONENT_OK" />
@@ -74,6 +74,8 @@
SHOW_IF="(DISTRIBUTION=='CUSTOM') OR DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportEmbeddedMode[]" />
<ITEM NAME="STANDALONE" VALUE="STANDALONE"
SHOW_IF="(DISTRIBUTION=='CUSTOM') OR (HIVE_SERVER == 'HIVE2' AND DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportStandaloneMode[]) OR (HIVE_SERVER == 'HIVE' AND DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportHive1Standalone[])" />
<ITEM NAME="DATAPROC" VALUE="DATAPROC"
SHOW_IF="DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportUniversalDataprocMode[]"/>
</ITEMS>
</PARAMETER>
<PARAMETER NAME="HIVE_SERVER" FIELD="CLOSED_LIST" NUM_ROW="13"
@@ -88,14 +90,14 @@
<PARAMETER NAME="HOST" FIELD="TEXT" NUM_ROW="20"
REPOSITORY_VALUE="SERVER_NAME" REQUIRED="true"
SHOW_IF="(USE_EXISTING_CONNECTION == 'false' AND !DISTRIB[DISTRIBUTION, HIVE_VERSION].useCloudLauncher[])"
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND !DISTRIB[DISTRIBUTION, HIVE_VERSION].useCloudLauncher[] AND (CONNECTION_MODE!='DATAPROC')"
GROUP="CONN">
<DEFAULT>""</DEFAULT>
</PARAMETER>
<PARAMETER NAME="PORT" FIELD="TEXT" NUM_ROW="20"
REPOSITORY_VALUE="PORT" REQUIRED="true"
SHOW_IF="(USE_EXISTING_CONNECTION == 'false' AND !DISTRIB[DISTRIBUTION, HIVE_VERSION].useCloudLauncher[])"
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND !DISTRIB[DISTRIBUTION, HIVE_VERSION].useCloudLauncher[] AND (CONNECTION_MODE!='DATAPROC')"
GROUP="CONN">
<DEFAULT>"10000"</DEFAULT>
</PARAMETER>
@@ -113,28 +115,28 @@
<PARAMETER NAME="USER" FIELD="TEXT" NUM_ROW="28"
REPOSITORY_VALUE="USERNAME" REQUIRED="true"
SHOW_IF="(USE_EXISTING_CONNECTION == 'false' AND !DISTRIB[DISTRIBUTION, HIVE_VERSION].useCloudLauncher[])"
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND !DISTRIB[DISTRIBUTION, HIVE_VERSION].useCloudLauncher[] AND (CONNECTION_MODE!='DATAPROC')"
GROUP="CONN">
<DEFAULT>""</DEFAULT>
</PARAMETER>
<PARAMETER NAME="PASS" FIELD="PASSWORD" NUM_ROW="28"
REPOSITORY_VALUE="PASSWORD" REQUIRED="true"
SHOW_IF="(USE_EXISTING_CONNECTION == 'false' AND !DISTRIB[DISTRIBUTION, HIVE_VERSION].useCloudLauncher[])"
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND !DISTRIB[DISTRIBUTION, HIVE_VERSION].useCloudLauncher[] AND (CONNECTION_MODE!='DATAPROC')"
GROUP="CONN">
<DEFAULT>""</DEFAULT>
</PARAMETER>
<PARAMETER NAME="HIVE_ADDITIONAL_JDBC" FIELD="TEXT" NUM_ROW="29"
REPOSITORY_VALUE="HIVE_ADDITIONAL_JDBC" REQUIRED="false" GROUP="CONN"
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (!DISTRIB[DISTRIBUTION, HIVE_VERSION].useCloudLauncher[] AND DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportHive2[] AND HIVE_SERVER=='HIVE2' AND DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportStandaloneMode[] AND CONNECTION_MODE=='STANDALONE')">
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (!DISTRIB[DISTRIBUTION, HIVE_VERSION].useCloudLauncher[] AND DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportHive2[] AND HIVE_SERVER=='HIVE2' AND DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportStandaloneMode[] AND CONNECTION_MODE=='STANDALONE' AND CONNECTION_MODE!='DATAPROC')">
<DEFAULT>""</DEFAULT>
</PARAMETER>
<PARAMETER NAME="USE_KRB" FIELD="CHECK" NUM_ROW="30"
REQUIRED="true" REPOSITORY_VALUE="USE_KRB"
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND ((DISTRIBUTION=='CUSTOM') OR (DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportKerberos[] AND ((DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportHive1[] AND DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportEmbeddedMode[] AND HIVE_SERVER=='HIVE' AND CONNECTION_MODE=='EMBEDDED') OR (DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportHive2[] AND HIVE_SERVER=='HIVE2'))))"
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (CONNECTION_MODE!='DATAPROC') AND ((DISTRIBUTION=='CUSTOM') OR (DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportKerberos[] AND ((DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportHive1[] AND DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportEmbeddedMode[] AND HIVE_SERVER=='HIVE' AND CONNECTION_MODE=='EMBEDDED') OR (DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportHive2[] AND HIVE_SERVER=='HIVE2'))))"
GROUP="AUTHENTICATION">
<DEFAULT>false</DEFAULT>
</PARAMETER>
@@ -304,7 +306,7 @@
<PARAMETER NAME="SET_FS_DEFAULT_NAME" FIELD="CHECK" NUM_ROW="53"
REQUIRED="true"
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (!DISTRIB[DISTRIBUTION, HIVE_VERSION].useCloudLauncher[])"
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (!DISTRIB[DISTRIBUTION, HIVE_VERSION].useCloudLauncher[]) AND (CONNECTION_MODE!='DATAPROC')"
GROUP="HADOOP_PROPS">
<DEFAULT IF="(CONNECTION_MODE == 'STANDALONE')">false</DEFAULT>
<DEFAULT IF="(CONNECTION_MODE == 'EMBEDDED')">true</DEFAULT>
@@ -439,43 +441,42 @@
SHOW_IF="(USE_EXISTING_CONNECTION == 'false' AND DISTRIB[DISTRIBUTION, HIVE_VERSION].isExecutedThroughWebHCat[])">
<DEFAULT>""</DEFAULT>
</PARAMETER>
<!-- -->
<!-- GOOGLE DATAPROC -->
<PARAMETER NAME="GOOGLE_PROJECT_ID" REPOSITORY_VALUE="GOOGLE_PROJECT_ID" FIELD="TEXT" REQUIRED="true"
NUM_ROW="16" GROUP="CONN"
SHOW_IF="(USE_EXISTING_CONNECTION=='false' AND DISTRIB[DISTRIBUTION, HIVE_VERSION].isGoogleDataprocDistribution[])">
SHOW_IF="(USE_EXISTING_CONNECTION=='false') AND (CONNECTION_MODE=='DATAPROC')">
<DEFAULT>"my-google-project"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="GOOGLE_CLUSTER_ID" REPOSITORY_VALUE="GOOGLE_CLUSTER_ID" FIELD="TEXT" REQUIRED="true"
NUM_ROW="17" GROUP="CONN"
SHOW_IF="(USE_EXISTING_CONNECTION=='false' AND DISTRIB[DISTRIBUTION, HIVE_VERSION].isGoogleDataprocDistribution[])">
SHOW_IF="(USE_EXISTING_CONNECTION=='false') AND (CONNECTION_MODE=='DATAPROC')">
<DEFAULT>"my-cluster-id"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="GOOGLE_REGION" REPOSITORY_VALUE="GOOGLE_REGION" FIELD="TEXT" REQUIRED="true"
NUM_ROW="18" GROUP="CONN"
SHOW_IF="(USE_EXISTING_CONNECTION=='false' AND DISTRIB[DISTRIBUTION, HIVE_VERSION].isGoogleDataprocDistribution[])">
SHOW_IF="(USE_EXISTING_CONNECTION=='false') AND (CONNECTION_MODE=='DATAPROC')">
<DEFAULT>"global"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="GOOGLE_JARS_BUCKET" REPOSITORY_VALUE="GOOGLE_JARS_BUCKET" FIELD="TEXT" REQUIRED="true"
NUM_ROW="19" GROUP="CONN"
SHOW_IF="(USE_EXISTING_CONNECTION=='false' AND DISTRIB[DISTRIBUTION, HIVE_VERSION].isGoogleDataprocDistribution[])">
SHOW_IF="(USE_EXISTING_CONNECTION=='false') AND (CONNECTION_MODE=='DATAPROC')">
<DEFAULT>"gs://my-bucket/talend/jars"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="DEFINE_PATH_TO_GOOGLE_CREDENTIALS" REPOSITORY_VALUE="DEFINE_PATH_TO_GOOGLE_CREDENTIALS" FIELD="CHECK"
REQUIRED="true" NUM_ROW="50" GROUP="AUTHENTICATION"
SHOW_IF="(USE_EXISTING_CONNECTION=='false' AND DISTRIB[DISTRIBUTION, HIVE_VERSION].isGoogleDataprocDistribution[])">
SHOW_IF="(USE_EXISTING_CONNECTION=='false') AND (CONNECTION_MODE=='DATAPROC')">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="PATH_TO_GOOGLE_CREDENTIALS" REPOSITORY_VALUE="PATH_TO_GOOGLE_CREDENTIALS" FIELD="FILE" REQUIRED="true"
NUM_ROW="51" GROUP="AUTHENTICATION"
SHOW_IF="((isShow[DEFINE_PATH_TO_GOOGLE_CREDENTIALS]) AND DEFINE_PATH_TO_GOOGLE_CREDENTIALS=='true' AND DISTRIB[DISTRIBUTION, HIVE_VERSION].isGoogleDataprocDistribution[])">
SHOW_IF="(isShow[DEFINE_PATH_TO_GOOGLE_CREDENTIALS]) AND (DEFINE_PATH_TO_GOOGLE_CREDENTIALS=='true') AND (CONNECTION_MODE=='DATAPROC')">
<DEFAULT>""</DEFAULT>
</PARAMETER>
<!-- END GOOGLE DATAPROC -->
<PARAMETER NAME="SCHEMA_FLOW" FIELD="SCHEMA_TYPE" NUM_ROW="60">
<DEFAULT>""</DEFAULT>
</PARAMETER>
@@ -759,15 +760,23 @@
<IMPORT NAME="parquet-hive-bundle-1.5.0" MODULE="parquet-hive-bundle-1.5.0.jar"
MVN="mvn:org.talend.libraries/parquet-hive-bundle-1.5.0/6.0.0"
UrlPath="platform:/plugin/org.talend.libraries.hadoop/lib/parquet-hive-bundle-1.5.0.jar"
REQUIRED_IF="(DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportOldImportMode[] AND USE_EXISTING_CONNECTION=='false' AND USE_PARQUET=='true' AND DISTRIBUTION!='PIVOTAL_HD' AND DISTRIBUTION!='CUSTOM' AND HIVE_VERSION!='HDP_2_3' AND HIVE_VERSION!='MAPR2' AND HIVE_VERSION!='APACHE_1_0_0')" />
REQUIRED_IF="(DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportOldImportMode[] AND USE_EXISTING_CONNECTION=='false' AND USE_PARQUET=='true' AND DISTRIBUTION!='CUSTOM')" />
<IMPORT NAME="parquet-hive-bundle-1.3.2" MODULE="parquet-hive-bundle-1.3.2.jar"
MVN="mvn:org.talend.libraries/parquet-hive-bundle-1.3.2/6.0.0"
UrlPath="platform:/plugin/org.talend.libraries.hadoop/lib/parquet-hive-bundle-1.3.2.jar"
REQUIRED_IF="(DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportOldImportMode[] AND USE_EXISTING_CONNECTION=='false' AND USE_PARQUET=='true' AND DISTRIBUTION=='PIVOTAL_HD' AND HIVE_VERSION!='PIVOTAL_HD_1_0_1')" />
REQUIRED_IF="(DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportOldImportMode[] AND USE_EXISTING_CONNECTION=='false' AND USE_PARQUET=='true')" />
<IMPORT NAME="snappy-java-1.0.5.jar" MODULE="snappy-java-1.0.5.jar"
MVN="mvn:org.talend.libraries/snappy-java-1.0.5/6.0.0"
REQUIRED_IF="(DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportOldImportMode[] AND USE_EXISTING_CONNECTION=='false' AND USE_PARQUET=='true' AND DISTRIBUTION!='CUSTOM' AND HIVE_VERSION!='MAPR2' AND HIVE_VERSION!='APACHE_1_0_0' AND HIVE_VERSION!='PIVOTAL_HD_1_0_1')" />
REQUIRED_IF="(DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportOldImportMode[] AND USE_EXISTING_CONNECTION=='false' AND USE_PARQUET=='true' AND DISTRIBUTION!='CUSTOM')" />
<!-- Dataproc 2.x -->
<IMPORT MODULE_GROUP="DATAPROC-LAUNCHER-DI"
REQUIRED_IF="(USE_EXISTING_CONNECTION=='false') AND (CONNECTION_MODE=='DATAPROC')" REQUIRED="false"/>
<!-- Spark universal 3.1.x -->
<IMPORT MODULE_GROUP="UNIVERSAL-SPARK-3.1.X"
REQUIRED_IF="(USE_EXISTING_CONNECTION=='false') AND (CONNECTION_MODE=='STANDALONE') AND DISTRIB[DISTRIBUTION, HIVE_VERSION].doSupportUniversalLocalMode[]" REQUIRED="false"/>
</IMPORTS>
</CODEGENERATION>

View File

@@ -30,21 +30,25 @@ boolean usePrepareStatement = "true".equals(ElementParameterParser.getValue(node
String dbquery= ElementParameterParser.getValue(node, "__QUERY__");
dbquery = org.talend.core.model.utils.NodeUtil.replaceCRLFInMEMO_SQL(dbquery);
final String studioVersion = org.talend.commons.utils.VersionUtils.getDisplayVersion();
String encryptedToken = null;
String theDistribution = ElementParameterParser.getValue(node, "__DISTRIBUTION__");
String theVersion = ElementParameterParser.getValue(node, "__HIVE_VERSION__");
final String studioVersion = org.talend.commons.utils.VersionUtils.getDisplayVersion();
String encryptedToken = null;
if("true".equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"))) {
String connection = ElementParameterParser.getValue(node, "__CONNECTION__");
for (INode pNode : node.getProcess().getNodesOfType("tHiveConnection")) {
if(connection!=null && connection.equals(pNode.getUniqueName())) {
theDistribution = ElementParameterParser.getValue(pNode, "__DISTRIBUTION__");
theVersion = ElementParameterParser.getValue(pNode, "__HIVE_VERSION__");
}
String connMode = ElementParameterParser.getValue(node, "__CONNECTION_MODE__");
if("true".equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"))) {
String connection = ElementParameterParser.getValue(node, "__CONNECTION__");
node.getProcess().getNodesOfType("tHiveConnection").stream()
.filter(pNode -> connection!=null && connection.equals(pNode.getUniqueName()) )
.findFirst()
.ifPresent(pNode -> {
theDistribution = ElementParameterParser.getValue(pNode, "__DISTRIBUTION__");
theVersion = ElementParameterParser.getValue(pNode, "__HIVE_VERSION__");
connMode = ElementParameterParser.getValue(pNode, "__CONNECTION_MODE__");
});
}
}
org.talend.hadoop.distribution.component.HiveComponent hiveDistrib = null;
try {
@@ -88,7 +92,7 @@ if(hiveDistrib.isExecutedThroughWebHCat()) {
%>
}
<%
} else if (hiveDistrib.isGoogleDataprocDistribution()) {
} else if("DATAPROC".equalsIgnoreCase(connMode)) { // Dataproc
if(isLog4jEnabled) {
%>
log.debug("Query for <%=cid%>: " + query_<%=cid %>.replace("';'", "'\\;'") + ";");
@@ -120,7 +124,7 @@ if(hiveDistrib.isExecutedThroughWebHCat()) {
%>
}
<%
} else { // normal mode
} else { //Standalone mode
List<Map<String, String>> prepareStatementParameters = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node, "__SET_PREPAREDSTATEMENT_PARAMETERS__");
String incomingConnName = null;
@@ -331,3 +335,4 @@ globalMap.put("<%=cid%>_ERROR_MESSAGE",e.getMessage());
}
}
%>

View File

@@ -76,6 +76,7 @@ HIVE_SERVER.ITEM.HIVE2=Hive 2
CONNECTION_MODE.NAME=Connection mode
CONNECTION_MODE.ITEM.EMBEDDED=Embedded
CONNECTION_MODE.ITEM.STANDALONE=Standalone
CONNECTION_MODE.ITEM.DATAPROC=Dataproc
SET_TEMP_PATH.NAME=Set temporary path
TEMP_PATH.NAME=
TEMP_PATH_GROUP.NAME=Temporary Path

View File

@@ -424,36 +424,57 @@
if(<%= mainInputTableName %> == null) {
<%= mainInputTableName %> = new <%= realMainConnection.getName() %>Struct();
}
<%
<%
} // T_TM_M_291
if(!hasPersistentLookup) {
for (int iInputTable = 1; iInputTable < sizeInputTables; iInputTable++) {
final ExternalMapperTable externalTable = inputTables.get(iInputTable);
final String tableName = externalTable.getName();
final IConnection connection = hNameToConnection.get(tableName);
if (connection == null) {
continue;
}
final EConnectionType connectionType = connection.getLineStyle();
if (connectionType == EConnectionType.FLOW_REF) {//lookup line
final List<ExternalMapperTableEntry> metadataTableEntries = externalTable.getMetadataTableEntries();
if (metadataTableEntries == null) {
continue;
}
if (!isVirtualIn) {
%>
<%=tableName %>Struct <%=tableName %> = null;
<%
}
}
}
}
if (!dieonerror) {
tryOffset = stringBuffer.length();
} // close dieonerror if check
%>
// ###############################
// # Input tables (lookups)
<%
<%
if (!dieonerror) {
tryOffset = stringBuffer.length();
ArrayList<ExternalMapperTable> inputTablesWithInnerJoin = new ArrayList<ExternalMapperTable>();
boolean hasValidLookupTables = false;
} // close dieonerror if check
int closeBracketCounter = 0;
%>
// ###############################
// # Input tables (lookups)
<%
ArrayList<ExternalMapperTable> inputTablesWithInnerJoin = new ArrayList<ExternalMapperTable>();
boolean hasValidLookupTables = false;
int closeBracketCounter = 0;
%>
boolean <%= rejectedInnerJoin %> = false;
boolean <%= mainRowRejected %> = false;
boolean <%= rejectedInnerJoin %> = false;
boolean <%= mainRowRejected %> = false;
<%
String previousLookupName = null;
String previousTableName = mainInputTableName;
int previousJoinedTablesPersistentSortedDelimited = 0;
int nextJoinedTableIndex = currentJoinedTableIndex;
@@ -467,7 +488,7 @@
List<String> declarationsStructForNextSortedWhile = new ArrayList<String>();
List<String> closeAllRowsBlockCount = new ArrayList<String>();
for (int iInputTable = 0; iInputTable < sizeInputTables; iInputTable++) { // T_TM_M_261
for (int iInputTable = 0; iInputTable < sizeInputTables; iInputTable++) { // T_TM_M_261
ExternalMapperTable externalTable = inputTables.get(iInputTable);
boolean isMultipleResultMode = false;
@@ -696,7 +717,7 @@
hasValidLookupTables = true;
String matchingMode = externalTable.getMatchingMode();
String matchingMode = externalTable.getMatchingMode();
if(matchingMode == null) {
if(aKeysValues.length > 0) {
matchingMode = "UNIQUE_MATCH";
@@ -999,7 +1020,9 @@
} // T 52
%>
<%= tableName %>Struct <%= tableName %> = null;
<%if(hasPersistentLookup) {%>
<%=tableName %>Struct <%=tableName %> = null;
<%}%>
<%
if(isMultipleResultMode) { // T 60
@@ -1369,6 +1392,7 @@
boolean atLeastOneInputTableWithInnerJoin = !inputTablesWithInnerJoin.isEmpty();
if (!dieonerror) {
//here mean disable TDI-45732 for some special case, is a workaround fix
if(gm.getBlocksCodeToClose()!=null && gm.getBlocksCodeToClose().size()>0){
%>
try {

View File

@@ -48,7 +48,7 @@
REPOSITORY_VALUE="DRIVER_VERSION">
<ITEMS DEFAULT="DRIVER_V2">
<ITEM NAME="DRIVER_V1" VALUE="DRIVER_V1" />
<ITEM NAME="DRIVER_V2" VALUE="DRIVER_VERSION" />
<ITEM NAME="DRIVER_V2" VALUE="DRIVER_V2" />
</ITEMS>
</PARAMETER>

View File

@@ -61,4 +61,4 @@ ENCODING.ITEM.AL16UTF16=AL16UTF16
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere) and above

View File

@@ -61,4 +61,4 @@ ENCODING.ITEM.AL16UTF16=AL16UTF16
DB_VERSION.NAME=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30D0\u30FC\u30B8\u30E7\u30F3
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)\u4EE5\u964D

View File

@@ -61,4 +61,4 @@ ENCODING.ITEM.AL16UTF16=AL16UTF16
DB_VERSION.NAME=\u6570\u636E\u5E93\u7248\u672C
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere) \u53CA\u66F4\u9AD8\u7248\u672C

View File

@@ -17,4 +17,4 @@ SCHEMA_DB.NAME=Schema
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere) and above

View File

@@ -17,4 +17,4 @@ SCHEMA_DB.NAME=\u30B9\u30AD\u30FC\u30DE
DB_VERSION.NAME=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30D0\u30FC\u30B8\u30E7\u30F3
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)\u4EE5\u964D

View File

@@ -17,4 +17,4 @@ SCHEMA_DB.NAME=Schema
DB_VERSION.NAME=\u6570\u636E\u5E93\u7248\u672C
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere) \u53CA\u66F4\u9AD8\u7248\u672C

View File

@@ -48,7 +48,7 @@ DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12
DB_VERSION.ITEM.SYBSEIQ_15=Sybase 15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere) and above
DATA_SOURCE.NAME=Data Source
DATA_SOURCE.ITEM.DATA_SOURCE_NAME=DSN
DATA_SOURCE.ITEM.FILE_DATA_SOURCE_NAME=FILEDSN

View File

@@ -48,7 +48,7 @@ DB_VERSION.NAME=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30D0\u30FC\u30B8\u30E7\u30
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12
DB_VERSION.ITEM.SYBSEIQ_15=Sybase 15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)\u4EE5\u964D
DATA_SOURCE.NAME=\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9
DATA_SOURCE.ITEM.DATA_SOURCE_NAME=DSN
DATA_SOURCE.ITEM.FILE_DATA_SOURCE_NAME=FileDSN

View File

@@ -48,7 +48,7 @@ DB_VERSION.NAME=\u6570\u636E\u5E93\u7248\u672C
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12
DB_VERSION.ITEM.SYBSEIQ_15=Sybase 15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere) \u53CA\u66F4\u9AD8\u7248\u672C
DATA_SOURCE.NAME=\u6570\u636E\u6E90
DATA_SOURCE.ITEM.DATA_SOURCE_NAME=DSN
DATA_SOURCE.ITEM.FILE_DATA_SOURCE_NAME=FILEDSN

View File

@@ -55,7 +55,7 @@ DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12
DB_VERSION.ITEM.SYBSEIQ_15=Sybase 15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere) and above
DATA_SOURCE.NAME=Data Source
DATA_SOURCE.ITEM.DATA_SOURCE_NAME=DSN
DATA_SOURCE.ITEM.FILE_DATA_SOURCE_NAME=FILEDSN

View File

@@ -55,7 +55,7 @@ DB_VERSION.NAME=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30D0\u30FC\u30B8\u30E7\u30
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12
DB_VERSION.ITEM.SYBSEIQ_15=Sybase 15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)\u4EE5\u964D
DATA_SOURCE.NAME=\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9
DATA_SOURCE.ITEM.DATA_SOURCE_NAME=DSN
DATA_SOURCE.ITEM.FILE_DATA_SOURCE_NAME=FileDSN

View File

@@ -55,7 +55,7 @@ DB_VERSION.NAME=\u6570\u636E\u5E93\u7248\u672C
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12
DB_VERSION.ITEM.SYBSEIQ_15=Sybase 15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere) \u53CA\u66F4\u9AD8\u7248\u672C
DATA_SOURCE.NAME=\u6570\u636E\u6E90
DATA_SOURCE.ITEM.DATA_SOURCE_NAME=DSN
DATA_SOURCE.ITEM.FILE_DATA_SOURCE_NAME=FILEDSN

View File

@@ -40,7 +40,7 @@ PROPERTIES.NAME=Additional JDBC Parameters
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere) and above
SET_QUERY_TIMEOUT.NAME=Set Query Timeout
QUERY_TIMEOUT_IN_SECONDS.NAME=Timeout (seconds)

View File

@@ -40,7 +40,7 @@ PROPERTIES.NAME=\u8FFD\u52A0\u306EJDBC\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC
DB_VERSION.NAME=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30D0\u30FC\u30B8\u30E7\u30F3
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)\u4EE5\u964D
SET_QUERY_TIMEOUT.NAME=\u30AF\u30A8\u30EA\u30FC\u30BF\u30A4\u30E0\u30A2\u30A6\u30C8\u3092\u8A2D\u5B9A
QUERY_TIMEOUT_IN_SECONDS.NAME=\u30BF\u30A4\u30E0\u30A2\u30A6\u30C8\uFF08\u79D2\uFF09

View File

@@ -40,7 +40,7 @@ PROPERTIES.NAME=\u9644\u52A0 JDBC \u53C2\u6570
DB_VERSION.NAME=\u6570\u636E\u5E93\u7248\u672C
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere) \u53CA\u66F4\u9AD8\u7248\u672C
SET_QUERY_TIMEOUT.NAME=\u8BBE\u7F6E\u67E5\u8BE2\u8D85\u65F6
QUERY_TIMEOUT_IN_SECONDS.NAME=\u8D85\u65F6 (\u79D2)

View File

@@ -88,6 +88,6 @@ QUERY_TIMEOUT_IN_SECONDS.NAME=Timeout (seconds)
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere) and above
USE_ALTERNATE_SCHEMA.NAME=Use alternate schema
ALTERNATE_SCHEMA.NAME=Schema

View File

@@ -88,6 +88,6 @@ QUERY_TIMEOUT_IN_SECONDS.NAME=\u30BF\u30A4\u30E0\u30A2\u30A6\u30C8\uFF08\u79D2\u
DB_VERSION.NAME=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30D0\u30FC\u30B8\u30E7\u30F3
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)\u4EE5\u964D
USE_ALTERNATE_SCHEMA.NAME=\u4EE3\u66FF\u30B9\u30AD\u30FC\u30DE\u3092\u4F7F\u7528
ALTERNATE_SCHEMA.NAME=\u30B9\u30AD\u30FC\u30DE

View File

@@ -88,6 +88,6 @@ QUERY_TIMEOUT_IN_SECONDS.NAME=\u8D85\u65F6 (\u79D2)
DB_VERSION.NAME=\u6570\u636E\u5E93\u7248\u672C
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere) \u53CA\u66F4\u9AD8\u7248\u672C
USE_ALTERNATE_SCHEMA.NAME=\u4F7F\u7528\u5907\u7528 schema
ALTERNATE_SCHEMA.NAME=Schema

View File

@@ -62,4 +62,4 @@ SYBASE_ENCODING.ITEM.AL16UTF16=AL16UTF16
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere) and above

View File

@@ -62,4 +62,4 @@ SYBASE_ENCODING.ITEM.AL16UTF16=AL16UTF16
DB_VERSION.NAME=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30D0\u30FC\u30B8\u30E7\u30F3
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)\u4EE5\u964D

View File

@@ -62,4 +62,4 @@ SYBASE_ENCODING.ITEM.AL16UTF16=AL16UTF16
DB_VERSION.NAME=\u6570\u636E\u5E93\u7248\u672C
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere) \u53CA\u66F4\u9AD8\u7248\u672C

View File

@@ -68,7 +68,7 @@ SET_PREPAREDSTATEMENT_PARAMETERS.ITEM.PARAMETER_VALUE=Parameter Value
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere) and above
SET_QUERY_TIMEOUT.NAME=Set Query Timeout
QUERY_TIMEOUT_IN_SECONDS.NAME=Timeout (seconds)

View File

@@ -68,7 +68,7 @@ SET_PREPAREDSTATEMENT_PARAMETERS.ITEM.PARAMETER_VALUE=\u30D1\u30E9\u30E1\u30FC\u
DB_VERSION.NAME=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30D0\u30FC\u30B8\u30E7\u30F3
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)\u4EE5\u964D
SET_QUERY_TIMEOUT.NAME=\u30AF\u30A8\u30EA\u30FC\u30BF\u30A4\u30E0\u30A2\u30A6\u30C8\u3092\u8A2D\u5B9A
QUERY_TIMEOUT_IN_SECONDS.NAME=\u30BF\u30A4\u30E0\u30A2\u30A6\u30C8\uFF08\u79D2\uFF09

View File

@@ -68,7 +68,7 @@ SET_PREPAREDSTATEMENT_PARAMETERS.ITEM.PARAMETER_VALUE=\u53C2\u6570\u503C
DB_VERSION.NAME=\u6570\u636E\u5E93\u7248\u672C
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere) \u53CA\u66F4\u9AD8\u7248\u672C
SET_QUERY_TIMEOUT.NAME=\u8BBE\u7F6E\u67E5\u8BE2\u8D85\u65F6
QUERY_TIMEOUT_IN_SECONDS.NAME=\u8D85\u65F6 (\u79D2)

View File

@@ -91,4 +91,4 @@ REJECT.MENU=Rejects
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere) and above

View File

@@ -91,4 +91,4 @@ REJECT.MENU=\u30EA\u30B8\u30A7\u30AF\u30C8
DB_VERSION.NAME=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30D0\u30FC\u30B8\u30E7\u30F3
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)\u4EE5\u964D

View File

@@ -91,4 +91,4 @@ REJECT.MENU=\u62D2\u7EDD
DB_VERSION.NAME=\u6570\u636E\u5E93\u7248\u672C
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere) \u53CA\u66F4\u9AD8\u7248\u672C

View File

@@ -84,4 +84,4 @@ FIELD_VALUE_INC_NULL.NAME=Source fields value include Null
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere) and above

View File

@@ -84,4 +84,4 @@ FIELD_VALUE_INC_NULL.NAME=\u30BD\u30FC\u30B9\u30D5\u30A3\u30FC\u30EB\u30C9\u306E
DB_VERSION.NAME=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30D0\u30FC\u30B8\u30E7\u30F3
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)\u4EE5\u964D

View File

@@ -84,4 +84,4 @@ FIELD_VALUE_INC_NULL.NAME=\u6E90\u5B57\u6BB5\u503C\u5305\u62EC Null
DB_VERSION.NAME=\u6570\u636E\u5E93\u7248\u672C
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere) \u53CA\u66F4\u9AD8\u7248\u672C

View File

@@ -31,4 +31,4 @@ DB_SCHEMA.NAME=Sybase Schema
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere) and above

View File

@@ -31,4 +31,4 @@ DB_SCHEMA.NAME=Sybase \u30B9\u30AD\u30FC\u30DE
DB_VERSION.NAME=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30D0\u30FC\u30B8\u30E7\u30F3
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)\u4EE5\u964D

View File

@@ -31,4 +31,4 @@ DB_SCHEMA.NAME=Sybase Schema
DB_VERSION.NAME=\u6570\u636E\u5E93\u7248\u672C
DB_VERSION.ITEM.SYBSEIQ_12_15=Sybase 12/15
DB_VERSION.ITEM.SYBSEIQ_16=Sybase 16
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere)
DB_VERSION.ITEM.SYBSEIQ_16_SA=Sybase 16 (SQL Anywhere) \u53CA\u66F4\u9AD8\u7248\u672C

View File

@@ -148,7 +148,11 @@ imports="
<%
if (("oracle_id".equalsIgnoreCase(dbms))) {
%>
if("LONG".equals(rsmd_<%=cid%>.getColumnTypeName(i).toUpperCase())) {
if("NUMBER".equalsIgnoreCase(rsmd_<%=cid%>.getColumnTypeName(i))) {
<% // a way to fix TDI-47895 %>
int length = rsmd_<%=cid%>.getPrecision(i);
dcm_<%=cid%>.setLength(length > 38 ? 38 : length);
} else if("LONG".equals(rsmd_<%=cid%>.getColumnTypeName(i).toUpperCase())) {
String length = MetadataTalendType.getDefaultDBTypes("oracle_id", "LONG", MetadataTalendType.DEFAULT_LENGTH);
if(length!=null && !("".equals(length))) {
dcm_<%=cid%>.setLength(Integer.parseInt(length));

View File

@@ -1,6 +1,4 @@
Component.componentNotExist=<Composant :{0}> Connecteur \\"{1}\\" d\u00E9fini mais n'existe pas.
GenericHiddenTextController.NewPassword=Saisissez un nouveau mot de passe
GenericHiddenTextController.NoteConvention=Note : suivez la convention Java qui n\u00E9cessite que le texte soit entour\u00E9 de guillemets doubles.
SchemaReferenceController.copyChildSchema=Copier le sch\u00E9ma du Job enfant
SchemaReferenceController.copyChildSchema.tooltip=Importer le sch\u00E9ma du tBufferOutput \u00E0 partir du Job enfant
SchemaReferenceController.editSchema=Modifier le sch\u00E9ma

View File

@@ -1,6 +1,4 @@
Component.componentNotExist=<Component \\\uFF1A{0}> Connector \\\u201C{1} \\\u201D\u5B9A\u4E49\uFF0C\u4F46\u4E0D\u5B58\u5728\u3002
GenericHiddenTextController.NewPassword=\u8F93\u5165\u65B0\u5BC6\u7801
GenericHiddenTextController.NoteConvention=\u6CE8\u610F\uFF1A\u8BF7\u9075\u5FAA\u5E38\u89C4\u7684 Java \u60EF\u4F8B\uFF0C\u5373\u6587\u672C\u5FC5\u987B\u7F6E\u4E8E\u53CC\u5F15\u53F7\u5185\u3002
SchemaReferenceController.copyChildSchema=\u590D\u5236\u5B50\u4F5C\u4E1A Schema
SchemaReferenceController.copyChildSchema.tooltip=\u4ECE\u5B50\u4F5C\u4E1A\u5BFC\u5165 tBufferOutput schema
SchemaReferenceController.editSchema=\u7F16\u8F91 schema

View File

@@ -907,6 +907,16 @@ GlobalVariableProposal.VariableName=\n\nNom de la variable : {1}
PaserRuleSelectionDialog.RULE_NAME=Nom de la r\u00E8gle
PaserRuleSelectionDialog.RULE_TYPE=Type de r\u00E8gle
PaserRuleSelectionDialog.RULE_VALUE=Valeur de la r\u00E8gle
PasswordDialog.title=Saisissez un nouveau mot de passe
PasswordDialog.note.javaMode=Note\u00A0: Suivez la convention Java qui n\u00E9cessite que le texte soit entour\u00E9 de guillemets doubles. Ou {0}
PasswordDialog.note.pwdMode=Note\u00A0: Toutes les entr\u00E9es seront consid\u00E9r\u00E9es comme une cha\u00EEne de caract\u00E8res de mot de passe. Pour utiliser une expression ou un contexte Java, {0}
PasswordDialog.note.onlyPwdMode=Note\u00A0: Toutes les entr\u00E9es seront consid\u00E9r\u00E9es comme une cha\u00EEne de caract\u00E8res de mot de passe.
PasswordDialog.note.onlyJavaMode=Note : suivez la convention Java qui n\u00E9cessite que le texte soit entour\u00E9 de guillemets doubles.
PasswordDialog.switchTo.javaMode=Passer en mode Java
PasswordDialog.switchTo.pwdMode=Passer en mode mot de passe pur
PasswordDialog.lineSeperator.label=S\u00E9parateur de lignes\u00A0:
PasswordDialog.lineSeperator.crlf=CRLF (Windows)
PasswordDialog.lineSeperator.lf=LF (Unix)
PasswordController.NewPassword=Saisissez un nouveau mot de passe
LicenseKeyController.NewLicenseKey=Saisissez une nouvelle cl\u00E9 de licence
PasswordController.NoteConvention=Note : suivez la convention Java qui n\u00E9cessite que le texte soit entour\u00E9 de guillemets doubles.

View File

@@ -907,6 +907,16 @@ GlobalVariableProposal.VariableName=\n\n\u53D8\u91CF\u540D\uFF1A {1}
PaserRuleSelectionDialog.RULE_NAME=\u89C4\u5219\u540D\u79F0
PaserRuleSelectionDialog.RULE_TYPE=\u89C4\u5219\u7C7B\u578B
PaserRuleSelectionDialog.RULE_VALUE=\u89C4\u5219\u503C
PasswordDialog.title=\u8F93\u5165\u65B0\u5BC6\u7801
PasswordDialog.note.javaMode=\u6CE8\u610F\uFF1A\u8BF7\u9075\u5FAA\u5E38\u89C4\u7684 Java \u60EF\u4F8B\uFF0C\u5373\u6587\u672C\u5FC5\u987B\u7F6E\u4E8E\u53CC\u5F15\u53F7\u5185\u3002\u6216\u8005{0}
PasswordDialog.note.pwdMode=\u6CE8\u610F\uFF1A\u6240\u6709\u8F93\u5165\u90FD\u5C06\u88AB\u89C6\u4E3A\u5BC6\u7801\u5B57\u4E32\u3002\u5982\u9700\u4F7F\u7528 Java \u8868\u8FBE\u5F0F\u6216\u4E0A\u4E0B\u6587\u53D8\u91CF\uFF0C{0}
PasswordDialog.note.onlyPwdMode=\u6CE8\u610F\uFF1A\u6240\u6709\u8F93\u5165\u90FD\u5C06\u88AB\u89C6\u4E3A\u5BC6\u7801\u5B57\u4E32\u3002
PasswordDialog.note.onlyJavaMode=\u6CE8\u610F\uFF1A\u8BF7\u9075\u5FAA\u5E38\u89C4\u7684 Java \u60EF\u4F8B\uFF0C\u5373\u6587\u672C\u5FC5\u987B\u7F6E\u4E8E\u53CC\u5F15\u53F7\u5185\u3002
PasswordDialog.switchTo.javaMode=\u5207\u6362\u5230 Java \u6A21\u5F0F
PasswordDialog.switchTo.pwdMode=\u5207\u6362\u5230\u7EAF\u5BC6\u7801\u6A21\u5F0F
PasswordDialog.lineSeperator.label=\u884C\u5206\u9694\u7B26\uFF1A
PasswordDialog.lineSeperator.crlf=CRLF (Windows)
PasswordDialog.lineSeperator.lf=LF (Unix)
PasswordController.NewPassword=\u8F93\u5165\u65B0\u5BC6\u7801
LicenseKeyController.NewLicenseKey=\u8F93\u5165\u65B0\u7684\u8BB8\u53EF\u8BC1\u5BC6\u94A5
PasswordController.NoteConvention=\u6CE8\u610F\uFF1A\u8BF7\u9075\u5FAA\u5E38\u89C4\u7684 Java \u60EF\u4F8B\uFF0C\u5373\u6587\u672C\u5FC5\u987B\u7F6E\u4E8E\u53CC\u5F15\u53F7\u5185\u3002

View File

@@ -29,6 +29,7 @@ import org.eclipse.jdt.ui.JavadocContentAccess;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IEditorReference;
import org.eclipse.ui.IViewPart;
@@ -36,8 +37,10 @@ import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.MultiPageEditorPart;
import org.talend.camel.core.model.camelProperties.CamelPropertiesPackage;
import org.talend.commons.CommonsPlugin;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.ui.gmf.util.DisplayUtils;
import org.talend.core.CorePlugin;
import org.talend.core.model.components.ComponentCategory;
import org.talend.core.model.components.IComponent;
@@ -72,12 +75,14 @@ import org.talend.core.ui.context.view.Contexts;
import org.talend.core.utils.CsvArray;
import org.talend.designer.core.convert.IProcessConvertService;
import org.talend.designer.core.convert.ProcessConvertManager;
import org.talend.designer.core.convert.ProcessConverterType;
import org.talend.designer.core.debug.JobLaunchShortcutManager;
import org.talend.designer.core.i18n.Messages;
import org.talend.designer.core.model.components.DummyComponent;
import org.talend.designer.core.model.components.EParameterName;
import org.talend.designer.core.model.components.EmfComponent;
import org.talend.designer.core.model.components.Expression;
import org.talend.designer.core.model.process.AbstractProcessProvider;
import org.talend.designer.core.model.process.DataNode;
import org.talend.designer.core.model.utils.emf.talendfile.ParametersType;
import org.talend.designer.core.ui.AbstractMultiPageTalendEditor;
@@ -270,8 +275,16 @@ public class DesignerCoreService implements IDesignerCoreService {
*/
@Override
public IProcess getCurrentProcess() {
IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
if (!(editor instanceof AbstractMultiPageTalendEditor)) {
IEditorPart editor;
if (Display.getCurrent() == null) {
List<IEditorPart> list = new ArrayList<>();
DisplayUtils.getDisplay().syncExec(
() -> list.add(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor()));
editor = list.get(0);
} else {
editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
}
if (editor == null || !(editor instanceof AbstractMultiPageTalendEditor)) {
return null;
}
IProcess process = ((AbstractMultiPageTalendEditor) editor).getProcess();
@@ -890,4 +903,20 @@ public class DesignerCoreService implements IDesignerCoreService {
public String[] getNeedRemoveModulesForLog4j() {
return UpdateLog4jJarUtils.NEED_REMOVE_MODULES;
}
@Override
public IProcess getJobletProcessByItem(Item item) {
if (item.eClass() == CamelPropertiesPackage.Literals.ROUTELET_PROCESS_ITEM) {
return getProcessFromItemByExtendion(item,true);
}
AbstractProcessProvider jobletProcessProvider = AbstractProcessProvider
.findProcessProviderFromPID(IComponent.JOBLET_PID);
if (jobletProcessProvider != null) {
return jobletProcessProvider.buildNewGraphicProcess(item, true);
}
return null;
}
}

View File

@@ -505,7 +505,7 @@ public class ChangeValuesFromRepository extends ChangeMetadataCommand {
}
}
JobSettingVersionUtil.setDbVersion(elementParameter, dbVersion, false);
JobSettingVersionUtil.setDbVersion(elementParameter, dbType, dbVersion, false);
DesignerUtilities.setSchemaDB(elementParameter2, param.getValue());
} else if (param.getFieldType().equals(EParameterFieldType.CLOSED_LIST)
&& "FRAMEWORK_TYPE".equals(param.getRepositoryValue())) { //$NON-NLS-1$

View File

@@ -82,8 +82,6 @@ public class Connection extends Element implements IConnection, IPerformance, IA
private INode source;
protected String name;
protected String originalName;
private ConnectionLabel label;
@@ -865,11 +863,6 @@ public class Connection extends Element implements IConnection, IPerformance, IA
public String getName() {
return name;
}
@Override
public String getOriginalName() {
return originalName;
}
/**
*
@@ -952,11 +945,6 @@ public class Connection extends Element implements IConnection, IPerformance, IA
}
}
@Override
public void setOriginalName(String orignalName) {
this.originalName = orignalName;
}
@Override
public void updateName() {
if (source == null) {

View File

@@ -300,9 +300,14 @@ public class PropertiesTableEditorView<B> extends AbstractPropertiesTableEditorV
column.setModifiable((param.getElement() instanceof FakeElement || !param.isRepositoryValueUsed()) && (!param.isReadOnly())
&& (!currentParam.isReadOnly()));
ModuleListCellEditor moduleEditor = new ModuleListCellEditor(table, currentParam, param);
ModuleTableLabelProvider labelProvider = new ModuleTableLabelProvider();
if (isTacokit(currentParam)) {
labelProvider.setDriversKey(currentParam.getName());
}
moduleEditor.setTableEditorView(this);
column.setCellEditor(moduleEditor);
column.setLabelProvider(new ModuleTableLabelProvider());
column.setLabelProvider(labelProvider);
break;
case COLOR:
column.setModifiable((!param.isRepositoryValueUsed()) && (!param.isReadOnly())
@@ -920,6 +925,15 @@ public class PropertiesTableEditorView<B> extends AbstractPropertiesTableEditorV
}
}
private boolean isTacokit(IElementParameter param) {
boolean isTacokit = false;
if (param instanceof ElementParameter) {
Object sourceName = ((ElementParameter) param).getTaggedValue("org.talend.sdk.component.source"); //$NON-NLS-1$
isTacokit = "tacokit".equalsIgnoreCase(String.valueOf(sourceName)); //$NON-NLS-1$
}
return isTacokit;
}
private boolean isEBCDICNode(INode node) {
if (PluginChecker.isEBCDICPluginLoaded()) {
IEBCDICProviderService service = GlobalServiceRegister.getDefault().getService(
@@ -1038,10 +1052,20 @@ public class PropertiesTableEditorView<B> extends AbstractPropertiesTableEditorV
private final String[] KEYS = new String[] { "drivers", "JAR_NAME" };
private String driversKey;
public void setDriversKey(String driversKey) {
this.driversKey = driversKey;
}
@Override
public String getLabel(Object bean) {
if (bean instanceof Map) {
Map<String, String> valueMap = (Map<String, String>) bean;
if (StringUtils.isNotBlank(driversKey) && valueMap.containsKey(driversKey)) {
return getModuleName(valueMap.get(driversKey));
}
for (String key : KEYS) {
if (valueMap.containsKey(key)) {
String value = valueMap.get(key);

View File

@@ -134,9 +134,9 @@ public class StatsAndLogsConstants {
"jtds-1.3.1-patch-20190523.jar", "mssql-jdbc.jar"};//$NON-NLS-1$ //$NON-NLS-2$
public static final String[] DB_VERSION_DISPLAY = new String[] {"Oracle 18 and above", "Oracle 12", "Oracle 11", "Oracle 10", "Oracle 9",
"Oracle 8", "MySQL 5", "MariaDB", "Open source JTDS", "Microsoft", "Access 2003", "Access 2007", "Prior to v9",
"v9 +", "Sybase 16 (SQL Anywhere)", "Sybase 16", "Sybase 12/15" };
public static final String[] DB_VERSION_DISPLAY = new String[] { "Oracle 18 and above", "Oracle 12", "Oracle 11", "Oracle 10",
"Oracle 9", "Oracle 8", "MySQL 8", "MySQL 5", "MariaDB", "Open source JTDS", "Microsoft", "Access 2003",
"Access 2007", "Prior to v9", "v9 +", "Sybase 16 (SQL Anywhere)", "Sybase 16", "Sybase 12/15" };
public static final String[] DB_VERSION_CODE = new String[] {"ORACLE_18", "ORACLE_12", "ORACLE_11", "ORACLE_10", "ORACLE_9", "ORACLE_8",
@@ -169,7 +169,7 @@ public class StatsAndLogsConstants {
public static final String[] PSQL_VERSION_CODE = new String[] { "V9_X","PRIOR_TO_V9" }; //$NON-NLS-1$ //$NON-NLS-2$
public static final String[] PSQL_VERSION_DRIVER = new String[] {
"postgresql-42.2.14.jar", "postgresql-8.4-703.jdbc4.jar" }; //$NON-NLS-1$ //$NON-NLS-2$
"postgresql-42.2.25.jar", "postgresql-8.4-703.jdbc4.jar" }; //$NON-NLS-1$ //$NON-NLS-2$
public static final String[][] DISPLAY_DBNAMES = new String[][] { PERL_DISPLAY_DBNAMES, JAVA_DISPLAY_DBNAMES };

View File

@@ -0,0 +1,234 @@
// ============================================================================
//
// Copyright (C) 2006-2021 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.designer.documentation.generation;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.List;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.swt.SWT;
import org.osgi.framework.Bundle;
import org.talend.commons.exception.PersistenceException;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
import org.talend.core.CorePlugin;
import org.talend.core.model.general.Project;
import org.talend.core.model.genhtml.HTMLDocUtils;
import org.talend.core.model.genhtml.HTMLHandler;
import org.talend.core.model.genhtml.IHTMLDocConstants;
import org.talend.core.model.genhtml.XMLHandler;
import org.talend.core.model.properties.Item;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.model.repository.documentation.DocumentationHelper;
import org.talend.core.model.utils.RepositoryManagerHelper;
import org.talend.designer.documentation.generation.HTMLDocGenerator;
import org.talend.repository.model.IProxyRepositoryFactory;
import org.talend.repository.model.IRepositoryNode;
import org.talend.repository.model.IRepositoryNode.ENodeType;
import org.talend.repository.model.RepositoryNode;
import org.talend.repository.model.nodes.IProjectRepositoryNode;
import org.talend.repository.ui.views.IRepositoryView;
/**
* ftang class global comment. Detailled comment
*/
public abstract class GenerateDocListHTML extends HTMLDocGenerator {
private static URL xslFileUrl = null;
static {
// Gets the "org.talend.repository.documentation" plug-in:
final Bundle documentationBundle = Platform.getBundle("org.talend.repository.documentation"); //$NON-NLS-1$
try {
xslFileUrl = FileLocator.toFileURL(FileLocator.find(documentationBundle, new Path(
IHTMLDocConstants.GENERATE_ALL_DOC_LIST_XSL), null));
} catch (IOException e) {
ExceptionHandler.process(e);
}
}
/**
* ftang GenerateDocListHTML constructor comment.
*
* @param repositoryObjectType
*/
public GenerateDocListHTML(Project project, ERepositoryObjectType repositoryObjectType, ERepositoryObjectType itemType) {
super(project, repositoryObjectType, itemType);
}
/**
* ftang Comment method "generateItemInfo".
*
* @param jobItemSet
* @param jobName
* @param jobVersion
* @param nodePath
* @param htmlPath
* @return
*/
protected void generateItemInfo(Element jobItemSet, String jobName, String jobVersion, String nodePath, String htmlPath) {
Element item = jobItemSet.addElement("item"); //$NON-NLS-1$
item.addAttribute("version", HTMLDocUtils.checkString(jobVersion)); //$NON-NLS-1$
item.addAttribute("name", HTMLDocUtils.checkString(jobName)); //$NON-NLS-1$
item.addAttribute("path", HTMLDocUtils.checkString(nodePath)); //$NON-NLS-1$
item.addAttribute("link", htmlPath); //$NON-NLS-1$
}
/**
* ftang Comment method "generateDocItemInfo".
*
* @param projectElement
*/
protected void generateDocItemInfo(Element projectElement, boolean allVersions) {
ERepositoryObjectType repositoryObjectType = getRepositoryObjectType();
String itemType = repositoryObjectType.toString().toLowerCase();
Element itemSet = projectElement.addElement("jobitemset"); //$NON-NLS-1$
itemSet.addAttribute("type", itemType); //$NON-NLS-1$
// Step 1: Gets all job nodes on Repository View:
IProxyRepositoryFactory proxyFactory = CorePlugin.getDefault().getRepositoryService().getProxyRepositoryFactory();
try {
if (getItemType() == null) {
return;
}
List<IRepositoryViewObject> docsToCreate = proxyFactory.getAll(getProject(), getItemType(), false, allVersions);
for (IRepositoryViewObject object : docsToCreate) {
if (object.getProperty() == null) {
continue;
}
Item item = object.getProperty().getItem();
if (item == null) {
continue;
}
String jobName = object.getLabel();
String jobVersion = object.getVersion();
String nodePath = item.getState().getPath();
String folderName = jobName + "_" + jobVersion; //$NON-NLS-1$
String htmlFileName = folderName + IHTMLDocConstants.HTML_FILE_SUFFIX;
if (nodePath != null && !nodePath.equals("")) { //$NON-NLS-1$
nodePath = nodePath + IPath.SEPARATOR;
}
String htmlPath = nodePath + folderName + IPath.SEPARATOR + htmlFileName;
generateItemInfo(itemSet, jobName, jobVersion, nodePath, htmlPath);
}
} catch (PersistenceException e) {
ExceptionHandler.process(e);
}
}
/**
* ftang Comment method "generateXMLAndHTML".
*
* @param jobDocListXMLName
* @param jobDocListHTMLName
* @return
*/
protected File generateXMLAndHTML(String jobDocListXMLName, String jobDocListHTMLName, boolean allVersions) {
// Step 1: generate xml file;
Document document = DocumentHelper.createDocument();
Element projectElement = generateProjectInfo(document);
generateDocItemInfo(projectElement, allVersions);
String tempFolderPath = HTMLDocUtils.getTmpFolder();
String xmlFilePath = tempFolderPath + IPath.SEPARATOR + jobDocListXMLName;
// Delete xml file if it exists.
new File(xmlFilePath).deleteOnExit();
XMLHandler.generateXMLFile(tempFolderPath, xmlFilePath, document);
// Step 2: generate html file;
String jobNodeDocumentationRoot = DocumentationHelper.getJobNodeDocumentationRoot(getProject(),
ERepositoryObjectType.getFolderName(getRepositoryObjectType()));
String htmlFilePath = jobNodeDocumentationRoot + IPath.SEPARATOR + jobDocListHTMLName;
HTMLHandler.generateHTMLFile("", xslFileUrl.getFile().toString(), xmlFilePath, htmlFilePath); //$NON-NLS-1$
// Step 2.1: copy the logo file into "pictures" folder.
String picturesFolderPath = jobNodeDocumentationRoot + IPath.SEPARATOR + IHTMLDocConstants.PIC_FOLDER_NAME;
String logoPicTargetFullPath = picturesFolderPath + IPath.SEPARATOR + IHTMLDocConstants.TALEND_LOGO_FILE_NAME;
File targetPicFolder = new File(picturesFolderPath);
File targetPicFullPathFile = new File(logoPicTargetFullPath);
if (targetPicFolder == null || !targetPicFolder.exists()) {
targetPicFolder.mkdir();
}
if (!targetPicFullPathFile.exists()) {
try {
saveLogoImage(SWT.IMAGE_JPEG, targetPicFullPathFile);
} catch (IOException e) {
ExceptionHandler.process(e);
}
}
return new File(htmlFilePath);
}
/**
* ftang Comment method "generate".
*
* @return
*/
public abstract File generate(boolean allVersions);
/**
* ftang Comment method "getCurrentNode".
*
* @return
*/
public RepositoryNode getCurrentNode() {
final IRepositoryView findRepositoryView = RepositoryManagerHelper.findRepositoryView();
if (findRepositoryView == null) {
return null;
}
IProjectRepositoryNode root = findRepositoryView.getRoot();
RepositoryNode jobsDocNode = null;
for (IRepositoryNode node : root.getChildren()) {
if (node.getType() == ENodeType.SYSTEM_FOLDER && node.getContentType() == ERepositoryObjectType.DOCUMENTATION) {
{
for (IRepositoryNode subNode : node.getChildren()) {
if (subNode.getType() == ENodeType.STABLE_SYSTEM_FOLDER
&& subNode.getContentType() == ERepositoryObjectType.GENERATED) {
for (IRepositoryNode nextSubNode : subNode.getChildren()) {
if (nextSubNode.getType() == ENodeType.STABLE_SYSTEM_FOLDER
&& nextSubNode.getContentType() == getRepositoryObjectType()) {
jobsDocNode = (RepositoryNode) nextSubNode;
// stop looping immediately
return jobsDocNode;
}
}
}
}
}
}
}
return jobsDocNode;
}
}

View File

@@ -0,0 +1,169 @@
// ============================================================================
//
// Copyright (C) 2006-2021 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.designer.documentation.generation;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.dom4j.Element;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.emf.common.util.EList;
import org.talend.core.CorePlugin;
import org.talend.core.PluginChecker;
import org.talend.core.model.components.IComponent;
import org.talend.core.model.general.Project;
import org.talend.core.model.genhtml.IHTMLDocConstants;
import org.talend.core.model.process.INode;
import org.talend.core.model.process.IProcess;
import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.JobletProcessItem;
import org.talend.core.model.properties.impl.ProcessItemImpl;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
/**
* ftang class global comment. Detailled comment
*/
public class GenerateJobletDocListHTML extends GenerateDocListHTML {
/**
* ftang GenerateJobletDocListHTML constructor comment.
*
* @param repositoryObjectType
*/
public GenerateJobletDocListHTML(Project project) {
super(project, ERepositoryObjectType.JOBLET_DOC, ERepositoryObjectType.JOBLET);
}
/*
* (non-Javadoc)
*
* @see org.talend.repository.documentation.ui.wizards.htmldocgeneration.GenerateDocListHTML#generate()
*/
@Override
public File generate(boolean allVersions) {
return generateXMLAndHTML(IHTMLDocConstants.JOBLET_DOC_LIST_XML_NAME, IHTMLDocConstants.JOBLET_DOC_LIST_HTML_NAME,
allVersions);
}
/*
* (non-Javadoc)
*
* @see
* org.talend.repository.documentation.generation.HTMLDocGenerator#seperateNodes(org.talend.core.model.properties
* .Item)
*/
@Override
protected List<List> seperateNodes(Item item) {
List<INode> internalNodeComponentList = new ArrayList<INode>();
List<INode> externalNodeComponentList = new ArrayList<INode>();
List<INode> allNodeComponentList = new ArrayList<INode>();
List<List> componentsList = new ArrayList<List>();
IProcess process = null;
if (PluginChecker.isJobLetPluginLoaded() || PluginChecker.isRouteletLoaded()) {
process = CorePlugin.getDefault().getDesignerCoreService().getJobletProcessByItem(item);
}
if (process == null) {
return componentsList;
}
List<INode> graphicalNodeList = (List<INode>) process.getGraphicalNodes();
for (INode node : graphicalNodeList) {
// If component is not activate, do not need to get it's information
if (!node.isActivate()) {
continue;
}
allNodeComponentList.add(node);
if (node.getExternalNode() != null) {
externalNodeComponentList.add(node);
} else {
internalNodeComponentList.add(node);
}
}
componentsList.add(allNodeComponentList);
componentsList.add(internalNodeComponentList);
componentsList.add(externalNodeComponentList);
return componentsList;
}
/*
* (non-Javadoc)
*
* @see
* org.talend.repository.documentation.generation.HTMLDocGenerator#generateAllComponentsSummaryInfo(org.talend.core
* .model.properties.Item, org.dom4j.Element, java.util.List)
*/
@Override
public void generateAllComponentsSummaryInfo(Item item, Element inputJobElement, List<INode> allComponentsList) {
Element componentNameListElement = null;
Point screenshotOffset = new Point();
if (item instanceof JobletProcessItem) {
JobletProcessItem jobletProcessItem = (JobletProcessItem) item;
if (jobletProcessItem.getJobletProcess().getParameters() != null) {
List<ElementParameterType> elemParamList = jobletProcessItem.getJobletProcess().getParameters()
.getElementParameter();
getScreenShotOffset(screenshotOffset, elemParamList);
}
}
if (item instanceof ProcessItemImpl) {
ProcessItemImpl processItem = (ProcessItemImpl) item;
if (processItem.getProcess().getParameters() != null) {
List<ElementParameterType> elemParamList = processItem.getProcess().getParameters()
.getElementParameter();
getScreenShotOffset(screenshotOffset, elemParamList);
}
}
getComponentListInfo(inputJobElement, allComponentsList, componentNameListElement, screenshotOffset);
}
/*
* (non-Javadoc)
*
* @see
* org.talend.repository.documentation.generation.HTMLDocGenerator#getSourceAndTargetConnection(org.talend.core.
* model.properties.Item)
*/
@Override
protected void getSourceAndTargetConnection(Item item) {
if (item instanceof JobletProcessItem) {
EList connectionList = ((JobletProcessItem) item).getJobletProcess().getConnection();
if (connectionList != null && connectionList.size() != 0) {
handleSourceAndTargetConnection(connectionList);
}
}
}
/*
* (non-Javadoc)
*
* @see org.talend.repository.documentation.generation.HTMLDocGenerator#getDocTypeAttribute()
*/
@Override
protected String getDocTypeAttribute() {
return ERepositoryObjectType.JOBLET_DOC.toString();
}
}

View File

@@ -16,6 +16,7 @@ import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -42,15 +43,22 @@ import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Widget;
import org.eclipse.ui.internal.wizards.datatransfer.WizardFileSystemResourceExportPage1;
import org.talend.commons.exception.PersistenceException;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
import org.talend.commons.ui.swt.formtools.LabelledFileField;
import org.talend.core.CorePlugin;
import org.talend.core.PluginChecker;
import org.talend.core.model.properties.ProcessItem;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.model.repository.documentation.generation.JobHTMLScriptsManager;
import org.talend.core.prefs.ITalendCorePrefConstants;
import org.talend.core.repository.model.ProxyRepositoryFactory;
import org.talend.core.repository.model.VersionList;
import org.talend.core.ui.export.ArchiveFileExportOperationFullPath;
import org.talend.designer.documentation.generation.GenerateJobletDocListHTML;
import org.talend.designer.documentation.generation.HTMLDocGenerator;
import org.talend.designer.documentation.utils.DocumentationUtil;
import org.talend.repository.documentation.ExportFileResource;
import org.talend.repository.i18n.Messages;
import org.talend.repository.model.IRepositoryNode.ENodeType;
@@ -60,7 +68,7 @@ import org.talend.repository.model.RepositoryNode;
/**
* Page of the Job Scripts Export Wizard. <br/>
*
* @referto WizardArchiveFileResourceExportPage1 $Id: JobScriptsExportWizardPage.java 1 2006-12-13 下午03:09:07 bqian
* @referto WizardArchiveFileResourceExportPage1 $Id: JobScriptsExportWizardPage.java 1 2006-12-13 ä¸å<EFBFBD>ˆ03:09:07 bqian
*
*/
public class GenerateDocAsHTMLWizardPage extends WizardFileSystemResourceExportPage1 {
@@ -68,6 +76,10 @@ public class GenerateDocAsHTMLWizardPage extends WizardFileSystemResourceExportP
private ExportFileResource[] process;
private JobHTMLScriptsManager manager;
private ExportFileResource[] jobletprocess;
private JobHTMLScriptsManager jobletManager;
private RepositoryNode[] nodes;
@@ -94,9 +106,102 @@ public class GenerateDocAsHTMLWizardPage extends WizardFileSystemResourceExportP
manager = new JobHTMLScriptsManager(new HTMLDocGenerator(nodes[0].getRoot().getProject(),
ERepositoryObjectType.JOB_DOC, ERepositoryObjectType.PROCESS), true);
// for joblet
if (PluginChecker.isJobLetPluginLoaded()) {
jobletManager = new JobHTMLScriptsManager(
new GenerateJobletDocListHTML(nodes[0].getRoot().getProject()), true);
}
}
List<ExportFileResource> list = new ArrayList<ExportFileResource>();
List<ExportFileResource> jobletList = new ArrayList<ExportFileResource>();
List<IRepositoryViewObject> repositoryViewObjects = new ArrayList<IRepositoryViewObject>();
List<IRepositoryViewObject> latestVersionRepositoryViewObjects = new VersionList(false);
try {
repositoryViewObjects = ProxyRepositoryFactory.getInstance().getAll(ERepositoryObjectType.PROCESS, false,
true);
if (ERepositoryObjectType.PROCESS_MR != null) {
List<IRepositoryViewObject> repositoryViewObjects4BDMR = ProxyRepositoryFactory.getInstance()
.getAll(ERepositoryObjectType.PROCESS_MR, false, true);
if (repositoryViewObjects4BDMR != null && repositoryViewObjects4BDMR.size() > 0) {
repositoryViewObjects.addAll(repositoryViewObjects4BDMR);
}
}
if (ERepositoryObjectType.PROCESS_STORM != null) {
List<IRepositoryViewObject> repositoryViewObjects4BDStream = ProxyRepositoryFactory.getInstance()
.getAll(ERepositoryObjectType.PROCESS_STORM, false, true);
if (repositoryViewObjects4BDStream != null && repositoryViewObjects4BDStream.size() > 0) {
repositoryViewObjects.addAll(repositoryViewObjects4BDStream);
}
}
for (IRepositoryViewObject rep : repositoryViewObjects) {
latestVersionRepositoryViewObjects.add(rep);
}
} catch (PersistenceException e) {
ExceptionHandler.process(e);
}
List<IRepositoryViewObject> jobletRepositoryViewObjects = new ArrayList<IRepositoryViewObject>();
try {
if (PluginChecker.isJobLetPluginLoaded()) {
jobletRepositoryViewObjects = ProxyRepositoryFactory.getInstance().getAll(ERepositoryObjectType.JOBLET,
false, true);
if (ERepositoryObjectType.SPARK_JOBLET != null) {
List<IRepositoryViewObject> sparkJobletRepositoryViewObjects4BD = ProxyRepositoryFactory
.getInstance().getAll(ERepositoryObjectType.SPARK_JOBLET, false, true);
if (sparkJobletRepositoryViewObjects4BD != null && sparkJobletRepositoryViewObjects4BD.size() > 0) {
jobletRepositoryViewObjects.addAll(sparkJobletRepositoryViewObjects4BD);
}
}
if (ERepositoryObjectType.SPARK_STREAMING_JOBLET != null) {
List<IRepositoryViewObject> sparkStreamJobletRepositoryViewObjects4BD = ProxyRepositoryFactory
.getInstance().getAll(ERepositoryObjectType.SPARK_STREAMING_JOBLET, false, true);
if (sparkStreamJobletRepositoryViewObjects4BD != null
&& sparkStreamJobletRepositoryViewObjects4BD.size() > 0) {
jobletRepositoryViewObjects.addAll(sparkStreamJobletRepositoryViewObjects4BD);
}
}
}
if (PluginChecker.isRouteletLoaded()) {
if (ERepositoryObjectType.PROCESS_ROUTELET != null) {
List<IRepositoryViewObject> routeJobletRepositoryViewObjects = ProxyRepositoryFactory.getInstance()
.getAll(ERepositoryObjectType.PROCESS_ROUTELET, false, true);
if (routeJobletRepositoryViewObjects != null && routeJobletRepositoryViewObjects.size() > 0) {
jobletRepositoryViewObjects.addAll(routeJobletRepositoryViewObjects);
}
}
for (IRepositoryViewObject rep : jobletRepositoryViewObjects) {
latestVersionRepositoryViewObjects.add(rep);
}
}
} catch (PersistenceException e) {
ExceptionHandler.process(e);
}
for (RepositoryNode node : nodes) {
if (node.getType() == ENodeType.SYSTEM_FOLDER || node.getType() == ENodeType.SIMPLE_FOLDER) {
addTreeNode(node, node.getProperties(EProperties.LABEL).toString(), list);
@@ -105,13 +210,22 @@ public class GenerateDocAsHTMLWizardPage extends WizardFileSystemResourceExportP
IRepositoryViewObject repositoryObject = node.getObject();
if (repositoryObject.getProperty().getItem() instanceof ProcessItem) {
ProcessItem processItem = (ProcessItem) repositoryObject.getProperty().getItem();
ExportFileResource resource = new ExportFileResource(processItem, processItem.getProperty().getLabel());
ExportFileResource resource = new ExportFileResource(processItem,
processItem.getProperty().getLabel());
resource.setNode(node);
list.add(resource);
if (!DocumentationUtil.isExist(list, resource)) {
list.add(resource);
}
DocumentationUtil.getRelatedResources(list, jobletList, repositoryViewObjects,
latestVersionRepositoryViewObjects, jobletRepositoryViewObjects, processItem);
}
}
}
Collections.reverse(jobletList);
jobletprocess = jobletList.toArray(new ExportFileResource[jobletList.size()]);
Collections.reverse(list);
process = list.toArray(new ExportFileResource[list.size()]);
}
@@ -125,6 +239,7 @@ public class GenerateDocAsHTMLWizardPage extends WizardFileSystemResourceExportP
list.add(resource);
}
}
Object[] nodes = node.getChildren().toArray();
if (nodes.length <= 0) {
return;
@@ -390,6 +505,9 @@ public class GenerateDocAsHTMLWizardPage extends WizardFileSystemResourceExportP
// add for bug TDI-21815
saveLastDirectoryName(runnable);
manager.deleteTempFiles();
if (jobletManager != null) {
jobletManager.deleteTempFiles();
}
return ok;
}
@@ -463,9 +581,22 @@ public class GenerateDocAsHTMLWizardPage extends WizardFileSystemResourceExportP
* @return a collection of resources currently selected for export (element type: <code>IResource</code>)
*/
protected List<ExportFileResource> getExportResources() {
return manager.getExportResourcesWithCss(process, cssFilePath);
}
List<ExportFileResource> all = new ArrayList();
List<ExportFileResource> exportJobletResources = new ArrayList<ExportFileResource>();
if (PluginChecker.isJobLetPluginLoaded() || PluginChecker.isRouteletLoaded()) {
exportJobletResources = jobletManager.getExportResourcesWithCss(jobletprocess,
cssFilePath);
}
List<ExportFileResource> exportResources = manager.getExportResourcesWithCss(process, cssFilePath);
if (exportJobletResources != null && exportJobletResources.size() > 0) {
all.addAll(exportJobletResources);
}
all.addAll(exportResources);
return all;
}
/**
* Answer the contents of self's destination specification widget. If this value does not have a suffix then add it
* first.

View File

@@ -12,8 +12,23 @@
// ============================================================================
package org.talend.designer.documentation.utils;
import java.util.List;
import org.apache.commons.codec.binary.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.eclipse.ui.internal.browser.WebBrowserEditor;
import org.talend.commons.exception.PersistenceException;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.JobletProcessItem;
import org.talend.core.model.properties.ProcessItem;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.repository.model.ProxyRepositoryFactory;
import org.talend.core.repository.model.VersionList;
import org.talend.designer.core.model.utils.emf.talendfile.impl.ElementParameterTypeImpl;
import org.talend.designer.core.model.utils.emf.talendfile.impl.NodeTypeImpl;
import org.talend.repository.documentation.ExportFileResource;
/**
* DOC ggu class global comment. Detailled comment <br/>
@@ -26,11 +41,127 @@ public final class DocumentationUtil {
public static void setPartItemId(WebBrowserEditor editor, String objId, ERepositoryObjectType objType) {
if (objId != null && editor != null) {
String id = objId;
if (objType != null
&& (objType.equals(ERepositoryObjectType.PROCESS) || objType.equals(ERepositoryObjectType.JOBLET))) {
if (objType != null && (objType.equals(ERepositoryObjectType.PROCESS)
|| objType.equals(ERepositoryObjectType.JOBLET))) {
id += DocumentationConstants.ID_SUFFIX; // get the doc id
}
editor.setPartProperty(DocumentationConstants.KEY_ITEM_ID, id);
}
}
public static void getRelatedResources(List<ExportFileResource> list, List<ExportFileResource> jobletList,
List<IRepositoryViewObject> repositoryViewObjects,
List<IRepositoryViewObject> latestVersionRepositoryViewObjects,
List<IRepositoryViewObject> jobletRepositoryViewObjects, Item item) {
EList<NodeTypeImpl> nodeList = null;
if (item instanceof ProcessItem) {
nodeList = ((ProcessItem) item).getProcess().getNode();
}
if (item instanceof JobletProcessItem) {
nodeList = ((JobletProcessItem) item).getJobletProcess().getNode();
}
if (nodeList != null && nodeList.size() > 0) {
for (NodeTypeImpl nt : nodeList) {
if ("tRunJob".equals(nt.getComponentName()) || "cTalendJob".equals(nt.getComponentName())) {
EList<ElementParameterTypeImpl> elemets = nt.getElementParameter();
String jobName = null;
String jobVersion = null;
for (ElementParameterTypeImpl el : elemets) {
if ("PROCESS".equals(el.getName()) || "SELECTED_JOB_NAME".equals(el.getName())) {
jobName = el.getValue();
}
if ("PROCESS:PROCESS_TYPE_VERSION".equals(el.getName())
|| "SELECTED_JOB_NAME:PROCESS_TYPE_VERSION".equals(el.getName())) {
jobVersion = el.getValue();
}
if (jobName != null && jobVersion != null) {
break;
}
}
IRepositoryViewObject subRepositoryViewObject = null;
if ("Latest".equals(jobVersion)) {
for (IRepositoryViewObject rep : latestVersionRepositoryViewObjects) {
if (rep.getProperty() != null && rep.getProperty().getLabel().equals(jobName)) {
subRepositoryViewObject = rep;
break;
}
}
} else {
for (IRepositoryViewObject rep : repositoryViewObjects) {
if (rep.getProperty() != null && rep.getProperty().getLabel().equals(jobName)
&& rep.getProperty().getVersion().equals(jobVersion)) {
subRepositoryViewObject = rep;
break;
}
}
}
if (subRepositoryViewObject != null) {
Item relatedProcessItem = subRepositoryViewObject.getProperty().getItem();
ExportFileResource relatedrRsource = new ExportFileResource(relatedProcessItem,
relatedProcessItem.getProperty().getLabel());
if (!isExist(list, relatedrRsource)) {
list.add(relatedrRsource);
}
getRelatedResources(list, jobletList, repositoryViewObjects, latestVersionRepositoryViewObjects,
jobletRepositoryViewObjects, relatedProcessItem);
}
} else {
IRepositoryViewObject joletRep = null;
if ("Latest".equals(nt.getComponentVersion())) {
for (IRepositoryViewObject rep : latestVersionRepositoryViewObjects) {
if (rep.getProperty() != null
&& rep.getProperty().getLabel().equals(nt.getComponentName())) {
joletRep = rep;
break;
}
}
} else {
for (IRepositoryViewObject rep : jobletRepositoryViewObjects) {
if (rep.getProperty().getLabel().equals(nt.getComponentName())
&& rep.getProperty().getVersion().equals(nt.getComponentVersion())) {
joletRep = rep;
break;
}
}
}
if (joletRep != null && joletRep.getProperty() != null) {
Item relatedProcessItem = joletRep.getProperty().getItem();
ExportFileResource relatedrRsource = new ExportFileResource(relatedProcessItem,
relatedProcessItem.getProperty().getLabel());
if (!isExist(jobletList, relatedrRsource)) {
jobletList.add(relatedrRsource);
}
getRelatedResources(list, jobletList, repositoryViewObjects, latestVersionRepositoryViewObjects,
jobletRepositoryViewObjects, relatedProcessItem);
}
}
}
}
}
public static boolean isExist(List<ExportFileResource> exportFileList, ExportFileResource efe) {
for (ExportFileResource ex : exportFileList) {
if (StringUtils.equals(ex.getItem().getProperty().getId(), efe.getItem().getProperty().getId())
&& StringUtils.equals(ex.getItem().getProperty().getVersion(),
efe.getItem().getProperty().getVersion())) {
return true;
}
}
return false;
}
}

View File

@@ -139,5 +139,5 @@ JavaProcessor.warn.codeFormatTimeout.message=\u30BF\u30A4\u30E0\u30A2\u30A6\u30C
JavaCompilationParticipant.validateRoutine=\u30EB\u30FC\u30C1\u30F3\u306E\u691C\u8A3C...
MavenOnlineRunner.MavenMesssage=Maven\u306FESB\u30DE\u30A4\u30AF\u30ED\u30B5\u30FC\u30D3\u30B9\u3092\u30AA\u30F3\u30E9\u30A4\u30F3\u30E2\u30FC\u30C9\u3067\u30D3\u30EB\u30C9\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\nMaven\u3092\u30AA\u30F3\u30E9\u30A4\u30F3\u30E2\u30FC\u30C9\u306B\u5909\u66F4\u3057\u3066\u7D9A\u884C\u3057\u307E\u3059\u304B?
MavenOnlineRunner.MavenConfirm=Maven Online\u3092\u8A2D\u5B9A
MavenOnlineRunner.ShowItAgain=&\u4EE5\u5F8C\u8868\u793A\u3057\u306A\u3044
MavenOnlineRunner.ShowItAgain=\u4EE5\u5F8C\u8868\u793A\u3057\u306A\u3044(&D)
MavenOnlineRunner.info=\u5B9F\u884C\u306F\u3001\u5FC5\u8981\u306A\u30E9\u30A4\u30D6\u30E9\u30EA\u30FC\u304C\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u3055\u308C\u308B\u307E\u3067\u6A5F\u80FD\u3057\u307E\u305B\u3093\u3002\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u305F\u5834\u5408\u306F\u3001Studio\u306E\u74B0\u5883\u8A2D\u5B9A\u3067Maven Online\u3092\u8A2D\u5B9A\u3057\u3001\u3082\u3046\u4E00\u5EA6\u5B9F\u884C\u3057\u3066\u307F\u3066\u304F\u3060\u3055\u3044

View File

@@ -58,6 +58,7 @@ import org.talend.core.language.ICodeProblemsChecker;
import org.talend.core.model.components.ComponentCategory;
import org.talend.core.model.general.ModuleNeeded;
import org.talend.core.model.general.Project;
import org.talend.core.model.general.RetrieveResult;
import org.talend.core.model.general.TalendJobNature;
import org.talend.core.model.process.IContext;
import org.talend.core.model.process.IProcess;
@@ -399,17 +400,21 @@ public class DefaultRunProcessService implements IRunProcessService {
* org.talend.designer.runprocess.IRunProcessService#updateLibraries(org.talend.core.model.properties.RoutineItem)
*/
@Override
public void updateLibraries(Item routineItem) {
public boolean updateLibraries(Item routineItem) {
Set<ModuleNeeded> modulesForRoutine = ModulesNeededProvider.updateModulesNeededForRoutine(routineItem);
File libDir = getJavaProjectLibFolder().getLocation().toFile();
if (libDir == null) {
return;
return false;
}
ILibraryManagerService repositoryBundleService = CorePlugin.getDefault().getRepositoryBundleService();
repositoryBundleService.retrieve(ERepositoryObjectType.getItemType(routineItem), modulesForRoutine,
libDir.getAbsolutePath(), true);
RetrieveResult result = repositoryBundleService.retrieveModules(ERepositoryObjectType.getItemType(routineItem),
modulesForRoutine, libDir.getAbsolutePath(), true);
repositoryBundleService.installModules(modulesForRoutine, null);
CorePlugin.getDefault().getLibrariesService().checkLibraries();
boolean updated = !result.getResovledModules().isEmpty();
if (updated) {
CorePlugin.getDefault().getLibrariesService().checkLibraries();
}
return updated;
}
/*

View File

@@ -214,8 +214,8 @@ public class RunProcessService implements IRunProcessService {
* org.talend.designer.runprocess.IRunProcessService#updateLibraries(org.talend.core.model.properties.RoutineItem)
*/
@Override
public void updateLibraries(Item routineItem) {
delegateService.updateLibraries(routineItem);
public boolean updateLibraries(Item routineItem) {
return delegateService.updateLibraries(routineItem);
}
@Override

View File

@@ -1,5 +1,5 @@
corporationname=Talend
loginimagehigh=/icons/login_h.png
loginimageleft=icons/login_v.jpg
TosBrandingService_job_license_header_content=// ============================================================================\n//\n// \u7248\u6743\u6240\u6709 (c) 2006-2015, Talend Inc.\n//\n\u6B64\u6E90\u4EE3\u7801\u5DF2\u7531_{0} \u81EA\u52A8\u751F\u6210\n// / \u6839\u636E Apache \u8BB8\u53EF\u8BC1 2.0 \u7248 (\u201C\u8BB8\u53EF\u8BC1\u201D) \u6388\u4E88\u8BB8\u53EF\uFF1B\n// \u9664\u975E\u7B26\u5408\u8BB8\u53EF\u8BC1\u8981\u6C42\uFF0C\u5426\u5219\u60A8\u4E0D\u5F97\u4F7F\u7528\u6B64\u8F6F\u4EF6\u3002\n// \u60A8\u53EF\u4EE5\u8BBF\u95EE\u6B64\u7F51\u9875\u83B7\u53D6\u8BB8\u53EF\u8BC1\u7684\u526F\u672C\uFF1A\n// http://www.apache.org/licenses/LICENSE-2.0\n// \n// \u9664\u975E\u9002\u7528\u6CD5\u5F8B\u8981\u6C42\u6216\u4E66\u9762\u540C\u610F\uFF0C\n// \u5426\u5219\u6839\u636E\u8BB8\u53EF\u8BC1\u5206\u53D1\u7684\u8F6F\u4EF6\u987B\u6309\u201C\u539F\u6837\u201D\u63D0\u4F9B\uFF0C\u4E14\u4E0D\u9644\u5E26\u4EFB\u4F55\u660E\u793A\u6216\u6697\u793A\u7684\u62C5\u4FDD\u6216\u6761\u4EF6\uFF0C\n// \u4E14\u4E0D\u9644\u5E26\u4EFB\u4F55\u660E\u793A\u6216\u6697\u793A\u7684\u62C5\u4FDD\u6216\u6761\u4EF6\u3002\n// \u8BF7\u53C2\u9605\u8BB8\u53EF\u8BC1\u4E86\u89E3\u6709\u5173\u8BB8\u53EF\u8BC1\u4E0B\u5177\u4F53\u7684\u6743\u9650\u548C\n// \u9650\u5236\u89C4\u5B9A\u3002\n\n
TosBrandingService_routine_license_header_content=\u7248\u6743\u6240\u6709 (c) 2006-2015, Talend Inc.\n//\n\u6B64\u6E90\u4EE3\u7801\u5DF2\u7531_{0} \u81EA\u52A8\u751F\u6210\n// / \u6839\u636E Apache \u8BB8\u53EF\u8BC1 2.0 \u7248 (\u201C\u8BB8\u53EF\u8BC1\u201D) \u6388\u4E88\u8BB8\u53EF\uFF1B\n// \u9664\u975E\u7B26\u5408\u8BB8\u53EF\u8BC1\u8981\u6C42\uFF0C\u5426\u5219\u60A8\u4E0D\u5F97\u4F7F\u7528\u6B64\u8F6F\u4EF6\u3002\n// \u60A8\u53EF\u4EE5\u8BBF\u95EE\u6B64\u7F51\u9875\u83B7\u53D6\u8BB8\u53EF\u8BC1\u7684\u526F\u672C\uFF1A\n// http://www.apache.org/licenses/LICENSE-2.0\n// \n// \u9664\u975E\u9002\u7528\u6CD5\u5F8B\u8981\u6C42\u6216\u4E66\u9762\u540C\u610F\uFF0C\n// \u5426\u5219\u6839\u636E\u8BB8\u53EF\u8BC1\u5206\u53D1\u7684\u8F6F\u4EF6\u987B\u6309\u201C\u539F\u6837\u201D\u63D0\u4F9B\uFF0C\u4E14\u4E0D\u9644\u5E26\u4EFB\u4F55\u660E\u793A\u6216\u6697\u793A\u7684\u62C5\u4FDD\u6216\u6761\u4EF6\uFF0C\n// \u4E14\u4E0D\u9644\u5E26\u4EFB\u4F55\u660E\u793A\u6216\u6697\u793A\u7684\u62C5\u4FDD\u6216\u6761\u4EF6\u3002\n// \u8BF7\u53C2\u9605\u8BB8\u53EF\u8BC1\u4E86\u89E3\u6709\u5173\u8BB8\u53EF\u8BC1\u4E0B\u5177\u4F53\u7684\u6743\u9650\u548C\n// \u8BF7\u53C2\u9605\u8BB8\u53EF\u8BC1\u3002
TosBrandingService_job_license_header_content=// ============================================================================\n//\n// \u7248\u6743\u6240\u6709 (c) 2006-2015, Talend Inc.\n//\n// \u6B64\u6E90\u4EE3\u7801\u5DF2\u7531_{0} \u81EA\u52A8\u751F\u6210\n// / \u6839\u636E Apache \u8BB8\u53EF\u8BC1 2.0 \u7248 (\u201C\u8BB8\u53EF\u8BC1\u201D) \u6388\u4E88\u8BB8\u53EF\uFF1B\n// \u9664\u975E\u7B26\u5408\u8BB8\u53EF\u8BC1\u8981\u6C42\uFF0C\u5426\u5219\u60A8\u4E0D\u5F97\u4F7F\u7528\u6B64\u8F6F\u4EF6\u3002\n// \u60A8\u53EF\u4EE5\u8BBF\u95EE\u6B64\u7F51\u9875\u83B7\u53D6\u8BB8\u53EF\u8BC1\u7684\u526F\u672C\uFF1A\n// http://www.apache.org/licenses/LICENSE-2.0\n// \n// \u9664\u975E\u9002\u7528\u6CD5\u5F8B\u8981\u6C42\u6216\u4E66\u9762\u540C\u610F\uFF0C\n// \u5426\u5219\u6839\u636E\u8BB8\u53EF\u8BC1\u5206\u53D1\u7684\u8F6F\u4EF6\u987B\u6309\u201C\u539F\u6837\u201D\u63D0\u4F9B\uFF0C\u4E14\u4E0D\u9644\u5E26\u4EFB\u4F55\u660E\u793A\u6216\u6697\u793A\u7684\u62C5\u4FDD\u6216\u6761\u4EF6\uFF0C\n// \u4E14\u4E0D\u9644\u5E26\u4EFB\u4F55\u660E\u793A\u6216\u6697\u793A\u7684\u62C5\u4FDD\u6216\u6761\u4EF6\u3002\n// \u8BF7\u53C2\u9605\u8BB8\u53EF\u8BC1\u4E86\u89E3\u6709\u5173\u8BB8\u53EF\u8BC1\u4E0B\u5177\u4F53\u7684\u6743\u9650\u548C\n// \u9650\u5236\u89C4\u5B9A\u3002\n\n
TosBrandingService_routine_license_header_content=\u7248\u6743\u6240\u6709 (c) 2006-2015, Talend Inc.\n//\n// \u6B64\u6E90\u4EE3\u7801\u5DF2\u7531_{0} \u81EA\u52A8\u751F\u6210\n// / \u6839\u636E Apache \u8BB8\u53EF\u8BC1 2.0 \u7248 (\u201C\u8BB8\u53EF\u8BC1\u201D) \u6388\u4E88\u8BB8\u53EF\uFF1B\n// \u9664\u975E\u7B26\u5408\u8BB8\u53EF\u8BC1\u8981\u6C42\uFF0C\u5426\u5219\u60A8\u4E0D\u5F97\u4F7F\u7528\u6B64\u8F6F\u4EF6\u3002\n// \u60A8\u53EF\u4EE5\u8BBF\u95EE\u6B64\u7F51\u9875\u83B7\u53D6\u8BB8\u53EF\u8BC1\u7684\u526F\u672C\uFF1A\n// http://www.apache.org/licenses/LICENSE-2.0\n// \n// \u9664\u975E\u9002\u7528\u6CD5\u5F8B\u8981\u6C42\u6216\u4E66\u9762\u540C\u610F\uFF0C\n// \u5426\u5219\u6839\u636E\u8BB8\u53EF\u8BC1\u5206\u53D1\u7684\u8F6F\u4EF6\u987B\u6309\u201C\u539F\u6837\u201D\u63D0\u4F9B\uFF0C\u4E14\u4E0D\u9644\u5E26\u4EFB\u4F55\u660E\u793A\u6216\u6697\u793A\u7684\u62C5\u4FDD\u6216\u6761\u4EF6\uFF0C\n// \u4E14\u4E0D\u9644\u5E26\u4EFB\u4F55\u660E\u793A\u6216\u6697\u793A\u7684\u62C5\u4FDD\u6216\u6761\u4EF6\u3002\n// \u8BF7\u53C2\u9605\u8BB8\u53EF\u8BC1\u4E86\u89E3\u6709\u5173\u8BB8\u53EF\u8BC1\u4E0B\u5177\u4F53\u7684\u6743\u9650\u548C\n// \u8BF7\u53C2\u9605\u8BB8\u53EF\u8BC1\u3002

View File

@@ -3714,8 +3714,7 @@
version="8.0.1">
</projecttask>
<projecttask
<projecttask
beforeLogon="false"
breaks="8.0.0"
class="org.talend.repository.model.migration.RedshiftVersion2MigrationTask"
@@ -3760,6 +3759,15 @@
name="SetKeystoreKafkaMigrationTask"
version="8.0.1">
</projecttask>
<projecttask
beforeLogon="true"
breaks="8.0.0"
class="org.talend.repository.model.migration.ReplaceMappingForGreenplumDatabaseMigrationTask"
description="Change Mapping type in GreenPlum components where greenplum driver selected"
id="org.talend.repository.model.migration.ReplaceMappingForGreenplumDatabaseMigrationTask"
name="ReplaceMappingForGreenplumDatabaseMigrationTask"
version="8.0.1">
</projecttask>
</extension>
<extension

View File

@@ -678,8 +678,16 @@
<td class="FONTSTYLE">
<b>
<xsl:value-of select="/project/@i18n.job.component" />&#160;&#160;
<xsl:value-of
select="componentType" />
<xsl:choose>
<xsl:when test="string-length(@job)!=0" >
<a name="{@uniqueName}" href="{@href}" style="LINKSTYLE">
<xsl:value-of select="componentType" />
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="componentType" />
</xsl:otherwise>
</xsl:choose>
</b>
</td>
</tr>
@@ -691,7 +699,17 @@
<tr>
<td class="cols" align="center" rowspan="2"
width="10%">
<img src="{@icon}" alt="" />
<xsl:choose>
<xsl:when test="string-length(@job)!=0" >
<a href="{@href}" class="LINKSTYLE">
<xsl:value-of select="@name" />
<img src="{@icon}" alt="" />
</a>
</xsl:when>
<xsl:otherwise>
<img src="{@icon}" alt="" />
</xsl:otherwise>
</xsl:choose>
&#160;&#160;&#160;&#160;&#160;
</td>
<td align="left" class="TABLECOLUMNSTYLE"
@@ -888,8 +906,16 @@
<td class="FONTSTYLE">
<b>
<xsl:value-of select="/project/@i18n.job.component" />&#160;&#160;
<xsl:value-of
select="componentType" />
<xsl:choose>
<xsl:when test="string-length(@joblet)!=0" >
<a name="{@uniqueName}" href="{@href}" style="LINKSTYLE">
<xsl:value-of select="componentType" />
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="componentType" />
</xsl:otherwise>
</xsl:choose>
</b>
</td>
</tr>

View File

@@ -24,6 +24,7 @@ woodstox-core-asl
# MSSQL
jtds
mssql-jdbc
# tdm-lib-di
tdm-lib-di

View File

@@ -1063,6 +1063,12 @@ StoreCredentialDialog.user=Nom d'utilisateur
StoreCredentialDialog.password=Mot de passe utilisateur
ConnectionsDialog.ui.pref.updateSettings=Param\u00E8tres de mise \u00E0 jour
UpdatesitePreferencePage.title=Configurer les r\u00E9f\u00E9rentiels de mise \u00E0 jour
UpdatesitePreferencePage.group.remote=Mettre \u00E0 jour les param\u00E8tres depuis Talend Management Console
UpdatesitePreferencePage.group.local=Param\u00E8tres locaux de mise \u00E0 jour
UpdatesitePreferencePage.btn.overwriteRemoteUpdateSettings=Utiliser les param\u00E8tres locaux de mise \u00E0 jour
UpdatesitePreferencePage.btn.overwriteRemoteUpdateSettings.logon=Utiliser les param\u00E8tres locaux de mise \u00E0 jour
UpdatesitePreferencePage.btn.overwriteRemoteUpdateSettings.help=Les param\u00E8tres de mise \u00E0 jour suivants vont \u00E9craser les param\u00E8tres de mise \u00E0 jour de Talend Management Console.
UpdatesitePreferencePage.title=Configurer les r\u00E9f\u00E9rentiels de mise \u00E0 jour
UpdatesitePreferencePage.base=URL de base
UpdatesitePreferencePage.update=URL de mise \u00E0 jour
UpdatesitePreferencePage.err.baseCantEmpty=L'URL de base ne peut \u00EAtre vide.

View File

@@ -1063,6 +1063,12 @@ StoreCredentialDialog.user=\u7528\u6237\u540D
StoreCredentialDialog.password=\u7528\u6237\u5BC6\u7801
ConnectionsDialog.ui.pref.updateSettings=\u66F4\u65B0\u8BBE\u7F6E
UpdatesitePreferencePage.title=\u914D\u7F6E\u66F4\u65B0\u5E93
UpdatesitePreferencePage.group.remote=\u7BA1\u7406\u63A7\u5236\u53F0\u4E2D\u7684\u66F4\u65B0\u8BBE\u7F6E
UpdatesitePreferencePage.group.local=\u672C\u5730\u66F4\u65B0\u8BBE\u7F6E
UpdatesitePreferencePage.btn.overwriteRemoteUpdateSettings=\u4F7F\u7528\u672C\u5730\u66F4\u65B0\u8BBE\u7F6E
UpdatesitePreferencePage.btn.overwriteRemoteUpdateSettings.logon=\u4F7F\u7528\u672C\u5730\u66F4\u65B0\u8BBE\u7F6E
UpdatesitePreferencePage.btn.overwriteRemoteUpdateSettings.help=\u4E0B\u8FF0\u66F4\u65B0\u8BBE\u7F6E\u5C06\u53D6\u4EE3\u7BA1\u7406\u63A7\u5236\u53F0\u4E2D\u6240\u4F5C\u7684\u66F4\u65B0\u8BBE\u7F6E\u3002
UpdatesitePreferencePage.title=\u914D\u7F6E\u66F4\u65B0\u5E93
UpdatesitePreferencePage.base=\u57FA\u7840 URL
UpdatesitePreferencePage.update=\u66F4\u65B0 URL
UpdatesitePreferencePage.err.baseCantEmpty=\u57FA\u7840 URL \u4E0D\u80FD\u4E3A\u7A7A

View File

@@ -0,0 +1,83 @@
package org.talend.repository.model.migration;
import java.util.Calendar;
import java.util.Collections;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.core.language.ECodeLanguage;
import org.talend.core.model.components.ComponentUtilities;
import org.talend.core.model.components.ModifyComponentsAction;
import org.talend.core.model.components.conversions.IComponentConversion;
import org.talend.core.model.components.filters.NameComponentFilter;
import org.talend.core.model.migration.AbstractJobMigrationTask;
import org.talend.core.model.properties.Item;
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
import org.talend.designer.core.model.utils.emf.talendfile.ProcessType;
/**
* https://jira.talendforge.org/browse/TDI-45946
*/
public class ReplaceMappingForGreenplumDatabaseMigrationTask extends AbstractJobMigrationTask {
// property names
public static final String DB_DRIVER = "DB_DRIVER";
public static final String MAPPING = "MAPPING";
// values
public static final String DB_PROPERTY_GREENPLUM = "GREENPLUM";
public static final String MAPPING_POSTGRES_ID = "postgres_id";
public static final String MAPPING_GREENPLUM_ID = "greenplum_id";
@Override
public ExecutionResult execute(Item item) {
ProcessType processType = getProcessType(item);
if (getProject().getLanguage() != ECodeLanguage.JAVA || processType == null) {
return ExecutionResult.NOTHING_TO_DO;
}
// the list with components that should be migrated
final List<NameComponentFilter> componentNames = Stream.of(
"tGreenplumInput",
"tGreenplumOutput",
"tGreenplumBulkExec",
"tGreenplumGPLoad",
"tGreenplumOutputBulkExec"
).map(NameComponentFilter::new)
.collect(Collectors.toList());
IComponentConversion updateGreenplumMapping = node -> {
ElementParameterType dbDriverProperty = ComponentUtilities.getNodeProperty(node, DB_DRIVER);
if (dbDriverProperty != null && DB_PROPERTY_GREENPLUM.equals(dbDriverProperty.getValue())) {
ElementParameterType mappingProperty = ComponentUtilities.getNodeProperty(node, MAPPING);
if (mappingProperty != null && MAPPING_POSTGRES_ID.equals(mappingProperty.getValue())) {
mappingProperty.setValue(MAPPING_GREENPLUM_ID);
}
}
};
try {
boolean modified = false;
for (NameComponentFilter filter : componentNames) {
modified |= ModifyComponentsAction.searchAndModify(item, processType, filter, Collections.singletonList(updateGreenplumMapping));
}
return modified ? ExecutionResult.SUCCESS_NO_ALERT : ExecutionResult.NOTHING_TO_DO;
} catch (Exception e) {
ExceptionHandler.process(e);
return ExecutionResult.FAILURE;
}
}
@Override
public Date getOrder() {
GregorianCalendar gc = new GregorianCalendar(2021, Calendar.MAY, 5, 7, 31, 0);
return gc.getTime();
}
}

View File

@@ -13,6 +13,9 @@
package org.talend.repository.ui.actions.routines;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.ui.IEditorPart;
@@ -26,11 +29,14 @@ import org.talend.core.context.Context;
import org.talend.core.context.RepositoryContext;
import org.talend.core.language.ECodeLanguage;
import org.talend.core.model.properties.RoutineItem;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.repository.model.ProxyRepositoryFactory;
import org.talend.core.repository.ui.editor.RepositoryEditorInput;
import org.talend.designer.codegen.ICodeGeneratorService;
import org.talend.designer.codegen.ITalendSynchronizer;
import org.talend.designer.maven.tools.AggregatorPomsHelper;
import org.talend.repository.ProjectManager;
import org.talend.repository.RepositoryPlugin;
import org.talend.repository.i18n.Messages;
import org.talend.repository.model.RepositoryNode;
import org.talend.repository.ui.actions.AContextualAction;
@@ -138,4 +144,22 @@ public abstract class AbstractRoutineAction extends AContextualAction {
repositoryNode = (RepositoryNode) o;
}
void updateRoutineProject() {
Job job = new Job("Update Routine project") {
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
new AggregatorPomsHelper().updateCodeProject(monitor, ERepositoryObjectType.ROUTINES, true, false);
return org.eclipse.core.runtime.Status.OK_STATUS;
} catch (Exception e) {
return new org.eclipse.core.runtime.Status(IStatus.ERROR, RepositoryPlugin.PLUGIN_ID, 1, e.getMessage(), e);
}
}
};
job.setUser(false);
job.schedule();
}
}

View File

@@ -106,7 +106,9 @@ public class EditRoutineAction extends AbstractRoutineAction {
openRoutineEditor(routineItem, false);
refresh(repositoryNode);
// CorePlugin.getDefault().getLibrariesService().resetModulesNeeded();
CorePlugin.getDefault().getRunProcessService().updateLibraries(routineItem);
if (CorePlugin.getDefault().getRunProcessService().updateLibraries(routineItem)) {
updateRoutineProject();
}
} catch (PartInitException e) {
MessageBoxExceptionHandler.process(e);
} catch (SystemException e) {

View File

@@ -97,7 +97,9 @@ public class ReadRoutineAction extends AbstractRoutineAction {
routineItem = (RoutineItem) repositoryNode.getObject().getProperty().getItem();
try {
openRoutineEditor(routineItem, true);
CorePlugin.getDefault().getRunProcessService().updateLibraries(routineItem);
if (CorePlugin.getDefault().getRunProcessService().updateLibraries(routineItem)) {
updateRoutineProject();
}
} catch (PartInitException e) {
MessageBoxExceptionHandler.process(e);
} catch (SystemException e) {

View File

@@ -1846,7 +1846,6 @@ public class LoginProjectPage extends AbstractLoginActionPage {
} else {
errorManager.setErrMessage(Messages.getString("LoginComposite.connectionEmpty")); //$NON-NLS-1$
}
errorManager.setInfoMessage("Patched");
} catch (Exception e) {
ex[0] = e;
} finally {

View File

@@ -73,12 +73,18 @@ public class UpdatesitePreferencePage extends PreferencePage {
private Composite remotePanel;
private Composite overwritePanel;
private Composite localPanel;
private Composite warningPanel;
private boolean enableTmcUpdateSettings;
private boolean isCloudConnection = false;
private boolean isWorkbenchRunning = false;
@Override
protected Control createContents(Composite parent) {
this.setTitle(Messages.getString("UpdatesitePreferencePage.title"));
@@ -101,8 +107,8 @@ public class UpdatesitePreferencePage extends PreferencePage {
GridLayout panelLayout = null;
GridData gd = null;
ConnectionBean curConnection = LoginHelper.getInstance().getCurrentSelectedConnBean();
boolean isCloudConnection = LoginHelper.isCloudConnection(curConnection);
boolean isWorkbenchRunning = PlatformUI.isWorkbenchRunning();
isCloudConnection = LoginHelper.isCloudConnection(curConnection);
isWorkbenchRunning = PlatformUI.isWorkbenchRunning();
if (isWorkbenchRunning && isCloudConnection) {
remoteGroup = new Group(remotePanel, SWT.NONE);
String projectLabel = "";
@@ -155,8 +161,17 @@ public class UpdatesitePreferencePage extends PreferencePage {
} else {
showOverwrite = isWorkbenchRunning && isCloudConnection;
}
overwritePanel = new Composite(panel, SWT.NONE);
fd = new FormData();
fd.top = new FormAttachment(remotePanel, 0, SWT.BOTTOM);
fd.left = new FormAttachment(0);
overwritePanel.setLayoutData(fd);
if (showOverwrite) {
overwriteRemoteUpdateSettingsBtn = new Button(panel, SWT.CHECK);
formLayout = new FormLayout();
formLayout.marginBottom = 7;
overwritePanel.setLayout(formLayout);
overwriteRemoteUpdateSettingsBtn = new Button(overwritePanel, SWT.CHECK);
String overwriteLabel = null;
if (isWorkbenchRunning) {
overwriteLabel = Messages.getString("UpdatesitePreferencePage.btn.overwriteRemoteUpdateSettings");
@@ -165,11 +180,11 @@ public class UpdatesitePreferencePage extends PreferencePage {
}
overwriteRemoteUpdateSettingsBtn.setText(overwriteLabel);
fd = new FormData();
fd.top = new FormAttachment(remotePanel, 0, SWT.BOTTOM);
fd.top = new FormAttachment(0);
fd.left = new FormAttachment(0);
overwriteRemoteUpdateSettingsBtn.setLayoutData(fd);
if (!isWorkbenchRunning) {
Label help = new Label(panel, SWT.PUSH);
Label help = new Label(overwritePanel, SWT.PUSH);
help.setImage(ImageProvider.getImage(EImage.QUESTION_ICON));
help.setToolTipText(Messages.getString("UpdatesitePreferencePage.btn.overwriteRemoteUpdateSettings.help"));
fd = new FormData();
@@ -177,16 +192,14 @@ public class UpdatesitePreferencePage extends PreferencePage {
fd.left = new FormAttachment(overwriteRemoteUpdateSettingsBtn, 2, SWT.RIGHT);
help.setLayoutData(fd);
}
} else {
fd.height = 0;
}
localPanel = new Composite(panel, SWT.NONE);
localPanel.setLayout(new FormLayout());
fd = new FormData();
if (overwriteRemoteUpdateSettingsBtn != null) {
fd.top = new FormAttachment(overwriteRemoteUpdateSettingsBtn, 7, SWT.BOTTOM);
} else {
fd.top = new FormAttachment(remotePanel, 0, SWT.BOTTOM);
}
fd.top = new FormAttachment(overwritePanel, 0, SWT.BOTTOM);
fd.left = new FormAttachment(0);
fd.right = new FormAttachment(100);
fd.bottom = new FormAttachment(100);
@@ -280,6 +293,10 @@ public class UpdatesitePreferencePage extends PreferencePage {
}
} else {
fd.height = 0;
if (isCloudConnection && isWorkbenchRunning) {
FormData owFd = (FormData) overwritePanel.getLayoutData();
owFd.height = 0;
}
}
boolean overwriteTmcUpdateSettings = config.isOverwriteTmcUpdateSettings(monitor);
if (overwriteRemoteUpdateSettingsBtn != null) {

View File

@@ -17,11 +17,13 @@ import java.util.HashMap;
import java.util.Map;
import org.apache.commons.lang.BooleanUtils;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.preference.IPreferenceStore;
import org.talend.commons.CommonsPlugin;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.exception.PersistenceException;
@@ -32,6 +34,8 @@ import org.talend.core.PluginChecker;
import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.ProcessItem;
import org.talend.core.model.properties.Project;
import org.talend.core.prefs.SecurityPreferenceConstants;
import org.talend.core.runtime.CoreRuntimePlugin;
import org.talend.core.runtime.process.IBuildJobHandler;
import org.talend.core.runtime.process.ITalendProcessJavaProject;
import org.talend.core.runtime.process.LastGenerationInfo;
@@ -48,6 +52,7 @@ import org.talend.designer.runprocess.ProcessorUtilities;
import org.talend.repository.ProjectManager;
import org.talend.repository.ui.utils.Log4jPrefsSettingManager;
import org.talend.repository.ui.wizards.exportjob.scriptsmanager.JobScriptsManager.ExportChoice;
import org.talend.utils.security.StudioEncryption;
/**
* created by ycbai on 2015年5月13日 Detailled comment
@@ -275,6 +280,28 @@ public abstract class AbstractBuildJobHandler implements IBuildJobHandler, IBuil
otherArgsBuffer.append(TalendMavenConstants.ARG_TEST_FAILURE_IGNORE);
}
if (canSignJob()) {
// Setup custom JKS for signature
IPreferenceStore preStore = CoreRuntimePlugin.getInstance().getCoreService().getPreferenceStore();
String signerPath = preStore.getString(SecurityPreferenceConstants.SIGNER_PATH);
if (StringUtils.isNotBlank(signerPath)) {
otherArgsBuffer.append(" -Dsigner.path=\"" + signerPath + "\"");//$NON-NLS-1$//$NON-NLS-2$
}
String signerStorePassword = preStore.getString(SecurityPreferenceConstants.SIGNER_KEYSTORE_PASSWORD);
if (StringUtils.isNotBlank(signerStorePassword)) {
signerStorePassword = StudioEncryption.getStudioEncryption(StudioEncryption.EncryptionKeyName.SYSTEM)
.decrypt(signerStorePassword);
otherArgsBuffer.append(" -Dsigner.keystore.password=" + signerStorePassword);//$NON-NLS-1$
}
String signerKeyPassword = preStore.getString(SecurityPreferenceConstants.SIGNER_KEY_PASSWORD);
if (StringUtils.isNotBlank(signerKeyPassword)) {
signerKeyPassword = StudioEncryption.getStudioEncryption(StudioEncryption.EncryptionKeyName.SYSTEM)
.decrypt(signerKeyPassword);
otherArgsBuffer.append(" -Dsigner.key.password=" + signerKeyPassword);//$NON-NLS-1$
}
String signerKeyAlias = preStore.getString(SecurityPreferenceConstants.SIGNER_KEY_ALIAS);
if (StringUtils.isNotBlank(signerKeyAlias)) {
otherArgsBuffer.append(" -Dsigner.key.alias=" + signerKeyAlias);//$NON-NLS-1$
}
otherArgsBuffer.append(" " + TalendMavenConstants.ARG_LICENSE_PATH + "=\"" + getLicenseFile().getAbsolutePath() + "\"");
otherArgsBuffer.append(" " + TalendMavenConstants.ARG_SESSION_ID + "=" + getSessionId());
}
@@ -310,7 +337,7 @@ public abstract class AbstractBuildJobHandler implements IBuildJobHandler, IBuil
protected File getLicenseFile() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreTisService.class)) {
ICoreTisService coreTisService = (ICoreTisService) GlobalServiceRegister.getDefault()
ICoreTisService coreTisService = GlobalServiceRegister.getDefault()
.getService(ICoreTisService.class);
File licenseFile = coreTisService.getLicenseFile();
if (licenseFile.exists() && !coreTisService.isLicenseExpired()) {
@@ -322,7 +349,7 @@ public abstract class AbstractBuildJobHandler implements IBuildJobHandler, IBuil
private String getSessionId() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreTisService.class)) {
ICoreTisService coreTisService = (ICoreTisService) GlobalServiceRegister.getDefault()
ICoreTisService coreTisService = GlobalServiceRegister.getDefault()
.getService(ICoreTisService.class);
return coreTisService.generateSignerSessionId();
}

View File

@@ -65,7 +65,6 @@ import org.talend.core.runtime.process.TalendProcessArgumentConstant;
import org.talend.core.runtime.repository.build.BuildExportManager;
import org.talend.core.service.ITransformService;
import org.talend.core.ui.ITestContainerProviderService;
import org.talend.designer.core.model.utils.emf.talendfile.ProcessType;
import org.talend.designer.maven.model.TalendMavenConstants;
import org.talend.designer.maven.tools.BuildCacheManager;
import org.talend.designer.runprocess.IProcessor;
@@ -88,8 +87,8 @@ public class BuildJobHandler extends AbstractBuildJobHandler {
public BuildJobHandler(ProcessItem processItem, String version, String contextName, Map<ExportChoice, Object> exportChoiceMap) {
super(processItem, version, contextName, exportChoiceMap);
setProjectNameLowerCase(false);
setProjectNameLowerCase(true);
ProcessorUtilities.setExportConfig(JavaUtils.JAVA_APP_NAME, null, null);
}
@@ -194,7 +193,7 @@ public class BuildJobHandler extends AbstractBuildJobHandler {
}
argumentsMap.put(TalendProcessArgumentConstant.ARG_GENERATE_OPTION, generationOption);
argumentsMap.put(TalendProcessArgumentConstant.ARG_NEED_JETTY_SERVER,
ProcessUtils.hasJettyEndpoint((ProcessType)processItem.getProcess()));
ProcessUtils.hasJettyEndpoint(processItem.getProcess()));
BuildCacheManager.getInstance().clearCurrentCache();
@@ -213,7 +212,7 @@ public class BuildJobHandler extends AbstractBuildJobHandler {
return;
}
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITestContainerProviderService.class)) {
ITestContainerProviderService testContainerService = (ITestContainerProviderService) GlobalServiceRegister
ITestContainerProviderService testContainerService = GlobalServiceRegister
.getDefault().getService(ITestContainerProviderService.class);
if (testContainerService != null) {
List<IFile> reports = new ArrayList<IFile>();
@@ -292,7 +291,7 @@ public class BuildJobHandler extends AbstractBuildJobHandler {
private void addTDMDependencies(IFolder itemsFolder, List<Item> items) {
ITransformService tdmService = null;
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITransformService.class)) {
tdmService = (ITransformService) GlobalServiceRegister.getDefault().getService(ITransformService.class);
tdmService = GlobalServiceRegister.getDefault().getService(ITransformService.class);
}
if (tdmService == null) {
return;
@@ -378,7 +377,7 @@ public class BuildJobHandler extends AbstractBuildJobHandler {
private void addDQDependencies(IFolder parentFolder, List<Item> items) throws Exception {
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQItemService.class)) {
ITDQItemService tdqItemService = (ITDQItemService) GlobalServiceRegister.getDefault().getService(
ITDQItemService tdqItemService = GlobalServiceRegister.getDefault().getService(
ITDQItemService.class);
for (Item item : items) {
if (tdqItemService != null && tdqItemService.hasProcessItemDependencies(Arrays.asList(new Item[] { item }))) {

View File

@@ -84,6 +84,7 @@ import org.talend.core.runtime.maven.MavenArtifact;
import org.talend.core.runtime.maven.MavenConstants;
import org.talend.core.runtime.process.ITalendProcessJavaProject;
import org.talend.core.runtime.process.LastGenerationInfo;
import org.talend.core.runtime.process.TalendProcessOptionConstants;
import org.talend.core.runtime.repository.build.BuildExportManager;
import org.talend.core.service.ITaCoKitDependencyService;
import org.talend.core.ui.branding.IBrandingService;
@@ -1222,6 +1223,13 @@ public class JobJavaScriptOSGIForESBManager extends JobJavaScriptsManager {
return analyzer;
}
private boolean usesMssql(ProcessItem processItem) {
IDesignerCoreService service = CorePlugin.getDefault().getDesignerCoreService();
return service.getProcessFromProcessItem(processItem, false)
.getNeededLibraries(TalendProcessOptionConstants.MODULES_DEFAULT).stream()
.anyMatch(lib -> lib.matches("mssql-jdbc.jar"));
}
protected void addOsgiDependencies(Analyzer analyzer, ExportFileResource libResource, ProcessItem processItem)
throws IOException {
analyzer.setProperty(Analyzer.EXPORT_SERVICE, "routines.system.api.TalendJob;name=" + processItem.getProperty().getLabel() + ";type=" + "job");
@@ -1282,7 +1290,10 @@ public class JobJavaScriptOSGIForESBManager extends JobJavaScriptsManager {
importPackages.add("org.talend.cloud"); //$NON-NLS-1$
}
if(usesMssql(processItem)) {
importPackages.add("com.microsoft.sqlserver.jdbc");
}
if (requireBundle != null && !requireBundle.isEmpty()) {
requireBundle += (", org.ops4j.pax.logging.pax-logging-api");
} else {

View File

@@ -80,7 +80,7 @@
final org.talend.sdk.component.runtime.di.OutputsHandler outputHandler_<%=processorBeginCid%> = new org.talend.sdk.component.runtime.di.OutputsHandler(jsonb_<%=processorBeginCid%>, servicesMapper_<%=processorBeginCid%>);
outputHandler_<%=processorBeginCid%>.addConnection("<%= processorBeginOutputConnectionName %>", Object.class);
final org.talend.sdk.component.runtime.output.OutputFactory outputs_<%=processorBeginCid%> = outputHandler_<%=processorBeginCid%>.asOutputFactory();
final org.talend.sdk.component.runtime.output.OutputFactory outputs_<%=processorBeginCid%> = outputHandler_<%=processorBeginCid%>.asOutputFactoryForGuessSchema();
<%
}
%>

View File

@@ -33,7 +33,11 @@ public class TableActionParameter extends AbstractActionParameter {
@Override
public Collection<Pair<String, String>> parameters() {
final List<Map<String, Object>> value = (List<Map<String, Object>>) elementParameter.getValue();
Object elementParameterValue = elementParameter.getValue();
if (isUseExistConnection(elementParameter) && isDataStoreParameter(elementParameter)) {
elementParameterValue = getParameterValueFromConnection(elementParameter, elementParameter.getName());
}
final List<Map<String, Object>> value = (List<Map<String, Object>>) elementParameterValue;
final List<Pair<String, String>> parameters = new ArrayList<>();
if (value != null) {
int rowNumber = getRowNumber();

View File

@@ -61,7 +61,15 @@ public final class ValueConverter {
record = trimCurlyBrackets(record);
String[] entries = record.split(",\\s?");Map<String, Object> element = new HashMap<String, Object>();
for (String entry : entries) {
String[] keyValue = entry.split("(:|=)");
String[] keyValue = new String[] {};
if (entry.contains("=")) {
keyValue = entry.split("=");
} else {
keyValue = entry.split(":");
}
if (keyValue.length < 1) {
continue;
}
String key = keyValue[0];
String value = keyValue[1];
element.put(key, value);

View File

@@ -67,6 +67,8 @@ public class WidgetTypeMapper {
return getSuggestableTableType();
} else if (isTable(property)) {
return getTableType();
} else if (isModuleList(property)) {
return getModuleListType();
} else if (isValueSelection(property)) {
return getValueSelectionType();
} else if (isDate(property)) {
@@ -220,6 +222,13 @@ public class WidgetTypeMapper {
return CLOSED_LIST;
}
private boolean isModuleList(final SimplePropertyDefinition property) {
return property.getMetadata().containsKey("ui::modulelist");
}
protected EParameterFieldType getModuleListType() {
return MODULE_LIST;
}
/**
* Checks whether widget type is {@link EParameterFieldType#TABLE}
*

View File

@@ -20,7 +20,11 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.ui.runtime.exception.ExceptionMessageDialog;
import org.talend.core.model.properties.ConnectionItem;
@@ -178,6 +182,17 @@ public abstract class TaCoKitConfigurationWizard extends CheckLastVersionReposit
this.advancedPage != null ? this.advancedPage.getElementsParameters() : Collections.emptyList());
}*/
@Override
public void createPageControls(Composite pageContainer) {
super.createPageControls(pageContainer);
Shell windowShell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
Point windowLocation = windowShell.getLocation();
Shell wizardShell = getShell();
wizardShell.pack();
wizardShell.setLocation(windowLocation.x + (windowShell.getBounds().width - wizardShell.getBounds().width) / 2,
windowLocation.y + (windowShell.getBounds().height - wizardShell.getBounds().height) / 2);
}
@Override
public boolean performFinish() {
// if both are null, then nothing to do and "perform finish" operation is always accepted

View File

@@ -0,0 +1,149 @@
// ============================================================================
//
// Copyright (C) 2006-2022 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.sdk.component.studio.update;
import static java.util.stream.Collectors.joining;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Writer;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.List;
import java.util.Properties;
import java.util.jar.JarEntry;
import java.util.jar.JarInputStream;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class CarMain {
public static void deployInStudio(final File carFile, final String studioLocation, final boolean forceOverwrite,
final File m2Root) {
final File root = new File(studioLocation);
if (!root.isDirectory()) {
throw new IllegalArgumentException(studioLocation + " is not a valid directory");
}
final File config = new File(studioLocation, "configuration/config.ini");
if (!config.exists()) {
throw new IllegalArgumentException("No " + config + " found, is your studio location right?");
}
final Properties configuration = readProperties(config);
if (!m2Root.isDirectory()) {
throw new IllegalArgumentException(m2Root + " does not exist, did you specify a valid studio home?");
}
// install jars
final String mainGav = installJars(carFile, m2Root, forceOverwrite);
// register the component
final String components = configuration.getProperty("component.java.coordinates");
try {
final List<String> configLines = Files.readAllLines(config.toPath());
if (components == null) {
final String original = configLines.stream().collect(joining("\n"));
try (final Writer writer = new FileWriter(config)) {
writer.write(original + "\ncomponent.java.coordinates = " + mainGav);
}
} else {
// backup
final File backup = new File(config.getParentFile(), "backup/" + config.getName() + "_"
+ LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-mm-dd_HH-mm-ss")));
backup.getParentFile().mkdirs();
try (final OutputStream to = new BufferedOutputStream(new FileOutputStream(backup))) {
Files.copy(config.toPath(), to);
}
boolean skip = false;
try (final Writer writer = new FileWriter(config)) {
for (final String line : configLines) {
if (line.trim().startsWith("component.java.coordinates")) {
skip = true;
continue;
} else if (skip && line.trim().contains("=")) {
skip = false;
} else if (skip) {
continue;
}
writer.write(line + "\n");
}
final String toFilter = Stream.of(mainGav.contains(":") ? mainGav.split(":") : mainGav.split("/")).limit(2)
.collect(Collectors.joining(":", "", ":"));
writer.write("component.java.coordinates = " + Stream
.concat(Stream.of(mainGav),
Stream.of(components.trim().split(",")).map(String::trim).filter(it -> !it.isEmpty())
.filter(it -> !it.startsWith(toFilter)))
.collect(joining(",")));
}
}
} catch (final IOException ioe) {
throw new IllegalStateException(ioe);
}
}
private static String installJars(final File carFile, final File m2Root, final boolean forceOverwrite) {
String mainGav = null;
try (final JarInputStream jar = new JarInputStream(new BufferedInputStream(new FileInputStream(carFile)))) {
JarEntry entry;
while ((entry = jar.getNextJarEntry()) != null) {
if (entry.isDirectory()) {
continue;
}
if (entry.getName().startsWith("MAVEN-INF/repository/")) {
final String path = entry.getName().substring("MAVEN-INF/repository/".length());
final File output = new File(m2Root, path);
if (!output.getCanonicalPath().startsWith(m2Root.getCanonicalPath())) {
throw new IOException("The output file is not contained in the destination directory");
}
if (!output.exists() || forceOverwrite) {
output.getParentFile().mkdirs();
Files.copy(jar, output.toPath(), StandardCopyOption.REPLACE_EXISTING);
}
} else if ("TALEND-INF/metadata.properties".equals(entry.getName())) {
// mainGav
final Properties properties = new Properties();
properties.load(jar);
mainGav = properties.getProperty("component_coordinates");
}
}
} catch (final IOException e) {
throw new IllegalArgumentException(e);
}
if (mainGav == null || mainGav.trim().isEmpty()) {
throw new IllegalArgumentException("Didn't find the component coordinates");
}
return mainGav;
}
private static Properties readProperties(final File config) {
final Properties configuration = new Properties();
try (final InputStream stream = new FileInputStream(config)) {
configuration.load(stream);
} catch (final IOException e) {
throw new IllegalArgumentException(e);
}
return configuration;
}
}

View File

@@ -39,6 +39,8 @@ public class TaCoKitCar implements Comparable<Object> {
public static final String PROPERTY_CAR_VERSION = "version"; //$NON-NLS-1$
public static final String PROPERTY_CAR_BUNDLER_VERSION = "CarBundlerVersion"; //$NON-NLS-1$
public static final String PROPERTY_DATE = "date"; //$NON-NLS-1$
private File carFile;
@@ -49,6 +51,8 @@ public class TaCoKitCar implements Comparable<Object> {
private String carVersion;
private String carBundlerVersion;
private String id;
private String name;
@@ -72,6 +76,7 @@ public class TaCoKitCar implements Comparable<Object> {
}
components = TaCoKitUtil.convert2GAV(componentCoordinates);
setCarVersion(props.getProperty(PROPERTY_CAR_VERSION));
setCarBundlerVersion(props.getProperty(PROPERTY_CAR_BUNDLER_VERSION));
setDateString(props.getProperty(PROPERTY_DATE));
if (0 < components.size()) {
GAV gav = components.get(0);
@@ -155,11 +160,11 @@ public class TaCoKitCar implements Comparable<Object> {
return dateString.compareTo(oDateString);
}
@SuppressWarnings("nls")
@Override
public String toString() {
return "TaCoKitCar [components=" + this.components + ", name=" + this.name + ", carVersion=" + this.carVersion
+ ", dateString=" + this.dateString + ", description=" + this.description + ", carFile=" + this.carFile + "]";
return "TaCoKitCar [carFile=" + carFile + ", components=" + components + ", dateString=" + dateString + ", carVersion="
+ carVersion + ", carBundlerVersion=" + carBundlerVersion + ", id=" + id + ", name=" + name + ", description="
+ description + "]";
}
public File getCarFile() {
@@ -218,4 +223,12 @@ public class TaCoKitCar implements Comparable<Object> {
this.description = description;
}
public String getCarBundlerVersion() {
return carBundlerVersion;
}
public void setCarBundlerVersion(String carBundlerVersion) {
this.carBundlerVersion = carBundlerVersion;
}
}

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