drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-4504) Create an event loop for each of [user, control, data] RPC components
Date Mon, 14 Mar 2016 21:50:33 GMT

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

ASF GitHub Bot commented on DRILL-4504:
---------------------------------------

Github user jacques-n commented on a diff in the pull request:

    https://github.com/apache/drill/pull/429#discussion_r56082440
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/client/DrillClient.java ---
    @@ -74,73 +74,148 @@
     /**
      * Thin wrapper around a UserClient that handles connect/close and transforms
      * String into ByteBuf.
    + *
    + * Use the builder class ({@link DrillClient.Builder}) to build objects of this class.
    + * E.g.
    + * <code>
    + *   DrillClient client = DrillClient.newBuilder()
    + *       .setConfig(...)
    + *       .setIsDirectConnection(true)
    + *       .build();
    + * </code>
      */
     public class DrillClient implements Closeable, ConnectionThrottle {
       private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(DrillClient.class);
     
       private final DrillConfig config;
    -  private UserClient client;
    -  private UserProperties props = null;
    -  private volatile ClusterCoordinator clusterCoordinator;
    -  private volatile boolean connected = false;
       private final BufferAllocator allocator;
    -  private int reconnectTimes;
    -  private int reconnectDelay;
    -  private boolean supportComplexTypes;
    -  private final boolean ownsZkConnection;
    +  private final boolean isDirectConnection;
    +  private final int reconnectTimes;
    +  private final int reconnectDelay;
    +
    +  // checks if this client owns these resources (used when closing)
       private final boolean ownsAllocator;
    -  private final boolean isDirectConnection; // true if the connection bypasses zookeeper
and connects directly to a drillbit
    +  private final boolean ownsZkConnection;
    +  private final boolean ownsEventLoopGroup;
    +  private final boolean ownsExecutor;
    +
    +  // if the following variables are set during construction, they are not overridden
during or after #connect call
    +  // otherwise, they are set to defaults during #connect call
       private EventLoopGroup eventLoopGroup;
       private ExecutorService executor;
    +  private boolean supportComplexTypes;
    +
    +  // the following variables are set during connection, and must not be overridden later
    +  private UserClient client;
    +  private UserProperties props;
    +  private volatile ClusterCoordinator clusterCoordinator;
    --- End diff --
    
    The query interface is expected to be threadsafe. Connect and close are not.


> Create an event loop for each of [user, control, data] RPC components
> ---------------------------------------------------------------------
>
>                 Key: DRILL-4504
>                 URL: https://issues.apache.org/jira/browse/DRILL-4504
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Execution - RPC
>            Reporter: Sudheesh Katkam
>            Assignee: Sudheesh Katkam
>
> + Create an event loop group for each client-server pair (data, client and user)
> + Allow DrillClient constructor to specify an event loop group (so user event loop can
be used for queries from Web API calls). Deprecate old DrillClient constructors and create
a helper class to build instances.
> Miscellaneous:
> + Move WorkEventBus from exec/rpc/control to exec/work



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

Mime
View raw message