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-7587] Make hudi-hadoop-common module dependent on hudi-common module #11131

Merged
merged 38 commits into from May 9, 2024

Conversation

jonvex
Copy link
Contributor

@jonvex jonvex commented Apr 30, 2024

Change Logs

make hudi-hadoop-common depend on hudi-common instead of the reverse. This is the next step for removing hadoop from hudi-common. There is hardcoded reflection currently that will be mostly removed or will be configurable for the other filesystems.

Took some methods out of FileSystemTestUtils and moved to HoodieTestTable because they are only needed in hadoop tests, and are mostly only used by that single test class

Impact

make hudi-hadoop-common depend on hudi-common instead of the reverse

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

medium

Documentation Update

N/A

Contributor's checklist

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

@github-actions github-actions bot added the size:L PR with lines of changes in (300, 1000] label Apr 30, 2024
@jonvex jonvex force-pushed the move_hadoop_readers_to_hadoop_module branch from 70e6f70 to 190884f Compare May 1, 2024 17:19
@yihua yihua self-requested a review May 1, 2024 17:41
@yihua yihua self-assigned this May 1, 2024
@github-actions github-actions bot added size:XL PR with lines of changes > 1000 and removed size:L PR with lines of changes in (300, 1000] labels May 1, 2024
@jonvex jonvex marked this pull request as ready for review May 1, 2024 21:04
@apache apache deleted a comment from hudi-bot May 2, 2024
@@ -109,25 +105,6 @@ public static FileSystem getFs(String pathStr, Configuration conf, boolean local
return getFs(pathStr, conf);
}

public static HoodieStorage getStorageWithWrapperFS(StoragePath path,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this moved to somewhere else?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, since we need to use reflection, I moved it into a new constructor for HoodieHadoopStorage:

  public HoodieHadoopStorage(StoragePath path,
                             StorageConfiguration<?> conf,
                             boolean enableRetry,
                             long maxRetryIntervalMs,
                             int maxRetryNumbers,
                             long initialRetryIntervalMs,
                             String retryExceptions,
                             ConsistencyGuard consistencyGuard) {    
    FileSystem fileSystem = getFs(path, conf.unwrapCopyAs(Configuration.class));

    if (enableRetry) {
      fileSystem = new HoodieRetryWrapperFileSystem(fileSystem,
          maxRetryIntervalMs, maxRetryNumbers, initialRetryIntervalMs, retryExceptions);
    }
    checkArgument(!(fileSystem instanceof HoodieWrapperFileSystem),
        "File System not expected to be that of HoodieWrapperFileSystem");
    this.fs = new HoodieWrapperFileSystem(fileSystem, consistencyGuard);
  }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@yihua to respond later

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like we have to add a new constructor due to the usage of reflection. We'll simplify this later.

<artifactId>hudi-hadoop-common</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
<type>test-jar</type>
Copy link
Contributor

Choose a reason for hiding this comment

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

Is test-jar type required?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IDK, I just copied from what the other poms did

@jonvex jonvex requested a review from yihua May 9, 2024 18:10
@jonvex jonvex requested a review from yihua May 9, 2024 19:12
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.

Overall LGTM! Could you rename the PR as "Make hudi-hadoop-common module dependent on hudi-common" to be clear?

Once you address all the nits, you can merge the PR.

@jonvex jonvex changed the title [HUDI-7587] Make bundle dependencies for storage abstraction in correct order [HUDI-7587] Make hudi-hadoop-common module dependent on hudi-common May 9, 2024
@hudi-bot
Copy link

hudi-bot commented May 9, 2024

CI report:

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

@yihua yihua merged commit 008804c into apache:master May 9, 2024
47 checks passed
@yihua yihua changed the title [HUDI-7587] Make hudi-hadoop-common module dependent on hudi-common [HUDI-7587] Make hudi-hadoop-common module dependent on hudi-common module May 9, 2024
yihua pushed a commit that referenced this pull request May 15, 2024
yihua pushed a commit that referenced this pull request May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-0.15.0 release-1.0.0 size:XL PR with lines of changes > 1000
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants