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 2015/02/19 01:40:13 UTC

[jira] [Comment Edited] (PHOENIX-971) Query server

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

James Taylor edited comment on PHOENIX-971 at 2/19/15 12:39 AM:
----------------------------------------------------------------

Another idea: we don't really want/need our RPCs to even spin up another thread, as we've already got the thread for the work out of our one thread pool. What if we changed the code above to just run the RPC in the current thread to prevent additional context switches:
{code}
    return HBaseFactoryProvider.getHTableFactory().getTable(tableName, connection     
                    getDirectExecutor())
{code}
where we instantiate a Guava direct executor service in BaseQueryServicesImpl like this:
{code}
public abstract class BaseQueryServicesImpl implements QueryServices {
    private final ThreadPoolExecutor executor;
    private final MemoryManager memoryManager;
    private final ReadOnlyProps props;
    private final QueryOptimizer queryOptimizer;
    private final ExecutorService directExecutor =  MoreExecutors.newDirectExecutorService();

    public ExecutorService getDirectExecutor() {
        return directExecutor;
    }
}
{code}

    



was (Author: jamestaylor):
Another idea: we don't really want/need our RPCs to even spin up another thread, as we've already got the thread for the work out of our one thread pool. What if we changed the code above to just run the RPC in the current thread to prevent additional context switches:
{code}
    return HBaseFactoryProvider.getHTableFactory().getTable(tableName, connection     
                    getDirectExecutorService())
{code}
where we instantiate a Guava direct executor service in BaseQueryServicesImpl like this:
{code}
public abstract class BaseQueryServicesImpl implements QueryServices {
    private final ThreadPoolExecutor executor;
    private final MemoryManager memoryManager;
    private final ReadOnlyProps props;
    private final QueryOptimizer queryOptimizer;
    private final ExecutorService directExecutor =  MoreExecutors.newDirectExecutorService();

    public ExecutorService getDirectExecutor() {
        return directExecutor;
    }
}
{code}

    


> Query server
> ------------
>
>                 Key: PHOENIX-971
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-971
>             Project: Phoenix
>          Issue Type: New Feature
>            Reporter: Andrew Purtell
>            Assignee: Nick Dimiduk
>             Fix For: 5.0.0
>
>
> Host the JDBC driver in a query server process that can be deployed as a middle tier between lighter weight clients and Phoenix+HBase. This would serve a similar optional role in Phoenix deployments as the [HiveServer2|https://cwiki.apache.org/confluence/display/Hive/Setting+Up+HiveServer2] does in Hive deploys.



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