pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "liyunzhang_intel (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PIG-4361) Fix perl script problem in TestStreaming.java
Date Mon, 29 Dec 2014 01:38:13 GMT

    [ https://issues.apache.org/jira/browse/PIG-4361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14259783#comment-14259783
] 

liyunzhang_intel commented on PIG-4361:
---------------------------------------

patch available, can anyone help review it? Very thanks

> Fix perl script problem in TestStreaming.java
> ---------------------------------------------
>
>                 Key: PIG-4361
>                 URL: https://issues.apache.org/jira/browse/PIG-4361
>             Project: Pig
>          Issue Type: Bug
>            Reporter: liyunzhang_intel
>            Assignee: liyunzhang_intel
>         Attachments: PIG-4361.patch
>
>
> TestStreaming.java  line 495
> {code}
>   // Perl script
> 	    String[] script =
> 	        new String[] {
> 	                      "#!/usr/bin/perl",
>                           "open(OUTFILE, \">\", $ARGV[0]) or die \"Can't open \".$ARGV[1].\"!:
$!\";",
>                           "open(OUTFILE2, \">\", $ARGV[1]) or die \"Can't open \".$ARGV[2].\"!:
$!\";",
>                           "while (<STDIN>) {",
>                           "  print OUTFILE \"$_\n\";",
>                           "  print STDERR \"STDERR: $_\n\";",
>                           "  print OUTFILE2 \"A,10\n\";",
>                           "}",
> 	                     };
> {code}
> this script has some problem when dealing with the input arguments. made some modifications:
> {code}
>   // Perl script
> 	    String[] script =
> 	        new String[] {
> 	                      "#!/usr/bin/perl",
>                           "open(OUTFILE, \">\", $ARGV[0]) or die \"Can't open \".$ARGV[0].\"!:
$!\";",
>                           "open(OUTFILE2, \">\", $ARGV[1]) or die \"Can't open \".$ARGV[1].\"!:
$!\";",
>                           "while (<STDIN>) {",
>                           "  print OUTFILE \"$_\n\";",
>                           "  print STDERR \"STDERR: $_\n\";",
>                           "  print OUTFILE2 \"A,10\n\";",
>                           "}",
> 	                     };
> {code}
> The same problem happens in line 554.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message