accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject [08/10] git commit: ACCUMULO-1452 remove any junk _tmp files when openning the tablet
Date Thu, 12 Sep 2013 16:38:26 GMT
ACCUMULO-1452 remove any junk _tmp files when openning the tablet


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

Branch: refs/heads/master
Commit: fcf613b727b2302b53f56b4006a02a4e6dfb8cc7
Parents: 98d7a9e 90eb751
Author: Eric Newton <eric.newton@gmail.com>
Authored: Thu Sep 12 11:41:45 2013 -0400
Committer: Eric Newton <eric.newton@gmail.com>
Committed: Thu Sep 12 11:41:45 2013 -0400

----------------------------------------------------------------------
 .../minicluster/MiniAccumuloClusterGCTest.java  |  2 +-
 .../accumulo/server/tabletserver/Tablet.java    | 24 ++++++++++++++++----
 2 files changed, 20 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/fcf613b7/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterGCTest.java
----------------------------------------------------------------------
diff --cc minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterGCTest.java
index 2fb248b,e7ae6f6..6674136
--- a/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterGCTest.java
+++ b/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterGCTest.java
@@@ -80,15 -78,15 +80,15 @@@ public class MiniAccumuloClusterGCTest 
    public void test() throws Exception {
      ZooKeeperInstance inst = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers());
      Connector c = inst.getConnector("root", new PasswordToken(passwd));
- 
+     
      final String table = "foobar";
      c.tableOperations().create(table);
 -    
 +
      BatchWriter bw = null;
 -    
 +
      // Add some data
      try {
 -      bw = c.createBatchWriter(table, new BatchWriterConfig());
 +      bw = c.createBatchWriter(table, new BatchWriterConfig().setMaxMemory(1000l).setMaxLatency(100,
TimeUnit.MILLISECONDS).setMaxWriteThreads(1));
        Mutation m = new Mutation("a");
        for (int i = 0; i < 50; i++) {
          m.put("colf", Integer.toString(i), "");

http://git-wip-us.apache.org/repos/asf/accumulo/blob/fcf613b7/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 02af9a0,09a6694..e7a2b82
--- a/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
+++ b/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
@@@ -1250,16 -1317,10 +1248,15 @@@ 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 {
 +    if (location.find(":") >= 0) {
 +      this.location = new Path(location.toString());
 +    } else {
 +      this.location = new Path(ServerConstants.getTablesDirs()[0] + "/" + extent.getTableId().toString()
+ location.toString());
 +    }
 +    this.location = this.location.makeQualified(fs.getFileSystemByPath(this.location));
      this.lastLocation = lastLocation;
-     this.tabletDirectory = location.toString();
      this.conf = conf;
      this.acuTableConf = tabletServer.getTableConfiguration(extent);
      


Mime
View raw message