[ 
https://issues.apache.org/jira/browse/DRILL-8504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17888420#comment-17888420
 ] 

ASF GitHub Bot commented on DRILL-8504:
---------------------------------------

cgivre commented on code in PR #2929:
URL: https://github.com/apache/drill/pull/2929#discussion_r1796043482


##########
contrib/storage-splunk/src/main/java/org/apache/drill/exec/store/splunk/SplunkSchema.java:
##########
@@ -38,19 +40,32 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.TimeUnit;
 
 public class SplunkSchema extends AbstractSchema {
   private final static Logger logger = 
LoggerFactory.getLogger(SplunkSchema.class);
   private static final String SPL_TABLE_NAME = "spl";
   private final Map<String, DynamicDrillTable> activeTables = new HashMap<>();
   private final SplunkStoragePlugin plugin;
   private final String queryUserName;
+  private final Cache<String, Set<String>> cache;
+  private final boolean useCache;
 
   public SplunkSchema(SplunkStoragePlugin plugin, String queryUserName) {
     super(Collections.emptyList(), plugin.getName());
     this.plugin = plugin;
     this.queryUserName = queryUserName;
-
+    this.useCache = plugin.getConfig().getCacheExpiration() >= 0;
+
+    if (useCache) {
+      logger.debug("Using splunk schema cache for {}", plugin.getName());

Review Comment:
   Done





> Add Schema Caching to Splunk Plugin
> -----------------------------------
>
>                 Key: DRILL-8504
>                 URL: https://issues.apache.org/jira/browse/DRILL-8504
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Storage - Splunk
>    Affects Versions: 1.21.2
>            Reporter: Charles Givre
>            Assignee: Charles Givre
>            Priority: Major
>             Fix For: 1.22.0
>
>
> See PR



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to