mikewalch commented on issue #747: Shorten method names in AccumuloClient builder URL: https://github.com/apache/accumulo/issues/747#issuecomment-436060070 Below is my third proposal incorporating input from @keith-turner with some changes: * Combined `as` with `password`, `kerberos`, & `token` methods as they always used together. I don't think we'll need more `as` methods given that `as(principal, Authentication token)` is pretty future proof. ```java // current Accumulo.newClient().forInstance("myinstance", "zoo1,zoo2") .usingPassword("user", "password").build(); // proposed Accumulo.newClient().to("myinstance", "zoo1,zoo2").as("user", "password").build(); // current Accumulo.newClient().usingClientInfo(clientInfo) .usingToken("user, new PasswordToken("pass")).build(); // proposed Accumulo.newClient().from(clientInfo).as("user", new PasswordToken("pass")).build(); ``` | Current Method Name | Proposed Method Name | |--------------------------|-------------------------------| | forInstance(String name, String zk) | to(CharSequence instanceName, CharSequence zookeepers) | | usingProperties(String propsFilePath) | from(String propsFilePath) | | usingProperties(Properties properties) | from(Properties props) | | usingClientInfo(ClientInfo info) | from(ClientInfo info) | | usingPassword(String username, CharSequence password) | as(CharSequence user, CharSequence password) | | usingKerberos(String principal, String keytabFile) | as(CharSequence principal, Path kerberosKeytab) | | usingToken(String principal, AuthenticationToken token) | as(CharSequence principal, AuthenticationToken token) | | withTruststore | truststore | | withKeystore | keystore | | withJsse | jsse | | withPrimary | primary | | withQop | qop | | withSsl | ssl | | withSasl | sasl | | withBatchWriterConfig | batchWriterConfig | | withBatchScannerQueryThreads | batchScannerQueryThreads | | withScannerBatchSize | scannerBatchSize |
---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services