We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a60f157 commit 0bbcd92Copy full SHA for 0bbcd92
1 file changed
rust/operator-binary/src/container.rs
@@ -709,6 +709,16 @@ impl ContainerConfig {
709
710
if [ ! -f "{NAMENODE_ROOT_DATA_DIR}/current/VERSION" ]
711
then
712
+ # Sanity check for data corruption: VERSION file exists but no fsimage_xxx files were created.
713
+ FSIMAGE_COUNT=$(find "{NAMENODE_ROOT_DATA_DIR}/current" -maxdepth 1 -regextype posix-egrep -regex ".*/fsimage_[0-9]+" | wc -l)
714
+
715
+ if [ "${{FSIMAGE_COUNT}}" -eq 0 ]
716
+ then
717
+ echo "WARNING: {NAMENODE_ROOT_DATA_DIR}/current/VERSION file exists but no fsimage file(s) found."
718
+ echo "This indicates an incomplete and corrupted namenode formatting. Please check the troubleshooting guide.
719
+ exit 1
720
+ fi
721
722
if [ -z ${{ACTIVE_NAMENODE+x}} ]
723
724
echo "No active namenode found. Formatting $POD_NAME as active."
0 commit comments