Github user joshelser commented on a diff in the pull request:
https://github.com/apache/accumulo/pull/95#discussion_r60946455
--- Diff:
core/src/test/java/org/apache/accumulo/core/client/mock/MockTableOperationsTest.java
---
@@ -225,7 +225,8 @@ private ImportTestFilesAndData prepareTestFiles()
throws Throwable {
fs.delete(tempFile, true);
fs.mkdirs(failures);
fs.mkdirs(tempFile.getParent());
- FileSKVWriter writer =
FileOperations.getInstance().openWriter(tempFile.toString(), fs, defaultConf,
null, AccumuloConfiguration.getDefaultConfiguration());
+ FileSKVWriter writer =
FileOperations.getInstance().openWriter().ofFile(tempFile.toString(), fs,
defaultConf)
--- End diff --
The "verbage" here feels a little strange to me (maybe because you tried to
preserve the original `openWriter()` methods?). What do you think about
something like:
```
FileOperations.getInstance().newWriterBuilder().ofFile(tempFile.toString(),
fs, defaultConf)
.withTableConfiguration(AccumuloConfiguration.getDefaultConfiguration()).build();
```
Using the common "builder" and "build" terminology makes it a bit obvious
how this works. "openWriter" would imply to me that something is being opened
(that I would need to close) and I'm not sure what "execute" would be doing at
all on some I/O handle.
I know this is a little nit-picky, but if we're going to make the APIs
better, I'd be in favor of making them as clear as possible to prevent
ourselves from coming back here soon.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---