milleruntime commented on a change in pull request #1799:
URL: https://github.com/apache/accumulo/pull/1799#discussion_r528932710



##########
File path: 
core/src/main/java/org/apache/accumulo/core/metadata/schema/TabletMetadata.java
##########
@@ -190,10 +195,15 @@ public boolean hasCurrent() {
   }
 
   public Location getLast() {
-    ensureFetched(ColumnType.LAST);
+    ensureFetched(ColumnType.LOCATION);

Review comment:
       One of the issues is that there is a separate enum called `LocationType` 
that is used in the inner class `Location` to differentiate between the types. 
This doesn't really work with `SuspendingTServer` because it is its own special 
type.  I made an attempt to have `SuspendingTServer` extend the `Location` or 
`TServerInstance` types but it stores the suspension time with the host and 
port string in Value, differently from how we typically store the tserver host 
and port with the zk session id.
   
   
https://github.com/apache/accumulo/blob/cccac86255cd2d0ecd49e791162ca5cdf07512b6/core/src/main/java/org/apache/accumulo/core/metadata/SuspendingTServer.java#L45
   
   Then this is how TServerInstance is written:
   
https://github.com/apache/accumulo/blob/cccac86255cd2d0ecd49e791162ca5cdf07512b6/server/base/src/main/java/org/apache/accumulo/server/metadata/TabletMutatorBase.java#L144-L147




----------------------------------------------------------------
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:
[email protected]


Reply via email to