keith-turner commented on code in PR #2969:
URL: https://github.com/apache/accumulo/pull/2969#discussion_r981378403


##########
core/src/main/java/org/apache/accumulo/core/metadata/schema/TabletMetadata.java:
##########
@@ -399,6 +401,9 @@ public static <E extends Entry<Key,Value>> TabletMetadata 
convertRow(Iterator<E>
           extCompBuilder.put(ExternalCompactionId.of(qual),
               ExternalCompactionMetadata.fromJson(val));
           break;
+        case ChoppedColumnFamily.STR_NAME:
+          te.chopped = true;

Review Comment:
   Could do this if don't want to add a method to get chopped.
   
   ```suggestion
   ```



##########
core/src/main/java/org/apache/accumulo/core/metadata/schema/TabletMetadata.java:
##########
@@ -106,6 +107,7 @@ public class TabletMetadata {
   private OptionalLong compact = OptionalLong.empty();
   private Double splitRatio = null;
   private Map<ExternalCompactionId,ExternalCompactionMetadata> extCompactions;
+  public boolean chopped = false;

Review Comment:
   Would be better to make this private and have a method to access it, or 
could not have it at all.  The reason a method would be good is that 
`ensureFetched()` could be called in  the method to make sure it was actually 
retrieved.  All other fields do this.  In avoids bugs where someone did not 
fetch a field from the metadata table but they try to use it.  Like if someone 
read this chopped field but never fetched it, then it would always be false.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to