vikramahuja1001 commented on a change in pull request #3565: [CARBONDATA-3662]:
Changes to show metacache command
URL: https://github.com/apache/carbondata/pull/3565#discussion_r365180429
##########
File path:
integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/cache/CarbonShowCacheCommand.scala
##########
@@ -171,39 +252,33 @@ case class CarbonShowCacheCommand(tableIdentifier:
Option[TableIdentifier],
.toList)
if (driverRows.nonEmpty) {
(Seq(
- Row("ALL", "ALL", driverIndexSize, driverDatamapSize, allDictSize,
"DRIVER"),
- Row(currentDatabase,
- "ALL",
- driverdbIndexSize,
- driverdbDatamapSize,
- driverdbDictSize,
- "DRIVER")
+ Row("TOTAL", driverIndexSize, driverDatamapSize, allDictSize,
"DRIVER")
) ++ driverRows).collect {
- case row if row.getLong(2) != 0L || row.getLong(3) != 0L ||
row.getLong(4) != 0L =>
- Row(row(0), row(1), bytesToDisplaySize(row.getLong(2)),
- bytesToDisplaySize(row.getLong(3)),
bytesToDisplaySize(row.getLong(4)), "DRIVER")
+ case row if row.getLong(1) != 0L || row.getLong(2) != 0L ||
row.getLong(3) != 0L =>
+ Row(row(0), bytesToDisplaySize(row.getLong(1)),
+ bytesToDisplaySize(row.getLong(2)),
bytesToDisplaySize(row.getLong(3)), "DRIVER")
}
} else {
- makeEmptyCacheRows(currentDatabase)
+ makeEmptyCacheRows(currentDatabase, "DRIVER")
}
} else {
- makeEmptyCacheRows(currentDatabase)
+ makeEmptyCacheRows(currentDatabase, "DRIVER")
}
- // val (serverIndexSize, serverDataMapSize) =
getAllIndexServerCacheSize
- val indexDisplayRows = if (indexServerRows.nonEmpty) {
- (Seq(
- Row("ALL", "ALL", indexAllIndexSize, indexAllDatamapSize,
indexAllDictSize, "INDEX SERVER"),
- Row(currentDatabase,
- "ALL",
- indexdbIndexSize,
- indexdbDatamapSize,
- driverdbDictSize,
- "INDEX SERVER")
- ) ++ indexServerRows).collect {
- case row if row.getLong(2) != 0L || row.getLong(3) != 0L ||
row.getLong(4) != 0L =>
- Row(row.get(0), row.get(1), bytesToDisplaySize(row.getLong(2)),
- bytesToDisplaySize(row.getLong(3)),
bytesToDisplaySize(row.getLong(4)), "INDEX SERVER")
+ val indexDisplayRows = if (isDistributedPruningEnabled) {
+ if (indexServerRows.nonEmpty) {
+ (Seq(
+ Row("TOTAL", indexAllIndexSize, indexAllDatamapSize,
indexAllDictSize, "INDEX SERVER")
+ ) ++ indexServerRows).collect {
+ case row if row.getLong(1) != 0L || row.getLong(2) != 0L ||
row.getLong(3) != 0L =>
+ Row(row.get(0),
+ bytesToDisplaySize(row.getLong(1)),
+ bytesToDisplaySize(row.getLong(2)),
+ bytesToDisplaySize(row.getLong(3)),
+ "INDEX SERVER")
+ }
+ } else {
+ makeEmptyCacheRows(currentDatabase, "INDEXSERVER")
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:
[email protected]
With regards,
Apache Git Services