Skip to content

Commit

Permalink
Change CosNUnderFileSystemFactory implementation UnderFileSystemFactory
Browse files Browse the repository at this point in the history
### What changes are proposed in this pull request?

- Don't have to inherit the HdfsUnderFileSystemFactory CosNUnderFileSystemFactory directly implement UnderFileSystemFactory interface


### Why are the changes needed?

- Possibly to resolve package conflicts, #17024 removed HdfsUnderFileSystemFactory from COSN UFS jar, resulting in inability to use COSN interface
- However, CosNUnderFileSystemFactory inherits from HdfsUnderFileSystemFactory,the ServiceLoader.load method loads CosNUnderFileSystemFactory and first searches for its parent class, so removing HdfsUnderFileSystemFactory directly will result in an error.
```
failed to load jar alluxio-underfs-hadoop-cosn-3.1.0-5.8.5-2.9.3.jar NoClassdDefFoundError :alluxio/underfs/hdfs/HdfsUnderFileSystemFactory
```




			pr-link: #18143
			change-id: cid-4a80f6cdeae5b9bdb9e956c36838403ee6ce7c46
  • Loading branch information
gp1314 authored and alluxio-bot committed Oct 17, 2023
1 parent 8e169df commit 0802c1a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import alluxio.conf.PropertyKey;
import alluxio.underfs.UnderFileSystem;
import alluxio.underfs.UnderFileSystemConfiguration;
import alluxio.underfs.hdfs.HdfsUnderFileSystemFactory;
import alluxio.underfs.UnderFileSystemFactory;

import com.google.common.base.Preconditions;

Expand All @@ -27,7 +27,7 @@
* Factory for creating {@link CosnUnderFileSystem}.
*/
@ThreadSafe
public class CosNUnderFileSystemFactory extends HdfsUnderFileSystemFactory {
public class CosNUnderFileSystemFactory implements UnderFileSystemFactory {

@Override
public UnderFileSystem create(String path, UnderFileSystemConfiguration conf) {
Expand Down

0 comments on commit 0802c1a

Please sign in to comment.