Skip to content

[HUDI-5577] Validate option catalog.path in dfs mode#7698

Merged
danny0405 merged 1 commit intoapache:masterfrom
yuruguo:validate-catalog-path-in-dfs-mode
Jan 19, 2023
Merged

[HUDI-5577] Validate option catalog.path in dfs mode#7698
danny0405 merged 1 commit intoapache:masterfrom
yuruguo:validate-catalog-path-in-dfs-mode

Conversation

@yuruguo
Copy link
Contributor

@yuruguo yuruguo commented Jan 18, 2023

Change Logs

It will throw IllegalArgumentException If catalog.path is empty in dfs mode, as below:

Caused by: java.lang.IllegalArgumentException: Can not create a Path from a null string
    at org.apache.hadoop.fs.Path.checkPathArg(Path.java:125)
    at org.apache.hadoop.fs.Path.<init>(Path.java:137)
    at org.apache.hudi.common.fs.FSUtils.getFs(FSUtils.java:102)
    at org.apache.hudi.table.catalog.HoodieCatalog.open(HoodieCatalog.java:103)
    at org.apache.flink.table.catalog.CatalogManager.registerCatalog(CatalogManager.java:195)
    at org.apache.flink.table.api.internal.TableEnvironmentImpl.createCatalog(TableEnvironmentImpl.java:1297)
    at org.apache.flink.table.api.internal.TableEnvironmentImpl.executeInternal(TableEnvironmentImpl.java:1122)
    at org.apache.flink.table.api.internal.TableEnvironmentImpl.executeSql(TableEnvironmentImpl.java:742)
    at com.jd.flink.sql.runtime.SQLExecHelper.execSQL(SQLExecHelper.java:326)
    at com.jd.flink.sql.NGMain.main(NGMain.java:41)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:356) 

Impact

none

Risk level (write none, low medium or high below)

none

Documentation Update

Describe any necessary documentation update if there is any new feature, config, or user-facing change

  • The config description must be updated if new configs are added or the default value of the configs are changed
  • Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
    ticket number here and follow the instruction to make
    changes to the website.

Contributor's checklist

  • Read through contributor's guide
  • Change Logs and Impact were stated clearly
  • Adequate tests were added if applicable
  • CI passed

@yuruguo yuruguo force-pushed the validate-catalog-path-in-dfs-mode branch from b942053 to 99bd3ce Compare January 18, 2023 15:26
@hudi-bot
Copy link
Collaborator

CI report:

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

Copy link
Contributor

@danny0405 danny0405 left a comment

Choose a reason for hiding this comment

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

+1, thanks for the fix.

@danny0405 danny0405 merged commit 43d23a4 into apache:master Jan 19, 2023
@yuruguo yuruguo deleted the validate-catalog-path-in-dfs-mode branch January 19, 2023 06:05
fengjian428 pushed a commit to fengjian428/hudi that referenced this pull request Jan 31, 2023
fengjian428 pushed a commit to fengjian428/hudi that referenced this pull request Apr 5, 2023
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