accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [08/12] accumulo git commit: Merge branch '1.6' into 1.7
Date Mon, 24 Aug 2015 03:59:34 GMT
Merge branch '1.6' into 1.7

Conflicts:
	server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java


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

Branch: refs/heads/master
Commit: b830b3247f53a880587d6b48af96efc11513ffe1
Parents: da484a8 79245e1
Author: Josh Elser <elserj@apache.org>
Authored: Sun Aug 23 18:16:37 2015 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Sun Aug 23 18:16:37 2015 -0400

----------------------------------------------------------------------
 .../accumulo/server/client/BulkImporter.java    | 14 ++++++++++---
 .../server/client/BulkImporterTest.java         | 21 ++++++++++++++++++++
 2 files changed, 32 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/b830b324/server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java
----------------------------------------------------------------------
diff --cc server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java
index 283d304,0c77367..86dde1e
--- a/server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java
@@@ -611,23 -622,32 +611,31 @@@ public class BulkImporter 
      }
    }
  
 -  public static List<TabletLocation> findOverlappingTablets(AccumuloConfiguration
acuConf, VolumeManager fs, TabletLocator locator, Path file,
 -      Credentials credentials) throws Exception {
 -    return findOverlappingTablets(acuConf, fs, locator, file, null, null, credentials);
 +  public static List<TabletLocation> findOverlappingTablets(ClientContext context,
VolumeManager fs, TabletLocator locator, Path file) throws Exception {
 +    return findOverlappingTablets(context, fs, locator, file, null, null);
    }
  
 -  public static List<TabletLocation> findOverlappingTablets(AccumuloConfiguration
acuConf, VolumeManager fs, TabletLocator locator, Path file,
 -      KeyExtent failed, Credentials credentials) throws Exception {
 +  public static List<TabletLocation> findOverlappingTablets(ClientContext context,
VolumeManager fs, TabletLocator locator, Path file, KeyExtent failed)
 +      throws Exception {
      locator.invalidateCache(failed);
-     Text start = failed.getPrevEndRow();
-     if (start != null)
-       start = Range.followingPrefix(start);
+     Text start = getStartRowForExtent(failed);
 -    return findOverlappingTablets(acuConf, fs, locator, file, start, failed.getEndRow(),
credentials);
 +    return findOverlappingTablets(context, fs, locator, file, start, failed.getEndRow());
    }
  
+   protected static Text getStartRowForExtent(KeyExtent extent) {
+     Text start = extent.getPrevEndRow();
+     if (start != null) {
+       start = new Text(start);
+       // ACCUMULO-3967 We want the first possible key in this tablet, not the following
row from the previous tablet
+       start.append(byte0, 0, 1);
+     }
+     return start;
+   }
+ 
    final static byte[] byte0 = {0};
  
 -  public static List<TabletLocation> findOverlappingTablets(AccumuloConfiguration
acuConf, VolumeManager vm, TabletLocator locator, Path file, Text startRow,
 -      Text endRow, Credentials credentials) throws Exception {
 +  public static List<TabletLocation> findOverlappingTablets(ClientContext context,
VolumeManager vm, TabletLocator locator, Path file, Text startRow,
 +      Text endRow) throws Exception {
      List<TabletLocation> result = new ArrayList<TabletLocation>();
      Collection<ByteSequence> columnFamilies = Collections.emptyList();
      String filename = file.toString();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b830b324/server/base/src/test/java/org/apache/accumulo/server/client/BulkImporterTest.java
----------------------------------------------------------------------


Mime
View raw message