accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [1/8] ACCUMULO-1961 Fix warnings
Date Tue, 03 Dec 2013 21:16:27 GMT
Updated Branches:
  refs/heads/1.5.1-SNAPSHOT 39260cb90 -> cccdb8cb4


http://git-wip-us.apache.org/repos/asf/accumulo/blob/a3a88955/src/server/src/main/java/org/apache/accumulo/server/test/CreateRandomMapFile.java
----------------------------------------------------------------------
diff --git a/src/server/src/main/java/org/apache/accumulo/server/test/CreateRandomMapFile.java
b/src/server/src/main/java/org/apache/accumulo/server/test/CreateRandomMapFile.java
index 2472107..6f63147 100644
--- a/src/server/src/main/java/org/apache/accumulo/server/test/CreateRandomMapFile.java
+++ b/src/server/src/main/java/org/apache/accumulo/server/test/CreateRandomMapFile.java
@@ -33,6 +33,7 @@ import org.apache.hadoop.io.Text;
 /**
  * @deprecated since 1.4 (will become CreateRandomRFile)
  */
+@Deprecated
 public class CreateRandomMapFile {
   private static int num;
   private static String file;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a3a88955/src/server/src/main/java/org/apache/accumulo/server/test/DumpMapFile.java
----------------------------------------------------------------------
diff --git a/src/server/src/main/java/org/apache/accumulo/server/test/DumpMapFile.java b/src/server/src/main/java/org/apache/accumulo/server/test/DumpMapFile.java
index f29ca76..91439dd 100644
--- a/src/server/src/main/java/org/apache/accumulo/server/test/DumpMapFile.java
+++ b/src/server/src/main/java/org/apache/accumulo/server/test/DumpMapFile.java
@@ -29,6 +29,7 @@ import org.apache.log4j.Logger;
 /**
  * @deprecated since 1.4
  */
+@Deprecated
 public class DumpMapFile {
   private static final Logger log = Logger.getLogger(DumpMapFile.class);
   

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a3a88955/src/server/src/main/java/org/apache/accumulo/server/test/MMFITest.java
----------------------------------------------------------------------
diff --git a/src/server/src/main/java/org/apache/accumulo/server/test/MMFITest.java b/src/server/src/main/java/org/apache/accumulo/server/test/MMFITest.java
index 14fbe26..4bc94e3 100644
--- a/src/server/src/main/java/org/apache/accumulo/server/test/MMFITest.java
+++ b/src/server/src/main/java/org/apache/accumulo/server/test/MMFITest.java
@@ -38,6 +38,7 @@ import org.apache.hadoop.io.Text;
 /**
  * @deprecated since 1.4
  */
+@Deprecated
 public class MMFITest {
   private static MyMapFile.Reader[] mapfiles = null;
   private static Text startRow;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a3a88955/src/server/src/main/java/org/apache/accumulo/server/test/MidPointPerfTest2.java
----------------------------------------------------------------------
diff --git a/src/server/src/main/java/org/apache/accumulo/server/test/MidPointPerfTest2.java
b/src/server/src/main/java/org/apache/accumulo/server/test/MidPointPerfTest2.java
index 52094d0..2029b82 100644
--- a/src/server/src/main/java/org/apache/accumulo/server/test/MidPointPerfTest2.java
+++ b/src/server/src/main/java/org/apache/accumulo/server/test/MidPointPerfTest2.java
@@ -39,6 +39,7 @@ import org.apache.hadoop.io.WritableComparable;
 /**
  * @deprecated since 1.4
  */
+@Deprecated
 class MultipleIndexIterator2 {
   
   private MySequenceFile.Reader[] readers;
@@ -125,6 +126,7 @@ class MultipleIndexIterator2 {
 /**
  * @deprecated since 1.4
  */
+@Deprecated
 public class MidPointPerfTest2 {
   private static String dir;
   private static int numFiles;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a3a88955/src/server/src/main/java/org/apache/accumulo/server/util/CountDiskRows.java
----------------------------------------------------------------------
diff --git a/src/server/src/main/java/org/apache/accumulo/server/util/CountDiskRows.java b/src/server/src/main/java/org/apache/accumulo/server/util/CountDiskRows.java
index 3b7ea1d..f837721 100644
--- a/src/server/src/main/java/org/apache/accumulo/server/util/CountDiskRows.java
+++ b/src/server/src/main/java/org/apache/accumulo/server/util/CountDiskRows.java
@@ -33,6 +33,7 @@ import org.apache.log4j.Logger;
 /**
  * @deprecated since 1.4
  */
+@Deprecated
 public class CountDiskRows {
   
   private static final Logger log = Logger.getLogger(CountDiskRows.class);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a3a88955/src/server/src/main/java/org/apache/accumulo/server/util/DumpMapFile.java
----------------------------------------------------------------------
diff --git a/src/server/src/main/java/org/apache/accumulo/server/util/DumpMapFile.java b/src/server/src/main/java/org/apache/accumulo/server/util/DumpMapFile.java
index 36c5b7e..dfcc6da 100644
--- a/src/server/src/main/java/org/apache/accumulo/server/util/DumpMapFile.java
+++ b/src/server/src/main/java/org/apache/accumulo/server/util/DumpMapFile.java
@@ -29,6 +29,7 @@ import org.apache.log4j.Logger;
 /**
  * @deprecated
  */
+@Deprecated
 public class DumpMapFile {
   private static final Logger log = Logger.getLogger(DumpMapFile.class);
   

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a3a88955/src/server/src/main/java/org/apache/accumulo/server/util/DumpTable.java
----------------------------------------------------------------------
diff --git a/src/server/src/main/java/org/apache/accumulo/server/util/DumpTable.java b/src/server/src/main/java/org/apache/accumulo/server/util/DumpTable.java
index 08836da..d642fc9 100644
--- a/src/server/src/main/java/org/apache/accumulo/server/util/DumpTable.java
+++ b/src/server/src/main/java/org/apache/accumulo/server/util/DumpTable.java
@@ -32,6 +32,7 @@ import org.apache.log4j.Logger;
 /**
  * @deprecated since 1.4
  */
+@Deprecated
 public class DumpTable {
   private static final Logger log = Logger.getLogger(DumpTable.class);
   

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a3a88955/src/server/src/main/java/org/apache/accumulo/server/util/MapFilePerformanceTest.java
----------------------------------------------------------------------
diff --git a/src/server/src/main/java/org/apache/accumulo/server/util/MapFilePerformanceTest.java
b/src/server/src/main/java/org/apache/accumulo/server/util/MapFilePerformanceTest.java
index 1e5170d..2efaa97 100644
--- a/src/server/src/main/java/org/apache/accumulo/server/util/MapFilePerformanceTest.java
+++ b/src/server/src/main/java/org/apache/accumulo/server/util/MapFilePerformanceTest.java
@@ -46,6 +46,7 @@ import org.apache.hadoop.io.Text;
 /**
  * @deprecated since 1.4
  */
+@Deprecated
 public class MapFilePerformanceTest {
   
   public static String[] createMapFiles(String input, String output, int blocksize, int mapFiles)
throws IOException {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a3a88955/src/server/src/main/java/org/apache/accumulo/server/util/OfflineMetadataScanner.java
----------------------------------------------------------------------
diff --git a/src/server/src/main/java/org/apache/accumulo/server/util/OfflineMetadataScanner.java
b/src/server/src/main/java/org/apache/accumulo/server/util/OfflineMetadataScanner.java
index 2487195..2584323 100644
--- a/src/server/src/main/java/org/apache/accumulo/server/util/OfflineMetadataScanner.java
+++ b/src/server/src/main/java/org/apache/accumulo/server/util/OfflineMetadataScanner.java
@@ -56,10 +56,10 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 
 public class OfflineMetadataScanner extends ScannerOptions implements Scanner {
-  
+
   private Set<String> allFiles = new HashSet<String>();
   private Range range = new Range();
-  
+
   private List<SortedKeyValueIterator<Key,Value>> openMapFiles(Collection<String>
files, FileSystem fs, Configuration conf) throws IOException {
     List<SortedKeyValueIterator<Key,Value>> readers = new ArrayList<SortedKeyValueIterator<Key,Value>>();
     for (String file : files) {
@@ -68,7 +68,7 @@ public class OfflineMetadataScanner extends ScannerOptions implements Scanner
{
     }
     return readers;
   }
-  
+
   private SortedKeyValueIterator<Key,Value> createSystemIter(Range r, List<SortedKeyValueIterator<Key,Value>>
readers, HashSet<Column> columns)
       throws IOException {
     MultiIterator multiIterator = new MultiIterator(readers, false);
@@ -76,77 +76,77 @@ public class OfflineMetadataScanner extends ScannerOptions implements
Scanner {
     ColumnFamilySkippingIterator cfsi = new ColumnFamilySkippingIterator(delIter);
     ColumnQualifierFilter colFilter = new ColumnQualifierFilter(cfsi, columns);
     VisibilityFilter visFilter = new VisibilityFilter(colFilter, Constants.NO_AUTHS, new
byte[0]);
-    
+
     visFilter.seek(r, LocalityGroupUtil.EMPTY_CF_SET, false);
-    
+
     VersioningIterator vi = new VersioningIterator();
     Map<String,String> opts = new HashMap<String,String>();
     opts.put("maxVersions", "1");
     vi.init(visFilter, opts, null);
-    
+
     return vi;
   }
-  
+
   private static class MyEntry implements Map.Entry<Key,Value> {
-    
+
     private Key k;
     private Value v;
-    
+
     MyEntry(Key k, Value v) {
       this.k = k;
       this.v = v;
     }
-    
+
     @Override
     public Key getKey() {
       return k;
     }
-    
+
     @Override
     public Value getValue() {
       return v;
     }
-    
+
     @Override
     public Value setValue(Value value) {
       throw new UnsupportedOperationException();
     }
-    
+
   }
-  
+
   public OfflineMetadataScanner() throws IOException {
     super();
-    
+
     List<LogEntry> rwal;
     try {
       rwal = MetadataTable.getLogEntries(null, Constants.ROOT_TABLET_EXTENT);
     } catch (Exception e) {
       throw new RuntimeException("Failed to check if root tablet has write ahead log entries",
e);
     }
-    
+
     if (rwal.size() > 0) {
       throw new RuntimeException("Root tablet has write ahead logs, can not scan offline");
     }
-    
+
     Configuration conf = CachedConfiguration.getInstance();
     FileSystem fs = FileSystem.get(conf);
-    
+
     FileStatus[] rootFiles = fs.listStatus(new Path(ServerConstants.getRootTabletDir()));
-    
+
     for (FileStatus rootFile : rootFiles) {
       allFiles.add(rootFile.getPath().toString());
     }
-    
+
     List<SortedKeyValueIterator<Key,Value>> readers = openMapFiles(allFiles,
fs, conf);
-    
+
     HashSet<Column> columns = new HashSet<Column>();
     columns.add(new Column(TextUtil.getBytes(Constants.METADATA_DATAFILE_COLUMN_FAMILY),
null, null));
     columns.add(new Column(TextUtil.getBytes(Constants.METADATA_LOG_COLUMN_FAMILY), null,
null));
-    
+
     SortedKeyValueIterator<Key,Value> ssi = createSystemIter(new Range(), readers,
columns);
-    
+
     int walogs = 0;
-    
+
     while (ssi.hasTop()) {
       if (ssi.getTopKey().compareColumnFamily(Constants.METADATA_DATAFILE_COLUMN_FAMILY)
== 0) {
         allFiles.add(ServerConstants.getMetadataTableDir() + "/" + ssi.getTopKey().getColumnQualifier().toString());
@@ -155,38 +155,38 @@ public class OfflineMetadataScanner extends ScannerOptions implements
Scanner {
       }
       ssi.next();
     }
-    
+
     closeReaders(readers);
-    
+
     if (walogs > 0) {
       throw new RuntimeException("Metadata tablets have write ahead logs, can not scan offline");
     }
   }
-  
+
   private void closeReaders(List<SortedKeyValueIterator<Key,Value>> readers)
throws IOException {
     for (SortedKeyValueIterator<Key,Value> reader : readers) {
       ((FileSKVIterator) reader).close();
     }
   }
-  
+
   @Override
   public int getBatchSize() {
     throw new UnsupportedOperationException();
   }
-  
+
   @Override
   public Range getRange() {
     return range;
   }
-  
+
   @Override
   public int getTimeOut() {
     throw new UnsupportedOperationException();
   }
-  
+
   @Override
   public Iterator<Entry<Key,Value>> iterator() {
-    
+
     final SortedKeyValueIterator<Key,Value> ssi;
     final List<SortedKeyValueIterator<Key,Value>> readers;
     try {
@@ -197,20 +197,20 @@ public class OfflineMetadataScanner extends ScannerOptions implements
Scanner {
     } catch (IOException e) {
       throw new RuntimeException(e);
     }
-    
+
     return new Iterator<Entry<Key,Value>>() {
-      
+
       @Override
       public boolean hasNext() {
         return ssi.hasTop() && range.contains(ssi.getTopKey());
       }
-      
+
       @Override
       public Entry<Key,Value> next() {
         if (!ssi.hasTop()) {
           throw new NoSuchElementException();
         }
-        
+
         MyEntry e = new MyEntry(new Key(ssi.getTopKey()), new Value(ssi.getTopValue()));
         try {
           ssi.next();
@@ -219,50 +219,51 @@ public class OfflineMetadataScanner extends ScannerOptions implements
Scanner {
         }
         return e;
       }
-      
+
       @Override
       public void remove() {
         throw new UnsupportedOperationException();
       }
-      
+
     };
   }
-  
+
   @Override
   public void setBatchSize(int size) {
     throw new UnsupportedOperationException();
   }
-  
+
   @Override
   public void setRange(Range range) {
     this.range = range;
   }
-  
+
   @Override
   public void setTimeOut(int timeOut) {
     throw new UnsupportedOperationException();
   }
-  
+
+  @Deprecated
   @Override
   public void setScanIterators(int priority, String iteratorClass, String iteratorName) {
     throw new UnsupportedOperationException();
   }
-  
+
   @Override
   public void enableIsolation() {
     // should always give an isolated view since it is scanning immutable files
   }
-  
+
   @Override
   public void disableIsolation() {
-    
+
   }
-  
+
   public static void main(String[] args) throws IOException {
     OfflineMetadataScanner scanner = new OfflineMetadataScanner();
     scanner.setRange(Constants.METADATA_KEYSPACE);
     for (Entry<Key,Value> entry : scanner)
       System.out.println(entry.getKey() + " " + entry.getValue());
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a3a88955/src/server/src/test/java/org/apache/accumulo/server/util/InitializeTest.java
----------------------------------------------------------------------
diff --git a/src/server/src/test/java/org/apache/accumulo/server/util/InitializeTest.java
b/src/server/src/test/java/org/apache/accumulo/server/util/InitializeTest.java
index 138a0ac..4a406aa 100644
--- a/src/server/src/test/java/org/apache/accumulo/server/util/InitializeTest.java
+++ b/src/server/src/test/java/org/apache/accumulo/server/util/InitializeTest.java
@@ -16,6 +16,14 @@
  */
 package org.apache.accumulo.server.util;
 
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
+import static org.easymock.EasyMock.replay;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
 import java.io.IOException;
 import java.net.URI;
 
@@ -25,12 +33,9 @@ import org.apache.accumulo.server.zookeeper.IZooReaderWriter;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
-import org.easymock.Capture;
-import static org.easymock.EasyMock.*;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import static org.junit.Assert.*;
 
 /**
  * This test is not thread-safe.


Mime
View raw message