From dfa9edaccec8251ff75e4d48d5c046cbae02e13a Mon Sep 17 00:00:00 2001 From: huhaiyang Date: Thu, 24 Nov 2022 09:00:27 +0800 Subject: [PATCH] HDFS-16840. Enhance the usage description about oiv in HDFSCommands.md and OfflineImageViewerPB (#5129) Reviewed-by: Takanobu Asanuma Reviewed-by: ZanderXu Signed-off-by: Tao Li --- .../OfflineImageViewerPB.java | 18 ++++++++++++++++++ .../src/site/markdown/HDFSCommands.md | 3 +++ 2 files changed, 21 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageViewerPB.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageViewerPB.java index 2233a3c3d24..fea8a8fdfbb 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageViewerPB.java +++ b/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 Specify the address(host:port) to listen.\n" + + " (localhost:5978 by default). This option is\n" + + " used with Web processor.\n" + + "-maxSize 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 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 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 Use temporary dir to cache intermediate\n" + " result to generate DetectCorruption or\n" + " Delimited outputs. If not set, the processor\n" diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSCommands.md b/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSCommands.md index 0994ff4f353..0b91bdeb11c 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSCommands.md +++ b/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. |