@InterfaceAudience.Public @InterfaceStability.Stable public abstract class ChecksumFileSystem extends FilterFileSystem
fs, swapSchemeDEFAULT_FS, FS_DEFAULT_NAME_KEY, LOG, SHUTDOWN_HOOK_PRIORITY, statistics, TRASH_PREFIX| コンストラクタと説明 | 
|---|
| ChecksumFileSystem(FileSystem fs) | 
| 修飾子とタイプ | メソッドと説明 | 
|---|---|
| FSDataOutputStream | append(Path f,
      int bufferSize,
      Progressable progress)Append to an existing file (optional operation). | 
| void | completeLocalOutput(Path fsOutputFile,
                   Path tmpLocalFile)Called when we're all done writing to the target. | 
| void | copyFromLocalFile(boolean delSrc,
                 Path src,
                 Path dst)The src file is on the local disk. | 
| void | copyToLocalFile(boolean delSrc,
               Path src,
               Path dst)The src file is under FS, and the dst is on the local disk. | 
| void | copyToLocalFile(Path src,
               Path dst,
               boolean copyCrc)The src file is under FS, and the dst is on the local disk. | 
| FSDataOutputStream | create(Path f,
      FsPermission permission,
      boolean overwrite,
      int bufferSize,
      short replication,
      long blockSize,
      Progressable progress)Create an FSDataOutputStream at the indicated Path with write-progress
 reporting. | 
| FSDataOutputStream | createNonRecursive(Path f,
                  FsPermission permission,
                  boolean overwrite,
                  int bufferSize,
                  short replication,
                  long blockSize,
                  Progressable progress)Opens an FSDataOutputStream at the indicated Path with write-progress
 reporting. | 
| boolean | delete(Path f,
      boolean recursive)Implement the delete(Path, boolean) in checksum
 file system. | 
| static double | getApproxChkSumLength(long size) | 
| int | getBytesPerSum()Return the bytes Per Checksum | 
| Path | getChecksumFile(Path file)Return the name of the checksum file associated with a file. | 
| long | getChecksumFileLength(Path file,
                     long fileSize)Return the length of the checksum file given the size of the 
 actual file. | 
| static long | getChecksumLength(long size,
                 int bytesPerSum)Calculated the length of the checksum file in bytes. | 
| FileSystem | getRawFileSystem()get the raw file system | 
| static boolean | isChecksumFile(Path file)Return true iff file is a checksum file name. | 
| org.apache.hadoop.fs.RemoteIterator<LocatedFileStatus> | listLocatedStatus(Path f)List the statuses of the files/directories in the given path if the path is
 a directory. | 
| FileStatus[] | listStatus(Path f)List the statuses of the files/directories in the given path if the path is
 a directory. | 
| boolean | mkdirs(Path f)Call  FileSystem.mkdirs(Path, FsPermission)with default permission. | 
| void | modifyAclEntries(Path src,
                List<AclEntry> aclSpec)Modifies ACL entries of files and directories. | 
| FSDataInputStream | open(Path f,
    int bufferSize)Opens an FSDataInputStream at the indicated Path. | 
| void | removeAcl(Path src)Removes all but the base ACL entries of files and directories. | 
| void | removeAclEntries(Path src,
                List<AclEntry> aclSpec)Removes ACL entries from files and directories. | 
| void | removeDefaultAcl(Path src)Removes all default ACL entries from files and directories. | 
| boolean | rename(Path src,
      Path dst)Rename files/dirs | 
| boolean | reportChecksumFailure(Path f,
                     FSDataInputStream in,
                     long inPos,
                     FSDataInputStream sums,
                     long sumsPos)Report a checksum error to the file system. | 
| void | setAcl(Path src,
      List<AclEntry> aclSpec)Fully replaces ACL of files and directories, discarding all existing
 entries. | 
| void | setConf(Configuration conf)Set the configuration to be used by this object. | 
| void | setOwner(Path src,
        String username,
        String groupname)Set owner of a path (i.e. a file or a directory). | 
| void | setPermission(Path src,
             FsPermission permission)Set permission of a path. | 
| boolean | setReplication(Path src,
              short replication)Set replication for an existing file. | 
| void | setVerifyChecksum(boolean verifyChecksum)Set whether to verify checksum. | 
| void | setWriteChecksum(boolean writeChecksum)Set the write checksum flag. | 
| Path | startLocalOutput(Path fsOutputFile,
                Path tmpLocalFile)Returns a local File that the user can write output to. | 
| boolean | truncate(Path f,
        long newLength)Truncate the file in the indicated path to the indicated size. | 
access, canonicalizeUri, checkPath, close, concat, copyFromLocalFile, copyFromLocalFile, create, createNonRecursive, createSnapshot, createSymlink, deleteSnapshot, getAclStatus, getAllStoragePolicies, getCanonicalUri, getChildFileSystems, getConf, getDefaultBlockSize, getDefaultBlockSize, getDefaultReplication, getDefaultReplication, getFileBlockLocations, getFileChecksum, getFileChecksum, getFileLinkStatus, getFileStatus, getHomeDirectory, getInitialWorkingDirectory, getLinkTarget, getServerDefaults, getServerDefaults, getStatus, getStoragePolicy, getTrashRoot, getTrashRoots, getUri, getUsed, getUsed, getWorkingDirectory, getXAttr, getXAttrs, getXAttrs, initialize, listCorruptFileBlocks, listLocatedStatus, listStatusIterator, listXAttrs, makeQualified, mkdirs, primitiveCreate, primitiveMkdir, removeXAttr, renameSnapshot, resolveLink, resolvePath, setStoragePolicy, setTimes, setWorkingDirectory, setXAttr, setXAttr, supportsSymlinks, unsetStoragePolicyappend, append, areSymlinksEnabled, cancelDeleteOnExit, clearStatistics, closeAll, closeAllForUGI, copyFromLocalFile, copyToLocalFile, copyToLocalFile, create, create, create, create, create, create, create, create, create, create, create, createNewFile, createNonRecursive, createSnapshot, delete, deleteOnExit, enableSymlinks, exists, fixRelativePart, get, get, get, getAllStatistics, getBlockSize, getContentSummary, getDefaultPort, getDefaultUri, getFileBlockLocations, getFileSystemClass, getFSofPath, getGlobalStorageStatistics, getLength, getLocal, getName, getNamed, getQuotaUsage, getReplication, getScheme, getStatistics, getStatistics, getStatus, getStorageStatistics, globStatus, globStatus, isDirectory, isFile, listFiles, listStatus, listStatus, listStatus, mkdirs, moveFromLocalFile, moveFromLocalFile, moveToLocalFile, newInstance, newInstance, newInstance, newInstanceLocal, open, primitiveMkdir, printStatistics, processDeleteOnExit, rename, setDefaultUri, setDefaultUripublic ChecksumFileSystem(FileSystem fs)
public static double getApproxChkSumLength(long size)
public void setConf(Configuration conf)
ConfigurablesetConf インタフェース内 ConfigurablesetConf クラス内 Configuredpublic void setVerifyChecksum(boolean verifyChecksum)
setVerifyChecksum クラス内 FilterFileSystemverifyChecksum - Verify checksum flagpublic void setWriteChecksum(boolean writeChecksum)
FileSystemsetWriteChecksum クラス内 FilterFileSystemwriteChecksum - Write checsum flagpublic FileSystem getRawFileSystem()
getRawFileSystem クラス内 FilterFileSystempublic Path getChecksumFile(Path file)
public static boolean isChecksumFile(Path file)
public long getChecksumFileLength(Path file, long fileSize)
public int getBytesPerSum()
public FSDataInputStream open(Path f, int bufferSize) throws IOException
open クラス内 FilterFileSystemf - the file name to openbufferSize - the size of the buffer to be used.IOExceptionpublic FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException
FileSystemappend クラス内 FilterFileSystemf - the existing file to be appended.bufferSize - the size of the buffer to be used.progress - for reporting progress if it is not null.IOExceptionpublic boolean truncate(Path f, long newLength) throws IOException
FileSystemtruncate クラス内 FilterFileSystemf - The path to the file to be truncatednewLength - The size the file is to be truncated totrue if the file has been truncated to the desired
 newLength and is immediately available to be reused for
 write operations such as append, or
 false if a background process of adjusting the length of
 the last block has been started, and clients should wait for it to
 complete before proceeding with further file updates.IOExceptionpublic static long getChecksumLength(long size, int bytesPerSum)
size - the length of the data file in bytesbytesPerSum - the number of bytes in a checksum blockpublic FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException
FileSystemcreate クラス内 FilterFileSystemf - the file name to openpermission - file permissionoverwrite - if a file with this name already exists, then if true,
   the file will be overwritten, and if false an error will be thrown.bufferSize - the size of the buffer to be used.replication - required block replication for the file.blockSize - block sizeprogress - the progress reporterIOExceptionFileSystem.setPermission(Path, FsPermission)public FSDataOutputStream createNonRecursive(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException
FileSystemcreateNonRecursive クラス内 FileSystemf - the file name to openpermission - file permissionoverwrite - if a file with this name already exists, then if true,
 the file will be overwritten, and if false an error will be thrown.bufferSize - the size of the buffer to be used.replication - required block replication for the file.blockSize - block sizeprogress - the progress reporterIOExceptionFileSystem.setPermission(Path, FsPermission)public void setPermission(Path src, FsPermission permission) throws IOException
FileSystemsetPermission クラス内 FilterFileSystemsrc - The pathpermission - permissionIOExceptionpublic void setOwner(Path src, String username, String groupname) throws IOException
FileSystemsetOwner クラス内 FilterFileSystemsrc - The pathusername - If it is null, the original username remains unchanged.groupname - If it is null, the original groupname remains unchanged.IOExceptionpublic void setAcl(Path src, List<AclEntry> aclSpec) throws IOException
FileSystemsetAcl クラス内 FilterFileSystemsrc - Path to modifyaclSpec - ListIOException - if an ACL could not be modifiedpublic void modifyAclEntries(Path src, List<AclEntry> aclSpec) throws IOException
FileSystemmodifyAclEntries クラス内 FilterFileSystemsrc - Path to modifyaclSpec - ListIOException - if an ACL could not be modifiedpublic void removeAcl(Path src) throws IOException
FileSystemremoveAcl クラス内 FilterFileSystemsrc - Path to modifyIOException - if an ACL could not be removedpublic void removeAclEntries(Path src, List<AclEntry> aclSpec) throws IOException
FileSystemremoveAclEntries クラス内 FilterFileSystemsrc - Path to modifyaclSpec - ListIOException - if an ACL could not be modifiedpublic void removeDefaultAcl(Path src) throws IOException
FileSystemremoveDefaultAcl クラス内 FilterFileSystemsrc - Path to modifyIOException - if an ACL could not be modifiedpublic boolean setReplication(Path src, short replication) throws IOException
setReplication クラス内 FilterFileSystemsrc - file namereplication - new replicationIOExceptionpublic boolean rename(Path src, Path dst) throws IOException
rename クラス内 FilterFileSystemsrc - path to be renameddst - new path after renameIOException - on failurepublic boolean delete(Path f, boolean recursive) throws IOException
delete クラス内 FilterFileSystemf - the path to delete.recursive - if path is a directory and set to 
 true, the directory is deleted else throws an exception. In
 case of a file the recursive can be set to either true or false.IOExceptionpublic FileStatus[] listStatus(Path f) throws IOException
listStatus クラス内 FilterFileSystemf - given pathIOExceptionFileNotFoundException - when the path does not exist;
         IOException see specific implementationpublic org.apache.hadoop.fs.RemoteIterator<LocatedFileStatus> listLocatedStatus(Path f) throws IOException
listLocatedStatus クラス内 FilterFileSystemf - given pathIOExceptionFileNotFoundException - If f does not existpublic boolean mkdirs(Path f) throws IOException
FileSystemFileSystem.mkdirs(Path, FsPermission) with default permission.mkdirs クラス内 FileSystemIOExceptionpublic void copyFromLocalFile(boolean delSrc, Path src, Path dst) throws IOException
FilterFileSystemcopyFromLocalFile クラス内 FilterFileSystemdelSrc - whether to delete the srcsrc - pathdst - pathIOExceptionpublic void copyToLocalFile(boolean delSrc, Path src, Path dst) throws IOException
copyToLocalFile クラス内 FilterFileSystemdelSrc - whether to delete the srcsrc - pathdst - pathIOExceptionpublic void copyToLocalFile(Path src, Path dst, boolean copyCrc) throws IOException
IOExceptionpublic Path startLocalOutput(Path fsOutputFile, Path tmpLocalFile) throws IOException
FilterFileSystemstartLocalOutput クラス内 FilterFileSystemfsOutputFile - path of output filetmpLocalFile - path of local tmp fileIOExceptionpublic void completeLocalOutput(Path fsOutputFile, Path tmpLocalFile) throws IOException
FilterFileSystemcompleteLocalOutput クラス内 FilterFileSystemfsOutputFile - path of output filetmpLocalFile - path to local tmp fileIOExceptionpublic boolean reportChecksumFailure(Path f, FSDataInputStream in, long inPos, FSDataInputStream sums, long sumsPos)
f - the file name containing the errorin - the stream open on the fileinPos - the position of the beginning of the bad data in the filesums - the stream open on the checksum filesumsPos - the position of the beginning of the bad data in the checksum fileCopyright © 2016 Apache Software Foundation. All rights reserved.