Skip to content

Inline BlockFile interfaces #480

@milleruntime

Description

@milleruntime

I think we can take a step towards cleaning up RFile, BCFile and CacheableBlockFile by eliminating some of the intermediate interfaces. There are 4 in particular in org.apache.accumlo.core.file.blockfile that are redundant and only add confusion/complexity. I think the classes that implement these interfaces can be in-lined.

  • ABlockWriter
  • ABlockReader
  • BlockFileReader
  • BlockFileWriter

Here is an example where one of these interfaces is misleading:

private static class LocalityGroupReader extends LocalityGroup implements FileSKVIterator {
...
  private IndexIterator iiter;
  private int entriesLeft;
  private ABlockReader currBlock;
...
  currBlock = getDataBlock(indexEntry);

The LocalityGroupReader stores a ABlockReader for the currBlock data block which is actually a BlockRead...

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions