You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by st...@apache.org on 2014/10/10 21:00:47 UTC
[08/50] [abbrv] git commit: HDFS-6519. Document oiv_legacy command
(Akira AJISAKA via aw)
HDFS-6519. Document oiv_legacy command (Akira AJISAKA via aw)
Conflicts:
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/2b9e1a6c
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/2b9e1a6c
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/2b9e1a6c
Branch: refs/heads/champlain
Commit: 2b9e1a6c8c4613351a800680f850fc23eab2afe8
Parents: 215e132
Author: Allen Wittenauer <aw...@apache.org>
Authored: Mon Sep 29 08:51:55 2014 -0700
Committer: Jitendra Pandey <Ji...@Jitendra-Pandeys-MacBook-Pro-4.local>
Committed: Wed Oct 8 22:56:49 2014 -0700
----------------------------------------------------------------------
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 4 ++
.../src/main/resources/hdfs-default.xml | 11 ++++
.../src/site/apt/HdfsImageViewer.apt.vm | 59 +++++++++++++++++++-
3 files changed, 73 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/2b9e1a6c/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index 0a0f50e..5afe95d 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -280,6 +280,10 @@ Release 2.6.0 - UNRELEASED
HDFS-7156. Update fsck documentation. (Masahiro Yamaguch via shv)
+ HDFS-7093. Add config key to restrict setStoragePolicy. (Arpit Agarwal)
+
+ HDFS-6519. Document oiv_legacy command (Akira AJISAKA via aw)
+
OPTIMIZATIONS
HDFS-6690. Deduplicate xattr names in memory. (wang)
http://git-wip-us.apache.org/repos/asf/hadoop/blob/2b9e1a6c/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml b/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml
index 6396227..3da0cdb 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml
@@ -2150,4 +2150,15 @@
</description>
</property>
+<property>
+ <name>dfs.namenode.legacy-oiv-image.dir</name>
+ <value></value>
+ <description>Determines where to save the namespace in the old fsimage format
+ during checkpointing by standby NameNode or SecondaryNameNode. Users can
+ dump the contents of the old format fsimage by oiv_legacy command. If
+ the value is not specified, old format fsimage will not be saved in
+ checkpoint.
+ </description>
+</property>
+
</configuration>
http://git-wip-us.apache.org/repos/asf/hadoop/blob/2b9e1a6c/hadoop-hdfs-project/hadoop-hdfs/src/site/apt/HdfsImageViewer.apt.vm
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/site/apt/HdfsImageViewer.apt.vm b/hadoop-hdfs-project/hadoop-hdfs/src/site/apt/HdfsImageViewer.apt.vm
index 9a9946e..3b84226 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/site/apt/HdfsImageViewer.apt.vm
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/site/apt/HdfsImageViewer.apt.vm
@@ -28,7 +28,7 @@ Offline Image Viewer Guide
namespace. The tool is able to process very large image files relatively
quickly. The tool handles the layout formats that were included with Hadoop
versions 2.4 and up. If you want to handle older layout formats, you can
- use the Offline Image Viewer of Hadoop 2.3.
+ use the Offline Image Viewer of Hadoop 2.3 or {{oiv_legacy Command}}.
If the tool is not able to process an image file, it will exit cleanly.
The Offline Image Viewer does not require a Hadoop cluster to be running;
it is entirely offline in its operation.
@@ -188,3 +188,60 @@ Offline Image Viewer Guide
about the hdfs namespace. This information can then be used to explore
file system usage patterns or find specific files that match arbitrary
criteria, along with other types of namespace analysis.
+
+* oiv_legacy Command
+
+ Due to the internal layout changes introduced by the ProtocolBuffer-based
+ fsimage ({{{https://issues.apache.org/jira/browse/HDFS-5698}HDFS-5698}}),
+ OfflineImageViewer consumes excessive amount of memory and loses some
+ functions such as Indented and Delimited processor. If you want to process
+ without large amount of memory or use these processors, you can use
+ <<<oiv_legacy>>> command (same as <<<oiv>>> in Hadoop 2.3).
+
+** Usage
+
+ 1. Set <<<dfs.namenode.legacy-oiv-image.dir>>> to an appropriate directory
+ to make standby NameNode or SecondaryNameNode save its namespace in the
+ old fsimage format during checkpointing.
+
+ 2. Use <<<oiv_legacy>>> command to the old format fsimage.
+
+----
+ bash$ bin/hdfs oiv_legacy -i fsimage_old -o output
+----
+
+** Options
+
+*-----------------------:-----------------------------------+
+| <<Flag>> | <<Description>> |
+*-----------------------:-----------------------------------+
+| <<<-i>>>\|<<<--inputFile>>> <input file> | Specify the input fsimage file to
+| | process. Required.
+*-----------------------:-----------------------------------+
+| <<<-o>>>\|<<<--outputFile>>> <output file> | Specify the output filename, if
+| | the specified output processor generates one. If the
+| | specified file already exists, it is silently
+| | overwritten. Required.
+*-----------------------:-----------------------------------+
+| <<<-p>>>\|<<<--processor>>> <processor> | Specify the image processor to
+| | apply against the image file. Valid options are
+| | Ls (default), XML, Delimited, Indented, and
+| | FileDistribution.
+*-----------------------:-----------------------------------+
+| <<<-skipBlocks>>> | Do not enumerate individual blocks within files. This
+| | may save processing time and outfile file space on
+| | namespaces with very large files. The Ls processor
+| | reads the blocks to correctly determine file sizes
+| | and ignores this option.
+*-----------------------:-----------------------------------+
+| <<<-printToScreen>>> | Pipe output of processor to console as well as
+| | specified file. On extremely large namespaces, this
+| | may increase processing time by an order of
+| | magnitude.
+*-----------------------:-----------------------------------+
+| <<<-delimiter>>> <arg>| When used in conjunction with the Delimited
+| | processor, replaces the default tab delimiter with
+| | the string specified by <arg>.
+*-----------------------:-----------------------------------+
+| <<<-h>>>\|<<<--help>>>| Display the tool usage and help information and exit.
+*-----------------------:-----------------------------------+