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

[HUDI-3946] Validate option path in flink hudi sink #5397

Merged
merged 1 commit into from
Apr 25, 2022

Conversation

yuruguo
Copy link
Contributor

@yuruguo yuruguo commented Apr 22, 2022

What is the purpose of the pull request

We should do a non-null check on option 'path' in flink hudi sink so that flink can expose the 'path' problem as early as possible, instead of throwing the error at runtime.

Caused by: java.lang.IllegalArgumentException: Can not create a Path from a null string
        at org.apache.hadoop.fs.Path.checkPathArg(Path.java:122) ~[hadoop-common-2.7.6.jar:?]
        at org.apache.hadoop.fs.Path.<init>(Path.java:134) ~[hadoop-common-2.7.6.jar:?]
        at org.apache.hudi.common.fs.FSUtils.getFs(FSUtils.java:103) ~[hudi-flink1.14-bundle_2.11-0.11.0-rc1.jar:0.11.0-rc1]
        at org.apache.hudi.util.StreamerUtil.tableExists(StreamerUtil.java:289) ~[hudi-flink1.14-bundle_2.11-0.11.0-rc1.jar:0.11.0-rc1]
        at org.apache.hudi.util.StreamerUtil.initTableIfNotExists(StreamerUtil.java:258) ~[hudi-flink1.14-bundle_2.11-0.11.0-rc1.jar:0.11.0-rc1]
        at org.apache.hudi.sink.StreamWriteOperatorCoordinator.start(StreamWriteOperatorCoordinator.java:172) ~[hudi-flink1.14-bundle_2.11-0.11.0-rc1.jar:0.11.0-rc1]
        at org.apache.flink.runtime.operators.coordination.OperatorCoordinatorHolder.start(OperatorCoordinatorHolder.java:194) ~[flink-dist_2.11-1.14.2.jar:1.14.2]
        at org.apache.flink.runtime.scheduler.DefaultOperatorCoordinatorHandler.startAllOperatorCoordinators(DefaultOperatorCoordinatorHandler.java:85) ~[flink-dist_2.11-1.14.2.jar:1.14.2]
        at org.apache.flink.runtime.scheduler.SchedulerBase.startScheduling(SchedulerBase.java:584) ~[flink-dist_2.11-1.14.2.jar:1.14.2]
        at org.apache.flink.runtime.jobmaster.JobMaster.startScheduling(JobMaster.java:965) ~[flink-dist_2.11-1.14.2.jar:1.14.2]
        at org.apache.flink.runtime.jobmaster.JobMaster.startJobExecution(JobMaster.java:882) ~[flink-dist_2.11-1.14.2.jar:1.14.2]
        at org.apache.flink.runtime.jobmaster.JobMaster.onStart(JobMaster.java:389) ~[flink-dist_2.11-1.14.2.jar:1.14.2]
        at org.apache.flink.runtime.rpc.RpcEndpoint.internalCallOnStart(RpcEndpoint.java:181) ~[flink-dist_2.11-1.14.2.jar:1.14.2]
        at org.apache.flink.runtime.rpc.akka.AkkaRpcActor$StoppedState.lambda$start$0(AkkaRpcActor.java:624) ~[flink-rpc-akka_a8af7b4c-9c0c-4ac4-a1b1-1690068e50df.jar:1.14.2]
        at org.apache.flink.runtime.concurrent.akka.ClassLoadingUtils.runWithContextClassLoader(ClassLoadingUtils.java:68) ~[flink-rpc-akka_a8af7b4c-9c0c-4ac4-a1b1-1690068e50df.jar:1.14.2]
        at org.apache.flink.runtime.rpc.akka.AkkaRpcActor$StoppedState.start(AkkaRpcActor.java:623) ~[flink-rpc-akka_a8af7b4c-9c0c-4ac4-a1b1-1690068e50df.jar:1.14.2]
        ... 20 more 

more detial

Brief change log

(for example:)

  • Modify AnnotationLocation checkstyle rule in checkstyle.xml

Verify this pull request

(Please pick either of the following options)

This pull request is a trivial rework / code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end.
  • Added HoodieClientWriteTest to verify the change.
  • Manually verified the change by running a job locally.

Committer checklist

  • Has a corresponding JIRA in PR title & commit

  • Commit message is descriptive of the change

  • CI is green

  • Necessary doc changes done or have another open PR

  • For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

@yuruguo yuruguo force-pushed the HUDI-3946_validate_option_path branch from f4acc38 to 28962d5 Compare April 24, 2022 02:47
@hudi-bot
Copy link

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

@danny0405 danny0405 merged commit d994c58 into apache:master Apr 25, 2022
yihua pushed a commit to yihua/hudi that referenced this pull request Jun 3, 2022
@yuruguo yuruguo deleted the HUDI-3946_validate_option_path branch January 19, 2023 06:05
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.

3 participants