HBASE-6926 Cleanup some of the javadoc warnings

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1393168 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2012-10-02 20:42:55 +00:00
parent e419fee3b4
commit 6b82ddc911
16 changed files with 45 additions and 66 deletions

View File

@ -543,11 +543,11 @@ public final class HConstants {
/** /**
* Parameter name for unique identifier for this {@link org.apache.hadoop.conf.Configuration} * Parameter name for unique identifier for this {@link org.apache.hadoop.conf.Configuration}
* instance. If there are two or more {@link org.apache.hadoop.conf.Configuration} instances that, * instance. If there are two or more {@link org.apache.hadoop.conf.Configuration} instances that,
* for all intents and purposes, are the same except for their instance ids, * for all intents and purposes, are the same except for their instance ids, then they will not be
* then they will not be able to share the same {@link org.apache.hadoop.hbase.client.HConnection} instance. * able to share the same org.apache.hadoop.hbase.client.HConnection instance. On the other hand,
* On the other hand, even if the instance ids are the same, it could result * even if the instance ids are the same, it could result in non-shared
* in non-shared {@link org.apache.hadoop.hbase.client.HConnection} * org.apache.hadoop.hbase.client.HConnection instances if some of the other connection parameters
* instances if some of the other connection parameters differ. * differ.
*/ */
public static String HBASE_CLIENT_INSTANCE_ID = "hbase.client.instance.id"; public static String HBASE_CLIENT_INSTANCE_ID = "hbase.client.instance.id";

View File

@ -41,30 +41,25 @@ import org.apache.hadoop.io.Writable;
import com.google.common.primitives.Longs; import com.google.common.primitives.Longs;
/** /**
* An HBase Key/Value. This is the fundamental HBase Type. * An HBase Key/Value. This is the fundamental HBase Type.
* * <p>
* <p>If being used client-side, the primary methods to access individual fields * If being used client-side, the primary methods to access individual fields are {@link #getRow()},
* are {@link #getRow()}, {@link #getFamily()}, {@link #getQualifier()}, * {@link #getFamily()}, {@link #getQualifier()}, {@link #getTimestamp()}, and {@link #getValue()}.
* {@link #getTimestamp()}, and {@link #getValue()}. These methods allocate new * These methods allocate new byte arrays and return copies. Avoid their use server-side.
* byte arrays and return copies. Avoid their use server-side. * <p>
* * Instances of this class are immutable. They do not implement Comparable but Comparators are
* <p>Instances of this class are immutable. They do not implement Comparable * provided. Comparators change with context, whether user table or a catalog table comparison. Its
* but Comparators are provided. Comparators change with context, * critical you use the appropriate comparator. There are Comparators for KeyValue instances and
* whether user table or a catalog table comparison. Its critical you use the * then for just the Key portion of a KeyValue used mostly by HFile.
* appropriate comparator. There are Comparators for KeyValue instances and * <p>
* then for just the Key portion of a KeyValue used mostly by {@link HFile}. * KeyValue wraps a byte array and takes offsets and lengths into passed array at where to start
* * interpreting the content as KeyValue. The KeyValue format inside a byte array is:
* <p>KeyValue wraps a byte array and takes offsets and lengths into passed * <code>&lt;keylength> &lt;valuelength> &lt;key> &lt;value></code> Key is further decomposed as:
* array at where to start interpreting the content as KeyValue. The KeyValue
* format inside a byte array is:
* <code>&lt;keylength> &lt;valuelength> &lt;key> &lt;value></code>
* Key is further decomposed as:
* <code>&lt;rowlength> &lt;row> &lt;columnfamilylength> &lt;columnfamily> &lt;columnqualifier> &lt;timestamp> &lt;keytype></code> * <code>&lt;rowlength> &lt;row> &lt;columnfamilylength> &lt;columnfamily> &lt;columnqualifier> &lt;timestamp> &lt;keytype></code>
* The <code>rowlength</code> maximum is <code>Short.MAX_SIZE</code>, * The <code>rowlength</code> maximum is <code>Short.MAX_SIZE</code>, column family length maximum
* column family length maximum is * is <code>Byte.MAX_SIZE</code>, and column qualifier + key length must be <
* <code>Byte.MAX_SIZE</code>, and column qualifier + key length must * <code>Integer.MAX_SIZE</code>. The column does not contain the family/qualifier delimiter,
* be < <code>Integer.MAX_SIZE</code>. * {@link #COLUMN_FAMILY_DELIMITER}
* The column does not contain the family/qualifier delimiter, {@link #COLUMN_FAMILY_DELIMITER}
*/ */
@InterfaceAudience.Public @InterfaceAudience.Public
@InterfaceStability.Evolving @InterfaceStability.Evolving

View File

@ -29,9 +29,8 @@ import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.Bytes;
/** /**
* Various types of {@link HFile} blocks. Ordinal values of these enum constants * Various types of HFile blocks. Ordinal values of these enum constants must not be relied upon.
* must not be relied upon. The values in the enum appear in the order they * The values in the enum appear in the order they appear in a version 2 HFile.
* appear in a version 2 {@link HFile}.
*/ */
@InterfaceAudience.Private @InterfaceAudience.Private
public enum BlockType { public enum BlockType {

View File

@ -167,7 +167,7 @@ public class BaseMetricsSourceImpl implements BaseMetricsSource, MetricsSource {
/** /**
* Used to get at the DynamicMetricsRegistry. * Used to get at the DynamicMetricsRegistry.
* @return * @return DynamicMetricsRegistry
*/ */
protected DynamicMetricsRegistry getMetricsRegistry() { protected DynamicMetricsRegistry getMetricsRegistry() {
return metricsRegistry; return metricsRegistry;

View File

@ -414,7 +414,6 @@ public class DynamicMetricsRegistry {
* *
* @param gaugeName name of the gauge to create or get. * @param gaugeName name of the gauge to create or get.
* @param potentialStartingValue value of the new gauge if we have to create it. * @param potentialStartingValue value of the new gauge if we have to create it.
* @return
*/ */
public MutableGaugeLong getLongGauge(String gaugeName, long potentialStartingValue) { public MutableGaugeLong getLongGauge(String gaugeName, long potentialStartingValue) {
//Try and get the guage. //Try and get the guage.
@ -450,7 +449,6 @@ public class DynamicMetricsRegistry {
* *
* @param counterName Name of the counter to get * @param counterName Name of the counter to get
* @param potentialStartingValue starting value if we have to create a new counter * @param potentialStartingValue starting value if we have to create a new counter
* @return
*/ */
public MutableCounterLong getLongCounter(String counterName, long potentialStartingValue) { public MutableCounterLong getLongCounter(String counterName, long potentialStartingValue) {
//See getLongGauge for description on how this works. //See getLongGauge for description on how this works.

View File

@ -58,7 +58,7 @@ public class ClusterId {
* @param bytes A pb serialized {@link ClusterId} instance with pb magic prefix * @param bytes A pb serialized {@link ClusterId} instance with pb magic prefix
* @return An instance of {@link ClusterId} made from <code>bytes</code> * @return An instance of {@link ClusterId} made from <code>bytes</code>
* @throws DeserializationException * @throws DeserializationException
* @see {@link #toByteArray()} * @see #toByteArray()
*/ */
public static ClusterId parseFrom(final byte [] bytes) throws DeserializationException { public static ClusterId parseFrom(final byte [] bytes) throws DeserializationException {
if (ProtobufUtil.isPBMagicPrefix(bytes)) { if (ProtobufUtil.isPBMagicPrefix(bytes)) {

View File

@ -21,7 +21,7 @@ import org.apache.hadoop.classification.InterfaceAudience;
/** /**
* Base checked exception in HBase. * Base checked exception in HBase.
* @see https://issues.apache.org/jira/browse/HBASE-5796 * @see <a href="https://issues.apache.org/jira/browse/HBASE-5796">HBASE-5796</a>
*/ */
@SuppressWarnings("serial") @SuppressWarnings("serial")
@InterfaceAudience.Private @InterfaceAudience.Private

View File

@ -35,23 +35,14 @@ public class HBaseIOException extends IOException {
super(); super();
} }
/**
* {@inheritDoc}
*/
public HBaseIOException(String message) { public HBaseIOException(String message) {
super(message); super(message);
} }
/**
* {@inheritDoc}
**/
public HBaseIOException(String message, Throwable cause) { public HBaseIOException(String message, Throwable cause) {
super(message, cause); super(message, cause);
} }
/**
* {@inheritDoc}
*/
public HBaseIOException(Throwable cause) { public HBaseIOException(Throwable cause) {
super(cause); super(cause);
}} }}

View File

@ -1086,7 +1086,7 @@ public class HColumnDescriptor implements WritableComparable<HColumnDescriptor>
/** /**
* @return This instance serialized with pb with pb magic prefix * @return This instance serialized with pb with pb magic prefix
* @see {@link #parseFrom(byte[])} * @see #parseFrom(byte[])
*/ */
public byte [] toByteArray() { public byte [] toByteArray() {
return ProtobufUtil.prependPBMagic(convert().toByteArray()); return ProtobufUtil.prependPBMagic(convert().toByteArray());
@ -1096,7 +1096,7 @@ public class HColumnDescriptor implements WritableComparable<HColumnDescriptor>
* @param bytes A pb serialized {@link HColumnDescriptor} instance with pb magic prefix * @param bytes A pb serialized {@link HColumnDescriptor} instance with pb magic prefix
* @return An instance of {@link HColumnDescriptor} made from <code>bytes</code> * @return An instance of {@link HColumnDescriptor} made from <code>bytes</code>
* @throws DeserializationException * @throws DeserializationException
* @see {@link #toByteArray()} * @see #toByteArray()
*/ */
public static HColumnDescriptor parseFrom(final byte [] bytes) throws DeserializationException { public static HColumnDescriptor parseFrom(final byte [] bytes) throws DeserializationException {
if (!ProtobufUtil.isPBMagicPrefix(bytes)) throw new DeserializationException("No magic"); if (!ProtobufUtil.isPBMagicPrefix(bytes)) throw new DeserializationException("No magic");

View File

@ -731,8 +731,8 @@ public class HRegionInfo implements Comparable<HRegionInfo> {
} }
/** /**
* @deprecated Use protobuf deserialization instead. See {@link #parseFrom(byte[])} and * @deprecated Use protobuf deserialization instead.
* {@link #parseFrom(FSDataInputStream)} * @see #parseFrom(byte[])
*/ */
@Deprecated @Deprecated
public void readFields(DataInput in) throws IOException { public void readFields(DataInput in) throws IOException {
@ -914,7 +914,7 @@ public class HRegionInfo implements Comparable<HRegionInfo> {
/** /**
* @return This instance serialized as protobuf w/ a magic pb prefix. * @return This instance serialized as protobuf w/ a magic pb prefix.
* @see #parseFrom(byte[]); * @see #parseFrom(byte[])
*/ */
public byte [] toByteArray() { public byte [] toByteArray() {
byte [] bytes = convert().toByteArray(); byte [] bytes = convert().toByteArray();
@ -924,7 +924,7 @@ public class HRegionInfo implements Comparable<HRegionInfo> {
/** /**
* @param bytes * @param bytes
* @return A deserialized {@link HRegionInfo} or null if we failed deserialize or passed bytes null * @return A deserialized {@link HRegionInfo} or null if we failed deserialize or passed bytes null
* @see {@link #toByteArray()} * @see #toByteArray()
*/ */
public static HRegionInfo parseFromOrNull(final byte [] bytes) { public static HRegionInfo parseFromOrNull(final byte [] bytes) {
if (bytes == null || bytes.length <= 0) return null; if (bytes == null || bytes.length <= 0) return null;
@ -939,7 +939,7 @@ public class HRegionInfo implements Comparable<HRegionInfo> {
* @param bytes A pb RegionInfo serialized with a pb magic prefix. * @param bytes A pb RegionInfo serialized with a pb magic prefix.
* @return A deserialized {@link HRegionInfo} * @return A deserialized {@link HRegionInfo}
* @throws DeserializationException * @throws DeserializationException
* @see {@link #toByteArray()} * @see #toByteArray()
*/ */
public static HRegionInfo parseFrom(final byte [] bytes) throws DeserializationException { public static HRegionInfo parseFrom(final byte [] bytes) throws DeserializationException {
if (ProtobufUtil.isPBMagicPrefix(bytes)) { if (ProtobufUtil.isPBMagicPrefix(bytes)) {
@ -967,7 +967,7 @@ public class HRegionInfo implements Comparable<HRegionInfo> {
* the pb mergeDelimitedFrom (w/o the delimiter, pb reads to EOF which may not be what you want). * the pb mergeDelimitedFrom (w/o the delimiter, pb reads to EOF which may not be what you want).
* @return This instance serialized as a delimited protobuf w/ a magic pb prefix. * @return This instance serialized as a delimited protobuf w/ a magic pb prefix.
* @throws IOException * @throws IOException
* @see {@link #toByteArray()} * @see #toByteArray()
*/ */
public byte [] toDelimitedByteArray() throws IOException { public byte [] toDelimitedByteArray() throws IOException {
return ProtobufUtil.toDelimitedByteArray(convert()); return ProtobufUtil.toDelimitedByteArray(convert());
@ -1096,7 +1096,7 @@ public class HRegionInfo implements Comparable<HRegionInfo> {
* @param infos HRegionInfo objects to serialize * @param infos HRegionInfo objects to serialize
* @return This instance serialized as a delimited protobuf w/ a magic pb prefix. * @return This instance serialized as a delimited protobuf w/ a magic pb prefix.
* @throws IOException * @throws IOException
* @see {@link #toByteArray()} * @see #toByteArray()
*/ */
public static byte[] toDelimitedByteArray(HRegionInfo... infos) throws IOException { public static byte[] toDelimitedByteArray(HRegionInfo... infos) throws IOException {
byte[][] bytes = new byte[infos.length][]; byte[][] bytes = new byte[infos.length][];

View File

@ -33,11 +33,11 @@ import org.apache.hadoop.io.WritableComparable;
* {@link HServerAddress}, its webui port, and its server startcode. It was * {@link HServerAddress}, its webui port, and its server startcode. It was
* used to pass meta info about a server across an RPC but we've since made * used to pass meta info about a server across an RPC but we've since made
* it so regionserver info is up in ZooKeeper and so this class is on its * it so regionserver info is up in ZooKeeper and so this class is on its
* way out. It used to carry {@link HServerLoad} but as off HBase 0.92.0, the * way out. It used to carry HServerLoad but as off HBase 0.92.0, the
* HServerLoad is passed independent of this class. Also, we now no longer pass * HServerLoad is passed independent of this class. Also, we now no longer pass
* the webui from regionserver to master (TODO: Fix). * the webui from regionserver to master (TODO: Fix).
* @deprecated Use {@link InetSocketAddress} and or {@link ServerName} and or * @deprecated Use {@link InetSocketAddress} and or {@link ServerName} and or
* {@link HServerLoad} * HServerLoad
*/ */
public class HServerInfo extends VersionedWritable public class HServerInfo extends VersionedWritable
implements WritableComparable<HServerInfo> { implements WritableComparable<HServerInfo> {

View File

@ -899,7 +899,7 @@ public class HTableDescriptor implements WritableComparable<HTableDescriptor> {
/** /**
* <em> INTERNAL </em> This method is a part of {@link WritableComparable} interface * <em> INTERNAL </em> This method is a part of {@link WritableComparable} interface
* and is used for serialization of the HTableDescriptor over RPC * and is used for serialization of the HTableDescriptor over RPC
* @deprecated Writables are going away. Use pb {@link #toByteArray()(byte[])} instead. * @deprecated Writables are going away. Use pb {@link #toByteArray(byte[])} instead.
*/ */
@Deprecated @Deprecated
@Override @Override
@ -1231,7 +1231,7 @@ public class HTableDescriptor implements WritableComparable<HTableDescriptor> {
/** /**
* @return This instance serialized with pb with pb magic prefix * @return This instance serialized with pb with pb magic prefix
* @see {@link #parseFrom(byte[])} * @see #parseFrom(byte[])
*/ */
public byte [] toByteArray() { public byte [] toByteArray() {
return ProtobufUtil.prependPBMagic(convert().toByteArray()); return ProtobufUtil.prependPBMagic(convert().toByteArray());
@ -1242,7 +1242,7 @@ public class HTableDescriptor implements WritableComparable<HTableDescriptor> {
* @return An instance of {@link HTableDescriptor} made from <code>bytes</code> * @return An instance of {@link HTableDescriptor} made from <code>bytes</code>
* @throws DeserializationException * @throws DeserializationException
* @throws IOException * @throws IOException
* @see {@link #toByteArray()} * @see #toByteArray()
*/ */
public static HTableDescriptor parseFrom(final byte [] bytes) public static HTableDescriptor parseFrom(final byte [] bytes)
throws DeserializationException, IOException { throws DeserializationException, IOException {

View File

@ -153,7 +153,7 @@ public interface MasterAdminProtocol extends
/** /**
* Unassign a region from current hosting regionserver. Region will then be * Unassign a region from current hosting regionserver. Region will then be
* assigned to a regionserver chosen at random. Region could be reassigned * assigned to a regionserver chosen at random. Region could be reassigned
* back to the same server. Use {@link #moveRegion(RpcController,MoveRegionRequest} * back to the same server. Use {@link #moveRegion(RpcController,MoveRegionRequest)}
* if you want to control the region movement. * if you want to control the region movement.
* @param controller Unused (set to null). * @param controller Unused (set to null).
* @param req The request that contains:<br> * @param req The request that contains:<br>

View File

@ -31,7 +31,7 @@ import com.google.protobuf.InvalidProtocolBufferException;
* Current state of a region in transition. Holds state of a region as it moves through the * Current state of a region in transition. Holds state of a region as it moves through the
* steps that take it from offline to open, etc. Used by regionserver, master, and zk packages. * steps that take it from offline to open, etc. Used by regionserver, master, and zk packages.
* Encapsulates protobuf serialization/deserialization so we don't leak generated pb outside this * Encapsulates protobuf serialization/deserialization so we don't leak generated pb outside this
* class. Create an instance using {@link #createRegionTransition(EventType, byte[], ServerName)}. * class. Create an instance using createRegionTransition(EventType, byte[], ServerName).
* <p>Immutable * <p>Immutable
*/ */
@InterfaceAudience.Private @InterfaceAudience.Private
@ -85,7 +85,6 @@ public class RegionTransition {
* @param regionName * @param regionName
* @param sn * @param sn
* @return a serialized pb {@link RegionTransition} * @return a serialized pb {@link RegionTransition}
* @see #parseRegionTransition(byte[])
*/ */
public static RegionTransition createRegionTransition(final EventType type, public static RegionTransition createRegionTransition(final EventType type,
final byte [] regionName, final ServerName sn) { final byte [] regionName, final ServerName sn) {
@ -98,7 +97,6 @@ public class RegionTransition {
* @param sn * @param sn
* @param payload May be null * @param payload May be null
* @return a serialized pb {@link RegionTransition} * @return a serialized pb {@link RegionTransition}
* @see #parseRegionTransition(byte[])
*/ */
public static RegionTransition createRegionTransition(final EventType type, public static RegionTransition createRegionTransition(final EventType type,
final byte [] regionName, final ServerName sn, final byte [] payload) { final byte [] regionName, final ServerName sn, final byte [] payload) {

View File

@ -458,7 +458,7 @@ public class HBaseAdmin implements Abortable, Closeable {
/** /**
* Creates a new table but does not block and wait for it to come online. * Creates a new table but does not block and wait for it to come online.
* Asynchronous operation. To check if the table exists, use * Asynchronous operation. To check if the table exists, use
* {@link: #isTableAvailable} -- it is not safe to create an HTable * {@link: #isTableAvailable()} -- it is not safe to create an HTable
* instance to this table before it is available. * instance to this table before it is available.
* Note : Avoid passing empty split key. * Note : Avoid passing empty split key.
* @param desc table descriptor for table * @param desc table descriptor for table

View File

@ -252,7 +252,6 @@ public interface HConnection extends Abortable, Closeable {
* @return an object of type T * @return an object of type T
* @throws IOException if a remote or network exception occurs * @throws IOException if a remote or network exception occurs
* @throws RuntimeException other unspecified error * @throws RuntimeException other unspecified error
* @deprecated Use {@link HConnectionManager#withoutRetries(ServerCallable)}
*/ */
@Deprecated @Deprecated
public <T> T getRegionServerWithRetries(ServerCallable<T> callable) public <T> T getRegionServerWithRetries(ServerCallable<T> callable)
@ -266,7 +265,6 @@ public interface HConnection extends Abortable, Closeable {
* @return an object of type T * @return an object of type T
* @throws IOException if a remote or network exception occurs * @throws IOException if a remote or network exception occurs
* @throws RuntimeException other unspecified error * @throws RuntimeException other unspecified error
* @deprecated Use {@link HConnectionManager#withoutRetries(ServerCallable)}
*/ */
@Deprecated @Deprecated
public <T> T getRegionServerWithoutRetries(ServerCallable<T> callable) public <T> T getRegionServerWithoutRetries(ServerCallable<T> callable)