kunal642 commented on a change in pull request #3177: [CARBONDATA-3337][CARBONDATA-3306] Distributed index server
URL:
https://github.com/apache/carbondata/pull/3177#discussion_r281009286
##########
File path: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/cache/CarbonShowCacheCommand.scala
##########
@@ -153,14 +153,20 @@ case class CarbonShowCacheCommand(tableIdentifier: Option[TableIdentifier],
OperationListenerBus.getInstance.fireEvent(showTableCacheEvent, operationContext)
// Get all Index files for the specified table in cache
- val indexFilesInCache: List[String] = allIndexFiles.filter {
- indexFile =>
- cache.get(indexFile) != null
+ val (indexFilesLength, size) = if (CarbonProperties.getInstance()
+ .isDistributedPruningEnabled(carbonTable.getDatabaseName, carbonTable.getTableName)) {
+ getTableCache(carbonTable.getTableUniqueName)
+ } else {
+ val indexFilesInCache: List[String] = allIndexFiles.filter {
+ indexFile =>
+ cache.get(indexFile) != null
+ }
+ val sizeOfIndexFilesInCache: Long = indexFilesInCache.map {
+ indexFile =>
+ cache.get(indexFile).getMemorySize
+ }.sum
Review comment:
done
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[hidden email]
With regards,
Apache Git Services