@Internal public class PartitionLoader extends Object implements Closeable
This provide two interface to load:
1.loadPartition(java.util.LinkedHashMap<java.lang.String, java.lang.String>, java.util.List<org.apache.flink.core.fs.Path>)
: load temporary partitioned files, if it is new partition,
will create partition to meta store.
2.loadNonPartition(java.util.List<org.apache.flink.core.fs.Path>)
: just rename all files to final output path.
TODO: src and dest may be on different FS.
Constructor and Description |
---|
PartitionLoader(boolean overwrite,
FileSystem fs,
TableMetaStoreFactory factory) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
loadNonPartition(List<Path> srcDirs)
Load a non-partition files to output path.
|
void |
loadPartition(LinkedHashMap<String,String> partSpec,
List<Path> srcDirs)
Load a single partition.
|
public PartitionLoader(boolean overwrite, FileSystem fs, TableMetaStoreFactory factory) throws Exception
Exception
public void loadPartition(LinkedHashMap<String,String> partSpec, List<Path> srcDirs) throws Exception
Exception
public void loadNonPartition(List<Path> srcDirs) throws Exception
Exception
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.