Browse Source

HDFS-16840. Enhance the usage description about oiv in HDFSCommands.md and OfflineImageViewerPB (#5129)

Reviewed-by: Takanobu Asanuma <tasanuma@apache.org>
Reviewed-by: ZanderXu <zanderxu@apache.org>
Signed-off-by: Tao Li <tomscut@apache.org>
huhaiyang 2 years ago
parent
commit
dfa9edacce

+ 18 - 0
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageViewerPB.java

@@ -81,6 +81,8 @@ public class OfflineImageViewerPB {
       + "    changed via the -delimiter argument.\n"
       + "    -sp print storage policy, used by delimiter only.\n"
       + "    -ec print erasure coding policy, used by delimiter only.\n"
+      + "    -m  defines multiThread to process sub-sections, \n"
+      + "    used by delimiter only.\n"
       + "  * DetectCorruption: Detect potential corruption of the image by\n"
       + "    selectively loading parts of it and actively searching for\n"
       + "    inconsistencies. Outputs a summary of the found corruptions\n"
@@ -101,8 +103,24 @@ public class OfflineImageViewerPB {
       + "                       against image file. (XML|FileDistribution|\n"
       + "                       ReverseXML|Web|Delimited|DetectCorruption)\n"
       + "                       The default is Web.\n"
+      + "-addr <arg>            Specify the address(host:port) to listen.\n"
+      + "                       (localhost:5978 by default). This option is\n"
+      + "                       used with Web processor.\n"
+      + "-maxSize <arg>         Specify the range [0, maxSize] of file sizes\n"
+      + "                       to be analyzed in bytes (128GB by default).\n"
+      + "                       This option is used with FileDistribution processor.\n"
+      + "-step <arg>            Specify the granularity of the distribution in bytes\n"
+      + "                       (2MB by default). This option is used\n"
+      + "                       with FileDistribution processor.\n"
+      + "-format                Format the output result in a human-readable fashion rather\n"
+      + "                       than a number of bytes. (false by default).\n"
+      + "                       This option is used with FileDistribution processor.\n"
       + "-delimiter <arg>       Delimiting string to use with Delimited or \n"
       + "                       DetectCorruption processor. \n"
+      + "-sp                    Whether to print storage policy (default is false). \n"
+      + "                       Is used by Delimited processor only. \n"
+      + "-ec                    Whether to print erasure coding policy (default is false). \n"
+      + "                       Is used by Delimited processor only. \n"
       + "-t,--temp <arg>        Use temporary dir to cache intermediate\n"
       + "                       result to generate DetectCorruption or\n"
       + "                       Delimited outputs. If not set, the processor\n"

+ 3 - 0
hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSCommands.md

@@ -227,6 +227,9 @@ Usage: `hdfs oiv [OPTIONS] -i INPUT_FILE`
 | `-step` *size* | Specify the granularity of the distribution in bytes (2MB by default). This option is used with FileDistribution processor. |
 | `-format` | Format the output result in a human-readable fashion rather than a number of bytes. (false by default). This option is used with FileDistribution processor. |
 | `-delimiter` *arg* | Delimiting string to use with Delimited processor. |
+| `-sp` | Whether to print Storage policy(default is false). This option is used with Delimited processor only. |
+| `-ec` | Whether to print Erasure coding policy(default is false). This option is used with Delimited processor only. |
+| `-m`,`--multiThread` *arg* | Specify multiThread to process sub-sections. This option is used with Delimited processor only. |
 | `-t`,`--temp` *temporary dir* | Use temporary dir to cache intermediate result to generate Delimited outputs. If not set, Delimited processor constructs the namespace in memory before outputting text. |
 | `-h`,`--help` | Display the tool usage and help information and exit. |