[
https://issues.apache.org/jira/browse/PIG-682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12676810#action_12676810
]
Pradeep Kamath commented on PIG-682:
------------------------------------
As noted in
https://issues.apache.org/jira/browse/PIG-591?focusedCommentId=12676808#action_12676808
a part of this patch has already been committed as part of
https://issues.apache.org/jira/browse/PIG-591. The portion which has already
been committed is in HExecutionEngine.java:
{code}
@@ -200,7 +200,7 @@
}
catch (IOException e) {
int errCode = 6009;
- String msg = "Failed to create job client";
+ String msg = "Failed to create job client:" + e.getMessage();
throw new ExecException(msg, errCode, PigException.BUG, e);
}
}
@@ -549,11 +549,20 @@
//this should return as soon as connection is shutdown
int rc = p.waitFor();
if (rc != 0) {
- String errMsg = new String();
+ StringBuilder errMsg = new StringBuilder();
try {
- BufferedReader br = new BufferedReader(new
InputStreamReader(p.getErrorStream()));
- errMsg = br.readLine();
+ BufferedReader br = new BufferedReader(new
InputStreamReader(p.getInputStream()));
+ String line = null;
+ while((line = br.readLine()) != null) {
+ errMsg.append(line);
+ }
br.close();
+ br = new BufferedReader(new
InputStreamReader(p.getErrorStream()));
+ line = null;
+ while((line = br.readLine()) != null) {
+ errMsg.append(line);
+ }
+ br.close();
} catch (IOException ioe) {}
int errCode = 6011;
StringBuilder msg = new StringBuilder("Failed to run command
");
@@ -563,7 +572,7 @@
msg.append("; return code: ");
msg.append(rc);
msg.append("; error: ");
- msg.append(errMsg);
+ msg.append(errMsg.toString());
throw new ExecException(msg.toString(), errCode,
PigException.REMOTE_ENVIRONMENT);
}
} catch (Exception e){
{code}
When a new revision of this patch is generated to make the changes for the
previous review comment, the above portion of code changes can be omitted.
> Fix the ssh tunneling code
> --------------------------
>
> Key: PIG-682
> URL: https://issues.apache.org/jira/browse/PIG-682
> Project: Pig
> Issue Type: Bug
> Components: impl
> Reporter: Benjamin Reed
> Attachments: jsch-0.1.41.jar, PIG-682.patch
>
>
> Hadoop has changed a bit and the ssh-gateway code no longer works. pig needs
> to be updated to register with the new socket framework. reporting of
> problems also needs to be better.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.