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 deprecated datasources config property #306

Merged
merged 1 commit into from Feb 26, 2019

Conversation

Praveen2112
Copy link
Member

Datasources property in ServerConfig is depricated and has not been in use for quite
a long time.

@cla-bot cla-bot bot added the cla-signed label Feb 25, 2019
@Praveen2112
Copy link
Member Author

@electrum . Can you please review them ?

Copy link
Member

@kokosing kokosing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are tests failures, would you please take a look:

ERROR]   TestResourceGroupDbIntegration.testMemoryFraction:28 » Creation Unable to crea...
[ERROR]   TestMemoryManager.testClusterPools:253->createQueryRunner:385 » Creation Unabl...
[ERROR]   TestMemoryManager.testNoLeak:216->testNoLeak:227->createQueryRunner:385 » Creation
[ERROR]   TestMemoryManager.testOutOfMemoryKiller:121->createQueryRunner:385 » Creation ...
[ERROR]   TestMemoryManager.testQueryMemoryPerNodeLimit:377->createQueryRunner:385 » Creation
[ERROR]   TestMemoryManager.testQueryTotalMemoryLimit:364->createQueryRunner:385 » Creation
[ERROR]   TestMemoryManager.testQueryUserMemoryLimit:351->createQueryRunner:385 » Creation
[ERROR]   TestMemoryManager.testReservedPoolDisabled:178->createQueryRunner:385 » Creation
[ERROR]   TestMemoryManager.testResourceOverCommit:94->createQueryRunner:385 » Creation ...
[ERROR]   TestAggregations>AbstractTestQueryFramework.init:84->lambda$new$0:23 » Creation
[ERROR]   TestGracefulShutdown.testCoordinatorShutdown:112 » Creation Unable to create i...
[ERROR]   TestGracefulShutdown.testShutdown:74 » Creation Unable to create injector, see...
[ERROR]   TestMetadataManager.setUp:57 » Creation Unable to create injector, see the fol...
[ERROR]   TestMetadataManager.tearDown:83 NullPointer
[ERROR]   TestMinWorkerRequirement.testInitializationTimeout:82 » Creation Unable to cre...
[ERROR]   TestMinWorkerRequirement.testInsufficientInitialWorkerNodes:34 » Creation Unab...
[ERROR]   TestMinWorkerRequirement.testInsufficientInitialWorkerNodesWithCoordinatorExcluded:48 » Creation
[ERROR]   TestMinWorkerRequirement.testInsufficientWorkerNodes:98 » Creation Unable to c...
[ERROR]   TestMinWorkerRequirement.testInsufficientWorkerNodesAfterDrop:131 » Creation U...
[ERROR]   TestMinWorkerRequirement.testInsufficientWorkerNodesWithCoordinatorExcluded:115 » Creation
[ERROR]   TestMinWorkerRequirement.testSufficientInitialWorkerNodes:61 » Creation Unable...
[ERROR]   TestOptimizeMixedDistinctAggregations>AbstractTestQueryFramework.init:84->lambda$new$0:25 » Creation
[ERROR]   TestQueryManager.setUp:48 » Creation Unable to create injector, see the follow...
[ERROR]   TestQueryManager.tearDown:54 NullPointer
[ERROR]   TestTpchDistributedStats.setup:45 » Creation Unable to create injector, see th...
[ERROR]   TestTpchDistributedStats.tearDown:56 NullPointer

@Praveen2112 Praveen2112 changed the title Remove depricated.datasources config property Remove depricated datasources config property Feb 25, 2019
@Praveen2112 Praveen2112 force-pushed the remove_datasources branch 3 times, most recently from 0f0de10 to 9e0869a Compare February 25, 2019 14:14
String property = nullToEmpty(announcement.getProperties().get("connectorIds"));
List<String> values = Splitter.on(',').trimResults().omitEmptyStrings().splitToList(property);
Set<String> connectorIds = new LinkedHashSet<>(values);
Set<String> connectorIds = new LinkedHashSet<>();

// automatically build connectorIds if not configured
if (connectorIds.isEmpty()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

connectorIds.isEmpty() is always true. Please try to remove connectorIds variable and optimize the if block.

@electrum electrum changed the title Remove depricated datasources config property Remove deprecated datasources config property Feb 25, 2019
@@ -183,9 +178,7 @@ private static void updateConnectorIds(Announcer announcer, CatalogManager metad
// build announcement with updated sources
ServiceAnnouncementBuilder builder = serviceAnnouncement(announcement.getType());
for (Map.Entry<String, String> entry : announcement.getProperties().entrySet()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can now replace this loop with

builder.addProperties(announcement.getProperties());

Copy link
Member

@electrum electrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few nits, otherwise looks good. Let's remove the commit description, since I don't think it provides any value over the title.

@Praveen2112 Praveen2112 force-pushed the remove_datasources branch 2 times, most recently from 2bedf52 to 737f1a9 Compare February 26, 2019 05:49
@Praveen2112
Copy link
Member Author

@electrum , @kokosing I have resolved those changes.

@electrum electrum merged commit 73f8c5a into trinodb:master Feb 26, 2019
@electrum electrum added this to the 304 milestone Feb 26, 2019
@electrum electrum mentioned this pull request Feb 26, 2019
6 tasks
@Praveen2112 Praveen2112 deleted the remove_datasources branch May 18, 2019 06:45
rice668 pushed a commit to rice668/trino that referenced this pull request Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants