hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [hadoop] bharatviswa504 commented on a change in pull request #788: HDDS-1475 : Fix OzoneContainer start method.
Date Tue, 07 May 2019 18:23:51 GMT
bharatviswa504 commented on a change in pull request #788: HDDS-1475 : Fix OzoneContainer start
method.
URL: https://github.com/apache/hadoop/pull/788#discussion_r281770846
 
 

 ##########
 File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/OzoneContainer.java
 ##########
 @@ -160,8 +160,12 @@ private void startContainerScrub() {
       LOG.info("Background container scrubber has been disabled by {}",
               HddsConfigKeys.HDDS_CONTAINERSCRUB_ENABLED);
     } else {
-      this.scrubber = new ContainerScrubber(containerSet, config);
-      scrubber.up();
+      if (this.scrubber == null) {
+        this.scrubber = new ContainerScrubber(containerSet, config);
+      }
+      if (this.scrubber.isHalted()) {
 
 Review comment:
   I think we don't need this check here, as scrubber up() is already taking care of multiple
starts.
   public void up() {
   
       this.halt = false;
       if (this.scrubThread == null) {
         this.scrubThread = new Thread(this);
         scrubThread.start();
       } else {
         LOG.info("Scrubber up called multiple times. Scrub thread already up.");
       }
     }

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message