У меня есть namenode, чей fsimage поврежден, и у меня есть только один доступный fsimage в каталоге.Я хочу восстановить это из команды "hdfs namenode -recover".Но я получаю следующую ошибку.
> 19/02/26 13:11:06 INFO util.GSet: 0.029999999329447746% max memory 889
> MB = 273.1 KB 19/02/26 13:11:06 INFO util.GSet: capacity = 2^15 =
> 32768 entries 19/02/26 13:11:06 INFO hdfs.StateChange: STATE* Safe
> mode is ON. It was turned on manually. Use "hdfs dfsadmin -safemode
> leave" to turn safe mode off. 19/02/26 13:11:06 INFO common.Storage:
> Lock on /home/rakeshbharadwaj/Desktop/hadoop-2.7.4-ex2/nn/in_use.lock
> acquired by nodename 5642@rakeshbharadwaj-VirtualBox 19/02/26 13:11:06
> INFO namenode.FileJournalManager: Recovering unfinalized segments in
> /home/rakeshbharadwaj/Desktop/hadoop-2.7.4-ex2/nn/current 19/02/26
> 13:11:06 INFO namenode.FSImage: Planning to load image:
> FSImageFile(file=/home/rakeshbharadwaj/Desktop/hadoop-2.7.4-ex2/nn/current/fsimage_0000000000000000009,
> cpktTxId=0000000000000000009) 19/02/26 13:11:06 ERROR
> namenode.FSImage: Failed to load image from
> FSImageFile(file=/home/rakeshbharadwaj/Desktop/hadoop-2.7.4-ex2/nn/current/fsimage_0000000000000000009,
> cpktTxId=0000000000000000009) java.io.IOException: Negative seek
> offset at java.io.RandomAccessFile.seek(RandomAccessFile.java:555)
> at
> org.apache.hadoop.hdfs.server.namenode.FSImageUtil.loadSummary(FSImageUtil.java:63)
> at
> org.apache.hadoop.hdfs.server.namenode.FSImageFormatProtobuf$Loader.loadInternal(FSImageFormatProtobuf.java:196)
> at
> org.apache.hadoop.hdfs.server.namenode.FSImageFormatProtobuf$Loader.load(FSImageFormatProtobuf.java:182)
> at
> org.apache.hadoop.hdfs.server.namenode.FSImageFormat$LoaderDelegator.load(FSImageFormat.java:226)
> at
> org.apache.hadoop.hdfs.server.namenode.FSImage.loadFSImage(FSImage.java:1010)
> at
> org.apache.hadoop.hdfs.server.namenode.FSImage.loadFSImage(FSImage.java:994)
> at
> org.apache.hadoop.hdfs.server.namenode.FSImage.loadFSImageFile(FSImage.java:793)
> at
> org.apache.hadoop.hdfs.server.namenode.FSImage.loadFSImage(FSImage.java:724)
> at
> org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:321)
> at
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFSImage(FSNamesystem.java:978)
> at
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFromDisk(FSNamesystem.java:685)
> at
> org.apache.hadoop.hdfs.server.namenode.NameNode.doRecovery(NameNode.java:1390)
> at
> org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1484)
> at
> org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1566)
> 19/02/26 13:11:06 WARN namenode.FSNamesystem: Encountered exception
> loading fsimage java.io.IOException: Failed to load FSImage file, see
> error(s) above for more info. at
> org.apache.hadoop.hdfs.server.namenode.FSImage.loadFSImage(FSImage.java:739)
> at
> org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:321)
> at
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFSImage(FSNamesystem.java:978)
> at
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFromDisk(FSNamesystem.java:685)
> at
> org.apache.hadoop.hdfs.server.namenode.NameNode.doRecovery(NameNode.java:1390)
> at
> org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1484)
> at
> org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1566)
> 19/02/26 13:11:06 INFO namenode.MetaRecoveryContext: RECOVERY FAILED:
> caught exception java.io.IOException: Failed to load FSImage file, see
> error(s) above for more info. at
> org.apache.hadoop.hdfs.server.namenode.FSImage.loadFSImage(FSImage.java:739)
> at
> org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:321)
> at
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFSImage(FSNamesystem.java:978)
> at
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFromDisk(FSNamesystem.java:685)
> at
> org.apache.hadoop.hdfs.server.namenode.NameNode.doRecovery(NameNode.java:1390)
> at
> org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1484)
> at
> org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1566)
> 19/02/26 13:11:06 ERROR namenode.NameNode: Failed to start namenode.
> java.io.IOException: Failed to load FSImage file, see error(s) above
> for more info. at
> org.apache.hadoop.hdfs.server.namenode.FSImage.loadFSImage(FSImage.java:739)
> at
> org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:321)
> at
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFSImage(FSNamesystem.java:978)
> at
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFromDisk(FSNamesystem.java:685)
> at
> org.apache.hadoop.hdfs.server.namenode.NameNode.doRecovery(NameNode.java:1390)
> at
> org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1484)
> at
> org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1566)
> 19/02/26 13:11:06 INFO util.ExitUtil: Exiting with status 1
Я пытался перевести узел в безопасный режим, но он не работает и выдает следующую ошибку
. / Hdfs dfsadmin -safemode оставитьsafemode: вызов с rakeshbharadwaj-VirtualBox / 127.0.1.1 на локальный хост: 9001 не удалось выполнить при исключении соединения: java.net.ConnectException: соединение отклонено;Для получения более подробной информации смотрите: http://wiki.apache.org/hadoop/ConnectionRefused
Спросите: Мне нужна помощь с восстановлением fsimage и для запуска наменода.