org.apache.hadoop.hdfs.tools.offlineImageViewer

## Class PBImageDelimitedTextWriter

- java.lang.Object
- - org.apache.hadoop.hdfs.tools.offlineImageViewer.PBImageDelimitedTextWriter

- All Implemented Interfaces:
    Closeable, AutoCloseable

      public class PBImageDelimitedTextWriter
      extends Object

  A PBImageDelimitedTextWriter generates a text representation of the PB fsimage, with each element separated by a delimiter string. All of the elements common to both inodes and inodes-under-construction are included. When processing an fsimage with a layout version that did not include an element, such as AccessTime, the output file will include a column for the value, but no value will be included. Individual block information for each file is not currently included. The default delimiter is tab, as this is an unlikely value to be included in an inode path or other text metadata. The delimiter value can be via the constructor.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `String` | `getEntry(String parent, FsImageProto.INodeSection.INode inode)` Get text output for the given inode.
    `String` | `getHeader()` Get text output for the header line.
    `protected org.apache.hadoop.fs.permission.PermissionStatus` | `getPermission(long perm)`
    `void` | `visit(RandomAccessFile file)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getEntry

          public String getEntry(String parent,
                                 FsImageProto.INodeSection.INode inode)

      Get text output for the given inode.
      Parameters:
        `parent` - the path of parent directory
        `inode` - the INode object to output.

    - #### getHeader

          public String getHeader()

      Get text output for the header line.

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Throws:
        `IOException`

    - #### visit

          public void visit(RandomAccessFile file)
                     throws IOException

      Throws:
        `IOException`

    - #### getPermission

          protected org.apache.hadoop.fs.permission.PermissionStatus getPermission(long perm)

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.