minor javadoc fixes

This commit is contained in:
Dave Brosius 2015-01-21 21:40:21 -05:00
parent 5d3c2c9852
commit 222ea95835
23 changed files with 65 additions and 28 deletions

View File

@ -447,7 +447,6 @@
artifactId="cassandra-parent"
version="${version}"/>
<!-- do NOT remove this, it breaks pig-test -->
<dependency groupId="org.slf4j" artifactId="slf4j-log4j12" version="1.7.2"/>
<dependency groupId="joda-time" artifactId="joda-time" version="2.3" />
</artifact:pom>

View File

@ -48,8 +48,8 @@ public interface IAuthorizer
*
* @param performer User who grants the permissions.
* @param permissions Set of permissions to grant.
* @param to Name of the role to which the permissions are to be granted.
* @param resource Resource on which to grant the permissions.
* @param grantee name of the role to which the permissions are to be granted.
*
* @throws RequestValidationException
* @throws RequestExecutionException
@ -80,7 +80,7 @@ public interface IAuthorizer
* matching ones.
* @param resource The resource on which permissions are requested. Can be null, in which case permissions on all
* resources should be returned.
* @param of The name of the role whose permissions are requested. Can be null, in which case permissions of every
* @param grantee The name of the role whose permissions are requested. Can be null, in which case permissions of every
* role should be returned.
*
* @return All of the matching permission that the requesting user is authorized to know about.

View File

@ -36,10 +36,12 @@ import static org.apache.cassandra.cql3.statements.RequestValidations.invalidReq
/**
* A relation using the tuple notation, which typically affects multiple columns.
* Examples:
* {@code
* - SELECT ... WHERE (a, b, c) > (1, 'a', 10)
* - SELECT ... WHERE (a, b, c) IN ((1, 2, 3), (4, 5, 6))
* - SELECT ... WHERE (a, b) < ?
* - SELECT ... WHERE (a, b) IN ?
* }
*/
public class MultiColumnRelation extends Relation
{
@ -65,7 +67,9 @@ public class MultiColumnRelation extends Relation
/**
* Creates a multi-column EQ, LT, LTE, GT, or GTE relation.
* {@code
* For example: "SELECT ... WHERE (a, b) > (0, 1)"
* }
* @param entities the columns on the LHS of the relation
* @param relationType the relation operator
* @param valuesOrMarker a Tuples.Literal instance or a Tuples.Raw marker

View File

@ -277,7 +277,9 @@ public class Tuples
/**
* A raw placeholder for a tuple of values for different multiple columns, each of which may have a different type.
* {@code
* For example, "SELECT ... WHERE (col1, col2) > ?".
* }
*/
public static class Raw extends AbstractMarker.Raw implements Term.MultiColumnRaw
{
@ -363,7 +365,9 @@ public class Tuples
}
/**
* {@code
* Represents a marker for a single tuple, like "SELECT ... WHERE (a, b, c) > ?"
* }
*/
public static class Marker extends AbstractMarker
{

View File

@ -35,8 +35,7 @@ public final class RequestValidations
* be thrown.
*
* @param expression the expression to test
* @param messageTemplate the error message
* @param messageArgs the message arguments
* @param message the error message
* @throws InvalidRequestException if the specified expression is <code>false</code>.
*/
public static void checkTrue(boolean expression, String message) throws InvalidRequestException
@ -66,8 +65,7 @@ public final class RequestValidations
* Checks that the specified list does not contains duplicates.
*
* @param list the list to test
* @param messageTemplate the template used to build the error message
* @param messageArgs the message arguments
* @param message the error message
* @throws InvalidRequestException if the specified list contains duplicates.
*/
public static void checkContainsNoDuplicates(List<?> list, String message) throws InvalidRequestException

View File

@ -37,6 +37,8 @@ import org.apache.cassandra.utils.memory.*;
/**
* <pre>
* {@code
* Packs a CellName AND a Cell into one off-heap representation.
* Layout is:
*
@ -55,6 +57,8 @@ import org.apache.cassandra.utils.memory.*;
* name extra: lowest 2 bits indicate the clustering size delta (i.e. how many name items are NOT part of the clustering key)
* the next 2 bits indicate the CellNameType
* the next bit indicates if the column is a static or clustered/dynamic column
* }
* </pre>
*/
public abstract class AbstractNativeCell extends AbstractCell implements CellName
{

View File

@ -55,8 +55,9 @@ import static org.apache.cassandra.db.index.SecondaryIndexManager.Updater;
* isolated (in the sense of ACID). Typically a addAll is guaranteed that no
* other thread can see the state where only parts but not all columns have
* been added.
* <p/>
* <p>
* WARNING: removing element through getSortedColumns().iterator() is *not* supported
* </p>
*/
public class AtomicBTreeColumns extends ColumnFamily
{

View File

@ -85,8 +85,9 @@ import org.apache.cassandra.utils.concurrent.OpOrder;
import org.apache.cassandra.utils.*;
/**
* <p>
* A singleton which manages a private executor of ongoing compactions.
* <p/>
* </p>
* Scheduling for compaction is accomplished by swapping sstables to be compacted into
* a set via DataTracker. New scheduling attempts will ignore currently compacting
* sstables.
@ -411,7 +412,8 @@ public class CompactionManager implements CompactionManagerMBean
* @param cfs
* @param ranges Ranges that the repair was carried out on
* @param validatedForRepair SSTables containing the repaired ranges. Should be referenced before passing them.
* @throws InterruptedException, ExecutionException, IOException
* @throws InterruptedException
* @throws IOException
*/
public void performAnticompaction(ColumnFamilyStore cfs,
Collection<Range<Token>> ranges,

View File

@ -41,7 +41,7 @@ public interface IFailureDetector
* This method is invoked by any entity wanting to interrogate the status of an endpoint.
* In our case it would be the Gossiper. The Failure Detector will then calculate Phi and
* deem an endpoint as suspicious or alive as explained in the Hayashibara paper.
* <p/>
*
* param ep endpoint for which we interpret the inter arrival times.
*/
public void interpret(InetAddress ep);
@ -50,7 +50,7 @@ public interface IFailureDetector
* This method is invoked by the receiver of the heartbeat. In our case it would be
* the Gossiper. Gossiper inform the Failure Detector on receipt of a heartbeat. The
* FailureDetector will then sample the arrival time as explained in the paper.
* <p/>
*
* param ep endpoint being reported.
*/
public void report(InetAddress ep);

View File

@ -43,11 +43,15 @@ import org.apache.commons.lang3.StringUtils;
* application wants to make available to the rest of the nodes in the cluster.
* Whenever a piece of state needs to be disseminated to the rest of cluster wrap
* the state in an instance of <i>ApplicationState</i> and add it to the Gossiper.
* <p></p>
* <p>
* e.g. if we want to disseminate load information for node A do the following:
* <p></p>
* </p>
* <pre>
* {@code
* ApplicationState loadState = new ApplicationState(<string representation of load>);
* Gossiper.instance.addApplicationState("LOAD STATE", loadState);
* }
* </pre>
*/
public class VersionedValue implements Comparable<VersionedValue>

View File

@ -136,6 +136,7 @@ public class CqlBulkRecordWriter extends AbstractBulkRecordWriter<Object, List<B
}
/**
* <p>
* The column values must correspond to the order in which
* they appear in the insert stored procedure.
*

View File

@ -57,15 +57,19 @@ import org.apache.hadoop.mapreduce.RecordReader;
import org.apache.hadoop.mapreduce.TaskAttemptContext;
/**
* <p>
* CqlRecordReader reads the rows return from the CQL query
* It uses CQL auto-paging.
* <p/>
* </p>
* <p>
* Return a Long as a local CQL row key starts from 0;
* <p/>
* </p>
* {@code
* Row as C* java driver CQL result set row
* 1) select clause must include partition key columns (to calculate the progress based on the actual CF row processed)
* 2) where clause must include token(partition_key1, ... , partition_keyn) > ? and
* token(partition_key1, ... , partition_keyn) <= ? (in the right order)
* }
*/
public class CqlRecordReader extends RecordReader<Long, Row>
implements org.apache.hadoop.mapred.RecordReader<Long, Row>, AutoCloseable

View File

@ -111,7 +111,9 @@ public class Component
}
/**
* {@code
* Filename of the form "<ksname>/<cfname>-[tmp-][<version>-]<gen>-<component>",
* }
* @return A Descriptor for the SSTable, and a Component for this particular file.
* TODO move descriptor into Component field
*/

View File

@ -72,7 +72,7 @@ public class FastByteArrayOutputStream extends OutputStream {
* initial size for the underlying byte array, must be
* non-negative.
* @throws IllegalArgumentException
* if {@code size} < 0.
* if {@code size < 0}.
*/
public FastByteArrayOutputStream(int size) {
if (size >= 0) {

View File

@ -44,9 +44,11 @@ import org.apache.cassandra.utils.FBUtilities;
import org.apache.cassandra.utils.JVMStabilityInspector;
/**
* {@code
* A snitch that assumes a Cloudstack Zone follows the typical convention
* <country>-<location>-<availability zone> and uses the country/location
* tuple as a datacenter and the availability zone as a rack
* }
*/
public class CloudstackSnitch extends AbstractNetworkTopologySnitch

View File

@ -32,15 +32,17 @@ import org.apache.cassandra.utils.FBUtilities;
import com.google.common.collect.Multimap;
/**
* <p>
* This Replication Strategy takes a property file that gives the intended
* replication factor in each datacenter. The sum total of the datacenter
* replication factor values should be equal to the keyspace replication
* factor.
* <p/>
* </p>
* <p>
* So for example, if the keyspace replication factor is 6, the
* datacenter replication factors could be 3, 2, and 1 - so 3 replicas in
* one datacenter, 2 in another, and 1 in another - totalling 6.
* <p/>
* </p>
* This class also caches the Endpoints and invalidates the cache if there is a
* change in the number of tokens.
*/

View File

@ -37,8 +37,9 @@ import org.apache.cassandra.utils.WrappedRunnable;
import org.apache.commons.lang3.StringUtils;
/**
* <p>
* Used to determine if two IP's are in the same datacenter or on the same rack.
* <p/>
* </p>
* Based on a properties file in the following format:
*
* 10.0.0.13=DC1:RAC2

View File

@ -831,13 +831,16 @@ public class StorageProxy implements StorageProxyMBean
* is not available.
*
* Note about hints:
*
* <pre>
* {@code
* | Hinted Handoff | Consist. Level |
* | on | >=1 | --> wait for hints. We DO NOT notify the handler with handler.response() for hints;
* | on | ANY | --> wait for hints. Responses count towards consistency.
* | off | >=1 | --> DO NOT fire hints. And DO NOT wait for them to complete.
* | off | ANY | --> DO NOT fire hints. And DO NOT wait for them to complete.
*
* }
* </pre>
*
* @throws OverloadedException if the hints cannot be written/enqueued
*/
public static void sendToHintedEndpoints(final Mutation mutation,

View File

@ -387,7 +387,6 @@ public class SSTableExport
* export the contents of the SSTable to JSON.
*
* @param args command lines arguments
* @throws IOException on failure to open/read/write files or output streams
* @throws ConfigurationException on configuration failure (wrong params given)
*/
public static void main(String[] args) throws ConfigurationException

View File

@ -459,7 +459,6 @@ public class SSTableImport
* using an optional command line argument, or supplied on standard in.
*
* @param args command line arguments
* @throws IOException on failure to open/read/write files or output streams
* @throws ParseException on failure to parse JSON input
* @throws ConfigurationException on configuration error.
*/

View File

@ -36,8 +36,9 @@ import org.apache.cassandra.service.ActiveRepairService;
*
* If you know you ran repair 2 weeks ago, you can do something like
*
* {@code
* sstablerepairset --is-repaired -f <(find /var/lib/cassandra/data/.../ -iname "*Data.db*" -mtime +14)
*
* }
*/
public class SSTableRepairedAtSetter
{

View File

@ -30,6 +30,7 @@ import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
*
* <p>The typical usage is something like:
* <pre>
* {@code
public final class ExampleShared
{
final OpOrder order = new OpOrder();
@ -73,6 +74,7 @@ import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
}
}
}
* }
* </pre>
*/
public class OpOrder

View File

@ -25,25 +25,30 @@ import java.io.IOException;
import org.apache.cassandra.db.TypeSizes;
/**
* <p>
* An "open" BitSet implementation that allows direct access to the arrays of words
* storing the bits. Derived from Lucene's OpenBitSet, but with a paged backing array
* (see bits delaration, below).
* <p/>
* </p>
* <p>
* Unlike java.util.bitset, the fact that bits are packed into an array of longs
* is part of the interface. This allows efficient implementation of other algorithms
* by someone other than the author. It also allows one to efficiently implement
* alternate serialization or interchange formats.
* <p/>
* </p>
* <p>
* <code>OpenBitSet</code> is faster than <code>java.util.BitSet</code> in most operations
* and *much* faster at calculating cardinality of sets and results of set operations.
* It can also handle sets of larger cardinality (up to 64 * 2**32-1)
* <p/>
* </p>
* <p>
* The goals of <code>OpenBitSet</code> are the fastest implementation possible, and
* maximum code reuse. Extra safety and encapsulation
* may always be built on top, but if that's built in, the cost can never be removed (and
* hence people re-implement their own version in order to get better performance).
* If you want a "safe", totally encapsulated (and slower and limited) BitSet
* class, use <code>java.util.BitSet</code>.
* </p>
*/
public class OpenBitSet implements IBitSet