reiabreu commented on code in PR #9266:
URL: https://github.com/apache/storm/pull/9266#discussion_r4523347402


##########
storm-client/src/jvm/org/apache/storm/utils/TimeCacheMap.java:
##########
@@ -28,7 +28,7 @@
  *
  * @deprecated in favor of non-threaded {@link RotatingMap}.
  */
-@Deprecated(forRemoval = false)
+@Deprecated(since = "0.7.0", forRemoval = false)

Review Comment:
   `TimeCacheMap` was deprecated in commit 28d4c9e46 (2012-08-06, "deprecated 
LinearDRPCTopologyBuilder, transactional topologies, and TimeCacheMap"). 
`project.clj` at that commit is `0.8.1-SNAPSHOT`, the commit is not in the 
"release 0.8.0" commit (27b615e11), and the old CHANGELOG lists it under 0.8.1.
   
   ```suggestion
   @Deprecated(since = "0.8.1", forRemoval = false)
   ```



##########
storm-client/src/jvm/org/apache/storm/drpc/LinearDRPCTopologyBuilder.java:
##########
@@ -70,7 +70,7 @@ public LinearDRPCInputDeclarer addBolt(IBatchBolt bolt) {
      * @return input declarer
      * @deprecated please use {@link #addBolt(IBatchBolt, Number)} or {@link 
#addBolt(IBasicBolt, Number)} instead.
      */
-    @Deprecated(forRemoval = true)
+    @Deprecated(since = "1.0.0", forRemoval = true)

Review Comment:
   This overload was deprecated in commit 6bcd3bb4c (2012-01-27, "deprecate 
richbolt interface for drpc"). `project.clj` at that commit is 
`0.7.0-SNAPSHOT`, and the commit is an ancestor of "finalize 0.7.0" 
(20a59857e). In 2.0.0 only the class-level deprecation was removed (97c1d10ca).
   
   ```suggestion
       @Deprecated(since = "0.7.0", forRemoval = true)
   ```



##########
storm-client/src/jvm/org/apache/storm/drpc/LinearDRPCTopologyBuilder.java:
##########
@@ -87,7 +87,7 @@ public LinearDRPCInputDeclarer addBolt(IRichBolt bolt, Number 
parallelism) {
      * @return input declarer
      * @deprecated please use {@link #addBolt(IBatchBolt)} or {@link 
#addBolt(IBasicBolt)} instead.
      */
-    @Deprecated(forRemoval = true)
+    @Deprecated(since = "1.0.0", forRemoval = true)

Review Comment:
   Same 2012 deprecation (6bcd3bb4c), first released in 0.7.0.
   
   ```suggestion
       @Deprecated(since = "0.7.0", forRemoval = true)
   ```



##########
flux/flux-core/src/main/java/org/apache/storm/flux/Flux.java:
##########
@@ -53,18 +53,35 @@
 public class Flux {
     private static final Logger LOG = LoggerFactory.getLogger(Flux.class);
 
-    @Deprecated
+    /**
+     * CLI option for local mode.
+     * @deprecated Ignored: to run in local mode use {@code storm local}
+     *     instead of {@code storm jar}.

Review Comment:
   Checkstyle warns `RequireEmptyLineBeforeBlockTagGroup` on the new 
`@deprecated` lines in this file. Adding the empty line clears it:
   
   ```suggestion
        * CLI option for local mode.
        *
        * @deprecated Ignored: to run in local mode use {@code storm local}
        *     instead of {@code storm jar}.
   ```



##########
flux/flux-core/src/main/java/org/apache/storm/flux/Flux.java:
##########
@@ -53,18 +53,35 @@
 public class Flux {
     private static final Logger LOG = LoggerFactory.getLogger(Flux.class);
 
-    @Deprecated
+    /**
+     * CLI option for local mode.
+     * @deprecated Ignored: to run in local mode use {@code storm local}
+     *     instead of {@code storm jar}.
+     */
+    @Deprecated(since = "2.0.0", forRemoval = true)
     private static final String OPTION_LOCAL = "local";
-    @Deprecated
+    /**
+     * CLI option for remote mode.
+     * @deprecated Ignored: to run on a remote cluster launch using {@code 
storm jar}.

Review Comment:
   ```suggestion
        * CLI option for remote mode.
        *
        * @deprecated Ignored: to run on a remote cluster launch using {@code 
storm jar}.
   ```



##########
flux/flux-core/src/main/java/org/apache/storm/flux/Flux.java:
##########
@@ -53,18 +53,35 @@
 public class Flux {
     private static final Logger LOG = LoggerFactory.getLogger(Flux.class);
 
-    @Deprecated
+    /**
+     * CLI option for local mode.
+     * @deprecated Ignored: to run in local mode use {@code storm local}
+     *     instead of {@code storm jar}.
+     */
+    @Deprecated(since = "2.0.0", forRemoval = true)
     private static final String OPTION_LOCAL = "local";
-    @Deprecated
+    /**
+     * CLI option for remote mode.
+     * @deprecated Ignored: to run on a remote cluster launch using {@code 
storm jar}.
+     */
+    @Deprecated(since = "2.0.0", forRemoval = true)
     private static final String OPTION_REMOTE = "remote";
     private static final String OPTION_RESOURCE = "resource";
-    @Deprecated
+    /**
+     * CLI option for sleep time in local mode.
+     * @deprecated Ignored in local mode.

Review Comment:
   The option is ignored in every mode, and the CLI help already names the 
replacement (`--local-ttl` of `storm local`):
   
   ```suggestion
        * CLI option for the run time of a local cluster.
        *
        * @deprecated Ignored: to set how long a local cluster runs use {@code 
--local-ttl}
        *     with {@code storm local}.
   ```



##########
storm-client/src/jvm/org/apache/storm/security/auth/plain/PlainSaslTransportPlugin.java:
##########
@@ -31,7 +31,9 @@
  * This should never be used except for testing. It provides no security at 
all. The password is
  * hard coded, and even if it were not it is
  * sent in plain text.
- * @deprecated This should never be used except for testing as it provides no 
security.
+ * @deprecated This should never be used except for testing as it provides no 
security. Please use

Review Comment:
   Optional: checkstyle also warns (`RequireEmptyLineBeforeBlockTagGroup`) on 
this `@deprecated` line:
   
   ```suggestion
    *
    * @deprecated This should never be used except for testing as it provides 
no security. Please use
   ```



##########
storm-client/src/jvm/org/apache/storm/security/auth/plain/SaslPlainServer.java:
##########
@@ -26,7 +26,10 @@
 
 /**
  * Plain SASL server implementation for testing.
- * @deprecated This should never be used except for testing as it provides no 
security.
+ * @deprecated This should never be used except for testing as it provides no 
security. Please use

Review Comment:
   Optional: same checkstyle warning here:
   
   ```suggestion
    *
    * @deprecated This should never be used except for testing as it provides 
no security. Please use
   ```



##########
flux/flux-core/src/main/java/org/apache/storm/flux/Flux.java:
##########
@@ -53,18 +53,35 @@
 public class Flux {
     private static final Logger LOG = LoggerFactory.getLogger(Flux.class);
 
-    @Deprecated
+    /**
+     * CLI option for local mode.
+     * @deprecated Ignored: to run in local mode use {@code storm local}
+     *     instead of {@code storm jar}.
+     */
+    @Deprecated(since = "2.0.0", forRemoval = true)
     private static final String OPTION_LOCAL = "local";
-    @Deprecated
+    /**
+     * CLI option for remote mode.
+     * @deprecated Ignored: to run on a remote cluster launch using {@code 
storm jar}.
+     */
+    @Deprecated(since = "2.0.0", forRemoval = true)
     private static final String OPTION_REMOTE = "remote";
     private static final String OPTION_RESOURCE = "resource";
-    @Deprecated
+    /**
+     * CLI option for sleep time in local mode.
+     * @deprecated Ignored in local mode.
+     */
+    @Deprecated(since = "2.0.0", forRemoval = true)
     private static final String OPTION_SLEEP = "sleep";
     private static final String OPTION_DRY_RUN = "dry-run";
     private static final String OPTION_NO_DETAIL = "no-detail";
     private static final String OPTION_NO_SPLASH = "no-splash";
     private static final String OPTION_INACTIVE = "inactive";
-    @Deprecated
+    /**
+     * CLI option for zookeeper connection string.
+     * @deprecated Ignored.

Review Comment:
   Same here, the CLI help names `--local-zookeeper` of `storm local`:
   
   ```suggestion
        * CLI option for the ZooKeeper connection string.
        *
        * @deprecated Ignored: to use an external ZooKeeper with a local 
cluster use
        *     {@code --local-zookeeper} with {@code storm local}.
   ```



##########
storm-client/src/jvm/org/apache/storm/task/IMetricsContext.java:
##########
@@ -28,23 +28,29 @@ public interface IMetricsContext {
     /**
      * Register metric.
      *
-     * @deprecated in favor of metrics v2 (the non-deprecated methods on this 
class)
+     * @deprecated in favor of metrics v2. Please use {@link 
#registerGauge(String, Gauge)},
+     *     {@link #registerCounter(String)}, {@link #registerMeter(String)},
+     *     {@link #registerHistogram(String)}, or {@link 
#registerTimer(String)} instead.
      */
     @Deprecated(since = "2.1.0", forRemoval = true)
     <T extends IMetric> T registerMetric(String name, T metric, int 
timeBucketSizeInSecs);
 
     /**
      * Register metric.
      *
-     * @deprecated in favor of metrics v2 (the non-deprecated methods on this 
class)
+     * @deprecated in favor of metrics v2. Please use {@link 
#registerGauge(String, Gauge)},
+     *     {@link #registerCounter(String)}, {@link #registerMeter(String)},
+     *     {@link #registerHistogram(String)}, or {@link 
#registerTimer(String)} instead.

Review Comment:
   Same for this overload:
   
   ```suggestion
        * @deprecated in favor of metrics v2. Please use {@link 
#registerGauge(String, Gauge)},
        *     {@link #registerCounter(String)}, {@link #registerMeter(String)},
        *     {@link #registerHistogram(String)}, {@link 
#registerTimer(String)}, or
        *     {@link #registerMetricSet(String, MetricSet)} instead.
   ```



##########
storm-client/src/jvm/org/apache/storm/task/IMetricsContext.java:
##########
@@ -28,23 +28,29 @@ public interface IMetricsContext {
     /**
      * Register metric.
      *
-     * @deprecated in favor of metrics v2 (the non-deprecated methods on this 
class)
+     * @deprecated in favor of metrics v2. Please use {@link 
#registerGauge(String, Gauge)},
+     *     {@link #registerCounter(String)}, {@link #registerMeter(String)},
+     *     {@link #registerHistogram(String)}, or {@link 
#registerTimer(String)} instead.
      */
     @Deprecated(since = "2.1.0", forRemoval = true)
     <T extends IMetric> T registerMetric(String name, T metric, int 
timeBucketSizeInSecs);
 
     /**
      * Register metric.
      *
-     * @deprecated in favor of metrics v2 (the non-deprecated methods on this 
class)
+     * @deprecated in favor of metrics v2. Please use {@link 
#registerGauge(String, Gauge)},
+     *     {@link #registerCounter(String)}, {@link #registerMeter(String)},
+     *     {@link #registerHistogram(String)}, or {@link 
#registerTimer(String)} instead.
      */
     @Deprecated(since = "2.1.0", forRemoval = true)
     ReducedMetric registerMetric(String name, IReducer reducer, int 
timeBucketSizeInSecs);
 
     /**
      * Register metric.
      *
-     * @deprecated in favor of metrics v2 (the non-deprecated methods on this 
class)
+     * @deprecated in favor of metrics v2. Please use {@link 
#registerGauge(String, Gauge)},
+     *     {@link #registerCounter(String)}, {@link #registerMeter(String)},
+     *     {@link #registerHistogram(String)}, or {@link 
#registerTimer(String)} instead.

Review Comment:
   And this one:
   
   ```suggestion
        * @deprecated in favor of metrics v2. Please use {@link 
#registerGauge(String, Gauge)},
        *     {@link #registerCounter(String)}, {@link #registerMeter(String)},
        *     {@link #registerHistogram(String)}, {@link 
#registerTimer(String)}, or
        *     {@link #registerMetricSet(String, MetricSet)} instead.
   ```



##########
storm-server/src/main/java/org/apache/storm/utils/ServerUtils.java:
##########
@@ -654,14 +654,15 @@ public static void unZip(File inFile, File toDir) throws 
IOException {
     }
 
     /**
-     * Given a zip File input it will return its size Only works for zip files 
whose uncompressed size is less than 4 GB, otherwise returns
-     * the size module 2^32, per gzip specifications.
+     * Given a zip File input it will return its size. Only works for zip 
files whose uncompressed
+     * size is less than 4 GB, otherwise returns the size modulo 2^32, per 
gzip specifications.
      *
      * @param myFile The zip file as input
      * @return zip file size as a long
-     * @deprecated no longer used by Storm, it will be removed in a future 
release
+     * @deprecated no longer used by Storm, it will be removed in a future 
release. Please use
+     *     {@link java.io.File#length()} or standard Java zip utilities 
instead.
      */
-    @Deprecated
+    @Deprecated(since = "2.0.0", forRemoval = true)

Review Comment:
   Two things here:
   
   - `zipFileSize` was deprecated in #9182 (first in `v3.2.0`); in `v3.1.0` it 
had no `@Deprecated` and two callers in the logviewer.
   - `File#length()` is not a replacement: the method reads the gzip trailer, 
so it returns the uncompressed size. A 115,000-byte log gzipped to 349 bytes 
returns 115000 from this method and 349 from `File#length()`.
   
   ```suggestion
        * @deprecated no longer used by Storm, it will be removed in a future 
release. There is no
        *     direct replacement: for a gzip file it returns the uncompressed 
size, which
        *     {@link java.io.File#length()} does not.
        */
       @Deprecated(since = "3.2.0", forRemoval = true)
   ```



##########
storm-client/src/jvm/org/apache/storm/task/IMetricsContext.java:
##########
@@ -28,23 +28,29 @@ public interface IMetricsContext {
     /**
      * Register metric.
      *
-     * @deprecated in favor of metrics v2 (the non-deprecated methods on this 
class)
+     * @deprecated in favor of metrics v2. Please use {@link 
#registerGauge(String, Gauge)},
+     *     {@link #registerCounter(String)}, {@link #registerMeter(String)},
+     *     {@link #registerHistogram(String)}, or {@link 
#registerTimer(String)} instead.

Review Comment:
   Optional: the replacement list leaves out `registerMetricSet`, the other 
non-deprecated registration method of this interface (`MetricSet` is already 
imported):
   
   ```suggestion
        * @deprecated in favor of metrics v2. Please use {@link 
#registerGauge(String, Gauge)},
        *     {@link #registerCounter(String)}, {@link #registerMeter(String)},
        *     {@link #registerHistogram(String)}, {@link 
#registerTimer(String)}, or
        *     {@link #registerMetricSet(String, MetricSet)} instead.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to