accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From keith-turner <...@git.apache.org>
Subject [GitHub] accumulo pull request: 4148 inmemorymap counter
Date Tue, 22 Mar 2016 14:46:23 GMT
Github user keith-turner commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/82#discussion_r56998269
  
    --- Diff: test/src/test/java/org/apache/accumulo/test/InMemoryMapIT.java ---
    @@ -0,0 +1,320 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.accumulo.test;
    +
    +import com.google.common.collect.ImmutableSet;
    +import java.io.File;
    +import java.io.FileNotFoundException;
    +import java.io.IOException;
    +import java.util.ArrayList;
    +import java.util.Arrays;
    +import java.util.Collections;
    +import java.util.HashMap;
    +import java.util.HashSet;
    +import java.util.List;
    +import java.util.Map;
    +import java.util.Set;
    +import java.util.logging.Level;
    +import org.apache.accumulo.core.data.ArrayByteSequence;
    +import org.apache.accumulo.core.data.ByteSequence;
    +import org.apache.accumulo.core.data.Key;
    +import org.apache.accumulo.core.data.Mutation;
    +import org.apache.accumulo.core.data.Range;
    +import org.apache.accumulo.core.data.Value;
    +import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
    +import org.apache.accumulo.test.functional.NativeMapIT;
    +import org.apache.accumulo.tserver.InMemoryMap;
    +import org.apache.accumulo.tserver.MemKey;
    +import org.apache.accumulo.tserver.NativeMap;
    +import org.apache.hadoop.io.Text;
    +import static org.junit.Assert.assertEquals;
    +import static org.junit.Assert.fail;
    +import org.junit.BeforeClass;
    +import org.junit.Rule;
    +import org.junit.Test;
    +import org.junit.rules.TemporaryFolder;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +/**
    + * Integration Test for https://issues.apache.org/jira/browse/ACCUMULO-4148
    + * <p>
    + * 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
    --- End diff --
    
    nice background


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message