You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2013/09/20 22:55:36 UTC
[1/2] git commit: ACCUMULO-1.5.1-SNAPSHOT need to store location
without full path
Updated Branches:
refs/heads/master b02c83fa3 -> 3ad3f8b38
ACCUMULO-1.5.1-SNAPSHOT need to store location without full path
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/2c9dee32
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/2c9dee32
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/2c9dee32
Branch: refs/heads/master
Commit: 2c9dee325c6407b6ce7221521ba536ec0f633061
Parents: 3c4f4f0
Author: Eric Newton <er...@gmail.com>
Authored: Fri Sep 20 16:55:17 2013 -0400
Committer: Eric Newton <er...@gmail.com>
Committed: Fri Sep 20 16:55:17 2013 -0400
----------------------------------------------------------------------
.../java/org/apache/accumulo/server/tabletserver/Tablet.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/2c9dee32/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java b/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
index 4439e74..a3d3627 100644
--- a/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
+++ b/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
@@ -418,6 +418,8 @@ public class Tablet {
private AtomicReference<ConstraintChecker> constraintChecker = new AtomicReference<ConstraintChecker>();
+ private final String tabletDirectory;
+
private int writesInProgress = 0;
private static final Logger log = Logger.getLogger(Tablet.class);
@@ -1321,6 +1323,7 @@ public class Tablet {
Set<String> scanFiles, long initFlushID, long initCompactID) throws IOException {
this.location = new Path(ServerConstants.getTablesDir() + "/" + extent.getTableId().toString() + location.toString());
this.lastLocation = lastLocation;
+ this.tabletDirectory = location.toString();
this.conf = conf;
this.acuTableConf = tabletServer.getTableConfiguration(extent);
@@ -3624,7 +3627,7 @@ public class Tablet {
log.log(TLevel.TABLET_HIST, extent + " split " + low + " " + high);
- newTablets.put(high, new SplitInfo(location.toString(), highDatafileSizes, time, lastFlushID, lastCompactID));
+ newTablets.put(high, new SplitInfo(tabletDirectory, highDatafileSizes, time, lastFlushID, lastCompactID));
newTablets.put(low, new SplitInfo(lowDirectory, lowDatafileSizes, time, lastFlushID, lastCompactID));
long t2 = System.currentTimeMillis();
[2/2] git commit: Merge branch '1.5.1-SNAPSHOT'
Posted by ec...@apache.org.
Merge branch '1.5.1-SNAPSHOT'
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/3ad3f8b3
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/3ad3f8b3
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/3ad3f8b3
Branch: refs/heads/master
Commit: 3ad3f8b38f2ac5b1cfeb26edcaa7f014bf13c793
Parents: b02c83f 2c9dee3
Author: Eric Newton <er...@gmail.com>
Authored: Fri Sep 20 16:55:41 2013 -0400
Committer: Eric Newton <er...@gmail.com>
Committed: Fri Sep 20 16:55:41 2013 -0400
----------------------------------------------------------------------
.../java/org/apache/accumulo/server/tabletserver/Tablet.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/3ad3f8b3/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
----------------------------------------------------------------------
diff --cc server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
index 4e06c1d,a3d3627..bd15958
--- a/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
+++ b/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
@@@ -1248,16 -1319,11 +1250,17 @@@ public class Tablet
* yet another constructor - this one allows us to avoid costly lookups into the Metadata table if we already know the files we need - as at split time
*/
private Tablet(final TabletServer tabletServer, final Text location, final KeyExtent extent, final TabletResourceManager trm, final Configuration conf,
- final FileSystem fs, final List<LogEntry> logEntries, final SortedMap<String,DataFileValue> datafiles, String time, final TServerInstance lastLocation,
- Set<String> scanFiles, long initFlushID, long initCompactID) throws IOException {
- this.location = new Path(ServerConstants.getTablesDir() + "/" + extent.getTableId().toString() + location.toString());
+ final VolumeManager fs, final List<LogEntry> logEntries, final SortedMap<FileRef,DataFileValue> datafiles, String time,
+ final TServerInstance lastLocation, Set<FileRef> scanFiles, long initFlushID, long initCompactID) throws IOException {
+ Path locationPath;
+ if (location.find(":") >= 0) {
+ locationPath = new Path(location.toString());
+ } else {
+ locationPath = new Path(ServerConstants.getTablesDirs()[0] + "/" + extent.getTableId().toString() + location.toString());
+ }
+ this.location = locationPath.makeQualified(fs.getFileSystemByPath(locationPath));
this.lastLocation = lastLocation;
+ this.tabletDirectory = location.toString();
this.conf = conf;
this.acuTableConf = tabletServer.getTableConfiguration(extent);