[ https://issues.apache.org/jira/browse/PIG-754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696263#action_12696263 ]
Viraj Bhat edited comment on PIG-754 at 4/6/09 2:39 PM: -------------------------------------------------------- Ciemo there is a workaround in this form, if we make a param_file known as testparamfile which contains the param infile, it works. param_file option passes through a different code path which avoids problems which the -param faces. {code} testmachine~/pigscripts >cat testparamfile infile = 'file.right' pig -exectype local -param_file testparamfile infile.pig (RIGHT!!!!) (This is file.right..) {code} I suspect that this issues is somewhat related to the following Jira, maybe "." dot should be included as a problematic special character. http://issues.apache.org/jira/browse/PIG-564 was (Author: viraj): Ciemo there is a workaround in this form, if we make a param_file known as testparamfile which contains the param infile, it works. param_file option passes through a different code path which avoids problems which the -param faces. {code} testmachine~/pigscripts >cat testparamfile infile = 'file.right' pig -exectype local -param_file testparamfile infile.pig {code} I suspect that this issues is somewhat related to the following Jira, maybe "." dot should be included as a problematic special character. http://issues.apache.org/jira/browse/PIG-564 > Bugs with load and store and filenames passed with -param containing periods > ---------------------------------------------------------------------------- > > Key: PIG-754 > URL: https://issues.apache.org/jira/browse/PIG-754 > Project: Pig > Issue Type: Bug > Reporter: David Ciemiewicz > > This one drove me batty. > I have two files file and file.right. > file: > {code} > WRONG!!!! > This is file, not file.right. > {code} > file.right: > {code} > RIGHT!!!! > This is file.right.. > {code} > infile.pig: > {code} > A = load '$infile' using PigStorage(); > dump A; > {code} > When I pass in file.right as the infile parameter value, the wrong file is > read: > {code} > -bash-3.00$ pig -exectype local -param infile=file.right infile.pig > USING: /grid/0/gs/pig/current > 2009-04-05 23:18:36,291 [main] INFO > org.apache.pig.backend.local.executionengine.LocalPigLauncher - 100% complete! > 2009-04-05 23:18:36,292 [main] INFO > org.apache.pig.backend.local.executionengine.LocalPigLauncher - Success!! > (WRONG!!!! ) > (This is file, not file.right.) > {code} > However, if I pass in infile as ./file.right, the script magically works. > {code} > -bash-3.00$ pig -exectype local -param infile=./file.right infile.pig > USING: /grid/0/gs/pig/current > 2009-04-05 23:20:46,735 [main] INFO > org.apache.pig.backend.local.executionengine.LocalPigLauncher - 100% complete! > 2009-04-05 23:20:46,736 [main] INFO > org.apache.pig.backend.local.executionengine.LocalPigLauncher - Success!! > (RIGHT!!!!) > (This is file.right.) > {code} > I do not have this problem if I use the file name with a period in the script > itself: > infile2.pig > {code} > A = load 'file.right' using PigStorage(); > dump A; > {code} > {code} > -bash-3.00$ pig -exectype local infile2.pig > USING: /grid/0/gs/pig/current > 2009-04-05 23:22:47,022 [main] INFO > org.apache.pig.backend.local.executionengine.LocalPigLauncher - 100% complete! > 2009-04-05 23:22:47,023 [main] INFO > org.apache.pig.backend.local.executionengine.LocalPigLauncher - Success!! > (RIGHT!!!!) > (This is file.right.) > {code} > I also experience similar problems when I try to pass in param outfile in a > store statement. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.