Compare commits
176 Commits
master
...
allDeltaAn
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8b7ef5e95c | ||
|
|
b3fca54bde | ||
|
|
47b3c48580 | ||
|
|
b14945f092 | ||
|
|
823443b922 | ||
|
|
6c7c7e2d0d | ||
|
|
a05b884249 | ||
|
|
a36c14163a | ||
|
|
efe395f1bb | ||
|
|
6353bf261a | ||
|
|
441e39a51e | ||
|
|
c803692a65 | ||
|
|
a2bef6021d | ||
|
|
f6fe7cc804 | ||
|
|
8c167c470d | ||
|
|
9c91e6cce0 | ||
|
|
a003ea6a61 | ||
|
|
dd6a40cd68 | ||
|
|
a67032cdfa | ||
|
|
2a38cf7a5b | ||
|
|
4380916dcf | ||
|
|
7c7e1efb24 | ||
|
|
fc5dca5f67 | ||
|
|
54c951c4bd | ||
|
|
320c282a09 | ||
|
|
d9bff92a85 | ||
|
|
a360ffd1a7 | ||
|
|
3d7aa5a71b | ||
|
|
1bd53e9905 | ||
|
|
5580b4f8d2 | ||
|
|
9cbf21f766 | ||
|
|
4f35e05d28 | ||
|
|
c3268d3afa | ||
|
|
f5c24520ca | ||
|
|
0e30f970cf | ||
|
|
8782a4840f | ||
|
|
248c7c6d74 | ||
|
|
a2a3eb2fbf | ||
|
|
0592a4ddcc | ||
|
|
bf30eba808 | ||
|
|
e16c6f379e | ||
|
|
863a874fb2 | ||
|
|
78b2702600 | ||
|
|
18a18ce336 | ||
|
|
51d66a086e | ||
|
|
93735786d2 | ||
|
|
006b9c00b9 | ||
|
|
4790a880e1 | ||
|
|
a96fdec0a7 | ||
|
|
bde9640722 | ||
|
|
a93372f60e | ||
|
|
d1559451e4 | ||
|
|
6abc8d737d | ||
|
|
69c9182794 | ||
|
|
dc62c40afe | ||
|
|
f7952374e4 | ||
|
|
de3f85fc35 | ||
|
|
e62819fd76 | ||
|
|
adca838561 | ||
|
|
e87cfa18a1 | ||
|
|
961e39ef3b | ||
|
|
205d575bab | ||
|
|
15a25708b6 | ||
|
|
4468d89b0e | ||
|
|
3a25678438 | ||
|
|
115ddb1b05 | ||
|
|
e6a755129f | ||
|
|
1938ecc8af | ||
|
|
b15d901b27 | ||
|
|
7f92ad83a1 | ||
|
|
66b0cf243b | ||
|
|
e8ec4d0337 | ||
|
|
1e30a7ea90 | ||
|
|
debbd1107f | ||
|
|
35d279a32a | ||
|
|
6416c9c9bb | ||
|
|
e03637981c | ||
|
|
52c5ef7dfa | ||
|
|
31b3974f81 | ||
|
|
0507e76d5e | ||
|
|
c484ce75b4 | ||
|
|
212c74ebb4 | ||
|
|
489125e931 | ||
|
|
c0b2bae68e | ||
|
|
1f6dd38d99 | ||
|
|
954a123f66 | ||
|
|
a40d2a2379 | ||
|
|
e20d0e57b5 | ||
|
|
e14e19e306 | ||
|
|
94534daf40 | ||
|
|
16e8c9a4fd | ||
|
|
59f80736a2 | ||
|
|
511c3ccbd0 | ||
|
|
dbf67ed4bb | ||
|
|
29a09a75bc | ||
|
|
a73c156a6a | ||
|
|
790fe2ccb4 | ||
|
|
b507ddda61 | ||
|
|
6512df89ad | ||
|
|
a5043f56e8 | ||
|
|
c8ef5195f8 | ||
|
|
2c2bb17695 | ||
|
|
95400d2a90 | ||
|
|
39cf036547 | ||
|
|
2a39dcaab8 | ||
|
|
34e490dd0f | ||
|
|
d1f7dea73c | ||
|
|
c767870d82 | ||
|
|
cc6a1bc1da | ||
|
|
fee90cdd2f | ||
|
|
b8e0a55fb7 | ||
|
|
447e26d05c | ||
|
|
8a24135a74 | ||
|
|
316f2f7e96 | ||
|
|
9693179a6e | ||
|
|
567abbf3d4 | ||
|
|
9a3617679d | ||
|
|
215cf5fe8d | ||
|
|
21be67d243 | ||
|
|
717623b206 | ||
|
|
ea13d1115d | ||
|
|
af52c4df65 | ||
|
|
e934d2112c | ||
|
|
385843d3be | ||
|
|
aae6ad44b5 | ||
|
|
a5e1f73458 | ||
|
|
47cebcbddf | ||
|
|
0efcfa2983 | ||
|
|
76b0a7a979 | ||
|
|
045d5df5df | ||
|
|
453ca6e25a | ||
|
|
844d9e6c29 | ||
|
|
9d218fbecf | ||
|
|
2e2c5f810d | ||
|
|
9c25ce552b | ||
|
|
a42b25c9bb | ||
|
|
7d6e7e1c85 | ||
|
|
cfabaf818a | ||
|
|
e2f426e39f | ||
|
|
ba1bf20653 | ||
|
|
063db841c0 | ||
|
|
a6640f95a9 | ||
|
|
d01f8a7da9 | ||
|
|
f8e9e01e31 | ||
|
|
94ff584488 | ||
|
|
1db094edd3 | ||
|
|
8b9fe33a86 | ||
|
|
4782321f64 | ||
|
|
12b61b8d5f | ||
|
|
8b26ef7e15 | ||
|
|
8ac9327375 | ||
|
|
9f4810e59e | ||
|
|
0f89caccfb | ||
|
|
c16c8f71f8 | ||
|
|
7ab0f2015a | ||
|
|
af43cd8973 | ||
|
|
4169210118 | ||
|
|
3d185eeb95 | ||
|
|
85a8f83baa | ||
|
|
d3faad612e | ||
|
|
059c211971 | ||
|
|
ce028761e5 | ||
|
|
8c2a503063 | ||
|
|
ca7263b7a1 | ||
|
|
04d41a8421 | ||
|
|
d35506dce1 | ||
|
|
5e05ca8947 | ||
|
|
51f8af8aed | ||
|
|
360f1a2612 | ||
|
|
4f668f6a46 | ||
|
|
f75fed8fd8 | ||
|
|
812ac5399d | ||
|
|
d917b791d0 | ||
|
|
9bc4abb02d | ||
|
|
3daedf72de | ||
|
|
854ac0d1b1 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -11,3 +11,4 @@ main/plugins/org.talend.designer.codegen/resources/sparkstreaming_header.javajet
|
||||
main/plugins/org.talend.designer.codegen/resources/sparkstreaming_subprocess_footer.javajet
|
||||
main/plugins/org.talend.designer.codegen/resources/sparkstreaming_subprocess_header.javajet
|
||||
main/plugins/org.talend.designer.codegen/resources/routelet.skeleton
|
||||
.DS_Store
|
||||
@@ -4,5 +4,6 @@ Huge thanks to these people who contributed in making Talend product better:
|
||||
- [jlolling](https://github.com/jlolling) (Jan -and Miss- Lolling)
|
||||
- [kirkalicious](https://github.com/kirkalicious) (Kirk Tarou)
|
||||
- [mrizzato](https://github.com/mrizzato) (Massimiliano Rizzato)
|
||||
- [overpackaging](https://github.com/overpackaging) (Steeve Dreux)
|
||||
- [brazabr](https://github.com/brazabr) (Thiago Benvenuto)
|
||||
- [phoflack](https://jira.talendforge.org/secure/ViewProfile.jspa?name=phoflack) (Philip Hoflack)
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.abstractmap.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.alfrescooutput.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.business.diagram.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.codegen.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.components.exchange.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.core.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.dbmap.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.documentation.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.fileoutputxml.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.gefabstractmap.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.mapper.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.maven.job.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.rowgenerator.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.runprocess.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.scd.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.webservice.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.xmlmap.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.expressionbuilder.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.presentation.onboarding.resource.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.presentation.onboarding.resource.tos.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.ftp.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.json.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.view.di.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.sbi.engines.client.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.spagic.engines.client.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.sqlbuilder.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.business.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.fragment.jars.di.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.help.tos.components.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.rcp.branding.tos.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.rcp.branding.tos.test.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.sbi.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.spagic.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.tos.components.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.tos.core.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.tos.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.tos.libraries.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.abstractmap</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.alfrescooutput</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.business.diagram</artifactId>
|
||||
|
||||
@@ -86,11 +86,18 @@ if((codePart.equals(ECodePart.END))&&(stat || logstashCurrent)){
|
||||
for(IConnection con:connSet){
|
||||
INode source = con.getSource();
|
||||
String sourceNodeId = source.getUniqueName();
|
||||
|
||||
String sourceLabel = ElementParameterParser.getValue(source, "__LABEL__");
|
||||
String sourceNodeLabel = ((sourceLabel==null || "__UNIQUE_NAME__".equals(sourceLabel) || sourceLabel.contains("\"")) ? sourceNodeId : sourceLabel);
|
||||
|
||||
String targetLabel = ElementParameterParser.getValue(node, "__LABEL__");
|
||||
String targetNodeLabel = ((targetLabel==null || "__UNIQUE_NAME__".equals(targetLabel) || targetLabel.contains("\"")) ? node.getUniqueName() : targetLabel);
|
||||
|
||||
String sourceNodeComponent = source.getComponent().getName();
|
||||
for (INode jobStructureCatcher : jobCatcherNodes) {
|
||||
%>
|
||||
if(runStat.updateStatAndLog(execStat,enableLogStash,resourceMap,iterateId,"<%=con.getUniqueName()%>",2,0,
|
||||
<%=jobStructureCatcher.getUniqueName()%>,"<%=sourceNodeId%>","<%=sourceNodeComponent%>","<%=node.getUniqueName()%>","<%=node.getComponent().getName()%>","<%="REJECT".equals(con.getConnectorName()) ? "reject" : "output"%>")) {
|
||||
"<%=sourceNodeId%>","<%=sourceNodeLabel%>","<%=sourceNodeComponent%>","<%=node.getUniqueName()%>","<%=targetNodeLabel%>","<%=node.getComponent().getName()%>","<%="REJECT".equals(con.getConnectorName()) ? "reject" : "output"%>")) {
|
||||
<%=jobStructureCatcher.getDesignSubjobStartNode().getUniqueName() %>Process(globalMap);
|
||||
}
|
||||
<%
|
||||
@@ -113,11 +120,18 @@ if((codePart.equals(ECodePart.END))&&(stat || logstashCurrent)){
|
||||
for(IConnection con:connSet){
|
||||
INode source = con.getSource();
|
||||
String sourceNodeId = source.getUniqueName();
|
||||
|
||||
String sourceLabel = ElementParameterParser.getValue(source, "__LABEL__");
|
||||
String sourceNodeLabel = ((sourceLabel==null || "__UNIQUE_NAME__".equals(sourceLabel) || sourceLabel.contains("\"")) ? sourceNodeId : sourceLabel);
|
||||
|
||||
String targetLabel = ElementParameterParser.getValue(node, "__LABEL__");
|
||||
String targetNodeLabel = ((targetLabel==null || "__UNIQUE_NAME__".equals(targetLabel) || targetLabel.contains("\"")) ? node.getUniqueName() : targetLabel);
|
||||
|
||||
String sourceNodeComponent = source.getComponent().getName();
|
||||
for (INode jobStructureCatcher : jobCatcherNodes) {
|
||||
%>
|
||||
if(runStat.log(resourceMap,iterateId,"<%=con.getUniqueName()%>",2,0,
|
||||
<%=jobStructureCatcher.getUniqueName()%>,"<%=sourceNodeId%>","<%=sourceNodeComponent%>","<%=node.getUniqueName()%>","<%=node.getComponent().getName()%>","<%="REJECT".equals(con.getConnectorName()) ? "reject" : "output"%>")) {
|
||||
"<%=sourceNodeId%>","<%=sourceNodeLabel%>","<%=sourceNodeComponent%>","<%=node.getUniqueName()%>","<%=targetNodeLabel%>","<%=node.getComponent().getName()%>","<%="REJECT".equals(con.getConnectorName()) ? "reject" : "output"%>")) {
|
||||
<%=jobStructureCatcher.getDesignSubjobStartNode().getUniqueName() %>Process(globalMap);
|
||||
}
|
||||
<%
|
||||
|
||||
@@ -145,6 +145,9 @@
|
||||
String cid = node.getUniqueName();
|
||||
boolean logstashCurrent = !cid.startsWith("tJobStructureCatcher") && !cid.startsWith("talend") && enableLogStash;
|
||||
|
||||
//about performance monitor, no way to support more than one job catcher component, also that is not necessary
|
||||
final String subprocessName4Catcher = logstashCurrent ? jobCatcherNodes.get(0).getDesignSubjobStartNode().getUniqueName() : null;
|
||||
|
||||
if ((codePart.equals(ECodePart.BEGIN))&&(stat || logstashCurrent)&&connSet.size()>0) {
|
||||
if(containsTPartitioner) {
|
||||
%>
|
||||
@@ -181,13 +184,35 @@
|
||||
if(!node.getComponent().useMerge()) {
|
||||
if(stat && logstashCurrent) {
|
||||
%>
|
||||
runStat.updateStatAndLog(execStat,enableLogStash,iterateId,1,1<%for(IConnection con : connSet){%>,"<%=con.getUniqueName()%>"<%}%>);
|
||||
if(runStat.update(execStat,enableLogStash,iterateId,1,1
|
||||
<%for(IConnection con : connSet){
|
||||
INode source = con.getSource();
|
||||
String sourceNodeId = source.getUniqueName();
|
||||
|
||||
String sourceLabel = ElementParameterParser.getValue(source, "__LABEL__");
|
||||
String sourceNodeLabel = ((sourceLabel==null || "__UNIQUE_NAME__".equals(sourceLabel) || sourceLabel.contains("\"")) ? sourceNodeId : sourceLabel);
|
||||
|
||||
String targetLabel = ElementParameterParser.getValue(node, "__LABEL__");
|
||||
String targetNodeLabel = ((targetLabel==null || "__UNIQUE_NAME__".equals(targetLabel) || targetLabel.contains("\"")) ? node.getUniqueName() : targetLabel);
|
||||
|
||||
String sourceNodeComponent = source.getComponent().getName();
|
||||
%>
|
||||
,"<%=con.getUniqueName()%>","<%=sourceNodeId%>","<%=sourceNodeLabel%>","<%=sourceNodeComponent%>","<%=node.getUniqueName()%>","<%=targetNodeLabel%>","<%=node.getComponent().getName()%>"
|
||||
<%}%>
|
||||
)) {
|
||||
<%=subprocessName4Catcher %>Process(globalMap);
|
||||
}
|
||||
<%
|
||||
} else {
|
||||
if(stat) {
|
||||
%>
|
||||
if(execStat){
|
||||
runStat.updateStatOnConnection(iterateId,1,1<%for(IConnection con : connSet){%>,"<%=con.getUniqueName()%>"<%}%>);
|
||||
runStat.updateStatOnConnection(iterateId,1,1
|
||||
<%for(IConnection con : connSet){
|
||||
%>
|
||||
,"<%=con.getUniqueName()%>"
|
||||
<%}%>
|
||||
);
|
||||
}
|
||||
<%
|
||||
}
|
||||
@@ -195,7 +220,24 @@
|
||||
if(logstashCurrent) {
|
||||
%>
|
||||
if(enableLogStash) {
|
||||
runStat.log(iterateId,1,1<%for(IConnection con : connSet){%>,"<%=con.getUniqueName()%>"<%}%>);
|
||||
if(runStat.updateLog(iterateId,1,1
|
||||
<%for(IConnection con : connSet){
|
||||
INode source = con.getSource();
|
||||
String sourceNodeId = source.getUniqueName();
|
||||
|
||||
String sourceLabel = ElementParameterParser.getValue(source, "__LABEL__");
|
||||
String sourceNodeLabel = ((sourceLabel==null || "__UNIQUE_NAME__".equals(sourceLabel) || sourceLabel.contains("\"")) ? sourceNodeId : sourceLabel);
|
||||
|
||||
String targetLabel = ElementParameterParser.getValue(node, "__LABEL__");
|
||||
String targetNodeLabel = ((targetLabel==null || "__UNIQUE_NAME__".equals(targetLabel) || targetLabel.contains("\"")) ? node.getUniqueName() : targetLabel);
|
||||
|
||||
String sourceNodeComponent = source.getComponent().getName();
|
||||
%>
|
||||
,"<%=con.getUniqueName()%>","<%=sourceNodeId%>","<%=sourceNodeLabel%>","<%=sourceNodeComponent%>","<%=node.getUniqueName()%>","<%=targetNodeLabel%>","<%=node.getComponent().getName()%>"
|
||||
<%}%>
|
||||
)) {
|
||||
<%=subprocessName4Catcher %>Process(globalMap);
|
||||
}
|
||||
}
|
||||
<%
|
||||
}
|
||||
@@ -205,18 +247,62 @@
|
||||
if(connection.getUniqueName().equals((String)codeGenArgument.getIncomingName())){
|
||||
if(stat && logstashCurrent) {
|
||||
%>
|
||||
runStat.updateStatAndLog(execStat,enableLogStash,iterateId,1,1<%for(IConnection con : connSet){if(con.getUniqueName().equals((String)codeGenArgument.getIncomingName())){%>,"<%=con.getUniqueName()%>"<%}}%>);
|
||||
if(runStat.update(execStat,enableLogStash,iterateId,1,1
|
||||
<%for(IConnection con : connSet){
|
||||
INode source = con.getSource();
|
||||
String sourceNodeId = source.getUniqueName();
|
||||
|
||||
String sourceLabel = ElementParameterParser.getValue(source, "__LABEL__");
|
||||
String sourceNodeLabel = ((sourceLabel==null || "__UNIQUE_NAME__".equals(sourceLabel) || sourceLabel.contains("\"")) ? sourceNodeId : sourceLabel);
|
||||
|
||||
String targetLabel = ElementParameterParser.getValue(node, "__LABEL__");
|
||||
String targetNodeLabel = ((targetLabel==null || "__UNIQUE_NAME__".equals(targetLabel) || targetLabel.contains("\"")) ? node.getUniqueName() : targetLabel);
|
||||
|
||||
String sourceNodeComponent = source.getComponent().getName();
|
||||
|
||||
if(con.getUniqueName().equals((String)codeGenArgument.getIncomingName())){%>
|
||||
,"<%=con.getUniqueName()%>","<%=sourceNodeId%>","<%=sourceNodeLabel%>","<%=sourceNodeComponent%>","<%=node.getUniqueName()%>","<%=targetNodeLabel%>","<%=node.getComponent().getName()%>"
|
||||
<%}
|
||||
}%>
|
||||
)) {
|
||||
<%=subprocessName4Catcher %>Process(globalMap);
|
||||
}
|
||||
<%
|
||||
} else {
|
||||
if(stat) {%>
|
||||
if(execStat){
|
||||
runStat.updateStatOnConnection(iterateId,1,1<%for(IConnection con : connSet){if(con.getUniqueName().equals((String)codeGenArgument.getIncomingName())){%>,"<%=con.getUniqueName()%>"<%}}%>);
|
||||
runStat.updateStatOnConnection(iterateId,1,1
|
||||
<%for(IConnection con : connSet){
|
||||
if(con.getUniqueName().equals((String)codeGenArgument.getIncomingName())){%>
|
||||
,"<%=con.getUniqueName()%>"
|
||||
<%}
|
||||
}%>
|
||||
);
|
||||
}
|
||||
<%}
|
||||
|
||||
if(logstashCurrent) {%>
|
||||
if(enableLogStash) {
|
||||
runStat.log(iterateId,1,1<%for(IConnection con : connSet){if(con.getUniqueName().equals((String)codeGenArgument.getIncomingName())){%>,"<%=con.getUniqueName()%>"<%}}%>);
|
||||
if(runStat.updateLog(iterateId,1,1
|
||||
<%for(IConnection con : connSet){
|
||||
INode source = con.getSource();
|
||||
String sourceNodeId = source.getUniqueName();
|
||||
|
||||
String sourceLabel = ElementParameterParser.getValue(source, "__LABEL__");
|
||||
String sourceNodeLabel = ((sourceLabel==null || "__UNIQUE_NAME__".equals(sourceLabel) || sourceLabel.contains("\"")) ? sourceNodeId : sourceLabel);
|
||||
|
||||
String targetLabel = ElementParameterParser.getValue(node, "__LABEL__");
|
||||
String targetNodeLabel = ((targetLabel==null || "__UNIQUE_NAME__".equals(targetLabel) || targetLabel.contains("\"")) ? node.getUniqueName() : targetLabel);
|
||||
|
||||
String sourceNodeComponent = source.getComponent().getName();
|
||||
|
||||
if(con.getUniqueName().equals((String)codeGenArgument.getIncomingName())){%>
|
||||
,"<%=con.getUniqueName()%>","<%=sourceNodeId%>","<%=sourceNodeLabel%>","<%=sourceNodeComponent%>","<%=node.getUniqueName()%>","<%=targetNodeLabel%>","<%=node.getComponent().getName()%>"
|
||||
<%}
|
||||
}%>
|
||||
)) {
|
||||
<%=subprocessName4Catcher %>Process(globalMap);
|
||||
}
|
||||
}
|
||||
<%}
|
||||
}
|
||||
@@ -248,9 +334,11 @@
|
||||
|
||||
if(logstashCurrent) {
|
||||
for (INode jobStructureCatcher : jobCatcherNodes) {
|
||||
String label = ElementParameterParser.getValue(node, "__LABEL__");
|
||||
String nodeLabel = ((label==null || "__UNIQUE_NAME__".equals(label) || label.contains("\"")) ? node.getUniqueName() : label);
|
||||
%>
|
||||
if(enableLogStash) {
|
||||
<%=jobStructureCatcher.getUniqueName() %>.addCM("<%=node.getUniqueName()%>", "<%=node.getComponent().getName()%>");
|
||||
<%=jobStructureCatcher.getUniqueName() %>.addCM("<%=node.getUniqueName()%>", "<%=nodeLabel%>", "<%=node.getComponent().getName()%>");
|
||||
<%=jobStructureCatcher.getDesignSubjobStartNode().getUniqueName() %>Process(globalMap);
|
||||
}
|
||||
<%
|
||||
|
||||
@@ -108,6 +108,21 @@
|
||||
exist_tSQLDB = true;
|
||||
}
|
||||
|
||||
|
||||
String[] tcompV0Components = new String[] {
|
||||
"tAzureStorageConnection",
|
||||
"tGoogleDriveConnection",
|
||||
"tMarketoConnection",
|
||||
"tSnowflakeConnection",
|
||||
"tSalesforceConnection",
|
||||
"tNetsuiteConnection",
|
||||
"tMarkLogicConnection"
|
||||
};
|
||||
List<INode> tcompV0ComponentsList = new ArrayList<INode>();
|
||||
for (String tcompV0Component : tcompV0Components) {
|
||||
tcompV0ComponentsList.addAll((List<INode>)process.getNodesOfType(tcompV0Component));
|
||||
}
|
||||
|
||||
boolean exist_tSCP = false;
|
||||
List<INode> scpComponentsList = (List<INode>)process.getNodesOfType("tSCPConnection");
|
||||
if (scpComponentsList.size() > 0) {
|
||||
@@ -167,6 +182,8 @@
|
||||
exist_tSalesforce = true;
|
||||
}
|
||||
|
||||
List<INode> snowflakeComponentsList = (List<INode>)process.getNodesOfType("tSnowflakeConnection");
|
||||
|
||||
boolean exist_tSAP= false;
|
||||
List<INode> sapComponentsList = (List<INode>)process.getNodesOfType("tSAPConnection");
|
||||
if (sapComponentsList.size() > 0) {
|
||||
@@ -258,7 +275,7 @@
|
||||
}
|
||||
%>
|
||||
|
||||
private PropertiesWithType context_param = new PropertiesWithType();
|
||||
protected PropertiesWithType context_param = new PropertiesWithType();
|
||||
public java.util.Map<String, Object> parentContextMap = new java.util.HashMap<String, Object>();
|
||||
|
||||
public String status= "";
|
||||
@@ -447,7 +464,7 @@
|
||||
lastStr = "";
|
||||
}
|
||||
}
|
||||
enableLogStash = "true".equalsIgnoreCase(System.getProperty("monitoring"));
|
||||
enableLogStash = "true".equalsIgnoreCase(System.getProperty("audit.enabled"));
|
||||
|
||||
<%if(isLog4jEnabled){%>
|
||||
if(!"".equals(log4jLevel)){
|
||||
@@ -519,15 +536,15 @@
|
||||
properties_<%=jobCatcherNode.getUniqueName()%>.setProperty("host", "false");
|
||||
|
||||
System.getProperties().stringPropertyNames().stream()
|
||||
.filter(it -> it.startsWith("monitoring.audit.logger.properties."))
|
||||
.forEach(key -> properties_<%=jobCatcherNode.getUniqueName()%>.setProperty(key.substring("monitoring.audit.logger.properties.".length()), System.getProperty(key)));
|
||||
.filter(it -> it.startsWith("audit.logger."))
|
||||
.forEach(key -> properties_<%=jobCatcherNode.getUniqueName()%>.setProperty(key.substring("audit.logger.".length()), System.getProperty(key)));
|
||||
|
||||
<%if(isLog4j1Enabled) {%>
|
||||
org.apache.log4j.Logger.getLogger("audit").setLevel(org.apache.log4j.Level.DEBUG);
|
||||
org.apache.log4j.Logger.getLogger(properties_<%=jobCatcherNode.getUniqueName()%>.getProperty("root.logger")).setLevel(org.apache.log4j.Level.DEBUG);
|
||||
<%}%>
|
||||
|
||||
<%if(isLog4j2Enabled) {%>
|
||||
org.apache.logging.log4j.core.config.Configurator.setLevel("audit", org.apache.logging.log4j.Level.DEBUG);
|
||||
org.apache.logging.log4j.core.config.Configurator.setLevel(properties_<%=jobCatcherNode.getUniqueName()%>.getProperty("root.logger"), org.apache.logging.log4j.Level.DEBUG);
|
||||
<%}%>
|
||||
auditLogger_<%=jobCatcherNode.getUniqueName()%> = org.talend.job.audit.JobEventAuditLoggerFactory.createJobAuditLogger(properties_<%=jobCatcherNode.getUniqueName()%>);
|
||||
}
|
||||
@@ -619,7 +636,16 @@
|
||||
} //endIf
|
||||
%>
|
||||
context.setContextType("<%=ctxParam.getName()%>", "<%=ctxParam.getType()%>");
|
||||
if(context.getStringValue("<%=ctxParam.getName()%>") == null) {
|
||||
context.<%=ctxParam.getName()%> = null;
|
||||
} else {
|
||||
<%//}B1 block%>
|
||||
<%
|
||||
String typeToGenerate ="String";
|
||||
if( !(ctxParam.getType().equals("id_File") || ctxParam.getType().equals("id_Directory") ||ctxParam.getType().equals("id_List Of Value"))) {
|
||||
typeToGenerate=JavaTypesManager.getTypeToGenerate(ctxParam.getType(),true);
|
||||
}
|
||||
|
||||
if (ctxParam.getType().equals("id_Password")) {
|
||||
%>
|
||||
String pwd_<%=ctxParam.getName()%>_value = context.getProperty("<%=ctxParam.getName()%>");
|
||||
@@ -637,13 +663,7 @@
|
||||
}
|
||||
}
|
||||
<%
|
||||
continue;
|
||||
}
|
||||
String typeToGenerate ="String";
|
||||
if( !(ctxParam.getType().equals("id_File") || ctxParam.getType().equals("id_Directory") ||ctxParam.getType().equals("id_List Of Value"))) {
|
||||
typeToGenerate=JavaTypesManager.getTypeToGenerate(ctxParam.getType(),true);
|
||||
}
|
||||
if(typeToGenerate.equals("java.util.Date")) {
|
||||
} else if(typeToGenerate.equals("java.util.Date")) {
|
||||
%>
|
||||
try{
|
||||
String context_<%=ctxParam.getName()%>_value = context.getProperty("<%=ctxParam.getName()%>");
|
||||
@@ -702,6 +722,10 @@
|
||||
}
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<%//{B1 block%>
|
||||
}
|
||||
<%
|
||||
}
|
||||
%>
|
||||
} <%/*close last method*/%>
|
||||
@@ -872,20 +896,6 @@ if(execStat) {
|
||||
}
|
||||
%>
|
||||
|
||||
<%if (hadoopClusterIds.size() > 1) {%>
|
||||
System.err.println("Only one hadoop configuration is allowed in one job!");
|
||||
<%}%>
|
||||
|
||||
<%
|
||||
// run tHadoopConfManager component if there is it.
|
||||
if(!hadoopConfNodes.isEmpty()) {
|
||||
INode hadoopConfNode = hadoopConfNodes.get(0);
|
||||
%>
|
||||
<%=createCallProcess(hadoopConfNode, className, false) %>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
<%
|
||||
//2. load implicit contextload
|
||||
if(implicit_Context != null) {
|
||||
@@ -908,6 +918,21 @@ this.globalResumeTicket = true;//to run tPreJob
|
||||
}
|
||||
%>
|
||||
|
||||
<%if (hadoopClusterIds.size() > 1) {%>
|
||||
System.err.println("Only one hadoop configuration is allowed in one job!");
|
||||
<%}%>
|
||||
|
||||
<%
|
||||
// run tHadoopConfManager component if there is it.
|
||||
if(!hadoopConfNodes.isEmpty()) {
|
||||
INode hadoopConfNode = hadoopConfNodes.get(0);
|
||||
if (hadoopConfNode.isStart()) {
|
||||
%>
|
||||
<%=createCallProcess(hadoopConfNode, className, false) %>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
<%
|
||||
//4. flush the begin msg
|
||||
@@ -1320,13 +1345,11 @@ if (execStat) {
|
||||
} else {
|
||||
type = "ftp";
|
||||
}
|
||||
if ("ftp".equals(type)) { %>
|
||||
((com.enterprisedt.net.ftp.FTPClient) obj_conn).quit();
|
||||
<%} else if ("sftp".equals(type)) { %>
|
||||
if ("sftp".equals(type)) { %>
|
||||
((com.jcraft.jsch.ChannelSftp) obj_conn).quit();
|
||||
<%} else { %>
|
||||
((org.apache.commons.net.ftp.FTPSClient) obj_conn).disconnect();
|
||||
<%}%>
|
||||
<%} else { %>
|
||||
((org.apache.commons.net.ftp.FTPClient) obj_conn).disconnect();
|
||||
<%}%>
|
||||
}
|
||||
<% } %>
|
||||
} catch (java.lang.Exception e) {
|
||||
@@ -1416,11 +1439,24 @@ if (execStat) {
|
||||
private void closeGSConnections() {
|
||||
try {
|
||||
<% for (INode gsComponent : gsComponentsList) { %>
|
||||
org.jets3t.service.impl.rest.httpclient.GoogleStorageService service_<%=gsComponent.getUniqueName()%> =
|
||||
(org.jets3t.service.impl.rest.httpclient.GoogleStorageService)globalMap.get("service_<%=gsComponent.getUniqueName()%>");
|
||||
if(service_<%=gsComponent.getUniqueName()%> !=null){
|
||||
service_<%=gsComponent.getUniqueName()%>.shutdown();
|
||||
}
|
||||
|
||||
<%
|
||||
String authType = ElementParameterParser.getValue(gsComponent, "__AUTH_TYPE__");
|
||||
if (authType.equals("USER_ACCOUNT_HMAC")){
|
||||
%>
|
||||
|
||||
org.jets3t.service.impl.rest.httpclient.GoogleStorageService service_<%=gsComponent.getUniqueName()%> =
|
||||
(org.jets3t.service.impl.rest.httpclient.GoogleStorageService)globalMap.get("service_<%=gsComponent.getUniqueName()%>");
|
||||
if(service_<%=gsComponent.getUniqueName()%> !=null){
|
||||
service_<%=gsComponent.getUniqueName()%>.shutdown();
|
||||
}
|
||||
<%
|
||||
} else if (authType.equals("SERVICE_ACCOUNT")) {
|
||||
%>
|
||||
//Don't need to close storage when use google storage api
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
<% } %>
|
||||
} catch (java.lang.Exception e) {
|
||||
@@ -1501,12 +1537,14 @@ if (execStat) {
|
||||
<% } %>
|
||||
<% for (INode existNode : existComponentsList) { %>
|
||||
connections.put("col_<%=existNode.getUniqueName()%>", globalMap.get("col_<%=existNode.getUniqueName()%>"));
|
||||
<% } %>
|
||||
<% }
|
||||
|
||||
<% for (INode salesforceNode : salesforceComponentsList) { %>
|
||||
connections.put("conn_<%=salesforceNode.getUniqueName()%>", globalMap.get("conn_<%=salesforceNode.getUniqueName()%>"));
|
||||
<% } %>
|
||||
<% for (INode sapNode : sapComponentsList) { %>
|
||||
for (INode tcompV0ConnectionNode : tcompV0ComponentsList) { %>
|
||||
connections.put("<%=tcompV0ConnectionNode.getUniqueName()%>_connection", globalMap.get("<%=tcompV0ConnectionNode.getUniqueName()%>_connection"));
|
||||
connections.put("<%=tcompV0ConnectionNode.getUniqueName()%>_COMPONENT_RUNTIME_PROPERTIES", globalMap.get("<%=tcompV0ConnectionNode.getUniqueName()%>_COMPONENT_RUNTIME_PROPERTIES"));
|
||||
<% }
|
||||
|
||||
for (INode sapNode : sapComponentsList) { %>
|
||||
connections.put("conn_<%=sapNode.getUniqueName()%>", globalMap.get("conn_<%=sapNode.getUniqueName()%>"));
|
||||
<% } %>
|
||||
<% for (INode gsNode : gsComponentsList) { %>
|
||||
@@ -1570,7 +1608,7 @@ if (execStat) {
|
||||
}
|
||||
} else if (arg.startsWith("--log4jLevel=")) {
|
||||
log4jLevel = arg.substring(13);
|
||||
} else if (arg.startsWith("--monitoring") && arg.contains("=")) {//for trunjob call
|
||||
} else if (arg.startsWith("--audit.enabled") && arg.contains("=")) {//for trunjob call
|
||||
final int equal = arg.indexOf('=');
|
||||
final String key = arg.substring("--".length(), equal);
|
||||
System.setProperty(key, arg.substring(equal + 1));
|
||||
|
||||
@@ -116,7 +116,11 @@ class IndexedRecordToRowStructGenerator {
|
||||
routines.system.DynamicMetadata dynamicMetadata_<%=cid%> = new routines.system.DynamicMetadata();
|
||||
org.apache.avro.Schema dynamicFieldSchema_<%=cid%> = dynamicField_<%=cid%>.schema();
|
||||
// set name
|
||||
dynamicMetadata_<%=cid%>.setName(dynamicField_<%=cid%>.name());
|
||||
if("true".equals(dynamicField_<%=cid%>.getProp("ENABLE_SPECIAL_TABLENAME"))){
|
||||
dynamicMetadata_<%=cid%>.setName(dynamicField_<%=cid%>.getProp("talend.field.dbColumnName"));
|
||||
}else{
|
||||
dynamicMetadata_<%=cid%>.setName(dynamicField_<%=cid%>.name());
|
||||
}
|
||||
// set db name
|
||||
dynamicMetadata_<%=cid%>.setDbName(dynamicField_<%=cid%>.name());
|
||||
// set nullable
|
||||
@@ -166,6 +170,14 @@ class IndexedRecordToRowStructGenerator {
|
||||
if (columnName.equals(dynamicColName)) {
|
||||
%>
|
||||
java.util.Map<String, Object> dynamicValue_<%=cid%> = (java.util.Map<String, Object>) <%=codeVarSchemaEnforcer%>.get(<%=i%>);
|
||||
org.apache.avro.Schema dynSchema_<%=cid%> = ((org.talend.codegen.enforcer.OutgoingDynamicSchemaEnforcer) <%=codeVarSchemaEnforcer%>).getDynamicFieldsSchema();
|
||||
for (org.apache.avro.Schema.Field dynamicField_<%=cid%> : dynSchema_<%=cid%>.getFields()){
|
||||
String name = dynamicField_<%=cid%>.name();
|
||||
if("true".equals(dynamicField_<%=cid%>.getProp("ENABLE_SPECIAL_TABLENAME"))){
|
||||
dynamicValue_<%=cid%>.put(dynamicField_<%=cid%>.getProp("talend.field.dbColumnName"), dynamicValue_<%=cid%>.get(name));
|
||||
dynamicValue_<%=cid%>.remove(name);
|
||||
}
|
||||
}
|
||||
for (java.util.Map.Entry<String, Object> dynamicValueEntry_<%=cid%> : dynamicValue_<%=cid%>.entrySet()) {
|
||||
<%=codeVarDynamic%>.setColumnValue(<%=codeVarDynamic%>.getIndex(dynamicValueEntry_<%=cid%>.getKey()), dynamicValueEntry_<%=cid%>.getValue());
|
||||
}
|
||||
|
||||
@@ -298,6 +298,15 @@ if(isRunInMultiThread){
|
||||
}
|
||||
<% } %>
|
||||
}
|
||||
|
||||
//if the stored or passed value is "<TALEND_NULL>" string, it mean null
|
||||
public String getStringValue(String key) {
|
||||
String origin_value = this.getProperty(key);
|
||||
if(NULL_VALUE_EXPRESSION_IN_COMMAND_STRING_FOR_CHILD_JOB_ONLY.equals(origin_value)) {
|
||||
return null;
|
||||
}
|
||||
return origin_value;
|
||||
}
|
||||
|
||||
<%
|
||||
for (IContextParameter ctxParam :params)
|
||||
@@ -381,7 +390,14 @@ public <%=JavaTypesManager.getTypeToGenerate(ctxParam.getType(),true)%> get<%=Ch
|
||||
}
|
||||
}
|
||||
boolean enableLogStash = jobCatcherNode != null;
|
||||
if (stats || enableLogStash) {
|
||||
if (enableLogStash) {
|
||||
%>
|
||||
private final JobStructureCatcherUtils <%=jobCatcherNode.getUniqueName() %> = new JobStructureCatcherUtils(jobName, "<%=process.getId() %>", "<%=process.getVersion() %>");
|
||||
private org.talend.job.audit.JobAuditLogger auditLogger_<%=jobCatcherNode.getUniqueName()%> = null;
|
||||
|
||||
private RunStat runStat = new RunStat(<%=jobCatcherNode.getUniqueName() %>);
|
||||
<%
|
||||
} else if(stats) {
|
||||
%>
|
||||
private RunStat runStat = new RunStat();
|
||||
<%
|
||||
@@ -422,13 +438,6 @@ private RunTrace runTrace = new RunTrace();
|
||||
<%
|
||||
}
|
||||
|
||||
if(enableLogStash) {
|
||||
%>
|
||||
JobStructureCatcherUtils <%=jobCatcherNode.getUniqueName() %> = new JobStructureCatcherUtils(jobName, "<%=process.getId() %>", "<%=process.getVersion() %>");
|
||||
org.talend.job.audit.JobAuditLogger auditLogger_<%=jobCatcherNode.getUniqueName()%> = null;
|
||||
<%
|
||||
}
|
||||
|
||||
for (INode metterCatcher : process.getNodesOfType("tFlowMeterCatcher")) {
|
||||
%>
|
||||
MetterCatcherUtils <%=metterCatcher.getUniqueName() %> = new MetterCatcherUtils("<%=process.getId() %>", "<%=process.getVersion() %>");
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.codegen</artifactId>
|
||||
|
||||
@@ -66,6 +66,7 @@ import org.talend.designer.codegen.model.CodeGeneratorEmittersPoolFactory;
|
||||
import org.talend.designer.codegen.model.CodeGeneratorInternalTemplatesFactoryProvider;
|
||||
import org.talend.designer.codegen.proxy.JetProxy;
|
||||
import org.talend.designer.core.generic.model.Component;
|
||||
import org.talend.designer.runprocess.ProcessorUtilities;
|
||||
|
||||
/**
|
||||
* CodeGenerator.
|
||||
@@ -353,8 +354,12 @@ public class CodeGenerator implements ICodeGenerator {
|
||||
.getDefault().getService(IResourcesDependenciesService.class);
|
||||
String resourcePathForContext = null;
|
||||
if (process instanceof IProcess2) {
|
||||
resourcePathForContext = resourceService.getResourcePathForContext(process,
|
||||
contextPar.getValue());
|
||||
String value = contextPar.getValue();
|
||||
// for runtime
|
||||
if (!ProcessorUtilities.isExportConfig()) {
|
||||
contextPar.setType(JavaTypesManager.FILE.getId());
|
||||
}
|
||||
resourcePathForContext = resourceService.getResourcePathForContext(process, value);
|
||||
} else {
|
||||
// for PreviewFileInputContentDataProcess run
|
||||
resourcePathForContext = resourceService.getResourceItemFilePath(contextPar.getValue());
|
||||
|
||||
@@ -28,9 +28,9 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.Semaphore;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
@@ -70,7 +70,6 @@ import org.talend.core.model.components.ComponentCategory;
|
||||
import org.talend.core.model.components.ComponentManager;
|
||||
import org.talend.core.model.components.ComponentProviderInfo;
|
||||
import org.talend.core.model.components.ComponentUtilities;
|
||||
import org.talend.core.model.components.EComponentType;
|
||||
import org.talend.core.model.components.IComponent;
|
||||
import org.talend.core.model.components.IComponentsFactory;
|
||||
import org.talend.core.model.components.IComponentsHandler;
|
||||
@@ -838,23 +837,21 @@ public class ComponentsFactory implements IComponentsFactory {
|
||||
init(false);
|
||||
}
|
||||
|
||||
for (IComponent comp : componentList) {
|
||||
if (comp.getComponentType() != EComponentType.JOBLET) {
|
||||
continue;
|
||||
}
|
||||
String comName = comp.getName();
|
||||
if (comp != null && paletteType.equals(comp.getPaletteType())) {
|
||||
if (comName.equals(name)) {
|
||||
return comp;
|
||||
} else if (new JobletUtil().matchExpression(comName)) {
|
||||
String[] names = comName.split(":"); //$NON-NLS-1$
|
||||
comName = names[1];
|
||||
if (comName.equals(name)) {
|
||||
return comp;
|
||||
}
|
||||
// check if reference joblet component presents
|
||||
JobletUtil jobletUtils = new JobletUtil();
|
||||
Optional<IComponent> result = jobletUtils.findComponentByName(componentList, name, paletteType);
|
||||
if (!result.isPresent()) {
|
||||
// check if any name matching joblet component presents
|
||||
if (jobletUtils.matchExpression(name)) {
|
||||
name = StringUtils.substringAfterLast(name, ":"); //$NON-NLS-1$
|
||||
if (StringUtils.isNotBlank(name)) {
|
||||
result = jobletUtils.findComponentByName(componentList, name, paletteType);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (result.isPresent()) {
|
||||
return result.get();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@ public enum EInternalTemplate {
|
||||
// just to have compiled templates
|
||||
FOOTER_ROUTE("footer_route", "0.0.1"), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
HEADER_ROUTE("header_route", "0.0.1"), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
MICROSERVICE_APP_SECURITY("microservice_app_security","0.0.1"), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
CAMEL_RUNIF("camel_run_if", "0.0.1"), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
CAMEL_SPECIALLINKS("camel_speciallinks", "0.0.1"), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
MICROSERVICE_APP("microservice_app", "0.0.1"), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.components.exchange</artifactId>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
<groupId>org.talend.components</groupId>
|
||||
<artifactId>google-storage-utils</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<version>1.1.0</version>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<talend.nexus.url>https://artifacts-oss.talend.com</talend.nexus.url>
|
||||
@@ -46,6 +46,12 @@
|
||||
<artifactId>jets3t</artifactId>
|
||||
<version>0.9.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>5.6.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
@@ -64,8 +70,8 @@
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
<source>8</source>
|
||||
<target>8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
||||
@@ -3,10 +3,13 @@ package org.talend.gs.util;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.FileSystems;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.jets3t.service.model.GSObject;
|
||||
@@ -44,6 +47,50 @@ public class GSObjectUtil {
|
||||
return objects;
|
||||
}
|
||||
|
||||
public Map<String, File> generateFileMap(File rootFile, String directory, Map<String, String> filter){
|
||||
Map<String, File> allFiles = generateFileMap(rootFile, directory);
|
||||
Map<String, File> resultMap = new HashMap<>();
|
||||
for (Map.Entry<String, String> entry : filter.entrySet()) {
|
||||
//key is path to file on local machine
|
||||
//value is new path in GS
|
||||
File currentFile = new File(entry.getKey());
|
||||
if (allFiles.containsValue(currentFile)){
|
||||
resultMap.put(entry.getValue(), currentFile);
|
||||
}
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
public Map<String, File> generateFileMap(File rootFile, String directory){
|
||||
if (rootFile == null){
|
||||
throw new IllegalArgumentException("File can't be null");
|
||||
}
|
||||
if (directory == null){
|
||||
throw new IllegalArgumentException("Directory name can't be null");
|
||||
}
|
||||
|
||||
if (!directory.isEmpty() && !"/".equals(directory.substring(directory.length()-1))){
|
||||
directory = directory + "/";
|
||||
}
|
||||
|
||||
Map<String,File> fileMap = new HashMap<>();
|
||||
|
||||
if (!rootFile.isDirectory()){
|
||||
fileMap.put(directory + rootFile.getName(), rootFile);
|
||||
return fileMap;
|
||||
}
|
||||
|
||||
String pathToDirectory = rootFile.getAbsolutePath();
|
||||
List<File> allFiles = listAllFiles(pathToDirectory);
|
||||
|
||||
for (File currentFile : allFiles){
|
||||
if (!currentFile.isDirectory()){
|
||||
fileMap.put(combineTwoNames(pathToDirectory, directory, currentFile), currentFile);
|
||||
}
|
||||
}
|
||||
return fileMap;
|
||||
}
|
||||
|
||||
public java.util.Map<String, String> genFileFilterList(java.util.List<java.util.Map<String, String>> list,
|
||||
String localdir, String remotedir) {
|
||||
if (remotedir != null && !"".equals(remotedir)) {
|
||||
@@ -120,4 +167,23 @@ public class GSObjectUtil {
|
||||
InputStream mimetypesFile = this.getClass().getResourceAsStream("/resource/mime.types");
|
||||
Mimetypes.getInstance().loadAndReplaceMimetypes(mimetypesFile);
|
||||
}
|
||||
|
||||
private List<File> listAllFiles(String directoryName) {
|
||||
File directory = new File(directoryName);
|
||||
List<File> resultList = new ArrayList<>();
|
||||
File[] fList = directory.listFiles();
|
||||
resultList.addAll(Arrays.asList(fList));
|
||||
for (File file : fList) {
|
||||
if (file.isDirectory()) {
|
||||
resultList.addAll(listAllFiles(file.getAbsolutePath()));
|
||||
}
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
private String combineTwoNames(String coreDir, String targetDir, File file){
|
||||
String filePath = file.getAbsolutePath();
|
||||
String relativePath = targetDir + filePath.replace(coreDir + FileSystems.getDefault().getSeparator(), "");
|
||||
return relativePath.replaceAll("\\\\","/");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
package util;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.talend.gs.util.GSObjectUtil;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class GSObjectUtilTest {
|
||||
|
||||
@Test
|
||||
void checkSizeOfFilesInFolderTest() {
|
||||
Path pathToDirectory = Paths.get("src", "test", "resources", "dirWithThreeFiles");
|
||||
Path pathToFile1 = Paths.get("src", "test", "resources", "dirWithThreeFiles", "1.csv");
|
||||
Path pathToFile2 = Paths.get("src", "test", "resources", "dirWithThreeFiles", "2.csv");
|
||||
Path pathToFile3 = Paths.get("src", "test", "resources", "dirWithThreeFiles", "3.csv");
|
||||
Path pathToFile4 = Paths.get("src", "test", "resources", "dirWithThreeFiles", "inner", "1.csv");
|
||||
|
||||
String expectedRelativePathToFile1 = "/1.csv";
|
||||
String expectedRelativePathToFile2 = "/2.csv";
|
||||
String expectedRelativePathToFile3 = "/3.csv";
|
||||
String expectedRelativePathToFile4 = "/inner/1.csv";
|
||||
|
||||
File rootFile = new File(pathToDirectory.toUri());
|
||||
GSObjectUtil gsObjectUtil = new GSObjectUtil();
|
||||
Map<String, File> files = gsObjectUtil.generateFileMap(rootFile, "/");
|
||||
assertEquals(4, files.size());
|
||||
|
||||
File expectedFile1 = new File(pathToFile1.toUri());
|
||||
File expectedFile2 = new File(pathToFile2.toUri());
|
||||
File expectedFile3 = new File(pathToFile3.toUri());
|
||||
File expectedFile4 = new File(pathToFile4.toUri());
|
||||
|
||||
assertTrue(files.containsKey(expectedRelativePathToFile1));
|
||||
assertTrue(files.containsKey(expectedRelativePathToFile2));
|
||||
assertTrue(files.containsKey(expectedRelativePathToFile3));
|
||||
assertTrue(files.containsKey(expectedRelativePathToFile4));
|
||||
|
||||
assertEquals(expectedFile1.getAbsoluteFile(), files.get(expectedRelativePathToFile1).getAbsoluteFile());
|
||||
assertEquals(expectedFile2.getAbsoluteFile(), files.get(expectedRelativePathToFile2).getAbsoluteFile());
|
||||
assertEquals(expectedFile3.getAbsoluteFile(), files.get(expectedRelativePathToFile3).getAbsoluteFile());
|
||||
assertEquals(expectedFile4.getAbsoluteFile(), files.get(expectedRelativePathToFile4).getAbsoluteFile());
|
||||
}
|
||||
|
||||
@Test
|
||||
void checkSizeOfFilesInFolder2Test() {
|
||||
Path pathToDirectory = Paths.get("src", "test", "resources", "dirWithThreeFiles");
|
||||
Path pathToFile1 = Paths.get("src", "test", "resources", "dirWithThreeFiles", "1.csv");
|
||||
Path pathToFile2 = Paths.get("src", "test", "resources", "dirWithThreeFiles", "2.csv");
|
||||
Path pathToFile3 = Paths.get("src", "test", "resources", "dirWithThreeFiles", "3.csv");
|
||||
Path pathToFile4 = Paths.get("src", "test", "resources", "dirWithThreeFiles", "inner", "1.csv");
|
||||
|
||||
String expectedRelativePathToFile1 = "1.csv";
|
||||
String expectedRelativePathToFile2 = "2.csv";
|
||||
String expectedRelativePathToFile3 = "3.csv";
|
||||
String expectedRelativePathToFile4 = "inner/1.csv";
|
||||
|
||||
File rootFile = new File(pathToDirectory.toUri());
|
||||
GSObjectUtil gsObjectUtil = new GSObjectUtil();
|
||||
Map<String, File> files = gsObjectUtil.generateFileMap(rootFile, "");
|
||||
assertEquals(4, files.size());
|
||||
|
||||
File expectedFile1 = new File(pathToFile1.toUri());
|
||||
File expectedFile2 = new File(pathToFile2.toUri());
|
||||
File expectedFile3 = new File(pathToFile3.toUri());
|
||||
File expectedFile4 = new File(pathToFile4.toUri());
|
||||
|
||||
assertTrue(files.containsKey(expectedRelativePathToFile1));
|
||||
assertTrue(files.containsKey(expectedRelativePathToFile2));
|
||||
assertTrue(files.containsKey(expectedRelativePathToFile3));
|
||||
assertTrue(files.containsKey(expectedRelativePathToFile4));
|
||||
|
||||
assertEquals(expectedFile1.getAbsoluteFile(), files.get(expectedRelativePathToFile1).getAbsoluteFile());
|
||||
assertEquals(expectedFile2.getAbsoluteFile(), files.get(expectedRelativePathToFile2).getAbsoluteFile());
|
||||
assertEquals(expectedFile3.getAbsoluteFile(), files.get(expectedRelativePathToFile3).getAbsoluteFile());
|
||||
assertEquals(expectedFile4.getAbsoluteFile(), files.get(expectedRelativePathToFile4).getAbsoluteFile());
|
||||
}
|
||||
|
||||
@Test
|
||||
void oneFileWithCustomPathTest(){
|
||||
Path pathToFile = Paths.get("src","test", "resources", "empty.csv");
|
||||
String pathToFolder = "/folder/folder";
|
||||
File expectedFile = new File(pathToFile.toUri());
|
||||
GSObjectUtil gsObjectUtil = new GSObjectUtil();
|
||||
|
||||
Map<String, File> files = gsObjectUtil.generateFileMap(expectedFile, pathToFolder);
|
||||
|
||||
String expectedRelativePathToFile = "/folder/folder/empty.csv";
|
||||
|
||||
assertEquals(1, files.size());
|
||||
assertTrue(files.containsKey(expectedRelativePathToFile));
|
||||
assertEquals(expectedFile.getAbsoluteFile(), files.get(expectedRelativePathToFile).getAbsoluteFile());
|
||||
}
|
||||
|
||||
@Test
|
||||
void oneFileWithOtherCustomPathTest(){
|
||||
Path pathToFile = Paths.get("src","test", "resources", "empty.csv");
|
||||
String pathToFolder = "folder/folder";
|
||||
File expectedFile = new File(pathToFile.toUri());
|
||||
GSObjectUtil gsObjectUtil = new GSObjectUtil();
|
||||
|
||||
Map<String, File> files = gsObjectUtil.generateFileMap(expectedFile, pathToFolder);
|
||||
|
||||
String expectedRelativePathToFile = "folder/folder/empty.csv";
|
||||
|
||||
assertEquals(1, files.size());
|
||||
assertTrue(files.containsKey(expectedRelativePathToFile));
|
||||
assertEquals(expectedFile.getAbsoluteFile(), files.get(expectedRelativePathToFile).getAbsoluteFile());
|
||||
}
|
||||
|
||||
@Test
|
||||
void folderWithOtherCustomPathTest(){
|
||||
Path pathToFolder = Paths.get("src", "test", "resources", "dirWithThreeFiles", "inner");
|
||||
String pathToGSFolder = "folder";
|
||||
File folder = new File(pathToFolder.toUri());
|
||||
GSObjectUtil gsObjectUtil = new GSObjectUtil();
|
||||
|
||||
Map<String, File> files = gsObjectUtil.generateFileMap(folder, pathToGSFolder);
|
||||
|
||||
String expectedRelativePathToFile = "folder/1.csv";
|
||||
File expectedFile = new File(pathToFolder + "/1.csv");
|
||||
|
||||
assertEquals(1, files.size());
|
||||
assertTrue(files.containsKey(expectedRelativePathToFile));
|
||||
assertEquals(expectedFile.getAbsoluteFile(), files.get(expectedRelativePathToFile).getAbsoluteFile());
|
||||
}
|
||||
}
|
||||
|
|
|
|
|
|
|
|
|
|
@@ -170,7 +170,7 @@
|
||||
<dependency>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
<version>1.8.0</version>
|
||||
<version>1.9.4</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -310,7 +310,7 @@
|
||||
<link>http://java.sun.com/j2se/1.5.0/docs/api/</link>
|
||||
<link>http://www.junit.org/junit/javadoc/</link>
|
||||
<link>
|
||||
http://jakarta.apache.org/commons/beanutils/commons-beanutils-1.7.0/docs/api/
|
||||
http://jakarta.apache.org/commons/beanutils/commons-beanutils-1.9.4/docs/api/
|
||||
</link>
|
||||
<link>
|
||||
http://jakarta.apache.org/commons/lang/api-2.2/
|
||||
|
||||
@@ -51,7 +51,8 @@ public abstract class AbstractJSONObjectStaticBuildersTestCase extends TestCase
|
||||
jsonConfig.setIgnoreDefaultExcludes( true );
|
||||
JSONObject json = JSONObject.fromObject( getSource(), jsonConfig );
|
||||
assertJSONObject( json, getProperties() );
|
||||
assertTrue( json.has( "class" ) );
|
||||
//see : https://github.com/apache/commons-beanutils/compare/BEANUTILS_1_9_3...commons-beanutils-1.9.4#diff-dbeaa70d3a09169fb5a1e42e5b319037R34-R43
|
||||
//assertTrue( json.has( "class" ) );
|
||||
assertTrue( !json.has( "pexcluded" ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -199,7 +199,8 @@ public class TestJSONObject extends TestCase {
|
||||
jsonConfig.setIgnoreDefaultExcludes( true );
|
||||
jsonObject.element( "bean", new ObjectBean(), jsonConfig );
|
||||
JSONObject actual = jsonObject.getJSONObject( "bean" );
|
||||
Assertions.assertTrue( actual.has( "class" ) );
|
||||
//see : https://github.com/apache/commons-beanutils/compare/BEANUTILS_1_9_3...commons-beanutils-1.9.4#diff-dbeaa70d3a09169fb5a1e42e5b319037R34-R43
|
||||
//Assertions.assertTrue( actual.has( "class" ) );
|
||||
Assertions.assertTrue( !actual.has( "pexcluded" ) );
|
||||
}
|
||||
|
||||
@@ -258,7 +259,8 @@ public class TestJSONObject extends TestCase {
|
||||
jsonObject.element( "list", list, jsonConfig );
|
||||
JSONObject actual = jsonObject.getJSONArray( "list" )
|
||||
.getJSONObject( 0 );
|
||||
Assertions.assertTrue( actual.has( "class" ) );
|
||||
//see : https://github.com/apache/commons-beanutils/compare/BEANUTILS_1_9_3...commons-beanutils-1.9.4#diff-dbeaa70d3a09169fb5a1e42e5b319037R34-R43
|
||||
//Assertions.assertTrue( actual.has( "class" ) );
|
||||
Assertions.assertTrue( !actual.has( "pexcluded" ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -1,26 +1,64 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.talend</groupId>
|
||||
<groupId>org.talend.libraries</groupId>
|
||||
<artifactId>mdm_transaction</artifactId>
|
||||
<name>mdm_transaction</name>
|
||||
<version>1.0.1</version>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<talend.nexus.url>https://artifacts-oss.talend.com</talend.nexus.url>
|
||||
</properties>
|
||||
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
<id>talend_nexus_deployment</id>
|
||||
<url>${talend.nexus.url}/nexus/content/repositories/TalendOpenSourceSnapshot/</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
</snapshotRepository>
|
||||
<repository>
|
||||
<id>talend_nexus_deployment</id>
|
||||
<url>${talend.nexus.url}/nexus/content/repositories/TalendOpenSourceRelease/</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<version>1.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-httpclient</groupId>
|
||||
<artifactId>commons-httpclient</artifactId>
|
||||
<version>3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-httpclient</groupId>
|
||||
<artifactId>commons-httpclient</artifactId>
|
||||
<version>3.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@@ -49,5 +87,4 @@
|
||||
</testResource>
|
||||
</testResources>
|
||||
</build>
|
||||
<version>1</version>
|
||||
</project>
|
||||
@@ -1,17 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.talend.components.lib</groupId>
|
||||
<artifactId>job-audit</artifactId>
|
||||
<version>1.2</version>
|
||||
|
||||
<groupId>org.talend.libraries</groupId>
|
||||
<artifactId>job-audit</artifactId>
|
||||
<version>1.1</version>
|
||||
|
||||
<properties>
|
||||
<talend.nexus.url>https://artifacts-oss.talend.com</talend.nexus.url>
|
||||
<daikon.audit.version>1.16.0</daikon.audit.version>
|
||||
</properties>
|
||||
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>talend_nexus</id>
|
||||
@@ -23,7 +24,7 @@
|
||||
<url>${talend.nexus.url}/nexus/content/repositories/TalendOpenSourceRelease/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
<id>talend_nexus_deployment</id>
|
||||
@@ -46,47 +47,54 @@
|
||||
</releases>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.talend.daikon</groupId>
|
||||
<artifactId>audit-common</artifactId>
|
||||
<version>1.8.0</version>
|
||||
</dependency>
|
||||
|
||||
<!--
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.talend.daikon</groupId>
|
||||
<artifactId>audit-log4j1</artifactId>
|
||||
<version>1.8.0</version>
|
||||
<groupId>org.talend.daikon</groupId>
|
||||
<artifactId>audit-common</artifactId>
|
||||
<version>${daikon.audit.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- <dependency> <groupId>org.talend.daikon</groupId> <artifactId>audit-log4j1</artifactId>
|
||||
<version>${daikon.audit.version}</version> </dependency> <dependency> <groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId> <version>1.2.17</version> <scope>test</scope>
|
||||
</dependency> -->
|
||||
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.17</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
-->
|
||||
|
||||
<groupId>org.talend.daikon</groupId>
|
||||
<artifactId>audit-log4j2</artifactId>
|
||||
<version>${daikon.audit.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.talend.daikon</groupId>
|
||||
<artifactId>audit-log4j2</artifactId>
|
||||
<version>1.8.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-api</artifactId>
|
||||
<version>2.12.1</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.12.1</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-api</artifactId>
|
||||
<version>2.12.1</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.12.1</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.5</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -6,20 +6,23 @@ import org.talend.logging.audit.EventAuditLogger;
|
||||
import org.talend.logging.audit.LogLevel;
|
||||
|
||||
public interface JobAuditLogger extends EventAuditLogger {
|
||||
|
||||
@AuditEvent(category = "job", message = "Job start : job_name:{jobName}, job_version:{jobVersion}, job_id:{jobId}, timestamp:{timestamp}", level = LogLevel.INFO)
|
||||
void jobstart(Context context);
|
||||
|
||||
@AuditEvent(category = "job", message = "Job stop : job_name:{jobName}, job_version:{jobVersion}, job_id:{jobId}, timestamp:{timestamp}, status:{status}, duration:{duration}", level = LogLevel.INFO)
|
||||
void jobstop(Context context);
|
||||
|
||||
@AuditEvent(category = "connector", message = "Component run : job_name:{jobName}, job_version:{jobVersion}, job_id:{jobId}, connector_type:{connectorType}, connector_id:{connectorId}", level = LogLevel.INFO)
|
||||
void runcomponent(Context context);
|
||||
|
||||
@AuditEvent(category = "connection", message = "Component {connectorType} {connectionType} {rows} rows in {duration} with {connectionName} line", level = LogLevel.INFO)
|
||||
void flowOutput(Context context);
|
||||
|
||||
@AuditEvent(category = "connection", message = "Component {connectorType} received {rows} rows in {duration} with {connectionName} line", level = LogLevel.INFO)
|
||||
void flowInput(Context context);
|
||||
@AuditEvent(category = "jobstart", message = "Job start : job_name:{job_name}, job_version:{job_version}, job_id:{job_id}, timestamp:{timestamp}", level = LogLevel.INFO)
|
||||
void jobstart(Context context);
|
||||
|
||||
@AuditEvent(category = "jobstop", message = "Job stop : job_name:{job_name}, job_version:{job_version}, job_id:{job_id}, timestamp:{timestamp}, status:{status}, duration:{duration}", level = LogLevel.INFO)
|
||||
void jobstop(Context context);
|
||||
|
||||
@AuditEvent(category = "runcomponent", message = "Component run : job_name:{job_name}, job_version:{job_version}, job_id:{job_id}, connector_type:{connector_type}, connector_id:{connector_id}, connector_label:{connector_label}", level = LogLevel.INFO)
|
||||
void runcomponent(Context context);
|
||||
|
||||
@AuditEvent(category = "flowoutput", message = "Component {connector_type} {connector_label} {connection_type} {rows} rows in {duration} with {connection_name} line", level = LogLevel.INFO)
|
||||
void flowOutput(Context context);
|
||||
|
||||
@AuditEvent(category = "flowinput", message = "Component {connector_type} {connector_label} received {rows} rows in {duration} with {connection_name} line", level = LogLevel.INFO)
|
||||
void flowInput(Context context);
|
||||
|
||||
@AuditEvent(category = "flowexecution", message = "connection : {connection_name}, row : {rows}, cost : {duration}", level = LogLevel.INFO)
|
||||
void flowExecution(Context context);
|
||||
|
||||
}
|
||||
|
||||
@@ -5,86 +5,160 @@ import org.talend.logging.audit.ContextBuilder;
|
||||
|
||||
public class JobContextBuilder {
|
||||
|
||||
private final ContextBuilder builder;
|
||||
private final ContextBuilder builder;
|
||||
|
||||
public JobContextBuilder(ContextBuilder builder) {
|
||||
this.builder = builder;
|
||||
}
|
||||
public JobContextBuilder(ContextBuilder builder) {
|
||||
this.builder = builder;
|
||||
}
|
||||
|
||||
public static JobContextBuilder create() {
|
||||
return new JobContextBuilder(ContextBuilder.create());
|
||||
}
|
||||
public static JobContextBuilder create() {
|
||||
return new JobContextBuilder(ContextBuilder.create());
|
||||
}
|
||||
|
||||
public JobContextBuilder jobName(String jobName) {
|
||||
builder.with("jobName", jobName);
|
||||
return this;
|
||||
}
|
||||
|
||||
public JobContextBuilder jobVersion(String jobVersion) {
|
||||
builder.with("jobVersion", jobVersion);
|
||||
return this;
|
||||
}
|
||||
|
||||
public JobContextBuilder jobId(String jobId) {
|
||||
builder.with("jobId", jobId);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* component type like "tXMLMap"
|
||||
* @param connectorType
|
||||
* @return self
|
||||
*/
|
||||
public JobContextBuilder connectorType(String connectorType) {
|
||||
builder.with("connectorType", connectorType);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* component type like "tXMLMap_1"
|
||||
* @param connectorType
|
||||
* @return self
|
||||
*/
|
||||
public JobContextBuilder connectorId(String connectorId) {
|
||||
builder.with("connectorId", connectorId);
|
||||
return this;
|
||||
}
|
||||
|
||||
public JobContextBuilder rows(long rowCount) {
|
||||
builder.with("rows", String.valueOf(rowCount));
|
||||
return this;
|
||||
}
|
||||
|
||||
//output or reject
|
||||
public JobContextBuilder connectionType(String connectionType) {
|
||||
builder.with("connectionType", connectionType);
|
||||
return this;
|
||||
}
|
||||
|
||||
//like "row1"
|
||||
public JobContextBuilder connectionName(String connectionName) {
|
||||
builder.with("connectionName", connectionName);
|
||||
return this;
|
||||
}
|
||||
|
||||
//100s
|
||||
public JobContextBuilder duration(String duration) {
|
||||
builder.with("duration", duration);
|
||||
return this;
|
||||
}
|
||||
|
||||
public JobContextBuilder timestamp(String timestamp) {
|
||||
builder.with("timestamp", timestamp);
|
||||
return this;
|
||||
}
|
||||
|
||||
public JobContextBuilder status(String status) {
|
||||
builder.with("status", status);
|
||||
return this;
|
||||
}
|
||||
public JobContextBuilder jobName(String job_name) {
|
||||
builder.with("job_name", job_name);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Context build() {
|
||||
return builder.build();
|
||||
}
|
||||
public JobContextBuilder jobVersion(String job_version) {
|
||||
builder.with("job_version", job_version);
|
||||
return this;
|
||||
}
|
||||
|
||||
public JobContextBuilder jobId(String job_id) {
|
||||
builder.with("job_id", job_id);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* component label, default is unique name like "tXMLMap_1", but user can adjust
|
||||
* it in studio to any value
|
||||
*
|
||||
* @param connectorType
|
||||
* @return self
|
||||
*/
|
||||
public JobContextBuilder connectorLabel(String connector_label) {
|
||||
builder.with("connector_label", connector_label);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* component type like "tXMLMap"
|
||||
*
|
||||
* @param connectorType
|
||||
* @return self
|
||||
*/
|
||||
public JobContextBuilder connectorType(String connector_type) {
|
||||
builder.with("connector_type", connector_type);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* component unique name like "tXMLMap_1"
|
||||
*
|
||||
* @param connectorType
|
||||
* @return self
|
||||
*/
|
||||
public JobContextBuilder connectorId(String connector_id) {
|
||||
builder.with("connector_id", connector_id);
|
||||
return this;
|
||||
}
|
||||
|
||||
public JobContextBuilder rows(long rows) {
|
||||
builder.with("rows", String.valueOf(rows));
|
||||
return this;
|
||||
}
|
||||
|
||||
// output or reject
|
||||
public JobContextBuilder connectionType(String connection_type) {
|
||||
builder.with("connection_type", connection_type);
|
||||
return this;
|
||||
}
|
||||
|
||||
// like "row1"
|
||||
public JobContextBuilder connectionName(String connection_name) {
|
||||
builder.with("connection_name", connection_name);
|
||||
return this;
|
||||
}
|
||||
|
||||
// 100s
|
||||
public JobContextBuilder duration(String duration) {
|
||||
builder.with("duration", duration);
|
||||
return this;
|
||||
}
|
||||
|
||||
public JobContextBuilder timestamp(String timestamp) {
|
||||
builder.with("timestamp", timestamp);
|
||||
return this;
|
||||
}
|
||||
|
||||
public JobContextBuilder status(String status) {
|
||||
builder.with("status", status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Context build() {
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* source connector id
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public JobContextBuilder sourceId(String source_id) {
|
||||
builder.with("source_id", source_id);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* source connector label
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public JobContextBuilder sourceLabel(String source_label) {
|
||||
builder.with("source_label", source_label);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* source connector name
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public JobContextBuilder sourceConnectorType(String source_connector_type) {
|
||||
builder.with("source_connector_type", source_connector_type);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* target connector id
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public JobContextBuilder targetId(String target_id) {
|
||||
builder.with("target_id", target_id);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* target connector label
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public JobContextBuilder targetLabel(String target_label) {
|
||||
builder.with("target_label", target_label);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* target connector name
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public JobContextBuilder targetConnectorType(String target_connector_type) {
|
||||
builder.with("target_connector_type", target_connector_type);
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,45 +5,47 @@ import java.util.Properties;
|
||||
|
||||
import org.talend.logging.audit.AuditLoggerFactory;
|
||||
import org.talend.logging.audit.EventAuditLogger;
|
||||
import org.talend.logging.audit.impl.AbstractBackend;
|
||||
import org.talend.logging.audit.impl.AuditConfiguration;
|
||||
import org.talend.logging.audit.impl.AuditConfigurationMap;
|
||||
import org.talend.logging.audit.impl.AuditLoggerBase;
|
||||
import org.talend.logging.audit.impl.DefaultAuditLoggerBase;
|
||||
import org.talend.logging.audit.impl.ProxyEventAuditLogger;
|
||||
import org.talend.logging.audit.impl.*;
|
||||
|
||||
public class JobEventAuditLoggerFactory {
|
||||
|
||||
public static JobAuditLogger createJobAuditLogger(final Properties properties) {
|
||||
final AuditConfigurationMap config = AuditConfiguration.loadFromProperties(properties);
|
||||
|
||||
AbstractBackend logger = null;
|
||||
|
||||
//load log4j2 implement firstly
|
||||
String loggerClass = "org.talend.logging.audit.log4j2.Log4j2Backend";
|
||||
try {
|
||||
final Class<?> clz = Class.forName(loggerClass);
|
||||
logger = (AbstractBackend) clz.getConstructor(AuditConfigurationMap.class).newInstance(config);
|
||||
} catch (ReflectiveOperationException e) {
|
||||
// do nothing
|
||||
}
|
||||
final DefaultAuditLoggerBase loggerBase;
|
||||
|
||||
//load log4j1 implement if not found log4j2
|
||||
if (logger == null) {
|
||||
loggerClass = "org.talend.logging.audit.log4j1.Log4j1Backend";
|
||||
final Backends backend = AuditConfiguration.BACKEND.getValue(config, Backends.class);
|
||||
if (backend == Backends.CUSTOM) {
|
||||
loggerBase = new DefaultAuditLoggerBase(config);
|
||||
} else {
|
||||
AbstractBackend logger = null;
|
||||
|
||||
// load log4j2 implement firstly
|
||||
String loggerClass = "org.talend.logging.audit.log4j2.Log4j2Backend";
|
||||
try {
|
||||
final Class<?> clz = Class.forName(loggerClass);
|
||||
logger = (AbstractBackend) clz.getConstructor(AuditConfigurationMap.class).newInstance(config);
|
||||
} catch (ReflectiveOperationException e) {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
||||
if(logger == null) {
|
||||
throw new RuntimeException("Unable to load backend : " + loggerClass);
|
||||
}
|
||||
|
||||
final DefaultAuditLoggerBase loggerBase = new DefaultAuditLoggerBase(logger, config);
|
||||
// load log4j1 implement if not found log4j2
|
||||
if (logger == null) {
|
||||
loggerClass = "org.talend.logging.audit.log4j1.Log4j1Backend";
|
||||
try {
|
||||
final Class<?> clz = Class.forName(loggerClass);
|
||||
logger = (AbstractBackend) clz.getConstructor(AuditConfigurationMap.class).newInstance(config);
|
||||
} catch (ReflectiveOperationException e) {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
||||
if (logger == null) {
|
||||
throw new RuntimeException("Unable to load backend : " + loggerClass);
|
||||
}
|
||||
|
||||
loggerBase = new DefaultAuditLoggerBase(logger, config);
|
||||
}
|
||||
|
||||
JobAuditLogger result = getEventAuditLogger(JobAuditLogger.class, loggerBase);
|
||||
return result;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>org.talend.components.lib</groupId>
|
||||
<artifactId>talend-proxy</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<version>1.0.1</version>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
@@ -46,9 +46,9 @@
|
||||
<version>3.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.17</version>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.25</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
package org.talend.proxy;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.Proxy;
|
||||
import java.net.ProxySelector;
|
||||
import java.net.SocketAddress;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
public class TalendProxySelector extends ProxySelector {
|
||||
private static TalendProxySelector instance;
|
||||
|
||||
private static final Logger log = Logger.getLogger(TalendProxySelector.class);
|
||||
private static final Logger log = LoggerFactory.getLogger(TalendProxySelector.class);
|
||||
|
||||
private ThreadLocal<ProxyHolder> threadLocalProxyHolder;
|
||||
private ProxyHolder globalProxyHolder;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<groupId>org.talend.libraries</groupId>
|
||||
<artifactId>talend-webservice-input</artifactId>
|
||||
<version>1.0.0-20170301</version>
|
||||
<version>1.0.2</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>talend-webservice-input</name>
|
||||
@@ -51,6 +51,12 @@
|
||||
<groupId>commons-discovery</groupId>
|
||||
<artifactId>commons-discovery</artifactId>
|
||||
<version>0.2</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/wsdl4j/wsdl4j -->
|
||||
<dependency>
|
||||
@@ -64,12 +70,6 @@
|
||||
<groupId>javax.xml</groupId>
|
||||
<artifactId>jaxrpc-api</artifactId>
|
||||
<version>1.1</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/commons-logging/commons-logging -->
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<version>1.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -95,6 +95,7 @@
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.6</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-jar</id>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<pathelement location="${component.plugin.home}/tMicrosoftCrmInput/commons-logging-1.1.1.jar" />
|
||||
<pathelement location="${component.plugin.home}/tWriteJSONFieldIn/commons-lang-2.6.jar" />
|
||||
<pathelement location="${component.plugin.home}/tWebService/commons-collections-3.2.1.jar" />
|
||||
<pathelement location="${component.plugin.home}/tWebService/commons-beanutils-1.7.0.jar" />
|
||||
<pathelement location="${component.plugin.home}/tWebService/commons-beanutils-1.9.4.jar" />
|
||||
<pathelement location="${component.plugin.home}/tWebService/cxf-2.6.0-modified.jar" />
|
||||
<pathelement location="${component.plugin.home}/tWebService/jaxb-xjc-2.2.5-modified.jar" />
|
||||
<pathelement location="${component.plugin.home}/tWebService/jaxb-impl-2.2.5-modified.jar" />
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
<dependency>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
<version>1.8.3</version>
|
||||
<version>1.9.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<groupId>org.talend.components.lib</groupId>
|
||||
<artifactId>talendsap</artifactId>
|
||||
<name>talendsap</name>
|
||||
<version>1.0.2</version>
|
||||
<version>1.0.3</version>
|
||||
|
||||
<properties>
|
||||
<talend.nexus.url>https://artifacts-oss.talend.com</talend.nexus.url>
|
||||
@@ -35,9 +35,15 @@
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>dom4j</groupId>
|
||||
<groupId>org.dom4j</groupId>
|
||||
<artifactId>dom4j</artifactId>
|
||||
<version>1.6.1</version>
|
||||
<version>2.1.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>jaxen</groupId>
|
||||
<artifactId>jaxen</artifactId>
|
||||
<version>1.1.6</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -16,21 +16,11 @@ public class DocumentExtractor {
|
||||
|
||||
public DocumentExtractor(Document doc,String function) {
|
||||
this.doc = doc;
|
||||
this.finalFunction = replaceNamespace(function);
|
||||
this.finalFunction = SAPXMLCoder.encode(function);
|
||||
}
|
||||
|
||||
/**
|
||||
* the xml document which come from the cimt sap api will change the element name which contains "/" and convert "/" to "_-",
|
||||
* we need to do the same thing for finding the element by the xpath
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
private String replaceNamespace(String name) {
|
||||
return name.replace("/", "_-");
|
||||
}
|
||||
|
||||
public String getSingleResult(String name) {
|
||||
final String finalName = replaceNamespace(name);
|
||||
final String finalName = SAPXMLCoder.encode(name);
|
||||
|
||||
XPath xpath = org.dom4j.DocumentHelper.createXPath(
|
||||
sb.append("/").append(finalFunction).append("/OUTPUT/").append(finalName)
|
||||
@@ -47,7 +37,7 @@ public class DocumentExtractor {
|
||||
}
|
||||
|
||||
public List<String> getStructureResult(String structureName,List<String> names) {
|
||||
final String finalStructureName = replaceNamespace(structureName);
|
||||
final String finalStructureName = SAPXMLCoder.encode(structureName);
|
||||
|
||||
XPath xpath = org.dom4j.DocumentHelper.createXPath(
|
||||
sb.append("/").append(finalFunction).append("/OUTPUT/").append(finalStructureName)
|
||||
@@ -65,7 +55,7 @@ public class DocumentExtractor {
|
||||
List<String> result = new ArrayList<String>();
|
||||
|
||||
for(String name : names) {
|
||||
final String finalName = replaceNamespace(name);
|
||||
final String finalName = SAPXMLCoder.encode(name);
|
||||
Node subNode = node.selectSingleNode(finalName);
|
||||
if(subNode == null) {
|
||||
result.add(null);
|
||||
@@ -78,7 +68,7 @@ public class DocumentExtractor {
|
||||
}
|
||||
|
||||
public List<List<String>> getTableResult(String tableName,List<String> names) {
|
||||
final String finalTableName = replaceNamespace(tableName);
|
||||
final String finalTableName = SAPXMLCoder.encode(tableName);
|
||||
|
||||
List<List<String>> result = new ArrayList<List<String>>();
|
||||
|
||||
@@ -112,7 +102,7 @@ public class DocumentExtractor {
|
||||
for(Element element : elements) {
|
||||
List<String> row = new ArrayList<String>();
|
||||
for(String name : names) {
|
||||
final String finalName = replaceNamespace(name);
|
||||
final String finalName = SAPXMLCoder.encode(name);
|
||||
Element subElement = element.element(finalName);
|
||||
if(subElement == null) {
|
||||
row.add(null);
|
||||
|
||||
@@ -28,7 +28,7 @@ public class DocumentHelper {
|
||||
}
|
||||
|
||||
public void setFunctionName(String name) {
|
||||
root = doc.addElement(name);
|
||||
root = doc.addElement(SAPXMLCoder.encode(name));
|
||||
}
|
||||
|
||||
private void correctInput() {
|
||||
@@ -55,20 +55,20 @@ public class DocumentHelper {
|
||||
}
|
||||
if (parameter_type == SAPParameterType.CHANGING) {
|
||||
correctChanging();
|
||||
changing.addElement(name).setText(value);
|
||||
changing.addElement(SAPXMLCoder.encode(name)).setText(value);
|
||||
} else {
|
||||
correctInput();
|
||||
input.addElement(name).setText(value);
|
||||
input.addElement(SAPXMLCoder.encode(name)).setText(value);
|
||||
}
|
||||
}
|
||||
|
||||
public void addStructParameter(String name, SAPParameterType parameter_type) {
|
||||
if (parameter_type == SAPParameterType.CHANGING) {
|
||||
correctChanging();
|
||||
currentStruct = changing.addElement(name);
|
||||
currentStruct = changing.addElement(SAPXMLCoder.encode(name));
|
||||
} else {
|
||||
correctInput();
|
||||
currentStruct = input.addElement(name);
|
||||
currentStruct = input.addElement(SAPXMLCoder.encode(name));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,19 +76,19 @@ public class DocumentHelper {
|
||||
if(value == null) {
|
||||
value = "";
|
||||
}
|
||||
currentStruct.addElement(name).setText(value);
|
||||
currentStruct.addElement(SAPXMLCoder.encode(name)).setText(value);
|
||||
}
|
||||
|
||||
public void addTableParameter(String name, SAPParameterType parameter_type) {
|
||||
if (parameter_type == SAPParameterType.CHANGING) {
|
||||
correctChanging();
|
||||
currentTable = changing.addElement(name);
|
||||
currentTable = changing.addElement(SAPXMLCoder.encode(name));
|
||||
} else if(parameter_type == SAPParameterType.TABLES) {
|
||||
correctTables();
|
||||
currentTable = tables.addElement(name);
|
||||
currentTable = tables.addElement(SAPXMLCoder.encode(name));
|
||||
} else {
|
||||
correctInput();
|
||||
currentTable = input.addElement(name);
|
||||
currentTable = input.addElement(SAPXMLCoder.encode(name));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,66 +100,11 @@ public class DocumentHelper {
|
||||
if(value == null) {
|
||||
value = "";
|
||||
}
|
||||
currentRow.addElement(name).setText(value);
|
||||
currentRow.addElement(SAPXMLCoder.encode(name)).setText(value);
|
||||
}
|
||||
|
||||
public Document getDocument() {
|
||||
return doc;
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
DocumentHelper helper = new DocumentHelper();
|
||||
helper.setFunctionName("READ_TABLE_FUNCTION");
|
||||
|
||||
helper.addSingleParameter("ID", "1", SAPParameterType.CHANGING);
|
||||
helper.addSingleParameter("NAME", "gaoyan", SAPParameterType.IMPORT);
|
||||
|
||||
helper.addStructParameter("INFO", SAPParameterType.CHANGING);
|
||||
helper.addStructChildParameter("ID", "2");
|
||||
helper.addStructChildParameter("NAME", "wangwei");
|
||||
|
||||
helper.addStructParameter("INFO1", SAPParameterType.IMPORT);
|
||||
helper.addStructChildParameter("ID1", "4");
|
||||
helper.addStructChildParameter("NAME1", "momo");
|
||||
|
||||
helper.addTableParameter("TABLE1", SAPParameterType.TABLES);
|
||||
for (int i = 0; i < 200000; i++) {
|
||||
helper.addTableRow();
|
||||
helper.addTableRowChildParameter("c1", i + "");
|
||||
helper.addTableRowChildParameter("c2", "wangwei" + i);
|
||||
helper.addTableRowChildParameter("c3", "wangwei" + i);
|
||||
helper.addTableRowChildParameter("c4", "wangwei" + i);
|
||||
helper.addTableRowChildParameter("c5", "wangwei" + i);
|
||||
helper.addTableRowChildParameter("c6", "wangwei" + i);
|
||||
helper.addTableRowChildParameter("c7", "wangwei" + i);
|
||||
helper.addTableRowChildParameter("c8", "wangwei" + i);
|
||||
}
|
||||
|
||||
helper.addTableParameter("TABLE2", SAPParameterType.TABLES);
|
||||
for (int i = 0; i < 2; i++) {
|
||||
helper.addTableRow();
|
||||
helper.addTableRowChildParameter("ID4", i + "");
|
||||
helper.addTableRowChildParameter("NAME4", "gaoyan" + i);
|
||||
}
|
||||
|
||||
// StringWriter sw = new StringWriter();
|
||||
// OutputFormat format = OutputFormat.createPrettyPrint();
|
||||
// XMLWriter writer = new XMLWriter(sw, format);
|
||||
Document doc = helper.getDocument();
|
||||
// writer.write(doc);
|
||||
// System.out.println(sw.toString());
|
||||
|
||||
DocumentExtractor ext = new DocumentExtractor(doc,"READ_TABLE_FUNCTION");
|
||||
String single = ext.getSingleResult("ID");
|
||||
System.out.println(single);
|
||||
|
||||
List<String> struct = ext.getStructureResult("INFO", Arrays.asList("ID","NAME"));
|
||||
System.out.println(struct);
|
||||
|
||||
List<List<String>> table = ext.getTableResult("TABLE1", Arrays.asList("c1","c2","c3","c4","c5","c6","c7","c8"));
|
||||
for(List<String> row : table) {
|
||||
System.out.println(row);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
package org.talend.sap;
|
||||
|
||||
/**
|
||||
* sap <-> valid xml element name by coder
|
||||
*
|
||||
* first char :
|
||||
* 0 <-> _0
|
||||
* 1 <-> _1
|
||||
* 2 <-> _2
|
||||
* ...
|
||||
* 9 <-> _9
|
||||
*
|
||||
* any location char
|
||||
* / <-> _-
|
||||
*/
|
||||
public class SAPXMLCoder {
|
||||
|
||||
/**
|
||||
* convert sapname to xmlname
|
||||
* @param sapname
|
||||
* @return
|
||||
*/
|
||||
public static String encode(String sapname) {
|
||||
if(sapname == null) {
|
||||
return sapname;
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for(int i=0;i<sapname.length();i++) {
|
||||
char c = sapname.charAt(i);
|
||||
|
||||
if(i==0) {
|
||||
if(isDigit(c)) {
|
||||
sb.append('_').append(c);
|
||||
} else if(c == '/'){
|
||||
sb.append("_-");
|
||||
} else {
|
||||
sb.append(c);
|
||||
}
|
||||
} else {
|
||||
if(c == '/'){
|
||||
sb.append("_-");
|
||||
} else {
|
||||
sb.append(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* convert xmlname to sapname
|
||||
* @param xmlname
|
||||
* @return
|
||||
*/
|
||||
static String decode(String xmlname) {
|
||||
if(xmlname == null) {
|
||||
return xmlname;
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for(int i=0;i<xmlname.length();i++) {
|
||||
char c = xmlname.charAt(i);
|
||||
|
||||
if(i==0) {
|
||||
if(c == '_') {
|
||||
int next_index = i + 1;
|
||||
if(next_index < xmlname.length()) {
|
||||
char next = xmlname.charAt(next_index);
|
||||
if(isDigit(next)) {
|
||||
sb.append(next);
|
||||
i++;
|
||||
} else if(next == '-') {
|
||||
sb.append('/');
|
||||
i++;
|
||||
} else {
|
||||
sb.append(c);
|
||||
}
|
||||
} else {
|
||||
sb.append(c);
|
||||
}
|
||||
} else {
|
||||
sb.append(c);
|
||||
}
|
||||
} else {
|
||||
if(c == '_') {
|
||||
int next_index = i + 1;
|
||||
if(next_index < xmlname.length()) {
|
||||
char next = xmlname.charAt(next_index);
|
||||
if(next == '-') {
|
||||
sb.append('/');
|
||||
i++;
|
||||
} else {
|
||||
sb.append(c);
|
||||
}
|
||||
} else {
|
||||
sb.append(c);
|
||||
}
|
||||
} else {
|
||||
sb.append(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
private static boolean isDigit(char c) {
|
||||
return c>=48 && c<=57;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
//ecnode
|
||||
System.out.println(encode("/CMT/TLND_TABLE"));
|
||||
System.out.println(encode("0CMT0TLND_TABLE"));
|
||||
System.out.println(encode("1CMT1TLND_TABLE"));
|
||||
|
||||
//decode
|
||||
System.out.println(decode(encode("/CMT/TLND_TABLE")));
|
||||
System.out.println(decode(encode("0CMT0TLND_TABLE")));
|
||||
System.out.println(decode(encode("1CMT1TLND_TABLE")));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package org.talend.sap;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.dom4j.Document;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class BasicTest {
|
||||
|
||||
@Test
|
||||
public void testSAPXMLCoder() {
|
||||
assertEquals("_-CMT_-TLND_TABLE", SAPXMLCoder.encode("/CMT/TLND_TABLE"));
|
||||
assertEquals("_0CMT0TLND_TABLE", SAPXMLCoder.encode("0CMT0TLND_TABLE"));
|
||||
|
||||
assertEquals("/CMT/TLND_TABLE", SAPXMLCoder.decode(SAPXMLCoder.encode("/CMT/TLND_TABLE")));
|
||||
assertEquals("0CMT0TLND_TABLE", SAPXMLCoder.decode(SAPXMLCoder.encode("0CMT0TLND_TABLE")));
|
||||
|
||||
assertEquals("BAPI_MATERIAL_GET_ALL", SAPXMLCoder.decode(SAPXMLCoder.encode("BAPI_MATERIAL_GET_ALL")));
|
||||
assertEquals("2STEP_PICK", SAPXMLCoder.decode(SAPXMLCoder.encode("2STEP_PICK")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDocumentHelperAndExtractor() {
|
||||
DocumentHelper helper = new DocumentHelper();
|
||||
String function = "/CMT/TLND_TABLE";
|
||||
helper.setFunctionName(function);
|
||||
|
||||
helper.addSingleParameter("ID", "1", SAPParameterType.CHANGING);
|
||||
helper.addSingleParameter("NAME", "gaoyan", SAPParameterType.IMPORT);
|
||||
|
||||
helper.addStructParameter("INFO", SAPParameterType.CHANGING);
|
||||
helper.addStructChildParameter("ID", "2");
|
||||
helper.addStructChildParameter("NAME", "wangwei");
|
||||
|
||||
helper.addStructParameter("INFO1", SAPParameterType.IMPORT);
|
||||
helper.addStructChildParameter("ID1", "4");
|
||||
helper.addStructChildParameter("NAME1", "momo");
|
||||
|
||||
helper.addTableParameter("TABLE1", SAPParameterType.TABLES);
|
||||
for (int i = 0; i < 10; i++) {
|
||||
helper.addTableRow();
|
||||
helper.addTableRowChildParameter("c1", i + "");
|
||||
helper.addTableRowChildParameter("c2", "wangwei" + i);
|
||||
helper.addTableRowChildParameter("c3", "wangwei" + i);
|
||||
helper.addTableRowChildParameter("c4", "wangwei" + i);
|
||||
helper.addTableRowChildParameter("c5", "wangwei" + i);
|
||||
helper.addTableRowChildParameter("c6", "wangwei" + i);
|
||||
helper.addTableRowChildParameter("c7", "wangwei" + i);
|
||||
helper.addTableRowChildParameter("c8", "wangwei" + i);
|
||||
}
|
||||
|
||||
helper.addTableParameter("TABLE2", SAPParameterType.TABLES);
|
||||
for (int i = 0; i < 2; i++) {
|
||||
helper.addTableRow();
|
||||
helper.addTableRowChildParameter("ID4", i + "");
|
||||
helper.addTableRowChildParameter("NAME4", "gaoyan" + i);
|
||||
}
|
||||
|
||||
Document doc = helper.getDocument();
|
||||
|
||||
DocumentExtractor ext = new DocumentExtractor(doc,function);
|
||||
String single = ext.getSingleResult("ID");
|
||||
assertEquals("1", single);
|
||||
|
||||
List<String> struct = ext.getStructureResult("INFO", Arrays.asList("ID","NAME"));
|
||||
assertEquals(java.util.Arrays.asList("2", "wangwei"), struct);
|
||||
|
||||
List<List<String>> table = ext.getTableResult("TABLE1", Arrays.asList("c1","c2","c3","c4","c5","c6","c7","c8"));
|
||||
assertEquals(10, table.size());
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.components.libs</artifactId>
|
||||
|
||||
@@ -132,7 +132,7 @@ int tmp_batchUpdateCount_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
String tableName_<%=cid%> = <%=table%>;
|
||||
boolean whetherReject_<%=cid%> = false;
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ imports="
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.core.model.process.IConnection
|
||||
org.talend.core.model.process.IProcess
|
||||
java.util.List
|
||||
"
|
||||
%>
|
||||
@@ -14,11 +15,15 @@ imports="
|
||||
|
||||
String cid = node.getUniqueName();
|
||||
dbLog = new DBLogUtil(node);
|
||||
IProcess process = node.getProcess();
|
||||
|
||||
String dataAction = ElementParameterParser.getValue(node,"__DATA_ACTION__");
|
||||
|
||||
String commitEvery = ElementParameterParser.getValue(node, "__COMMIT_EVERY__");
|
||||
|
||||
String useExistingConn = ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__");
|
||||
boolean setAutoCommit = false;
|
||||
|
||||
boolean useExistingConnection = "true".equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
|
||||
String useCommitControl = ElementParameterParser.getValue(node,"__USE_COMMIT_CONTROL__");
|
||||
|
||||
@@ -30,6 +35,17 @@ imports="
|
||||
IConnection rejectConn = rejectConns.get(0);
|
||||
rejectConnName = rejectConn.getName();
|
||||
}
|
||||
|
||||
String connection = ElementParameterParser.getValue(node,"__CONNECTION__");
|
||||
if(useExistingConnection) {
|
||||
List<? extends INode> nodes = process.getNodesOfType("tAS400Connection");
|
||||
for (INode ne:nodes) {
|
||||
if (connection.equals(ne.getUniqueName())) {
|
||||
setAutoCommit = "true".equals(ElementParameterParser.getValue(ne, "__AUTO_COMMIT__"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
boolean useBatch = (rejectConnName == null)
|
||||
&& (
|
||||
@@ -82,14 +98,16 @@ imports="
|
||||
%>
|
||||
resourceMap.put("statementClosed_<%=cid%>", true);
|
||||
<%
|
||||
if(!("true").equals(useExistingConn)) {
|
||||
if(!useExistingConnection) {
|
||||
if(("true").equals(useCommitControl)) {
|
||||
if(!("").equals(commitEvery) && !("0").equals(commitEvery)) {
|
||||
%>
|
||||
if(commitCounter_<%=cid%> > 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
if(commitCounter_<%=cid%> > 0 && rowsToCommitCount_<%=cid%> != 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
commitCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -310,7 +310,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.sql.SQLException e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -442,7 +444,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.sql.SQLException e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -589,7 +593,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.sql.SQLException e) {
|
||||
@@ -665,7 +671,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.sql.SQLException e) {
|
||||
@@ -795,6 +803,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
updateFlag_<%=cid%>=pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%>+updateFlag_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
|
||||
@@ -840,7 +849,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
}else{
|
||||
@@ -930,7 +941,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
} catch(java.sql.SQLException e) {
|
||||
@@ -1014,10 +1027,13 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
<%
|
||||
}%>
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
commitCounter_<%=cid%>=0;
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
String tableName_<%=cid%> = <%=tableName%>;
|
||||
boolean whetherReject_<%=cid%> = false;
|
||||
java.sql.Connection conn_<%=cid%> = null;
|
||||
|
||||
@@ -17,6 +17,7 @@ imports="
|
||||
String dataAction = ElementParameterParser.getValue(node,"__DATA_ACTION__");
|
||||
|
||||
String commitEvery = ElementParameterParser.getValue(node, "__COMMIT_EVERY__");
|
||||
boolean setAutoCommit = false;
|
||||
boolean useExistingConnection = "true".equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
|
||||
if(("INSERT_OR_UPDATE").equals(dataAction)) {
|
||||
@@ -60,9 +61,13 @@ imports="
|
||||
{
|
||||
if(!("").equals(commitEvery)&&!("0").equals(commitEvery)){
|
||||
%>
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%> = 0;
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
@@ -140,7 +140,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -230,7 +232,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -348,7 +352,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -410,7 +416,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try{
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> = processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -511,7 +519,8 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
}
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%>+updateFlag_<%=cid%>;
|
||||
updatedCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
<%
|
||||
@@ -573,7 +582,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -585,7 +596,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
nb_line_<%=cid%>++;
|
||||
nb_line_<%=cid%>++;
|
||||
<%
|
||||
if(rejectConnName != null && rejectColumnList != null && rejectColumnList.size() > 0) {
|
||||
%>
|
||||
@@ -652,7 +663,8 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -697,7 +709,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
<%
|
||||
for(IConnection outgoingConn : outgoingConns) {
|
||||
if(rejectConnName == null || (rejectConnName != null && !outgoingConn.getName().equals(rejectConnName))) {
|
||||
if(outgoingConn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {
|
||||
if(outgoingConn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)){
|
||||
%>
|
||||
<%=outgoingConn.getName()%> = new <%=outgoingConn.getName()%>Struct();
|
||||
<%
|
||||
@@ -720,12 +732,15 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
commitCounter_<%=cid%>++;
|
||||
|
||||
if(commitEvery_<%=cid%><=commitCounter_<%=cid%>) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
commitCounter_<%=cid%>=0;
|
||||
}
|
||||
if(commitEvery_<%=cid%> <= commitCounter_<%=cid%>){
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
|
||||
@@ -465,7 +465,7 @@ class GenerateToolByDom4j{
|
||||
}
|
||||
%>
|
||||
}
|
||||
<%touchXMLNode.getXMLElement(parentName);%>.elements().add(orders_<%=cid %>[<%=currPos %>],<%touchXMLNode.getXMLNode(currEleName);%>);
|
||||
<%touchXMLNode.getXMLElement(parentName);%>.elements().add(orders_<%=cid %>[<%=currPos %>],<%touchXMLNode.getXMLElement(currEleName);%>);
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
@@ -475,7 +475,7 @@ class GenerateToolByDom4j{
|
||||
if(<%=currPos +1 %> < orders_<%=cid %>.length){
|
||||
orders_<%=cid %>[<%=currPos +1 %>] = 0;
|
||||
}
|
||||
<%touchXMLNode.getXMLElement(parentName);%>.elements().add(orders_<%=cid %>[<%=currPos %>]++,<%touchXMLNode.getXMLNode(currEleName);%>);
|
||||
<%touchXMLNode.getXMLElement(parentName);%>.elements().add(orders_<%=cid %>[<%=currPos %>]++,<%touchXMLNode.getXMLElement(currEleName);%>);
|
||||
<%
|
||||
}
|
||||
}else{
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="SESSION_DURATION" FIELD="TEXT" NUM_ROW="15" REQUIRED="true"
|
||||
<PARAMETER NAME="SESSION_DURATION" FIELD="TEXT" NUM_ROW="15"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
GROUP="AUTHENTICATION">
|
||||
<DEFAULT>15</DEFAULT>
|
||||
@@ -105,21 +105,131 @@
|
||||
</PARAMETERS>
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
<PARAMETER NAME="SET_STS_ENDPOINT" FIELD="CHECK" NUM_ROW="1" REQUIRED="true"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="STS_ENDPOINT" FIELD="TEXT" NUM_ROW="1" REQUIRED="true"
|
||||
SHOW_IF="(ASSUME_ROLE == 'true') AND (SET_STS_ENDPOINT == 'true')">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER
|
||||
NAME="SET_STS_ENDPOINT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="1"
|
||||
NB_LINES="5"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="isShow[ASSUME_ROLE] AND (ASSUME_ROLE == 'true')"
|
||||
>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="STS_ENDPOINT"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="1"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="isShow[SET_STS_ENDPOINT] AND (SET_STS_ENDPOINT == 'true')"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="SIGNING_REGION"
|
||||
FIELD="OPENED_LIST"
|
||||
NUM_ROW="2"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<ITEMS DEFAULT="DEFAULT">
|
||||
<ITEM NAME="DEFAULT" VALUE="DEFAULT" />
|
||||
<ITEM NAME="GovCloud" VALUE=""us-gov-west-1"" />
|
||||
<ITEM NAME="US_EAST_1" VALUE=""us-east-1"" />
|
||||
<ITEM NAME="US_WEST_1" VALUE=""us-west-1"" />
|
||||
<ITEM NAME="US_WEST_2" VALUE=""us-west-2"" />
|
||||
<ITEM NAME="US_EAST_2" VALUE=""us-east-2"" />
|
||||
<ITEM NAME="SA_EAST_1" VALUE=""sa-east-1"" />
|
||||
<ITEM NAME="EU_WEST_1" VALUE=""eu-west-1"" />
|
||||
<ITEM NAME="EU_CENTRAL_1" VALUE=""eu-central-1"" />
|
||||
<ITEM NAME="EU_WEST_2" VALUE=""eu-west-2"" />
|
||||
<ITEM NAME="EU_WEST_3" VALUE=""eu-west-3"" />
|
||||
<ITEM NAME="EU_NORTH_1" VALUE=""eu-north-1"" />
|
||||
<ITEM NAME="CN_NORTH_1" VALUE=""cn-north-1"" />
|
||||
<ITEM NAME="CN_NORTHWEST_1" VALUE=""cn-northwest-1"" />
|
||||
<ITEM NAME="AP_EAST_1" VALUE=""ap-east-1"" />
|
||||
<ITEM NAME="AP_SOUTHEAST_1" VALUE=""ap-southeast-1"" />
|
||||
<ITEM NAME="AP_SOUTHEAST_2" VALUE=""ap-southeast-2"" />
|
||||
<ITEM NAME="AP_NORTHEAST_1" VALUE=""ap-northeast-1"" />
|
||||
<ITEM NAME="AP_NORTHEAST_2" VALUE=""ap-northeast-2"" />
|
||||
<ITEM NAME="AP_SOUTH_1" VALUE=""ap-south-1"" />
|
||||
<ITEM NAME="CA_CENTRAL_1" VALUE=""ca-central-1"" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="EXTERNALID"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="3"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="SERIALNUMBER"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="4"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="TOKENCODE"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="5"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="TAGS"
|
||||
FIELD="TABLE"
|
||||
NUM_ROW="6"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<ITEMS>
|
||||
<ITEM NAME="TAG_KEY" FIELD="TEXT" />
|
||||
<ITEM NAME="TAG_VALUE" FIELD="TEXT" />
|
||||
<ITEM NAME="TAG_TRANSITIVE" FIELD="CHECK" VALUE="FALSE"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="POLICY_TABLE"
|
||||
FIELD="TABLE"
|
||||
NUM_ROW="7"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<ITEMS>
|
||||
<ITEM NAME="POLICY_ARN" VALUE="" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="POLICY"
|
||||
FIELD="MEMO"
|
||||
NUM_ROW="8"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
NB_LINES="15"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
</ADVANCED_PARAMETERS>
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="aws-java-sdk-1.11.406.jar" MODULE="aws-java-sdk-1.11.406.jar"
|
||||
MVN="mvn:com.amazonaws/aws-java-sdk/1.11.406"
|
||||
<IMPORT NAME="aws-java-sdk-1.11.729.jar" MODULE="aws-java-sdk-1.11.729.jar"
|
||||
MVN="mvn:com.amazonaws/aws-java-sdk/1.11.729"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="jackson-core-2.10.1.jar" MODULE="jackson-core-2.10.1.jar"
|
||||
MVN="mvn:com.fasterxml.jackson.core/jackson-core/2.10.1"
|
||||
@@ -130,22 +240,20 @@
|
||||
<IMPORT NAME="jackson-annotations-2.10.1.jar" MODULE="jackson-annotations-2.10.1.jar"
|
||||
MVN="mvn:com.fasterxml.jackson.core/jackson-annotations/2.10.1"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="httpcore-4.4.9.jar" MODULE="httpcore-4.4.9.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpcore/4.4.9"
|
||||
<IMPORT NAME="httpcore-4.4.11.jar" MODULE="httpcore-4.4.11.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpcore/4.4.11"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="httpclient-4.5.5.jar" MODULE="httpclient-4.5.5.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpclient/4.5.5"
|
||||
<IMPORT NAME="httpclient-4.5.9.jar" MODULE="httpclient-4.5.9.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpclient/4.5.9"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="joda-time-2.8.1.jar" MODULE="joda-time-2.8.1.jar"
|
||||
MVN="mvn:joda-time/joda-time/2.8.1"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="commons-logging-1.1.3.jar" MODULE="commons-logging-1.1.3.jar"
|
||||
MVN="mvn:commons-logging/commons-logging/1.1.3"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-logging-1.1.3.jar"
|
||||
<IMPORT NAME="commons-logging-1.2.jar" MODULE="commons-logging-1.2.jar"
|
||||
MVN="mvn:commons-logging/commons-logging/1.2"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="commons-codec-1.6.jar" MODULE="commons-codec-1.6.jar"
|
||||
MVN="mvn:org.talend.libraries/commons-codec-1.6/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-codec-1.6.jar"
|
||||
<IMPORT NAME="commons-codec-1.11.jar" MODULE="commons-codec-1.11.jar"
|
||||
MVN="mvn:commons-codec/commons-codec/1.11"
|
||||
REQUIRED="true" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -52,5 +52,38 @@ ARN.NAME=Role ARN
|
||||
ROLE_SESSION_NAME.NAME=Role session name
|
||||
SESSION_DURATION.NAME=Session duration(minutes)
|
||||
|
||||
ASSUME_ROLE_CONFIG.NAME=Assume Role Configuration
|
||||
EXTERNALID.NAME=External Id
|
||||
SERIALNUMBER.NAME=Serial number
|
||||
TOKENCODE.NAME=Token code
|
||||
POLICY_TABLE.NAME=IAM Policy ARNs
|
||||
POLICY_TABLE.ITEM.POLICY_ARN=Policy ARN
|
||||
POLICY.NAME=Policy
|
||||
TAGS.NAME=Tags
|
||||
TAGS.ITEM.TAG_KEY=Key
|
||||
TAGS.ITEM.TAG_VALUE=Value
|
||||
TAGS.ITEM.TAG_TRANSITIVE=Transitive
|
||||
SET_STS_ENDPOINT.NAME=STS Endpoint
|
||||
STS_ENDPOINT.NAME=
|
||||
STS_ENDPOINT.NAME=
|
||||
SIGNING_REGION.NAME=Signing region
|
||||
SIGNING_REGION.ITEM.DEFAULT=DEFAULT
|
||||
SIGNING_REGION.ITEM.GovCloud=AWS GovCloud (US)
|
||||
SIGNING_REGION.ITEM.US_EAST_1=US Standard
|
||||
SIGNING_REGION.ITEM.US_WEST_1=US West (N. California)
|
||||
SIGNING_REGION.ITEM.US_WEST_2=US West (Oregon)
|
||||
SIGNING_REGION.ITEM.US_EAST_2=US East (Ohio)
|
||||
SIGNING_REGION.ITEM.SA_EAST_1=South America (Sao Paulo)
|
||||
SIGNING_REGION.ITEM.EU_WEST_1=EU (Ireland)
|
||||
SIGNING_REGION.ITEM.EU_CENTRAL_1=EU (Frankfurt)
|
||||
SIGNING_REGION.ITEM.EU_WEST_2=EU (London)
|
||||
SIGNING_REGION.ITEM.EU_WEST_3=EU (Paris)
|
||||
SIGNING_REGION.ITEM.EU_NORTH_1=EU (Stockholm)
|
||||
SIGNING_REGION.ITEM.CN_NORTH_1=China (Beijing)
|
||||
SIGNING_REGION.ITEM.CN_NORTHWEST_1=China (Ningxia)
|
||||
SIGNING_REGION.ITEM.AP_EAST_1=Asia Pacific (Hong Kong)
|
||||
SIGNING_REGION.ITEM.AP_SOUTHEAST_1=Asia Pacific (Singapore)
|
||||
SIGNING_REGION.ITEM.AP_SOUTHEAST_2=Asia Pacific (Sydney)
|
||||
SIGNING_REGION.ITEM.AP_NORTHEAST_1=Asia Pacific (Tokyo)
|
||||
SIGNING_REGION.ITEM.AP_NORTHEAST_2=Asia Pacific (Seoul)
|
||||
SIGNING_REGION.ITEM.AP_SOUTH_1=Asia Pacific (Mumbai)
|
||||
SIGNING_REGION.ITEM.CA_CENTRAL_1=Canada (Central)
|
||||
@@ -5,7 +5,7 @@ if(!use_customize_version){
|
||||
%>String[] applications_<%=cid%> = <%
|
||||
String application = ElementParameterParser.getValue(node, "__APPLICATION__");
|
||||
if("ALL_APPLICATIONS".equals(application)) {
|
||||
if("\"emr-4.6.0\",\"emr-4.9.2\",\"emr-5.11.0\",\"emr-5.15.0\"".contains(cluster_version)) {
|
||||
if("\"emr-4.6.0\",\"emr-4.9.2\",\"emr-5.11.0\",\"emr-5.15.0\", \"emr-5.29.0\"".contains(cluster_version)) {
|
||||
%>
|
||||
{}
|
||||
<%
|
||||
@@ -15,7 +15,7 @@ if(!use_customize_version){
|
||||
<%
|
||||
}
|
||||
} else if("CORE_HADOOP".equals(application)) {
|
||||
if("\"emr-5.11.0\"".equals(cluster_version) || "\"emr-5.15.0\"".equals(cluster_version)){%>
|
||||
if("\"emr-5.11.0\"".equals(cluster_version) || "\"emr-5.15.0\"".equals(cluster_version) || "\"emr-5.29.0\"".equals(cluster_version)){%>
|
||||
{"Ganglia","Hadoop","Hive","Hue","Mahout","Pig","Tez"}
|
||||
<%
|
||||
}else if("\"emr-4.6.0\"".equals(cluster_version) || "\"emr-4.9.2\"".equals(cluster_version)) {
|
||||
@@ -38,7 +38,7 @@ if(!use_customize_version){
|
||||
<%
|
||||
}
|
||||
} else if("PRESTO".equals(application)) {
|
||||
if("\"emr-5.11.0\"".equals(cluster_version) || "\"emr-5.15.0\"".equals(cluster_version)){%>
|
||||
if("\"emr-5.11.0\"".equals(cluster_version) || "\"emr-5.15.0\"".equals(cluster_version) || "\"emr-5.29.0\"".equals(cluster_version)){%>
|
||||
{"Hadoop","Hive","Presto"}
|
||||
<% } else { %>
|
||||
if(true) {
|
||||
@@ -47,7 +47,7 @@ if(!use_customize_version){
|
||||
<%
|
||||
}
|
||||
} else if("SPARK".equals(application)) {
|
||||
if("\"emr-5.11.0\"".equals(cluster_version) || "\"emr-5.15.0\"".equals(cluster_version)){%>
|
||||
if("\"emr-5.11.0\"".equals(cluster_version) || "\"emr-5.15.0\"".equals(cluster_version) || "\"emr-5.29.0\"".equals(cluster_version)){%>
|
||||
{"Ganglia","Hadoop","Spark","Zeppelin"}
|
||||
<%
|
||||
} else if("\"emr-4.6.0\"".equals(cluster_version) || "\"emr-4.9.2\"".equals(cluster_version)) {
|
||||
@@ -60,7 +60,7 @@ if(!use_customize_version){
|
||||
<%
|
||||
}
|
||||
} else if("HBASE".equals(application)) {
|
||||
if("\"emr-5.11.0\"".equals(cluster_version) || "\"emr-4.9.2\"".equals(cluster_version) || "\"emr-5.15.0\"".equals(cluster_version)){%>
|
||||
if("\"emr-5.11.0\"".equals(cluster_version) || "\"emr-4.9.2\"".equals(cluster_version) || "\"emr-5.15.0\"".equals(cluster_version) || "\"emr-5.29.0\"".equals(cluster_version)){%>
|
||||
{"HBase","Ganglia","Hadoop","Hive","Hue","Phoenix","ZooKeeper"}
|
||||
<%
|
||||
} else if("\"emr-4.6.0\"".equals(cluster_version)) {
|
||||
|
||||
@@ -403,7 +403,7 @@
|
||||
if(wait_for_cluster_ready) {
|
||||
%>
|
||||
boolean clusterIsAlive_<%=cid%> = false;
|
||||
System.out.println("Wating for cluster to become available.");
|
||||
System.out.println("Waiting for cluster to become available.");
|
||||
while (true) {
|
||||
com.amazonaws.services.elasticmapreduce.model.DescribeClusterResult result2_<%=cid%> = emr_<%=cid%>.describeCluster(
|
||||
new com.amazonaws.services.elasticmapreduce.model.DescribeClusterRequest()
|
||||
@@ -433,7 +433,7 @@
|
||||
boolean waitForStep_<%=cid%> = clusterIsAlive_<%=cid%> && (steps_<%=cid %>.size() > 1);
|
||||
|
||||
if(waitForStep_<%=cid%>) {
|
||||
System.out.println("Wating for steps to complete.");
|
||||
System.out.println("Waiting for steps to complete.");
|
||||
}
|
||||
|
||||
while (waitForStep_<%=cid%>) {
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="SESSION_DURATION" FIELD="TEXT" NUM_ROW="15" REQUIRED="true"
|
||||
<PARAMETER NAME="SESSION_DURATION" FIELD="TEXT" NUM_ROW="15"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
GROUP="AUTHENTICATION">
|
||||
<DEFAULT>15</DEFAULT>
|
||||
@@ -97,7 +97,8 @@
|
||||
|
||||
<PARAMETER NAME="CLUSTER_VERSION" FIELD="OPENED_LIST"
|
||||
NUM_ROW="32" SHOW_IF="(ACTION=='START') AND (USE_CUSTOMIZE_VERSION == 'false')" GROUP="CONFIGURATION">
|
||||
<ITEMS DEFAULT="EMR5_15_0">
|
||||
<ITEMS DEFAULT="EMR5_29_0">
|
||||
<ITEM NAME="EMR5_29_0" VALUE=""emr-5.29.0"" />
|
||||
<ITEM NAME="EMR5_15_0" VALUE=""emr-5.15.0"" />
|
||||
<ITEM NAME="EMR5_11_0" VALUE=""emr-5.11.0"" />
|
||||
<ITEM NAME="EMR4_9_2" VALUE=""emr-4.9.2"" />
|
||||
@@ -112,14 +113,14 @@
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="APPLICATION" FIELD="CLOSED_LIST" NUM_ROW="32"
|
||||
SHOW_IF="(ACTION=='START') AND (USE_CUSTOMIZE_VERSION == 'false') AND ((CLUSTER_VERSION=='EMR5_15_0') OR (CLUSTER_VERSION=='EMR5_11_0') OR (CLUSTER_VERSION=='EMR4_9_2') OR (CLUSTER_VERSION=='EMR4_6_0') OR (CLUSTER_VERSION=='EMR4_5_0'))" GROUP="CONFIGURATION">
|
||||
SHOW_IF="(ACTION=='START') AND (USE_CUSTOMIZE_VERSION == 'false') AND ((CLUSTER_VERSION=='EMR5_29_0') OR (CLUSTER_VERSION=='EMR5_15_0') OR (CLUSTER_VERSION=='EMR5_11_0') OR (CLUSTER_VERSION=='EMR4_9_2') OR (CLUSTER_VERSION=='EMR4_6_0') OR (CLUSTER_VERSION=='EMR4_5_0'))" GROUP="CONFIGURATION">
|
||||
|
||||
<ITEMS DEFAULT="CORE_HADOOP">
|
||||
<ITEM NAME="ALL_APPLICATIONS" VALUE="ALL_APPLICATIONS" NOT_SHOW_IF="(CLUSTER_VERSION=='EMR4_6_0') OR (CLUSTER_VERSION=='EMR4_9_2') OR (CLUSTER_VERSION=='EMR5_11_0') OR (CLUSTER_VERSION=='EMR5_15_0')"/>
|
||||
<ITEM NAME="ALL_APPLICATIONS" VALUE="ALL_APPLICATIONS" NOT_SHOW_IF="(CLUSTER_VERSION=='EMR4_6_0') OR (CLUSTER_VERSION=='EMR4_9_2') OR (CLUSTER_VERSION=='EMR5_11_0') OR (CLUSTER_VERSION=='EMR5_15_0') OR (CLUSTER_VERSION=='EMR5_29_0')"/>
|
||||
<ITEM NAME="CORE_HADOOP" VALUE="CORE_HADOOP" />
|
||||
<ITEM NAME="HBASE" VALUE="HBASE" SHOW_IF="(CLUSTER_VERSION=='EMR5_11_0') OR (CLUSTER_VERSION=='EMR4_9_2') OR (CLUSTER_VERSION=='EMR4_6_0') OR (CLUSTER_VERSION=='EMR5_15_0')"/>
|
||||
<ITEM NAME="PRESTO_SANDBOX" VALUE="PRESTO_SANDBOX" NOT_SHOW_IF="(CLUSTER_VERSION=='EMR5_11_0') OR (CLUSTER_VERSION=='EMR5_15_0')"/>
|
||||
<ITEM NAME="PRESTO" VALUE="PRESTO" SHOW_IF="(CLUSTER_VERSION=='EMR5_11_0') OR (CLUSTER_VERSION=='EMR5_15_0')"/>
|
||||
<ITEM NAME="HBASE" VALUE="HBASE" SHOW_IF="(CLUSTER_VERSION=='EMR5_29_0') OR (CLUSTER_VERSION=='EMR5_11_0') OR (CLUSTER_VERSION=='EMR4_9_2') OR (CLUSTER_VERSION=='EMR4_6_0') OR (CLUSTER_VERSION=='EMR5_15_0')"/>
|
||||
<ITEM NAME="PRESTO_SANDBOX" VALUE="PRESTO_SANDBOX" NOT_SHOW_IF="(CLUSTER_VERSION=='EMR5_11_0') OR (CLUSTER_VERSION=='EMR5_15_0') OR (CLUSTER_VERSION=='EMR5_29_0')"/>
|
||||
<ITEM NAME="PRESTO" VALUE="PRESTO" SHOW_IF="(CLUSTER_VERSION=='EMR5_11_0') OR (CLUSTER_VERSION=='EMR5_15_0') OR (CLUSTER_VERSION=='EMR5_29_0')"/>
|
||||
<ITEM NAME="SPARK" VALUE="SPARK" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
@@ -259,47 +260,157 @@
|
||||
</PARAMETERS>
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
<PARAMETER NAME="SET_STS_ENDPOINT" FIELD="CHECK" NUM_ROW="1" REQUIRED="true"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="STS_ENDPOINT" FIELD="TEXT" NUM_ROW="1" REQUIRED="true"
|
||||
SHOW_IF="(ASSUME_ROLE == 'true') AND (SET_STS_ENDPOINT == 'true')">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER
|
||||
NAME="SET_STS_ENDPOINT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="1"
|
||||
NB_LINES="5"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="isShow[ASSUME_ROLE] AND (ASSUME_ROLE == 'true')"
|
||||
>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="STS_ENDPOINT"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="1"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="isShow[SET_STS_ENDPOINT] AND (SET_STS_ENDPOINT == 'true')"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="SIGNING_REGION"
|
||||
FIELD="OPENED_LIST"
|
||||
NUM_ROW="2"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<ITEMS DEFAULT="DEFAULT">
|
||||
<ITEM NAME="DEFAULT" VALUE="DEFAULT" />
|
||||
<ITEM NAME="GovCloud" VALUE=""us-gov-west-1"" />
|
||||
<ITEM NAME="US_EAST_1" VALUE=""us-east-1"" />
|
||||
<ITEM NAME="US_WEST_1" VALUE=""us-west-1"" />
|
||||
<ITEM NAME="US_WEST_2" VALUE=""us-west-2"" />
|
||||
<ITEM NAME="US_EAST_2" VALUE=""us-east-2"" />
|
||||
<ITEM NAME="SA_EAST_1" VALUE=""sa-east-1"" />
|
||||
<ITEM NAME="EU_WEST_1" VALUE=""eu-west-1"" />
|
||||
<ITEM NAME="EU_CENTRAL_1" VALUE=""eu-central-1"" />
|
||||
<ITEM NAME="EU_WEST_2" VALUE=""eu-west-2"" />
|
||||
<ITEM NAME="EU_WEST_3" VALUE=""eu-west-3"" />
|
||||
<ITEM NAME="EU_NORTH_1" VALUE=""eu-north-1"" />
|
||||
<ITEM NAME="CN_NORTH_1" VALUE=""cn-north-1"" />
|
||||
<ITEM NAME="CN_NORTHWEST_1" VALUE=""cn-northwest-1"" />
|
||||
<ITEM NAME="AP_EAST_1" VALUE=""ap-east-1"" />
|
||||
<ITEM NAME="AP_SOUTHEAST_1" VALUE=""ap-southeast-1"" />
|
||||
<ITEM NAME="AP_SOUTHEAST_2" VALUE=""ap-southeast-2"" />
|
||||
<ITEM NAME="AP_NORTHEAST_1" VALUE=""ap-northeast-1"" />
|
||||
<ITEM NAME="AP_NORTHEAST_2" VALUE=""ap-northeast-2"" />
|
||||
<ITEM NAME="AP_SOUTH_1" VALUE=""ap-south-1"" />
|
||||
<ITEM NAME="CA_CENTRAL_1" VALUE=""ca-central-1"" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="EXTERNALID"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="3"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="SERIALNUMBER"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="4"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="TOKENCODE"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="5"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="TAGS"
|
||||
FIELD="TABLE"
|
||||
NUM_ROW="6"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<ITEMS>
|
||||
<ITEM NAME="TAG_KEY" FIELD="TEXT" />
|
||||
<ITEM NAME="TAG_VALUE" FIELD="TEXT" />
|
||||
<ITEM NAME="TAG_TRANSITIVE" FIELD="CHECK" VALUE="FALSE"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="POLICY_TABLE"
|
||||
FIELD="TABLE"
|
||||
NUM_ROW="7"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<ITEMS>
|
||||
<ITEM NAME="POLICY_ARN" VALUE="" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="POLICY"
|
||||
FIELD="MEMO"
|
||||
NUM_ROW="8"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
NB_LINES="15"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="WAIT_FOR_CLUSTER_READY" FIELD="CHECK"
|
||||
NUM_ROW="2" SHOW_IF="(ACTION=='START')" GROUP="ADVANCED_CONFIGURATION">
|
||||
NUM_ROW="10" SHOW_IF="(ACTION=='START')" GROUP="ADVANCED_CONFIGURATION">
|
||||
<DEFAULT>true</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="VISIBLE_TO_ALL_USERS" FIELD="CHECK"
|
||||
NUM_ROW="5" SHOW_IF="ACTION=='START'" GROUP="ADVANCED_CONFIGURATION">
|
||||
NUM_ROW="15" SHOW_IF="ACTION=='START'" GROUP="ADVANCED_CONFIGURATION">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="TERMINATION_PROTECTED" FIELD="CHECK"
|
||||
NUM_ROW="5" SHOW_IF="ACTION=='START'" GROUP="ADVANCED_CONFIGURATION">
|
||||
NUM_ROW="20" SHOW_IF="ACTION=='START'" GROUP="ADVANCED_CONFIGURATION">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="ENABLE_DEBUG" FIELD="CHECK"
|
||||
NUM_ROW="7" SHOW_IF="ACTION=='START'" GROUP="ADVANCED_CONFIGURATION">
|
||||
NUM_ROW="25" SHOW_IF="ACTION=='START'" GROUP="ADVANCED_CONFIGURATION">
|
||||
<DEFAULT>true</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="USE_CUSTOMIZE_VERSION" FIELD="CHECK"
|
||||
NUM_ROW="10" SHOW_IF="ACTION=='START'" GROUP="ADVANCED_CONFIGURATION">
|
||||
NUM_ROW="30" SHOW_IF="ACTION=='START'" GROUP="ADVANCED_CONFIGURATION">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="CUSTOMIZE_VERSION" FIELD="TEXT"
|
||||
NUM_ROW="12" SHOW_IF="(ACTION=='START') AND (USE_CUSTOMIZE_VERSION =='true')" GROUP="CUSTOMIZE_APPLICATION_GROUP">
|
||||
<DEFAULT>"emr-5.15.0"</DEFAULT>
|
||||
NUM_ROW="35" SHOW_IF="(ACTION=='START') AND (USE_CUSTOMIZE_VERSION =='true')" GROUP="CUSTOMIZE_APPLICATION_GROUP">
|
||||
<DEFAULT>"emr-5.29.0"</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="CUSTOMIZE_APPLICATION_TABLE" FIELD="TABLE" NUM_ROW="13" NB_LINES="5" GROUP="CUSTOMIZE_APPLICATION_GROUP"
|
||||
<PARAMETER NAME="CUSTOMIZE_APPLICATION_TABLE" FIELD="TABLE" NUM_ROW="40" NB_LINES="5" GROUP="CUSTOMIZE_APPLICATION_GROUP"
|
||||
SHOW_IF="(ACTION=='START') AND (USE_CUSTOMIZE_VERSION =='true')">
|
||||
<ITEMS>
|
||||
<ITEM NAME="NAME" FIELD="OPENED_LIST">
|
||||
@@ -334,51 +445,51 @@
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="SUBNET_ID" FIELD="TEXT"
|
||||
NUM_ROW="17" SHOW_IF="ACTION=='START'" GROUP="ADVANCED_INSTANCE_CONFIGURATION">
|
||||
NUM_ROW="45" SHOW_IF="ACTION=='START'" GROUP="ADVANCED_INSTANCE_CONFIGURATION">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="AVAILABILITY_ZONE" FIELD="TEXT"
|
||||
NUM_ROW="18" SHOW_IF="(ACTION=='START')" GROUP="ADVANCED_INSTANCE_CONFIGURATION">
|
||||
NUM_ROW="50" SHOW_IF="(ACTION=='START')" GROUP="ADVANCED_INSTANCE_CONFIGURATION">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="MASTER_SECURITY_GROUP" FIELD="TEXT"
|
||||
REQUIRED="true" NUM_ROW="19" SHOW_IF="ACTION=='START'"
|
||||
REQUIRED="true" NUM_ROW="55" SHOW_IF="ACTION=='START'"
|
||||
GROUP="ADVANCED_INSTANCE_CONFIGURATION">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="ADDITIONAL_MASTER_SECURITY_GROUPS" FIELD="TEXT"
|
||||
REQUIRED="true" NUM_ROW="19" SHOW_IF="ACTION=='START'"
|
||||
REQUIRED="true" NUM_ROW="55" SHOW_IF="ACTION=='START'"
|
||||
GROUP="ADVANCED_INSTANCE_CONFIGURATION">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="SLAVE_SECURITY_GROUP" FIELD="TEXT"
|
||||
REQUIRED="true" NUM_ROW="20" SHOW_IF="ACTION=='START'"
|
||||
REQUIRED="true" NUM_ROW="60" SHOW_IF="ACTION=='START'"
|
||||
GROUP="ADVANCED_INSTANCE_CONFIGURATION">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="ADDITIONAL_SLAVE_SECURITY_GROUPS" FIELD="TEXT"
|
||||
REQUIRED="true" NUM_ROW="20" SHOW_IF="ACTION=='START'"
|
||||
REQUIRED="true" NUM_ROW="60" SHOW_IF="ACTION=='START'"
|
||||
GROUP="ADVANCED_INSTANCE_CONFIGURATION">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="NOTE" FIELD="LABEL" REQUIRED="true"
|
||||
NUM_ROW="30" SHOW_IF="ACTION=='START'" GROUP="ADVANCED_INSTANCE_CONFIGURATION">
|
||||
NUM_ROW="65" SHOW_IF="ACTION=='START'" GROUP="ADVANCED_INSTANCE_CONFIGURATION">
|
||||
<DEFAULT>Additional groups should be set like this : "gname1,gname2,gname3"</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="SERVICE_ACCESS_SECURITY_GROUP" FIELD="TEXT"
|
||||
REQUIRED="true" NUM_ROW="31" SHOW_IF="ACTION=='START'"
|
||||
REQUIRED="true" NUM_ROW="70" SHOW_IF="ACTION=='START'"
|
||||
GROUP="ADVANCED_INSTANCE_CONFIGURATION">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="BOOTSTRAP_ACTIONS" FIELD="TABLE" SHOW_IF="ACTION=='START'" NUM_ROW="32" NB_LINES="5" GROUP="BOOTSTRAP_GROUP">
|
||||
<PARAMETER NAME="BOOTSTRAP_ACTIONS" FIELD="TABLE" SHOW_IF="ACTION=='START'" NUM_ROW="75" NB_LINES="5" GROUP="BOOTSTRAP_GROUP">
|
||||
<ITEMS>
|
||||
<ITEM NAME="NAME" />
|
||||
<ITEM NAME="SCRIPT_PATH" />
|
||||
@@ -386,7 +497,7 @@
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="STEP_TABLE" FIELD="TABLE" SHOW_IF="ACTION=='START'" NUM_ROW="35" NB_LINES="5" GROUP="STEPS">
|
||||
<PARAMETER NAME="STEP_TABLE" FIELD="TABLE" SHOW_IF="ACTION=='START'" NUM_ROW="80" NB_LINES="5" GROUP="STEPS">
|
||||
<ITEMS>
|
||||
<ITEM NAME="NAME" />
|
||||
<ITEM NAME="ACTION_ON_FAILURE" FIELD="CLOSED_LIST">
|
||||
@@ -402,15 +513,15 @@
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
<PARAMETER NAME="KEEP_ALIVE" FIELD="CHECK"
|
||||
NUM_ROW="36" SHOW_IF="ACTION=='START'" GROUP="STEPS">
|
||||
NUM_ROW="85" SHOW_IF="ACTION=='START'" GROUP="STEPS">
|
||||
<DEFAULT>true</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER NAME="WAIT_FOR_STEPS_COMPLETE" FIELD="CHECK"
|
||||
NUM_ROW="37" SHOW_IF="ACTION=='START' AND isShow[WAIT_FOR_CLUSTER_READY] AND (WAIT_FOR_CLUSTER_READY=='true')" GROUP="STEPS">
|
||||
NUM_ROW="90" SHOW_IF="ACTION=='START' AND isShow[WAIT_FOR_CLUSTER_READY] AND (WAIT_FOR_CLUSTER_READY=='true')" GROUP="STEPS">
|
||||
<DEFAULT>true</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="PROPERTY_TABLE" FIELD="TABLE" NUM_ROW="40" NB_LINES="5" GROUP="PROPERTY_GROUP"
|
||||
<PARAMETER NAME="PROPERTY_TABLE" FIELD="TABLE" NUM_ROW="95" NB_LINES="5" GROUP="PROPERTY_GROUP"
|
||||
SHOW_IF="(ACTION=='START') AND (CLUSTER_VERSION!='AMI3_10_0') AND (CLUSTER_VERSION!='AMI3_9_0') AND (CLUSTER_VERSION!='AMI3_8_0') AND (CLUSTER_VERSION!='AMI2_4_11') AND (CLUSTER_VERSION!='AMI2_4_10')">
|
||||
<ITEMS>
|
||||
<ITEM NAME="CLASSIFICATION" />
|
||||
@@ -422,8 +533,8 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="aws-java-sdk-1.11.406.jar" MODULE="aws-java-sdk-1.11.406.jar"
|
||||
MVN="mvn:com.amazonaws/aws-java-sdk/1.11.406"
|
||||
<IMPORT NAME="aws-java-sdk-1.11.729.jar" MODULE="aws-java-sdk-1.11.729.jar"
|
||||
MVN="mvn:com.amazonaws/aws-java-sdk/1.11.729"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="jackson-core-2.10.1.jar" MODULE="jackson-core-2.10.1.jar"
|
||||
MVN="mvn:com.fasterxml.jackson.core/jackson-core/2.10.1"
|
||||
@@ -434,22 +545,20 @@
|
||||
<IMPORT NAME="jackson-annotations-2.10.1.jar" MODULE="jackson-annotations-2.10.1.jar"
|
||||
MVN="mvn:com.fasterxml.jackson.core/jackson-annotations/2.10.1"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="httpcore-4.4.9.jar" MODULE="httpcore-4.4.9.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpcore/4.4.9"
|
||||
<IMPORT NAME="httpcore-4.4.11.jar" MODULE="httpcore-4.4.11.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpcore/4.4.11"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="httpclient-4.5.5.jar" MODULE="httpclient-4.5.5.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpclient/4.5.5"
|
||||
<IMPORT NAME="httpclient-4.5.9.jar" MODULE="httpclient-4.5.9.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpclient/4.5.9"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="joda-time-2.8.1.jar" MODULE="joda-time-2.8.1.jar"
|
||||
MVN="mvn:joda-time/joda-time/2.8.1"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="commons-logging-1.1.3.jar" MODULE="commons-logging-1.1.3.jar"
|
||||
MVN="mvn:commons-logging/commons-logging/1.1.3"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-logging-1.1.3.jar"
|
||||
<IMPORT NAME="commons-logging-1.2.jar" MODULE="commons-logging-1.2.jar"
|
||||
MVN="mvn:commons-logging/commons-logging/1.2"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="commons-codec-1.6.jar" MODULE="commons-codec-1.6.jar"
|
||||
MVN="mvn:org.talend.libraries/commons-codec-1.6/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-codec-1.6.jar"
|
||||
<IMPORT NAME="commons-codec-1.11.jar" MODULE="commons-codec-1.11.jar"
|
||||
MVN="mvn:commons-codec/commons-codec/1.11"
|
||||
REQUIRED="true" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -29,6 +29,7 @@ REGION.ITEM.SA_EAST_1=South America (Sao Paulo)
|
||||
CLUSTER_NAME.NAME=Cluster name
|
||||
|
||||
CLUSTER_VERSION.NAME=Cluster version
|
||||
CLUSTER_VERSION.ITEM.EMR5_29_0=EMR 5.29.0
|
||||
CLUSTER_VERSION.ITEM.EMR5_15_0=EMR 5.15.0
|
||||
CLUSTER_VERSION.ITEM.EMR5_11_0=EMR 5.11.0
|
||||
CLUSTER_VERSION.ITEM.EMR4_9_2=EMR 4.9.2
|
||||
@@ -198,8 +199,41 @@ ARN.NAME=Role ARN
|
||||
ROLE_SESSION_NAME.NAME=Role session name
|
||||
SESSION_DURATION.NAME=Session duration(minutes)
|
||||
|
||||
ASSUME_ROLE_CONFIG.NAME=Assume Role Configuration
|
||||
EXTERNALID.NAME=External Id
|
||||
SERIALNUMBER.NAME=Serial number
|
||||
TOKENCODE.NAME=Token code
|
||||
POLICY_TABLE.NAME=IAM Policy ARNs
|
||||
POLICY_TABLE.ITEM.POLICY_ARN=Policy ARN
|
||||
POLICY.NAME=Policy
|
||||
TAGS.NAME=Tags
|
||||
TAGS.ITEM.TAG_KEY=Key
|
||||
TAGS.ITEM.TAG_VALUE=Value
|
||||
TAGS.ITEM.TAG_TRANSITIVE=Transitive
|
||||
SET_STS_ENDPOINT.NAME=STS Endpoint
|
||||
STS_ENDPOINT.NAME=
|
||||
SIGNING_REGION.NAME=Signing region
|
||||
SIGNING_REGION.ITEM.DEFAULT=DEFAULT
|
||||
SIGNING_REGION.ITEM.GovCloud=AWS GovCloud (US)
|
||||
SIGNING_REGION.ITEM.US_EAST_1=US Standard
|
||||
SIGNING_REGION.ITEM.US_WEST_1=US West (N. California)
|
||||
SIGNING_REGION.ITEM.US_WEST_2=US West (Oregon)
|
||||
SIGNING_REGION.ITEM.US_EAST_2=US East (Ohio)
|
||||
SIGNING_REGION.ITEM.SA_EAST_1=South America (Sao Paulo)
|
||||
SIGNING_REGION.ITEM.EU_WEST_1=EU (Ireland)
|
||||
SIGNING_REGION.ITEM.EU_CENTRAL_1=EU (Frankfurt)
|
||||
SIGNING_REGION.ITEM.EU_WEST_2=EU (London)
|
||||
SIGNING_REGION.ITEM.EU_WEST_3=EU (Paris)
|
||||
SIGNING_REGION.ITEM.EU_NORTH_1=EU (Stockholm)
|
||||
SIGNING_REGION.ITEM.CN_NORTH_1=China (Beijing)
|
||||
SIGNING_REGION.ITEM.CN_NORTHWEST_1=China (Ningxia)
|
||||
SIGNING_REGION.ITEM.AP_EAST_1=Asia Pacific (Hong Kong)
|
||||
SIGNING_REGION.ITEM.AP_SOUTHEAST_1=Asia Pacific (Singapore)
|
||||
SIGNING_REGION.ITEM.AP_SOUTHEAST_2=Asia Pacific (Sydney)
|
||||
SIGNING_REGION.ITEM.AP_NORTHEAST_1=Asia Pacific (Tokyo)
|
||||
SIGNING_REGION.ITEM.AP_NORTHEAST_2=Asia Pacific (Seoul)
|
||||
SIGNING_REGION.ITEM.AP_SOUTH_1=Asia Pacific (Mumbai)
|
||||
SIGNING_REGION.ITEM.CA_CENTRAL_1=Canada (Central)
|
||||
|
||||
CUSTOMIZE_APPLICATION_GROUP.NAME=Customize Version and Application
|
||||
USE_CUSTOMIZE_VERSION.NAME=Customize Version and Application
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="SESSION_DURATION" FIELD="TEXT" NUM_ROW="15" REQUIRED="true"
|
||||
<PARAMETER NAME="SESSION_DURATION" FIELD="TEXT" NUM_ROW="15"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
GROUP="AUTHENTICATION">
|
||||
<DEFAULT>15</DEFAULT>
|
||||
@@ -162,21 +162,131 @@
|
||||
</PARAMETERS>
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
<PARAMETER NAME="SET_STS_ENDPOINT" FIELD="CHECK" NUM_ROW="1" REQUIRED="true"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="STS_ENDPOINT" FIELD="TEXT" NUM_ROW="1" REQUIRED="true"
|
||||
SHOW_IF="(ASSUME_ROLE == 'true') AND (SET_STS_ENDPOINT == 'true')">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER
|
||||
NAME="SET_STS_ENDPOINT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="1"
|
||||
NB_LINES="5"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="isShow[ASSUME_ROLE] AND (ASSUME_ROLE == 'true')"
|
||||
>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="STS_ENDPOINT"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="1"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="isShow[SET_STS_ENDPOINT] AND (SET_STS_ENDPOINT == 'true')"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="SIGNING_REGION"
|
||||
FIELD="OPENED_LIST"
|
||||
NUM_ROW="2"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<ITEMS DEFAULT="DEFAULT">
|
||||
<ITEM NAME="DEFAULT" VALUE="DEFAULT" />
|
||||
<ITEM NAME="GovCloud" VALUE=""us-gov-west-1"" />
|
||||
<ITEM NAME="US_EAST_1" VALUE=""us-east-1"" />
|
||||
<ITEM NAME="US_WEST_1" VALUE=""us-west-1"" />
|
||||
<ITEM NAME="US_WEST_2" VALUE=""us-west-2"" />
|
||||
<ITEM NAME="US_EAST_2" VALUE=""us-east-2"" />
|
||||
<ITEM NAME="SA_EAST_1" VALUE=""sa-east-1"" />
|
||||
<ITEM NAME="EU_WEST_1" VALUE=""eu-west-1"" />
|
||||
<ITEM NAME="EU_CENTRAL_1" VALUE=""eu-central-1"" />
|
||||
<ITEM NAME="EU_WEST_2" VALUE=""eu-west-2"" />
|
||||
<ITEM NAME="EU_WEST_3" VALUE=""eu-west-3"" />
|
||||
<ITEM NAME="EU_NORTH_1" VALUE=""eu-north-1"" />
|
||||
<ITEM NAME="CN_NORTH_1" VALUE=""cn-north-1"" />
|
||||
<ITEM NAME="CN_NORTHWEST_1" VALUE=""cn-northwest-1"" />
|
||||
<ITEM NAME="AP_EAST_1" VALUE=""ap-east-1"" />
|
||||
<ITEM NAME="AP_SOUTHEAST_1" VALUE=""ap-southeast-1"" />
|
||||
<ITEM NAME="AP_SOUTHEAST_2" VALUE=""ap-southeast-2"" />
|
||||
<ITEM NAME="AP_NORTHEAST_1" VALUE=""ap-northeast-1"" />
|
||||
<ITEM NAME="AP_NORTHEAST_2" VALUE=""ap-northeast-2"" />
|
||||
<ITEM NAME="AP_SOUTH_1" VALUE=""ap-south-1"" />
|
||||
<ITEM NAME="CA_CENTRAL_1" VALUE=""ca-central-1"" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="EXTERNALID"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="3"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="SERIALNUMBER"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="4"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="TOKENCODE"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="5"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="TAGS"
|
||||
FIELD="TABLE"
|
||||
NUM_ROW="6"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<ITEMS>
|
||||
<ITEM NAME="TAG_KEY" FIELD="TEXT" />
|
||||
<ITEM NAME="TAG_VALUE" FIELD="TEXT" />
|
||||
<ITEM NAME="TAG_TRANSITIVE" FIELD="CHECK" VALUE="FALSE"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="POLICY_TABLE"
|
||||
FIELD="TABLE"
|
||||
NUM_ROW="7"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<ITEMS>
|
||||
<ITEM NAME="POLICY_ARN" VALUE="" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="POLICY"
|
||||
FIELD="MEMO"
|
||||
NUM_ROW="8"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
NB_LINES="15"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
</ADVANCED_PARAMETERS>
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="aws-java-sdk-1.11.406.jar" MODULE="aws-java-sdk-1.11.406.jar"
|
||||
MVN="mvn:com.amazonaws/aws-java-sdk/1.11.406"
|
||||
<IMPORT NAME="aws-java-sdk-1.11.729.jar" MODULE="aws-java-sdk-1.11.729.jar"
|
||||
MVN="mvn:com.amazonaws/aws-java-sdk/1.11.729"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="jackson-core-2.10.1.jar" MODULE="jackson-core-2.10.1.jar"
|
||||
MVN="mvn:com.fasterxml.jackson.core/jackson-core/2.10.1"
|
||||
@@ -187,22 +297,20 @@
|
||||
<IMPORT NAME="jackson-annotations-2.10.1.jar" MODULE="jackson-annotations-2.10.1.jar"
|
||||
MVN="mvn:com.fasterxml.jackson.core/jackson-annotations/2.10.1"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="httpcore-4.4.9.jar" MODULE="httpcore-4.4.9.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpcore/4.4.9"
|
||||
<IMPORT NAME="httpcore-4.4.11.jar" MODULE="httpcore-4.4.11.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpcore/4.4.11"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="httpclient-4.5.5.jar" MODULE="httpclient-4.5.5.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpclient/4.5.5"
|
||||
<IMPORT NAME="httpclient-4.5.9.jar" MODULE="httpclient-4.5.9.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpclient/4.5.9"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="joda-time-2.8.1.jar" MODULE="joda-time-2.8.1.jar"
|
||||
MVN="mvn:joda-time/joda-time/2.8.1"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="commons-logging-1.1.3.jar" MODULE="commons-logging-1.1.3.jar"
|
||||
MVN="mvn:commons-logging/commons-logging/1.1.3"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-logging-1.1.3.jar"
|
||||
<IMPORT NAME="commons-logging-1.2.jar" MODULE="commons-logging-1.2.jar"
|
||||
MVN="mvn:commons-logging/commons-logging/1.2"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="commons-codec-1.6.jar" MODULE="commons-codec-1.6.jar"
|
||||
MVN="mvn:org.talend.libraries/commons-codec-1.6/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-codec-1.6.jar"
|
||||
<IMPORT NAME="commons-codec-1.11.jar" MODULE="commons-codec-1.11.jar"
|
||||
MVN="mvn:commons-codec/commons-codec/1.11"
|
||||
REQUIRED="true" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -94,5 +94,38 @@ ARN.NAME=Role ARN
|
||||
ROLE_SESSION_NAME.NAME=Role session name
|
||||
SESSION_DURATION.NAME=Session duration(minutes)
|
||||
|
||||
ASSUME_ROLE_CONFIG.NAME=Assume Role Configuration
|
||||
EXTERNALID.NAME=External Id
|
||||
SERIALNUMBER.NAME=Serial number
|
||||
TOKENCODE.NAME=Token code
|
||||
POLICY_TABLE.NAME=IAM Policy ARNs
|
||||
POLICY_TABLE.ITEM.POLICY_ARN=Policy ARN
|
||||
POLICY.NAME=Policy
|
||||
TAGS.NAME=Tags
|
||||
TAGS.ITEM.TAG_KEY=Key
|
||||
TAGS.ITEM.TAG_VALUE=Value
|
||||
TAGS.ITEM.TAG_TRANSITIVE=Transitive
|
||||
SET_STS_ENDPOINT.NAME=STS Endpoint
|
||||
STS_ENDPOINT.NAME=
|
||||
STS_ENDPOINT.NAME=
|
||||
SIGNING_REGION.NAME=Signing region
|
||||
SIGNING_REGION.ITEM.DEFAULT=DEFAULT
|
||||
SIGNING_REGION.ITEM.GovCloud=AWS GovCloud (US)
|
||||
SIGNING_REGION.ITEM.US_EAST_1=US Standard
|
||||
SIGNING_REGION.ITEM.US_WEST_1=US West (N. California)
|
||||
SIGNING_REGION.ITEM.US_WEST_2=US West (Oregon)
|
||||
SIGNING_REGION.ITEM.US_EAST_2=US East (Ohio)
|
||||
SIGNING_REGION.ITEM.SA_EAST_1=South America (Sao Paulo)
|
||||
SIGNING_REGION.ITEM.EU_WEST_1=EU (Ireland)
|
||||
SIGNING_REGION.ITEM.EU_CENTRAL_1=EU (Frankfurt)
|
||||
SIGNING_REGION.ITEM.EU_WEST_2=EU (London)
|
||||
SIGNING_REGION.ITEM.EU_WEST_3=EU (Paris)
|
||||
SIGNING_REGION.ITEM.EU_NORTH_1=EU (Stockholm)
|
||||
SIGNING_REGION.ITEM.CN_NORTH_1=China (Beijing)
|
||||
SIGNING_REGION.ITEM.CN_NORTHWEST_1=China (Ningxia)
|
||||
SIGNING_REGION.ITEM.AP_EAST_1=Asia Pacific (Hong Kong)
|
||||
SIGNING_REGION.ITEM.AP_SOUTHEAST_1=Asia Pacific (Singapore)
|
||||
SIGNING_REGION.ITEM.AP_SOUTHEAST_2=Asia Pacific (Sydney)
|
||||
SIGNING_REGION.ITEM.AP_NORTHEAST_1=Asia Pacific (Tokyo)
|
||||
SIGNING_REGION.ITEM.AP_NORTHEAST_2=Asia Pacific (Seoul)
|
||||
SIGNING_REGION.ITEM.AP_SOUTH_1=Asia Pacific (Mumbai)
|
||||
SIGNING_REGION.ITEM.CA_CENTRAL_1=Canada (Central)
|
||||
@@ -163,7 +163,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
|
||||
String tableName_<%=cid%> = <%=table%>;
|
||||
|
||||
@@ -38,7 +38,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
|
||||
String commitEvery = ElementParameterParser.getValue(node, "__COMMIT_EVERY__");
|
||||
|
||||
String useExistingConn = ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__");
|
||||
boolean setAutoCommit = false;
|
||||
|
||||
boolean useExistingConnection = "true".equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
|
||||
boolean extendedInsert = false;
|
||||
|
||||
@@ -50,11 +52,13 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
|
||||
String dbVersion = "" ;
|
||||
String connection = ElementParameterParser.getValue(node,"__CONNECTION__");
|
||||
if(("true").equals(useExistingConn)) {
|
||||
if(useExistingConnection) {
|
||||
List<? extends INode> nodes = process.getNodesOfType("tAmazonMysqlConnection");
|
||||
for (INode ne:nodes) {
|
||||
if (connection.equals(ne.getUniqueName())) {
|
||||
dbVersion = ElementParameterParser.getValue(ne, "__DB_VERSION__");
|
||||
setAutoCommit = "true".equals(ElementParameterParser.getValue(ne, "__AUTO_COMMIT__"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -117,6 +121,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : 1);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
@@ -137,6 +142,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -192,6 +198,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : <%=("INSERT").equals(dataAction)? "1" : "countEach_" +cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
@@ -217,6 +224,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -246,14 +254,16 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
resourceMap.put("statementClosed_<%=cid%>", true);
|
||||
<%
|
||||
if(!("true").equals(useExistingConn)){
|
||||
if(!useExistingConnection){
|
||||
if(!("").equals(commitEvery) && !("0").equals(commitEvery))
|
||||
{
|
||||
%>
|
||||
if (commitCounter_<%=cid%> > 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
if (commitCounter_<%=cid%> > 0 && rowsToCommitCount_<%=cid%> != 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
commitCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -631,7 +631,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -709,7 +711,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -844,7 +848,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -996,7 +1002,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -1072,7 +1080,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -1204,7 +1214,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
try {
|
||||
updateFlag_<%=cid%>=pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%>+updateFlag_<%=cid%>;
|
||||
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
|
||||
<%
|
||||
@@ -1250,7 +1260,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
}
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
}else{
|
||||
@@ -1342,7 +1354,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -1410,7 +1424,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
%>
|
||||
int replaceCount_<%=cid%> = 0;
|
||||
try {
|
||||
replaceCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
replaceCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().replacing(null);%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -1490,7 +1506,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
int count_on_duplicate_key_<%=cid%> = 0;
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
count_on_duplicate_key_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
count_on_duplicate_key_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().insertingOnDuplicateKeyUpdating(null);%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -1556,7 +1574,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().insertingOnDuplicateKeyUpdating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -1627,6 +1647,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : 1);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
@@ -1645,6 +1666,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -1674,6 +1696,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%
|
||||
if (("UPDATE").equals(dataAction)) {
|
||||
@@ -1697,6 +1720,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("UPDATE").equals(dataAction)) {%>
|
||||
updatedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<% }else if (("DELETE").equals(dataAction)) {%>
|
||||
@@ -1727,6 +1751,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : <%=("INSERT").equals(dataAction)? "1" : "countEach_" +cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
@@ -1753,6 +1778,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -1775,9 +1801,12 @@ if(columnList != null && columnList.size() > 0) {
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
}
|
||||
<%
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user