MAPREDUCE-6945. TestMapFileOutputFormat missing @after annotation. Contributed by Ajay Kumar
This commit is contained in:
parent
077a5eed9f
commit
ae7abad3d9
@ -24,6 +24,7 @@
|
|||||||
import org.apache.hadoop.io.Writable;
|
import org.apache.hadoop.io.Writable;
|
||||||
import org.apache.hadoop.io.WritableComparable;
|
import org.apache.hadoop.io.WritableComparable;
|
||||||
import org.apache.hadoop.io.MapFile.Reader;
|
import org.apache.hadoop.io.MapFile.Reader;
|
||||||
|
import org.junit.After;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.mockito.Mockito;
|
import org.mockito.Mockito;
|
||||||
|
|
||||||
@ -40,9 +41,10 @@ public void testPartitionerShouldNotBeCalledWhenOneReducerIsPresent()
|
|||||||
assertTrue(!MyPartitioner.isGetPartitionCalled());
|
assertTrue(!MyPartitioner.isGetPartitionCalled());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void tearDown() throws Exception {
|
@After
|
||||||
|
public void tearDown() throws Exception {
|
||||||
MyPartitioner.setGetPartitionCalled(false);
|
MyPartitioner.setGetPartitionCalled(false);
|
||||||
};
|
}
|
||||||
private static class MyPartitioner
|
private static class MyPartitioner
|
||||||
implements
|
implements
|
||||||
Partitioner<WritableComparable, Writable> {
|
Partitioner<WritableComparable, Writable> {
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
import org.apache.hadoop.io.WritableComparable;
|
import org.apache.hadoop.io.WritableComparable;
|
||||||
import org.apache.hadoop.io.MapFile.Reader;
|
import org.apache.hadoop.io.MapFile.Reader;
|
||||||
import org.apache.hadoop.mapreduce.Partitioner;
|
import org.apache.hadoop.mapreduce.Partitioner;
|
||||||
|
import org.junit.After;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.mockito.Mockito;
|
import org.mockito.Mockito;
|
||||||
|
|
||||||
@ -41,6 +42,7 @@ public void testPartitionerShouldNotBeCalledWhenOneReducerIsPresent()
|
|||||||
assertTrue(!MyPartitioner.isGetPartitionCalled());
|
assertTrue(!MyPartitioner.isGetPartitionCalled());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@After
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
MyPartitioner.setGetPartitionCalled(false);
|
MyPartitioner.setGetPartitionCalled(false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user