You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ji...@apache.org on 2019/11/04 03:10:07 UTC
[incubator-iotdb] branch master updated: [IOTDB-192] cut
CHUNK_METADATA_CACHE_SIZE and replace LRUCache with initialCapacity (#510)
This is an automated email from the ASF dual-hosted git repository.
jiangtian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 3978ddc [IOTDB-192] cut CHUNK_METADATA_CACHE_SIZE and replace LRUCache with initialCapacity (#510)
3978ddc is described below
commit 3978ddc222c7aa174bfcffcf3fea6b7f7fc51a94
Author: Dawei Liu <13...@qq.com>
AuthorDate: Mon Nov 4 11:10:02 2019 +0800
[IOTDB-192] cut CHUNK_METADATA_CACHE_SIZE and replace LRUCache with initialCapacity (#510)
---
tsfile/src/main/java/org/apache/iotdb/tsfile/common/cache/LRUCache.java | 2 +-
.../apache/iotdb/tsfile/read/controller/MetadataQuerierByFileImpl.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/common/cache/LRUCache.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/common/cache/LRUCache.java
index bb9f2f8..e8438db 100644
--- a/tsfile/src/main/java/org/apache/iotdb/tsfile/common/cache/LRUCache.java
+++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/common/cache/LRUCache.java
@@ -32,7 +32,7 @@ public abstract class LRUCache<K, T> implements Cache<K, T> {
public LRUCache(int cacheSize) {
this.cacheSize = cacheSize;
- this.cache = new LinkedHashMap<>();
+ this.cache = new LinkedHashMap<>(cacheSize);
}
@Override
diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/read/controller/MetadataQuerierByFileImpl.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/controller/MetadataQuerierByFileImpl.java
index 5d6c06d..4ff9fca 100644
--- a/tsfile/src/main/java/org/apache/iotdb/tsfile/read/controller/MetadataQuerierByFileImpl.java
+++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/controller/MetadataQuerierByFileImpl.java
@@ -32,7 +32,7 @@ import java.util.*;
public class MetadataQuerierByFileImpl implements IMetadataQuerier {
- private static final int CHUNK_METADATA_CACHE_SIZE = 100000;
+ private static final int CHUNK_METADATA_CACHE_SIZE = 10000;
private TsFileMetaData fileMetaData;