This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/ozone-site.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 775c94c1 [auto] Generated docs from Apache Ozone master 
05c7e62f45a98472677272d55ff38a8b30b5ad6c
775c94c1 is described below

commit 775c94c12fe41a12befe9e851b8e79009af1b01a
Author: Github Actions <nore...@github.com>
AuthorDate: Wed Jul 9 12:46:45 2025 +0000

    [auto] Generated docs from Apache Ozone master 
05c7e62f45a98472677272d55ff38a8b30b5ad6c
---
 docs/edge/en/sitemap.xml                   |  12 +-
 docs/edge/sitemap.xml                      |   4 +-
 docs/edge/tools/containerlogparser.html    |  28 +-
 docs/edge/tools/index.xml                  |   2 +-
 docs/edge/zh/index.xml                     |   7 +
 docs/edge/zh/sitemap.xml                   |  13 +
 docs/edge/zh/tools.html                    |  37 +-
 docs/edge/zh/tools/containerlogparser.html | 659 +++++++++++++++++++++++++++++
 docs/edge/zh/tools/index.xml               |   9 +-
 9 files changed, 739 insertions(+), 32 deletions(-)

diff --git a/docs/edge/en/sitemap.xml b/docs/edge/en/sitemap.xml
index 3da1dd32..97299e52 100644
--- a/docs/edge/en/sitemap.xml
+++ b/docs/edge/en/sitemap.xml
@@ -644,7 +644,17 @@
     <lastmod>2025-07-05T08:18:07-07:00</lastmod>
   </url><url>
     <loc>/tools/containerlogparser.html</loc>
-    <lastmod>2025-06-02T13:47:02+05:30</lastmod>
+    <lastmod>2025-07-09T12:59:18+05:30</lastmod>
+    <xhtml:link
+                rel="alternate"
+                hreflang="zh"
+                href="/zh/tools/containerlogparser.html"
+                />
+    <xhtml:link
+                rel="alternate"
+                hreflang="en"
+                href="/tools/containerlogparser.html"
+                />
   </url><url>
     <loc>/design.html</loc>
     <lastmod>2025-07-07T11:24:38+05:30</lastmod>
diff --git a/docs/edge/sitemap.xml b/docs/edge/sitemap.xml
index 5c03733a..653d5103 100644
--- a/docs/edge/sitemap.xml
+++ b/docs/edge/sitemap.xml
@@ -4,14 +4,14 @@
   <sitemap>
     <loc>/en/sitemap.xml</loc>
     
-      <lastmod>2025-07-07T11:24:38+05:30</lastmod>
+      <lastmod>2025-07-09T12:59:18+05:30</lastmod>
     
   </sitemap>
   
   <sitemap>
     <loc>/zh/sitemap.xml</loc>
     
-      <lastmod>2025-06-11T14:00:35+05:30</lastmod>
+      <lastmod>2025-07-09T12:59:18+05:30</lastmod>
     
   </sitemap>
   
diff --git a/docs/edge/tools/containerlogparser.html 
b/docs/edge/tools/containerlogparser.html
index a2891f6d..ab4c635d 100644
--- a/docs/edge/tools/containerlogparser.html
+++ b/docs/edge/tools/containerlogparser.html
@@ -555,6 +555,11 @@ s=d.getElementsByTagName('script')[0];
     
     
     
+    
+    
+    <a href="../zh/tools/containerlogparser.html"><span class="label 
label-success">中文</span></a>
+    
+    
 </div>
 
 
@@ -582,16 +587,9 @@ In the past we have seen different issues on container 
state. To debug problems
 <p>This component is responsible for processing log files, extracting relevant 
log entries, and storing them in batches to be inserted into the database.</p>
 <p><strong>The command is as follows:</strong></p>
 <p><code>ozone debug log container --db=&lt;path to db&gt; parse 
--path=&lt;path to logs folder&gt; --thread-count=&lt;n&gt;</code></p>
-<h4 id="concurrent-log-file-processing">Concurrent Log File Processing</h4>
-<ul>
-<li><strong>Directory Traversal</strong>: It recursively scans a specified 
directory for container log files using <code>Files.walk()</code>.</li>
-<li><strong>File Filtering</strong>: Only files with names matching the 
pattern <code>dn-container-&lt;roll&gt;.log.&lt;datanodeId&gt;</code> are 
considered. Files that do not satisfy this pattern are skipped.</li>
-<li><strong>Thread Pool Execution</strong>: A fixed-size thread pool is 
created using <code>ExecutorService</code>, where each thread is responsible 
for processing a single log file independently. This ensures no file-level 
concurrency issues.</li>
-<li><strong>Synchronization with <code>CountDownLatch</code></strong>: A 
<code>CountDownLatch</code> is used to block the main thread until all worker 
threads have finished processing their respective files.</li>
-<li><strong>Error Detection</strong>: An <code>AtomicBoolean</code> is used to 
record if any thread encounters a <code>SQLException</code>. If set, the entire 
operation is considered failed.</li>
-</ul>
 <h4 id="log-file-parsing-and-validation">Log File Parsing and Validation</h4>
 <ul>
+<li><strong>Directory Traversal</strong>: It recursively scans a specified 
directory for container log files,only files with names matching the pattern 
<code>dn-container-&lt;roll&gt;.log.&lt;datanodeId&gt;</code> are 
considered.Log files are parsed concurrently using multiple threads for 
efficient processing.</li>
 <li><strong>Line-by-Line Processing</strong>: Each log line is split using a 
pipe delimiter and parsed into key-value components.</li>
 <li><strong>Field Extraction</strong>: Key fields include:
 <ul>
@@ -603,16 +601,6 @@ In the past we have seen different issues on container 
state. To debug problems
 <li><strong>Error Message Capture</strong>: Any remaining unstructured part of 
the log line is stored as <code>errorMessage</code>, especially relevant for 
WARN or ERROR level logs.</li>
 <li><strong>Replication Index Filtering</strong>: Only log entries with Index 
= 0 are processed. This limits current processing to Ratis-replicated 
containers. Future improvements may support EC replication.</li>
 </ul>
-<h4 id="log-entry-object-construction">Log Entry Object Construction</h4>
-<p>A builder pattern is used to create objects from parsed data. These objects 
represent a single log entry with structured fields.</p>
-<h4 id="batching-and-database-insertion">Batching and Database Insertion</h4>
-<ul>
-<li>Parsed entries are accumulated in a local batch list of size 
<code>MAX_OBJ_IN_LIST</code> (default: 5000).</li>
-<li>When the list reaches the threshold, it is flushed to the database.</li>
-<li>At the end of file processing, any remaining entries in the batch are also 
written to the database.</li>
-</ul>
-<h4 id="thread-safety-and-simplification">Thread Safety and Simplification</h4>
-<p>Each thread maintains its own batch list. There are no shared data 
structures between threads. The simplified concurrency model improves code 
maintainability and reduces potential for deadlocks or race conditions.</p>
 <h3 id="component-2-database">Component 2: Database</h3>
 <p>The tool uses a temporary SQLite database to store and manage information 
extracted from container logs. This helps organize the data so that both the 
complete history and the latest status of each container replica on a datanode 
can be analyzed easily.</p>
 <h4 id="there-are-2-major-tables-createdmaintained-by-the-tool">There are 2 
major tables created/maintained by the tool:</h4>
@@ -722,6 +710,7 @@ Container 700 might be QUASI_CLOSED_STUCK.
 </ul>
 <p><code>ozone debug log container --db=&lt;path to db&gt; list 
--health=&lt;type&gt;  --all</code></p>
 <p><strong>Sample output:</strong></p>
+<p><code>ozone debug log container --db=path/to/db list --health=UNHEALTHY 
--all</code></p>
 <pre tabindex="0"><code>Container ID = 6002 - Count = 1
 Container ID = 6201 - Count = 1
 .
@@ -762,6 +751,7 @@ Number of containers listed: 25085
 </ul>
 <p><code>ozone debug log container --db=&lt;path to db&gt; list 
--lifecycle=&lt;state&gt; --all</code></p>
 <p><strong>Sample output:</strong></p>
+<p><code>ozone debug log container --db=path/to/db list --lifecycle=CLOSED 
--all</code></p>
 <pre tabindex="0"><code>Timestamp                 | Datanode ID | Container ID 
| BCSID  | Message        | Index Value
 
---------------------------------------------------------------------------------------------------
 2024-07-23 12:02:12,981   | 360         | 1            | 75654  | No error     
  | 0
@@ -800,7 +790,7 @@ Number of containers listed: 25085
 <footer class="footer">
   <div class="container">
     <span class="small text-muted">
-      Version: 2.1.0-SNAPSHOT, Last Modified: June 2, 2025 <a 
class="hide-child link primary-color" 
href="https://github.com/apache/ozone/commit/8e8c432bb7e893d140926fb7df4f316ac9265cbe";>8e8c432bb7</a>
+      Version: 2.1.0-SNAPSHOT, Last Modified: July 9, 2025 <a 
class="hide-child link primary-color" 
href="https://github.com/apache/ozone/commit/bf9cdd0df95cee3ef8657596dcf237e83e913861";>bf9cdd0df9</a>
     </span>
   </div>
 </footer>
diff --git a/docs/edge/tools/index.xml b/docs/edge/tools/index.xml
index aaa367cd..7a26e8ee 100644
--- a/docs/edge/tools/index.xml
+++ b/docs/edge/tools/index.xml
@@ -6,7 +6,7 @@
     <description>Recent content in Tools on Ozone</description>
     <generator>Hugo</generator>
     <language>en</language>
-    <lastBuildDate>Mon, 02 Jun 2025 13:47:02 +0530</lastBuildDate>
+    <lastBuildDate>Wed, 09 Jul 2025 12:59:18 +0530</lastBuildDate>
     <atom:link href="/tools/index.xml" rel="self" type="application/rss+xml" />
     <item>
       <title>Container Replica Debugger Tool</title>
diff --git a/docs/edge/zh/index.xml b/docs/edge/zh/index.xml
index 031ce541..52c3d814 100644
--- a/docs/edge/zh/index.xml
+++ b/docs/edge/zh/index.xml
@@ -273,6 +273,13 @@
       <guid>/zh/start/fromsource.html</guid>
       <description>&lt;!---&#xA;  Licensed to the Apache Software Foundation 
(ASF) under one or more&#xA;  contributor license agreements.  See the NOTICE 
file distributed with&#xA;  this work for additional information regarding 
copyright ownership.&#xA;  The ASF licenses this file to You under the Apache 
License, Version 2.0&#xA;  (the &#34;License&#34;); you may not use this file 
except in compliance with&#xA;  the License.  You may obtain a copy of the 
License at&#xA;&#xA;      http: [...]
     </item>
+    <item>
+      <title>Container Replica Debugger Tool</title>
+      <link>/zh/tools/containerlogparser.html</link>
+      <pubDate>Mon, 09 Jun 2025 00:00:00 +0000</pubDate>
+      <guid>/zh/tools/containerlogparser.html</guid>
+      <description>该工具处理来自 Ozone 数据节点的容器日志文件,以跟踪状态转换。它提供 CLI 
命令,用于根据不同的属性查询容器。</description>
+    </item>
     <item>
       <title>Ozone Debug</title>
       <link>/zh/tools/debug.html</link>
diff --git a/docs/edge/zh/sitemap.xml b/docs/edge/zh/sitemap.xml
index 869577c8..cd9c1abf 100644
--- a/docs/edge/zh/sitemap.xml
+++ b/docs/edge/zh/sitemap.xml
@@ -573,6 +573,19 @@
                 hreflang="zh"
                 href="/zh/start/fromsource.html"
                 />
+  </url><url>
+    <loc>/zh/tools/containerlogparser.html</loc>
+    <lastmod>2025-07-09T12:59:18+05:30</lastmod>
+    <xhtml:link
+                rel="alternate"
+                hreflang="en"
+                href="/tools/containerlogparser.html"
+                />
+    <xhtml:link
+                rel="alternate"
+                hreflang="zh"
+                href="/zh/tools/containerlogparser.html"
+                />
   </url><url>
     <loc>/zh/tools/debug.html</loc>
     <lastmod>2024-10-30T12:13:52+05:30</lastmod>
diff --git a/docs/edge/zh/tools.html b/docs/edge/zh/tools.html
index 1b59fd2f..3cf95bc8 100644
--- a/docs/edge/zh/tools.html
+++ b/docs/edge/zh/tools.html
@@ -467,6 +467,25 @@ Container Manager.</li>
                 
                 <div class="row">
                     
+                    <div class="col-sm-6">
+                        <div class="card">
+                            <div class="card-body">
+                                <h2 class="card-title">
+                                    
+                                    Container Replica Debugger Tool
+                                </h2>
+                                <p class="card-text">该工具处理来自 Ozone 
数据节点的容器日志文件,以跟踪状态转换。它提供 CLI 命令,用于根据不同的属性查询容器。</p>
+                                <a href="../zh/tools/containerlogparser.html"
+                                   class=" btn btn-primary btn-lg">Container 
Replica Debugger Tool</a>
+                            </div>
+                        </div>
+                    </div>
+
+                    
+                
+
+                
+                
                     <div class="col-sm-6">
                         <div class="card">
                             <div class="card-body">
@@ -482,10 +501,14 @@ Container Manager.</li>
                     </div>
 
                     
+                        </div>
+                    
                 
 
                 
                 
+                <div class="row">
+                    
                     <div class="col-sm-6">
                         <div class="card">
                             <div class="card-body">
@@ -501,14 +524,10 @@ Container Manager.</li>
                     </div>
 
                     
-                        </div>
-                    
                 
 
                 
                 
-                <div class="row">
-                    
                     <div class="col-sm-6">
                         <div class="card">
                             <div class="card-body">
@@ -524,10 +543,14 @@ Container Manager.</li>
                     </div>
 
                     
+                        </div>
+                    
                 
 
                 
                 
+                <div class="row">
+                    
                     <div class="col-sm-6">
                         <div class="card">
                             <div class="card-body">
@@ -543,14 +566,10 @@ Container Manager.</li>
                     </div>
 
                     
-                        </div>
-                    
                 
 
                 
                 
-                <div class="row">
-                    
                     <div class="col-sm-6">
                         <div class="card">
                             <div class="card-body">
@@ -566,6 +585,8 @@ Container Manager.</li>
                     </div>
 
                     
+                        </div>
+                    
                 
                 
             </div>
diff --git a/docs/edge/zh/tools/containerlogparser.html 
b/docs/edge/zh/tools/containerlogparser.html
new file mode 100644
index 00000000..d8dcb793
--- /dev/null
+++ b/docs/edge/zh/tools/containerlogparser.html
@@ -0,0 +1,659 @@
+
+
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+    
+    <meta name="description" content="Apache Ozone Documentation">
+
+    <title>Documentation for Apache Ozone</title>
+
+    
+    <link href="../../css/bootstrap.min.css" rel="stylesheet">
+
+    
+    <link href="../../css/ozonedoc.css" rel="stylesheet">
+
+    
+    
+    <link href="../../swagger-resources/swagger-ui.css" rel="stylesheet">
+
+    
+    <script>
+      var _paq = window._paq = window._paq || [];
+      
+
+       
+      _paq.push(['disableCookies']);
+      
+
+      _paq.push(['trackPageView']);
+      _paq.push(['enableLinkTracking']);
+      (function() {
+        var u="//analytics.apache.org/";
+        _paq.push(['setTrackerUrl', u+'matomo.php']);
+        _paq.push(['setSiteId', '34']);
+        var d=document, g=d.createElement('script'),
+s=d.getElementsByTagName('script')[0];
+        g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+      })();
+    </script>
+    
+
+  </head>
+
+
+<body>
+
+  
+<nav class="navbar navbar-inverse navbar-fixed-top">
+  <div class="container-fluid">
+    <div class="navbar-header">
+      <button type="button" class="navbar-toggle collapsed" 
data-toggle="collapse" data-target="#sidebar" aria-expanded="false" 
aria-controls="navbar">
+        <span class="sr-only">Toggle navigation</span>
+        <span class="icon-bar"></span>
+        <span class="icon-bar"></span>
+        <span class="icon-bar"></span>
+      </button>
+      <a href="../../zh/index.html" class="navbar-left ozone-logo">
+        <img src="../../ozone-logo-small.png"/>
+      </a>
+      <a class="navbar-brand hidden-xs" href="../../zh/index.html">
+        Apache Ozone/HDDS Documentation
+      </a>
+      <a class="navbar-brand visible-xs-inline" href="#">Apache Ozone</a>
+    </div>
+    <div id="navbar" class="navbar-collapse collapse">
+      <ul class="nav navbar-nav navbar-right">
+        <li><a href="https://github.com/apache/ozone";>Source</a></li>
+        <li><a href="https://ozone.apache.org";>Apache Ozone</a></li>
+        <li><a href="https://apache.org";>ASF</a></li>
+      </ul>
+    </div>
+  </div>
+</nav>
+
+
+  <div class="wrapper">
+  <div class="container-fluid">
+    <div class="row">
+      
+<div class="col-sm-2 col-md-2 sidebar" id="sidebar">
+  <ul class="nav nav-sidebar">
+    
+    
+        
+            <li class="">
+                
+                   <a href="../../zh/index.html">
+                
+
+                    
+                    <span>概述</span>
+                </a>
+            </li>
+        
+    
+        
+            <li class="">
+                
+                   <a href="../../zh/start.html">
+                
+
+                    
+                    <span>快速入门</span>
+                </a>
+            </li>
+        
+    
+        
+            <li class="">
+                <a href="../../zh/concept.html">
+                    
+                    <span>概念</span>
+                </a>
+                <ul class="nav">
+                    
+                        <li class="">
+                           
+                           <a href="../../zh/concept/overview.html">概览</a>
+                           
+                        </li>
+                    
+                        <li class="">
+                           
+                           <a href="../../zh/concept/ozonemanager.html">Ozone 
Manager</a>
+                           
+                        </li>
+                    
+                        <li class="">
+                           
+                           <a 
href="../../zh/concept/storagecontainermanager.html">Storage Container 
Manager</a>
+                           
+                        </li>
+                    
+                        <li class="">
+                           
+                           <a href="../../zh/concept/datanodes.html">数据节点</a>
+                           
+                        </li>
+                    
+                        <li class="">
+                           
+                           <a 
href="../../zh/concept/containers.html">Containers</a>
+                           
+                        </li>
+                    
+                        <li class="">
+                           
+                           <a href="../../zh/concept/recon.html">Recon</a>
+                           
+                        </li>
+                    
+                </ul>
+            </li>
+        
+    
+        
+            <li class="">
+                <a href="../../zh/feature.html">
+                    
+                    <span>特性</span>
+                </a>
+                <ul class="nav">
+                    
+                        <li class="">
+                           
+                           <a 
href="../../zh/feature/decommission.html">Decommissioning</a>
+                           
+                        </li>
+                    
+                        <li class="">
+                           
+                           <a 
href="../../zh/feature/erasurecoding.html">纠删码</a>
+                           
+                        </li>
+                    
+                        <li class="">
+                           
+                           <a href="../../zh/feature/om-ha.html">高可用 OM</a>
+                           
+                        </li>
+                    
+                        <li class="">
+                           
+                           <a href="../../zh/feature/scm-ha.html">高可用 SCM</a>
+                           
+                        </li>
+                    
+                        <li class="">
+                           
+                           <a 
href="../../zh/feature/dn-merge-rocksdb.html">在DataNode上合并Container的RocksDB</a>
+                           
+                        </li>
+                    
+                        <li class="">
+                           
+                           <a 
href="../../zh/feature/prefixfso.html">基于前缀的文件系统优化</a>
+                           
+                        </li>
+                    
+                        <li class="">
+                           
+                           <a href="../../zh/feature/topology.html">拓扑感知能力</a>
+                           
+                        </li>
+                    
+                        <li class="">
+                           
+                           <a href="../../zh/feature/quota.html">Ozone 中的配额</a>
+                           
+                        </li>
+                    
+                        <li class="">
+                           
+                           <a href="../../zh/feature/recon.html">Recon 服务器</a>
+                           
+                        </li>
+                    
+                        <li class="">
+                           
+                           <a 
href="../../zh/feature/reconfigurability.html">动态加载配置</a>
+                           
+                        </li>
+                    
+                </ul>
+            </li>
+        
+    
+        
+            <li class="">
+                <a href="../../zh/security.html">
+                    
+                    <span>安全</span>
+                </a>
+                <ul class="nav">
+                    
+                        <li class="">
+                           
+                           <a href="../../zh/security/secureozone.html">安全化 
Ozone</a>
+                           
+                        </li>
+                    
+                        <li class="">
+                           
+                           <a 
href="../../zh/security/securingtde.html">透明数据加密</a>
+                           
+                        </li>
+                    
+                        <li class="">
+                           
+                           <a href="../../zh/security/gdpr.html">Ozone 中的 
GDPR</a>
+                           
+                        </li>
+                    
+                        <li class="">
+                           
+                           <a 
href="../../zh/security/securingdatanodes.html">安全化 Datanode</a>
+                           
+                        </li>
+                    
+                        <li class="">
+                           
+                           <a 
href="../../zh/security/securingozonehttp.html">安全化 HTTP</a>
+                           
+                        </li>
+                    
+                        <li class="">
+                           
+                           <a href="../../zh/security/securings3.html">安全化 
S3</a>
+                           
+                        </li>
+                    
+                        <li class="">
+                           
+                           <a href="../../zh/security/securityacls.html">Ozone 
访问控制列表</a>
+                           
+                        </li>
+                    
+                        <li class="">
+                           
+                           <a 
href="../../zh/security/securitywithranger.html">Apache Ranger</a>
+                           
+                        </li>
+                    
+                </ul>
+            </li>
+        
+    
+        
+            <li class="">
+                <a href="../../zh/interface.html">
+                    
+                    <span>客户端接口</span>
+                </a>
+                <ul class="nav">
+                    
+                        <li class="">
+                           
+                           <a href="../../zh/interface/cli.html">命令行接口</a>
+                           
+                        </li>
+                    
+                </ul>
+            </li>
+        
+    
+        
+            <li class="">
+                
+                   <a href="../../zh/tools.html">
+                
+
+                    
+                    <span>工具</span>
+                </a>
+            </li>
+        
+    
+        
+            <li class="">
+                
+                   <a href="../../zh/recipe.html">
+                
+
+                    
+                    <span>使用配方</span>
+                </a>
+            </li>
+        
+    
+        
+            <li class="">
+                <a href="../../">
+                    
+                    <span></span>
+                </a>
+                <ul class="nav">
+                    
+                        <li class="">
+                           
+                           <a href="../../zh/interface/javaapi.html">Java 
API</a>
+                           
+                        </li>
+                    
+                        <li class="">
+                           
+                           <a href="../../zh/interface/ofs.html">Ofs (兼容 
Hadoop 的文件系统)</a>
+                           
+                        </li>
+                    
+                        <li class="">
+                           
+                           <a href="../../zh/interface/o3fs.html">Ozone 
文件系统</a>
+                           
+                        </li>
+                    
+                        <li class="">
+                           
+                           <a href="../../zh/interface/csi.html">CSI 协议</a>
+                           
+                        </li>
+                    
+                        <li class="">
+                           
+                           <a href="../../zh/interface/s3.html">S3 协议接口</a>
+                           
+                        </li>
+                    
+                        <li class="">
+                           
+                           <a href="../../zh/interface/reconapi.html">Recon 
API</a>
+                           
+                        </li>
+                    
+                </ul>
+            </li>
+        
+    
+    <li><a href="../../design.html"><span><b>Design docs</b></span></a></li>
+    <li class="visible-xs"><a href="#">References</a>
+    <ul class="nav">
+        <li><a href="https://github.com/apache/ozone";><span class="glyphicon 
glyphicon-new-window" aria-hidden="true"></span> Source</a></li>
+        <li><a href="https://ozone.apache.org";><span class="glyphicon 
glyphicon-new-window" aria-hidden="true"></span> Apache Ozone</a></li>
+        <li><a href="https://apache.org";><span class="glyphicon 
glyphicon-new-window" aria-hidden="true"></span> ASF</a></li>
+    </ul></li>
+  </ul>
+
+</div>
+
+      <div class="col-sm-10 col-sm-offset-2 col-md-10 col-md-offset-2 
main-content">
+
+
+
+        <div class="col-md-9">
+            <nav aria-label="breadcrumb">
+                <ol class="breadcrumb">
+                  <li class="breadcrumb-item"><a 
href="../../zh/index.html">Home</a></li>
+                  <li class="breadcrumb-item" aria-current="page"><a 
href="../../zh/tools.html">工具</a></li>
+                  <li class="breadcrumb-item active" 
aria-current="page">Container Replica Debugger Tool</li>
+                </ol>
+              </nav>
+
+          
+
+<div class="pull-right">
+    
+    
+    
+    <a href="../../tools/containerlogparser.html"><span class="label 
label-success">English</span></a>
+    
+    
+    
+    
+</div>
+
+
+          <div class="col-md-9">
+            <h1>Container Replica Debugger Tool</h1>
+
+            <!--
+  Licensed 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. See accompanying LICENSE file.
+-->
+<h1 id="container-replica-debugger-tool">Container Replica Debugger Tool</h1>
+<h2 id="背景">背景</h2>
+<p>容器是 Ozone 最重要的组成部分。大多数 Ozone 操作都发生在容器上。Ozone 中的容器在其生命周期中会经历不同的状态。
+过去,我们曾发现过各种与容器状态相关的问题。为了调试问题,我们通常采用手动步骤并识别与容器相关的问题,这非常耗时。为了优化可调试性,我们可以显示与容器相关的历史时间轴和其他信息。</p>
+<h2 id="解决方案">解决方案</h2>
+<p>一个离线工具,可以分析 dn-container 日志文件并帮助我们找到与集群中数据节点上的容器相关的问题。</p>
+<h3 id="组件-1解析器">组件 1:解析器</h3>
+<p>该组件负责处理日志文件,提取相关日志条目,并批量存储插入到数据库中。</p>
+<p><strong>命令如下:</strong></p>
+<p><code>ozone debug log container --db=&lt;path to db&gt; parse 
--path=&lt;path to logs folder&gt; --thread-count=&lt;n&gt;</code></p>
+<h4 id="日志文件解析和验证">日志文件解析和验证</h4>
+<ul>
+<li><strong>目录遍历</strong>: 它以递归方式扫描指定目录中的容器日志文件,仅考虑名称与模式 
<code>dn-container-&lt;roll&gt;.log.&lt;datanodeId&gt;</code> 
匹配的文件。使用多个线程同时解析日志文件以实现高效处理。</li>
+<li><strong>逐行处理</strong>: 每个日志行使用管道分隔符进行拆分,并解析为键值组件。</li>
+<li><strong>字段提取</strong>: 关键字段包括:
+<ul>
+<li><strong>Timestamp</strong></li>
+<li><strong>logLevel</strong>: INFO, WARN, ERROR.</li>
+<li><strong>ID, BCSID, State, 和 Index</strong>: 从键值对中提取。</li>
+</ul>
+</li>
+<li><strong>错误信息捕获</strong>: 日志行中任何剩余的非结构化部分都存储为 <code>errorMessage</code>,尤其与 
WARN 或 ERROR 级别的日志相关。</li>
+<li><strong>副本索引过滤</strong>: 仅处理索引 = 0 的日志条目。这将当前处理限制在 Ratis 复制的容器中。未来的改进可能会支持 
EC 复制。</li>
+</ul>
+<h3 id="组件-2数据库">组件 2:数据库</h3>
+<p>该工具使用临时 SQLite 
数据库来存储和管理从容器日志中提取的信息。这有助于组织数据,以便轻松分析数据节点上每个容器副本的完整历史记录和最新状态。</p>
+<h4 id="该工具创建维护了两个主要表">该工具创建/维护了两个主要表:</h4>
+<ol>
+<li><strong>DatanodeContainerLogTable — 详细日志历史记录</strong><br>
+该表存储了每个数据节点上每个容器副本的完整状态变化历史记录。</li>
+</ol>
+<ul>
+<li>Container ID</li>
+<li>Datanode ID</li>
+<li>State (例如 OPEN, CLOSED, 等等)</li>
+<li>BCSID (Block Commit Sequence ID)</li>
+<li>Timestamp</li>
+<li>Log Level</li>
+<li>Error Message (如果有的话)</li>
+<li>Index Value</li>
+</ul>
+<p>该表中的数据展示了状态转换和 BCSID 变化的完整时间线,有助于追踪每个容器副本随时间的变化情况。</p>
+<ol start="2">
+<li><strong>ContainerLogTable — 最新状态摘要</strong><br>
+这张表仅包含每个唯一的容器与数据节点对的最新状态和 BCSID。</li>
+</ol>
+<ul>
+<li>Container ID</li>
+<li>Datanode ID</li>
+<li>Latest State</li>
+<li>Latest BCSID</li>
+</ul>
+<p>该表提供了所有容器副本当前 state 和 BCSID 的简化视图,有助于快速进行状态检查和摘要。</p>
+<h3 id="组件-3cli-命令"><strong>组件 3:CLI 命令</strong></h3>
+<h4 id="列出具有重复打开状态的容器"><strong>列出具有重复打开状态的容器</strong></h4>
+<p>这个 ozone debug CLI 命令通过跟踪前三个 “OPEN” 状态并标记任何后续的 “OPEN” 
状态(如果它出现在相同的数据节点上或在初始事件之后出现在不同的数据节点上),帮助识别被打开次数超过所需数量(对于 Ratis 来说是 3 次)的容器。</p>
+<p>该命令显示每个列出容器的 <strong>Container ID</strong> 以及其处于 &lsquo;OPEN&rsquo; 
状态的副本数量。同时还提供具有重复 &lsquo;OPEN&rsquo; 状态条目的容器总数。</p>
+<p><strong>命令如下:</strong></p>
+<p><code>ozone debug log container --db=&lt;path to db&gt; 
duplicate-open</code></p>
+<p><strong>示例输出:</strong></p>
+<pre tabindex="0"><code>Container ID: 2187256 - OPEN state count: 4
+.
+.
+.
+Container ID: 12377064 - OPEN state count: 5
+Container ID: 12377223 - OPEN state count: 5
+Container ID: 12377631 - OPEN state count: 4
+Container ID: 12377904 - OPEN state count: 5
+Container ID: 12378161 - OPEN state count: 4
+Container ID: 12378352 - OPEN state count: 5
+Container ID: 12378789 - OPEN state count: 5
+Container ID: 12379337 - OPEN state count: 5
+Container ID: 12379489 - OPEN state count: 5
+Container ID: 12380526 - OPEN state count: 5
+Container ID: 12380898 - OPEN state count: 5
+Container ID: 12642718 - OPEN state count: 4
+Container ID: 12644806 - OPEN state count: 4
+Total containers that might have duplicate OPEN state : 1579
+</code></pre><br>
+<h4 id="单个容器的详细信息及分析显示"><strong>单个容器的详细信息及分析显示</strong></h4>
+<p>此 ozone debug CLI 命令提供了容器的每个副本(其 ID 通过命令提供)的完整状态转换历史记录。
+该命令还提供对容器的分析,例如容器是否存在以下问题:</p>
+<ul>
+<li>Duplicate OPEN states</li>
+<li>Mismatched replication</li>
+<li>Under-replication 或者 over-replication</li>
+<li>Unhealthy replicas</li>
+<li>Open-unhealthy</li>
+<li>Quasi-closed stuck containers</li>
+</ul>
+<p>该命令提供关键详细信息,例如:</p>
+<ul>
+<li>Datanode id</li>
+<li>Container id</li>
+<li>BCSID</li>
+<li>TimeStamp</li>
+<li>Index Value</li>
+<li>Message (如果有与该特定副本相关联的任何内容)</li>
+</ul>
+<p><strong>命令如下:</strong></p>
+<p><code>ozone debug log container --db=&lt;path to database&gt; info 
&lt;containerID&gt;</code></p>
+<p><strong>示例输出:</strong></p>
+<pre tabindex="0"><code>Timestamp               | Container ID | Datanode ID | 
Container State  | BCSID   | Message             | Index Value
+----------------------------------------------------------------------------------------------------------------------
+2024-06-04 15:07:55,390 | 700          | 100         | QUASI_CLOSED     | 
353807 | No error             | 0           
+2024-06-04 14:50:18,177 | 700          | 150         | QUASI_CLOSED     | 
353807 | No error             | 0           
+2024-04-04 10:32:29,026 | 700          | 250         | OPEN             | 0    
  | No error             | 0           
+2024-06-04 14:44:28,126 | 700          | 250         | CLOSING          | 
353807 | No error             | 0           
+2024-06-04 14:47:59,893 | 700          | 250         | QUASI_CLOSED     | 
353807 | Ratis group removed  | 0           
+2024-06-04 14:50:17,038 | 700          | 250         | QUASI_CLOSED     | 
353807 | No error             | 0           
+2024-06-04 14:50:18,184 | 700          | 250         | QUASI_CLOSED     | 
353807 | No error             | 0           
+2024-04-04 10:32:29,026 | 700          | 400         | OPEN             | 0    
  | No error             | 0           
+Container 700 might be QUASI_CLOSED_STUCK.
+</code></pre><br>
+<h4 id="按健康状态列出容器"><strong>按健康状态列出容器</strong></h4>
+<p>此 ozone debug CLI 命令列出所有处于 UNDER-REPLICATED、OVER-REPLICATED、UNHEALTHY 或 
QUASI_CLOSED stuck 状态的容器。</p>
+<p>该命令显示每个列出容器的 <strong>Container ID</strong> 以及指定健康状态下副本的数量。</p>
+<p><strong>使用的命令选项是:</strong></p>
+<ul>
+<li>按健康类型列出容器:默认情况下,结果中仅提供 100 行</li>
+</ul>
+<p><code>ozone debug log container --db=&lt;path to db&gt; list 
--health=&lt;type&gt;</code></p>
+<ul>
+<li>按健康类型列出具有指定行限制的容器:</li>
+</ul>
+<p><code>ozone debug log container --db=&lt;path to db&gt; list 
--health=&lt;type&gt;  --length=&lt;limit&gt;</code></p>
+<ul>
+<li>按健康类型列出所有容器,覆盖行限制:</li>
+</ul>
+<p><code>ozone debug log container --db=&lt;path to db&gt; list 
--health=&lt;type&gt;  --all</code></p>
+<p><strong>示例输出:</strong></p>
+<p><code>ozone debug log container --db=path/to/db list --health=UNHEALTHY 
--all</code></p>
+<pre tabindex="0"><code>Container ID = 6002 - Count = 1
+Container ID = 6201 - Count = 1
+.
+.
+.
+Container ID = 136662 - Count = 3
+Container ID = 136837 - Count = 3
+Container ID = 199954 - Count = 3
+Container ID = 237747 - Count = 3
+Container ID = 2579099 - Count = 1
+Container ID = 2626888 - Count = 1
+Container ID = 2627711 - Count = 1
+Container ID = 2627751 - Count = 2
+Number of containers listed: 25085
+</code></pre><br>
+<h4 id="根据最终状态列出容器"><strong>根据最终状态列出容器</strong></h4>
+<p>此 ozone debug CLI 命令帮助列出所有容器的副本,这些容器的最新状态是通过 CLI 命令提供的状态。</p>
+<p>该命令提供关键详细信息,例如:</p>
+<ul>
+<li>Datanode id</li>
+<li>Container id</li>
+<li>BCSID</li>
+<li>TimeStamp - 与容器副本状态关联的最新时间戳</li>
+<li>Index Value</li>
+<li>Message (如果有与该特定副本相关联的任何内容)</li>
+</ul>
+<p><strong>使用的命令选项是:</strong></p>
+<ul>
+<li>列出 容器 按 状态 默认情况下,结果中仅提供 100 行</li>
+</ul>
+<p><code>ozone debug log container --db=&lt;path to db&gt; list 
--lifecycle=&lt;state&gt;</code></p>
+<ul>
+<li>按状态列出具有指定行限制的容器:</li>
+</ul>
+<p><code>ozone debug log container --db=&lt;path to db&gt; list 
--lifecycle=&lt;state&gt; --length=&lt;limit&gt;</code></p>
+<ul>
+<li>按状态列出所有容器,覆盖行限制:</li>
+</ul>
+<p><code>ozone debug log container --db=&lt;path to db&gt; list 
--lifecycle=&lt;state&gt; --all</code></p>
+<p><strong>示例输出:</strong></p>
+<p><code>ozone debug log container --db=path/to/db list --lifecycle=CLOSED 
--all</code></p>
+<pre tabindex="0"><code>Timestamp                 | Datanode ID | Container ID 
| BCSID  | Message        | Index Value
+---------------------------------------------------------------------------------------------------
+2024-07-23 12:02:12,981   | 360         | 1            | 75654  | No error     
  | 0
+2024-07-23 11:56:21,106   | 365         | 1            | 75654  | Volume 
failure | 0
+2024-07-23 11:56:21,106   | 365         | 1            | 75654  | Volume 
failure | 0
+2024-08-29 14:11:32,879   | 415         | 1            | 30     | No error     
  | 0
+2024-08-29 14:11:17,533   | 430         | 1            | 30     | No error     
  | 0
+2024-06-20 11:50:09,496   | 460         | 1            | 75654  | No error     
  | 0
+2024-07-23 12:02:11,633   | 500         | 1            | 75654  | No error     
  | 0
+2024-06-20 12:03:24,230   | 505         | 2            | 83751  | No error     
  | 0
+2024-07-10 04:00:33,131   | 540         | 2            | 83751  | No error     
  | 0
+2024-07-10 04:00:46,825   | 595         | 2            | 83751  | No error     
  | 0
+</code></pre><br>
+<h3 id="笔记-">笔记 :</h3>
+<ul>
+<li>此工具假定所有 dn-container 日志文件已从数据节点中提取并放入目录中。</li>
+<li>对于解析命令,如果没有提供DB路径,则会在当前工作目录中创建一个新的数据库,默认文件名为 
<code>container_datanode.db</code>。</li>
+<li>对于所有其他命令,如果未提供数据库路径,它将在当前目录中查找默认数据库文件(<code>container_datanode.db</code>)。如果该文件不存在,它将抛出一个错误,要求提供有效的路径。</li>
+</ul>
+
+
+          
+          <a class="btn  btn-success btn-lg" 
href="../../zh/tools/debug.html">Next >></a>
+          
+          </div>
+
+        </div>
+      </div>
+    </div>
+  </div>
+    <div class="push"></div>
+  </div>
+
+  
+
+<footer class="footer">
+  <div class="container">
+    <span class="small text-muted">
+      Version: 2.1.0-SNAPSHOT, Last Modified: July 9, 2025 <a 
class="hide-child link primary-color" 
href="https://github.com/apache/ozone/commit/bf9cdd0df95cee3ef8657596dcf237e83e913861";>bf9cdd0df9</a>
+    </span>
+  </div>
+</footer>
+
+
+
+<script src="../../js/jquery-3.5.1.min.js"></script>
+<script src="../../js/ozonedoc.js"></script>
+<script src="../../js/bootstrap.min.js"></script>
+
+
+</body>
+
+</html>
\ No newline at end of file
diff --git a/docs/edge/zh/tools/index.xml b/docs/edge/zh/tools/index.xml
index 3f5a39e1..2292cdbe 100644
--- a/docs/edge/zh/tools/index.xml
+++ b/docs/edge/zh/tools/index.xml
@@ -6,8 +6,15 @@
     <description>Recent content in 工具 on Ozone</description>
     <generator>Hugo</generator>
     <language>zh</language>
-    <lastBuildDate>Thu, 13 Mar 2025 10:19:47 +0530</lastBuildDate>
+    <lastBuildDate>Wed, 09 Jul 2025 12:59:18 +0530</lastBuildDate>
     <atom:link href="/zh/tools/index.xml" rel="self" 
type="application/rss+xml" />
+    <item>
+      <title>Container Replica Debugger Tool</title>
+      <link>/zh/tools/containerlogparser.html</link>
+      <pubDate>Mon, 09 Jun 2025 00:00:00 +0000</pubDate>
+      <guid>/zh/tools/containerlogparser.html</guid>
+      <description>该工具处理来自 Ozone 数据节点的容器日志文件,以跟踪状态转换。它提供 CLI 
命令,用于根据不同的属性查询容器。</description>
+    </item>
     <item>
       <title>Ozone Debug</title>
       <link>/zh/tools/debug.html</link>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@ozone.apache.org
For additional commands, e-mail: commits-h...@ozone.apache.org


Reply via email to