accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject [07/13] git commit: ACCUMULO-2057 handle multiple last locations gracefully
Date Thu, 19 Dec 2013 20:33:32 GMT
ACCUMULO-2057 handle multiple last locations gracefully


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/2235b503
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/2235b503
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/2235b503

Branch: refs/heads/master
Commit: 2235b5038a85147cae3495d4d0368e0bd9f38098
Parents: 40df8cd
Author: Eric Newton <eric.newton@gmail.com>
Authored: Thu Dec 19 15:00:22 2013 -0500
Committer: Eric Newton <eric.newton@gmail.com>
Committed: Thu Dec 19 15:17:02 2013 -0500

----------------------------------------------------------------------
 .../accumulo/server/master/state/MetaDataTableScanner.java       | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/2235b503/src/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java
----------------------------------------------------------------------
diff --git a/src/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java
b/src/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java
index e10b1b3..157cb76 100644
--- a/src/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java
+++ b/src/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java
@@ -127,6 +127,7 @@ public class MetaDataTableScanner implements Iterator<TabletLocationState>
{
     TServerInstance future = null;
     TServerInstance current = null;
     TServerInstance last = null;
+    long lastTimestamp = 0;
     List<Collection<String>> walogs = new ArrayList<Collection<String>>();
     boolean chopped = false;
     
@@ -144,7 +145,8 @@ public class MetaDataTableScanner implements Iterator<TabletLocationState>
{
         String[] split = entry.getValue().toString().split("\\|")[0].split(";");
         walogs.add(Arrays.asList(split));
       } else if (cf.compareTo(Constants.METADATA_LAST_LOCATION_COLUMN_FAMILY) == 0) {
-        last = new TServerInstance(entry.getValue(), cq);
+        if (lastTimestamp < entry.getKey().getTimestamp())
+          last = new TServerInstance(entry.getValue(), cq);
       } else if (cf.compareTo(Constants.METADATA_CHOPPED_COLUMN_FAMILY) == 0) {
         chopped = true;
       } else if (Constants.METADATA_PREV_ROW_COLUMN.equals(cf, cq)) {


Mime
View raw message