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

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

[~jamestaylor] 

The unit tests in AsyncIndexIT.java tests two scenario's
a) with {code}phoenix.async.index.automatic.build=true{code} to enable index 
rebuilding 
b) with {code}phoenix.async.index.automatic.build=false{code} to disable index 
rebuilding
For the above tests, there is need for coprocessor to be reloaded with latest 
config

{quote}Override the default to true in QueryServicesTestImpl{quote}
Sure will do. This is not required for the AsyncIndexIT.java, but will be 
required in general for all the other tests.

{quote}
AsyncImmutableIndexIT and AsyncIndexIT, derive them from 
BaseHBaseManagedTimeIT, remove the setup and tearDown code and all DROP 
commands - tests do not need to explicitly drop tables. Just keep a test that 
validates that an ASYNC index is populated as expected. There should be no 
special setup required.
{quote}
This change can be done for AsyncImmutableIndexIT where the unit test setup is 
based on empty props. Will do the changes.
However, for AsyncIndexIT, deriving from BaseHBaseManagedTimeIT will not be of 
great help. As we would need to run one unit test with empty props of sever 
config and the other test with some other config for server. Also, reloading of 
server config needs restart of the mini cluster (as of today). Hence we would 
need our own setup methods and NeedsOwnMiniClusterTest..
 


> Automatic build of async index will happen even if mapreduce.framework.name 
> is not set in any configuration
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-3113
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3113
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Ankit Singhal
>            Assignee: Loknath Priyatham Teja Singamsetty 
>            Priority: Blocker
>             Fix For: 4.8.0
>
>         Attachments: phoenix-3113.patch
>
>
> As per below code, we are starting automatic build of async index even if 
> mapreduce.framework.name is not set in any of the configuration(because 
> conf.get(QueryServices.MAPRED_FRAMEWORK_NAME) will always return LOCAL as a 
> default value).
> This may cause problem in the hbase cluster where mapreduce is not deployed 
> or this configuration is not set or included in the classpath. 
> {code}
> String hbaseClusterDistributedMode = 
> conf.get(QueryServices.HBASE_CLUSTER_DISTRIBUTED_ATTRIB);
>         String mapredFrameworkName = 
> conf.get(QueryServices.MAPRED_FRAMEWORK_NAME);
> if ((hbaseClusterDistributedMode != null && 
> !hbaseClusterDistributedMode.equals(HBASE_CLUSTER_DISTRIBUTED_CONFIG)) || 
>             (mapredFrameworkName != null && 
> !mapredFrameworkName.equals(MAPRED_FRAMEWORK_YARN_CONFIG)))
>         {
>             LOG.info("Enabling Async Index rebuilder");
>             AsyncIndexRebuilderTask asyncIndexRebuilderTask = new 
> AsyncIndexRebuilderTask(e.getEnvironment());
>             // run async index rebuilder task every 10 secs to rebuild any 
> newly created async indexes
>             executor.scheduleAtFixedRate(asyncIndexRebuilderTask, 10000, 
> rebuildIndexTimeInterval, TimeUnit.MILLISECONDS);
>         }
> {code}



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

Reply via email to