Github user kkhatua commented on a diff in the pull request:

    https://github.com/apache/drill/pull/827#discussion_r115564261
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/store/EphemeralPersistentStore.java
 ---
    @@ -15,28 +15,42 @@
      * See the License for the specific language governing permissions and
      * limitations under the License.
      */
    -package org.apache.drill.exec.testing.store;
    +package org.apache.drill.exec.store.sys.store;
     
     import java.util.Iterator;
     import java.util.Map;
     import java.util.concurrent.ConcurrentMap;
    +import java.util.concurrent.ConcurrentSkipListMap;
    +import java.util.concurrent.atomic.AtomicInteger;
     import java.util.concurrent.locks.ReadWriteLock;
     import java.util.concurrent.locks.ReentrantReadWriteLock;
     
    -import com.google.common.collect.Iterables;
    -import com.google.common.collect.Maps;
     import org.apache.drill.common.concurrent.AutoCloseableLock;
    +import org.apache.drill.exec.exception.StoreException;
     import org.apache.drill.exec.exception.VersionMismatchException;
     import org.apache.drill.exec.store.sys.BasePersistentStore;
    +import org.apache.drill.exec.store.sys.PersistentStoreConfig;
     import org.apache.drill.exec.store.sys.PersistentStoreMode;
    -import org.apache.drill.exec.store.sys.store.DataChangeVersion;
     
    -public class NoWriteLocalStore<V> extends BasePersistentStore<V> {
    +import com.google.common.collect.Iterables;
    +
    +public class EphemeralPersistentStore<V> extends BasePersistentStore<V> {
    +  private static final org.slf4j.Logger logger = 
org.slf4j.LoggerFactory.getLogger(EphemeralPersistentStore.class);
    +
       private final ReadWriteLock readWriteLock = new ReentrantReadWriteLock();
       private final AutoCloseableLock readLock = new 
AutoCloseableLock(readWriteLock.readLock());
       private final AutoCloseableLock writeLock = new 
AutoCloseableLock(readWriteLock.writeLock());
    -  private final ConcurrentMap<String, V> store = Maps.newConcurrentMap();
    +  private ConcurrentMap<String, V> store;
       private int version = -1;
    +  private int maxCapacity;
    +  private AtomicInteger currentSize = new AtomicInteger();
    +
    +  public EphemeralPersistentStore(final PersistentStoreConfig<V> config, 
int capacity) throws StoreException {
    --- End diff --
    
    That's true. Originally, I thought I might need it. Left it as is, assuming 
that future enhancements would not change the signature. 
    I'll remove it.
    👍 


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to