You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by kn...@apache.org on 2020/08/25 19:40:51 UTC
svn commit: r1881193 - in /pig/trunk: CHANGES.txt
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POReservoirSample.java
test/e2e/pig/tests/negative.conf
Author: knoguchi
Date: Tue Aug 25 19:40:51 2020
New Revision: 1881193
URL: http://svn.apache.org/viewvc?rev=1881193&view=rev
Log:
PIG-5403: streaming job stuck with script failure when combined with ORDER BY (knoguchi)
Modified:
pig/trunk/CHANGES.txt
pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POReservoirSample.java
pig/trunk/test/e2e/pig/tests/negative.conf
Modified: pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1881193&r1=1881192&r2=1881193&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Tue Aug 25 19:40:51 2020
@@ -100,6 +100,8 @@ OPTIMIZATIONS
BUG FIXES
+PIG-5403: streaming job stuck with script failure when combined with ORDER BY (knoguchi)
+
PIG-5362: Parameter substitution of shell cmd results doesn't handle backslash addendum (szita)
PIG-5395: Pig build is failing due to maven repo access point change (szita)
Modified: pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POReservoirSample.java
URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POReservoirSample.java?rev=1881193&r1=1881192&r2=1881193&view=diff
==============================================================================
--- pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POReservoirSample.java (original)
+++ pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POReservoirSample.java Tue Aug 25 19:40:51 2020
@@ -103,7 +103,9 @@ public class POReservoirSample extends P
Result res = null;
while (rowProcessed < numSamples) {
res = processInput();
- if (res.returnStatus == POStatus.STATUS_OK) {
+ if (res.returnStatus == POStatus.STATUS_ERR) {
+ return res;
+ } else if (res.returnStatus == POStatus.STATUS_OK) {
samples[(int)rowProcessed] = res;
rowProcessed++;
} else if (res.returnStatus == POStatus.STATUS_NULL) {
@@ -125,7 +127,9 @@ public class POReservoirSample extends P
while (true) {
// pick this as sample
res = processInput();
- if (res.returnStatus == POStatus.STATUS_NULL) {
+ if (res.returnStatus == POStatus.STATUS_ERR) {
+ return res;
+ } else if (res.returnStatus == POStatus.STATUS_NULL) {
continue;
} else if (res.returnStatus != POStatus.STATUS_OK) {
break;
Modified: pig/trunk/test/e2e/pig/tests/negative.conf
URL: http://svn.apache.org/viewvc/pig/trunk/test/e2e/pig/tests/negative.conf?rev=1881193&r1=1881192&r2=1881193&view=diff
==============================================================================
--- pig/trunk/test/e2e/pig/tests/negative.conf (original)
+++ pig/trunk/test/e2e/pig/tests/negative.conf Tue Aug 25 19:40:51 2020
@@ -457,7 +457,7 @@ B = stream A through CMD;
store B into ':OUTPATH:';\,
'expected_err_regex' => "failed with exit status: 2",
},
- {
+ {
'num' => 5,
'execonly' => 'mapred,tez',
'pig' => q\
@@ -470,6 +470,17 @@ store B into ':OUTPATH:.1';
store C into ':OUTPATH:.2';\,
'expected_err_regex' => "failed with exit status: 1|Error while reading from POStream and passing it to the streaming",
},
+ {
+ 'num' => 6,
+ 'execonly' => 'mapred,tez',
+ 'pig' => q\
+define BADCMD `perl PigStreamingBad.pl middle` ship(':SCRIPTHOMEPATH:/PigStreamingBad.pl');
+A = load ':INPATH:/singlefile/studenttab10k';
+B = stream A through BADCMD;
+C = ORDER B by *;
+store C into ':OUTPATH:.1';\,
+ 'expected_err_regex' => "failed with exit status: 2|Error while reading from POStream and passing it to the streaming",
+ },
]
},