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 2020/02/19 17:11:52 UTC

[GitHub] [accumulo] milleruntime commented on a change in pull request #1519: Update TabletFile to use getters for different situations

milleruntime commented on a change in pull request #1519: Update TabletFile to use getters for different situations
URL: https://github.com/apache/accumulo/pull/1519#discussion_r381418666
 
 

 ##########
 File path: core/src/main/java/org/apache/accumulo/core/metadata/TabletFile.java
 ##########
 @@ -42,18 +43,31 @@
   private final TableId tableId; // 2a
   private final String tabletDir; // t-0003
   private final String fileName; // C0004.rf
-  private final String metadataEntry;
   private final Path metaPath;
   private final String normalizedPath;
 
+  private Optional<String> metadataEntry;
+
   /**
-   * Construct a tablet file using a Path object already created. Used in the case where we had to
-   * use Path object to qualify an absolute path.
+   * Construct new tablet file using a Path. Used in the case where we had to use Path object to
+   * qualify an absolute path or create a new file.
    */
-  public TabletFile(Path metaPath, String originalMetaEntry) {
-    this.metadataEntry = Objects.requireNonNull(originalMetaEntry);
+  public TabletFile(Path metaPath) {
 
 Review comment:
   Most of the time I would agree, especially with multiple String parameters a static method is a lot more clear.  But I don't think we need them in this case since the objects being passed are essentially the same thing just in different form.

----------------------------------------------------------------
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