[ 
https://issues.apache.org/jira/browse/HDDS-1200?focusedWorklogId=282897&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-282897
 ]

ASF GitHub Bot logged work on HDDS-1200:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 25/Jul/19 20:49
            Start Date: 25/Jul/19 20:49
    Worklog Time Spent: 10m 
      Work Description: swagle commented on pull request #1154: [HDDS-1200] Add 
support for checksum verification in data scrubber
URL: https://github.com/apache/hadoop/pull/1154#discussion_r307494588
 
 

 ##########
 File path: 
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/ContainerMetadataScanner.java
 ##########
 @@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.hadoop.ozone.container.ozoneimpl;
+
+import com.google.common.annotations.VisibleForTesting;
+import org.apache.commons.net.ntp.TimeStamp;
+import org.apache.hadoop.ozone.container.common.interfaces.Container;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.Iterator;
+
+/**
+ * This class is responsible to perform metadata verification of the
+ * containers.
+ */
+public class ContainerMetadataScanner extends Thread {
+  public static final Logger LOG =
+      LoggerFactory.getLogger(ContainerMetadataScanner.class);
+
+  private final ContainerController controller;
+  /**
+   * True if the thread is stopping.<p/>
+   * Protected by this object's lock.
+   */
+  private boolean stopping = false;
+
+  public ContainerMetadataScanner(ContainerController controller) {
+    this.controller = controller;
+    setName("ContainerMetadataScanner");
+    setDaemon(true);
+  }
+
+  @Override
+  public void run() {
+    /**
+     * the outer daemon loop exits on down()
+     */
+    LOG.info("Background ContainerMetadataScanner starting up");
+    while (!stopping) {
+      scrub();
+      if (!stopping) {
+        try {
+          Thread.sleep(300000); /* 5 min between scans */
 
 Review comment:
   This should be configurable, no?
 
----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 282897)
    Time Spent: 0.5h  (was: 20m)

> Ozone Data Scrubbing : Checksum verification for chunks
> -------------------------------------------------------
>
>                 Key: HDDS-1200
>                 URL: https://issues.apache.org/jira/browse/HDDS-1200
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Supratim Deka
>            Assignee: Hrishikesh Gadre
>            Priority: Critical
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Background scrubber should read each chunk and verify the checksum.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to