HBASE-13466 Document deprecations in 1.x - Part 1 (Lars Francke)

This commit is contained in:
Nick Dimiduk 2015-04-26 13:11:22 -07:00
parent 9ae023fcab
commit ba6ba16bc0
9 changed files with 100 additions and 28 deletions

View File

@ -87,7 +87,10 @@ public class ClusterStatus extends VersionedWritable {
/** /**
* Constructor, for Writable * Constructor, for Writable
* @deprecated Used by Writables and Writables are going away. * @deprecated As of release 0.96
* (<a href="https://issues.apache.org/jira/browse/HBASE-6038">HBASE-6038</a>).
* This will be removed in HBase 2.0.0.
* Used by Writables and Writables are going away.
*/ */
@Deprecated @Deprecated
public ClusterStatus() { public ClusterStatus() {
@ -221,7 +224,10 @@ public class ClusterStatus extends VersionedWritable {
* Returns detailed region server information: A list of * Returns detailed region server information: A list of
* {@link ServerName}. * {@link ServerName}.
* @return region server information * @return region server information
* @deprecated Use {@link #getServers()} * @deprecated As of release 0.92
* (<a href="https://issues.apache.org/jira/browse/HBASE-1502">HBASE-1502</a>).
* This will be removed in HBase 2.0.0.
* Use {@link #getServers()}.
*/ */
@Deprecated @Deprecated
public Collection<ServerName> getServerInfo() { public Collection<ServerName> getServerInfo() {

View File

@ -285,8 +285,11 @@ public class HColumnDescriptor implements Comparable<HColumnDescriptor> {
private int cachedMaxVersions = UNINITIALIZED; private int cachedMaxVersions = UNINITIALIZED;
/** /**
* Default constructor. Must be present for Writable. * Default constructor.
* @deprecated Used by Writables and Writables are going away. * @deprecated As of release 0.96
* (<a href="https://issues.apache.org/jira/browse/HBASE-5453">HBASE-5453</a>).
* This will be made private in HBase 2.0.0.
* Used by Writables and Writables are going away.
*/ */
@Deprecated @Deprecated
// Make this private rather than remove after deprecation period elapses. Its needed by pb // Make this private rather than remove after deprecation period elapses. Its needed by pb
@ -356,7 +359,10 @@ public class HColumnDescriptor implements Comparable<HColumnDescriptor> {
* other than 'word' characters: i.e. <code>[a-zA-Z_0-9]</code> or contains * other than 'word' characters: i.e. <code>[a-zA-Z_0-9]</code> or contains
* a <code>:</code> * a <code>:</code>
* @throws IllegalArgumentException if the number of versions is &lt;= 0 * @throws IllegalArgumentException if the number of versions is &lt;= 0
* @deprecated use {@link #HColumnDescriptor(String)} and setters * @deprecated As of release 0.96
* (<a href="https://issues.apache.org/jira/browse/HBASE-">HBASE-</a>).
* This will be removed in HBase 2.0.0.
* Use {@link #HColumnDescriptor(String)} and setters.
*/ */
@Deprecated @Deprecated
public HColumnDescriptor(final byte [] familyName, final int maxVersions, public HColumnDescriptor(final byte [] familyName, final int maxVersions,
@ -388,7 +394,10 @@ public class HColumnDescriptor implements Comparable<HColumnDescriptor> {
* other than 'word' characters: i.e. <code>[a-zA-Z_0-9]</code> or contains * other than 'word' characters: i.e. <code>[a-zA-Z_0-9]</code> or contains
* a <code>:</code> * a <code>:</code>
* @throws IllegalArgumentException if the number of versions is &lt;= 0 * @throws IllegalArgumentException if the number of versions is &lt;= 0
* @deprecated use {@link #HColumnDescriptor(String)} and setters * @deprecated As of release 0.96
* (<a href="https://issues.apache.org/jira/browse/HBASE-">HBASE-</a>).
* This will be removed in HBase 2.0.0.
* Use {@link #HColumnDescriptor(String)} and setters.
*/ */
@Deprecated @Deprecated
public HColumnDescriptor(final byte [] familyName, final int maxVersions, public HColumnDescriptor(final byte [] familyName, final int maxVersions,
@ -428,7 +437,10 @@ public class HColumnDescriptor implements Comparable<HColumnDescriptor> {
* other than 'word' characters: i.e. <code>[a-zA-Z_0-9]</code> or contains * other than 'word' characters: i.e. <code>[a-zA-Z_0-9]</code> or contains
* a <code>:</code> * a <code>:</code>
* @throws IllegalArgumentException if the number of versions is &lt;= 0 * @throws IllegalArgumentException if the number of versions is &lt;= 0
* @deprecated use {@link #HColumnDescriptor(String)} and setters * @deprecated As of release 0.96
* (<a href="https://issues.apache.org/jira/browse/HBASE-">HBASE-</a>).
* This will be removed in HBase 2.0.0.
* Use {@link #HColumnDescriptor(String)} and setters.
*/ */
@Deprecated @Deprecated
public HColumnDescriptor(final byte[] familyName, final int minVersions, public HColumnDescriptor(final byte[] familyName, final int minVersions,
@ -673,7 +685,9 @@ public class HColumnDescriptor implements Comparable<HColumnDescriptor> {
/** /**
* @return data block encoding algorithm used on disk * @return data block encoding algorithm used on disk
* @deprecated See getDataBlockEncoding() * @deprecated As of release 0.98
* (<a href="https://issues.apache.org/jira/browse/HBASE-9870">HBASE-9870</a>).
* This will be removed in HBase 2.0.0. See {@link #getDataBlockEncoding()}}
*/ */
@Deprecated @Deprecated
public DataBlockEncoding getDataBlockEncodingOnDisk() { public DataBlockEncoding getDataBlockEncodingOnDisk() {
@ -684,7 +698,9 @@ public class HColumnDescriptor implements Comparable<HColumnDescriptor> {
* This method does nothing now. Flag ENCODE_ON_DISK is not used * This method does nothing now. Flag ENCODE_ON_DISK is not used
* any more. Data blocks have the same encoding in cache as on disk. * any more. Data blocks have the same encoding in cache as on disk.
* @return this (for chained invocation) * @return this (for chained invocation)
* @deprecated This does nothing now. * @deprecated As of release 0.98
* (<a href="https://issues.apache.org/jira/browse/HBASE-9870">HBASE-9870</a>).
* This will be removed in HBase 2.0.0. This method does nothing now.
*/ */
@Deprecated @Deprecated
public HColumnDescriptor setEncodeOnDisk(boolean encodeOnDisk) { public HColumnDescriptor setEncodeOnDisk(boolean encodeOnDisk) {
@ -732,7 +748,9 @@ public class HColumnDescriptor implements Comparable<HColumnDescriptor> {
/** /**
* @return Whether KV tags should be compressed along with DataBlockEncoding. When no * @return Whether KV tags should be compressed along with DataBlockEncoding. When no
* DataBlockEncoding is been used, this is having no effect. * DataBlockEncoding is been used, this is having no effect.
* @deprecated Use {@link #isCompressTags()} instead * @deprecated As of release 1.0.0
* (<a href="https://issues.apache.org/jira/browse/HBASE-10870">HBASE-10870</a>).
* This will be removed in HBase 2.0.0. Use {@link #isCompressTags()} instead.
*/ */
@Deprecated @Deprecated
public boolean shouldCompressTags() { public boolean shouldCompressTags() {
@ -811,7 +829,10 @@ public class HColumnDescriptor implements Comparable<HColumnDescriptor> {
* @param keepDeletedCells True if deleted rows should not be collected * @param keepDeletedCells True if deleted rows should not be collected
* immediately. * immediately.
* @return this (for chained invocation) * @return this (for chained invocation)
* @deprecated use {@link #setKeepDeletedCells(KeepDeletedCells)} * @deprecated As of release 1.0.0
* (<a href="https://issues.apache.org/jira/browse/HBASE-12363">HBASE-12363</a>).
* This will be removed in HBase 2.0.0.
* Use {@link #setKeepDeletedCells(KeepDeletedCells)}.
*/ */
@Deprecated @Deprecated
public HColumnDescriptor setKeepDeletedCells(boolean keepDeletedCells) { public HColumnDescriptor setKeepDeletedCells(boolean keepDeletedCells) {
@ -922,7 +943,9 @@ public class HColumnDescriptor implements Comparable<HColumnDescriptor> {
/** /**
* @return true if we should cache data blocks on write * @return true if we should cache data blocks on write
* @deprecated Use {@link #isCacheDataOnWrite()} instead * @deprecated As of release 1.0.0
* (<a href="https://issues.apache.org/jira/browse/HBASE-10870">HBASE-10870</a>).
* This will be removed in HBase 2.0.0. Use {@link #isCacheDataOnWrite()}} instead.
*/ */
@Deprecated @Deprecated
public boolean shouldCacheDataOnWrite() { public boolean shouldCacheDataOnWrite() {
@ -947,7 +970,9 @@ public class HColumnDescriptor implements Comparable<HColumnDescriptor> {
/** /**
* @return true if we should cache data blocks in the L1 cache (if block cache deploy * @return true if we should cache data blocks in the L1 cache (if block cache deploy
* has more than one tier; e.g. we are using CombinedBlockCache). * has more than one tier; e.g. we are using CombinedBlockCache).
* @deprecated Use {@link #isCacheDataInL1()} instead * @deprecated As of release 1.0.0
* (<a href="https://issues.apache.org/jira/browse/HBASE-10870">HBASE-10870</a>).
* This will be removed in HBase 2.0.0. Use {@link #isCacheDataInL1()}} instead.
*/ */
@Deprecated @Deprecated
public boolean shouldCacheDataInL1() { public boolean shouldCacheDataInL1() {
@ -981,7 +1006,10 @@ public class HColumnDescriptor implements Comparable<HColumnDescriptor> {
/** /**
* @return true if we should cache index blocks on write * @return true if we should cache index blocks on write
* @deprecated Use {@link #isCacheIndexesOnWrite()} instead * @deprecated As of release 1.0.0
* (<a href="https://issues.apache.org/jira/browse/HBASE-10870">HBASE-10870</a>).
* This will be removed in HBase 2.0.0.
* Use {@link #isCacheIndexesOnWrite()} instead.
*/ */
@Deprecated @Deprecated
public boolean shouldCacheIndexesOnWrite() { public boolean shouldCacheIndexesOnWrite() {
@ -1005,7 +1033,10 @@ public class HColumnDescriptor implements Comparable<HColumnDescriptor> {
/** /**
* @return true if we should cache bloomfilter blocks on write * @return true if we should cache bloomfilter blocks on write
* @deprecated Use {@link #isCacheBloomsOnWrite()} instead * @deprecated As of release 1.0.0
* (<a href="https://issues.apache.org/jira/browse/HBASE-10870">HBASE-10870</a>).
* This will be removed in HBase 2.0.0.
* Use {@link #isCacheBloomsOnWrite()}} instead.
*/ */
@Deprecated @Deprecated
public boolean shouldCacheBloomsOnWrite() { public boolean shouldCacheBloomsOnWrite() {
@ -1030,7 +1061,10 @@ public class HColumnDescriptor implements Comparable<HColumnDescriptor> {
/** /**
* @return true if we should evict cached blocks from the blockcache on * @return true if we should evict cached blocks from the blockcache on
* close * close
* @deprecated {@link #isEvictBlocksOnClose()} instead * @deprecated As of release 1.0.0
* (<a href="https://issues.apache.org/jira/browse/HBASE-10870">HBASE-10870</a>).
* This will be removed in HBase 2.0.0.
* Use {@link #isEvictBlocksOnClose()}} instead.
*/ */
@Deprecated @Deprecated
public boolean shouldEvictBlocksOnClose() { public boolean shouldEvictBlocksOnClose() {
@ -1055,7 +1089,10 @@ public class HColumnDescriptor implements Comparable<HColumnDescriptor> {
/** /**
* @return true if we should prefetch blocks into the blockcache on open * @return true if we should prefetch blocks into the blockcache on open
* @deprecated Use {@link #isPrefetchBlocksOnOpen()} instead * @deprecated As of release 1.0.0
* (<a href="https://issues.apache.org/jira/browse/HBASE-10870">HBASE-10870</a>).
* This will be removed in HBase 2.0.0.
* Use {@link #isPrefetchBlocksOnOpen()}}} instead.
*/ */
@Deprecated @Deprecated
public boolean shouldPrefetchBlocksOnOpen() { public boolean shouldPrefetchBlocksOnOpen() {

View File

@ -234,7 +234,10 @@ public class HRegionInfo implements Comparable<HRegionInfo> {
} }
/** Default constructor - creates empty object /** Default constructor - creates empty object
* @deprecated Used by Writables and Writables are going away. * @deprecated As of release 0.96
* (<a href="https://issues.apache.org/jira/browse/HBASE-5453">HBASE-5453</a>).
* This will be removed in HBase 2.0.0.
* Used by Writables and Writables are going away.
*/ */
@Deprecated @Deprecated
public HRegionInfo() { public HRegionInfo() {
@ -486,7 +489,9 @@ public class HRegionInfo implements Comparable<HRegionInfo> {
* Gets the table name from the specified region name. * Gets the table name from the specified region name.
* @param regionName * @param regionName
* @return Table name. * @return Table name.
* @deprecated Since 0.96.0; use #getTable(byte[]) * @deprecated As of release 0.96
* (<a href="https://issues.apache.org/jira/browse/HBASE-9508">HBASE-9508</a>).
* This will be removed in HBase 2.0.0. Use {@link #getTable(byte[])}.
*/ */
@Deprecated @Deprecated
public static byte [] getTableName(byte[] regionName) { public static byte [] getTableName(byte[] regionName) {
@ -653,7 +658,9 @@ public class HRegionInfo implements Comparable<HRegionInfo> {
/** /**
* Get current table name of the region * Get current table name of the region
* @return byte array of table name * @return byte array of table name
* @deprecated Since 0.96.0; use #getTable() * @deprecated As of release 0.96
* (<a href="https://issues.apache.org/jira/browse/HBASE-9508">HBASE-9508</a>).
* This will be removed in HBase 2.0.0. Use {@link #getTable()}.
*/ */
@Deprecated @Deprecated
public byte [] getTableName() { public byte [] getTableName() {
@ -1255,7 +1262,9 @@ public class HRegionInfo implements Comparable<HRegionInfo> {
if (in.markSupported()) { //read it with mark() if (in.markSupported()) { //read it with mark()
in.mark(pblen); in.mark(pblen);
} }
int read = in.read(pbuf); //assumption: it should be longer than pblen.
//assumption: if Writable serialization, it should be longer than pblen.
int read = in.read(pbuf);
if (read != pblen) throw new IOException("read=" + read + ", wanted=" + pblen); if (read != pblen) throw new IOException("read=" + read + ", wanted=" + pblen);
if (ProtobufUtil.isPBMagicPrefix(pbuf)) { if (ProtobufUtil.isPBMagicPrefix(pbuf)) {
return convert(HBaseProtos.RegionInfo.parseDelimitedFrom(in)); return convert(HBaseProtos.RegionInfo.parseDelimitedFrom(in));

View File

@ -294,7 +294,10 @@ public class HTableDescriptor implements Comparable<HTableDescriptor> {
/** /**
* Default constructor which constructs an empty object. * Default constructor which constructs an empty object.
* For deserializing an HTableDescriptor instance only. * For deserializing an HTableDescriptor instance only.
* @deprecated Used by Writables and Writables are going away. * @deprecated As of release 0.96
* (<a href="https://issues.apache.org/jira/browse/HBASE-5453">HBASE-5453</a>).
* This will be removed in HBase 2.0.0.
* Used by Writables and Writables are going away.
*/ */
@Deprecated @Deprecated
public HTableDescriptor() { public HTableDescriptor() {

View File

@ -165,7 +165,9 @@ public class ClientScanner extends AbstractClientScanner {
/** /**
* @return Table name * @return Table name
* @deprecated Since 0.96.0; use {@link #getTable()} * @deprecated As of release 0.96
* (<a href="https://issues.apache.org/jira/browse/HBASE-9508">HBASE-9508</a>).
* This will be removed in HBase 2.0.0. Use {@link #getTable()}.
*/ */
@Deprecated @Deprecated
protected byte [] getTableName() { protected byte [] getTableName() {

View File

@ -973,7 +973,10 @@ public class HTable implements HTableInterface {
} }
/** /**
* @deprecated Use {@link #incrementColumnValue(byte[], byte[], byte[], long, Durability)} * @deprecated As of release 0.96
* (<a href="https://issues.apache.org/jira/browse/HBASE-9508">HBASE-9508</a>).
* This will be removed in HBase 2.0.0.
* Use {@link #incrementColumnValue(byte[], byte[], byte[], long, Durability)}.
*/ */
@Deprecated @Deprecated
@Override @Override

View File

@ -46,7 +46,10 @@ public interface HTableInterface extends Table {
byte[] getTableName(); byte[] getTableName();
/** /**
* @deprecated Use {@link #incrementColumnValue(byte[], byte[], byte[], long, Durability)} * @deprecated As of release 0.96
* (<a href="https://issues.apache.org/jira/browse/HBASE-9508">HBASE-9508</a>).
* This will be removed in HBase 2.0.0.
* Use {@link #incrementColumnValue(byte[], byte[], byte[], long, Durability)}.
*/ */
@Deprecated @Deprecated
long incrementColumnValue(final byte [] row, final byte [] family, long incrementColumnValue(final byte [] row, final byte [] family,

View File

@ -670,7 +670,10 @@ public class LoadIncrementalHFiles extends Configured implements Tool {
} }
/** /**
* @deprecated Use {@link #tryAtomicRegionLoad(Connection, TableName, byte[], Collection)} * @deprecated As of release 0.96
* (<a href="https://issues.apache.org/jira/browse/HBASE-9508">HBASE-9508</a>).
* This will be removed in HBase 2.0.0.
* Use {@link #tryAtomicRegionLoad(Connection, TableName, byte[], Collection)}.
*/ */
@Deprecated @Deprecated
protected List<LoadQueueItem> tryAtomicRegionLoad(final HConnection conn, protected List<LoadQueueItem> tryAtomicRegionLoad(final HConnection conn,

View File

@ -91,7 +91,10 @@ implements Writable, Comparable<TableSplit> {
} }
/** /**
* @deprecated Since 0.96.0; use {@link TableSplit#TableSplit(TableName, byte[], byte[], String)} * @deprecated As of release 0.96
* (<a href="https://issues.apache.org/jira/browse/HBASE-9508">HBASE-9508</a>).
* This will be removed in HBase 2.0.0.
* Use {@link TableSplit#TableSplit(TableName, byte[], byte[], String)}.
*/ */
@Deprecated @Deprecated
public TableSplit(final byte [] tableName, Scan scan, byte [] startRow, byte [] endRow, public TableSplit(final byte [] tableName, Scan scan, byte [] startRow, byte [] endRow,
@ -139,7 +142,10 @@ implements Writable, Comparable<TableSplit> {
} }
/** /**
* @deprecated Since 0.96.0; use {@link TableSplit#TableSplit(TableName, byte[], byte[], String)} * @deprecated As of release 0.96
* (<a href="https://issues.apache.org/jira/browse/HBASE-9508">HBASE-9508</a>).
* This will be removed in HBase 2.0.0.
* Use {@link TableSplit#TableSplit(TableName, byte[], byte[], String)}.
*/ */
@Deprecated @Deprecated
public TableSplit(final byte [] tableName, byte[] startRow, byte[] endRow, public TableSplit(final byte [] tableName, byte[] startRow, byte[] endRow,