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