Skip to content

Commit

Permalink
Fix some hint message based on review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
JunhongMao committed Oct 8, 2024
1 parent ce9f697 commit 16620cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion saidump/SaiDump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void SaiDump::printUsage()
std::cout << " -g --dumpGraph:" << std::endl;
std::cout << " Dump current graph" << std::endl;
std::cout << " -r --rdb:" << std::endl;
std::cout << " Dump by parsing the RDB JSON file, which is created based on Redis dump.rdb that is generated by Redis SAVE command" << std::endl;
std::cout << " Dump by parsing the RDB JSON file, which is created based on Redis dump.rdb that is generated by redis-cli --rdb command" << std::endl;
std::cout << " -m --max:" << std::endl;
std::cout << " Config the the RDB JSON file's max size in MB, which is optional with default value 100MB" << std::endl;
std::cout << " -h --help:" << std::endl;
Expand Down
5 changes: 2 additions & 3 deletions syncd/scripts/saidump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ save_saidump_by_rdb()
import json
with open('$filepath') as json_file:
data = json.load(json_file)
print(data['INSTANCES']['redis']['hostname'], data['INSTANCES']['redis']['port'], data['INSTANCES']['redis']['unix_socket_path'])
json_file.close()")
print(data['INSTANCES']['redis']['hostname'], data['INSTANCES']['redis']['port'], data['INSTANCES']['redis']['unix_socket_path'])")

# split
redis_config=(${redis_config// / })
Expand All @@ -26,7 +25,7 @@ with open('$filepath') as json_file:
logger "saidump.sh: [2] Run rdb-cli command to convert the dump files into JSON files."
rdb-cli $redis_dir/dump.rdb json | tee $redis_dir/dump.json > /dev/null

logger "saidump.sh: [3] Run saidump -r to update the JSON files' format as same as the saidump before. Then we can get the saidump's result in standard output."
logger "saidump.sh: [3] Run saidump -r to get the result at standard output from the JSON file."
saidump -r $redis_dir/dump.json -m 100

logger "saidump.sh: [4] Clear the temporary files."
Expand Down

0 comments on commit 16620cd

Please sign in to comment.