Search in sources :

Example 6 with SyncRequest

use of org.apache.cassandra.repair.messages.SyncRequest in project cassandra by apache.

the class StreamingRepairTaskTest method fullStreamPlan.

@Test
public void fullStreamPlan() throws Exception {
    UUID sessionID = registerSession(cfs, false, true);
    ActiveRepairService.ParentRepairSession prs = ActiveRepairService.instance.getParentRepairSession(sessionID);
    RepairJobDesc desc = new RepairJobDesc(sessionID, UUIDGen.getTimeUUID(), ks, tbl, prs.getRanges());
    SyncRequest request = new SyncRequest(desc, PARTICIPANT1, PARTICIPANT2, PARTICIPANT3, prs.getRanges(), PreviewKind.NONE, false);
    StreamingRepairTask task = new StreamingRepairTask(desc, request.initiator, request.src, request.dst, request.ranges, null, PreviewKind.NONE, false);
    StreamPlan plan = task.createStreamPlan(request.dst);
    Assert.assertTrue(plan.getFlushBeforeTransfer());
}
Also used : StreamPlan(org.apache.cassandra.streaming.StreamPlan) ActiveRepairService(org.apache.cassandra.service.ActiveRepairService) SyncRequest(org.apache.cassandra.repair.messages.SyncRequest) UUID(java.util.UUID) Test(org.junit.Test)

Aggregations

SyncRequest (org.apache.cassandra.repair.messages.SyncRequest)6 UUID (java.util.UUID)2 InetAddressAndPort (org.apache.cassandra.locator.InetAddressAndPort)2 ActiveRepairService (org.apache.cassandra.service.ActiveRepairService)2 StreamPlan (org.apache.cassandra.streaming.StreamPlan)2 Test (org.junit.Test)2 InetAddress (java.net.InetAddress)1 RepairMessage (org.apache.cassandra.repair.messages.RepairMessage)1