Package org.apache.pinot.spi.filesystem
Class BasePinotFS
- java.lang.Object
-
- org.apache.pinot.spi.filesystem.BasePinotFS
-
- All Implemented Interfaces:
Closeable,Serializable,AutoCloseable,PinotFS
- Direct Known Subclasses:
LocalPinotFS
public abstract class BasePinotFS extends Object implements PinotFS
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BasePinotFS()
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.pinot.spi.filesystem.PinotFS
close, copy, copyDir, copyFromLocalDir, copyFromLocalFile, copyToLocalFile, delete, exists, init, isDirectory, lastModified, length, listFiles, listFilesWithMetadata, mkdir, open, touch
-
-
-
-
Method Detail
-
move
public boolean move(URI srcUri, URI dstUri, boolean overwrite) throws IOException
Description copied from interface:PinotFSMoves the file or directory from the src to dst. Does not keep the original file. If the dst has parent directories that haven't been created, this method will create all the necessary parent directories. Note: In Pinot we recommend the full paths of both src and dst be specified. For example, if a file /a/b/c is moved to a file /x/y/z, in the case of overwrite, the directory /a/b still exists, but will not contain the file 'c'. Instead, /x/y/z will contain the contents of 'c'. If src is a directory /a/b which contains two files /a/b/c and /a/b/d, and the dst is /x/y, the result would be that the directory /a/b under /a gets removed and dst directory contains two files which is /x/y/c and /x/y/d. If src is a directory /a/b needs to be moved under another directory /x/y, please specify the dst to /x/y/b.- Specified by:
movein interfacePinotFS- Parameters:
srcUri- URI of the original filedstUri- URI of the final file locationoverwrite- true if we want to overwrite the dstURI, false otherwise- Returns:
- true if move is successful
- Throws:
IOException- on IO failure
-
doMove
protected abstract boolean doMove(URI srcUri, URI dstUri) throws IOException
Actual move implementation for each PinotFS. It should not be directly called, instead usePinotFS.move(URI, URI, boolean).- Throws:
IOException
-
-