enhance the code
Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/92df0c5f Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/92df0c5f Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/92df0c5f Branch: refs/heads/master Commit: 92df0c5f878ef8d6fad3c6d4f964d19a5816d3f5 Parents: 6f60da5 Author: Liu Ming <ovis_p...@sina.com> Authored: Wed Jan 17 08:47:13 2018 +0000 Committer: Liu Ming <ovis_p...@sina.com> Committed: Wed Jan 17 08:47:13 2018 +0000 ---------------------------------------------------------------------- .../backup_and_restore/run_full_trafodion_backup.sh | 2 +- .../utility/backuprestore/TrafExportSnapshot.java | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafodion/blob/92df0c5f/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 8f7972b..dd49e21 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 @@ -120,7 +120,7 @@ do done #check the HBase compatiblity if TrafExportSnapshot is able to be used -java org.trafodion.utility.backuprestore.TrafExportSnapshot -test +java org.trafodion.utility.backuprestore.TrafExportSnapshot -t if [[ $? -ne 0 ]]; then echo 'not able to use TrafExportSnapshot' mr_limit=0 http://git-wip-us.apache.org/repos/asf/trafodion/blob/92df0c5f/core/sqf/hbase_utilities/src/main/java/org/trafodion/utility/backuprestore/TrafExportSnapshot.java ---------------------------------------------------------------------- diff --git a/core/sqf/hbase_utilities/src/main/java/org/trafodion/utility/backuprestore/TrafExportSnapshot.java b/core/sqf/hbase_utilities/src/main/java/org/trafodion/utility/backuprestore/TrafExportSnapshot.java index c4003d3..e38c0f1 100644 --- a/core/sqf/hbase_utilities/src/main/java/org/trafodion/utility/backuprestore/TrafExportSnapshot.java +++ b/core/sqf/hbase_utilities/src/main/java/org/trafodion/utility/backuprestore/TrafExportSnapshot.java @@ -1111,14 +1111,13 @@ public class TrafExportSnapshot extends Configured implements Tool { if(args.length == 1) { String cmd = args[0]; - if (cmd.equals("-h") || cmd.equals("--help")) { - System.exit(innerMain(HBaseConfiguration.create(), args)); + if (cmd.equals("-t") || cmd.equals("--test")) { + //test if MobUtils is aviable in this system + //doing something meanless + TrafExportSnapshot ti = new TrafExportSnapshot(); + ti.testMobAvail(); + System.exit(0); //normal } - //test if MobUtils is aviable in this system - //doing something meanless - TrafExportSnapshot ti = new TrafExportSnapshot(); - ti.testMobAvail(); - System.exit(0); //normal } System.exit(innerMain(HBaseConfiguration.create(), args)); }