public void testCheckBlockLocations() throws IOException {
setupCluster();
try {
FakeExecutorService fakeBlockMover = new FakeExecutorService();
blockMover.executor = fakeBlockMover;
DatanodeInfo sourceLocations[] = new DatanodeInfo[] {
datanodes[0], datanodes[1], datanodes[2], // good
datanodes[0], datanodes[1], datanodes[1], // bad 1==1
datanodes[0], datanodes[1], datanodes[2], // good
datanodes[0], datanodes[1], datanodes[2], // bad 0==0 with parity
datanodes[0], datanodes[1] // bad 0==0 with parity
};
DatanodeInfo parityLocations[] = new DatanodeInfo[] {
datanodes[3], datanodes[4], // good
datanodes[3], datanodes[4], // good
datanodes[3], datanodes[3], // bad 3==3
datanodes[0], datanodes[4], // bad 0==0 with pairity
datanodes[0], datanodes[0] // bad 0==0 with parity