|
Raghu Angadi
2011-07-11, 21:09
Daniel Dai
2011-07-12, 04:30
Raghu Angadi
2011-07-12, 05:15
Daniel Dai
2011-07-12, 18:00
Raghu Angadi
2011-07-12, 20:33
Daniel Dai
2011-07-13, 00:39
Raghu Angadi
2011-07-13, 22:43
|
-
space in param values in command lineRaghu Angadi 2011-07-11, 21:09
I am not able to assign a value with spaces to param on command line.
$ pig -p cond='x == 1' test.pig results in command line parser error. other attempts like 'pig -p cond='"x == 1"' test.pig' didn't help. Is there a work around? otherwise I will file a jira and look into a fix. thanks, Raghu.
-
Re: space in param values in command lineDaniel Dai 2011-07-12, 04:30
It's not the space, it is the '=' character which is not allowed. Use \ to
do the escape, cond="x \=\= 1". Daniel On Mon, Jul 11, 2011 at 2:09 PM, Raghu Angadi <[EMAIL PROTECTED]> wrote: > I am not able to assign a value with spaces to param on command line. > $ pig -p cond='x == 1' test.pig > results in command line parser error. > other attempts like 'pig -p cond='"x == 1"' test.pig' didn't help. > > Is there a work around? > otherwise I will file a jira and look into a fix. > > thanks, > Raghu. >
-
Re: space in param values in command lineRaghu Angadi 2011-07-12, 05:15
On Mon, Jul 11, 2011 at 9:30 PM, Daniel Dai <[EMAIL PROTECTED]> wrote:
> It's not the space, it is the '=' character which is not allowed. Use \ to > do the escape, cond="x \=\= 1". This helps.. I was wondering why my test didn't work even when there were no spaces. The space is still a problem. When there is a space it still causes "2011-07-12 05:10:48,496 [main] ERROR org.apache.pig.Main - ERROR 2999: Unexpected internal error. Encountered unexpected arguments on command line - please check the command line." to summarize : "x == 1" : does not work "x==1" : doesn't "x\=\=1" : does "x \=\= 1" : doesn't Raghu. > Daniel > > On Mon, Jul 11, 2011 at 2:09 PM, Raghu Angadi <[EMAIL PROTECTED]> wrote: > > > I am not able to assign a value with spaces to param on command line. > > $ pig -p cond='x == 1' test.pig > > results in command line parser error. > > other attempts like 'pig -p cond='"x == 1"' test.pig' didn't help. > > > > Is there a work around? > > otherwise I will file a jira and look into a fix. > > > > thanks, > > Raghu. > > >
-
Re: space in param values in command lineDaniel Dai 2011-07-12, 18:00
Seems space works for me. You can use -r to dry-run the parameter
substitution part to see what it results. Daniel On Mon, Jul 11, 2011 at 10:15 PM, Raghu Angadi <[EMAIL PROTECTED]> wrote: > On Mon, Jul 11, 2011 at 9:30 PM, Daniel Dai <[EMAIL PROTECTED]> wrote: > > > It's not the space, it is the '=' character which is not allowed. Use \ > to > > do the escape, cond="x \=\= 1". > > > This helps.. I was wondering why my test didn't work even when there were > no spaces. > > The space is still a problem. When there is a space it still causes > "2011-07-12 05:10:48,496 [main] ERROR org.apache.pig.Main - ERROR 2999: > Unexpected internal error. Encountered unexpected arguments on command line > - please check the command line." > > to summarize : > "x == 1" : does not work > "x==1" : doesn't > "x\=\=1" : does > "x \=\= 1" : doesn't > > Raghu. > > > Daniel > > > > On Mon, Jul 11, 2011 at 2:09 PM, Raghu Angadi <[EMAIL PROTECTED]> > wrote: > > > > > I am not able to assign a value with spaces to param on command line. > > > $ pig -p cond='x == 1' test.pig > > > results in command line parser error. > > > other attempts like 'pig -p cond='"x == 1"' test.pig' didn't help. > > > > > > Is there a work around? > > > otherwise I will file a jira and look into a fix. > > > > > > thanks, > > > Raghu. > > > > > >
-
Re: space in param values in command lineRaghu Angadi 2011-07-12, 20:33
are you using bin/pig? With bin/pig, it does not even go to substitution
stage. bin/pig joins all the arguments into one bash string. If I explicitly invoke pig java command (as printed with -secredDebugCmd) with the arguments it works. Btw, spaces before '=' also need to be escaped looks like. Raghu. On Tue, Jul 12, 2011 at 11:00 AM, Daniel Dai <[EMAIL PROTECTED]> wrote: > Seems space works for me. You can use -r to dry-run the parameter > substitution part to see what it results. > > Daniel > > On Mon, Jul 11, 2011 at 10:15 PM, Raghu Angadi <[EMAIL PROTECTED]> wrote: > > > On Mon, Jul 11, 2011 at 9:30 PM, Daniel Dai <[EMAIL PROTECTED]> > wrote: > > > > > It's not the space, it is the '=' character which is not allowed. Use \ > > to > > > do the escape, cond="x \=\= 1". > > > > > > This helps.. I was wondering why my test didn't work even when there > were > > no spaces. > > > > The space is still a problem. When there is a space it still causes > > "2011-07-12 05:10:48,496 [main] ERROR org.apache.pig.Main - ERROR 2999: > > Unexpected internal error. Encountered unexpected arguments on command > line > > - please check the command line." > > > > to summarize : > > "x == 1" : does not work > > "x==1" : doesn't > > "x\=\=1" : does > > "x \=\= 1" : doesn't > > > > Raghu. > > > > > Daniel > > > > > > On Mon, Jul 11, 2011 at 2:09 PM, Raghu Angadi <[EMAIL PROTECTED]> > > wrote: > > > > > > > I am not able to assign a value with spaces to param on command line. > > > > $ pig -p cond='x == 1' test.pig > > > > results in command line parser error. > > > > other attempts like 'pig -p cond='"x == 1"' test.pig' didn't help. > > > > > > > > Is there a work around? > > > > otherwise I will file a jira and look into a fix. > > > > > > > > thanks, > > > > Raghu. > > > > > > > > > >
-
Re: space in param values in command lineDaniel Dai 2011-07-13, 00:39
I am not using bin/pig, I am using pig.jar directly. Yes, I saw space before
'=' is strip out, feel free to open a Jira ticket. Daniel On Tue, Jul 12, 2011 at 1:33 PM, Raghu Angadi <[EMAIL PROTECTED]> wrote: > are you using bin/pig? With bin/pig, it does not even go to substitution > stage. bin/pig joins all the arguments into one bash string. > > If I explicitly invoke pig java command (as printed with -secredDebugCmd) > with the arguments it works. Btw, spaces before '=' also need to be escaped > looks like. > > Raghu. > > On Tue, Jul 12, 2011 at 11:00 AM, Daniel Dai <[EMAIL PROTECTED]> > wrote: > > > Seems space works for me. You can use -r to dry-run the parameter > > substitution part to see what it results. > > > > Daniel > > > > On Mon, Jul 11, 2011 at 10:15 PM, Raghu Angadi <[EMAIL PROTECTED]> wrote: > > > > > On Mon, Jul 11, 2011 at 9:30 PM, Daniel Dai <[EMAIL PROTECTED]> > > wrote: > > > > > > > It's not the space, it is the '=' character which is not allowed. Use > \ > > > to > > > > do the escape, cond="x \=\= 1". > > > > > > > > > This helps.. I was wondering why my test didn't work even when there > > were > > > no spaces. > > > > > > The space is still a problem. When there is a space it still causes > > > "2011-07-12 05:10:48,496 [main] ERROR org.apache.pig.Main - ERROR 2999: > > > Unexpected internal error. Encountered unexpected arguments on command > > line > > > - please check the command line." > > > > > > to summarize : > > > "x == 1" : does not work > > > "x==1" : doesn't > > > "x\=\=1" : does > > > "x \=\= 1" : doesn't > > > > > > Raghu. > > > > > > > Daniel > > > > > > > > On Mon, Jul 11, 2011 at 2:09 PM, Raghu Angadi <[EMAIL PROTECTED]> > > > wrote: > > > > > > > > > I am not able to assign a value with spaces to param on command > line. > > > > > $ pig -p cond='x == 1' test.pig > > > > > results in command line parser error. > > > > > other attempts like 'pig -p cond='"x == 1"' test.pig' didn't help. > > > > > > > > > > Is there a work around? > > > > > otherwise I will file a jira and look into a fix. > > > > > > > > > > thanks, > > > > > Raghu. > > > > > > > > > > > > > > >
-
Re: space in param values in command lineRaghu Angadi 2011-07-13, 22:43
https://issues.apache.org/jira/browse/PIG-2162
attached patch for bin/pig. didn't fix Pig parser. Currently parsers for %default and -p seem different. Raghu. On Tue, Jul 12, 2011 at 5:39 PM, Daniel Dai <[EMAIL PROTECTED]> wrote: > I am not using bin/pig, I am using pig.jar directly. Yes, I saw space > before > '=' is strip out, feel free to open a Jira ticket. > > Daniel > > On Tue, Jul 12, 2011 at 1:33 PM, Raghu Angadi <[EMAIL PROTECTED]> wrote: > > > are you using bin/pig? With bin/pig, it does not even go to substitution > > stage. bin/pig joins all the arguments into one bash string. > > > > If I explicitly invoke pig java command (as printed with -secredDebugCmd) > > with the arguments it works. Btw, spaces before '=' also need to be > escaped > > looks like. > > > > Raghu. > > > > On Tue, Jul 12, 2011 at 11:00 AM, Daniel Dai <[EMAIL PROTECTED]> > > wrote: > > > > > Seems space works for me. You can use -r to dry-run the parameter > > > substitution part to see what it results. > > > > > > Daniel > > > > > > On Mon, Jul 11, 2011 at 10:15 PM, Raghu Angadi <[EMAIL PROTECTED]> > wrote: > > > > > > > On Mon, Jul 11, 2011 at 9:30 PM, Daniel Dai <[EMAIL PROTECTED]> > > > wrote: > > > > > > > > > It's not the space, it is the '=' character which is not allowed. > Use > > \ > > > > to > > > > > do the escape, cond="x \=\= 1". > > > > > > > > > > > > This helps.. I was wondering why my test didn't work even when there > > > were > > > > no spaces. > > > > > > > > The space is still a problem. When there is a space it still causes > > > > "2011-07-12 05:10:48,496 [main] ERROR org.apache.pig.Main - ERROR > 2999: > > > > Unexpected internal error. Encountered unexpected arguments on > command > > > line > > > > - please check the command line." > > > > > > > > to summarize : > > > > "x == 1" : does not work > > > > "x==1" : doesn't > > > > "x\=\=1" : does > > > > "x \=\= 1" : doesn't > > > > > > > > Raghu. > > > > > > > > > Daniel > > > > > > > > > > On Mon, Jul 11, 2011 at 2:09 PM, Raghu Angadi <[EMAIL PROTECTED]> > > > > wrote: > > > > > > > > > > > I am not able to assign a value with spaces to param on command > > line. > > > > > > $ pig -p cond='x == 1' test.pig > > > > > > results in command line parser error. > > > > > > other attempts like 'pig -p cond='"x == 1"' test.pig' didn't > help. > > > > > > > > > > > > Is there a work around? > > > > > > otherwise I will file a jira and look into a fix. > > > > > > > > > > > > thanks, > > > > > > Raghu. > > > > > > > > > > > > > > > > > > > > > |