summaryrefslogtreecommitdiff
path: root/ndb/test/src/NdbBackup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ndb/test/src/NdbBackup.cpp')
-rw-r--r--ndb/test/src/NdbBackup.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/ndb/test/src/NdbBackup.cpp b/ndb/test/src/NdbBackup.cpp
index 6cbb69508f5..13dc67748a5 100644
--- a/ndb/test/src/NdbBackup.cpp
+++ b/ndb/test/src/NdbBackup.cpp
@@ -19,7 +19,6 @@
#include <NdbOut.hpp>
#include <NDBT_Output.hpp>
#include <NdbConfig.h>
-#include <ConfigRetriever.hpp>
#include <ndb_version.h>
#include <NDBT.hpp>
#include <NdbSleep.h>
@@ -32,6 +31,10 @@
<< " (Line: " << __LINE__ << ")" << "- " << _xx << endl; \
return NDBT_FAILED; } }
+#include <ConfigRetriever.hpp>
+#include <mgmapi.h>
+#include <mgmapi_config_parameters.h>
+#include <mgmapi_configuration.hpp>
int
NdbBackup::start(unsigned int & _backup_id){
@@ -68,16 +71,12 @@ NdbBackup::getFileSystemPathForNode(int _node_id){
*/
ConfigRetriever cr;
-
- Properties * p = cr.getConfig(host,
- port,
- _node_id,
- NDB_VERSION);
+ ndb_mgm_configuration * p = cr.getConfig(host, port, 0);
if(p == 0){
const char * s = cr.getErrorString();
if(s == 0)
s = "No error given!";
-
+
ndbout << "Could not fetch configuration" << endl;
ndbout << s << endl;
return NULL;
@@ -86,19 +85,19 @@ NdbBackup::getFileSystemPathForNode(int _node_id){
/**
* Setup cluster configuration data
*/
- const Properties * db = 0;
- if (!p->get("Node", _node_id, &db)) {
+ ndb_mgm_configuration_iterator iter(* p, CFG_SECTION_NODE);
+ if (iter.find(CFG_NODE_ID, _node_id)){
ndbout << "Invalid configuration fetched, DB missing" << endl;
return NULL;
}
- const char * type;
- if(!(db->get("Type", &type) && strcmp(type, "DB") == 0)){
+ unsigned int type;
+ if(!iter.get(CFG_TYPE_OF_SECTION, &type) || type != NODE_TYPE_DB){
ndbout <<"Invalid configuration fetched, I'm wrong type of node" << endl;
return NULL;
}
-
+
const char * path;
- if (!db->get("FileSystemPath", &path)){
+ if (iter.get(CFG_DB_FILESYSTEM_PATH, &path)){
ndbout << "FileSystemPath not found" << endl;
return NULL;
}