-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Make taskUpdateRequest and taskInfo classes Thrift ready with json fields #25020
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
Make taskUpdateRequest and taskInfo classes Thrift ready with json fields #25020
Conversation
presto-main-base/src/main/java/com/facebook/presto/execution/ExecutionFailureInfo.java
Show resolved
Hide resolved
6c457e3
to
1f1b450
Compare
SCALAR(1), | ||
AGGREGATE(2), | ||
WINDOW(3); | ||
SCALAR(0), |
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.
Seems like cpp worker expects enum to start from 0. Vivian should have more context and will ask her to comment.
private final List<TypeSignature> argumentTypes; | ||
|
||
@ThriftConstructor | ||
public SqlFunctionId(String signature) |
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.
Seems like cpp worker is expecting a string.
@shangm2 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
1f1b450
to
d701020
Compare
@shangm2 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
1 similar comment
@shangm2 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
d701020
to
1632a75
Compare
@shangm2 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
a811b10
to
f9cb110
Compare
referencedType)), | ||
Optional.empty()); | ||
return new ThriftStructMetadata( | ||
originalType.getSimpleName() + "Wrapper", |
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.
f9cb110
to
2b918bf
Compare
|
||
ThriftFieldMetadata fieldMetaData = new ThriftFieldMetadata( | ||
fieldId, | ||
false, false, NONE, ImmutableMap.of(), |
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.
@vhsu14 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
How do we plan to handle these polymorphic types, given that many of them are connector-specific and not known upfront? Is there a design you can share? |
Hey Tim. For connector-specific, we will use a similar design as HandleResolver.java. We will start with prism connector. I am working with @amitkdutta to make a document that can be shared given that the company is monitoring all the typing/uploading/copy-paste thing now (maybe even before but it is getting worse). Let me know if this helps and thanks for all the comments! |
Thanks @shangm2. I'm not sure if this helps you, but I don't think you should copy over an internal document, this should be written as an RFC so the open source community can work with you on the design. |
presto-main-base/src/main/java/com/facebook/presto/server/thrift/ThriftCodecWrapper.java
Show resolved
Hide resolved
Hey @tdcmeehan . I have a rfc ready for review. prestodb/rfcs#38 |
2916c02
to
5e93c8b
Compare
presto-main-base/src/main/java/com/facebook/presto/server/InternalCommunicationConfig.java
Outdated
Show resolved
Hide resolved
5e93c8b
to
d396cab
Compare
d396cab
to
8a9265a
Compare
…th JSON fields in CPP (#25079) ## Description This PR depends on #25020. Changes include: - Use IDL generated by coordinator and make relevant changes to enable thrift for TaskStatus, TaskUpdateRequest, and TaskInfo on native worker. - Remove old pipeline of using python, json, and chevron templates for producing C++ code. ## Motivation and Context We observed that coordinator can spend too much cpu/heap memory on json serde for taskUpdateRequest. ## Impact <!---Describe any public API or user-facing feature change or any performance impact--> ## Test Plan Verifier ## Contributor checklist - [ ] Please make sure your submission complies with our [contributing guide](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md), in particular [code style](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#code-style) and [commit standards](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#commit-standards). - [ ] PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced. - [ ] Documented new properties (with its default value), SQL syntax, functions, or other functionality. - [ ] If release notes are required, they follow the [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines). - [ ] Adequate tests were added if applicable. - [ ] CI passed. ## Release Notes Please follow [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines) and fill in the release notes below. ``` == RELEASE NOTES == General Changes * Improve communication between coordinator and worker with thrift serde. ```
…elds (prestodb#25020) ## Description 1. We are enabling thrift for task update request, and task info for critical api communication between coordinator and worker. We have two config toggles for task update request sent to worker and the task info returned to coordinator, 2. However, there are some classes that are java interface/polymorphic fields. We keep them as json encoding for now and will migrate them in the next step. 3. We are also doing proper change for native worker: prestodb#25079 ## Motivation and Context 1. We observed that coordinator can spend too much cpu/heap memory on json serde for taskUpdateRequest. ## Impact <!---Describe any public API or user-facing feature change or any performance impact--> ## Test Plan 1. Passed verifier tests ## Contributor checklist - [ ] Please make sure your submission complies with our [contributing guide](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md), in particular [code style](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#code-style) and [commit standards](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#commit-standards). - [ ] PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced. - [ ] Documented new properties (with its default value), SQL syntax, functions, or other functionality. - [ ] If release notes are required, they follow the [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines). - [ ] Adequate tests were added if applicable. - [ ] CI passed. ## Release Notes Please follow [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines) and fill in the release notes below. ``` == RELEASE NOTES == General Changes * Improve communication between coordinator and worker with thrift serde. ```
…th JSON fields in CPP (prestodb#25079) ## Description This PR depends on prestodb#25020. Changes include: - Use IDL generated by coordinator and make relevant changes to enable thrift for TaskStatus, TaskUpdateRequest, and TaskInfo on native worker. - Remove old pipeline of using python, json, and chevron templates for producing C++ code. ## Motivation and Context We observed that coordinator can spend too much cpu/heap memory on json serde for taskUpdateRequest. ## Impact <!---Describe any public API or user-facing feature change or any performance impact--> ## Test Plan Verifier ## Contributor checklist - [ ] Please make sure your submission complies with our [contributing guide](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md), in particular [code style](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#code-style) and [commit standards](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#commit-standards). - [ ] PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced. - [ ] Documented new properties (with its default value), SQL syntax, functions, or other functionality. - [ ] If release notes are required, they follow the [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines). - [ ] Adequate tests were added if applicable. - [ ] CI passed. ## Release Notes Please follow [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines) and fill in the release notes below. ``` == RELEASE NOTES == General Changes * Improve communication between coordinator and worker with thrift serde. ```
Description
Motivation and Context
Impact
Test Plan
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.