You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2019/10/28 19:18:26 UTC

[GitHub] [accumulo] keith-turner opened a new issue #1396: Create type to represent tablet files

keith-turner opened a new issue #1396: Create type to represent tablet files
URL: https://github.com/apache/accumulo/issues/1396
 
 
   Accumulo tablet files have a very specific structure of `<volume>/tables/<table id>/<tablet dir>/<tablet file>.  Code that deals with these paths use String or Hadoop Path type along with utility methods to extract needed information and sanity check the paths.  The reason String is used sometimes is that for the case where a path originates from the metadata table, it is extremely important to maintain the exact string that is in the metadata table.  Using Path may transform the String to something different.
   
   Instead of using String and Path, it may be better to create a specialized type that holds this information and sanity checks it.  This type could be used in the code in place of String and Path.  Possibly something like :
   
   ```java
   class TabletFile {
      Volume getVolume();
      TableId getTableId();
      String getTabletDir();
      String getName();
      Path toPath();
      // returns the exact path storted in metadata table if this path originated from the metadata table
      String getMetadataEntry();
   }
   ```
   
   Ample could use this more specific type instead of String.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services