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
Conversation
@electrum . Can you please review them ? |
There was a problem hiding this 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
640c7b1
to
984d2ed
Compare
0f0de10
to
9e0869a
Compare
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()) { |
There was a problem hiding this comment.
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.
@@ -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()) { |
There was a problem hiding this comment.
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());
There was a problem hiding this 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.
2bedf52
to
737f1a9
Compare
737f1a9
to
4945840
Compare
Datasources property in ServerConfig is depricated and has not been in use for quite
a long time.