/** * Method to clear out the dictionary cache. */ @Override public void clear() { CarbonUtil.clearDictionaryCache(dictionary); }
/** * to book keep the dictionary cache or update access count for each * column involved during decode, to facilitate LRU cache policy if memory * threshold is reached */ @Override public void close() { if (dictionaries == null) { return; } for (int i = 0; i < dictionaries.length; i++) { CarbonUtil.clearDictionaryCache(dictionaries[i]); } } }
/** * This method will clear the dictionary access count after its usage is complete so * that column can be deleted form LRU cache whenever memory reaches threshold */ private void clearDictionaryFromQueryModel() { if (null != queryModel) { Map<String, Dictionary> columnToDictionaryMapping = queryModel.getColumnToDictionaryMapping(); if (null != columnToDictionaryMapping) { for (Map.Entry<String, Dictionary> entry : columnToDictionaryMapping.entrySet()) { CarbonUtil.clearDictionaryCache(entry.getValue()); } } } }
/** * This method will clear the dictionary access count after its usage is complete so * that column can be deleted form LRU cache whenever memory reaches threshold */ private void clearDictionaryFromQueryModel() { if (null != queryModel) { Map<String, Dictionary> columnToDictionaryMapping = queryModel.getColumnToDictionaryMapping(); if (null != columnToDictionaryMapping) { for (Map.Entry<String, Dictionary> entry : columnToDictionaryMapping.entrySet()) { CarbonUtil.clearDictionaryCache(entry.getValue()); } } } } }
@Override public void close() throws IOException { if (vectorProxy != null) { logStatistics(rowCount, queryModel.getStatisticsRecorder()); vectorProxy.close(); vectorProxy = null; } // clear dictionary cache Map<String, Dictionary> columnToDictionaryMapping = queryModel.getColumnToDictionaryMapping(); if (null != columnToDictionaryMapping) { for (Map.Entry<String, Dictionary> entry : columnToDictionaryMapping.entrySet()) { CarbonUtil.clearDictionaryCache(entry.getValue()); } } try { queryExecutor.finish(); } catch (QueryExecutionException e) { throw new IOException(e); } }
CarbonUtil.clearDictionaryCache(forwardDictionary);
@Override public void close() throws IOException { logStatistics(rowCount, queryModel.getStatisticsRecorder()); // clear dictionary cache Map<String, Dictionary> columnToDictionaryMapping = queryModel.getColumnToDictionaryMapping(); if (null != columnToDictionaryMapping) { for (Map.Entry<String, Dictionary> entry : columnToDictionaryMapping.entrySet()) { CarbonUtil.clearDictionaryCache(entry.getValue()); } } if (!skipClearDataMapAtClose) { // Clear the datamap cache DataMapStoreManager.getInstance().clearDataMaps( queryModel.getTable().getAbsoluteTableIdentifier()); } // close read support readSupport.close(); carbonIterator.close(); try { queryExecutor.finish(); } catch (QueryExecutionException e) { throw new IOException(e); } }
CarbonUtil.clearDictionaryCache(dictionary);
CarbonUtil.clearDictionaryCache(forwardDictionary);