You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by co...@apache.org on 2014/04/25 01:05:16 UTC

[07/50] git commit: NSNN-172. Reflect the changes in the checkpointing script

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 <co...@wandisco.com>
Authored: Wed Oct 30 16:27:49 2013 -0700
Committer: Konstantin Boudnik <co...@wandisco.com>
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