accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject svn commit: r1451380 - in /accumulo/branches/ACCUMULO-259-polishing: ./ bin/stop-all.sh server/ server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java test/system/auto/README
Date Thu, 28 Feb 2013 22:03:52 GMT
Author: ctubbsii
Date: Thu Feb 28 22:03:52 2013
New Revision: 1451380

URL: http://svn.apache.org/r1451380
Log:
ACCUMULO-259 merging updates from 1.5 branch

Modified:
    accumulo/branches/ACCUMULO-259-polishing/   (props changed)
    accumulo/branches/ACCUMULO-259-polishing/bin/stop-all.sh
    accumulo/branches/ACCUMULO-259-polishing/server/   (props changed)
    accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
    accumulo/branches/ACCUMULO-259-polishing/test/system/auto/README

Propchange: accumulo/branches/ACCUMULO-259-polishing/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5:r1451249-1451379

Modified: accumulo/branches/ACCUMULO-259-polishing/bin/stop-all.sh
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/bin/stop-all.sh?rev=1451380&r1=1451379&r2=1451380&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/bin/stop-all.sh (original)
+++ accumulo/branches/ACCUMULO-259-polishing/bin/stop-all.sh Thu Feb 28 22:03:52 2013
@@ -21,7 +21,7 @@ bin=`cd "$bin"; pwd`
 
 . "$bin"/config.sh
 
-${bin}/accumulo admin stopAll "$@"
+${bin}/accumulo admin "$@" stopAll
 
 if [ $? -ne 0 ]; then
 echo 'Invalid password or unable to connect to the master'

Propchange: accumulo/branches/ACCUMULO-259-polishing/server/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/server:r1451019-1451375

Modified: accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java?rev=1451380&r1=1451379&r2=1451380&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
Thu Feb 28 22:03:52 2013
@@ -406,7 +406,7 @@ public class Tablet {
   private KeyExtent extent;
   
   private TabletResourceManager tabletResources;
-  private DatafileManager datafileManager;
+  final private DatafileManager datafileManager;
   private volatile boolean majorCompactionInProgress = false;
   private volatile boolean majorCompactionWaitingToStart = false;
   private Set<MajorCompactionReason> majorCompactionQueued = Collections.synchronizedSet(EnumSet.noneOf(MajorCompactionReason.class));
@@ -508,11 +508,10 @@ public class Tablet {
   }
   
   class DatafileManager {
-    private TreeMap<Path,DataFileValue> datafileSizes;
+    // access to datafilesizes needs to be synchronized: see CompactionRunner#getNumFiles
+    final private Map<Path,DataFileValue> datafileSizes = Collections.synchronizedMap(new
TreeMap<Path,DataFileValue>());
     
     DatafileManager(SortedMap<String,DataFileValue> datafileSizes) {
-      this.datafileSizes = new TreeMap<Path,DataFileValue>();
-      
       for (Entry<String,DataFileValue> datafiles : datafileSizes.entrySet())
         this.datafileSizes.put(new Path(rel2abs(datafiles.getKey(), extent)), datafiles.getValue());
     }
@@ -2890,10 +2889,14 @@ public class Tablet {
       }
     }
     
+    // We used to synchronize on the Tablet before fetching this information, 
+    // but this method is called by the compaction queue thread to re-order the compactions.
+    // The compaction queue holds a lock during this sort.
+    // A tablet lock can be held while putting itself on the queue, so we can't lock the
tablet
+    // while pulling information used to sort the tablets in the queue, or we may get deadlocked.
+    // See ACCUMULO-1110.
     private int getNumFiles() {
-      synchronized (Tablet.this) {
-        return datafileManager.datafileSizes.size();
-      }
+      return datafileManager.datafileSizes.size();
     }
     
     @Override

Modified: accumulo/branches/ACCUMULO-259-polishing/test/system/auto/README
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/system/auto/README?rev=1451380&r1=1451379&r2=1451380&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/system/auto/README (original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/system/auto/README Thu Feb 28 22:03:52 2013
@@ -34,11 +34,11 @@ If the test suite hangs, and you would l
  
  $ ./test/system/auto/run.py -s start.over.test
  
-The full test suite can take nearly an hour.  If you have a larger hadoop cluster at your
disposal, you can 
+The full test suite can take over an hour.  If you have a larger hadoop cluster at your disposal,
you can 
 run the tests as a map-reduce job:
 
  $ python test/system/auto/run.py -l > tests
  $ hadoop fs -put tests /user/hadoop/tests
- $ ./bin/accumulo org.apache.accumulo.test.functional.RunTests /user/hadoop/tests /user/hadoop/results
+ $ ./bin/accumulo org.apache.accumulo.test.functional.RunTests --tests /user/hadoop/tests
--output /user/hadoop/results
 
  



Mime
View raw message