【发布时间】:2016-08-12 07:45:23
【问题描述】:
我想知道是否可以从 Cassandra 的 C/C++ 驱动程序复制 nodetool 实用程序中的 forceKeyspaceFlush() 函数。
nodetool 函数如下所示:
public class Flush extends NodeToolCmd
{
@Arguments(usage = "[<keyspace> <tables>...]", description = "The keyspace followed by one or many tables")
private List<String> args = new ArrayList<>();
@Override
public void execute(NodeProbe probe)
{
List<String> keyspaces = parseOptionalKeyspace(args, probe);
String[] tableNames = parseOptionalTables(args);
for (String keyspace : keyspaces)
{
try
{
probe.forceKeyspaceFlush(keyspace, tableNames);
} catch (Exception e)
{
throw new RuntimeException("Error occurred during flushing", e);
}
}
}
}
我想在我的 C++ 软件中复制的是这一行:
probe.forceKeyspaceFlush(keyspace, tableNames);
有可能吗?
【问题讨论】:
标签: c++ cassandra driver cassandra-3.0