Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dataSourceProperties from the result set of ShowStorageUnitExecutor #28764

Merged
merged 3 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ public Collection<LocalDataQueryResultRow> getRows(final ShardingSphereDatabase
Collection<LocalDataQueryResultRow> result = new LinkedList<>();
for (Entry<String, StorageUnit> entry : getToBeShownStorageUnits(database, sqlStatement).entrySet()) {
ConnectionProperties connectionProps = entry.getValue().getConnectionProperties();
DataSourcePoolProperties dataSourcePoolProperties = getDataSourcePoolProperties(entry.getValue());
Map<String, Object> poolProps = dataSourcePoolProperties.getPoolPropertySynonyms().getStandardProperties();
Map<String, Object> customProps = getCustomProperties(dataSourcePoolProperties.getCustomProperties().getProperties(), connectionProps.getQueryProperties());
DataSourcePoolProperties dataSourcePoolProps = getDataSourcePoolProperties(entry.getValue());
Map<String, Object> poolProps = dataSourcePoolProps.getPoolPropertySynonyms().getStandardProperties();
Map<String, Object> customProps = getCustomProperties(dataSourcePoolProps.getCustomProperties().getProperties(), connectionProps.getQueryProperties());
result.add(new LocalDataQueryResultRow(entry.getKey(),
entry.getValue().getStorageType().getType(),
connectionProps.getHostname(),
Expand Down Expand Up @@ -109,6 +109,7 @@ private DataSourcePoolProperties getDataSourcePoolProperties(final StorageUnit s

private Map<String, Object> getCustomProperties(final Map<String, Object> customProps, final Properties queryProps) {
Map<String, Object> result = new LinkedHashMap<>(customProps);
result.remove("dataSourceProperties");
if (!queryProps.isEmpty()) {
result.put("queryProperties", queryProps);
}
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
<column name="read_only" />
<column name="other_attributes" />
</metadata>
<row values="ds_0| openGauss| opengauss.db.host| 5432| db_0| 30000| 60000| 1800000| 50| 2| false| &#123;&quot;dataSourceProperties&quot;&#58;&#123;&#125;&#44;&quot;healthCheckProperties&quot;&#58;&#123;&#125;&#44;&quot;initializationFailTimeout&quot;&#58;1&#44;&quot;validationTimeout&quot;&#58;5000&#44;&quot;keepaliveTime&quot;&#58;0&#44;&quot;leakDetectionThreshold&quot;&#58;0&#44;&quot;registerMbeans&quot;&#58;false&#44;&quot;allowPoolSuspension&quot;&#58;false&#44;&quot;autoCommit&quot;&#58;true&#44;&quot;isolateInternalQueries&quot;&#58;false&#125;" />
<row values="ds_1| openGauss| opengauss.db.host| 5432| db_1| 30000| 60000| 1800000| 50| 2| false| &#123;&quot;dataSourceProperties&quot;&#58;&#123;&#125;&#44;&quot;healthCheckProperties&quot;&#58;&#123;&#125;&#44;&quot;initializationFailTimeout&quot;&#58;1&#44;&quot;validationTimeout&quot;&#58;5000&#44;&quot;keepaliveTime&quot;&#58;0&#44;&quot;leakDetectionThreshold&quot;&#58;0&#44;&quot;registerMbeans&quot;&#58;false&#44;&quot;allowPoolSuspension&quot;&#58;false&#44;&quot;autoCommit&quot;&#58;true&#44;&quot;isolateInternalQueries&quot;&#58;false&#125;" />
<row values="ds_2| openGauss| opengauss.db.host| 5432| db_2| 30000| 60000| 1800000| 50| 2| false| &#123;&quot;dataSourceProperties&quot;&#58;&#123;&#125;&#44;&quot;healthCheckProperties&quot;&#58;&#123;&#125;&#44;&quot;initializationFailTimeout&quot;&#58;1&#44;&quot;validationTimeout&quot;&#58;5000&#44;&quot;keepaliveTime&quot;&#58;0&#44;&quot;leakDetectionThreshold&quot;&#58;0&#44;&quot;registerMbeans&quot;&#58;false&#44;&quot;allowPoolSuspension&quot;&#58;false&#44;&quot;autoCommit&quot;&#58;true&#44;&quot;isolateInternalQueries&quot;&#58;false&#125;" />
<row values="ds_3| openGauss| opengauss.db.host| 5432| db_3| 30000| 60000| 1800000| 50| 2| false| &#123;&quot;dataSourceProperties&quot;&#58;&#123;&#125;&#44;&quot;healthCheckProperties&quot;&#58;&#123;&#125;&#44;&quot;initializationFailTimeout&quot;&#58;1&#44;&quot;validationTimeout&quot;&#58;5000&#44;&quot;keepaliveTime&quot;&#58;0&#44;&quot;leakDetectionThreshold&quot;&#58;0&#44;&quot;registerMbeans&quot;&#58;false&#44;&quot;allowPoolSuspension&quot;&#58;false&#44;&quot;autoCommit&quot;&#58;true&#44;&quot;isolateInternalQueries&quot;&#58;false&#125;" />
<row values="ds_4| openGauss| opengauss.db.host| 5432| db_4| 30000| 60000| 1800000| 50| 2| false| &#123;&quot;dataSourceProperties&quot;&#58;&#123;&#125;&#44;&quot;healthCheckProperties&quot;&#58;&#123;&#125;&#44;&quot;initializationFailTimeout&quot;&#58;1&#44;&quot;validationTimeout&quot;&#58;5000&#44;&quot;keepaliveTime&quot;&#58;0&#44;&quot;leakDetectionThreshold&quot;&#58;0&#44;&quot;registerMbeans&quot;&#58;false&#44;&quot;allowPoolSuspension&quot;&#58;false&#44;&quot;autoCommit&quot;&#58;true&#44;&quot;isolateInternalQueries&quot;&#58;false&#125;" />
<row values="ds_5| openGauss| opengauss.db.host| 5432| db_5| 30000| 60000| 1800000| 50| 2| false| &#123;&quot;dataSourceProperties&quot;&#58;&#123;&#125;&#44;&quot;healthCheckProperties&quot;&#58;&#123;&#125;&#44;&quot;initializationFailTimeout&quot;&#58;1&#44;&quot;validationTimeout&quot;&#58;5000&#44;&quot;keepaliveTime&quot;&#58;0&#44;&quot;leakDetectionThreshold&quot;&#58;0&#44;&quot;registerMbeans&quot;&#58;false&#44;&quot;allowPoolSuspension&quot;&#58;false&#44;&quot;autoCommit&quot;&#58;true&#44;&quot;isolateInternalQueries&quot;&#58;false&#125;" />
<row values="ds_6| openGauss| opengauss.db.host| 5432| db_6| 30000| 60000| 1800000| 50| 2| false| &#123;&quot;dataSourceProperties&quot;&#58;&#123;&#125;&#44;&quot;healthCheckProperties&quot;&#58;&#123;&#125;&#44;&quot;initializationFailTimeout&quot;&#58;1&#44;&quot;validationTimeout&quot;&#58;5000&#44;&quot;keepaliveTime&quot;&#58;0&#44;&quot;leakDetectionThreshold&quot;&#58;0&#44;&quot;registerMbeans&quot;&#58;false&#44;&quot;allowPoolSuspension&quot;&#58;false&#44;&quot;autoCommit&quot;&#58;true&#44;&quot;isolateInternalQueries&quot;&#58;false&#125;" />
<row values="ds_7| openGauss| opengauss.db.host| 5432| db_7| 30000| 60000| 1800000| 50| 2| false| &#123;&quot;dataSourceProperties&quot;&#58;&#123;&#125;&#44;&quot;healthCheckProperties&quot;&#58;&#123;&#125;&#44;&quot;initializationFailTimeout&quot;&#58;1&#44;&quot;validationTimeout&quot;&#58;5000&#44;&quot;keepaliveTime&quot;&#58;0&#44;&quot;leakDetectionThreshold&quot;&#58;0&#44;&quot;registerMbeans&quot;&#58;false&#44;&quot;allowPoolSuspension&quot;&#58;false&#44;&quot;autoCommit&quot;&#58;true&#44;&quot;isolateInternalQueries&quot;&#58;false&#125;" />
<row values="ds_8| openGauss| opengauss.db.host| 5432| db_8| 30000| 60000| 1800000| 50| 2| false| &#123;&quot;dataSourceProperties&quot;&#58;&#123;&#125;&#44;&quot;healthCheckProperties&quot;&#58;&#123;&#125;&#44;&quot;initializationFailTimeout&quot;&#58;1&#44;&quot;validationTimeout&quot;&#58;5000&#44;&quot;keepaliveTime&quot;&#58;0&#44;&quot;leakDetectionThreshold&quot;&#58;0&#44;&quot;registerMbeans&quot;&#58;false&#44;&quot;allowPoolSuspension&quot;&#58;false&#44;&quot;autoCommit&quot;&#58;true&#44;&quot;isolateInternalQueries&quot;&#58;false&#125;" />
<row values="ds_9| openGauss| opengauss.db.host| 5432| db_9| 30000| 60000| 1800000| 50| 2| false| &#123;&quot;dataSourceProperties&quot;&#58;&#123;&#125;&#44;&quot;healthCheckProperties&quot;&#58;&#123;&#125;&#44;&quot;initializationFailTimeout&quot;&#58;1&#44;&quot;validationTimeout&quot;&#58;5000&#44;&quot;keepaliveTime&quot;&#58;0&#44;&quot;leakDetectionThreshold&quot;&#58;0&#44;&quot;registerMbeans&quot;&#58;false&#44;&quot;allowPoolSuspension&quot;&#58;false&#44;&quot;autoCommit&quot;&#58;true&#44;&quot;isolateInternalQueries&quot;&#58;false&#125;" />
<row values="ds_0| openGauss| opengauss.db.host| 5432| db_0| 30000| 60000| 1800000| 50| 2| false| &#123;&quot;healthCheckProperties&quot;&#58;&#123;&#125;&#44;&quot;initializationFailTimeout&quot;&#58;1&#44;&quot;validationTimeout&quot;&#58;5000&#44;&quot;keepaliveTime&quot;&#58;0&#44;&quot;leakDetectionThreshold&quot;&#58;0&#44;&quot;registerMbeans&quot;&#58;false&#44;&quot;allowPoolSuspension&quot;&#58;false&#44;&quot;autoCommit&quot;&#58;true&#44;&quot;isolateInternalQueries&quot;&#58;false&#125;" />
<row values="ds_1| openGauss| opengauss.db.host| 5432| db_1| 30000| 60000| 1800000| 50| 2| false| &#123;&quot;healthCheckProperties&quot;&#58;&#123;&#125;&#44;&quot;initializationFailTimeout&quot;&#58;1&#44;&quot;validationTimeout&quot;&#58;5000&#44;&quot;keepaliveTime&quot;&#58;0&#44;&quot;leakDetectionThreshold&quot;&#58;0&#44;&quot;registerMbeans&quot;&#58;false&#44;&quot;allowPoolSuspension&quot;&#58;false&#44;&quot;autoCommit&quot;&#58;true&#44;&quot;isolateInternalQueries&quot;&#58;false&#125;" />
<row values="ds_2| openGauss| opengauss.db.host| 5432| db_2| 30000| 60000| 1800000| 50| 2| false| &#123;&quot;healthCheckProperties&quot;&#58;&#123;&#125;&#44;&quot;initializationFailTimeout&quot;&#58;1&#44;&quot;validationTimeout&quot;&#58;5000&#44;&quot;keepaliveTime&quot;&#58;0&#44;&quot;leakDetectionThreshold&quot;&#58;0&#44;&quot;registerMbeans&quot;&#58;false&#44;&quot;allowPoolSuspension&quot;&#58;false&#44;&quot;autoCommit&quot;&#58;true&#44;&quot;isolateInternalQueries&quot;&#58;false&#125;" />
<row values="ds_3| openGauss| opengauss.db.host| 5432| db_3| 30000| 60000| 1800000| 50| 2| false| &#123;&quot;healthCheckProperties&quot;&#58;&#123;&#125;&#44;&quot;initializationFailTimeout&quot;&#58;1&#44;&quot;validationTimeout&quot;&#58;5000&#44;&quot;keepaliveTime&quot;&#58;0&#44;&quot;leakDetectionThreshold&quot;&#58;0&#44;&quot;registerMbeans&quot;&#58;false&#44;&quot;allowPoolSuspension&quot;&#58;false&#44;&quot;autoCommit&quot;&#58;true&#44;&quot;isolateInternalQueries&quot;&#58;false&#125;" />
<row values="ds_4| openGauss| opengauss.db.host| 5432| db_4| 30000| 60000| 1800000| 50| 2| false| &#123;&quot;healthCheckProperties&quot;&#58;&#123;&#125;&#44;&quot;initializationFailTimeout&quot;&#58;1&#44;&quot;validationTimeout&quot;&#58;5000&#44;&quot;keepaliveTime&quot;&#58;0&#44;&quot;leakDetectionThreshold&quot;&#58;0&#44;&quot;registerMbeans&quot;&#58;false&#44;&quot;allowPoolSuspension&quot;&#58;false&#44;&quot;autoCommit&quot;&#58;true&#44;&quot;isolateInternalQueries&quot;&#58;false&#125;" />
<row values="ds_5| openGauss| opengauss.db.host| 5432| db_5| 30000| 60000| 1800000| 50| 2| false| &#123;&quot;healthCheckProperties&quot;&#58;&#123;&#125;&#44;&quot;initializationFailTimeout&quot;&#58;1&#44;&quot;validationTimeout&quot;&#58;5000&#44;&quot;keepaliveTime&quot;&#58;0&#44;&quot;leakDetectionThreshold&quot;&#58;0&#44;&quot;registerMbeans&quot;&#58;false&#44;&quot;allowPoolSuspension&quot;&#58;false&#44;&quot;autoCommit&quot;&#58;true&#44;&quot;isolateInternalQueries&quot;&#58;false&#125;" />
<row values="ds_6| openGauss| opengauss.db.host| 5432| db_6| 30000| 60000| 1800000| 50| 2| false| &#123;&quot;healthCheckProperties&quot;&#58;&#123;&#125;&#44;&quot;initializationFailTimeout&quot;&#58;1&#44;&quot;validationTimeout&quot;&#58;5000&#44;&quot;keepaliveTime&quot;&#58;0&#44;&quot;leakDetectionThreshold&quot;&#58;0&#44;&quot;registerMbeans&quot;&#58;false&#44;&quot;allowPoolSuspension&quot;&#58;false&#44;&quot;autoCommit&quot;&#58;true&#44;&quot;isolateInternalQueries&quot;&#58;false&#125;" />
<row values="ds_7| openGauss| opengauss.db.host| 5432| db_7| 30000| 60000| 1800000| 50| 2| false| &#123;&quot;healthCheckProperties&quot;&#58;&#123;&#125;&#44;&quot;initializationFailTimeout&quot;&#58;1&#44;&quot;validationTimeout&quot;&#58;5000&#44;&quot;keepaliveTime&quot;&#58;0&#44;&quot;leakDetectionThreshold&quot;&#58;0&#44;&quot;registerMbeans&quot;&#58;false&#44;&quot;allowPoolSuspension&quot;&#58;false&#44;&quot;autoCommit&quot;&#58;true&#44;&quot;isolateInternalQueries&quot;&#58;false&#125;" />
<row values="ds_8| openGauss| opengauss.db.host| 5432| db_8| 30000| 60000| 1800000| 50| 2| false| &#123;&quot;healthCheckProperties&quot;&#58;&#123;&#125;&#44;&quot;initializationFailTimeout&quot;&#58;1&#44;&quot;validationTimeout&quot;&#58;5000&#44;&quot;keepaliveTime&quot;&#58;0&#44;&quot;leakDetectionThreshold&quot;&#58;0&#44;&quot;registerMbeans&quot;&#58;false&#44;&quot;allowPoolSuspension&quot;&#58;false&#44;&quot;autoCommit&quot;&#58;true&#44;&quot;isolateInternalQueries&quot;&#58;false&#125;" />
<row values="ds_9| openGauss| opengauss.db.host| 5432| db_9| 30000| 60000| 1800000| 50| 2| false| &#123;&quot;healthCheckProperties&quot;&#58;&#123;&#125;&#44;&quot;initializationFailTimeout&quot;&#58;1&#44;&quot;validationTimeout&quot;&#58;5000&#44;&quot;keepaliveTime&quot;&#58;0&#44;&quot;leakDetectionThreshold&quot;&#58;0&#44;&quot;registerMbeans&quot;&#58;false&#44;&quot;allowPoolSuspension&quot;&#58;false&#44;&quot;autoCommit&quot;&#58;true&#44;&quot;isolateInternalQueries&quot;&#58;false&#125;" />
</dataset>
Loading