Compare commits

...

1 Commits

Author SHA1 Message Date
wang wei
9a58eba59b fix(TDI-43670): tSSH component hangs if Command takes time to complete (#4423) 2020-02-28 14:28:10 +08:00
4 changed files with 77 additions and 13 deletions

57
PATCH_RELEASE_NOTE.md Normal file
View File

@@ -0,0 +1,57 @@
---
version: 7.1.1
module: https://talend.poolparty.biz/coretaxonomy/42
product:
- https://talend.poolparty.biz/coretaxonomy/23
---
# TPS-3809
| Info | Value |
| ---------------- | ---------------- |
| Patch Name | Patch\_20200228\_TPS-3809\_v1-7.1.1 |
| Release Date | 2020-02-28 |
| Target Version | 20181026_1147-V7.1.1 |
| Product affected | Talend Studio |
## Introduction
This is a self-contained patch.
**NOTE**: For information on how to obtain this patch, reach out to your Support contact at Talend.
## Fixed issues
This patch contains the following fixes:
- TPS-3809 [7.1.1] tSSH component hangs if Command takes time to complete (TDI-43670)
## Prerequisites
Consider the following requirements for your system:
- Talend Studio 7.1.1 must be installed.
## Installation
### Installing the patch using Software update
1) Logon TAC and switch to Configuration->Software Update, then enter the correct values and save referring to the documentation: https://help.talend.com/reader/f7Em9WV_cPm2RRywucSN0Q/j9x5iXV~vyxMlUafnDejaQ
2) Switch to Software update page, where the new patch will be listed. The patch can be downloaded from here into the nexus repository.
3) On Studio Side: Logon Studio with remote mode, on the logon page the Update button is displayed: click this button to install the patch.
### Installing the patch using Talend Studio
1) Create a folder named "patches" under your studio installer directory and copy the patch .zip file to this folder.
2) Restart your studio: a window pops up, then click OK to install the patch, or restart the commandline and the patch will be installed automatically.
### Installing the patch using Commandline
Execute the following commands:
1. Talend-Studio-win-x86_64.exe -nosplash -application org.talend.commandline.CommandLine -consoleLog -data commandline-workspace startServer -p 8002 --talendDebug
2. initRemote {tac_url} -ul {TAC login username} -up {TAC login password}
3. checkAndUpdate -tu {TAC login username} -tup {TAC login password}

View File

@@ -189,4 +189,6 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
}
%>
StringBuilder stringStdout_<%=cid%> =new StringBuilder();
StringBuilder stringStderr_<%=cid%> =new StringBuilder();
StringBuilder stringStderr_<%=cid%> =new StringBuilder();
String out_content_<%=cid%> = null;
String err_content_<%=cid%> = null;

View File

@@ -23,7 +23,7 @@ imports="
if("TO_CONSOLE".equals(standardOutput) || "TO_CONSOLE_AND_GLOBAL_VARIABLE".equals(standardOutput)){
%>
if(stringStdout_<%=cid%>.length() > 0) {
System.out.println(stringStdout_<%=cid%>.toString());
System.out.println(out_content_<%=cid%>);
}
<%
}
@@ -31,7 +31,7 @@ imports="
if("TO_CONSOLE".equals(errorOutput) || "TO_CONSOLE_AND_GLOBAL_VARIABLE".equals(errorOutput)){
%>
if(stringStderr_<%=cid%>.length() > 0) {
System.out.println(stringStderr_<%=cid%>.toString());
System.out.println(err_content_<%=cid%>);
}
<%
}

View File

@@ -77,7 +77,9 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
<%
}
%>
java.io.InputStream stdout_<%=cid%> = sess_<%=cid%>.getStdout();
java.io.InputStream stdout_<%=cid%> = new ch.ethz.ssh2.StreamGobbler(sess_<%=cid%>.getStdout());
java.io.InputStream stderr_<%=cid%> = new ch.ethz.ssh2.StreamGobbler(sess_<%=cid%>.getStderr());
java.io.BufferedReader brout_<%=cid%>= new java.io.BufferedReader(new java.io.InputStreamReader(stdout_<%=cid%>));
String line_<%=cid%> = "";
@@ -91,7 +93,6 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
brout_<%=cid%>.close();
stdout_<%=cid%>.close();
java.io.InputStream stderr_<%=cid%> = sess_<%=cid%>.getStderr();
java.io.BufferedReader breer_<%=cid%>= new java.io.BufferedReader(new java.io.InputStreamReader(stderr_<%=cid%>));
String line1_<%=cid%> = "";
@@ -110,37 +111,41 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
/* Close this session */
sess_<%=cid%>.close();
out_content_<%=cid%> = stringStdout_<%=cid%>.toString();
err_content_<%=cid%> = stringStderr_<%=cid%>.toString();
<%if(isLog4jEnabled){%>
log.debug("<%=cid%> - Command line standard result: " + stringStdout_<%=cid%>.toString());
log.debug("<%=cid%> - Command line error result: " + stringStderr_<%=cid%>.toString());
log.debug("<%=cid%> - Command line standard result: " + out_content_<%=cid%>);
log.debug("<%=cid%> - Command line error result: " + err_content_<%=cid%>);
<%}%>
<%
//-----begin to handle output
if(("TO_GLOBAL_VARIABLE").equals(standardOutput)){
%>
globalMap.put("<%=cid %>_STDOUT", stringStdout_<%=cid%>.toString());
globalMap.put("<%=cid %>_STDOUT", out_content_<%=cid%>);
<%
}else if(("TO_CONSOLE_AND_GLOBAL_VARIABLE").equals(standardOutput)){
%>
globalMap.put("<%=cid %>_STDOUT", stringStdout_<%=cid%>.toString());
globalMap.put("<%=cid %>_STDOUT", out_content_<%=cid%>);
<%
}else if(("NORMAL_OUTPUT").equals(standardOutput)){
%>
output_<%=cid%>.add(stringStdout_<%=cid%>.toString());
output_<%=cid%>.add(out_content_<%=cid%>);
stringStdout_<%=cid%>.delete(0,stringStdout_<%=cid%>.length());
<%
}
if(("TO_GLOBAL_VARIABLE").equals(errorOutput)){
%>
globalMap.put("<%=cid %>_STDERR", stringStderr_<%=cid%>.toString());
globalMap.put("<%=cid %>_STDERR", err_content_<%=cid%>);
<%
}else if(("TO_CONSOLE_AND_GLOBAL_VARIABLE").equals(errorOutput)){
%>
globalMap.put("<%=cid %>_STDERR", stringStderr_<%=cid%>.toString());
globalMap.put("<%=cid %>_STDERR", err_content_<%=cid%>);
<%
}else if(("NORMAL_OUTPUT").equals(errorOutput)){
%>
output_<%=cid%>.add(stringStderr_<%=cid%>.toString());
output_<%=cid%>.add(err_content_<%=cid%>);
stringStderr_<%=cid%>.delete(0, stringStderr_<%=cid%>.length());
<%
}