Class InMemoryMapIT


  • public class InMemoryMapIT
    extends Object
    Integration Test for https://issues.apache.org/jira/browse/ACCUMULO-4148

    User 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 Detail

      • tempFolder

        public org.junit.rules.TemporaryFolder tempFolder
    • Constructor Detail

      • InMemoryMapIT

        public InMemoryMapIT()
    • Method Detail

      • ensureNativeLibrary

        public static void ensureNativeLibrary()
      • getServerContext

        public static ServerContext getServerContext()
      • testOneMutationOneKey

        public void testOneMutationOneKey()
      • testOneMutationManyKeys

        public void testOneMutationManyKeys()
      • testOneMutationManySameKeys

        public void testOneMutationManySameKeys()
      • testMultipleMutationsOneKey

        public void testMultipleMutationsOneKey()
      • testMultipleMutationsSameOneKey

        public void testMultipleMutationsSameOneKey()
      • testMutlipleMutationsMultipleKeys

        public void testMutlipleMutationsMultipleKeys()
      • testMultipleMutationsMultipleSameKeys

        public void testMultipleMutationsMultipleSameKeys()
      • testMultipleMutationsMultipleKeysSomeSame

        public void testMultipleMutationsMultipleKeysSomeSame()