{"action":"created","issue":{"url":"https://api.github.com/repos/apache/accumulo/issues/747","repository_url":"https://api.github.com/repos/apache/accumulo","labels_url":"https://api.github.com/repos/apache/accumulo/issues/747/labels{/name}","comments_url":"https://api.github.com/repos/apache/accumulo/issues/747/comments","events_url":"https://api.github.com/repos/apache/accumulo/issues/747/events","html_url":"https://github.com/apache/accumulo/issues/747","id":377565263,"node_id":"MDU6SXNzdWUzNzc1NjUyNjM=","number":747,"title":"Shorten method names in AccumuloClient builder","user":{"login":"mikewalch","id":730698,"node_id":"MDQ6VXNlcjczMDY5OA==","avatar_url":"https://avatars0.githubusercontent.com/u/730698?v=4","gravatar_id":"","url":"https://api.github.com/users/mikewalch","html_url":"https://github.com/mikewalch","followers_url":"https://api.github.com/users/mikewalch/followers","following_url":"https://api.github.com/users/mikewalch/following{/other_user}","gists_url":"https://api.github.com/users/mikewalch/gists{/gist_id}","starred_url":"https://api.github.com/users/mikewalch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikewalch/subscriptions","organizations_url":"https://api.github.com/users/mikewalch/orgs","repos_url":"https://api.github.com/users/mikewalch/repos","events_url":"https://api.github.com/users/mikewalch/events{/privacy}","received_events_url":"https://api.github.com/users/mikewalch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-11-05T20:17:31Z","updated_at":"2018-11-05T22:07:12Z","closed_at":null,"author_association":"MEMBER","body":"[AccumuloClient](https://github.com/apache/accumulo/blob/master/core/src/main/java/org/apache/accumulo/core/client/AccumuloClient.java) has long method names for its builder that could be shortened before 2.0 is released.\r\n\r\nBelow are examples of this proposed shortening:\r\n\r\n```java\r\n// current\r\nAccumulo.newClient().forInstance(\"myinstance\", \"zookeeper1,zookeeper2\")\r\n      .usingPassword(\"myuser\", \"mypassword\").build();\r\n// proposed\r\nAccumulo.newClient().instance(\"myinstance\", \"zookeeper1,zookeeper2\")\r\n      .user(\"myuser\", \"mypassword\").build();\r\n\r\n\r\n\r\n// current\r\nAccumulo.newClient().usingClientInfo(clientInfo)\r\n     .usingToken(\"user, new PasswordToken(\"pass\")).build();\r\n// proposed\r\nAccumulo.newClient().from(clientInfo).user(\"user\", new PasswordToken(\"pass\")).build();\r\n```\r\n\r\nBelow is a chart of the proposed method names for the [AccumuloClient](https://github.com/apache/accumulo/blob/master/core/src/main/java/org/apache/accumulo/core/client/AccumuloClient.java) builder. Naming is subjective so I am open to no change or different names. Feel free to comment on this issue:\r\n\r\n| Current Method Name | Proposed Method Name |\r\n|--------------------------|-------------------------------|\r\n|  forInstance(String name, String zk) | instance(String name, String zk) |\r\n| usingProperties(String propsFilePath) | from(String propsFilePath) |\r\n| usingProperties(Properties properties) | from(Properties props) |\r\n| usingClientInfo(ClientInfo info) | from(ClientInfo info) |\r\n| usingPassword(String username, CharSequence password) | user(String username, CharSequence password) |\r\n| usingKerberos(String principal, String keytabFile) | kerberosUser(String principal, String keytabPath) |\r\n| usingToken(String principal, AuthenticationToken token) | user(String principal, AuthenticationToken token) |\r\n| withTruststore | truststore |\r\n| withKeystore | keystore |\r\n| withJsse | jsse |\r\n| withPrimary | primary |\r\n| withQop | qop |\r\n| withSsl | ssl |\r\n| withSasl | sasl |\r\n| withBatchWriterConfig | batchWriterConfig |\r\n| withBatchScannerQueryThreads | batchScannerQueryThreads |\r\n| withScannerBatchSize | scannerBatchSize |\r\n"},"comment":{"url":"https://api.github.com/repos/apache/accumulo/issues/comments/436053391","html_url":"https://github.com/apache/accumulo/issues/747#issuecomment-436053391","issue_url":"https://api.github.com/repos/apache/accumulo/issues/747","id":436053391,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNjA1MzM5MQ==","user":{"login":"keith-turner","id":1268739,"node_id":"MDQ6VXNlcjEyNjg3Mzk=","avatar_url":"https://avatars0.githubusercontent.com/u/1268739?v=4","gravatar_id":"","url":"https://api.github.com/users/keith-turner","html_url":"https://github.com/keith-turner","followers_url":"https://api.github.com/users/keith-turner/followers","following_url":"https://api.github.com/users/keith-turner/following{/other_user}","gists_url":"https://api.github.com/users/keith-turner/gists{/gist_id}","starred_url":"https://api.github.com/users/keith-turner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keith-turner/subscriptions","organizations_url":"https://api.github.com/users/keith-turner/orgs","repos_url":"https://api.github.com/users/keith-turner/repos","events_url":"https://api.github.com/users/keith-turner/events{/privacy}","received_events_url":"https://api.github.com/users/keith-turner/received_events","type":"User","site_admin":false},"created_at":"2018-11-05T22:07:12Z","updated_at":"2018-11-05T22:07:12Z","author_association":"CONTRIBUTOR","body":"I am not a fan of all of the `with` prefix names. If all optional paths have it then I think it adds noise with no value.\r\n\r\nI have mixed feeling about `from(Path)` vs `from(String)` because I think 99% of code will be `from(Paths.get(filePath))`."}}
{"actor":{"display_login":"keith-turner"}}