Skip to content

Commit

Permalink
Optimize code.
Browse files Browse the repository at this point in the history
  • Loading branch information
yuqi1129 committed Oct 17, 2024
1 parent 70a545e commit cfcc544
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hdfs.DistributedFileSystem;

public class HDFSFileSystemProvider implements FileSystemProvider {

Expand All @@ -39,7 +38,7 @@ public FileSystem getFileSystem(@Nonnull Path path, @Nonnull Map<String, String>
(k, v) -> {
configuration.set(k.replace(CATALOG_BYPASS_PREFIX, ""), v);
});
return DistributedFileSystem.newInstance(path.toUri(), configuration);
return FileSystem.newInstance(path.toUri(), configuration);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import java.util.Map;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.LocalFileSystem;
import org.apache.hadoop.fs.Path;

public class LocalFileSystemProvider implements FileSystemProvider {
Expand All @@ -38,7 +37,7 @@ public FileSystem getFileSystem(Path path, Map<String, String> config) throws IO
configuration.set(k.replace(CATALOG_BYPASS_PREFIX, ""), v);
});

return LocalFileSystem.newInstance(path.toUri(), configuration);
return FileSystem.newInstance(path.toUri(), configuration);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ private static boolean isDeploy() {
}

private void copyGCPJars() {
if (!isDeploy()) {
return;
}

String gravitinoHome = System.getenv("GRAVITINO_HOME");
String jarName = String.format("gravitino-gcp-bundle-%s.jar", System.getenv("PROJECT_VERSION"));
String gcsJars =
Expand Down

0 comments on commit cfcc544

Please sign in to comment.