NSNN-172. Reflect the changes in the checkpointing script
Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/c112b09e Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/c112b09e Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/c112b09e Branch: refs/heads/master Commit: c112b09e9c259b137e5866f603dfa11c8a08296c Parents: 31a7952 Author: Konstantin Boudnik <[email protected]> Authored: Wed Oct 30 16:27:49 2013 -0700 Committer: Konstantin Boudnik <[email protected]> Committed: Wed Oct 30 16:27:49 2013 -0700 ---------------------------------------------------------------------- .../src/common/wdd-namenode-nonstop/secondary-nonstop-loop.sh | 6 ++++++ 1 file changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bigtop/blob/c112b09e/bigtop-packages/src/common/wdd-namenode-nonstop/secondary-nonstop-loop.sh ---------------------------------------------------------------------- diff --git a/bigtop-packages/src/common/wdd-namenode-nonstop/secondary-nonstop-loop.sh b/bigtop-packages/src/common/wdd-namenode-nonstop/secondary-nonstop-loop.sh index e18c18a..59b6590 100644 --- a/bigtop-packages/src/common/wdd-namenode-nonstop/secondary-nonstop-loop.sh +++ b/bigtop-packages/src/common/wdd-namenode-nonstop/secondary-nonstop-loop.sh @@ -32,5 +32,11 @@ while true; do PERIOD=$(hdfs --config $nsnode getconf -confKey dfs.namenode.checkpoint.period) echo Sleeping for dfs.namenode.checkpoint.period set in $nsnode: ${PERIOD}s sleep ${PERIOD}s + if [ -d "${FSIMAGEDIR}/current" ]; then + echo "Removing previous old directory" + rm -rf ${FSIMAGEDIR}/old + echo "Moving current to old in ${FSIMAGEDIR}" + mv ${FSIMAGEDIR}/current ${FSIMAGEDIR}/old + fi done done
