当前位置: 首页>>代码示例>>Java>>正文


Java AtMostOnce类代码示例

本文整理汇总了Java中org.apache.hadoop.io.retry.AtMostOnce的典型用法代码示例。如果您正苦于以下问题:Java AtMostOnce类的具体用法?Java AtMostOnce怎么用?Java AtMostOnce使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AtMostOnce类属于org.apache.hadoop.io.retry包,在下文中一共展示了AtMostOnce类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: checkAnnotations

import org.apache.hadoop.io.retry.AtMostOnce; //导入依赖的package包/类
@Test
public void checkAnnotations() {
  Method[] methods = NamenodeProtocols.class.getMethods();
  for (Method m : methods) {
    Assert.assertTrue(
        "Idempotent or AtMostOnce annotation is not present " + m,
        m.isAnnotationPresent(Idempotent.class)
            || m.isAnnotationPresent(AtMostOnce.class));
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:11,代码来源:TestAnnotations.java

示例2: nodeHeartbeat

import org.apache.hadoop.io.retry.AtMostOnce; //导入依赖的package包/类
@AtMostOnce
public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request)
    throws YarnException, IOException;
 
开发者ID:naver,项目名称:hadoop,代码行数:4,代码来源:ResourceTracker.java

示例3: createEncryptionZone

import org.apache.hadoop.io.retry.AtMostOnce; //导入依赖的package包/类
/**
 * Create an encryption zone
 */
@AtMostOnce
public void createEncryptionZone(String src, String keyName)
  throws IOException;
 
开发者ID:naver,项目名称:hadoop,代码行数:7,代码来源:ClientProtocol.java

示例4: nodeHeartbeat

import org.apache.hadoop.io.retry.AtMostOnce; //导入依赖的package包/类
@AtMostOnce
NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request)
    throws YarnException, IOException;
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:4,代码来源:ResourceTracker.java

示例5: createEncryptionZone

import org.apache.hadoop.io.retry.AtMostOnce; //导入依赖的package包/类
/**
 * Create an encryption zone.
 */
@AtMostOnce
void createEncryptionZone(String src, String keyName)
  throws IOException;
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:7,代码来源:ClientProtocol.java

示例6:

import org.apache.hadoop.io.retry.AtMostOnce; //导入依赖的package包/类
@AtMostOnce
public MaterializeCryptoKeysResponse materializeCrypto
    (MaterializeCryptoKeysRequest request) throws YarnException, IOException;
 
开发者ID:hopshadoop,项目名称:hops,代码行数:4,代码来源:CertificateLocalizationProtocol.java

示例7: removeCrypto

import org.apache.hadoop.io.retry.AtMostOnce; //导入依赖的package包/类
@AtMostOnce
public RemoveCryptoKeysResponse removeCrypto(RemoveCryptoKeysRequest
    request) throws YarnException, IOException;
 
开发者ID:hopshadoop,项目名称:hops,代码行数:4,代码来源:CertificateLocalizationProtocol.java

示例8: finishApplicationMaster

import org.apache.hadoop.io.retry.AtMostOnce; //导入依赖的package包/类
/**
 * <p>The interface used by an <code>ApplicationMaster</code> to notify the 
 * <code>ResourceManager</code> about its completion (success or failed).</p>
 * 
 * <p>The <code>ApplicationMaster</code> has to provide details such as 
 * final state, diagnostics (in case of failures) etc. as specified in 
 * {@link FinishApplicationMasterRequest}.</p>
 * 
 * <p>The <code>ResourceManager</code> responds with 
 * {@link FinishApplicationMasterResponse}.</p>
 * 
 * @param request completion request
 * @return completion response
 * @throws YarnException
 * @throws IOException
 * @see FinishApplicationMasterRequest
 * @see FinishApplicationMasterResponse
 */
@Public
@Stable
@AtMostOnce
public FinishApplicationMasterResponse finishApplicationMaster(
    FinishApplicationMasterRequest request) 
throws YarnException, IOException;
 
开发者ID:naver,项目名称:hadoop,代码行数:25,代码来源:ApplicationMasterProtocol.java

示例9: create

import org.apache.hadoop.io.retry.AtMostOnce; //导入依赖的package包/类
/**
 * Create a new file entry in the namespace.
 * <p>
 * This will create an empty file specified by the source path.
 * The path should reflect a full path originated at the root.
 * The name-node does not have a notion of "current" directory for a client.
 * <p>
 * Once created, the file is visible and available for read to other clients.
 * Although, other clients cannot {@link #delete(String, boolean)}, re-create or 
 * {@link #rename(String, String)} it until the file is completed
 * or explicitly as a result of lease expiration.
 * <p>
 * Blocks have a maximum size.  Clients that intend to create
 * multi-block files must also use 
 * {@link #addBlock}
 *
 * @param src path of the file being created.
 * @param masked masked permission.
 * @param clientName name of the current client.
 * @param flag indicates whether the file should be 
 * overwritten if it already exists or create if it does not exist or append.
 * @param createParent create missing parent directory if true
 * @param replication block replication factor.
 * @param blockSize maximum block size.
 * @param supportedVersions CryptoProtocolVersions supported by the client
 * 
 * @return the status of the created file, it could be null if the server
 *           doesn't support returning the file status
 * @throws AccessControlException If access is denied
 * @throws AlreadyBeingCreatedException if the path does not exist.
 * @throws DSQuotaExceededException If file creation violates disk space 
 *           quota restriction
 * @throws FileAlreadyExistsException If file <code>src</code> already exists
 * @throws FileNotFoundException If parent of <code>src</code> does not exist
 *           and <code>createParent</code> is false
 * @throws ParentNotDirectoryException If parent of <code>src</code> is not a
 *           directory.
 * @throws NSQuotaExceededException If file creation violates name space 
 *           quota restriction
 * @throws SafeModeException create not allowed in safemode
 * @throws UnresolvedLinkException If <code>src</code> contains a symlink
 * @throws SnapshotAccessControlException if path is in RO snapshot
 * @throws IOException If an I/O error occurred
 *
 * RuntimeExceptions:
 * @throws InvalidPathException Path <code>src</code> is invalid
 * <p>
 * <em>Note that create with {@link CreateFlag#OVERWRITE} is idempotent.</em>
 */
@AtMostOnce
public HdfsFileStatus create(String src, FsPermission masked,
    String clientName, EnumSetWritable<CreateFlag> flag,
    boolean createParent, short replication, long blockSize, 
    CryptoProtocolVersion[] supportedVersions)
    throws AccessControlException, AlreadyBeingCreatedException,
    DSQuotaExceededException, FileAlreadyExistsException,
    FileNotFoundException, NSQuotaExceededException,
    ParentNotDirectoryException, SafeModeException, UnresolvedLinkException,
    SnapshotAccessControlException, IOException;
 
开发者ID:naver,项目名称:hadoop,代码行数:60,代码来源:ClientProtocol.java

示例10: rename2

import org.apache.hadoop.io.retry.AtMostOnce; //导入依赖的package包/类
/**
 * Rename src to dst.
 * <ul>
 * <li>Fails if src is a file and dst is a directory.
 * <li>Fails if src is a directory and dst is a file.
 * <li>Fails if the parent of dst does not exist or is a file.
 * </ul>
 * <p>
 * Without OVERWRITE option, rename fails if the dst already exists.
 * With OVERWRITE option, rename overwrites the dst, if it is a file 
 * or an empty directory. Rename fails if dst is a non-empty directory.
 * <p>
 * This implementation of rename is atomic.
 * <p>
 * @param src existing file or directory name.
 * @param dst new name.
 * @param options Rename options
 * 
 * @throws AccessControlException If access is denied
 * @throws DSQuotaExceededException If rename violates disk space 
 *           quota restriction
 * @throws FileAlreadyExistsException If <code>dst</code> already exists and
 *           <code>options</options> has {@link Rename#OVERWRITE} option
 *           false.
 * @throws FileNotFoundException If <code>src</code> does not exist
 * @throws NSQuotaExceededException If rename violates namespace 
 *           quota restriction
 * @throws ParentNotDirectoryException If parent of <code>dst</code> 
 *           is not a directory
 * @throws SafeModeException rename not allowed in safemode
 * @throws UnresolvedLinkException If <code>src</code> or
 *           <code>dst</code> contains a symlink
 * @throws SnapshotAccessControlException if path is in RO snapshot
 * @throws IOException If an I/O error occurred
 */
@AtMostOnce
public void rename2(String src, String dst, Options.Rename... options)
    throws AccessControlException, DSQuotaExceededException,
    FileAlreadyExistsException, FileNotFoundException,
    NSQuotaExceededException, ParentNotDirectoryException, SafeModeException,
    UnresolvedLinkException, SnapshotAccessControlException, IOException;
 
开发者ID:naver,项目名称:hadoop,代码行数:42,代码来源:ClientProtocol.java

示例11: createSymlink

import org.apache.hadoop.io.retry.AtMostOnce; //导入依赖的package包/类
/**
 * Create symlink to a file or directory.
 * @param target The path of the destination that the
 *               link points to.
 * @param link The path of the link being created.
 * @param dirPerm permissions to use when creating parent directories
 * @param createParent - if true then missing parent dirs are created
 *                       if false then parent must exist
 *
 * @throws AccessControlException permission denied
 * @throws FileAlreadyExistsException If file <code>link</code> already exists
 * @throws FileNotFoundException If parent of <code>link</code> does not exist
 *           and <code>createParent</code> is false
 * @throws ParentNotDirectoryException If parent of <code>link</code> is not a
 *           directory.
 * @throws UnresolvedLinkException if <code>link</target> contains a symlink. 
 * @throws SnapshotAccessControlException if path is in RO snapshot
 * @throws IOException If an I/O error occurred
 */
@AtMostOnce
public void createSymlink(String target, String link, FsPermission dirPerm,
    boolean createParent) throws AccessControlException,
    FileAlreadyExistsException, FileNotFoundException,
    ParentNotDirectoryException, SafeModeException, UnresolvedLinkException,
    SnapshotAccessControlException, IOException;
 
开发者ID:naver,项目名称:hadoop,代码行数:26,代码来源:ClientProtocol.java

示例12: create

import org.apache.hadoop.io.retry.AtMostOnce; //导入依赖的package包/类
/**
 * Create a new file entry in the namespace.
 * <p>
 * This will create an empty file specified by the source path.
 * The path should reflect a full path originated at the root.
 * The name-node does not have a notion of "current" directory for a client.
 * <p>
 * Once created, the file is visible and available for read to other clients.
 * Although, other clients cannot {@link #delete(String, boolean)}, re-create
 * or {@link #rename(String, String)} it until the file is completed
 * or explicitly as a result of lease expiration.
 * <p>
 * Blocks have a maximum size.  Clients that intend to create
 * multi-block files must also use
 * {@link #addBlock}
 *
 * @param src path of the file being created.
 * @param masked masked permission.
 * @param clientName name of the current client.
 * @param flag indicates whether the file should be
 * overwritten if it already exists or create if it does not exist or append.
 * @param createParent create missing parent directory if true
 * @param replication block replication factor.
 * @param blockSize maximum block size.
 * @param supportedVersions CryptoProtocolVersions supported by the client
 *
 * @return the status of the created file, it could be null if the server
 *           doesn't support returning the file status
 * @throws org.apache.hadoop.security.AccessControlException If access is
 *           denied
 * @throws AlreadyBeingCreatedException if the path does not exist.
 * @throws DSQuotaExceededException If file creation violates disk space
 *           quota restriction
 * @throws org.apache.hadoop.fs.FileAlreadyExistsException If file
 *           <code>src</code> already exists
 * @throws java.io.FileNotFoundException If parent of <code>src</code> does
 *           not exist and <code>createParent</code> is false
 * @throws org.apache.hadoop.fs.ParentNotDirectoryException If parent of
 *           <code>src</code> is not a directory.
 * @throws NSQuotaExceededException If file creation violates name space
 *           quota restriction
 * @throws org.apache.hadoop.hdfs.server.namenode.SafeModeException create not
 *           allowed in safemode
 * @throws org.apache.hadoop.fs.UnresolvedLinkException If <code>src</code>
 *           contains a symlink
 * @throws SnapshotAccessControlException if path is in RO snapshot
 * @throws IOException If an I/O error occurred
 *
 * RuntimeExceptions:
 * @throws org.apache.hadoop.fs.InvalidPathException Path <code>src</code> is
 *           invalid
 * <p>
 * <em>Note that create with {@link CreateFlag#OVERWRITE} is idempotent.</em>
 */
@AtMostOnce
HdfsFileStatus create(String src, FsPermission masked,
    String clientName, EnumSetWritable<CreateFlag> flag,
    boolean createParent, short replication, long blockSize,
    CryptoProtocolVersion[] supportedVersions)
    throws IOException;
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:61,代码来源:ClientProtocol.java

示例13: create

import org.apache.hadoop.io.retry.AtMostOnce; //导入依赖的package包/类
/**
 * Create a new file entry in the namespace.
 * <p>
 * This will create an empty file specified by the source path.
 * The path should reflect a full path originated at the root.
 * The name-node does not have a notion of "current" directory for a client.
 * <p>
 * Once created, the file is visible and available for read to other clients.
 * Although, other clients cannot {@link #delete(String, boolean)}, re-create or 
 * {@link #rename(String, String)} it until the file is completed
 * or explicitly as a result of lease expiration.
 * <p>
 * Blocks have a maximum size.  Clients that intend to create
 * multi-block files must also use 
 * {@link #addBlock}
 *
 * @param src path of the file being created.
 * @param masked masked permission.
 * @param clientName name of the current client.
 * @param flag indicates whether the file should be 
 * overwritten if it already exists or create if it does not exist or append.
 * @param createParent create missing parent directory if true
 * @param replication block replication factor.
 * @param blockSize maximum block size.
 * 
 * @return the status of the created file, it could be null if the server
 *           doesn't support returning the file status
 * @throws AccessControlException If access is denied
 * @throws AlreadyBeingCreatedException if the path does not exist.
 * @throws DSQuotaExceededException If file creation violates disk space 
 *           quota restriction
 * @throws FileAlreadyExistsException If file <code>src</code> already exists
 * @throws FileNotFoundException If parent of <code>src</code> does not exist
 *           and <code>createParent</code> is false
 * @throws ParentNotDirectoryException If parent of <code>src</code> is not a
 *           directory.
 * @throws NSQuotaExceededException If file creation violates name space 
 *           quota restriction
 * @throws SafeModeException create not allowed in safemode
 * @throws UnresolvedLinkException If <code>src</code> contains a symlink
 * @throws SnapshotAccessControlException if path is in RO snapshot
 * @throws IOException If an I/O error occurred
 *
 * RuntimeExceptions:
 * @throws InvalidPathException Path <code>src</code> is invalid
 * <p>
 * <em>Note that create with {@link CreateFlag#OVERWRITE} is idempotent.</em>
 */
@AtMostOnce
public HdfsFileStatus create(String src, FsPermission masked,
    String clientName, EnumSetWritable<CreateFlag> flag,
    boolean createParent, short replication, long blockSize)
    throws AccessControlException, AlreadyBeingCreatedException,
    DSQuotaExceededException, FileAlreadyExistsException,
    FileNotFoundException, NSQuotaExceededException,
    ParentNotDirectoryException, SafeModeException, UnresolvedLinkException,
    SnapshotAccessControlException, IOException;
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:58,代码来源:ClientProtocol.java


注:本文中的org.apache.hadoop.io.retry.AtMostOnce类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。