void updateImageMetrics ( ) { if ( metrics == null ) { return ; } int failedImageDirs = 0 ; for ( ImageManager im : imageManagers ) { if ( im . isImageDisabled ( ) ) { failedImageDirs ++ ; } } // update only images, journals are handled in JournalSet metrics . imagesFailed . set ( failedImageDirs ) ; }
Count available image managers and update namenode metrics .