Class InMemoryMapIT
- java.lang.Object
-
- org.apache.accumulo.test.InMemoryMapIT
-
public class InMemoryMapIT extends Object
Integration Test for https://issues.apache.org/jira/browse/ACCUMULO-4148User had problem writing one Mutation with multiple KV pairs that had the same key. Doing so should write out all pairs in all mutations with a unique id. In typical operation, you would only see the last one when scanning. User had a combiner on the table, and they noticed that when using InMemoryMap with NativeMapWrapper, only the last KV pair was ever written. When InMemoryMap used DefaultMap, all KV pairs were added and the behavior worked as expected. This IT inserts a variety of Mutations with and without the same KV pairs and then inspects result of InMemoryMap mutate, looking for unique id stored with each key. This unique id, shown as mc= in the MemKey toString, was originally used for scan Isolation. Writing the same key multiple times in the same mutation is a secondary use case, discussed in https://issues.apache.org/jira/browse/ACCUMULO-227. In addition to NativeMapWrapper and DefaultMap, LocalityGroupMap was add in https://issues.apache.org/jira/browse/ACCUMULO-112. This test has to be an IT in accumulo-test, because libaccumulo is built in 'integration-test' phase of accumulo-native, which currently runs right before accumulo-test. The tests for DefaultMap could move to a unit test in tserver, but they are here for convenience of viewing both at the same time.
-
-
Field Summary
Fields Modifier and Type Field Description org.junit.rules.TemporaryFolder
tempFolder
-
Constructor Summary
Constructors Constructor Description InMemoryMapIT()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
ensureNativeLibrary()
void
testMultipleMutationsMultipleKeysSomeSame()
void
testMultipleMutationsMultipleSameKeys()
void
testMultipleMutationsOneKey()
void
testMultipleMutationsSameOneKey()
void
testMutlipleMutationsMultipleKeys()
void
testOneMutationManyKeys()
void
testOneMutationManySameKeys()
void
testOneMutationOneKey()
-
-
-
Method Detail
-
ensureNativeLibrary
public static void ensureNativeLibrary() throws FileNotFoundException
- Throws:
FileNotFoundException
-
testOneMutationOneKey
public void testOneMutationOneKey()
-
testOneMutationManyKeys
public void testOneMutationManyKeys() throws IOException
- Throws:
IOException
-
testOneMutationManySameKeys
public void testOneMutationManySameKeys()
-
testMultipleMutationsOneKey
public void testMultipleMutationsOneKey()
-
testMultipleMutationsSameOneKey
public void testMultipleMutationsSameOneKey()
-
testMutlipleMutationsMultipleKeys
public void testMutlipleMutationsMultipleKeys()
-
testMultipleMutationsMultipleSameKeys
public void testMultipleMutationsMultipleSameKeys()
-
testMultipleMutationsMultipleKeysSomeSame
public void testMultipleMutationsMultipleKeysSomeSame()
-
-