vishnu gajendran created PIG-4546:
-------------------------------------

             Summary: PIG_OPTS doesn't support argument with spaces (enclosed 
within quotes)
                 Key: PIG-4546
                 URL: https://issues.apache.org/jira/browse/PIG-4546
             Project: Pig
          Issue Type: Bug
          Components: tools
    Affects Versions: 0.12.0
            Reporter: vishnu gajendran
            Priority: Minor


I am trying to pass PIG_OPTS="-XX:OnOutOfMemoryError=\"kill -9 %p\"" argument 
to pig-script. I am getting the following error:

Unrecognized option: -9
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Using set -x in hadoop script, I found that PIG_OPTS argument passed to 
pig-script (which calls the hadoop script) is not passed in correctly (see 
below on how kill command is split on spaces):

/usr/java/latest/bin/java -Xmx1000m '-XX:OnOutOfMemoryError="kill' -9 '%p"' 
-Dpig.log.dir=/home/hadoop/pig/logs -Dpig.log.file=pig.log 
-Dpig.home.dir=/home/hadoop/pig -server -Dhadoop.log.dir=/home/hadoop/logs 
-Dhadoop.log.file=hadoop.log -Dhadoop.home.dir=/home/hadoop -Dhadoop.id.str= 
-Dhadoop.root.logger=INFO,console -Djava.library.path=/home/hadoop/lib/native 
-Dhadoop.policy.file=hadoop-policy.xml -Djava.net.preferIPv4Stack=true 
-XX:MaxPermSize=128m -Dhadoop.security.logger=INFO,NullAppender 
-Dsun.net.inetaddr.ttl=30 org.apache.hadoop.util.RunJar 
/home/hadoop/pig/pig-0.12.0-withouthadoop.jar



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

Reply via email to