phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Taylor (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (PHOENIX-3119) Setup of mini cluster after tear down still applies older cluster configs in BaseTest.java
Date Tue, 26 Jul 2016 15:05:20 GMT

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

James Taylor resolved PHOENIX-3119.
-----------------------------------
    Resolution: Invalid

This appears to be more of a question. The config values are not allowed to be changed for
the same unit test, but you can always create a new one to run with different property values.

> Setup of mini cluster after tear down still applies older cluster configs in BaseTest.java
> ------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-3119
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3119
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Loknath Priyatham Teja Singamsetty 
>            Assignee: Loknath Priyatham Teja Singamsetty 
>
> Problem:
> ------------
>  Setup of mini cluster after tear down still applies older cluster configs in BaseTest.java
> Root Cause:
> ---------------
> In BaseTest.java, we have static final instance of Configuration object initialised:
> protected static final Configuration config = HBaseConfiguration.create(); 
> The contents of this final instance of Configuration object is being modified dynamically
inside setUpConfigForMiniCluster() -> setDefaultTestConfig(conf, overrideProps),
>     private static void setDefaultTestConfig(Configuration conf, ReadOnlyProps overrideProps)
{
>         ConfigUtil.setReplicationConfigIfAbsent(conf);
>         QueryServices services = new PhoenixTestDriver().getQueryServices();
>         for (Entry<String,String> entry : services.getProps()) {
>             conf.set(entry.getKey(), entry.getValue());
>         }
>         //no point doing sanity checks when running tests.
>         conf.setBoolean("hbase.table.sanity.checks", false);
>         // set the server rpc controller and rpc scheduler factory, used to configure
the cluster
>         conf.set(RpcControllerFactory.CUSTOM_CONTROLLER_CONF_KEY, DEFAULT_SERVER_RPC_CONTROLLER_FACTORY);
>         conf.set(RSRpcServices.REGION_SERVER_RPC_SCHEDULER_FACTORY_CLASS, DEFAULT_RPC_SCHEDULER_FACTORY);
>         
>         // override any defaults based on overrideProps
>         for (Entry<String,String> entry : overrideProps) {
>             conf.set(entry.getKey(), entry.getValue());
>         }
>     }
> Solution:
> ------------
> When the static final instance needs to be modified, its better to work on clone instance
of Configuration object.



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

Mime
View raw message