metron-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ceste...@apache.org
Subject metron git commit: METRON-1270: fix for warnings missing @return tag argument in metron-analytics/metron-profiler-common and metron-profiler-client closes apache/incubator-metron#810
Date Thu, 26 Oct 2017 14:49:58 GMT
Repository: metron
Updated Branches:
  refs/heads/master 131a15ef7 -> cf404f77d


METRON-1270: fix for warnings missing @return tag argument in metron-analytics/metron-profiler-common
and metron-profiler-client closes apache/incubator-metron#810


Project: http://git-wip-us.apache.org/repos/asf/metron/repo
Commit: http://git-wip-us.apache.org/repos/asf/metron/commit/cf404f77
Tree: http://git-wip-us.apache.org/repos/asf/metron/tree/cf404f77
Diff: http://git-wip-us.apache.org/repos/asf/metron/diff/cf404f77

Branch: refs/heads/master
Commit: cf404f77d16daca5692f6197575bcc56c58fc2a9
Parents: 131a15e
Author: Artem Ervits <generic13@gmail.com>
Authored: Thu Oct 26 10:49:47 2017 -0400
Committer: cstella <cestella@gmail.com>
Committed: Thu Oct 26 10:49:47 2017 -0400

----------------------------------------------------------------------
 .../metron/profiler/client/window/Window.java   | 21 ++++++++++++--------
 .../profiler/client/window/WindowProcessor.java |  5 +++--
 .../predicates/DateSpecifierPredicate.java      |  2 +-
 .../client/window/predicates/DayPredicates.java |  2 +-
 .../window/predicates/HolidaysPredicate.java    |  2 +-
 .../apache/metron/profiler/ProfileBuilder.java  |  2 +-
 .../metron/profiler/hbase/ColumnBuilder.java    |  4 ++--
 7 files changed, 22 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/metron/blob/cf404f77/metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/window/Window.java
----------------------------------------------------------------------
diff --git a/metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/window/Window.java
b/metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/window/Window.java
index 8f697aa..964d594 100644
--- a/metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/window/Window.java
+++ b/metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/window/Window.java
@@ -45,7 +45,7 @@ public class Window {
   /**
    * Return the start of the interval relative to the timestamp passed.
    * @param now
-   * @return
+   * @return long returns the start of the interval relative to the timestamp passed
    */
   public long getStartMillis(long now) {
     return startMillis.apply(now);
@@ -58,9 +58,9 @@ public class Window {
   /**
    * Return the end of the interval relative to the timestamp passed.
    * @param now
-   * @return
+   * @return long returns the end of the interval relative to the timestamp passed
    */
-  public Long getEndMillis(long now) {
+  public long getEndMillis(long now) {
     return endMillis.apply(now);
   }
 
@@ -72,7 +72,8 @@ public class Window {
    * Get the set of inclusion predicates.  If any of these are true as applied to the window
interval start time,
    * then a field is included unless it's explicitly excluded.
    * @param now
-   * @return
+   * @return Iterable<Predicate<Long>> returns a set of inclusion predicates.
If any of these are true as
+   * applied to the window interval start time, then a field is included unless it's explicitly
excluded
    */
   public Iterable<Predicate<Long>> getIncludes(long now) {
     return Iterables.transform(includes, f -> f.apply(now));
@@ -86,7 +87,9 @@ public class Window {
    * Get the set of exclusion predicates.  If any of these exclusion predicates are true
as applied to the window
    * interval start time, then the interval is excluded.  NOTE: Exclusions trump inclusions.
    * @param now
-   * @return
+   * @return Iterable<Predicate<Long>> returns the set of exclusion predicates.
If any of these exclusion
+   * predicates are true as applied to the window interval start time, then the interval
is excluded.
+   * Exclusions trump inclusions.
    */
   public Iterable<Predicate<Long>> getExcludes(long now){
     return Iterables.transform(excludes, f -> f.apply(now));
@@ -98,7 +101,7 @@ public class Window {
 
   /**
    * The bin width.  This is fixed regardless of relative time.
-   * @return
+   * @return binWidth returns the bin width. This is fixed regardless of the relative time
    */
   public Optional<Long> getBinWidth() {
     return binWidth;
@@ -110,7 +113,8 @@ public class Window {
 
   /**
    * The skip distance.  How long between interval windows that one must go.
-   * @return
+   * @return skipDistance returns the skip distance. How long between interval
+   * windows that one must go.
    */
   public Optional<Long> getSkipDistance() {
     return skipDistance;
@@ -125,7 +129,8 @@ public class Window {
    * given inclusion and exclusion predicates.
    *
    * @param now
-   * @return
+   * @return intervals returns a set of sorted (oldest to newest) window intervals relative
to the
+   * passed timestamp given inclusion and exclusion predicates.
    */
   public List<Range<Long>> toIntervals(long now) {
     List<Range<Long>> intervals = new ArrayList<>();

http://git-wip-us.apache.org/repos/asf/metron/blob/cf404f77/metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/window/WindowProcessor.java
----------------------------------------------------------------------
diff --git a/metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/window/WindowProcessor.java
b/metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/window/WindowProcessor.java
index 80dd649..da4ce3c 100644
--- a/metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/window/WindowProcessor.java
+++ b/metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/window/WindowProcessor.java
@@ -56,7 +56,7 @@ public class WindowProcessor extends WindowBaseListener {
 
   /**
    * Retrieve the window constructed from the window selector statement.
-   * @return
+   * @return window returns the window constructed from the window selector statement
    */
   public Window getWindow() {
     return window;
@@ -387,7 +387,8 @@ public class WindowProcessor extends WindowBaseListener {
    * conforming to the Window grammar.
    *
    * @param statement
-   * @return
+   * @return Window returns a Window object (parameterized by time) from a statement specifying
the window
+   * intervals conforming to the Window grammar.
    * @throws ParseException
    */
   public static Window process(String statement) throws ParseException {

http://git-wip-us.apache.org/repos/asf/metron/blob/cf404f77/metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/window/predicates/DateSpecifierPredicate.java
----------------------------------------------------------------------
diff --git a/metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/window/predicates/DateSpecifierPredicate.java
b/metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/window/predicates/DateSpecifierPredicate.java
index 5086719..ba7a722 100644
--- a/metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/window/predicates/DateSpecifierPredicate.java
+++ b/metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/window/predicates/DateSpecifierPredicate.java
@@ -73,7 +73,7 @@ public class DateSpecifierPredicate implements Predicate<Long> {
   /**
    * Returns true if the timestamp happens on the specified day and false otherwise.
    * @param ts
-   * @return
+   * @return boolean returns true if the timestamp happens on the specified day and false
otherwise
    */
   @Override
   public boolean test(Long ts) {

http://git-wip-us.apache.org/repos/asf/metron/blob/cf404f77/metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/window/predicates/DayPredicates.java
----------------------------------------------------------------------
diff --git a/metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/window/predicates/DayPredicates.java
b/metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/window/predicates/DayPredicates.java
index 8025371..e8b985c 100644
--- a/metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/window/predicates/DayPredicates.java
+++ b/metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/window/predicates/DayPredicates.java
@@ -104,7 +104,7 @@ public enum DayPredicates {
    * Create a Predicate given a set of arguments.
    * @param name
    * @param arg
-   * @return
+   * @return Predicate<Long> return a Predicate given a set of arguments
    */
   public static Predicate<Long> create(String name, List<String> arg) {
     return DayPredicates.valueOf(name).predicateCreator.apply(arg);

http://git-wip-us.apache.org/repos/asf/metron/blob/cf404f77/metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/window/predicates/HolidaysPredicate.java
----------------------------------------------------------------------
diff --git a/metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/window/predicates/HolidaysPredicate.java
b/metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/window/predicates/HolidaysPredicate.java
index 4705d42..b9c8c3c 100644
--- a/metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/window/predicates/HolidaysPredicate.java
+++ b/metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/window/predicates/HolidaysPredicate.java
@@ -76,7 +76,7 @@ public class HolidaysPredicate implements Predicate<Long> {
   /**
    * True if the timestamp falls on a holiday as specified or false otherwise.
    * @param ts
-   * @return
+   * @return boolean returns true if the timestamp falls on a holiday or false otherwise
    */
   @Override
   public boolean test(Long ts) {

http://git-wip-us.apache.org/repos/asf/metron/blob/cf404f77/metron-analytics/metron-profiler-common/src/main/java/org/apache/metron/profiler/ProfileBuilder.java
----------------------------------------------------------------------
diff --git a/metron-analytics/metron-profiler-common/src/main/java/org/apache/metron/profiler/ProfileBuilder.java
b/metron-analytics/metron-profiler-common/src/main/java/org/apache/metron/profiler/ProfileBuilder.java
index d1fbc11..c09b0b6 100644
--- a/metron-analytics/metron-profiler-common/src/main/java/org/apache/metron/profiler/ProfileBuilder.java
+++ b/metron-analytics/metron-profiler-common/src/main/java/org/apache/metron/profiler/ProfileBuilder.java
@@ -61,7 +61,7 @@ public interface ProfileBuilder {
 
   /**
    * Returns the definition of the profile being built.
-   * @return
+   * @return ProfileConfig definition of the profile
    */
   ProfileConfig getDefinition();
 

http://git-wip-us.apache.org/repos/asf/metron/blob/cf404f77/metron-analytics/metron-profiler-common/src/main/java/org/apache/metron/profiler/hbase/ColumnBuilder.java
----------------------------------------------------------------------
diff --git a/metron-analytics/metron-profiler-common/src/main/java/org/apache/metron/profiler/hbase/ColumnBuilder.java
b/metron-analytics/metron-profiler-common/src/main/java/org/apache/metron/profiler/hbase/ColumnBuilder.java
index c645822..7fc5daa 100644
--- a/metron-analytics/metron-profiler-common/src/main/java/org/apache/metron/profiler/hbase/ColumnBuilder.java
+++ b/metron-analytics/metron-profiler-common/src/main/java/org/apache/metron/profiler/hbase/ColumnBuilder.java
@@ -38,7 +38,7 @@ public interface ColumnBuilder extends Serializable {
 
   /**
    * Returns the column family used to store the ProfileMeasurement values.
-   * @return
+   * @return String returns the column family used to store the ProfileMeasurement values
    */
   String getColumnFamily();
 
@@ -47,4 +47,4 @@ public interface ColumnBuilder extends Serializable {
    * @return The column qualifier used to store a ProfileMeasurement's field in HBase.
    */
   byte[] getColumnQualifier(String fieldName);
-}
\ No newline at end of file
+}


Mime
View raw message