:
*/
public HColumnDescriptor(final byte [] familyName) {
- this (familyName == null || familyName.length <= 0?
- HConstants.EMPTY_BYTE_ARRAY: familyName, DEFAULT_VERSIONS,
- DEFAULT_COMPRESSION, DEFAULT_IN_MEMORY, DEFAULT_BLOCKCACHE,
- DEFAULT_TTL, DEFAULT_BLOOMFILTER);
+ isLegalFamilyName(familyName);
+ this.name = familyName;
+
+ setMaxVersions(DEFAULT_VERSIONS);
+ setMinVersions(DEFAULT_MIN_VERSIONS);
+ setKeepDeletedCells(DEFAULT_KEEP_DELETED);
+ setInMemory(DEFAULT_IN_MEMORY);
+ setBlockCacheEnabled(DEFAULT_BLOCKCACHE);
+ setTimeToLive(DEFAULT_TTL);
+ setCompressionType(Compression.Algorithm.valueOf(DEFAULT_COMPRESSION.toUpperCase()));
+ setDataBlockEncoding(DataBlockEncoding.valueOf(DEFAULT_DATA_BLOCK_ENCODING.toUpperCase()));
+ setBloomFilterType(BloomType.valueOf(DEFAULT_BLOOMFILTER.toUpperCase()));
+ setBlocksize(DEFAULT_BLOCKSIZE);
+ setScope(DEFAULT_REPLICATION_SCOPE);
}
/**
@@ -343,148 +346,6 @@ public class HColumnDescriptor implements Comparable:
- * @param maxVersions Maximum number of versions to keep
- * @param compression Compression type
- * @param inMemory If true, column data should be kept in an HRegionServer's
- * cache
- * @param blockCacheEnabled If true, MapFile blocks should be cached
- * @param timeToLive Time-to-live of cell contents, in seconds
- * (use HConstants.FOREVER for unlimited TTL)
- * @param bloomFilter Bloom filter type for this column
- *
- * @throws IllegalArgumentException if passed a family name that is made of
- * other than 'word' characters: i.e. [a-zA-Z_0-9] or contains
- * a :
- * @throws IllegalArgumentException if the number of versions is <= 0
- * @deprecated As of release 0.96
- * (HBASE-).
- * This will be removed in HBase 2.0.0.
- * Use {@link #HColumnDescriptor(String)} and setters.
- */
- @Deprecated
- public HColumnDescriptor(final byte [] familyName, final int maxVersions,
- final String compression, final boolean inMemory,
- final boolean blockCacheEnabled,
- final int timeToLive, final String bloomFilter) {
- this(familyName, maxVersions, compression, inMemory, blockCacheEnabled,
- DEFAULT_BLOCKSIZE, timeToLive, bloomFilter, DEFAULT_REPLICATION_SCOPE);
- }
-
- /**
- * Constructor
- * @param familyName Column family name. Must be 'printable' -- digit or
- * letter -- and may not contain a :
- * @param maxVersions Maximum number of versions to keep
- * @param compression Compression type
- * @param inMemory If true, column data should be kept in an HRegionServer's
- * cache
- * @param blockCacheEnabled If true, MapFile blocks should be cached
- * @param blocksize Block size to use when writing out storefiles. Use
- * smaller block sizes for faster random-access at expense of larger indices
- * (more memory consumption). Default is usually 64k.
- * @param timeToLive Time-to-live of cell contents, in seconds
- * (use HConstants.FOREVER for unlimited TTL)
- * @param bloomFilter Bloom filter type for this column
- * @param scope The scope tag for this column
- *
- * @throws IllegalArgumentException if passed a family name that is made of
- * other than 'word' characters: i.e. [a-zA-Z_0-9] or contains
- * a :
- * @throws IllegalArgumentException if the number of versions is <= 0
- * @deprecated As of release 0.96
- * (HBASE-).
- * This will be removed in HBase 2.0.0.
- * Use {@link #HColumnDescriptor(String)} and setters.
- */
- @Deprecated
- public HColumnDescriptor(final byte [] familyName, final int maxVersions,
- final String compression, final boolean inMemory,
- final boolean blockCacheEnabled, final int blocksize,
- final int timeToLive, final String bloomFilter, final int scope) {
- this(familyName, DEFAULT_MIN_VERSIONS, maxVersions, DEFAULT_KEEP_DELETED,
- compression, DEFAULT_ENCODE_ON_DISK, DEFAULT_DATA_BLOCK_ENCODING,
- inMemory, blockCacheEnabled, blocksize, timeToLive, bloomFilter,
- scope);
- }
-
- /**
- * Constructor
- * @param familyName Column family name. Must be 'printable' -- digit or
- * letter -- and may not contain a :
- * @param minVersions Minimum number of versions to keep
- * @param maxVersions Maximum number of versions to keep
- * @param keepDeletedCells Whether to retain deleted cells until they expire
- * up to maxVersions versions.
- * @param compression Compression type
- * @param encodeOnDisk whether to use the specified data block encoding
- * on disk. If false, the encoding will be used in cache only.
- * @param dataBlockEncoding data block encoding
- * @param inMemory If true, column data should be kept in an HRegionServer's
- * cache
- * @param blockCacheEnabled If true, MapFile blocks should be cached
- * @param blocksize Block size to use when writing out storefiles. Use
- * smaller blocksizes for faster random-access at expense of larger indices
- * (more memory consumption). Default is usually 64k.
- * @param timeToLive Time-to-live of cell contents, in seconds
- * (use HConstants.FOREVER for unlimited TTL)
- * @param bloomFilter Bloom filter type for this column
- * @param scope The scope tag for this column
- *
- * @throws IllegalArgumentException if passed a family name that is made of
- * other than 'word' characters: i.e. [a-zA-Z_0-9] or contains
- * a :
- * @throws IllegalArgumentException if the number of versions is <= 0
- * @deprecated As of release 0.96
- * (HBASE-).
- * This will be removed in HBase 2.0.0.
- * Use {@link #HColumnDescriptor(String)} and setters.
- */
- @Deprecated
- public HColumnDescriptor(final byte[] familyName, final int minVersions,
- final int maxVersions, final KeepDeletedCells keepDeletedCells,
- final String compression, final boolean encodeOnDisk,
- final String dataBlockEncoding, final boolean inMemory,
- final boolean blockCacheEnabled, final int blocksize,
- final int timeToLive, final String bloomFilter, final int scope) {
- isLegalFamilyName(familyName);
- this.name = familyName;
-
- if (maxVersions <= 0) {
- // TODO: Allow maxVersion of 0 to be the way you say "Keep all versions".
- // Until there is support, consider 0 or < 0 -- a configuration error.
- throw new IllegalArgumentException("Maximum versions must be positive");
- }
-
- if (minVersions > 0) {
- if (timeToLive == HConstants.FOREVER) {
- throw new IllegalArgumentException("Minimum versions requires TTL.");
- }
- if (minVersions >= maxVersions) {
- throw new IllegalArgumentException("Minimum versions must be < "
- + "maximum versions.");
- }
- }
-
- setMaxVersions(maxVersions);
- setMinVersions(minVersions);
- setKeepDeletedCells(keepDeletedCells);
- setInMemory(inMemory);
- setBlockCacheEnabled(blockCacheEnabled);
- setTimeToLive(timeToLive);
- setCompressionType(Compression.Algorithm.
- valueOf(compression.toUpperCase()));
- setDataBlockEncoding(DataBlockEncoding.
- valueOf(dataBlockEncoding.toUpperCase()));
- setBloomFilterType(BloomType.
- valueOf(bloomFilter.toUpperCase()));
- setBlocksize(blocksize);
- setScope(scope);
- }
-
- /**
* @param b Family name.
* @return b
* @throws IllegalArgumentException If not null and not a legitimate family
@@ -684,30 +545,6 @@ public class HColumnDescriptor implements ComparableThis invocation clears the scan metrics. Metrics are aggregated in the Scan instance.
*/
protected void writeScanMetrics() {
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
index e0c2977..324fe61 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
@@ -973,21 +973,6 @@ public class HTable implements HTableInterface {
}
/**
- * @deprecated As of release 0.96
- * (HBASE-9508).
- * This will be removed in HBase 2.0.0.
- * Use {@link #incrementColumnValue(byte[], byte[], byte[], long, Durability)}.
- */
- @Deprecated
- @Override
- public long incrementColumnValue(final byte [] row, final byte [] family,
- final byte [] qualifier, final long amount, final boolean writeToWAL)
- throws IOException {
- return incrementColumnValue(row, family, qualifier, amount,
- writeToWAL? Durability.SKIP_WAL: Durability.USE_DEFAULT);
- }
-
- /**
* {@inheritDoc}
*/
@Override
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java
index 5823f69..8436307 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java
@@ -46,17 +46,6 @@ public interface HTableInterface extends Table {
byte[] getTableName();
/**
- * @deprecated As of release 0.96
- * (HBASE-9508).
- * This will be removed in HBase 2.0.0.
- * Use {@link #incrementColumnValue(byte[], byte[], byte[], long, Durability)}.
- */
- @Deprecated
- long incrementColumnValue(final byte [] row, final byte [] family,
- final byte [] qualifier, final long amount, final boolean writeToWAL)
- throws IOException;
-
- /**
* @deprecated Use {@link #existsAll(java.util.List)} instead.
*/
@Deprecated
@@ -121,7 +110,7 @@ public interface HTableInterface extends Table {
*/
@Deprecated
void setAutoFlushTo(boolean autoFlush);
-
+
/**
* Tells whether or not 'auto-flush' is turned on.
*
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/UnmodifyableHTableDescriptor.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/UnmodifyableHTableDescriptor.java
index e1eb755..7331983 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/UnmodifyableHTableDescriptor.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/UnmodifyableHTableDescriptor.java
@@ -30,7 +30,12 @@ import org.apache.hadoop.hbase.classification.InterfaceStability;
@InterfaceAudience.Public
@InterfaceStability.Evolving
public class UnmodifyableHTableDescriptor extends HTableDescriptor {
- /** Default constructor */
+ /**
+ * Default constructor.
+ * @deprecated As of release 2.0.0. This will be removed in HBase 3.0.0.
+ * Use {@link #UnmodifyableHTableDescriptor(HTableDescriptor)}.
+ */
+ @Deprecated
public UnmodifyableHTableDescriptor() {
super();
}
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java
index 8b5b2d7..cda6bd7 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java
@@ -2589,7 +2589,7 @@ public final class ProtobufUtil {
// input / output paths are relative to the store dir
// store dir is relative to region dir
CompactionDescriptor.Builder builder = CompactionDescriptor.newBuilder()
- .setTableName(ByteStringer.wrap(info.getTableName()))
+ .setTableName(ByteStringer.wrap(info.getTable().toBytes()))
.setEncodedRegionName(ByteStringer.wrap(info.getEncodedNameAsBytes()))
.setFamilyName(ByteStringer.wrap(family))
.setStoreHomeDir(storeDir.getName()); //make relative
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
index 324a3cf..d9829a7 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
@@ -47,7 +47,6 @@ import org.apache.hadoop.hbase.classification.InterfaceStability;
import org.apache.hadoop.hbase.client.Admin;
import org.apache.hadoop.hbase.client.Connection;
import org.apache.hadoop.hbase.client.ConnectionFactory;
-import org.apache.hadoop.hbase.client.HConnection;
import org.apache.hadoop.hbase.client.HTable;
import org.apache.hadoop.hbase.client.RegionLocator;
import org.apache.hadoop.hbase.client.RegionServerCallable;
@@ -670,19 +669,6 @@ public class LoadIncrementalHFiles extends Configured implements Tool {
}
/**
- * @deprecated As of release 0.96
- * (HBASE-9508).
- * This will be removed in HBase 2.0.0.
- * Use {@link #tryAtomicRegionLoad(Connection, TableName, byte[], Collection)}.
- */
- @Deprecated
- protected List