You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2018/05/01 20:11:00 UTC

[GitHub] keith-turner commented on a change in pull request #455: Fixes #414 - Create Connector for new user from existing

keith-turner commented on a change in pull request #455: Fixes #414 - Create Connector for new user from existing
URL: https://github.com/apache/accumulo/pull/455#discussion_r185320821
 
 

 ##########
 File path: core/src/main/java/org/apache/accumulo/core/client/Connector.java
 ##########
 @@ -313,6 +313,23 @@ public abstract ConditionalWriter createConditionalWriter(String tableName,
    */
   public abstract ReplicationOperations replicationOperations();
 
+  /**
+   * @return {@link ConnectionInfo} which contains information about Connection to Accumulo
+   * @since 2.0.0
+   */
+  public abstract ConnectionInfo info();
+
+  /**
+   * Creates new Connector for new user with principal and token
+   *
+   * @param principal User name/principal
+   * @param token Authentication token
+   *
+   * @return Connector for new user
+   * @since 2.0.0
+   */
+  public abstract Connector createConnector(String principal, AuthenticationToken token) throws AccumuloSecurityException, AccumuloException;
 
 Review comment:
   Another possible way to accomplish this is via the builder.
   
   ```java
     Connector existing = ...
     Connector newC = Connector.builder().usingConnectionInfo(existing.info()).usingPassword(user,pass).build();
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services