[GitHub] keith-turner commented on issue #747: Shorten method names in AccumuloClient builder

2018-11-06 Thread GitBox
keith-turner commented on issue #747: Shorten method names in AccumuloClient 
builder
URL: https://github.com/apache/accumulo/issues/747#issuecomment-436291844
 
 
   The first time people see this API, they likely will not be writing it but 
will be reading an example.  I think using these new API as much as possible 
before release is very important.  From my past experience working on the Fluo 
tour I found boilerplate and overly verbose code very unpleasant to write and 
read.  Luckily with Fluo I was writing the tour and using some unreleased APIs, 
so I was able to fix some overly verbose APIs before release.  We need to 
update the Accumuo tour and examples to use these new APIs before releasing.  
That is something I plan to work on, but I would like to do that after this.


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


[GitHub] keith-turner commented on issue #747: Shorten method names in AccumuloClient builder

2018-11-06 Thread GitBox
keith-turner commented on issue #747: Shorten method names in AccumuloClient 
builder
URL: https://github.com/apache/accumulo/issues/747#issuecomment-436291393
 
 
   I don't think a user would ever write code like the following because they 
would usually not know the number of zookeepers at compile time.
   
   ```java
Accumulo.newClient().to(name, {zk1, zk2});
   ```


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


[GitHub] keith-turner commented on issue #747: Shorten method names in AccumuloClient builder

2018-11-06 Thread GitBox
keith-turner commented on issue #747: Shorten method names in AccumuloClient 
builder
URL: https://github.com/apache/accumulo/issues/747#issuecomment-436290422
 
 
   One reason to not use `from(String)` now is that we may want to leave it 
available for future use.  I have always though it would be nice if Accumulo 
had a standardized connection string that could encode instance, zookeepers, 
and credentials.  It may be nice to have `from(String connectionString)` in the 
future. 
   
   > Some boilerplate is reasonable, when it helps clearly communicate the 
required type
   
   I realized that for communication, the variable name used in the API is much 
more important than the type.  If I see `from(Path foo)` I would still need to 
consult javadoc.  However if I see `from(Path clientPropsFile)` or `from(String 
clientPropsFile)` then I may not need javadoc.  
   
   > Maybe "useJsse" makes more sense than just "jsse".
   
   We need to strike that balance between adding useless noise and useful 
information. I think this ends up being a function of the number of unique 
prefixes and the number of methods similar to TFIDF. Also, we may be ok making 
the less frequently used methods longer and therefore more self documenting. 
For this case `enable` may be a better prefix for communicating useful info.   
I am really happy to see this proposal shorten the most frequently used 
methods.  
   
   Seems like the following could lead to boilerplate code because every user 
has to split/parse this.  The zookeeper API just takes String for this.
   
   ```java
   to(CharSequence name, CharSequence[] zookeepers);
   ```
   
   
   
   
   
   
   
   
   
   
   


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


[GitHub] keith-turner commented on issue #747: Shorten method names in AccumuloClient builder

2018-11-05 Thread GitBox
keith-turner commented on issue #747: Shorten method names in AccumuloClient 
builder
URL: https://github.com/apache/accumulo/issues/747#issuecomment-436053391
 
 
   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.
   
   I have mixed feeling about `from(Path)` vs `from(String)` because I think 
99% of code will be `from(Paths.get(filePath))`.


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