You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2025/10/21 06:00:00 UTC
[jira] [Commented] (HDFS-17847) OIV exits with code 0 (success) even when the output file is incomplete
[ https://issues.apache.org/jira/browse/HDFS-17847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18031330#comment-18031330 ]
ASF GitHub Bot commented on HDFS-17847:
---------------------------------------
smajeti22-dev opened a new pull request, #8042:
URL: https://github.com/apache/hadoop/pull/8042
### Description of PR
When running hdfs oiv (OfflineImageViewer) to convert an fsimage into CSV, the command exits with code 0 (success) even when the output file is truncated due to local filesystem quota being exhausted. This prevents users or automation scripts from detecting that the operation has failed.
### How was this patch tested?
From CommandLine CLI
### For code changes:
Fine
> OIV exits with code 0 (success) even when the output file is incomplete
> -----------------------------------------------------------------------
>
> Key: HDFS-17847
> URL: https://issues.apache.org/jira/browse/HDFS-17847
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: command
> Affects Versions: 3.1.4, 3.2.4, 3.3.6, 3.4.2
> Reporter: Srinivasu Majeti
> Assignee: Srinivasu Majeti
> Priority: Major
> Attachments: HDFS-17847.patch
>
>
> When running hdfs oiv (OfflineImageViewer) to convert an fsimage into CSV, the command exits with code 0 (success) even when the output file is truncated due to local filesystem quota being exhausted. This prevents users or automation scripts from detecting that the operation has failed.
> REPRO PROCEDURE:
> mkdir -p /tmp/oiv_repro/out
> [root@ccycloud-4.nightly7x-us-oh.root.comops.site ~]# sudo mount -t tmpfs -o size=100k tmpfs /tmp/oiv_repro/out
> [root@ccycloud-4.nightly7x-us-oh.root.comops.site ~]# dd if=/dev/zero of=/tmp/oiv_repro/out/filler bs=1K count=100
> 100+0 records in
> 100+0 records out
> 102400 bytes (102 kB, 100 KiB) copied, 0.000546265 s, 187 MB/s
> [root@ccycloud-4.nightly7x-us-oh.root.comops.site ~]# cd /dataroot/ycloud/dfs/nn/current/
> [root@ccycloud-4.nightly7x-us-oh.root.comops.site current]# ls -lrth
> total 3.5M
> -rw-r--r-- 1 hdfs hdfs 194 Sep 25 06:27 VERSION
> -rw-r--r-- 1 hdfs hdfs 42 Sep 25 06:29 edits_0000000000000000001-0000000000000000002
> -rw-r--r-- 1 hdfs hdfs 1.7M Sep 25 07:29 edits_0000000000000000003-0000000000000015159
> -rw-r--r-- 1 hdfs hdfs 95K Sep 25 08:29 edits_0000000000000015160-0000000000000015710
> -rw-r--r-- 1 hdfs hdfs 95K Sep 25 09:29 edits_0000000000000015711-0000000000000016260
> -rw-r--r-- 1 hdfs hdfs 99K Sep 25 10:29 edits_0000000000000016261-0000000000000016839
> -rw-r--r-- 1 hdfs hdfs 243K Sep 25 10:29 fsimage_0000000000000016839
> -rw-r--r-- 1 hdfs hdfs 62 Sep 25 10:29 fsimage_0000000000000016839.md5
> -rw-r--r-- 1 hdfs hdfs 95K Sep 25 11:29 edits_0000000000000016840-0000000000000017389
> -rw-r--r-- 1 hdfs hdfs 6 Sep 25 11:29 seen_txid
> -rw-r--r-- 1 hdfs hdfs 251K Sep 25 11:29 fsimage_0000000000000017389
> -rw-r--r-- 1 hdfs hdfs 62 Sep 25 11:29 fsimage_0000000000000017389.md5
> -rw-r--r-- 1 hdfs hdfs 1.0M Sep 25 12:28 edits_inprogress_0000000000000017390
> [root@ccycloud-4.nightly7x-us-oh.root.comops.site current]# FSIMG=/dataroot/ycloud/dfs/nn/current/fsimage_0000000000000017389
> [root@ccycloud-4.nightly7x-us-oh.root.comops.site current]# hdfs oiv -p Delimited -i "$FSIMG" -o /tmp/oiv_repro/out/fsimage.csv
> 25/09/25 12:30:20 INFO offlineImageViewer.PBImageTextWriter: Loading string table
> 25/09/25 12:30:20 INFO offlineImageViewer.FSImageHandler: Loading 24 strings
> 25/09/25 12:30:20 INFO offlineImageViewer.PBImageTextWriter: Loading inode references
> 25/09/25 12:30:20 INFO offlineImageViewer.FSImageHandler: Loading inode references
> 25/09/25 12:30:20 INFO offlineImageViewer.FSImageHandler: Loaded 0 inode references
> 25/09/25 12:30:20 INFO offlineImageViewer.PBImageTextWriter: Loading directories
> 25/09/25 12:30:20 INFO offlineImageViewer.PBImageTextWriter: Loading directories in INode section.
> 25/09/25 12:30:21 INFO offlineImageViewer.PBImageTextWriter: Found 784 directories in INode section.
> 25/09/25 12:30:21 INFO offlineImageViewer.PBImageTextWriter: Finished loading directories in 128ms
> 25/09/25 12:30:21 INFO offlineImageViewer.PBImageTextWriter: Loading INode directory section.
> 25/09/25 12:30:21 INFO offlineImageViewer.PBImageTextWriter: Scanned 464 INode directories to build namespace.
> 25/09/25 12:30:21 INFO offlineImageViewer.PBImageTextWriter: Finished loading INode directory section in 13ms
> 25/09/25 12:30:21 INFO offlineImageViewer.PBImageTextWriter: Found 2834 INodes in the INode section
> 25/09/25 12:30:21 INFO offlineImageViewer.PBImageTextWriter: Outputted 2834 INodes.
> [root@ccycloud-4.nightly7x-us-oh.root.comops.site current]# echo $?
> 0
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org