本文整理汇总了Java中org.apache.cassandra.streaming.StreamingRepairTask类的典型用法代码示例。如果您正苦于以下问题:Java StreamingRepairTask类的具体用法?Java StreamingRepairTask怎么用?Java StreamingRepairTask使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
StreamingRepairTask类属于org.apache.cassandra.streaming包,在下文中一共展示了StreamingRepairTask类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: performStreamingRepair
import org.apache.cassandra.streaming.StreamingRepairTask; //导入依赖的package包/类
/**
* Starts sending/receiving our list of differences to/from the remote endpoint: creates a callback
* that will be called out of band once the streams complete.
*/
void performStreamingRepair()
{
Runnable callback = new Runnable()
{
public void run()
{
completed(Differencer.this);
}
};
StreamingRepairTask task = StreamingRepairTask.create(r1.endpoint, r2.endpoint, tablename, cfname, differences, callback);
// Pre 1.0, nodes don't know how to handle forwarded streaming task so don't bother
if (task.isLocalTask() || MessagingService.instance().getVersion(task.dst) >= MessagingService.VERSION_10)
task.run();
}