You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Bence Kosztolnik (Jira)" <ji...@apache.org> on 2022/10/13 14:19:00 UTC

[jira] [Updated] (YARN-11348) Deprecated property can not be unset

     [ https://issues.apache.org/jira/browse/YARN-11348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bence Kosztolnik updated YARN-11348:
------------------------------------
    Description: 
If you try to unset a deprecated property in an
{code:java}
CapacitySchedulerConfiguration{code}
object the value wont be removed.

Example failing Test for the *TestCapacitySchedulerConfiguration* class
{noformat}
@Test
public void testDeprecationFeatureWorks() {
  final String value = "VALUE";
  final String goodName = "koko";
  final String depName = "dfs.nfs.exports.allowed.hosts";
  final CapacitySchedulerConfiguration csConf = createDefaultCsConf();

  csConf.set(goodName, value);
  csConf.unset(goodName);
  assertNull(csConf.get(goodName));

  csConf.set(depName, value);
  csConf.unset(depName);
  assertNull(csConf.get(depName));  // fails here
}{noformat}

  was:
If you try to unset a deprecated property in an
{code:java}
CapacitySchedulerConfiguration{code}
object the value wont be removed.

Example failing Test for the TestCapacitySchedulerConfiguration class


{noformat}
@Test
public void testDeprecationFeatureWorks() {
  final String value = "VALUE";
  final String goodName = "koko";
  final String depName = "dfs.nfs.exports.allowed.hosts";
  final CapacitySchedulerConfiguration csConf = createDefaultCsConf();

  csConf.set(goodName, value);
  csConf.unset(goodName);
  assertNull(csConf.get(goodName));

  csConf.set(depName, value);
  csConf.unset(depName);
  assertNull(csConf.get(depName));  // fails here
}{noformat}


> Deprecated property can not be unset
> ------------------------------------
>
>                 Key: YARN-11348
>                 URL: https://issues.apache.org/jira/browse/YARN-11348
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Bence Kosztolnik
>            Priority: Major
>
> If you try to unset a deprecated property in an
> {code:java}
> CapacitySchedulerConfiguration{code}
> object the value wont be removed.
> Example failing Test for the *TestCapacitySchedulerConfiguration* class
> {noformat}
> @Test
> public void testDeprecationFeatureWorks() {
>   final String value = "VALUE";
>   final String goodName = "koko";
>   final String depName = "dfs.nfs.exports.allowed.hosts";
>   final CapacitySchedulerConfiguration csConf = createDefaultCsConf();
>   csConf.set(goodName, value);
>   csConf.unset(goodName);
>   assertNull(csConf.get(goodName));
>   csConf.set(depName, value);
>   csConf.unset(depName);
>   assertNull(csConf.get(depName));  // fails here
> }{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org