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

Adam Szita commented on PIG-4934:
---------------------------------

That'd be a good idea, but we can't expect that only non-deprecated properties 
are set at the time when SET command comes in.
For example:
-we specify something using the old key: _mapred.job.map.memory.mb_=1 in a 
config xml
-then we'll have _mapred.job.map.memory.mb_=1 and *mapreduce.map.memory.mb*=1 
at startup already.
-if a user now uses the current name and gives: SET *mapreduce.map.memory.mb* 
2, we would only be setting the new name and leave the old one 
(_mapred.job.map.memory.mb_=1) 
... so I don't think we can use the isDeprecated() check unfortunately.

Anyhow I've uploaded a second revision including a test case: 
[^PIG-4934.2.patch]

> SET command does not work well with deprecated settings
> -------------------------------------------------------
>
>                 Key: PIG-4934
>                 URL: https://issues.apache.org/jira/browse/PIG-4934
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Rohini Palaniswamy
>            Assignee: Adam Szita
>         Attachments: PIG-4934.2.patch, PIG-4934.patch
>
>
> For eg: If mapred.job.map.memory.mb was specified in the script using set 
> command and mapreduce.map.memory.mb was present in mapred-site.xml, that 
> takes effect.  This is because of the use of Properties and not Configuration.
> GruntParser.processSet() calls HExecutionEngine.setProperty which just 
> updates pigContext.getProperties()
> {code}
> public void setProperty(String property, String value) {
>         Properties properties = pigContext.getProperties();
>         properties.put(property, value);
>     }
> {code}



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

Reply via email to