drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paul-rogers <...@git.apache.org>
Subject [GitHub] drill pull request #565: DRILL-4841: Use server event loop for web clients
Date Thu, 06 Oct 2016 22:08:11 GMT
Github user paul-rogers commented on a diff in the pull request:

    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/auth/AbstractDrillLoginService.java
    @@ -46,8 +46,11 @@ protected DrillClient createDrillClient(final String userName, final
String pass
         try {
           // Create a DrillClient
    -      drillClient = new DrillClient(drillbitContext.getConfig(),
    -          drillbitContext.getClusterCoordinator(), drillbitContext.getAllocator());
    +      drillClient = DrillClient.newBuilder()
    +          .setConfig(drillbitContext.getConfig())
    +          .setClusterCoordinator(drillbitContext.getClusterCoordinator())
    +          .setAllocator(drillbitContext.getAllocator())
    +          .build();
    --- End diff --
    Should the builder be extended to also (optionally) do connect? Or, return a connect builder?
    Here I'm thinking that it would be helpful to have a single builder gather things like
the user name property and the connection string (which would seem to be a DrillClient parameter
but is actually a connection property.)
    That is, either:
        DrillClient.builder( ) ...
           .withUser( userName )
           .connectTo( "myHost", 1234 )
          .build( );
        DrillClient.builder( ) ...
           .buildClient( )
           .withUser( userName )
           .connectTo( "myHost", 1234 )
           .connect( );

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message