Skip to content

[HUDI-8092] Replace FileSystem and related classes to dehadoop hudi-client-common#11805

Merged
yihua merged 13 commits intoapache:masterfrom
CTTY:ctty/client-hadoop-fs
Sep 9, 2024
Merged

[HUDI-8092] Replace FileSystem and related classes to dehadoop hudi-client-common#11805
yihua merged 13 commits intoapache:masterfrom
CTTY:ctty/client-hadoop-fs

Conversation

@CTTY
Copy link
Contributor

@CTTY CTTY commented Aug 21, 2024

Change Logs

This PR dehadoops hudi-client-common module by replacing FileSystem and related classes with HoodieStorage and other storage classes.

Major replacements:

  • FileSystem -> HoodieStorage
    - fs -> storage,
    - fs.mkdir -> storage.createDirectory
    - fs.delete(, false) -> storage.deleteFile
    - fs.delete(, true) -> storage.deleteDirectory
    - fs.getFileStatus -> storage.getPathInfo
    - fs.isDirectory -> storage.getPathInfo.isDirectory
  • Path -> StoragePath
  • FileStatus -> StoragePathInfo
    - fileStatus.getLen() -> storagePathInfo.getLength()
  • FSDataOutputStream (created by fs.create()) -> OutputStream (created by storage.create())
    - FSDataOutputStream.writeBytes() -> OutputStream.write(String.toBytes())
    Others:
  • Removed unused SerializablePath and SerializablePathFilter

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. If not, put "none".

  • 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

@CTTY
Copy link
Contributor Author

CTTY commented Aug 21, 2024

Screenshot 2024-08-20 at 5 15 00 PM

After this change, there should be only test usages of Hadoop classes in hudi-client-common

@github-actions github-actions bot added the size:L PR with lines of changes in (300, 1000] label Aug 21, 2024
CTTY and others added 2 commits September 4, 2024 23:41
…ndex/bucket/ConsistentBucketIndexUtils.java

Co-authored-by: Y Ethan Guo <ethan.guoyihua@gmail.com>
@CTTY CTTY changed the title [HUDI-8092] Replace FileSystem and related classes with Hudi's storage-layer classes [HUDI-8092] Replace FileSystem and related classes to dehadoop hudi-client-common Sep 5, 2024
@hudi-bot
Copy link
Collaborator

hudi-bot commented Sep 5, 2024

CI report:

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

Copy link
Contributor

@yihua yihua left a comment

Choose a reason for hiding this comment

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

LGTM

@yihua yihua merged commit 9bb8dcd into apache:master Sep 9, 2024
@CTTY CTTY deleted the ctty/client-hadoop-fs branch September 9, 2024 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L PR with lines of changes in (300, 1000]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants