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

[#895] improvement: Rename Hdfs*.java to Hadoop*.java to support other Hadoop FS-compatible distributed filesystem #898

Merged
merged 6 commits into from
May 24, 2023

Conversation

jiafuzha
Copy link
Contributor

@jiafuzha jiafuzha commented May 23, 2023

What changes were proposed in this pull request?

In server and storage modules, there are many classes prefixed with Hdfs which use Hadoop FS API and are thus impl agnostic, not depending on specific Hdfs impl. So, it's better to rename them to Hadoop* so that we can support other Hadoop FS compatible distributed filesystem by extending existing classes. It'll make code look more naturally.

There may be some slight differences among different Hadoop FS impls, like hadoop-daos not have a dedicated thread for reading and writing data, which is different from hdfs. Thus, we don't need to close outputstream at each flush to FS.

Why are the changes needed?

Fix: #895

Does this PR introduce any user-facing change?

No.

How was this patch tested?

CI passed.

HDFS(4),
LOCALFILE_HDFS(6),
HADOOP(4),
LOCALFILE_HADOOP(6),
Copy link
Contributor

@jerqi jerqi May 23, 2023

Choose a reason for hiding this comment

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

Could we avoid modifying the config option? Because this is a incompatible change. Or we should make this change compatible. We should make old config option effective.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could we avoid modifying the config option? Because this is a incompatible change. Or we should make this change compatible. We should make old config option effective.

make sense. Let me rollback that part.

…op FS-compatible distributed filesystem

Signed-off-by: jiafu zhang <jiafu.zhang@intel.com>
…op FS-compatible distributed filesystem

Signed-off-by: Jiafu Zhang <jiafu.zhang@intel.com>
…op FS-compatible distributed filesystem

Signed-off-by: Jiafu Zhang <jiafu.zhang@intel.com>
…op FS-compatible distributed filesystem

Signed-off-by: Jiafu Zhang <jiafu.zhang@intel.com>
@codecov-commenter
Copy link

codecov-commenter commented May 24, 2023

Codecov Report

Merging #898 (f218a12) into master (9c62784) will increase coverage by 1.84%.
The diff coverage is 66.15%.

@@             Coverage Diff              @@
##             master     #898      +/-   ##
============================================
+ Coverage     55.22%   57.07%   +1.84%     
- Complexity     2197     2200       +3     
============================================
  Files           333      313      -20     
  Lines         16444    14089    -2355     
  Branches       1306     1307       +1     
============================================
- Hits           9081     8041    -1040     
+ Misses         6851     5607    -1244     
+ Partials        512      441      -71     
Impacted Files Coverage Δ
...va/org/apache/uniffle/client/util/ClientUtils.java 56.25% <0.00%> (ø)
...apache/uniffle/coordinator/ApplicationManager.java 83.79% <ø> (ø)
.../java/org/apache/uniffle/server/ShuffleServer.java 68.24% <0.00%> (ø)
...g/apache/uniffle/storage/common/HadoopStorage.java 0.00% <0.00%> (ø)
...uniffle/storage/factory/ShuffleHandlerFactory.java 0.00% <0.00%> (ø)
...orage/handler/impl/HadoopShuffleDeleteHandler.java 0.00% <0.00%> (ø)
...a/org/apache/uniffle/storage/util/StorageType.java 100.00% <ø> (ø)
...trategy/storage/AbstractSelectStorageStrategy.java 60.56% <25.00%> (ø)
.../handler/impl/PooledHadoopShuffleWriteHandler.java 71.42% <60.00%> (ø)
...rg/apache/uniffle/coordinator/CoordinatorConf.java 98.78% <100.00%> (ø)
... and 12 more

... and 27 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jerqi jerqi changed the title [Improvement] Rename Hdfs*.java to Hadoop*.java to support other Hadoop FS-compatible distributed filesystem [#895][Improvement] Rename Hdfs*.java to Hadoop*.java to support other Hadoop FS-compatible distributed filesystem May 24, 2023
@jerqi jerqi changed the title [#895][Improvement] Rename Hdfs*.java to Hadoop*.java to support other Hadoop FS-compatible distributed filesystem [#895] improvement: Rename Hdfs*.java to Hadoop*.java to support other Hadoop FS-compatible distributed filesystem May 24, 2023
Copy link
Contributor

@jerqi jerqi 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 @jiafuzha

Copy link
Contributor

@jerqi jerqi 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 @jiafuzha

@jerqi jerqi merged commit 3e58805 into apache:master May 24, 2023
25 checks passed
@jiafuzha jiafuzha deleted the ISSUE_895 branch May 24, 2023 06:50
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.

[Improvement] Rename Hdfs*.java to Hadoop*.java to support other Hadoop FS-compatible distributed filesystem
3 participants