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

[#1724] feat(server):Add server-side REST API support for fileset #1795

Merged
merged 5 commits into from
Feb 3, 2024

Conversation

coolderli
Copy link
Contributor

What changes were proposed in this pull request?

close #1724

Why are the changes needed?

Add server-side REST API support for fileset

Fix: #1724

Does this PR introduce any user-facing change?

(Please list the user-facing changes introduced by your change, including

  1. Change in user-facing APIs.
  2. Addition or removal of property keys.)

How was this patch tested?

  • add unit tests

@coolderli
Copy link
Contributor Author

@jerryshao @qqqttt123 I have fixed the pipeline. Please take a review when you have time. Thanks.

@jerryshao
Copy link
Contributor

Thanks a lot @coolderli for your work. I will take a look when I have time. Sorry we are busy on 0.4.0 code freeze, this feature will be targeted to 0.5.0.

@jerryshao
Copy link
Contributor

Generally LGTM, I need a further round of reviewing.


@Nullable
@JsonProperty("type")
private Fileset.Type type;
Copy link
Contributor

Choose a reason for hiding this comment

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

If this Is null, we'd better provide a default value. Otherwise, there will be NPE in HadoopCatalog.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I see, thanks.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think having a default value in FilesetDTO can solve this problem. The variable here will be used for createFileset() method. And we don't have the check here, so it will possibly an issue.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for not saying it clearly. IMO, I think it is OK to have null value for type in REST protocol, but we'd better have a default value when using this type.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, I know. I remove the default from the REST protocol to keep the original request for better audit.

dispatcher.createFileset(
ident,
request.getComment(),
request.getType(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Here request.getType() could be null, and it will lead an error when calling dispatcher.createFileset.

@jerryshao
Copy link
Contributor

Overall LGTM, just left one comment.

@coolderli
Copy link
Contributor Author

@jerryshao @qqqttt123 Could you please review this again? Thanks.

Copy link
Contributor

@jerryshao jerryshao left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @coolderli for your work.

@jerryshao jerryshao merged commit 7e20101 into apache:main Feb 3, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Subtask] Add server-side REST API support for fileset
3 participants