Class HdfsVirtualFile

    • Constructor Detail

      • HdfsVirtualFile

        public HdfsVirtualFile​(org.apache.hadoop.fs.FileSystem fileSystem,
                               org.apache.hadoop.fs.FileStatus fileStatus)
    • Method Detail

      • openInputStream

        public InputStream openInputStream​(boolean lock)
                                    throws IOException
        Description copied from interface: VirtualFile
        Open a stream for reading
        Specified by:
        openInputStream in interface VirtualFile
        Parameters:
        lock - true if a lock is requested. It's up to the implementation whether to actually honor the lock.
        Throws:
        IOException
      • openOutputStream

        public OutputStream openOutputStream​(boolean lock)
                                      throws IOException
        Description copied from interface: VirtualFile
        Open a stream for writing
        Specified by:
        openOutputStream in interface VirtualFile
        Parameters:
        lock - true if a lock is requested. It's up to the implementation whether to actually honor the lock.
        Throws:
        IOException
      • getLastModified

        public long getLastModified()
        Description copied from interface: VirtualFile
        The last modified time in UTC milliseconds
        Specified by:
        getLastModified in interface VirtualFile
      • getCreationTime

        public long getCreationTime()
        Description copied from interface: VirtualFile
        The creation time in UTC milliseconds
        Specified by:
        getCreationTime in interface VirtualFile
      • getSize

        public long getSize()
        Description copied from interface: VirtualFile
        The size in bytes.
        Specified by:
        getSize in interface VirtualFile
        Returns:
        the size or -1 if unknown.