You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2018/10/11 10:01:02 UTC

[kylin] branch master updated: KYLIN-3597 fix sonar issue in RocksDBLookupTable

This is an automated email from the ASF dual-hosted git repository.

shaofengshi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kylin.git


The following commit(s) were added to refs/heads/master by this push:
     new e2c1e7e  KYLIN-3597 fix sonar issue in RocksDBLookupTable
e2c1e7e is described below

commit e2c1e7e7ef58ba7282f8b87de033567181546178
Author: shaofengshi <sh...@apache.org>
AuthorDate: Thu Oct 11 18:00:39 2018 +0800

    KYLIN-3597 fix sonar issue in RocksDBLookupTable
---
 .../java/org/apache/kylin/dict/lookup/cache/RocksDBLookupTable.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/core-dictionary/src/main/java/org/apache/kylin/dict/lookup/cache/RocksDBLookupTable.java b/core-dictionary/src/main/java/org/apache/kylin/dict/lookup/cache/RocksDBLookupTable.java
index 1ca83bc..80e327d 100644
--- a/core-dictionary/src/main/java/org/apache/kylin/dict/lookup/cache/RocksDBLookupTable.java
+++ b/core-dictionary/src/main/java/org/apache/kylin/dict/lookup/cache/RocksDBLookupTable.java
@@ -69,7 +69,7 @@ public class RocksDBLookupTable implements ILookupTable {
 
     @Override
     public Iterator<String[]> iterator() {
-        final RocksIterator rocksIterator = rocksDB.newIterator();
+        final RocksIterator rocksIterator = getRocksIterator();
         rocksIterator.seekToFirst();
 
         return new Iterator<String[]>() {
@@ -102,6 +102,10 @@ public class RocksDBLookupTable implements ILookupTable {
         };
     }
 
+    private RocksIterator getRocksIterator() {
+        return rocksDB.newIterator();
+    }
+
     @Override
     public void close() throws IOException {
         options.close();