srdo commented on a change in pull request #2990: STORM-3372: Fix NPE when
shutting down HFSSpout, fix storm-hdfs tests…
URL: https://github.com/apache/storm/pull/2990#discussion_r281024452
##########
File path:
external/storm-hdfs/src/main/java/org/apache/storm/hdfs/bolt/AbstractHdfsBolt.java
##########
@@ -248,7 +248,9 @@ public void declareOutputFields(OutputFieldsDeclarer
outputFieldsDeclarer) {
@Override
public void cleanup() {
doRotationAndRemoveAllWriters();
- this.rotationTimer.cancel();
+ if (this.rotationTimer != null) {
Review comment:
This is the bugfix for the NPE. If the rotation policy is not timed, this
field is null.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services