ACCUMULO-4195 Added generalized configuration objects for RFile interaction#95
ACCUMULO-4195 Added generalized configuration objects for RFile interaction#95ShawnWalker wants to merge 3 commits intoapache:masterfrom
Conversation
| BlockCache indexCache = input.getIndexCache(); | ||
| BlockCache dataCache = input.getDataCache(); | ||
| if (!input.getTableConfiguration().getBoolean(Property.TABLE_INDEXCACHE_ENABLED)) { | ||
| indexCache = null; |
There was a problem hiding this comment.
Seem like this is setting a local var to null.
There was a problem hiding this comment.
Nevemind. I thought this had no impact, but I was looking at the subtracted lines of the diff. Now I see that it does have an impact.
|
@keith-turner how, if at all, does this play into your RFile API work? Have you and Shawn talked about this at all offline? |
|
Overall, I think this is a nice improvement @ShawnWalker. I really appreciate the quick turn-around on my request! I'll try to run what you have now through some tests locally. |
76db992 to
8a484f4
Compare
|
I changed the method names to look more builder-ish as @joshelser suggested. Wasn't quite sure how the change the verbiage I also dovetailled |
…action. Implemented a builder/fluent style of syntax, where each operation creates an operation object with both some methods for setting parameters and an execute() method to actually invoke the operation.
…so significantly increased type-fu so to present a tighter interface.
8a484f4 to
2812097
Compare
|
Nice, I think these changes look good.
Any further comments @keith-turner before I merge this in? |
|
|
||
| if (out == null) { | ||
| out = FileOperations.getInstance().openWriter(file.toString(), file.getFileSystem(conf), conf, null, acuConf); | ||
| out = FileOperations.getInstance().newWriterBuilder().forFile(file.toString(), file.getFileSystem(conf), conf).withTableConfiguration(acuConf) |
There was a problem hiding this comment.
Didn't look too closely, but it struck me this could be cleaned up with another constructor that took a Path and Configuration so it would read
out = FileOperations.getInstance().newWriterBuilder().forFile(file, conf).withTableConfiguration(acuConf)
Fine as is though
Nope. Just took a last look at it. Looks good. |
Great. Thanks bud. I will merge this in today. |
Implemented a builder/fluent style of syntax, where each operation creates an operation object with both some methods for setting
parameters and an execute() method to actually invoke the operation.
I'm not really sure if this is in line with the improvement the reporter suggests. It does however address the only goal I can identify with that request: it should be possible to extend the interface
FileOperationsin a manner such as was done for ACCUMULO-4187 without requiring significant changes to unrelated code.Also, the automatic formatter hates me, and completely undid most of my eye-pleasing formatting.