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:18:00 UTC

[jira] [Created] (YARN-11348) Depricated property can not be unset

Bence Kosztolnik created YARN-11348:
---------------------------------------

             Summary: Depricated 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


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