Compare commits
12 Commits
release/7.
...
release/7.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
507ba67376 | ||
|
|
aa95c2a838 | ||
|
|
d45be363f7 | ||
|
|
685c1acf49 | ||
|
|
4db3aee524 | ||
|
|
aa80db3436 | ||
|
|
2be0a84a21 | ||
|
|
e652ea9d21 | ||
|
|
5ada36f792 | ||
|
|
ddc02b72bc | ||
|
|
d787460ebb | ||
|
|
bf2e906db3 |
@@ -914,7 +914,7 @@
|
||||
<IMPORT NAME="Driver-EXASolution" MODULE="exajdbc-6.0.9302.jar" MVN="mvn:org.talend.libraries/exajdbc-6.0.9302/6.3.0" REQUIRED_IF="(DBTYPE=='EXASOL') and (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="Driver-Redshift" MODULE="redshift-jdbc42-no-awssdk-1.2.55.1083.jar" MVN="mvn:com.amazon.redshift/redshift-jdbc42-no-awssdk/1.2.55.1083" REQUIRED_IF="(DBTYPE=='REDSHIFT') and (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="antlr4-runtime-4.8-1.jar" MODULE="antlr4-runtime-4.8-1.jar" MVN="mvn:org.antlr/antlr4-runtime/4.8-1" REQUIRED_IF="(DBTYPE=='REDSHIFT') and (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="Driver-Snowflake" MODULE="snowflake-jdbc-3.13.32.jar" MVN="mvn:net.snowflake/snowflake-jdbc/3.13.32" REQUIRED_IF="(DBTYPE=='SNOWFLAKE') and (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="Driver-Snowflake" MODULE="snowflake-jdbc-3.13.30.jar" MVN="mvn:net.snowflake/snowflake-jdbc/3.13.30" REQUIRED_IF="(DBTYPE=='SNOWFLAKE') and (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="Driver-VERTICA_9.0" MODULE="vertica-jdbc-9.3.1-0.jar" MVN="mvn:com.vertica/vertica-jdbc/9.3.1-0" REQUIRED_IF="(DBTYPE=='VERTICA') and (USE_EXISTING_CONNECTION == 'false') and (DB_VERTICA_VERSION=='VERTICA_9_0')"/>
|
||||
|
||||
<!-- java 11 dependencies for jdbc HSQLDB driver -->
|
||||
|
||||
@@ -25,7 +25,6 @@ if(!("true").equals(useExistingConn))
|
||||
{
|
||||
%>
|
||||
if(conn_<%=cid%> != null && !conn_<%=cid%>.isClosed()) {
|
||||
<%log4jCodeGenerateUtil.commit(node);%>
|
||||
<%log4jCodeGenerateUtil.close(node);%>
|
||||
}
|
||||
<%
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
<%@ jet
|
||||
%>
|
||||
class GetHiveJarsToRegister_<%=cid%> extends routines.system.GetJarsToRegister {
|
||||
|
||||
|
||||
private String uploadJarToHDFS(String jar) throws Exception {
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Hive/GetFileSystem.javajet"%>
|
||||
<%
|
||||
(new GetFileSystem()).invoke(connectionInformationNode, cid);
|
||||
%>
|
||||
|
||||
|
||||
String pathUsername_<%=cid%> = username_<%=cid%> == null ? org.apache.hadoop.security.UserGroupInformation.getLoginUser().getShortUserName() : username_<%=cid%>;
|
||||
fs_<%=cid%>.mkdirs(new org.apache.hadoop.fs.Path("/user/" + pathUsername_<%=cid%> + "/tmp"), new org.apache.hadoop.fs.permission.FsPermission(org.apache.hadoop.fs.permission.FsAction.ALL, org.apache.hadoop.fs.permission.FsAction.ALL, org.apache.hadoop.fs.permission.FsAction.ALL));
|
||||
fs_<%=cid%>.copyFromLocalFile(false, true, new org.apache.hadoop.fs.Path(jar), new org.apache.hadoop.fs.Path("/user/" + pathUsername_<%=cid%> + "/tmp"));
|
||||
fs_<%=cid%>.copyFromLocalFile(false, false, new org.apache.hadoop.fs.Path(jar), new org.apache.hadoop.fs.Path("/user/" + pathUsername_<%=cid%> + "/tmp"));
|
||||
return <%=fsDefaultName%> + "/user/" + pathUsername_<%=cid%> + "/tmp/" + new java.io.File(jar).getName();
|
||||
}
|
||||
|
||||
|
||||
public String replaceJarPaths(String originalClassPathLine) throws Exception {
|
||||
String classPathLine = super.replaceJarPaths(originalClassPathLine);
|
||||
String hdfsPath = uploadJarToHDFS(classPathLine);
|
||||
|
||||
@@ -126,8 +126,8 @@
|
||||
context="org.talend.designer.components.bigdata">
|
||||
</libraryNeeded>
|
||||
<libraryNeeded
|
||||
id="snappy-java-1.1.1.6.jar"
|
||||
name="snappy-java-1.1.1.6.jar" mvn_uri="mvn:org.talend.libraries/snappy-java-1.1.1.6/6.0.0"
|
||||
id="snappy-java-1.1.10.1.jar"
|
||||
name="snappy-java-1.1.10.1.jar" mvn_uri="mvn:org.xerial.snappy/snappy-java/1.1.10.1"
|
||||
context="org.talend.designer.components.bigdata">
|
||||
</libraryNeeded>
|
||||
<libraryNeeded
|
||||
@@ -198,7 +198,7 @@
|
||||
<library id="kafka-clients-0.8.2.0.jar"/>
|
||||
<library id="lz4-1.2.0.jar"/>
|
||||
<library id="metrics-core-2.2.0.jar"/>
|
||||
<library id="snappy-java-1.1.1.6.jar"/>
|
||||
<library id="snappy-java-1.1.10.1.jar"/>
|
||||
<library id="zkclient-0.3.jar"/>
|
||||
<library id="zookeeper-3.4.8.jar"/>
|
||||
<library id="reload4j-1.2.19.jar"/>
|
||||
|
||||
@@ -109,6 +109,17 @@ public class GenericService implements IGenericService {
|
||||
ps = conn.getProperties("referencedComponent"); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
if (ps == null) {
|
||||
// TSnowflakeOutputBulkProperties is not a sub class of SnowflakeConnectionTableProperties but
|
||||
// extends FixedConnectorsComponentProperties directly so there's no "connection" property
|
||||
// need to get "snowflakeConnectionProperties" from TSnowflakeOutputBulkProperties as "connection"
|
||||
if (pros.getClass().getSimpleName().equals("TSnowflakeOutputBulkProperties")) {
|
||||
Properties conn = pros.getProperties("snowflakeConnectionProperties"); //$NON-NLS-1$
|
||||
if (conn != null) {
|
||||
ps = conn.getProperties("referencedComponent"); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
}
|
||||
if(ps == null){
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -57,12 +57,22 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.12.4</version>
|
||||
<version>2.22.2</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.surefire</groupId>
|
||||
<artifactId>surefire-junit4</artifactId>
|
||||
<version>2.12.4</version>
|
||||
<version>2.22.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.13.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.11</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<configuration>
|
||||
|
||||
@@ -3744,6 +3744,15 @@
|
||||
name="RemoveUnwantedUsageDataMigrationTask"
|
||||
version="7.3.1">
|
||||
</projecttask>
|
||||
<projecttask
|
||||
beforeLogon="false"
|
||||
breaks="7.3.1"
|
||||
class="org.talend.repository.model.migration.UpdateDynamicSettingsForEsbComponents"
|
||||
description="Update dynamic settings for tRESTClient and tESBConsumer"
|
||||
id="org.talend.repository.model.migration.UpdateDynamicSettingsForEsbComponents"
|
||||
name="UpdateDynamicSettingsForEsbComponents"
|
||||
version="7.3.1">
|
||||
</projecttask>
|
||||
</extension>
|
||||
|
||||
<extension
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
package org.talend.repository.model.migration;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.core.model.components.ComponentUtilities;
|
||||
import org.talend.core.model.components.ModifyComponentsAction;
|
||||
import org.talend.core.model.components.conversions.IComponentConversion;
|
||||
import org.talend.core.model.components.filters.IComponentFilter;
|
||||
import org.talend.core.model.components.filters.NameComponentFilter;
|
||||
import org.talend.core.model.migration.AbstractJobMigrationTask;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ProcessType;
|
||||
|
||||
public class UpdateDynamicSettingsForEsbComponents extends AbstractJobMigrationTask {
|
||||
|
||||
@Override
|
||||
public Date getOrder() {
|
||||
GregorianCalendar gc = new GregorianCalendar(2023, 8, 28, 12, 10, 0);
|
||||
return gc.getTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExecutionResult execute(Item item) {
|
||||
final ProcessType processType = getProcessType(item);
|
||||
String[] compNames = { "tRESTClient", "tESBConsumer"}; //$NON-NLS-1$
|
||||
|
||||
IComponentConversion action = new IComponentConversion() {
|
||||
@Override
|
||||
public void transform(NodeType node) {
|
||||
if (node == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
ElementParameterType property = ComponentUtilities.getNodeProperty(node, "AUTH_TYPE");//$NON-NLS-1$
|
||||
if (property != null) {
|
||||
property.unsetContextMode();
|
||||
String value = ComponentUtilities.getNodePropertyValue(node, "AUTH_TYPE"); //$NON-NLS-1$
|
||||
String newValue = value.replace("\"", "");
|
||||
ComponentUtilities.setNodeValue(node, "AUTH_TYPE", newValue);//$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
for (String name : compNames) {
|
||||
IComponentFilter filter = new NameComponentFilter(name);
|
||||
|
||||
try {
|
||||
ModifyComponentsAction.searchAndModify(item, processType, filter, Arrays.<IComponentConversion> asList(action));
|
||||
} catch (PersistenceException e) {
|
||||
ExceptionHandler.process(e);
|
||||
return ExecutionResult.FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
return ExecutionResult.SUCCESS_NO_ALERT;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user