From 52ff6b832d68cd67d6ded5dc53f571ae2279fd22 Mon Sep 17 00:00:00 2001 From: Ed Coleman Date: Tue, 19 Dec 2023 20:04:08 +0000 Subject: [PATCH 1/2] Update documentation to create an empty wal file --- _docs-2/troubleshooting/advanced.md | 30 ++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/_docs-2/troubleshooting/advanced.md b/_docs-2/troubleshooting/advanced.md index 5b6ddf9f8..dd372f6a9 100644 --- a/_docs-2/troubleshooting/advanced.md +++ b/_docs-2/troubleshooting/advanced.md @@ -249,21 +249,29 @@ metadata table!), the following process can be followed to create a valid, empty WAL file. Run the following commands as the Accumulo unix user (to ensure that the proper file permissions in HDFS) - $ echo -n -e '--- Log File Header (v2) ---\x00\x00\x00\x00' > empty.wal +``` +$ UUID=$(uuidgen); \ +echo -n -e '--- Log File Header (v4) ---U+1F47B$'"${UUID}"'\x00\x00\x00\x00' > "${UUID}".wal; \ +echo 'created: '"${UUID}"'.wal' +``` -The above creates a file with the text "--- Log File Header (v2) ---" and then -four bytes. You should verify the contents of the file with a hexdump tool. +The above creates a file with the text "--- Log File Header (v4) ---" a unicode character to flag no decryption +parameters, a UUID and then four bytes. The file created will be `[uuid]`.wal and the name is echoed to the command +line. You should verify the contents of the file with a hexdump tool. -Then, place this empty WAL in HDFS and then replace the corrupt WAL file in HDFS -with the empty WAL. +Then, place this empty WAL in HDFS and then replace the corrupt WAL file in HDFS with the empty WAL for the +tserver / host pair with the following hdfs commands: - $ hdfs dfs -moveFromLocal empty.wal /user/accumulo/empty.wal - $ hdfs dfs -mv /user/accumulo/empty.wal /accumulo/wal/tserver-4.example.com+10011/26abec5b-63e7-40dd-9fa1-b8ad2436606e + $ hdfs dfs -moveFromLocal [uuid].wal /user/accumulo/[uuid].wal + $ hdfs dfs -mv /user/accumulo/[uuid].wal /accumulo/wal/[tserver+port]/[uuid] -After the corrupt WAL file has been replaced, the system should automatically recover. -It may be necessary to restart the Accumulo Manager process as an exponential -backup policy is used which could lead to a long wait before Accumulo will -try to re-load the WAL file. +Note: +- the `+` separator for port. +- the wal file is the uuid, without an extension + +After the corrupt WAL file has been replaced, the system should automatically recover. It may be necessary to restart +the Accumulo Manager process as an exponential backup policy is used which could lead to a long wait before Accumulo +will try to re-load the WAL file. ## Zookeeper Failures From 23a1898d71854167141275817037f2a5f3b6edf9 Mon Sep 17 00:00:00 2001 From: Ed Coleman Date: Tue, 28 May 2024 21:26:04 +0000 Subject: [PATCH 2/2] Update create-empty utility usage in Advanced Troubleshooting - Update empty rfile to keyword executable command format - Update to include creating an empty wal file. --- _docs-2/troubleshooting/advanced.md | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/_docs-2/troubleshooting/advanced.md b/_docs-2/troubleshooting/advanced.md index dd372f6a9..ba5742cf6 100644 --- a/_docs-2/troubleshooting/advanced.md +++ b/_docs-2/troubleshooting/advanced.md @@ -208,7 +208,7 @@ references to the file in the METADATA table and within the tablet server hosting the file can be resolved by Accumulo. An empty file can be created using the CreateEmpty utility: - $ accumulo org.apache.accumulo.core.file.rfile.CreateEmpty /path/to/empty/file/empty.rf + $ accumulo create-empty --type RFILE /path/to/empty/file/empty.rf The process is to delete the corrupt file and then move the empty file into its place (The generated empty file can be copied and used multiple times if necessary and does not need @@ -249,21 +249,18 @@ metadata table!), the following process can be followed to create a valid, empty WAL file. Run the following commands as the Accumulo unix user (to ensure that the proper file permissions in HDFS) -``` -$ UUID=$(uuidgen); \ -echo -n -e '--- Log File Header (v4) ---U+1F47B$'"${UUID}"'\x00\x00\x00\x00' > "${UUID}".wal; \ -echo 'created: '"${UUID}"'.wal' -``` +The create-empty utility can be used to create an empty wal file. -The above creates a file with the text "--- Log File Header (v4) ---" a unicode character to flag no decryption -parameters, a UUID and then four bytes. The file created will be `[uuid]`.wal and the name is echoed to the command -line. You should verify the contents of the file with a hexdump tool. + + $ accumulo create-empty --type WAL [filename] + +Note the create-empty utility default type (or specifying `--type RFILE` will create an empty rfile) Then, place this empty WAL in HDFS and then replace the corrupt WAL file in HDFS with the empty WAL for the tserver / host pair with the following hdfs commands: - $ hdfs dfs -moveFromLocal [uuid].wal /user/accumulo/[uuid].wal - $ hdfs dfs -mv /user/accumulo/[uuid].wal /accumulo/wal/[tserver+port]/[uuid] + $ hadoop fs –rm /accumulo/wal/[tserver+port]/[uuid]; \ + hadoop fs -mv /path/to/empty/file/empty.rf /accumulo/wal/[tserver+port]/[uuid] Note: - the `+` separator for port.