Github user HeartSaVioR commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2639#discussion_r187488104
  
    --- Diff: 
external/storm-jms/src/main/java/org/apache/storm/jms/spout/JmsSpout.java ---
    @@ -403,50 +274,31 @@ public void ack(Object msgId) {
          * <p>Will only be called if we're transactional or not 
AUTO_ACKNOWLEDGE
          */
         @Override
    -    public void fail(Object msgId) {
    +    public void fail(final Object msgId) {
             LOG.warn("Message failed: " + msgId);
    -        this.pendingMessages.clear();
    -        this.toCommit.clear();
    -        synchronized (this.recoveryMutex) {
    -            this.hasFailures = true;
    -        }
    +        messageHandler.fail(msgId);
         }
     
         /**
    -     * Use the {@link #tupleProducer} to determine which fields are about 
to be emitted.
    +     * Use the {@link #tupleProducer} to determine which fields are about
    +     * to be emitted.
          *
    -     * <p>Note that {@link #nextTuple()} always emits to the default 
stream, and thus only fields declared
    -     * for this stream are used.
    +     * <p>Note that {@link #nextTuple()} always emits to the default 
stream,
    +     * and thus only fields declared for this stream are used.
          */
         @Override
    -    public void declareOutputFields(OutputFieldsDeclarer declarer) {
    +    public void declareOutputFields(final OutputFieldsDeclarer declarer) {
             this.tupleProducer.declareOutputFields(declarer);
     
         }
     
         /**
    -     * Returns <code>true</code> if the spout has received failures from 
which it has not yet recovered.
    -     *
    -     * @return {@code true} if there were failures, {@code false} 
otherwise.
    -     */
    -    public boolean hasFailures() {
    -        return this.hasFailures;
    -    }
    -
    -    /**
    -     * Marks a healthy session state.
    -     */
    -    protected void recovered() {
    -        this.hasFailures = false;
    -    }
    -
    -    /**
    -     * Sets the periodicity of the timer task that checks for failures and 
recovers the JMS session.
    +     * Sets the periodicity of the timer task that
    +     * checks for failures and recovers the JMS session.
          *
          * @param period desired wait period
          */
    -    public void setRecoveryPeriodMs(long period) {
    -        this.recoveryPeriodMs = period;
    +    public void setRecoveryPeriodMs(final long period) {
    --- End diff --
    
    This method can be removed.


---

Reply via email to