本文整理汇总了C++中Ndb_cluster_connection::get_next_node方法的典型用法代码示例。如果您正苦于以下问题:C++ Ndb_cluster_connection::get_next_node方法的具体用法?C++ Ndb_cluster_connection::get_next_node怎么用?C++ Ndb_cluster_connection::get_next_node使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ndb_cluster_connection
的用法示例。
在下文中一共展示了Ndb_cluster_connection::get_next_node方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: desc_datafile
int desc_datafile(Ndb_cluster_connection &con, Ndb *myndb, char* name)
{
unsigned id;
NdbDictionary::Dictionary *dict= myndb->getDictionary();
assert(dict);
Ndb_cluster_connection_node_iter iter;
con.init_get_next_node(iter);
while ((id= con.get_next_node(iter)))
{
NdbDictionary::Datafile df= dict->getDatafile(id, name);
NdbError err= dict->getNdbError();
if ((int) err.classification != (int) ndberror_cl_none)
return 0;
ndbout << "Type: Datafile" << endl;
ndbout << "Name: " << name << endl;
ndbout << "Node: " << id << endl;
ndbout << "Path: " << df.getPath() << endl;
ndbout << "Size: " << df.getSize() << endl;
ndbout << "Free: " << df.getFree() << endl;
ndbout << "Tablespace: " << df.getTablespace() << endl;
/** We probably don't need to display this ever...
ndbout << "Number: " << uf.getFileNo() << endl;
*/
ndbout << endl;
}
return 1;
}
示例2: desc_undofile
int desc_undofile(Ndb_cluster_connection &con, Ndb *myndb, char* name)
{
unsigned id;
NdbDictionary::Dictionary *dict= myndb->getDictionary();
Ndb_cluster_connection_node_iter iter;
assert(dict);
con.init_get_next_node(iter);
while ((id= con.get_next_node(iter)))
{
NdbDictionary::Undofile uf= dict->getUndofile(0, name);
NdbError err= dict->getNdbError();
if ((int) err.classification != (int) ndberror_cl_none)
return 0;
ndbout << "Type: Undofile" << endl;
ndbout << "Name: " << name << endl;
ndbout << "Node: " << id << endl;
ndbout << "Path: " << uf.getPath() << endl;
ndbout << "Size: " << uf.getSize() << endl;
ndbout << "Logfile Group: " << uf.getLogfileGroup() << endl;
/** FIXME: are these needed, the functions aren't there
but the prototypes are...
ndbout << "Number: " << uf.getFileNo() << endl;
*/
ndbout << endl;
}
return 1;
}