Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jackylk committed Nov 9, 2018
1 parent 2d5579a commit 1ea2bae
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,12 @@ int getTableBlockSizeInMB() {
tableBlockSize = tableProperties.get(CarbonCommonConstants.TABLE_BLOCKSIZE);
}
if (null == tableBlockSize) {
tableBlockSize = CarbonCommonConstants.BLOCK_SIZE_DEFAULT_VAL;
tableBlockSize = CarbonCommonConstants.TABLE_BLOCK_SIZE_DEFAULT;
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(
"Table block size not specified for " + getTableUniqueName() +
". Therefore considering the default value " +
CarbonCommonConstants.BLOCK_SIZE_DEFAULT_VAL + " MB");
CarbonCommonConstants.TABLE_BLOCK_SIZE_DEFAULT + " MB");
}
}
return Integer.parseInt(tableBlockSize);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,25 +66,36 @@ private[sql] case class CarbonDescribeFormattedCommand(
"false"
}

val catalog = sparkSession.sessionState.catalog
val catalogTable = catalog.getTableMetadata(tblIdentifier)

//////////////////////////////////////////////////////////////////////////////
// Table Basic Information
//////////////////////////////////////////////////////////////////////////////
results ++= Seq(
("", "", ""),
("## Table Basic Information", "", ""),
("Path ", carbonTable.getTablePath, ""),
("## Detailed Table Information", "", ""),
("Database", catalogTable.database, ""),
("Table", catalogTable.identifier.table, ""),
("Owner", catalogTable.owner, ""),
("Created", new Date(catalogTable.createTime).toString, ""),
("Location ", carbonTable.getTablePath, ""),
("External", carbonTable.isExternalTable.toString, ""),
("Transactional", carbonTable.isTransactionalTable.toString, ""),
("Streaming", streaming, ""),
("Table Block Size ", carbonTable.getBlockSizeInMB + " MB", ""),
("Table Blocklet Size ", carbonTable.getBlockletSizeInMB + " MB", ""),
("Comment", tblProps.getOrElse(CarbonCommonConstants.TABLE_COMMENT, ""), ""),
("Bad Record Path", tblProps.getOrElse("bad_record_path", ""), ""),
("Min Input Per Node",
("Min Input Per Node Per Load",
Strings.formatSize(
tblProps.getOrElse(CarbonCommonConstants.CARBON_LOAD_MIN_SIZE_INMB,
CarbonCommonConstants.CARBON_LOAD_MIN_SIZE_INMB_DEFAULT).toFloat), ""),

//////////////////////////////////////////////////////////////////////////////
// Index Information
//////////////////////////////////////////////////////////////////////////////

("", "", ""),
("## Index Information", "", ""),
("Sort Scope", sortScope, ""),
Expand All @@ -99,7 +110,7 @@ private[sql] case class CarbonDescribeFormattedCommand(
)

//////////////////////////////////////////////////////////////////////////////
// Detailed Encoding Information
// Encoding Information
//////////////////////////////////////////////////////////////////////////////

results ++= Seq(
Expand Down Expand Up @@ -182,7 +193,7 @@ private[sql] case class CarbonDescribeFormattedCommand(
dataIndexSize.get(CarbonCommonConstants.CARBON_TOTAL_DATA_SIZE).floatValue()), ""),
("Table Index Size", Strings.formatSize(
dataIndexSize.get(CarbonCommonConstants.CARBON_TOTAL_INDEX_SIZE).floatValue()), ""),
("Last Update Time",
("Last Update",
new Date(dataIndexSize.get(CarbonCommonConstants.LAST_UPDATE_TIME)).toString, "")
)
} else {
Expand Down

0 comments on commit 1ea2bae

Please sign in to comment.