public Map<String, Long> getTTLInfoForUpgrading() {
    final List<String> databases = getDatabaseNames(false);
    final Map<String, Long> infoMap = new ConcurrentHashMap<>();
    for (final String database : databases) {
      try {
        final TDatabaseSchema databaseSchema = getDatabaseSchemaByName(database);
        final long ttl = databaseSchema.isSetTTL() ? databaseSchema.getTTL() : -1;
        if (ttl < 0 || ttl == Long.MAX_VALUE) {
          continue;
        }
        infoMap.put(database, ttl);
      } catch (final DatabaseNotExistsException e) {
        LOGGER.warn("Database: {} doesn't exist", databases, e);
      }
    }
    return infoMap;
  }
Only used in cluster tool show Databases.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/schema/ClusterSchemaManager.java