Skip to content

Commit

Permalink
Javadoc fixes to make Java 8 happy.
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Larsen <[email protected]>
  • Loading branch information
manolama committed Aug 6, 2017
1 parent a89d184 commit 7ed83cd
Show file tree
Hide file tree
Showing 48 changed files with 106 additions and 90 deletions.
2 changes: 1 addition & 1 deletion src/core/AggregationIterator.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public class AggregationIterator implements SeekableView, DataPoint,
* <li>No: for {@code iterators[i]} the timestamp of the current data
* point is {@code timestamps[i]} and the timestamp of the next data
* point is {@code timestamps[iterators.length + i]}.</li>
* </li></ul>
* </ul>
* <p>
* Each timestamp can have the {@code FLAG_FLOAT} applied so it's important
* to use the {@code TIME_MASK} when getting the actual timestamp value
Expand Down
4 changes: 2 additions & 2 deletions src/core/Aggregators.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ public enum Interpolation {
public static final Aggregator ZIMSUM = new Sum(
Interpolation.ZIM, "zimsum");

/** Returns the minimum data point, causing SpanGroup to set <type>.MaxValue
/** Returns the minimum data point, causing SpanGroup to set &lt;type&gt;.MaxValue
* if timestamps don't line up instead of interpolating. */
public static final Aggregator MIMMIN = new Min(
Interpolation.MAX, "mimmin");

/** Returns the maximum data point, causing SpanGroup to set <type>.MinValue
/** Returns the maximum data point, causing SpanGroup to set &lt;type&gt;.MinValue
* if timestamps don't line up instead of interpolating. */
public static final Aggregator MIMMAX = new Max(
Interpolation.MIN, "mimmax");
Expand Down
1 change: 0 additions & 1 deletion src/core/HistogramCodecManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ public byte[] encode(final int id,
* @param id The ID of the histogram type to search for.
* @param raw_data The non-null and non-empty byte array to parse. Should NOT
* include the first byte of the ID in the data.
* @param timestamp The timestamp associated with the data point.
* @param includes_id Whether or not the data includes the ID prefix.
* @return A non-null data point if decoding was successful.
*/
Expand Down
1 change: 0 additions & 1 deletion src/core/HistogramDataPointCodec.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public void setId(final int id) {
* Creates {@code HistogramDataPoint} from raw data and timestamp. Note that
* the data point identifier is separate.
* @param raw_data The encoded byte array of the histogram data
* @param timestamp The timestamp of this data point
* @param includes_id Whether or not to include the id prefix.
* @return The decoded histogram data point instance
*/
Expand Down
18 changes: 10 additions & 8 deletions src/core/Internal.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@

/**
* <strong>This class is not part of the public API.</strong>
* <p><pre>
* ,____________________________,
*/

/**-
* ,____________________________,
* | This class is reserved for |
* | OpenTSDB's internal usage! |
* `----------------------------'
Expand All @@ -52,8 +54,10 @@
* ///-._ _ _ _ _ _ _}^ - - - - ~ ~-- ,.-~
* /.-~
* You've been warned by the dragon!
* </pre><p>
* This class is reserved for OpenTSDB's own internal usage only. If you use
*
*/

/** This class is reserved for OpenTSDB's own internal usage only. If you use
* anything from this package outside of OpenTSDB, a dragon will spontaneously
* appear and eat you. You've been warned.
* <p>
Expand Down Expand Up @@ -816,7 +820,7 @@ public static byte[] extractQualifier(final byte[] qualifier,
* the timestamp is in seconds, this returns a 2 byte qualifier. If it's in
* milliseconds, returns a 4 byte qualifier
* @param timestamp A Unix epoch timestamp in seconds or milliseconds
* @param flags Flags to set on the qualifier (length &| float)
* @param flags Flags to set on the qualifier (length &#38;| float)
* @return A 2 or 4 byte qualifier for storage in column or compacted column
* @since 2.0
*/
Expand Down Expand Up @@ -912,7 +916,7 @@ public static void createAndSetTSUIDFilter(final Scanner scanner,
* Simple helper to calculate the max value for any width of long from 0 to 8
* bytes.
* @param width The width of the byte array we're comparing
* @return The maximum unsigned integer value on {@link width} bytes. Note:
* @return The maximum unsigned integer value on {@code width} bytes. Note:
* If you ask for 8 bytes, it will return the max signed value. This is due
* to Java lacking unsigned integers... *sigh*.
* @since 2.2
Expand Down Expand Up @@ -1051,8 +1055,6 @@ public static long getTimeStampFromNonDP(final long base_time, byte[] quantifier
/**
* Decode the histogram point from the given key value
* @param kv the key value that contains a histogram
* @param config config object of TSDB, will use {@code "tsd.core.hist_decoder"}
* to get the decoder
* @return the decoded {@code HistogramDataPoint}
*/
public static HistogramDataPoint decodeHistogramDataPoint(final TSDB tsdb,
Expand Down
2 changes: 1 addition & 1 deletion src/core/RateOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* options are useful when working with metrics that are raw counter values,
* where a counter is defined by a value that always increases until it hits
* a maximum value and then it "rolls over" to start back at 0.
* <p/>
* <p>
* These options will only be utilized if the query is for a rate calculation
* and if the "counter" options is set to true.
* @since 2.0
Expand Down
4 changes: 3 additions & 1 deletion src/core/RowKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
import java.util.Arrays;
import java.util.Comparator;

import net.opentsdb.uid.NoSuchUniqueId;

import org.hbase.async.Bytes;

import com.stumbleupon.async.Deferred;
Expand Down Expand Up @@ -128,7 +130,7 @@ public static byte[] getSaltBytes(final int bucket) {
* tag UIDs and returning a modulo based on the number of salt buckets.
* The result will always be a positive integer from 0 to salt buckets.
*
* NOTE: The row key passed in MUST have allocated the {@link width} number of
* NOTE: The row key passed in MUST have allocated the {@code width} number of
* bytes at the front of the row key or this call will overwrite data.
*
* WARNING: If the width is set to a positive value, then the bucket must be
Expand Down
1 change: 1 addition & 0 deletions src/core/Span.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import net.opentsdb.meta.Annotation;
import net.opentsdb.rollup.RollupQuery;
import net.opentsdb.uid.NoSuchUniqueId;
import net.opentsdb.uid.UniqueId;

import org.hbase.async.Bytes;
Expand Down
1 change: 1 addition & 0 deletions src/core/TSDB.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import org.hbase.async.HBaseException;
import org.hbase.async.KeyValue;
import org.hbase.async.PutRequest;
import org.hbase.async.TableNotFoundException;
import org.jboss.netty.util.HashedWheelTimer;
import org.jboss.netty.util.Timeout;
import org.jboss.netty.util.Timer;
Expand Down
2 changes: 1 addition & 1 deletion src/core/TSSubQuery.java
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ public void setFilters(List<TagVFilter> filters) {
this.filters = filters;
}

/** @param whether or not to match series with ONLY the given tags
/** @param explicit_tags whether or not to match series with ONLY the given tags
* @since 2.3 */
public void setExplicitTags(final boolean explicit_tags) {
this.explicit_tags = explicit_tags;
Expand Down
2 changes: 1 addition & 1 deletion src/core/WriteableDataPointFilterPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public abstract class WriteableDataPointFilterPlugin {
* @param tsdb The parent TSDB object
* @throws IllegalArgumentException if required configuration parameters are
* missing
* @throws Exception if something else goes wrong
* @throws RuntimeException if something else goes wrong
*/
public abstract void initialize(final TSDB tsdb);

Expand Down
2 changes: 1 addition & 1 deletion src/meta/MetaDataCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public abstract class MetaDataCache {
* @param tsdb The parent TSDB object
* @throws IllegalArgumentException if required configuration parameters are
* missing
* @throws Exception if something else goes wrong
* @throws RuntimeException if something else goes wrong
*/
public abstract void initialize(final TSDB tsdb);

Expand Down
2 changes: 2 additions & 0 deletions src/meta/TSMeta.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
import java.util.Map;

import net.opentsdb.core.TSDB;
import net.opentsdb.uid.NoSuchUniqueId;
import net.opentsdb.uid.NoSuchUniqueName;
import net.opentsdb.uid.UniqueId;
import net.opentsdb.uid.UniqueId.UniqueIdType;
import net.opentsdb.utils.JSON;
Expand Down
3 changes: 2 additions & 1 deletion src/meta/TSUIDQuery.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import net.opentsdb.core.RowKey;
import net.opentsdb.core.TSDB;
import net.opentsdb.core.Tags;
import net.opentsdb.uid.NoSuchUniqueId;
import net.opentsdb.uid.NoSuchUniqueName;
import net.opentsdb.uid.UniqueId;
import net.opentsdb.uid.UniqueId.UniqueIdType;
Expand Down Expand Up @@ -523,7 +524,7 @@ public String toString() {

/**
* Attempts to retrieve the last data point for the given TSUID.
* This operates by checking the meta table for the {@link #COUNTER_QUALIFIER}
* This operates by checking the meta table for the {@code COUNTER_QUALIFIER}
* and if found, parses the HBase timestamp for the counter (i.e. the time when
* the counter was written) and tries to load the row in the data table for
* the hour where that timestamp would have landed. If the counter does not
Expand Down
1 change: 1 addition & 0 deletions src/meta/UIDMeta.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import com.stumbleupon.async.Deferred;

import net.opentsdb.core.TSDB;
import net.opentsdb.uid.NoSuchUniqueId;
import net.opentsdb.uid.UniqueId;
import net.opentsdb.uid.UniqueId.UniqueIdType;
import net.opentsdb.utils.JSON;
Expand Down
2 changes: 1 addition & 1 deletion src/query/QueryUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public static String getRowKeyUIDRegex(
* be null.
* @param row_key_literals An optional list of key value pairs to filter on.
* May be null.
* @param explicit_tag sWhether or not explicit tags are enabled so that the
* @param explicit_tags Whether or not explicit tags are enabled so that the
* regex only picks out series with the specified tags
* @param enable_fuzzy_filter Whether or not a fuzzy filter should be used
* in combination with the explicit tags param. If explicit tags is disabled
Expand Down
6 changes: 4 additions & 2 deletions src/query/expression/ExpressionIterator.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@
import java.util.Set;

import net.opentsdb.core.FillPolicy;
import net.opentsdb.core.IllegalDataException;
import net.opentsdb.query.expression.VariableIterator.SetOperator;
import net.opentsdb.utils.ByteSet;

import org.apache.commons.jexl2.JexlContext;
import org.apache.commons.jexl2.JexlEngine;
import org.apache.commons.jexl2.JexlException;
import org.apache.commons.jexl2.MapContext;
import org.apache.commons.jexl2.Script;
import org.apache.commons.jexl2.scripting.JexlScriptEngineFactory;
Expand All @@ -46,7 +48,7 @@
* intersection of the series.
* - Call {@link #values()} and store the reference. Results for each
* series will be written here as you iterate.
* - Call {@link #hasNext()} and {@link #next()} to iterate over results.
* - Call {@link #hasNext()} and {@link #next(int)} to iterate over results.
* - At each iteration, fetch the timestamp and value from the data points array.
* <p>
* Iteration is performed across all series supplied to the iterator, synchronizing
Expand Down Expand Up @@ -356,7 +358,7 @@ public ExpressionDataPoint[] next(final long timestamp) {
}

/** @return a list of expression results. You can keep this list and check the
* results on each call to {@link #next()} */
* results on each call to {@link #next(int)} */
@Override
public ExpressionDataPoint[] values() {
return dps;
Expand Down
2 changes: 1 addition & 1 deletion src/query/expression/ExpressionReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public char next() {
return chars[mark++];
}

/** @param the number of characters to skip */
/** @param num the number of characters to skip */
public void skip(final int num) {
if (num < 0) {
throw new UnsupportedOperationException("Skipping backwards is not allowed");
Expand Down
2 changes: 1 addition & 1 deletion src/query/expression/Expressions.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public static ExpressionTree parse(final String expression,

/**
* Parses a list of string expressions into the proper trees, adding the
* metrics to the {@link metric_queries} list.
* metrics to the {@code metric_queries} list.
* @param expressions A list of zero or more expressions (if empty, you get an
* empty tree list back)
* @param ts_query The original query with timestamps
Expand Down
4 changes: 2 additions & 2 deletions src/query/expression/ITimeSyncedIterator.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public interface ITimeSyncedIterator {
/** @return the index in the ExpressionIterator */
public int getIndex();

/** @param the index in the ExpressionIterator */
/** @param index the index in the ExpressionIterator */
public void setIndex(final int index);

/** @return the ID of this set given by the user */
Expand All @@ -75,7 +75,7 @@ public interface ITimeSyncedIterator {
* were defined then the set may be empty. */
public ByteSet getQueryTagKs();

/** @param A fill policy for the iterator. Iterators should implement a default */
/** @param policy A fill policy for the iterator. Iterators should implement a default */
public void setFillPolicy(final NumericFillPolicy policy);

/** @return the fill policy for the iterator */
Expand Down
4 changes: 2 additions & 2 deletions src/query/expression/IntersectionIterator.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
* <p>
* The {@link #current_values} map will map the expression "variables" to the
* proper iterator for each serie's array. E.g.
* <"A", [1, 2, 3, 4]>
* <"B", [1, 2, 3, 4]>
* &lt;"A", [1, 2, 3, 4]&gt;
* &lt;"B", [1, 2, 3, 4]&gt;
* <p>
* So to use it's you simply fetch the result map, call {@link #hasNext()} and
* {@link #next()} to iterate and in a for loop, iterate {@link #getSeriesSize()}
Expand Down
2 changes: 1 addition & 1 deletion src/query/expression/NumericFillPolicy.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public String toString() {
return "policy=" + policy + ", value=" + value;
}

/** @returns a NumericFillPolicy builder */
/** @return a NumericFillPolicy builder */
public static Builder Builder() {
return new Builder();
}
Expand Down
4 changes: 2 additions & 2 deletions src/query/expression/VariableIterator.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ public static SetOperator fromString(final String name) {
public void next();

/**
* Determines whether the individual series in the {@link values} array has
* Determines whether the individual series in the {@code values} array has
* another value. This may be used for non-synchronous iteration.
* @param index The index of the series in the values array to check for
* @return True if the series has another value, false if not
*/
public boolean hasNext(final int index);

/**
* Fetches the next value for an individual series in the {@link values} array.
* Fetches the next value for an individual series in the {@code values} array.
* @param index The index of the series in the values array to advance
*/
public void next(final int index);
Expand Down
8 changes: 4 additions & 4 deletions src/query/filter/TagVFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public TagVFilter() {
* The ctor that validates we have a good tag key to work with
* @param tagk The tag key to associate with this filter
* @param filter The unparsed filter
* @throws IlleglArgumentException if the tag was empty or null.
* @throws IllegalArgumentException if the tag was empty or null.
*/
public TagVFilter(final String tagk, final String filter) {
this.tagk = tagk;
Expand All @@ -161,15 +161,15 @@ public TagVFilter(final String tagk, final String filter) {

/**
* The name of this filter as used in queries. When used in URL queries the
* value will be in parentheses, e.g. filter(<exp>)
* value will be in parentheses, e.g. filter(&lt;exp&gt;)
* The name will also be lowercased before storing it in the lookup map.
* @return The name of the filter.
*/
public abstract String getType();

/**
* A simple string of the filter settings for printing in toString() calls.
* @return A string with the format "{settings=<val>, ...}"
* @return A string with the format "{settings=&lt;val&gt;, ...}"
*/
@JsonIgnore
public abstract String debugInfo();
Expand Down Expand Up @@ -492,7 +492,7 @@ public String getTagk() {
}

/** @return the tag key UID associated with this filter.
* Call {@link resolveName} first */
* Call {@link #resolveTagkName(TSDB)} first */
@JsonIgnore
public byte[] getTagkBytes() {
return tagk_bytes;
Expand Down
1 change: 1 addition & 0 deletions src/query/filter/TagVRegexFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import java.util.Map;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;

import com.google.common.base.Objects;
import com.stumbleupon.async.Deferred;
Expand Down
4 changes: 2 additions & 2 deletions src/rollup/RollUpDataPoint.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ public final String getGroupByAggregator() {
return groupby_aggregator;
}

/** @param an optional aggregation function if the data point was
* pre-aggregated */
/** @param groupby_aggregator an optional aggregation function if the data
* point was pre-aggregated */
public final void setGroupByAggregator(final String groupby_aggregator) {
this.groupby_aggregator = groupby_aggregator;
}
Expand Down
2 changes: 1 addition & 1 deletion src/search/SearchPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public abstract class SearchPlugin {
* @param tsdb The parent TSDB object
* @throws IllegalArgumentException if required configuration parameters are
* missing
* @throws Exception if something else goes wrong
* @throws RuntimeException if something else goes wrong
*/
public abstract void initialize(final TSDB tsdb);

Expand Down
9 changes: 4 additions & 5 deletions src/search/TimeSeriesLookup.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
* This class doesn't handle wild-card searching yet.
*
* When dealing with tags, we can lookup on tagks, tagvs or pairs. Thus:
* tagk, null <- lookup all series with a tagk
* tagk, tagv <- lookup all series with a tag pair
* null, tagv <- lookup all series with a tag value somewhere
* tagk, null &lt;- lookup all series with a tagk
* tagk, tagv &lt;- lookup all series with a tag pair
* null, tagv &lt;- lookup all series with a tag value somewhere
*
* The user can supply multiple tags in a query so the logic is a little goofy
* but here it is:
Expand Down Expand Up @@ -114,8 +114,7 @@ public class TimeSeriesLookup {
/**
* Default ctor
* @param tsdb The TSD to which we belong
* @param metric A metric to match on, may be null
* @param tags One or more tags to match on, may be null
* @param query The search query to execute.
*/
public TimeSeriesLookup(final TSDB tsdb, final SearchQuery query) {
this.tsdb = tsdb;
Expand Down
Loading

0 comments on commit 7ed83cd

Please sign in to comment.