Skip to content

Commit

Permalink
Build: Add javadocs jars
Browse files Browse the repository at this point in the history
This change adds javadoc jars to core, test-framework and plugins. There
were a couple issues which javadoc found, but doclint did not already
find.
  • Loading branch information
rjernst committed Nov 15, 2015
1 parent c09103c commit 4b17492
Show file tree
Hide file tree
Showing 18 changed files with 33 additions and 28 deletions.
10 changes: 7 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ subprojects {
}
}
extraArchive {
javadoc = false
javadoc = true
tests = false
}
// we have our own username/password prompts so that they only happen once
Expand Down Expand Up @@ -87,15 +87,19 @@ allprojects {
}

subprojects {
// include license and notice in jars
gradle.projectsEvaluated {
project.afterEvaluate {
// include license and notice in jars
tasks.withType(Jar) {
into('META-INF') {
from project.rootProject.rootDir
include 'LICENSE.txt'
include 'NOTICE.txt'
}
}
// ignore missing javadocs
tasks.withType(Javadoc) { Javadoc javadoc ->
javadoc.options.addStringOption('Xdoclint:all,-missing', '-quiet')
}
}

configurations {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,9 @@ class BuildPlugin implements Plugin<Project> {
static void configureCompile(Project project) {
project.afterEvaluate {
// fail on all javac warnings
project.tasks.withType(JavaCompile) {
options.compilerArgs << '-Werror' << '-Xlint:all' << '-Xdoclint:all/private' << '-Xdoclint:-missing'
options.encoding = 'UTF-8'
project.tasks.withType(JavaCompile) { JavaCompile compile ->
compile.options.compilerArgs << '-Werror' << '-Xlint:all' << '-Xdoclint:all/private,-missing'
compile.options.encoding = 'UTF-8'
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
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
*/
public class GetWarmersRequest extends ClusterInfoRequest<GetWarmersRequest> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public interface ClusterService extends LifecycleComponent<ClusterService> {
/**
* 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();
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class DiskUsage {
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
*/
public DiskUsage(String nodeId, String nodeName, String path, long totalBytes, long freeBytes) {
Expand Down
5 changes: 3 additions & 2 deletions core/src/main/java/org/elasticsearch/common/metrics/EWMA.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@

/**
* 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/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 {
private static final double M1_ALPHA = 1 - Math.exp(-5 / 60.0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@
* A meter metric which measures mean throughput and one-, five-, and
* 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>
* <p>
* taken from codahale metric module, replaced with LongAdder
*/
public class MeterMetric implements Metric {
private static final long INTERVAL = 5; // seconds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ public static void writeDistanceUnit(StreamOutput out, DistanceUnit unit) throws
* @param in {@link StreamInput} to read the {@link DistanceUnit} from
* @return {@link DistanceUnit} 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 {
byte b = in.readByte();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,8 @@ public CompletionFieldType fieldType() {
* Parsing:
* Acceptable format:
* "STRING" - interpreted as field value (input)
* "ARRAY" - each element can be one of {@link #parse(ParseContext, Token, XContentParser, Map)}
* "OBJECT" - see {@link #parse(ParseContext, Token, XContentParser, Map)}
* "ARRAY" - each element can be one of "OBJECT" (see below)
* "OBJECT" - { "input": STRING|ARRAY, "weight": STRING|INT, "contexts": ARRAY|OBJECT }
*
* Indexing:
* if context mappings are defined, delegates to {@link ContextMappings#addField(ParseContext.Document, String, String, int, Map)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ ImmutableTranslogReader openReader(Path path, Checkpoint checkpoint) throws IOEx
/**
* 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) {
final String fileName = translogFile.getFileName().toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@
* 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>
* public class MyAnalysisPlugin extends Plugin {
* @Override
* \@Override
* public String name() {
* return "analysis-my-plugin";
* }
*
* @Override
* \@Override
* public String description() {
* return "my very fast and efficient analyzer";
* }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
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 {
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public RangeBuilder(String name) {
*
* @param key the key to use for this range in the response
* @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) {
ranges.add(new Range(key, from, to));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public DateRangeBuilder(String name) {
*
* @param key the key to use for this range in the response
* @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) {
ranges.add(new Range(key, from, to));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public GeoDistanceBuilder lon(double lon) {
*
* @param key the key to use for this range in the response
* @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) {
ranges.add(new Range(key, from, to));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public IPv4RangeBuilder(String name) {
*
* @param key the key to use for this range in the response
* @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) {
ranges.add(new Range(key, from, to));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
* final content char.
* <p>
*
* @lucene.experimental
* @deprecated Implement {@link TermToBytesRefAttribute} and store bytes directly
* instead. This class WAS removed in Lucene 5.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
* should be used, here is an example:
* <pre>
*
* @ClusterScope(scope=Scope.TEST) public class SomeIT extends ESIntegTestCase {
* {@literal @}ClusterScope(scope=Scope.TEST) public class SomeIT extends ESIntegTestCase {
* public void testMethod() {}
* }
* </pre>
Expand All @@ -203,7 +203,7 @@
* 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.
* <pre>
* @ClusterScope(scope=Scope.SUITE, numDataNodes=3)
* {@literal @}ClusterScope(scope=Scope.SUITE, numDataNodes=3)
* public class SomeIT extends ESIntegTestCase {
* public void testMethod() {}
* }
Expand Down

0 comments on commit 4b17492

Please sign in to comment.