You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2016/07/26 15:05:20 UTC
[jira] [Resolved] (PHOENIX-3119) Setup of mini cluster after tear
down still applies older cluster configs in BaseTest.java
[ 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)