accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject svn commit: r1432331 - 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/client/mock/ core/src/test/java/org/apache/accumulo/core...
Date Fri, 11 Jan 2013 23:22:54 GMT
Author: ctubbsii
Date: Fri Jan 11 23:22:54 2013
New Revision: 1432331

URL: http://svn.apache.org/viewvc?rev=1432331&view=rev
Log:
ACCUMULO-961 Document deprecated methods by adding missing annotations; no functional code
change here

Modified:
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/ClientSideIteratorScanner.java
    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/ConnectorImpl.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerImpl.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockScanner.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
    accumulo/trunk/core/src/test/java/org/apache/accumulo/core/client/admin/TableOperationsHelperTest.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/servlets/trace/NullScanner.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/trace/TraceFileSystem.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/OfflineMetadataScanner.java

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/ClientSideIteratorScanner.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/ClientSideIteratorScanner.java?rev=1432331&r1=1432330&r2=1432331&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/ClientSideIteratorScanner.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/ClientSideIteratorScanner.java
Fri Jan 11 23:22:54 2013
@@ -207,6 +207,7 @@ public class ClientSideIteratorScanner e
     return new IteratorAdapter(skvi);
   }
   
+  @Deprecated
   @Override
   public void setTimeOut(int timeOut) {
     if (timeOut == Integer.MAX_VALUE)
@@ -215,6 +216,7 @@ public class ClientSideIteratorScanner e
       setTimeout(timeOut, TimeUnit.SECONDS);
   }
   
+  @Deprecated
   @Override
   public int getTimeOut() {
     long timeout = getTimeout(TimeUnit.SECONDS);

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=1432331&r1=1432330&r2=1432331&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
Fri Jan 11 23:22:54 2013
@@ -173,6 +173,7 @@ public class IsolatedScanner extends Sca
   public static interface RowBuffer extends Iterable<Entry<Key,Value>> {
     void add(Entry<Key,Value> entry);
     
+    @Override
     Iterator<Entry<Key,Value>> iterator();
     
     void clear();
@@ -229,6 +230,7 @@ public class IsolatedScanner extends Sca
     return new RowBufferingIterator(scanner, this, range, timeOut, batchSize, bufferFactory);
   }
   
+  @Deprecated
   @Override
   public void setTimeOut(int timeOut) {
     if (timeOut == Integer.MAX_VALUE)
@@ -237,6 +239,7 @@ public class IsolatedScanner extends Sca
       setTimeout(timeOut, TimeUnit.SECONDS);
   }
   
+  @Deprecated
   @Override
   public int getTimeOut() {
     long timeout = getTimeout(TimeUnit.SECONDS);

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java?rev=1432331&r1=1432330&r2=1432331&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java
Fri Jan 11 23:22:54 2013
@@ -52,18 +52,19 @@ public class ConnectorImpl extends Conne
   private TableOperations tableops = null;
   private InstanceOperations instanceops = null;
   
-/**
-     * 
-     * Use {@link Instance#getConnector(String, byte[])}
-     * 
-     * @param instance
-     * @param user
-     * @param password
-     * @throws AccumuloException
-     * @throws AccumuloSecurityException
-     * @see Instance#getConnector(String user, byte[] password)
-     * @deprecated Not for client use
-     */
+  /**
+   * 
+   * Use {@link Instance#getConnector(String, byte[])}
+   * 
+   * @param instance
+   * @param user
+   * @param password
+   * @throws AccumuloException
+   * @throws AccumuloSecurityException
+   * @see Instance#getConnector(String user, byte[] password)
+   * @deprecated Not for client use
+   */
+  @Deprecated
   public ConnectorImpl(Instance instance, String user, byte[] password) throws AccumuloException,
AccumuloSecurityException {
     ArgumentChecker.notNull(instance, user, password);
     this.instance = instance;
@@ -104,6 +105,7 @@ public class ConnectorImpl extends Conne
     return new TabletServerBatchReader(instance, credentials, getTableId(tableName), authorizations,
numQueryThreads);
   }
   
+  @Deprecated
   @Override
   public BatchDeleter createBatchDeleter(String tableName, Authorizations authorizations,
int numQueryThreads, long maxMemory, long maxLatency,
       int maxWriteThreads) throws TableNotFoundException {
@@ -119,6 +121,7 @@ public class ConnectorImpl extends Conne
     return new TabletServerBatchDeleter(instance, credentials, getTableId(tableName), authorizations,
numQueryThreads, config);
   }
   
+  @Deprecated
   @Override
   public BatchWriter createBatchWriter(String tableName, long maxMemory, long maxLatency,
int maxWriteThreads) throws TableNotFoundException {
     ArgumentChecker.notNull(tableName);
@@ -132,6 +135,7 @@ public class ConnectorImpl extends Conne
     return new BatchWriterImpl(instance, credentials, getTableId(tableName), config);
   }
   
+  @Deprecated
   @Override
   public MultiTableBatchWriter createMultiTableBatchWriter(long maxMemory, long maxLatency,
int maxWriteThreads) {
     return new MultiTableBatchWriterImpl(instance, credentials, new BatchWriterConfig().setMaxMemory(maxMemory)

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java?rev=1432331&r1=1432330&r2=1432331&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java
Fri Jan 11 23:22:54 2013
@@ -104,7 +104,7 @@ class OfflineIterator implements Iterato
       return new MultiIterator(allIters, false);
     }
   }
-
+  
   private SortedKeyValueIterator<Key,Value> iter;
   private Range range;
   private KeyExtent currentExtent;
@@ -114,7 +114,7 @@ class OfflineIterator implements Iterato
   private Instance instance;
   private ScannerOptions options;
   private ArrayList<SortedKeyValueIterator<Key,Value>> readers;
-
+  
   /**
    * @param offlineScanner
    * @param instance
@@ -130,7 +130,7 @@ class OfflineIterator implements Iterato
     if (this.options.fetchedColumns.size() > 0) {
       this.range = range.bound(this.options.fetchedColumns.first(), this.options.fetchedColumns.last());
     }
-
+    
     this.tableId = table.toString();
     this.authorizations = authorizations;
     this.readers = new ArrayList<SortedKeyValueIterator<Key,Value>>();
@@ -141,12 +141,12 @@ class OfflineIterator implements Iterato
       
       while (iter != null && !iter.hasTop())
         nextTablet();
-
+      
     } catch (Exception e) {
       throw new RuntimeException(e);
     }
   }
-
+  
   @Override
   public boolean hasNext() {
     return iter != null && iter.hasTop();
@@ -158,7 +158,7 @@ class OfflineIterator implements Iterato
       byte[] v = iter.getTopValue().get();
       // copy just like tablet server does, do this before calling next
       KeyValue ret = new KeyValue(new Key(iter.getTopKey()), Arrays.copyOf(v, v.length));
-
+      
       iter.next();
       
       while (iter != null && !iter.hasTop())
@@ -195,19 +195,19 @@ class OfflineIterator implements Iterato
         iter = null;
         return;
       }
-
+      
       if (range.afterEndKey(new Key(currentExtent.getEndRow()).followingKey(PartialKey.ROW)))
{
         iter = null;
         return;
       }
-
+      
       nextRange = new Range(currentExtent.getMetadataEntry(), false, null, false);
     }
-
+    
     List<String> relFiles = new ArrayList<String>();
     
     Pair<KeyExtent,String> eloc = getTabletFiles(nextRange, relFiles);
-
+    
     while (eloc.getSecond() != null) {
       if (Tables.getTableState(instance, tableId) != TableState.OFFLINE) {
         Tables.clearCache(instance);
@@ -226,7 +226,7 @@ class OfflineIterator implements Iterato
     if (!extent.getTableId().toString().equals(tableId)) {
       throw new AccumuloException(" did not find tablets for table " + tableId + " " + extent);
     }
-
+    
     if (currentExtent != null && !extent.isPreviousExtent(currentExtent))
       throw new AccumuloException(" " + currentExtent + " is not previous extent " + extent);
     
@@ -259,7 +259,7 @@ class OfflineIterator implements Iterato
     while (row.hasNext()) {
       Entry<Key,Value> entry = row.next();
       Key key = entry.getKey();
-
+      
       if (key.getColumnFamily().equals(Constants.METADATA_DATAFILE_COLUMN_FAMILY)) {
         relFiles.add(key.getColumnQualifier().toString());
       }
@@ -272,11 +272,11 @@ class OfflineIterator implements Iterato
       if (Constants.METADATA_PREV_ROW_COLUMN.hasColumns(key)) {
         extent = new KeyExtent(key.getRow(), entry.getValue());
       }
-
+      
     }
     return new Pair<KeyExtent,String>(extent, location);
   }
-
+  
   /**
    * @param absFiles
    * @return
@@ -299,7 +299,7 @@ class OfflineIterator implements Iterato
     }
     
     readers.clear();
-
+    
     // TODO need to close files
     for (String file : absFiles) {
       FileSKVIterator reader = FileOperations.getInstance().openReader(file, false, fs, conf,
acuTableConf, null, null);
@@ -326,7 +326,7 @@ class OfflineIterator implements Iterato
     return iterEnv.getTopLevelIterator(IteratorUtil.loadIterators(IteratorScope.scan, visFilter,
extent, acuTableConf, options.serverSideIteratorList,
         options.serverSideIteratorOptions, iterEnv, false));
   }
-
+  
   @Override
   public void remove() {
     throw new UnsupportedOperationException();
@@ -354,18 +354,20 @@ public class OfflineScanner extends Scan
     this.credentials = credentials;
     this.tableId = new Text(tableId);
     this.range = new Range((Key) null, (Key) null);
-
+    
     this.authorizations = authorizations;
     
     this.batchSize = Constants.SCAN_BATCH_SIZE;
     this.timeOut = Integer.MAX_VALUE;
   }
-
+  
+  @Deprecated
   @Override
   public void setTimeOut(int timeOut) {
     this.timeOut = timeOut;
   }
   
+  @Deprecated
   @Override
   public int getTimeOut() {
     return timeOut;
@@ -405,5 +407,5 @@ public class OfflineScanner extends Scan
   public Iterator<Entry<Key,Value>> iterator() {
     return new OfflineIterator(this, instance, credentials, authorizations, tableId, range);
   }
-
+  
 }

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerImpl.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerImpl.java?rev=1432331&r1=1432330&r2=1432331&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerImpl.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerImpl.java
Fri Jan 11 23:22:54 2013
@@ -98,6 +98,7 @@ public class ScannerImpl extends Scanner
    * Returns an iterator over an accumulo table. This iterator uses the options that are
currently set on the scanner for its lifetime. So setting options on a
    * Scanner object will have no effect on existing iterators.
    */
+  @Override
   public synchronized Iterator<Entry<Key,Value>> iterator() {
     return new ScannerIterator(instance, credentials, table, authorizations, range, size,
getTimeOut(), this, isolated);
   }
@@ -112,6 +113,7 @@ public class ScannerImpl extends Scanner
     this.isolated = false;
   }
   
+  @Deprecated
   @Override
   public void setTimeOut(int timeOut) {
     if (timeOut == Integer.MAX_VALUE)
@@ -120,6 +122,7 @@ public class ScannerImpl extends Scanner
       setTimeout(timeOut, TimeUnit.SECONDS);
   }
   
+  @Deprecated
   @Override
   public int getTimeOut() {
     long timeout = getTimeout(TimeUnit.SECONDS);

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java?rev=1432331&r1=1432330&r2=1432331&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java
Fri Jan 11 23:22:54 2013
@@ -57,6 +57,7 @@ public class MockConnector extends Conne
     return acu.createBatchScanner(tableName, authorizations);
   }
   
+  @Deprecated
   @Override
   public BatchDeleter createBatchDeleter(String tableName, Authorizations authorizations,
int numQueryThreads, long maxMemory, long maxLatency,
       int maxWriteThreads) throws TableNotFoundException {
@@ -72,6 +73,7 @@ public class MockConnector extends Conne
         config.getMaxWriteThreads());
   }
   
+  @Deprecated
   @Override
   public BatchWriter createBatchWriter(String tableName, long maxMemory, long maxLatency,
int maxWriteThreads) throws TableNotFoundException {
     if (acu.tables.get(tableName) == null)
@@ -84,6 +86,7 @@ public class MockConnector extends Conne
     return createBatchWriter(tableName, config.getMaxMemory(), config.getMaxLatency(TimeUnit.MILLISECONDS),
config.getMaxWriteThreads());
   }
   
+  @Deprecated
   @Override
   public MultiTableBatchWriter createMultiTableBatchWriter(long maxMemory, long maxLatency,
int maxWriteThreads) {
     return new MockMultiTableBatchWriter(acu);

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockScanner.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockScanner.java?rev=1432331&r1=1432330&r2=1432331&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockScanner.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockScanner.java
Fri Jan 11 23:22:54 2013
@@ -39,6 +39,7 @@ public class MockScanner extends MockSca
     super(table, auths);
   }
   
+  @Deprecated
   @Override
   public void setTimeOut(int timeOut) {
     if (timeOut == Integer.MAX_VALUE)
@@ -47,6 +48,7 @@ public class MockScanner extends MockSca
       setTimeout(timeOut, TimeUnit.SECONDS);
   }
   
+  @Deprecated
   @Override
   public int getTimeOut() {
     long timeout = getTimeout(TimeUnit.SECONDS);

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java?rev=1432331&r1=1432330&r2=1432331&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
Fri Jan 11 23:22:54 2013
@@ -133,6 +133,7 @@ public class MockTableOperations extends
     acu.tables.put(newTableName, t);
   }
   
+  @Deprecated
   @Override
   public void flush(String tableName) throws AccumuloException, AccumuloSecurityException
{}
   

Modified: accumulo/trunk/core/src/test/java/org/apache/accumulo/core/client/admin/TableOperationsHelperTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/test/java/org/apache/accumulo/core/client/admin/TableOperationsHelperTest.java?rev=1432331&r1=1432330&r2=1432331&view=diff
==============================================================================
--- accumulo/trunk/core/src/test/java/org/apache/accumulo/core/client/admin/TableOperationsHelperTest.java
(original)
+++ accumulo/trunk/core/src/test/java/org/apache/accumulo/core/client/admin/TableOperationsHelperTest.java
Fri Jan 11 23:22:54 2013
@@ -112,6 +112,7 @@ public class TableOperationsHelperTest {
     public void rename(String oldTableName, String newTableName) throws AccumuloSecurityException,
TableNotFoundException, AccumuloException,
         TableExistsException {}
     
+    @Deprecated
     @Override
     public void flush(String tableName) throws AccumuloException, AccumuloSecurityException
{}
     

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/servlets/trace/NullScanner.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/servlets/trace/NullScanner.java?rev=1432331&r1=1432330&r2=1432331&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/servlets/trace/NullScanner.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/servlets/trace/NullScanner.java
Fri Jan 11 23:22:54 2013
@@ -31,7 +31,7 @@ public class NullScanner implements Scan
   
   @Override
   public void addScanIterator(IteratorSetting cfg) {}
-    
+  
   @Override
   public void updateScanIteratorOption(String iteratorName, String key, String value) {}
   
@@ -47,9 +47,11 @@ public class NullScanner implements Scan
   @Override
   public void clearScanIterators() {}
   
+  @Deprecated
   @Override
   public void setTimeOut(int timeOut) {}
   
+  @Deprecated
   @Override
   public int getTimeOut() {
     return 0;

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/trace/TraceFileSystem.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/trace/TraceFileSystem.java?rev=1432331&r1=1432330&r2=1432331&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/trace/TraceFileSystem.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/trace/TraceFileSystem.java
Fri Jan 11 23:22:54 2013
@@ -35,11 +35,10 @@ import org.apache.hadoop.fs.PathFilter;
 import org.apache.hadoop.fs.permission.FsPermission;
 import org.apache.hadoop.util.Progressable;
 
-
 // If FileSystem was an interface, we could use a Proxy, but it's not, so we have to override
everything manually
 
 public class TraceFileSystem extends FileSystem {
-
+  
   @Override
   public void setConf(Configuration conf) {
     Span span = Trace.start("setConf");
@@ -63,6 +62,7 @@ public class TraceFileSystem extends Fil
     }
   }
   
+  @Override
   public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws
IOException {
     Span span = Trace.start("getFileBlockLocations");
     try {
@@ -229,6 +229,7 @@ public class TraceFileSystem extends Fil
     }
   }
   
+  @Deprecated
   @Override
   public short getReplication(Path src) throws IOException {
     Span span = Trace.start("getReplication");
@@ -671,7 +672,7 @@ public class TraceFileSystem extends Fil
   public FileSystem getImplementation() {
     return impl;
   }
-
+  
   @Override
   public URI getUri() {
     Span span = Trace.start("getUri");

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/OfflineMetadataScanner.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/OfflineMetadataScanner.java?rev=1432331&r1=1432330&r2=1432331&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/OfflineMetadataScanner.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/OfflineMetadataScanner.java
Fri Jan 11 23:22:54 2013
@@ -180,6 +180,7 @@ public class OfflineMetadataScanner exte
     return range;
   }
   
+  @Deprecated
   @Override
   public int getTimeOut() {
     throw new UnsupportedOperationException();
@@ -237,6 +238,7 @@ public class OfflineMetadataScanner exte
     this.range = range;
   }
   
+  @Deprecated
   @Override
   public void setTimeOut(int timeOut) {
     throw new UnsupportedOperationException();



Mime
View raw message