accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1208532 - in /incubator/accumulo/trunk: ./ src/server/src/main/java/org/apache/accumulo/server/fate/ src/server/src/main/java/org/apache/accumulo/server/master/ src/server/src/main/java/org/apache/accumulo/server/master/tableOps/ src/serve...
Date Wed, 30 Nov 2011 17:26:47 GMT
Author: ecn
Date: Wed Nov 30 17:26:47 2011
New Revision: 1208532

URL: http://svn.apache.org/viewvc?rev=1208532&view=rev
Log:
ACCUMULO-195: merge to trunk

Added:
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/tableOps/TraceRepo.java
      - copied unchanged from r1208531, incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/tableOps/TraceRepo.java
Modified:
    incubator/accumulo/trunk/   (props changed)
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/fate/Fate.java
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java

Propchange: incubator/accumulo/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Nov 30 17:26:47 2011
@@ -1,2 +1,2 @@
 /incubator/accumulo/branches/1.3:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031
-/incubator/accumulo/branches/1.4:1201902-1208496
+/incubator/accumulo/branches/1.4:1201902-1208496,1208531

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/fate/Fate.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/fate/Fate.java?rev=1208532&r1=1208531&r2=1208532&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/fate/Fate.java
(original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/fate/Fate.java
Wed Nov 30 17:26:47 2011
@@ -23,9 +23,6 @@ import org.apache.accumulo.core.util.Log
 import org.apache.accumulo.server.fate.TStore.TStatus;
 import org.apache.log4j.Logger;
 
-import cloudtrace.instrument.Span;
-import cloudtrace.instrument.Trace;
-import cloudtrace.instrument.TraceRunnable;
 
 /**
  * Fault tolerant executor
@@ -54,12 +51,9 @@ public class Fate<T> {
       while (true) {
         long deferTime = 0;
         long tid = store.reserve();
-        Span span = null;
         try {
           TStatus status = store.getStatus(tid);
           Repo<T> op = store.top(tid);
-          span = Trace.on(op.getDescription());
-          span.data("tid", Long.toHexString(tid));
           if (status == TStatus.FAILED_IN_PROGRESS) {
             processFailed(tid, op);
           } else {
@@ -97,8 +91,6 @@ public class Fate<T> {
           }
         } finally {
           store.unreserve(tid, deferTime);
-          if (span != null)
-            span.stop();
         }
         
       }
@@ -150,7 +142,7 @@ public class Fate<T> {
     
     for (int i = 0; i < numTreads; i++) {
       // TODO: use a ExecutorService, maybe a utility to do these steps throughout the server
packages
-      Thread thread = new Daemon(new TraceRunnable(new LoggingRunnable(log, new TransactionRunner())),
"Repo runner " + i);
+      Thread thread = new Daemon(new LoggingRunnable(log, new TransactionRunner()), "Repo
runner " + i);
       thread.start();
     }
   }
@@ -179,7 +171,7 @@ public class Fate<T> {
         if (autoCleanUp)
           store.setProperty(tid, AUTO_CLEAN_PROP, new Boolean(autoCleanUp));
         
-        store.setProperty(tid, DEBUG_PROP, repo.getClass().getName());
+        store.setProperty(tid, DEBUG_PROP, repo.getDescription());
         
         store.setStatus(tid, TStatus.IN_PROGRESS);
       }

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/Master.java?rev=1208532&r1=1208531&r2=1208532&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
(original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
Wed Nov 30 17:26:47 2011
@@ -131,6 +131,7 @@ import org.apache.accumulo.server.master
 import org.apache.accumulo.server.master.tableOps.DeleteTable;
 import org.apache.accumulo.server.master.tableOps.RenameTable;
 import org.apache.accumulo.server.master.tableOps.TableRangeOp;
+import org.apache.accumulo.server.master.tableOps.TraceRepo;
 import org.apache.accumulo.server.master.tserverOps.ShutdownTServer;
 import org.apache.accumulo.server.monitor.Monitor;
 import org.apache.accumulo.server.security.Authenticator;
@@ -831,7 +832,7 @@ public class Master implements LiveTServ
       }
       
       long tid = fate.startTransaction();
-      fate.seedTransaction(tid, new ShutdownTServer(doomed, force), false);
+      fate.seedTransaction(tid, new TraceRepo<Master>(new ShutdownTServer(doomed, force)),
false);
       fate.waitForCompletion(tid);
       fate.delete(tid);
     }
@@ -938,7 +939,7 @@ public class Master implements LiveTServ
           
           org.apache.accumulo.core.client.admin.TimeType timeType = org.apache.accumulo.core.client.admin.TimeType.valueOf(ByteBufferUtil.toString(arguments
               .get(1)));
-          fate.seedTransaction(opid, new CreateTable(c.user, tableName, timeType, options),
autoCleanup);
+          fate.seedTransaction(opid, new TraceRepo<Master>(new CreateTable(c.user,
tableName, timeType, options)), autoCleanup);
           
           break;
         }
@@ -952,7 +953,7 @@ public class Master implements LiveTServ
           checkTableName(newTableName, TableOperation.RENAME);
           verify(c, tableId, TableOperation.RENAME, check(c, tableId, TablePermission.ALTER_TABLE)
|| check(c, SystemPermission.ALTER_TABLE));
           
-          fate.seedTransaction(opid, new RenameTable(tableId, oldTableName, newTableName),
autoCleanup);
+          fate.seedTransaction(opid, new TraceRepo<Master>(new RenameTable(tableId,
oldTableName, newTableName)), autoCleanup);
           
           break;
         }
@@ -981,7 +982,7 @@ public class Master implements LiveTServ
             propertiesToSet.put(entry.getKey(), entry.getValue());
           }
           
-          fate.seedTransaction(opid, new CloneTable(c.user, srcTableId, tableName, propertiesToSet,
propertiesToExclude), autoCleanup);
+          fate.seedTransaction(opid, new TraceRepo<Master>(new CloneTable(c.user, srcTableId,
tableName, propertiesToSet, propertiesToExclude)), autoCleanup);
           
           break;
         }
@@ -991,7 +992,7 @@ public class Master implements LiveTServ
           checkNotMetadataTable(tableName, TableOperation.DELETE);
           verify(c, tableId, TableOperation.DELETE, check(c, SystemPermission.DROP_TABLE)
|| check(c, tableId, TablePermission.DROP_TABLE));
           
-          fate.seedTransaction(opid, new DeleteTable(tableId), autoCleanup);
+          fate.seedTransaction(opid, new TraceRepo<Master>(new DeleteTable(tableId)),
autoCleanup);
           break;
         }
         case ONLINE: {
@@ -1001,7 +1002,7 @@ public class Master implements LiveTServ
           verify(c, tableId, TableOperation.ONLINE,
               check(c, SystemPermission.SYSTEM) || check(c, SystemPermission.ALTER_TABLE)
|| check(c, tableId, TablePermission.ALTER_TABLE));
           
-          fate.seedTransaction(opid, new ChangeTableState(tableId, TableOperation.ONLINE),
autoCleanup);
+          fate.seedTransaction(opid, new TraceRepo<Master>(new ChangeTableState(tableId,
TableOperation.ONLINE)), autoCleanup);
           break;
         }
         case OFFLINE: {
@@ -1011,7 +1012,7 @@ public class Master implements LiveTServ
           verify(c, tableId, TableOperation.OFFLINE,
               check(c, SystemPermission.SYSTEM) || check(c, SystemPermission.ALTER_TABLE)
|| check(c, tableId, TablePermission.ALTER_TABLE));
           
-          fate.seedTransaction(opid, new ChangeTableState(tableId, TableOperation.OFFLINE),
autoCleanup);
+          fate.seedTransaction(opid, new TraceRepo<Master>(new ChangeTableState(tableId,
TableOperation.OFFLINE)), autoCleanup);
           break;
         }
         case MERGE: {
@@ -1024,7 +1025,7 @@ public class Master implements LiveTServ
           verify(c, tableId, TableOperation.MERGE,
               check(c, SystemPermission.SYSTEM) || check(c, SystemPermission.ALTER_TABLE)
|| check(c, tableId, TablePermission.ALTER_TABLE));
           
-          fate.seedTransaction(opid, new TableRangeOp(MergeInfo.Operation.MERGE, tableId,
startRow, endRow), autoCleanup);
+          fate.seedTransaction(opid, new TraceRepo<Master>(new TableRangeOp(MergeInfo.Operation.MERGE,
tableId, startRow, endRow)), autoCleanup);
           break;
         }
         case DELETE_RANGE: {
@@ -1036,7 +1037,7 @@ public class Master implements LiveTServ
           checkNotMetadataTable(tableName, TableOperation.DELETE_RANGE);
           verify(c, tableId, TableOperation.DELETE_RANGE, check(c, SystemPermission.SYSTEM)
|| check(c, tableId, TablePermission.WRITE));
           
-          fate.seedTransaction(opid, new TableRangeOp(MergeInfo.Operation.DELETE, tableId,
startRow, endRow), autoCleanup);
+          fate.seedTransaction(opid, new TraceRepo<Master>(new TableRangeOp(MergeInfo.Operation.DELETE,
tableId, startRow, endRow)), autoCleanup);
           break;
         }
         case BULK_IMPORT: {
@@ -1049,7 +1050,7 @@ public class Master implements LiveTServ
           checkNotMetadataTable(tableName, TableOperation.BULK_IMPORT);
           verify(c, tableId, TableOperation.BULK_IMPORT, check(c, tableId, TablePermission.BULK_IMPORT));
           
-          fate.seedTransaction(opid, new BulkImport(tableId, dir, failDir, setTime), autoCleanup);
+          fate.seedTransaction(opid, new TraceRepo<Master>(new BulkImport(tableId,
dir, failDir, setTime)), autoCleanup);
           break;
         }
         case COMPACT: {
@@ -1060,7 +1061,7 @@ public class Master implements LiveTServ
           verify(c, tableId, TableOperation.COMPACT,
               check(c, tableId, TablePermission.WRITE) || check(c, tableId, TablePermission.ALTER_TABLE)
|| check(c, SystemPermission.ALTER_TABLE));
           
-          fate.seedTransaction(opid, new CompactRange(tableId, startRow, endRow), autoCleanup);
+          fate.seedTransaction(opid, new TraceRepo<Master>(new CompactRange(tableId,
startRow, endRow)), autoCleanup);
           break;
         }
         default:

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java?rev=1208532&r1=1208531&r2=1208532&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
(original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
Wed Nov 30 17:26:47 2011
@@ -2922,7 +2922,7 @@ public class TabletServer extends Abstra
       
       if (args.length > 0)
         conf.set("tabletserver.hostname", args[0]);
-      Accumulo.enableTracing(local.getHostAddress(), "tserver");
+      Accumulo.enableTracing(local.getHostName(), "tserver");
     } catch (IOException e) {
       log.fatal("couldn't get a reference to the filesystem. quitting");
       throw new RuntimeException(e);



Mime
View raw message