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 2021/07/09 13:26:34 UTC
[GitHub] [accumulo] DomGarguilo commented on a change in pull request #2189: Make Ample only return exact matches for KeyExtents
DomGarguilo commented on a change in pull request #2189:
URL: https://github.com/apache/accumulo/pull/2189#discussion_r666947596
##########
File path: core/src/main/java/org/apache/accumulo/core/metadata/schema/AmpleImpl.java
##########
@@ -44,7 +45,14 @@ public TabletMetadata readTablet(KeyExtent extent, ReadConsistency readConsisten
builder.readConsistency(readConsistency);
try (TabletsMetadata tablets = builder.build()) {
- return Iterables.getOnlyElement(tablets);
+ TabletMetadata tmd = Iterables.getOnlyElement(tablets);
+ Text tmpExtent = extent.prevEndRow();
+ Text tmpTmd = tmd.getPrevEndRow();
+ if (tmpExtent == tmpTmd || tmpExtent.equals(tmpTmd)) {
+ return tmd;
+ } else {
+ return null;
+ }
Review comment:
Yea, this is a lot nicer. Will be included in the next commit.
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org