trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sure...@apache.org
Subject [1/2] incubator-trafodion git commit: [TRAFODION-1490] fix backup restore script to support CDH parcels install
Date Tue, 15 Sep 2015 23:23:57 GMT
Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 96f50daa1 -> 0434c6048


[TRAFODION-1490] fix backup restore script to support CDH parcels install


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/0c8f57eb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/0c8f57eb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/0c8f57eb

Branch: refs/heads/master
Commit: 0c8f57ebe8fbb8daa611c23d678d5cf5fbd679eb
Parents: 6f2b03a
Author: Prashanth Vasudev <prashanth.vasudev@esgyn.com>
Authored: Tue Sep 15 22:01:46 2015 +0000
Committer: Prashanth Vasudev <prashanth.vasudev@esgyn.com>
Committed: Tue Sep 15 22:01:46 2015 +0000

----------------------------------------------------------------------
 .../backup_and_restore/backup_restore_functions.sh        |  4 ++--
 .../backup_and_restore/run_full_trafodion_backup.sh       |  6 +++---
 .../backup_and_restore/run_full_trafodion_restore.sh      | 10 +++++-----
 3 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/0c8f57eb/core/sqf/hbase_utilities/backup_and_restore/backup_restore_functions.sh
----------------------------------------------------------------------
diff --git a/core/sqf/hbase_utilities/backup_and_restore/backup_restore_functions.sh b/core/sqf/hbase_utilities/backup_and_restore/backup_restore_functions.sh
index 28825c3..0c4abc9 100755
--- a/core/sqf/hbase_utilities/backup_and_restore/backup_restore_functions.sh
+++ b/core/sqf/hbase_utilities/backup_and_restore/backup_restore_functions.sh
@@ -35,7 +35,7 @@ which_environment()
   if [[ -e $MY_SQROOT/sql/scripts/sw_env.sh ]]; then
     # we are on a development system where install_local_hadoop has been executed
     return 1
-  elif [[ -n "$(ls /usr/lib/hadoop/hadoop-*cdh*.jar 2>/dev/null)" || -n "$(ls /etc/init.d/ambari*
2>/dev/null)" || -d /opt/mapr  ]]; then
+  elif [[ -n "$(ls /usr/lib/hadoop/hadoop-*cdh*.jar 2>/dev/null)" || -n "$(ls /etc/init.d/ambari*
2>/dev/null)" ||  -d /opt/cloudera/parcels/CDH || -d /opt/mapr  ]]; then
     #cluster with Cloudera, Horton Works or Mapr distribution
     return 2
   else
@@ -302,7 +302,7 @@ validate_sudo_access()
    do_sudo $usr "echo 'aa'" &> /dev/null
    if [[  $? -ne 0 ]]
    then
-     echo "***[ERROR]: Could not validate sudo access."     | tee -a ${log_file}
+     echo "***[ERROR]: Could not validate sudo access for ${usr}."     | tee -a ${log_file}
      return 1
    fi
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/0c8f57eb/core/sqf/hbase_utilities/backup_and_restore/run_full_trafodion_backup.sh
----------------------------------------------------------------------
diff --git a/core/sqf/hbase_utilities/backup_and_restore/run_full_trafodion_backup.sh b/core/sqf/hbase_utilities/backup_and_restore/run_full_trafodion_backup.sh
index dba9367..793388f 100755
--- a/core/sqf/hbase_utilities/backup_and_restore/run_full_trafodion_backup.sh
+++ b/core/sqf/hbase_utilities/backup_and_restore/run_full_trafodion_backup.sh
@@ -237,9 +237,9 @@ do
   echo "Exporting ${snapshot_name} ..."
   #export--
   hbase_cmd="$(get_hbase_cmd)  org.apache.hadoop.hbase.snapshot.ExportSnapshot"
-  hbase_cmd+="-snapshot ${snapshot_name}"
-  hbase_cmd+="-copy-to ${hdfs_backup_location}/${snapshot_name}"
-  hbase_cmd+="-mappers $mappers"
+  hbase_cmd+=" -snapshot ${snapshot_name}"
+  hbase_cmd+=" -copy-to ${hdfs_backup_location}/${snapshot_name}"
+  hbase_cmd+=" -mappers $mappers"
   echo "${hbase_cmd}" | tee -a ${log_file}
 
   do_sudo ${hbase_user} "${hbase_cmd}" 2>&1 | tee -a  ${log_file}

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/0c8f57eb/core/sqf/hbase_utilities/backup_and_restore/run_full_trafodion_restore.sh
----------------------------------------------------------------------
diff --git a/core/sqf/hbase_utilities/backup_and_restore/run_full_trafodion_restore.sh b/core/sqf/hbase_utilities/backup_and_restore/run_full_trafodion_restore.sh
index 6e003df..18ef4e7 100755
--- a/core/sqf/hbase_utilities/backup_and_restore/run_full_trafodion_restore.sh
+++ b/core/sqf/hbase_utilities/backup_and_restore/run_full_trafodion_restore.sh
@@ -198,13 +198,13 @@ do
   echo "delete_snapshot	'${snapshot_name}'" >>	$hbase_delete_snapshots
   echo  "Importing Snapshot: ${snapshot_name}"   | tee -a $log_file
   hbase_cmd="$(get_hbase_cmd)"
-  hbase_cmd+="org.apache.hadoop.hbase.snapshot.ExportSnapshot"
-  hbase_cmd+="-D hbase.rootdir=${hdfs_backup_location}/${snapshot_name}"
-  hbase_cmd+="-snapshot ${snapshot_name}"
-  hbase_cmd+="-copy-to ${hbase_root_dir}"
+  hbase_cmd+=" org.apache.hadoop.hbase.snapshot.ExportSnapshot"
+  hbase_cmd+=" -D hbase.rootdir=${hdfs_backup_location}/${snapshot_name}"
+  hbase_cmd+=" -snapshot ${snapshot_name}"
+  hbase_cmd+=" -copy-to ${hbase_root_dir}"
   echo "${hbase_cmd}" | tee -a  $log_file
 
-  do_sudo ${hbase_user} "${hbase_cmd}" 2>&1 | tee -a  ${log_file}
+  do_sudo ${hbase_user} " ${hbase_cmd}" 2>&1 | tee -a  ${log_file}
   ##check for erros
   if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
       echo "****[ERROR]: Error encountered while importing snapshot ${snapshot_name}." |
tee -a $log_file


Mime
View raw message