Class InMemoryMapIT
- java.lang.Object
-
- org.apache.accumulo.harness.WithTestNames
-
- org.apache.accumulo.test.InMemoryMapIT
-
@Tag("SunnyDay") public class InMemoryMapIT extends WithTestNames
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.
-
-
Constructor Summary
Constructors Constructor Description InMemoryMapIT()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
ensureNativeLibrary()
static ServerContext
getServerContext()
void
testMultipleMutationsMultipleKeysSomeSame()
void
testMultipleMutationsMultipleSameKeys()
void
testMultipleMutationsOneKey()
void
testMultipleMutationsSameOneKey()
void
testMutlipleMutationsMultipleKeys()
void
testOneMutationManyKeys()
void
testOneMutationManySameKeys()
void
testOneMutationOneKey()
-
Methods inherited from class org.apache.accumulo.harness.WithTestNames
setTestName, testName
-
-
-
-
Method Detail
-
ensureNativeLibrary
@BeforeAll public static void ensureNativeLibrary()
-
getServerContext
public static ServerContext getServerContext()
-
testOneMutationOneKey
@Test public void testOneMutationOneKey()
-
testOneMutationManyKeys
@Test public void testOneMutationManyKeys()
-
testOneMutationManySameKeys
@Test public void testOneMutationManySameKeys()
-
testMultipleMutationsOneKey
@Test public void testMultipleMutationsOneKey()
-
testMultipleMutationsSameOneKey
@Test public void testMultipleMutationsSameOneKey()
-
testMutlipleMutationsMultipleKeys
@Test public void testMutlipleMutationsMultipleKeys()
-
testMultipleMutationsMultipleSameKeys
@Test public void testMultipleMutationsMultipleSameKeys()
-
testMultipleMutationsMultipleKeysSomeSame
@Test public void testMultipleMutationsMultipleKeysSomeSame()
-
-