feat(rpc): Add RPC function stubs for sidecar discovery [5/8] (OSS) (#16793)#16793
Open
zhichenxu-meta wants to merge 2 commits intofacebookincubator:mainfrom
Open
feat(rpc): Add RPC function stubs for sidecar discovery [5/8] (OSS) (#16793)#16793zhichenxu-meta wants to merge 2 commits intofacebookincubator:mainfrom
zhichenxu-meta wants to merge 2 commits intofacebookincubator:mainfrom
Conversation
✅ Deploy Preview for meta-velox canceled.
|
|
@zhichenxu-meta has exported this pull request. If you are a Meta employee, you can view the originating Diff in D94996268. |
zhichenxu-meta
added a commit
to zhichenxu-meta/velox
that referenced
this pull request
Mar 16, 2026
…acebookincubator#16793) Summary: Pull Request resolved: facebookincubator#16793 Stub registration and sidecar discovery support. **RPCFunctionStubs**: Registers lightweight stub VectorFunctions with correct signatures that throw on direct execution. Enables the sidecar to report RPC functions to the Java coordinator via GET /v1/functions. **AsyncRPCFunctionRegistry additions**: - registerStubs(namespacePrefix): Registers stubs under the Presto namespace (e.g., presto.default.fb_llm_inference) - Deferred stub registration: signatures stored at static init time, stubs registered later when the namespace prefix is known **AsyncRPCFunctionRegistrar**: Static registration helper. Two-arg form registers factory only; three-arg form also stores signatures for sidecar discovery. Differential Revision: D94996268
6b0e13e to
dfcafc2
Compare
zhichenxu-meta
added a commit
to zhichenxu-meta/velox
that referenced
this pull request
Mar 16, 2026
…acebookincubator#16793) Summary: Pull Request resolved: facebookincubator#16793 Stub registration and sidecar discovery support. **RPCFunctionStubs**: Registers lightweight stub VectorFunctions with correct signatures that throw on direct execution. Enables the sidecar to report RPC functions to the Java coordinator via GET /v1/functions. **AsyncRPCFunctionRegistry additions**: - registerStubs(namespacePrefix): Registers stubs under the Presto namespace (e.g., presto.default.fb_llm_inference) - Deferred stub registration: signatures stored at static init time, stubs registered later when the namespace prefix is known **AsyncRPCFunctionRegistrar**: Static registration helper. Two-arg form registers factory only; three-arg form also stores signatures for sidecar discovery. Differential Revision: D94996268
dfcafc2 to
4bebfb3
Compare
zhichenxu-meta
added a commit
to zhichenxu-meta/velox
that referenced
this pull request
Mar 16, 2026
…acebookincubator#16793) Summary: Pull Request resolved: facebookincubator#16793 Stub registration and sidecar discovery support. **RPCFunctionStubs**: Registers lightweight stub VectorFunctions with correct signatures that throw on direct execution. Enables the sidecar to report RPC functions to the Java coordinator via GET /v1/functions. **AsyncRPCFunctionRegistry additions**: - registerStubs(namespacePrefix): Registers stubs under the Presto namespace (e.g., presto.default.fb_llm_inference) - Deferred stub registration: signatures stored at static init time, stubs registered later when the namespace prefix is known **AsyncRPCFunctionRegistrar**: Static registration helper. Two-arg form registers factory only; three-arg form also stores signatures for sidecar discovery. Differential Revision: D94996268
4bebfb3 to
d96404a
Compare
zhichenxu-meta
added a commit
to zhichenxu-meta/velox
that referenced
this pull request
Mar 16, 2026
…acebookincubator#16793) Summary: Pull Request resolved: facebookincubator#16793 Stub registration and sidecar discovery support. **RPCFunctionStubs**: Registers lightweight stub VectorFunctions with correct signatures that throw on direct execution. Enables the sidecar to report RPC functions to the Java coordinator via GET /v1/functions. **AsyncRPCFunctionRegistry additions**: - registerStubs(namespacePrefix): Registers stubs under the Presto namespace (e.g., presto.default.fb_llm_inference) - Deferred stub registration: signatures stored at static init time, stubs registered later when the namespace prefix is known **AsyncRPCFunctionRegistrar**: Static registration helper. Two-arg form registers factory only; three-arg form also stores signatures for sidecar discovery. Differential Revision: D94996268
d96404a to
d504af7
Compare
zhichenxu-meta
added a commit
to zhichenxu-meta/velox
that referenced
this pull request
Mar 16, 2026
…acebookincubator#16793) Summary: Pull Request resolved: facebookincubator#16793 Stub registration and sidecar discovery support. **RPCFunctionStubs**: Registers lightweight stub VectorFunctions with correct signatures that throw on direct execution. Enables the sidecar to report RPC functions to the Java coordinator via GET /v1/functions. **AsyncRPCFunctionRegistry additions**: - registerStubs(namespacePrefix): Registers stubs under the Presto namespace (e.g., presto.default.fb_llm_inference) - Deferred stub registration: signatures stored at static init time, stubs registered later when the namespace prefix is known **AsyncRPCFunctionRegistrar**: Static registration helper. Two-arg form registers factory only; three-arg form also stores signatures for sidecar discovery. Differential Revision: D94996268
d504af7 to
d590b24
Compare
zhichenxu-meta
added a commit
to zhichenxu-meta/velox
that referenced
this pull request
Mar 16, 2026
…acebookincubator#16793) Summary: Pull Request resolved: facebookincubator#16793 Stub registration and sidecar discovery support. **RPCFunctionStubs**: Registers lightweight stub VectorFunctions with correct signatures that throw on direct execution. Enables the sidecar to report RPC functions to the Java coordinator via GET /v1/functions. **AsyncRPCFunctionRegistry additions**: - registerStubs(namespacePrefix): Registers stubs under the Presto namespace (e.g., presto.default.fb_llm_inference) - Deferred stub registration: signatures stored at static init time, stubs registered later when the namespace prefix is known **AsyncRPCFunctionRegistrar**: Static registration helper. Two-arg form registers factory only; three-arg form also stores signatures for sidecar discovery. Differential Revision: D94996268
d590b24 to
eb9505e
Compare
zhichenxu-meta
added a commit
to zhichenxu-meta/velox
that referenced
this pull request
Mar 16, 2026
…acebookincubator#16793) Summary: Pull Request resolved: facebookincubator#16793 Stub registration and sidecar discovery support. **RPCFunctionStubs**: Registers lightweight stub VectorFunctions with correct signatures that throw on direct execution. Enables the sidecar to report RPC functions to the Java coordinator via GET /v1/functions. **AsyncRPCFunctionRegistry additions**: - registerStubs(namespacePrefix): Registers stubs under the Presto namespace (e.g., presto.default.fb_llm_inference) - Deferred stub registration: signatures stored at static init time, stubs registered later when the namespace prefix is known **AsyncRPCFunctionRegistrar**: Static registration helper. Two-arg form registers factory only; three-arg form also stores signatures for sidecar discovery. Differential Revision: D94996268
eb9505e to
5db8606
Compare
zhichenxu-meta
added a commit
to zhichenxu-meta/velox
that referenced
this pull request
Mar 16, 2026
…acebookincubator#16793) Summary: Pull Request resolved: facebookincubator#16793 Stub registration and sidecar discovery support. **RPCFunctionStubs**: Registers lightweight stub VectorFunctions with correct signatures that throw on direct execution. Enables the sidecar to report RPC functions to the Java coordinator via GET /v1/functions. **AsyncRPCFunctionRegistry additions**: - registerStubs(namespacePrefix): Registers stubs under the Presto namespace (e.g., presto.default.fb_llm_inference) - Deferred stub registration: signatures stored at static init time, stubs registered later when the namespace prefix is known **AsyncRPCFunctionRegistrar**: Static registration helper. Two-arg form registers factory only; three-arg form also stores signatures for sidecar discovery. Differential Revision: D94996268
5db8606 to
14285b5
Compare
…ork [4/8] (OSS) Summary: Unit tests and reference implementation for the RPC framework. **DemoAsyncRPCFunction**: Complete reference implementation of AsyncRPCFunction, demonstrating the full contract: dispatchPerRow() (per-row dispatch via MockRPCClient with null handling via immediate error responses), buildOutput() (default VARCHAR FlatVector from base class), tierKey() (default ""), and signatures(). Use this as a template when implementing new RPC functions. **DemoRPCFunctionTest**: End-to-end test exercising the full pipeline: initialize -> dispatchPerRow -> resolve futures -> buildOutput. Also covers null input handling (error="null_input"), error response mapping, signatures, and tierKey() accessor. **MockRPCClientTest**: Single-call and batch-call interfaces. Verifies response generation, error injection, and rowId preservation. **RPCStateTest**: Both streaming modes (PER_ROW and BATCH): addPendingRow/tryClaimOrWait, addPendingBatch/tryPollBatchOrWait, drainReadyRows, error propagation, backpressure, noMoreInput/isFinished lifecycle, input batch storage with reference-counted release. **RPCNodeTest**: Tests core::RPCNode with name-based API — construction with function name + result type, accessors, streaming mode config, dispatchPerRow via mock, buildOutput, and toString(). Differential Revision: D94996255
14285b5 to
5134963
Compare
zhichenxu-meta
added a commit
to zhichenxu-meta/velox
that referenced
this pull request
Mar 17, 2026
…acebookincubator#16793) Summary: Stub registration and sidecar discovery support. **RPCFunctionStubs**: Registers lightweight stub VectorFunctions with correct signatures that throw on direct execution. Enables the sidecar to report RPC functions to the Java coordinator via GET /v1/functions. **AsyncRPCFunctionRegistry additions**: - registerStubs(namespacePrefix): Registers stubs under the Presto namespace (e.g., presto.default.fb_llm_inference) - Deferred stub registration: signatures stored at static init time, stubs registered later when the namespace prefix is known **AsyncRPCFunctionRegistrar**: Static registration helper. Two-arg form registers factory only; three-arg form also stores signatures for sidecar discovery. Differential Revision: D94996268
…acebookincubator#16793) Summary: Pull Request resolved: facebookincubator#16793 Stub registration and sidecar discovery support. **RPCFunctionStubs**: Registers lightweight stub VectorFunctions with correct signatures that throw on direct execution. Enables the sidecar to report RPC functions to the Java coordinator via GET /v1/functions. **AsyncRPCFunctionRegistry additions**: - registerStubs(namespacePrefix): Registers stubs under the Presto namespace (e.g., presto.default.fb_llm_inference) - Deferred stub registration: signatures stored at static init time, stubs registered later when the namespace prefix is known **AsyncRPCFunctionRegistrar**: Static registration helper. Two-arg form registers factory only; three-arg form also stores signatures for sidecar discovery. Differential Revision: D94996268
5134963 to
af883a1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Stub registration and sidecar discovery support.
RPCFunctionStubs: Registers lightweight stub VectorFunctions with
correct signatures that throw on direct execution. Enables the sidecar
to report RPC functions to the Java coordinator via GET /v1/functions.
AsyncRPCFunctionRegistry additions:
namespace (e.g., presto.default.fb_llm_inference)
stubs registered later when the namespace prefix is known
AsyncRPCFunctionRegistrar: Static registration helper. Two-arg form
registers factory only; three-arg form also stores signatures for
sidecar discovery.
Differential Revision: D94996268