Merge pull request #14766 from rjernst/javadocs

Add javadocs jars
This commit is contained in:
Ryan Ernst 2015-11-20 12:21:40 -08:00
commit fffb1be82c
17 changed files with 35 additions and 25 deletions

View File

@ -47,7 +47,7 @@ subprojects {
} }
} }
extraArchive { extraArchive {
javadoc = false javadoc = true
tests = false tests = false
} }
// we have our own username/password prompts so that they only happen once // we have our own username/password prompts so that they only happen once
@ -87,8 +87,8 @@ allprojects {
} }
subprojects { subprojects {
// include license and notice in jars project.afterEvaluate {
gradle.projectsEvaluated { // include license and notice in jars
tasks.withType(Jar) { tasks.withType(Jar) {
into('META-INF') { into('META-INF') {
from project.rootProject.rootDir from project.rootProject.rootDir
@ -96,6 +96,15 @@ subprojects {
include 'NOTICE.txt' include 'NOTICE.txt'
} }
} }
// ignore missing javadocs
tasks.withType(Javadoc) { Javadoc javadoc ->
// the -quiet here is because of a bug in gradle, in that adding a string option
// by itself is not added to the options. By adding quiet, both this option and
// the "value" -quiet is added, separated by a space. This is ok since the javadoc
// command already adds -quiet, so we are just duplicating it
// see https://discuss.gradle.org/t/add-custom-javadoc-option-that-does-not-take-an-argument/5959
javadoc.options.addStringOption('Xdoclint:all,-missing', '-quiet')
}
} }
configurations { configurations {

View File

@ -28,7 +28,7 @@ import org.elasticsearch.common.io.stream.StreamOutput;
import java.io.IOException; import java.io.IOException;
/** /**
* An {@ClusterInfoRequest} that fetches {@link org.elasticsearch.search.warmer.IndexWarmersMetaData} for * A {@link ClusterInfoRequest} that fetches {@link org.elasticsearch.search.warmer.IndexWarmersMetaData} for
* a list or all existing index warmers in the cluster-state * a list or all existing index warmers in the cluster-state
*/ */
public class GetWarmersRequest extends ClusterInfoRequest<GetWarmersRequest> { public class GetWarmersRequest extends ClusterInfoRequest<GetWarmersRequest> {

View File

@ -123,7 +123,7 @@ public interface ClusterService extends LifecycleComponent<ClusterService> {
/** /**
* Returns the maximum wait time for tasks in the queue * Returns the maximum wait time for tasks in the queue
* *
* @returns A zero time value if the queue is empty, otherwise the time value oldest task waiting in the queue * @return A zero time value if the queue is empty, otherwise the time value oldest task waiting in the queue
*/ */
TimeValue getMaxTaskWaitTime(); TimeValue getMaxTaskWaitTime();
} }

View File

@ -33,7 +33,7 @@ public class DiskUsage {
final long freeBytes; final long freeBytes;
/** /**
* Create a new DiskUsage, if {@code totalBytes} is 0, {@get getFreeDiskAsPercentage} * Create a new DiskUsage, if {@code totalBytes} is 0, {@link #getFreeDiskAsPercentage()}
* will always return 100.0% free * will always return 100.0% free
*/ */
public DiskUsage(String nodeId, String nodeName, String path, long totalBytes, long freeBytes) { public DiskUsage(String nodeId, String nodeName, String path, long totalBytes, long freeBytes) {

View File

@ -25,11 +25,12 @@ import java.util.concurrent.TimeUnit;
/** /**
* An exponentially-weighted moving average. * An exponentially-weighted moving average.
*
* <p>
* Taken from codahale metric module, changed to use LongAdder
* *
* @see <a href="http://www.teamquest.com/pdfs/whitepaper/ldavg1.pdf">UNIX Load Average Part 1: How It Works</a> * @see <a href="http://www.teamquest.com/pdfs/whitepaper/ldavg1.pdf">UNIX Load Average Part 1: How It Works</a>
* @see <a href="http://www.teamquest.com/pdfs/whitepaper/ldavg2.pdf">UNIX Load Average Part 2: Not Your Average Average</a> * @see <a href="http://www.teamquest.com/pdfs/whitepaper/ldavg2.pdf">UNIX Load Average Part 2: Not Your Average Average</a>
* <p>
* Taken from codahale metric module, changed to use LongAdder
*/ */
public class EWMA { public class EWMA {
private static final double M1_ALPHA = 1 - Math.exp(-5 / 60.0); private static final double M1_ALPHA = 1 - Math.exp(-5 / 60.0);

View File

@ -30,9 +30,10 @@ import java.util.concurrent.TimeUnit;
* A meter metric which measures mean throughput and one-, five-, and * A meter metric which measures mean throughput and one-, five-, and
* fifteen-minute exponentially-weighted moving average throughputs. * fifteen-minute exponentially-weighted moving average throughputs.
* *
* <p>
* taken from codahale metric module, replaced with LongAdder
*
* @see <a href="http://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average">EMA</a> * @see <a href="http://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average">EMA</a>
* <p>
* taken from codahale metric module, replaced with LongAdder
*/ */
public class MeterMetric implements Metric { public class MeterMetric implements Metric {
private static final long INTERVAL = 5; // seconds private static final long INTERVAL = 5; // seconds

View File

@ -225,7 +225,7 @@ public enum DistanceUnit {
* @param in {@link StreamInput} to read the {@link DistanceUnit} from * @param in {@link StreamInput} to read the {@link DistanceUnit} from
* @return {@link DistanceUnit} read from the {@link StreamInput} * @return {@link DistanceUnit} read from the {@link StreamInput}
* @throws IOException if no unit can be read from the {@link StreamInput} * @throws IOException if no unit can be read from the {@link StreamInput}
* @thrown ElasticsearchIllegalArgumentException if no matching {@link DistanceUnit} can be found * @throws IllegalArgumentException if no matching {@link DistanceUnit} can be found
*/ */
public static DistanceUnit readDistanceUnit(StreamInput in) throws IOException { public static DistanceUnit readDistanceUnit(StreamInput in) throws IOException {
byte b = in.readByte(); byte b = in.readByte();

View File

@ -421,8 +421,8 @@ public class CompletionFieldMapper extends FieldMapper implements ArrayValueMapp
* Parsing: * Parsing:
* Acceptable format: * Acceptable format:
* "STRING" - interpreted as field value (input) * "STRING" - interpreted as field value (input)
* "ARRAY" - each element can be one of {@link #parse(ParseContext, Token, XContentParser, Map)} * "ARRAY" - each element can be one of "OBJECT" (see below)
* "OBJECT" - see {@link #parse(ParseContext, Token, XContentParser, Map)} * "OBJECT" - { "input": STRING|ARRAY, "weight": STRING|INT, "contexts": ARRAY|OBJECT }
* *
* Indexing: * Indexing:
* if context mappings are defined, delegates to {@link ContextMappings#addField(ParseContext.Document, String, String, int, Map)} * if context mappings are defined, delegates to {@link ContextMappings#addField(ParseContext.Document, String, String, int, Map)}

View File

@ -257,7 +257,7 @@ public class Translog extends AbstractIndexShardComponent implements IndexShardC
/** /**
* Extracts the translog generation from a file name. * Extracts the translog generation from a file name.
* *
* @throw IllegalArgumentException if the path doesn't match the expected pattern. * @throws IllegalArgumentException if the path doesn't match the expected pattern.
*/ */
public static long parseIdFromFileName(Path translogFile) { public static long parseIdFromFileName(Path translogFile) {
final String fileName = translogFile.getFileName().toString(); final String fileName = translogFile.getFileName().toString();

View File

@ -48,12 +48,12 @@ import java.util.*;
* The {@link org.elasticsearch.indices.analysis.AnalysisModule.AnalysisProvider} is only a functional interface that allows to register factory constructors directly like the plugin example below: * The {@link org.elasticsearch.indices.analysis.AnalysisModule.AnalysisProvider} is only a functional interface that allows to register factory constructors directly like the plugin example below:
* <pre> * <pre>
* public class MyAnalysisPlugin extends Plugin { * public class MyAnalysisPlugin extends Plugin {
* @Override * \@Override
* public String name() { * public String name() {
* return "analysis-my-plugin"; * return "analysis-my-plugin";
* } * }
* *
* @Override * \@Override
* public String description() { * public String description() {
* return "my very fast and efficient analyzer"; * return "my very fast and efficient analyzer";
* } * }

View File

@ -29,9 +29,9 @@ import java.util.List;
public interface GeoHashGrid extends MultiBucketsAggregation { public interface GeoHashGrid extends MultiBucketsAggregation {
/** /**
* A bucket that is associated with a {@code geohash_grid} cell. The key of the bucket is the {@cod geohash} of the cell * A bucket that is associated with a {@code geohash_grid} cell. The key of the bucket is the {@code geohash} of the cell
*/ */
public static interface Bucket extends MultiBucketsAggregation.Bucket { interface Bucket extends MultiBucketsAggregation.Bucket {
} }
/** /**

View File

@ -41,7 +41,7 @@ public class RangeBuilder extends AbstractRangeBuilder<RangeBuilder> {
* *
* @param key the key to use for this range in the response * @param key the key to use for this range in the response
* @param from the lower bound on the distances, inclusive * @param from the lower bound on the distances, inclusive
* @parap to the upper bound on the distances, exclusive * @param to the upper bound on the distances, exclusive
*/ */
public RangeBuilder addRange(String key, double from, double to) { public RangeBuilder addRange(String key, double from, double to) {
ranges.add(new Range(key, from, to)); ranges.add(new Range(key, from, to));

View File

@ -42,7 +42,7 @@ public class DateRangeBuilder extends AbstractRangeBuilder<DateRangeBuilder> {
* *
* @param key the key to use for this range in the response * @param key the key to use for this range in the response
* @param from the lower bound on the distances, inclusive * @param from the lower bound on the distances, inclusive
* @parap to the upper bound on the distances, exclusive * @param to the upper bound on the distances, exclusive
*/ */
public DateRangeBuilder addRange(String key, Object from, Object to) { public DateRangeBuilder addRange(String key, Object from, Object to) {
ranges.add(new Range(key, from, to)); ranges.add(new Range(key, from, to));

View File

@ -168,7 +168,7 @@ public class GeoDistanceBuilder extends AggregationBuilder<GeoDistanceBuilder> {
* *
* @param key the key to use for this range in the response * @param key the key to use for this range in the response
* @param from the lower bound on the distances, inclusive * @param from the lower bound on the distances, inclusive
* @parap to the upper bound on the distances, exclusive * @param to the upper bound on the distances, exclusive
*/ */
public GeoDistanceBuilder addRange(String key, double from, double to) { public GeoDistanceBuilder addRange(String key, double from, double to) {
ranges.add(new Range(key, from, to)); ranges.add(new Range(key, from, to));

View File

@ -41,7 +41,7 @@ public class IPv4RangeBuilder extends AbstractRangeBuilder<IPv4RangeBuilder> {
* *
* @param key the key to use for this range in the response * @param key the key to use for this range in the response
* @param from the lower bound on the distances, inclusive * @param from the lower bound on the distances, inclusive
* @parap to the upper bound on the distances, exclusive * @param to the upper bound on the distances, exclusive
*/ */
public IPv4RangeBuilder addRange(String key, String from, String to) { public IPv4RangeBuilder addRange(String key, String from, String to) {
ranges.add(new Range(key, from, to)); ranges.add(new Range(key, from, to));

View File

@ -37,7 +37,6 @@ import org.apache.lucene.analysis.tokenattributes.TermToBytesRefAttribute; // ja
* final content char. * final content char.
* <p> * <p>
* *
* @lucene.experimental
* @deprecated Implement {@link TermToBytesRefAttribute} and store bytes directly * @deprecated Implement {@link TermToBytesRefAttribute} and store bytes directly
* instead. This class WAS removed in Lucene 5.0 * instead. This class WAS removed in Lucene 5.0
*/ */

View File

@ -192,7 +192,7 @@ import static org.hamcrest.Matchers.startsWith;
* should be used, here is an example: * should be used, here is an example:
* <pre> * <pre>
* *
* @ClusterScope(scope=Scope.TEST) public class SomeIT extends ESIntegTestCase { * {@literal @}ClusterScope(scope=Scope.TEST) public class SomeIT extends ESIntegTestCase {
* public void testMethod() {} * public void testMethod() {}
* } * }
* </pre> * </pre>
@ -203,7 +203,7 @@ import static org.hamcrest.Matchers.startsWith;
* determined at random and can change across tests. The {@link ClusterScope} allows configuring the initial number of nodes * determined at random and can change across tests. The {@link ClusterScope} allows configuring the initial number of nodes
* that are created before the tests start. * that are created before the tests start.
* <pre> * <pre>
* @ClusterScope(scope=Scope.SUITE, numDataNodes=3) * {@literal @}ClusterScope(scope=Scope.SUITE, numDataNodes=3)
* public class SomeIT extends ESIntegTestCase { * public class SomeIT extends ESIntegTestCase {
* public void testMethod() {} * public void testMethod() {}
* } * }