1
0

Update HiveIncrementalPuller to configure filesystem (#4431)

* Update HiveIncrementalPuller.java

fix get FileSystem bug

* Update HiveIncrementalPuller.java

fix error

* Update HiveIncrementalPuller.java

fie error
This commit is contained in:
hehexiaoduantui
2022-01-06 15:49:30 +08:00
committed by GitHub
parent 205e48f53f
commit 50fa5a6aa7

View File

@@ -91,6 +91,8 @@ public class HiveIncrementalPuller {
public String fromCommitTime;
@Parameter(names = {"--maxCommits"})
public int maxCommits = 3;
@Parameter(names = {"--fsDefaultFs"})
public String fsDefaultFs = "file:///";
@Parameter(names = {"--help", "-h"}, help = true)
public Boolean help = false;
}
@@ -124,6 +126,7 @@ public class HiveIncrementalPuller {
public void saveDelta() throws IOException {
Configuration conf = new Configuration();
conf.set("fs.defaultFS",config.fsDefaultFs);
FileSystem fs = FileSystem.get(conf);
Statement stmt = null;
try {