accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joshelser <>
Subject [GitHub] accumulo pull request: ACCUMULO-4195 Added generalized configurati...
Date Mon, 25 Apr 2016 16:46:50 GMT
Github user joshelser commented on a diff in the pull request:
    --- Diff: core/src/test/java/org/apache/accumulo/core/client/mock/
    @@ -225,7 +225,8 @@ private ImportTestFilesAndData prepareTestFiles() throws Throwable
         fs.delete(tempFile, true);
    -    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)
    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 or file a JIRA ticket
with INFRA.

View raw message