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

Loknath Priyatham Teja Singamsetty  commented on PHOENIX-3119:
--------------------------------------------------------------

[~jamestaylor] 

The config values of  
{code} protected static final Configuration config = 
HBaseConfiguration.create(); {code}
are getting changed as part of setupTestCluster(..,overrideProps) in the 
BaseTest.java. 

Will discuss and share my observations in next discussion.

> 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)

Reply via email to