Skip to content

Conversation

@xiangfu0
Copy link
Contributor

@xiangfu0 xiangfu0 commented Nov 8, 2025

add missing admin clients (logical table, cluster, query workload);
replace ControllerRequestClient usages where possible;
add pinot-java-client dep in Flink connector

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR migrates tests and connector code from the deprecated ControllerRequestClient to the newer PinotAdminClient. The migration adds missing admin client capabilities (logical table, cluster, query workload) and updates the Flink connector dependencies.

Key changes:

  • Added new admin client classes for logical tables, cluster operations, and query workloads
  • Updated integration tests to use PinotAdminClient instead of ControllerRequestClient
  • Modified Flink connector to depend on pinot-java-client instead of pinot-controller

Reviewed Changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/udf/IntegrationUdfTestCluster.java Replaced ControllerRequestClient calls with inherited methods from base class
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/logicaltable/BaseLogicalTableIntegrationTest.java Removed override of getControllerRequestClient() method
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/UrlAuthRealtimeIntegrationTest.java Migrated segment listing to use PinotAdminClient
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/SegmentGenerationMinionRealtimeIngestionTest.java Replaced direct schema addition call with inherited method
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/QueryWorkloadIntegrationTest.java Migrated query workload operations to PinotAdminClient
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/PartialUpsertTableRebalanceIntegrationTest.java Migrated pause/resume operations to PinotAdminClient
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/LLCRealtimeClusterIntegrationTest.java Migrated periodic task execution to PinotAdminClient
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/CursorIntegrationTest.java Replaced direct schema addition with inherited method
pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/ClusterTest.java Added PinotAdminClient integration and override methods for schema/table operations
pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/BaseClusterIntegrationTest.java Migrated segment reset and listing operations to PinotAdminClient
pinot-controller/src/test/java/org/apache/pinot/controller/helix/ControllerTest.java Migrated controller test methods to use PinotAdminClient for schema, table, and tenant operations
pinot-controller/pom.xml Added pinot-java-client test dependency
pinot-connectors/pinot-flink-connector/src/main/java/org/apache/pinot/connector/flink/http/PinotConnectionUtils.java Updated utility methods to use PinotAdminClient
pinot-connectors/pinot-flink-connector/src/main/java/org/apache/pinot/connector/flink/FlinkQuickStart.java Migrated example code to use PinotAdminClient
pinot-connectors/pinot-flink-connector/pom.xml Changed dependency from pinot-controller to pinot-java-client
pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/admin/PinotTableAdminClient.java Added methods for table operations (pause/resume consumption, pause status, external view, ideal state)
pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/admin/PinotSegmentAdminClient.java Added methods for segment operations (reload table, check reload needed, reload status)
pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/admin/PinotSchemaAdminClient.java Added typed getSchema() method returning Schema object
pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/admin/PinotQueryWorkloadAdminClient.java New admin client for query workload configuration operations
pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/admin/PinotLogicalTableAdminClient.java New admin client for logical table operations
pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/admin/PinotClusterAdminClient.java New admin client for cluster-level operations
pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/admin/PinotAdminTransport.java Added getScheme() accessor method
pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/admin/PinotAdminClient.java Added accessors for new admin clients and controller address/URL utilities

@xiangfu0 xiangfu0 force-pushed the feat/admin-client-migration branch from 23a912d to 310c7e7 Compare November 8, 2025 01:49
@codecov-commenter
Copy link

codecov-commenter commented Nov 8, 2025

❌ 62 Tests Failed:

Tests completed Failed Passed Skipped
8759 62 8697 128
View the top 3 failed test(s) by shortest run time
org.apache.pinot.controller.helix.HelixHelperTest::@BeforeClass setUp
Stack Traces | 0.006s run time
Sets differ: expected [DefaultTenant] but got [DefaultTenant, tag]
org.apache.pinot.controller.helix.HelixHelperTest::setUp
Stack Traces | 0.006s run time
Sets differ: expected [DefaultTenant] but got [DefaultTenant, tag]
org.apache.pinot.controller.api.PinotUpsertRestletResourceTest::@BeforeClass setUp
Stack Traces | 0.007s run time
Sets differ: expected [DefaultTenant] but got [DefaultTenant, tag]
org.apache.pinot.controller.api.PinotUpsertRestletResourceTest::setUp
Stack Traces | 0.007s run time
Sets differ: expected [DefaultTenant] but got [DefaultTenant, tag]
org.apache.pinot.controller.api.TableViewsTest::@BeforeClass setUp
Stack Traces | 0.007s run time
Sets differ: expected [DefaultTenant] but got [DefaultTenant, tag]
org.apache.pinot.controller.api.TableViewsTest::setUp
Stack Traces | 0.007s run time
Sets differ: expected [DefaultTenant] but got [DefaultTenant, tag]
org.apache.pinot.controller.helix.IdealStateGroupCommitTest::@BeforeClass setUp
Stack Traces | 0.007s run time
Sets differ: expected [DefaultTenant] but got [DefaultTenant, tag]
org.apache.pinot.controller.helix.IdealStateGroupCommitTest::setUp
Stack Traces | 0.007s run time
Sets differ: expected [DefaultTenant] but got [DefaultTenant, tag]
org.apache.pinot.controller.helix.PinotResourceManagerTest::@BeforeClass setUp
Stack Traces | 0.007s run time
Sets differ: expected [DefaultTenant] but got [DefaultTenant, tag]
org.apache.pinot.controller.helix.PinotResourceManagerTest::setUp
Stack Traces | 0.007s run time
Sets differ: expected [DefaultTenant] but got [DefaultTenant, tag]
org.apache.pinot.integration.tests.LLCRealtimeKafka3ClusterIntegrationTest::testSortedColumn
Stack Traces | 0.007s run time
HTTP request failed with status: 501, url: http://localhost:.../tables/mytable/aggregateMetadata?columns=Carrier, body: {"code":501,"error":"Table type : REALTIME not yet supported."}
org.apache.pinot.controller.api.PinotSchemaRestletResourceTest::@BeforeClass setUp
Stack Traces | 0.008s run time
Sets differ: expected [DefaultTenant] but got [DefaultTenant, tag]
org.apache.pinot.controller.api.PinotSchemaRestletResourceTest::setUp
Stack Traces | 0.008s run time
Sets differ: expected [DefaultTenant] but got [DefaultTenant, tag]
org.apache.pinot.controller.helix.ControllerSentinelTest::@BeforeClass setUp
Stack Traces | 0.008s run time
Sets differ: expected [DefaultTenant] but got [DefaultTenant, tag]
org.apache.pinot.controller.helix.ControllerSentinelTest::setUp
Stack Traces | 0.008s run time
Sets differ: expected [DefaultTenant] but got [DefaultTenant, tag]
org.apache.pinot.controller.helix.LogicalTableMetadataCacheTest::@BeforeClass setUp
Stack Traces | 0.008s run time
Sets differ: expected [DefaultTenant] but got [DefaultTenant, tag]
org.apache.pinot.controller.helix.LogicalTableMetadataCacheTest::setUp
Stack Traces | 0.008s run time
Sets differ: expected [DefaultTenant] but got [DefaultTenant, tag]
org.apache.pinot.controller.helix.TableCacheTest::@BeforeClass setUp
Stack Traces | 0.008s run time
Sets differ: expected [DefaultTenant] but got [DefaultTenant, tag]
org.apache.pinot.controller.helix.TableCacheTest::setUp
Stack Traces | 0.008s run time
Sets differ: expected [DefaultTenant] but got [DefaultTenant, tag]
org.apache.pinot.controller.helix.core.retention.SegmentLineageCleanupTest::@BeforeClass setUp
Stack Traces | 0.008s run time
Sets differ: expected [DefaultTenant] but got [DefaultTenant, tag]
org.apache.pinot.controller.helix.core.retention.SegmentLineageCleanupTest::setUp
Stack Traces | 0.008s run time
Sets differ: expected [DefaultTenant] but got [DefaultTenant, tag]
org.apache.pinot.controller.api.PinotTenantRestletResourceTest::@BeforeClass setUp
Stack Traces | 0.01s run time
Sets differ: expected [DefaultTenant] but got [DefaultTenant, tag]
org.apache.pinot.controller.api.PinotTenantRestletResourceTest::setUp
Stack Traces | 0.01s run time
Sets differ: expected [DefaultTenant] but got [DefaultTenant, tag]
org.apache.pinot.controller.helix.ControllerInstanceToggleTest::@BeforeClass setUp
Stack Traces | 0.01s run time
Sets differ: expected [DefaultTenant] but got [DefaultTenant, tag]
org.apache.pinot.controller.helix.ControllerInstanceToggleTest::setUp
Stack Traces | 0.01s run time
Sets differ: expected [DefaultTenant] but got [DefaultTenant, tag]
org.apache.pinot.controller.helix.ControllerTenantStatelessTest::testEmptyServerTenant
Stack Traces | 0.012s run time
Expected RuntimeException to be thrown, but PinotAdminNotFoundException was thrown
org.apache.pinot.controller.helix.ControllerTenantStatelessTest::testEmptyServerTenant
Stack Traces | 0.012s run time
Expected RuntimeException to be thrown, but PinotAdminNotFoundException was thrown
org.apache.pinot.controller.helix.ControllerTenantStatelessTest::testEmptyServerTenant
Stack Traces | 0.013s run time
Expected RuntimeException to be thrown, but PinotAdminNotFoundException was thrown
org.apache.pinot.integration.tests.LLCRealtimeClusterIntegrationTest::testSortedColumn
Stack Traces | 0.014s run time
HTTP request failed with status: 501, url: http://localhost:.../tables/mytable/aggregateMetadata?columns=Carrier, body: {"code":501,"error":"Table type : REALTIME not yet supported."}
org.apache.pinot.integration.tests.TlsIntegrationTest::tearDown
Stack Traces | 0.016s run time
org.apache.pinot.client.admin.PinotAdminAuthenticationException: Access forbidden: {"code":403,"error":"Permission is denied for DELETE '/tables/mytable_REALTIME' for table 'mytable_REALTIME'"}
org.apache.pinot.integration.tests.LLCRealtimeClusterIntegrationTest::testForceCommit
Stack Traces | 0.028s run time
Caught exception while checking the condition, error message: Error verifying force commit operation on table!
org.apache.pinot.integration.tests.LLCRealtimeKafka3ClusterIntegrationTest::testForceCommit
Stack Traces | 0.035s run time
Caught exception while checking the condition, error message: Error verifying force commit operation on table!
org.apache.pinot.controller.api.TableConfigsRestletResourceTest::testUpdateConfig
Stack Traces | 0.037s run time
Should fail for trying to PUT config before creating via POST
org.apache.pinot.controller.api.TableConfigsRestletResourceTest::testUpdateConfig
Stack Traces | 0.037s run time
Should fail for trying to PUT config before creating via POST
org.apache.pinot.controller.api.resources.ZookeeperResourceTest::testZookeeperDataEndpoints
Stack Traces | 0.047s run time
Expected RuntimeException to be thrown, but PinotAdminValidationException was thrown
org.apache.pinot.controller.api.resources.ZookeeperResourceTest::testZookeeperDataEndpoints
Stack Traces | 0.047s run time
Expected RuntimeException to be thrown, but PinotAdminValidationException was thrown
org.apache.pinot.controller.api.TableConfigsRestletResourceTest::testListConfigs
Stack Traces | 0.058s run time
expected [1] but found [4]
org.apache.pinot.controller.api.TableConfigsRestletResourceTest::testListConfigs
Stack Traces | 0.058s run time
expected [1] but found [4]
org.apache.pinot.integration.tests.DateTimeFieldSpecHybridClusterIntegrationTest::testSegmentMetadataApi
Stack Traces | 0.067s run time
expected [8] but found [0]
org.apache.pinot.integration.tests.HybridClusterIntegrationTest::testSegmentMetadataApi
Stack Traces | 0.073s run time
expected [8] but found [0]
org.apache.pinot.controller.api.PinotInstanceRestletResourceTest::testInstanceListingAndCreation
Stack Traces | 0.095s run time
Expected RuntimeException to be thrown, but PinotAdminValidationException was thrown
org.apache.pinot.controller.api.PinotInstanceRestletResourceTest::testInstanceListingAndCreation
Stack Traces | 0.095s run time
Expected RuntimeException to be thrown, but PinotAdminValidationException was thrown
org.apache.pinot.controller.api.TableConfigsRestletResourceTest::testForceUpdateTableSchemaAndConfigs
Stack Traces | 0.096s run time
HTTP request failed with status: 500, url: http://localhost:20000/tableConfigs/testUpdate1?reload=false&forceTableSchemaUpdate=false, body: {"code":500,"error":"Failed to update TableConfigs for: testUpdate1, New schema: testUpdate1 is not backward-compatible with the existing schema"}
org.apache.pinot.controller.api.TableConfigsRestletResourceTest::testForceUpdateTableSchemaAndConfigs
Stack Traces | 0.096s run time
HTTP request failed with status: 500, url: http://localhost:20000/tableConfigs/testUpdate1?reload=false&forceTableSchemaUpdate=false, body: {"code":500,"error":"Failed to update TableConfigs for: testUpdate1, New schema: testUpdate1 is not backward-compatible with the existing schema"}
org.apache.pinot.controller.api.TableConfigsRestletResourceTest::testDeleteTableConfigWithTableTypeValidation
Stack Traces | 0.098s run time
Expected RuntimeException to be thrown, but PinotAdminException was thrown
org.apache.pinot.controller.api.TableConfigsRestletResourceTest::testDeleteTableConfigWithTableTypeValidation
Stack Traces | 0.098s run time
Expected RuntimeException to be thrown, but PinotAdminException was thrown
org.apache.pinot.controller.api.PinotSegmentRestletResourceTest::testListSegmentLineage
Stack Traces | 0.179s run time
Expected RuntimeException to be thrown, but PinotAdminNotFoundException was thrown
org.apache.pinot.controller.api.PinotSegmentRestletResourceTest::testListSegmentLineage
Stack Traces | 0.179s run time
Expected RuntimeException to be thrown, but PinotAdminNotFoundException was thrown
org.apache.pinot.controller.api.TableConfigsRestletResourceTest::testDeleteTableWithLogicalTable
Stack Traces | 0.183s run time
Expected RuntimeException to be thrown, but PinotAdminException was thrown
org.apache.pinot.controller.api.TableConfigsRestletResourceTest::testDeleteTableWithLogicalTable
Stack Traces | 0.183s run time
Expected RuntimeException to be thrown, but PinotAdminException was thrown
org.apache.pinot.integration.tests.UrlAuthRealtimeIntegrationTest::testSegmentUploadDownload
Stack Traces | 2.29s run time
expected [true] but found [false]
org.apache.pinot.integration.tests.SegmentUploadIntegrationTest::testUploadAndQueryWithConsistentPush
Stack Traces | 2.65s run time
expected [true] but found [false]
org.apache.pinot.integration.tests.SegmentUploadIntegrationTest::testUploadAndQuery
Stack Traces | 3.34s run time
expected [true] but found [false]
org.apache.pinot.integration.tests.SegmentWriterUploaderIntegrationTest::testFileBasedSegmentWriterAndDefaultUploader
Stack Traces | 3.37s run time
expected [9746] but found [0]
org.apache.pinot.controller.api.PinotBrokerRestletResourceStatelessTest::testGetBrokers
Stack Traces | 4.53s run time
Expected RuntimeException to be thrown, but PinotAdminNotFoundException was thrown
org.apache.pinot.controller.api.PinotBrokerRestletResourceStatelessTest::testGetBrokers
Stack Traces | 4.53s run time
Expected RuntimeException to be thrown, but PinotAdminNotFoundException was thrown
org.apache.pinot.controller.api.PinotBrokerRestletResourceStatelessTest::testGetBrokers
Stack Traces | 4.54s run time
Expected RuntimeException to be thrown, but PinotAdminNotFoundException was thrown
org.apache.pinot.integration.tests.RealtimeConsumptionRateLimiterClusterIntegrationTest::setUp
Stack Traces | 9.84s run time
java.lang.RuntimeException: java.io.IOException: Failed to bind to address 0.0.0.0/0.0.0.0:45645
org.apache.pinot.integration.tests.SegmentUploadIntegrationTest::testUploadMultipleSegmentsInBatchModeAndQuery
Stack Traces | 11.5s run time
expected [12] but found [1]
org.apache.pinot.integration.tests.TlsIntegrationTest::setUp
Stack Traces | 14.3s run time
org.apache.pinot.client.admin.PinotAdminAuthenticationException: Access forbidden: {"code":403,"error":"Permission is denied for CREATE 'https://localhost:20000/schemas' for table 'mytable'"}
View the full list of 2 ❄️ flaky test(s)
org.apache.pinot.controller.validation.ValidationManagerTest::@BeforeClass setUp

Flake rate in main: 100.00% (Passed 0 times, Failed 5 times)

Stack Traces | 0.01s run time
Sets differ: expected [DefaultTenant] but got [DefaultTenant, tag]
org.apache.pinot.controller.validation.ValidationManagerTest::setUp

Flake rate in main: 100.00% (Passed 0 times, Failed 5 times)

Stack Traces | 0.01s run time
Sets differ: expected [DefaultTenant] but got [DefaultTenant, tag]

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@xiangfu0 xiangfu0 force-pushed the feat/admin-client-migration branch 17 times, most recently from eced8fc to 32cd71e Compare November 11, 2025 04:40
@xiangfu0 xiangfu0 force-pushed the feat/admin-client-migration branch 7 times, most recently from 2727fcb to 654d391 Compare December 15, 2025 10:06
@xiangfu0 xiangfu0 force-pushed the feat/admin-client-migration branch 3 times, most recently from 0a15faf to 21d6e39 Compare December 16, 2025 12:02
…ients (logical table, cluster, query workload); replace ControllerRequestClient usages where possible; add pinot-java-client dep in Flink connector
@xiangfu0 xiangfu0 force-pushed the feat/admin-client-migration branch from 21d6e39 to edef79a Compare December 17, 2025 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants