✨ Hadoop Namenode Txid 트러블 슈팅
Hadoop 계열 을 다루다 보면 Txid라는 로그를 자주 볼 수있는데 Transaction Id 줄임말로 파일 시스템에 변경 작업을 식별하고 기록하는데 사용되는 고유 숫자로 사용되며
각각 변경작업(블록 추가, 파일 생성 삭제 등)은 HDFS에서 트랜잭션으로 기록하며 이걸 Txid로 식별하는데 사용하며 정수형인 Txid는 Edit Log(파일 시스템 변경 이력을 기록) 에 기록
아래와 같이 에디트 로그에서 차이가 있다고 알려주는 현상이 생김과 동시에 네임노드를 실행시켜도 실행되지 않음
java.io.IOException: There appears to be a gap in the edit log. We expected txid ***, but got txid
hadoop namenode -recover
Are you ready to proceed? (Y/N)
Y
Enter 'c' to continue, ignoring missing transaction IDs
Enter 's' to stop reading the edit log here, abandoning any later edits
Enter 'q' to quit without saving
Enter 'a' to always select the first choice in the future without prompting. (c/s/q/a)
c를 눌러 진행
hdfs --daemon start namenode
큰 도움이 되었습니다, 감사합니다.