accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1424648 - in /accumulo/trunk: core/src/main/java/org/apache/accumulo/core/client/ core/src/main/java/org/apache/accumulo/core/client/impl/ core/src/main/java/org/apache/accumulo/core/data/ core/src/main/java/org/apache/accumulo/core/file/b...
Date Thu, 20 Dec 2012 19:29:38 GMT
Author: ecn
Date: Thu Dec 20 19:29:37 2012
New Revision: 1424648

URL: http://svn.apache.org/viewvc?rev=1424648&view=rev
Log:
ACCUMULO-853 applying patch

Modified:
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/IsolatedScanner.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocator.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocatorImpl.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/KeyExtent.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/BoundedRangeFileInputStream.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/iterators/system/SourceSwitchingIterator.java
    accumulo/trunk/fate/src/test/java/org/apache/accumulo/fate/zookeeper/DistributedReadWriteLockTest.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/client/BulkImporter.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/conf/ServerConfiguration.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/conf/ZooConfiguration.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/Monitor.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/InMemoryMap.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/NativeMap.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServerResourceManager.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/log/DfsLogger.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/log/LogSorter.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/log/TabletServerLogger.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooQueueLock.java
    accumulo/trunk/start/src/main/java/org/apache/accumulo/start/classloader/AccumuloClassLoader.java
    accumulo/trunk/trace/src/main/java/org/apache/accumulo/cloudtrace/instrument/receivers/AsyncSpanReceiver.java

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/IsolatedScanner.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/IsolatedScanner.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/IsolatedScanner.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/IsolatedScanner.java
Thu Dec 20 19:29:37 2012
@@ -48,7 +48,7 @@ public class IsolatedScanner extends Sca
     private ByteSequence lastRow = null;
     private long timeout;
     
-    private Scanner scanner;
+    private final Scanner scanner;
     private ScannerOptions opts;
     private Range range;
     private int batchSize;

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocator.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocator.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocator.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocator.java
Thu Dec 20 19:29:37 2012
@@ -146,7 +146,7 @@ public abstract class TabletLocator {
   }
 
   public static class TabletLocation implements Comparable<TabletLocation> {
-    private static WeakHashMap<String,WeakReference<String>> tabletLocs = new
WeakHashMap<String,WeakReference<String>>();
+    private static final WeakHashMap<String,WeakReference<String>> tabletLocs
= new WeakHashMap<String,WeakReference<String>>();
     
     private static String dedupeLocation(String tabletLoc) {
       synchronized (tabletLocs) {

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocatorImpl.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocatorImpl.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocatorImpl.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocatorImpl.java
Thu Dec 20 19:29:37 2012
@@ -87,8 +87,8 @@ public class TabletLocatorImpl extends T
   
   private TreeSet<KeyExtent> badExtents = new TreeSet<KeyExtent>();
   private ReentrantReadWriteLock rwLock = new ReentrantReadWriteLock();
-  private Lock rLock = rwLock.readLock();
-  private Lock wLock = rwLock.writeLock();
+  private final Lock rLock = rwLock.readLock();
+  private final Lock wLock = rwLock.writeLock();
   
   public static interface TabletLocationObtainer {
     /**

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java
Thu Dec 20 19:29:37 2012
@@ -91,7 +91,7 @@ public class TabletServerBatchReaderIter
   private Iterator<Entry<Key,Value>> batchIterator;
   private List<Entry<Key,Value>> batch;
   private static final List<Entry<Key,Value>> LAST_BATCH = new ArrayList<Map.Entry<Key,Value>>();
-  private Object nextLock = new Object();
+  private final Object nextLock = new Object();
   
   private long failSleepTime = 100;
   
@@ -331,7 +331,7 @@ public class TabletServerBatchReaderIter
     private Map<KeyExtent,List<Range>> tabletsRanges;
     private ResultReceiver receiver;
     private Semaphore semaphore = null;
-    private Map<KeyExtent,List<Range>> failures;
+    private final Map<KeyExtent,List<Range>> failures;
     private List<Column> columns;
     private int semaphoreSize;
     

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java
Thu Dec 20 19:29:37 2012
@@ -79,7 +79,7 @@ public class ThriftTransportPool {
   }
   
   private static class Closer implements Runnable {
-    ThriftTransportPool pool;
+    final ThriftTransportPool pool;
     
     public Closer(ThriftTransportPool pool) {
       this.pool = pool;

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/KeyExtent.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/KeyExtent.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/KeyExtent.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/KeyExtent.java Thu Dec
20 19:29:37 2012
@@ -49,7 +49,7 @@ import org.apache.hadoop.io.WritableComp
 
 public class KeyExtent implements WritableComparable<KeyExtent> {
   
-  private static WeakHashMap<Text,WeakReference<Text>> tableIds = new WeakHashMap<Text,WeakReference<Text>>();
+  private static final WeakHashMap<Text,WeakReference<Text>> tableIds = new WeakHashMap<Text,WeakReference<Text>>();
   
   private static Text dedupeTableId(Text tableId) {
     synchronized (tableIds) {

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
Thu Dec 20 19:29:37 2012
@@ -435,17 +435,17 @@ public class CachableBlockFile {
 
   public static class CachedBlockRead extends BlockRead {
     private SeekableByteArrayInputStream seekableInput;
-    private CacheEntry cb;
+    private final CacheEntry cb;
     
     public CachedBlockRead(CacheEntry cb, byte buf[]) {
-      this(new SeekableByteArrayInputStream(buf), buf.length);
-      this.cb = cb;
+      this(new SeekableByteArrayInputStream(buf), buf.length, cb);
     }
     
-    private CachedBlockRead(SeekableByteArrayInputStream seekableInput, long size) {
-      super(seekableInput, size);
-      this.seekableInput = seekableInput;
-    }
+    private CachedBlockRead(SeekableByteArrayInputStream seekableInput, long size, CacheEntry
cb) {
+        super(seekableInput, size);
+        this.seekableInput = seekableInput;
+        this.cb = cb;
+      }
 
     @Override
     public void seek(int position) {

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/BoundedRangeFileInputStream.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/BoundedRangeFileInputStream.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/BoundedRangeFileInputStream.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/BoundedRangeFileInputStream.java
Thu Dec 20 19:29:37 2012
@@ -93,14 +93,15 @@ class BoundedRangeFileInputStream extend
     if (n == 0)
       return -1;
     Integer ret = 0;
-    synchronized (in) {
-      in.seek(pos);
+    final FSDataInputStream inLocal = in;
+    synchronized (inLocal) {
+    	inLocal.seek(pos);
       try {
         ret = AccessController.doPrivileged(new PrivilegedExceptionAction<Integer>()
{
           @Override
           public Integer run() throws IOException {
             int ret = 0;
-            ret = in.read(b, off, n);
+            ret = inLocal.read(b, off, n);
             return ret;
           }
         });

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/iterators/system/SourceSwitchingIterator.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/iterators/system/SourceSwitchingIterator.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/iterators/system/SourceSwitchingIterator.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/iterators/system/SourceSwitchingIterator.java
Thu Dec 20 19:29:37 2012
@@ -57,7 +57,7 @@ public class SourceSwitchingIterator imp
   private boolean onlySwitchAfterRow;
   private AtomicBoolean iflag;
   
-  private List<SourceSwitchingIterator> copies;
+  private final List<SourceSwitchingIterator> copies;
   
   private SourceSwitchingIterator(DataSource source, boolean onlySwitchAfterRow, List<SourceSwitchingIterator>
copies, AtomicBoolean iflag) {
     this.source = source;

Modified: accumulo/trunk/fate/src/test/java/org/apache/accumulo/fate/zookeeper/DistributedReadWriteLockTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/fate/src/test/java/org/apache/accumulo/fate/zookeeper/DistributedReadWriteLockTest.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/fate/src/test/java/org/apache/accumulo/fate/zookeeper/DistributedReadWriteLockTest.java
(original)
+++ accumulo/trunk/fate/src/test/java/org/apache/accumulo/fate/zookeeper/DistributedReadWriteLockTest.java
Thu Dec 20 19:29:37 2012
@@ -32,7 +32,7 @@ public class DistributedReadWriteLockTes
   public static class MockQueueLock implements QueueLock {
     
     long next = 0L;
-    SortedMap<Long,byte[]> locks = new TreeMap<Long,byte[]>();
+    final SortedMap<Long,byte[]> locks = new TreeMap<Long,byte[]>();
     
     @Override
     synchronized public SortedMap<Long,byte[]> getEarlierEntries(long entry) {
@@ -85,8 +85,8 @@ public class DistributedReadWriteLockTes
     QueueLock qlock = new MockQueueLock();
     
     final ReadWriteLock locker = new DistributedReadWriteLock(qlock, "locker1".getBytes());
-    Lock readLock = locker.readLock();
-    Lock writeLock = locker.writeLock();
+    final Lock readLock = locker.readLock();
+    final Lock writeLock = locker.writeLock();
     readLock.lock();
     readLock.unlock();
     writeLock.lock();
@@ -101,7 +101,7 @@ public class DistributedReadWriteLockTes
       threads[i] = new Thread() {
         public void run() {
           if (which % 2 == 0) {
-            Lock wl = locker.writeLock();
+            final Lock wl = locker.writeLock();
             wl.lock();
             try {
               data.write();
@@ -109,7 +109,7 @@ public class DistributedReadWriteLockTes
               wl.unlock();
             }
           } else {
-            Lock rl = locker.readLock();
+            final Lock rl = locker.readLock();
             rl.lock();
             data.read();
             try {

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/client/BulkImporter.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/client/BulkImporter.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/client/BulkImporter.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/client/BulkImporter.java
Thu Dec 20 19:29:37 2012
@@ -431,7 +431,7 @@ public class BulkImporter {
   }
   
   private class AssignmentTask implements Runnable {
-    Map<Path,List<KeyExtent>> assignmentFailures;
+    final Map<Path,List<KeyExtent>> assignmentFailures;
     String location;
     AuthInfo credentials;
     private Map<KeyExtent,List<PathSize>> assignmentsPerTablet;

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/conf/ServerConfiguration.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/conf/ServerConfiguration.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/conf/ServerConfiguration.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/conf/ServerConfiguration.java
Thu Dec 20 19:29:37 2012
@@ -30,7 +30,7 @@ import org.apache.accumulo.core.data.Key
 
 public class ServerConfiguration {
   
-  private static Map<String,TableConfiguration> tableInstances = new HashMap<String,TableConfiguration>(1);
+  private static final Map<String,TableConfiguration> tableInstances = new HashMap<String,TableConfiguration>(1);
   private static SecurityPermission CONFIGURATION_PERMISSION = new SecurityPermission("configurationPermission");
   
   public static synchronized SiteConfiguration getSiteConfiguration() {

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/conf/ZooConfiguration.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/conf/ZooConfiguration.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/conf/ZooConfiguration.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/conf/ZooConfiguration.java
Thu Dec 20 19:29:37 2012
@@ -42,7 +42,7 @@ public class ZooConfiguration extends Ac
   private static ZooConfiguration instance = null;
   private static String instanceId = null;
   private static ZooCache propCache = null;
-  private Map<String,String> fixedProps = Collections.synchronizedMap(new HashMap<String,String>());
+  private final Map<String,String> fixedProps = Collections.synchronizedMap(new HashMap<String,String>());
   
   private ZooConfiguration(AccumuloConfiguration parent) {
     this.parent = parent;

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java Thu
Dec 20 19:29:37 2012
@@ -220,7 +220,7 @@ public class Master implements LiveTServ
   volatile private SortedMap<TServerInstance,TabletServerStatus> tserverStatus = Collections
       .unmodifiableSortedMap(new TreeMap<TServerInstance,TabletServerStatus>());
   
-  private Set<String> recoveriesInProgress = Collections.synchronizedSet(new HashSet<String>());
+  private final Set<String> recoveriesInProgress = Collections.synchronizedSet(new
HashSet<String>());
 
   synchronized private MasterState getMasterState() {
     return state;

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java
Thu Dec 20 19:29:37 2012
@@ -51,7 +51,7 @@ public class MetricsConfiguration {
   
   private Configuration config = null;
   
-  private Object lock = new Object();
+  private final Object lock = new Object();
   
   private boolean needsReloading = false;
   

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/Monitor.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/Monitor.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/Monitor.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/Monitor.java Thu
Dec 20 19:29:37 2012
@@ -121,18 +121,18 @@ public class Monitor {
   }
   
   private static final int MAX_TIME_PERIOD = 60 * 60 * 1000;
-  private static List<Pair<Long,Double>> loadOverTime = Collections.synchronizedList(new
MaxList<Double>(MAX_TIME_PERIOD));
-  private static List<Pair<Long,Double>> ingestRateOverTime = Collections.synchronizedList(new
MaxList<Double>(MAX_TIME_PERIOD));
-  private static List<Pair<Long,Double>> ingestByteRateOverTime = Collections.synchronizedList(new
MaxList<Double>(MAX_TIME_PERIOD));
-  private static List<Pair<Long,Integer>> recoveriesOverTime = Collections.synchronizedList(new
MaxList<Integer>(MAX_TIME_PERIOD));
-  private static List<Pair<Long,Integer>> minorCompactionsOverTime = Collections.synchronizedList(new
MaxList<Integer>(MAX_TIME_PERIOD));
-  private static List<Pair<Long,Integer>> majorCompactionsOverTime = Collections.synchronizedList(new
MaxList<Integer>(MAX_TIME_PERIOD));
-  private static List<Pair<Long,Double>> lookupsOverTime = Collections.synchronizedList(new
MaxList<Double>(MAX_TIME_PERIOD));
-  private static List<Pair<Long,Integer>> queryRateOverTime = Collections.synchronizedList(new
MaxList<Integer>(MAX_TIME_PERIOD));
-  private static List<Pair<Long,Integer>> scanRateOverTime = Collections.synchronizedList(new
MaxList<Integer>(MAX_TIME_PERIOD));
-  private static List<Pair<Long,Double>> queryByteRateOverTime = Collections.synchronizedList(new
MaxList<Double>(MAX_TIME_PERIOD));
-  private static List<Pair<Long,Double>> indexCacheHitRateOverTime = Collections.synchronizedList(new
MaxList<Double>(MAX_TIME_PERIOD));
-  private static List<Pair<Long,Double>> dataCacheHitRateOverTime = Collections.synchronizedList(new
MaxList<Double>(MAX_TIME_PERIOD));
+  private static final List<Pair<Long,Double>> loadOverTime = Collections.synchronizedList(new
MaxList<Double>(MAX_TIME_PERIOD));
+  private static final List<Pair<Long,Double>> ingestRateOverTime = Collections.synchronizedList(new
MaxList<Double>(MAX_TIME_PERIOD));
+  private static final List<Pair<Long,Double>> ingestByteRateOverTime = Collections.synchronizedList(new
MaxList<Double>(MAX_TIME_PERIOD));
+  private static final List<Pair<Long,Integer>> recoveriesOverTime = Collections.synchronizedList(new
MaxList<Integer>(MAX_TIME_PERIOD));
+  private static final List<Pair<Long,Integer>> minorCompactionsOverTime = Collections.synchronizedList(new
MaxList<Integer>(MAX_TIME_PERIOD));
+  private static final List<Pair<Long,Integer>> majorCompactionsOverTime = Collections.synchronizedList(new
MaxList<Integer>(MAX_TIME_PERIOD));
+  private static final List<Pair<Long,Double>> lookupsOverTime = Collections.synchronizedList(new
MaxList<Double>(MAX_TIME_PERIOD));
+  private static final List<Pair<Long,Integer>> queryRateOverTime = Collections.synchronizedList(new
MaxList<Integer>(MAX_TIME_PERIOD));
+  private static final List<Pair<Long,Integer>> scanRateOverTime = Collections.synchronizedList(new
MaxList<Integer>(MAX_TIME_PERIOD));
+  private static final List<Pair<Long,Double>> queryByteRateOverTime = Collections.synchronizedList(new
MaxList<Double>(MAX_TIME_PERIOD));
+  private static final List<Pair<Long,Double>> indexCacheHitRateOverTime = Collections.synchronizedList(new
MaxList<Double>(MAX_TIME_PERIOD));
+  private static final List<Pair<Long,Double>> dataCacheHitRateOverTime = Collections.synchronizedList(new
MaxList<Double>(MAX_TIME_PERIOD));
   private static EventCounter lookupRateTracker = new EventCounter();
   private static EventCounter indexCacheHitTracker = new EventCounter();
   private static EventCounter indexCacheRequestTracker = new EventCounter();

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
Thu Dec 20 19:29:37 2012
@@ -55,7 +55,7 @@ public class ProblemReports implements I
   
   private static final Logger log = Logger.getLogger(ProblemReports.class);
   
-  private LRUMap problemReports = new LRUMap(1000);
+  private final LRUMap problemReports = new LRUMap(1000);
   
   /*
    * use a thread pool so that reporting a problem never blocks

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/InMemoryMap.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/InMemoryMap.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/InMemoryMap.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/InMemoryMap.java
Thu Dec 20 19:29:37 2012
@@ -387,7 +387,7 @@ public class InMemoryMap {
     return map.size();
   }
   
-  private Set<MemoryIterator> activeIters = Collections.synchronizedSet(new HashSet<MemoryIterator>());
+  private final Set<MemoryIterator> activeIters = Collections.synchronizedSet(new HashSet<MemoryIterator>());
   
   class MemoryDataSource implements DataSource {
     

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/NativeMap.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/NativeMap.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/NativeMap.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/NativeMap.java
Thu Dec 20 19:29:37 2012
@@ -59,9 +59,9 @@ public class NativeMap implements Iterab
   
   private long nmPointer;
   
-  private ReadWriteLock rwLock;
-  private Lock rlock;
-  private Lock wlock;
+  private final ReadWriteLock rwLock;
+  private final Lock rlock;
+  private final Lock wlock;
   
   int modCount = 0;
   

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
Thu Dec 20 19:29:37 2012
@@ -371,9 +371,9 @@ public class Tablet {
   
   private TabletMemory tabletMemory;
   
-  private TabletTime tabletTime;
+  private final TabletTime tabletTime;
   private long persistedTime;
-  private Object timeLock = new Object();
+  private final Object timeLock = new Object();
   
   private Path location; // absolute path of this tablets dir
   private TServerInstance lastLocation;
@@ -447,7 +447,7 @@ public class Tablet {
   
   private final int logId;
   // ensure we only have one reader/writer of our bulk file notes at at time
-  public Object bulkFileImportLock = new Object();
+  public final Object bulkFileImportLock = new Object();
   
   public int getLogId() {
     return logId;
@@ -3710,7 +3710,7 @@ public class Tablet {
   private boolean removingLogs = false;
   
   // this lock is basically used to synchronize writing of log info to !METADATA
-  private ReentrantLock logLock = new ReentrantLock();
+  private final ReentrantLock logLock = new ReentrantLock();
   
   public synchronized int getLogCount() {
     return currentLogs.size();

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
Thu Dec 20 19:29:37 2012
@@ -2572,11 +2572,11 @@ public class TabletServer extends Abstra
   private FileSystem fs;
   private Instance instance;
   
-  private SortedMap<KeyExtent,Tablet> onlineTablets = Collections.synchronizedSortedMap(new
TreeMap<KeyExtent,Tablet>());
-  private SortedSet<KeyExtent> unopenedTablets = Collections.synchronizedSortedSet(new
TreeSet<KeyExtent>());
-  private SortedSet<KeyExtent> openingTablets = Collections.synchronizedSortedSet(new
TreeSet<KeyExtent>());
+  private final SortedMap<KeyExtent,Tablet> onlineTablets = Collections.synchronizedSortedMap(new
TreeMap<KeyExtent,Tablet>());
+  private final SortedSet<KeyExtent> unopenedTablets = Collections.synchronizedSortedSet(new
TreeSet<KeyExtent>());
+  private final SortedSet<KeyExtent> openingTablets = Collections.synchronizedSortedSet(new
TreeSet<KeyExtent>());
   @SuppressWarnings("unchecked")
-  private Map<KeyExtent,Long> recentlyUnloadedCache = (Map<KeyExtent, Long>)Collections.synchronizedMap(new
LRUMap(1000));
+  private final Map<KeyExtent,Long> recentlyUnloadedCache = (Map<KeyExtent, Long>)Collections.synchronizedMap(new
LRUMap(1000));
   
   private Thread majorCompactorThread;
   

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServerResourceManager.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServerResourceManager.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServerResourceManager.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServerResourceManager.java
Thu Dec 20 19:29:37 2012
@@ -250,7 +250,7 @@ public class TabletServerResourceManager
   }
   
   private class MemoryManagementFramework {
-    private Map<KeyExtent,TabletStateImpl> tabletReports;
+    private final Map<KeyExtent,TabletStateImpl> tabletReports;
     private LinkedBlockingQueue<TabletStateImpl> memUsageReports;
     private long lastMemCheckTime = System.currentTimeMillis();
     private long maxMem;
@@ -378,7 +378,7 @@ public class TabletServerResourceManager
     }
   }
   
-  private Object commitHold = new String("");
+  private final Object commitHold = new Object();
   private volatile boolean holdCommits = false;
   private long holdStartTime;
   

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/log/DfsLogger.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/log/DfsLogger.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/log/DfsLogger.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/log/DfsLogger.java
Thu Dec 20 19:29:37 2012
@@ -73,7 +73,7 @@ public class DfsLogger {
 
   private LinkedBlockingQueue<DfsLogger.LogWork> workQueue = new LinkedBlockingQueue<DfsLogger.LogWork>();
   
-  private String closeLock = new String("foo");
+  private final Object closeLock = new Object();
   
   private static final DfsLogger.LogWork CLOSED_MARKER = new DfsLogger.LogWork(null, null);
   

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/log/LogSorter.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/log/LogSorter.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/log/LogSorter.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/log/LogSorter.java
Thu Dec 20 19:29:37 2012
@@ -56,7 +56,7 @@ public class LogSorter {
   FileSystem fs;
   AccumuloConfiguration conf;
   
-  private Map<String,LogProcessor> currentWork = Collections.synchronizedMap(new HashMap<String,LogProcessor>());
+  private final Map<String,LogProcessor> currentWork = Collections.synchronizedMap(new
HashMap<String,LogProcessor>());
 
   class LogProcessor implements Processor {
     

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/log/TabletServerLogger.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/log/TabletServerLogger.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/log/TabletServerLogger.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/log/TabletServerLogger.java
Thu Dec 20 19:29:37 2012
@@ -70,7 +70,7 @@ public class TabletServerLogger {
   private AtomicInteger logSetId = new AtomicInteger();
   
   // Use a ReadWriteLock to allow multiple threads to use the log set, but obtain a write
lock to change them
-  private ReentrantReadWriteLock logSetLock = new ReentrantReadWriteLock();
+  private final ReentrantReadWriteLock logSetLock = new ReentrantReadWriteLock();
   
   private final AtomicInteger seqGen = new AtomicInteger();
   
@@ -97,7 +97,7 @@ public class TabletServerLogger {
    *          a test/work pair
    * @throws IOException
    */
-  private static void testLockAndRun(ReadWriteLock rwlock, TestCallWithWriteLock code) throws
IOException {
+  private static void testLockAndRun(final ReadWriteLock rwlock, TestCallWithWriteLock code)
throws IOException {
     // Get a read lock
     rwlock.readLock().lock();
     try {

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooQueueLock.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooQueueLock.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooQueueLock.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooQueueLock.java
Thu Dec 20 19:29:37 2012
@@ -32,11 +32,11 @@ public class ZooQueueLock extends org.ap
     ZooQueueLock lock = new ZooQueueLock("/lock", true);
     DistributedReadWriteLock rlocker = new DistributedReadWriteLock(lock, "reader".getBytes());
     DistributedReadWriteLock wlocker = new DistributedReadWriteLock(lock, "wlocker".getBytes());
-    Lock readLock = rlocker.readLock();
+    final Lock readLock = rlocker.readLock();
     readLock.lock();
-    Lock readLock2 = rlocker.readLock();
+    final Lock readLock2 = rlocker.readLock();
     readLock2.lock();
-    Lock writeLock = wlocker.writeLock();
+    final Lock writeLock = wlocker.writeLock();
     if (writeLock.tryLock(100, TimeUnit.MILLISECONDS))
       throw new RuntimeException("Write lock achieved during read lock!");
     readLock.unlock();
@@ -44,7 +44,7 @@ public class ZooQueueLock extends org.ap
     writeLock.lock();
     if (readLock.tryLock(100, TimeUnit.MILLISECONDS))
       throw new RuntimeException("Read lock achieved during write lock!");
-    Lock writeLock2 = DistributedReadWriteLock.recoverLock(lock, "wlocker".getBytes());
+    final Lock writeLock2 = DistributedReadWriteLock.recoverLock(lock, "wlocker".getBytes());
     writeLock2.unlock();
     readLock.lock();
     System.out.println("success");

Modified: accumulo/trunk/start/src/main/java/org/apache/accumulo/start/classloader/AccumuloClassLoader.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/start/src/main/java/org/apache/accumulo/start/classloader/AccumuloClassLoader.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/start/src/main/java/org/apache/accumulo/start/classloader/AccumuloClassLoader.java
(original)
+++ accumulo/trunk/start/src/main/java/org/apache/accumulo/start/classloader/AccumuloClassLoader.java
Thu Dec 20 19:29:37 2012
@@ -144,7 +144,7 @@ public class AccumuloClassLoader {
   private static ClassLoader parent = null;
   private static volatile ClassLoader loader = null;
   private static AccumuloFilesystemAlterationMonitor monitor = null;
-  private static Object lock = new Object();
+  private static final Object lock = new Object();
   
   private static ArrayList<URL> findDynamicURLs() throws IOException {
     StringBuilder cp = new StringBuilder(getAccumuloDynamicClasspathStrings());

Modified: accumulo/trunk/trace/src/main/java/org/apache/accumulo/cloudtrace/instrument/receivers/AsyncSpanReceiver.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/trace/src/main/java/org/apache/accumulo/cloudtrace/instrument/receivers/AsyncSpanReceiver.java?rev=1424648&r1=1424647&r2=1424648&view=diff
==============================================================================
--- accumulo/trunk/trace/src/main/java/org/apache/accumulo/cloudtrace/instrument/receivers/AsyncSpanReceiver.java
(original)
+++ accumulo/trunk/trace/src/main/java/org/apache/accumulo/cloudtrace/instrument/receivers/AsyncSpanReceiver.java
Thu Dec 20 19:29:37 2012
@@ -51,7 +51,7 @@ public abstract class AsyncSpanReceiver<
   protected abstract SpanKey getSpanKey(Map<String,String> data);
   
   Timer timer = new Timer("SpanSender", true);
-  AbstractQueue<RemoteSpan> sendQueue = new ConcurrentLinkedQueue<RemoteSpan>();
+  final AbstractQueue<RemoteSpan> sendQueue = new ConcurrentLinkedQueue<RemoteSpan>();
   
   public AsyncSpanReceiver(String host, String service, long millis) {
     this.host = host;



Mime
View raw message