|
36 | 36 | import org.apache.doris.common.DdlException;
|
37 | 37 | import org.apache.doris.common.ErrorCode;
|
38 | 38 | import org.apache.doris.common.ErrorReport;
|
| 39 | +import org.apache.doris.common.FeConstants; |
39 | 40 | import org.apache.doris.common.PatternMatcher;
|
40 | 41 | import org.apache.doris.common.PatternMatcherWrapper;
|
41 | 42 | import org.apache.doris.common.UserException;
|
@@ -88,8 +89,6 @@ public class CatalogMgr implements Writable, GsonPostProcessable {
|
88 | 89 | public static final String METADATA_REFRESH_INTERVAL_SEC = "metadata_refresh_interval_sec";
|
89 | 90 | public static final String CATALOG_TYPE_PROP = "type";
|
90 | 91 |
|
91 |
| - private static final String YES = "yes"; |
92 |
| - |
93 | 92 | private final MonitoredReentrantReadWriteLock lock = new MonitoredReentrantReadWriteLock(true);
|
94 | 93 |
|
95 | 94 | @SerializedName(value = "idToCatalog")
|
@@ -384,12 +383,12 @@ public ShowResultSet showCatalogs(ShowCatalogStmt showStmt, String currentCtlg)
|
384 | 383 | row.add(name);
|
385 | 384 | row.add(catalog.getType());
|
386 | 385 | if (name.equals(currentCtlg)) {
|
387 |
| - row.add(YES); |
| 386 | + row.add("Yes"); |
388 | 387 | } else {
|
389 |
| - row.add(""); |
| 388 | + row.add("No"); |
390 | 389 | }
|
391 | 390 | Map<String, String> props = catalog.getProperties();
|
392 |
| - String createTime = props.getOrDefault(CreateCatalogStmt.CREATE_TIME_PROP, "UNRECORDED"); |
| 391 | + String createTime = props.getOrDefault(ExternalCatalog.CREATE_TIME, FeConstants.null_string); |
393 | 392 | row.add(createTime);
|
394 | 393 | row.add(TimeUtils.longToTimeString(catalog.getLastUpdateTime()));
|
395 | 394 | row.add(catalog.getComment());
|
@@ -450,7 +449,10 @@ public ShowResultSet showCreateCatalog(ShowCreateCatalogStmt showStmt) throws An
|
450 | 449 | }
|
451 | 450 | if (catalog.getProperties().size() > 0) {
|
452 | 451 | sb.append(" PROPERTIES (\n");
|
453 |
| - sb.append(new PrintableMap<>(catalog.getProperties(), "=", true, true, true, true)); |
| 452 | + PrintableMap<String, String> printableMap = new PrintableMap<>(catalog.getProperties(), "=", true, true, |
| 453 | + true, true); |
| 454 | + printableMap.setAdditionalHiddenKeys(ExternalCatalog.HIDDEN_PROPERTIES); |
| 455 | + sb.append(printableMap); |
454 | 456 | sb.append("\n);");
|
455 | 457 | }
|
456 | 458 |
|
|
0 commit comments