Java 类org.apache.hadoop.io.retry.Idempotent 实例源码

项目:hadoop    文件:ResourceManagerAdministrationProtocol.java   
@Public
@Stable
@Idempotent
public RefreshSuperUserGroupsConfigurationResponse 
refreshSuperUserGroupsConfiguration(
    RefreshSuperUserGroupsConfigurationRequest request)
throws StandbyException, YarnException, IOException;
项目:hadoop    文件:TestAnnotations.java   
@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));
  }
}
项目:hadoop    文件:DatanodeProtocol.java   
@Idempotent
public NamespaceInfo versionRequest() throws IOException;
项目:hadoop    文件:ResourceTracker.java   
@Idempotent
public RegisterNodeManagerResponse registerNodeManager(
    RegisterNodeManagerRequest request) throws YarnException,
    IOException;
项目:hadoop    文件:ResourceManagerAdministrationProtocol.java   
@Public
@Stable
@Idempotent
public RefreshQueuesResponse refreshQueues(RefreshQueuesRequest request) 
throws StandbyException, YarnException, IOException;
项目:hadoop    文件:ResourceManagerAdministrationProtocol.java   
@Public
@Stable
@Idempotent
public RefreshNodesResponse refreshNodes(RefreshNodesRequest request)
throws StandbyException, YarnException, IOException;
项目:hadoop    文件:ResourceManagerAdministrationProtocol.java   
@Public
@Stable
@Idempotent
public RefreshUserToGroupsMappingsResponse refreshUserToGroupsMappings(
    RefreshUserToGroupsMappingsRequest request)
throws StandbyException, YarnException, IOException;
项目:hadoop    文件:ResourceManagerAdministrationProtocol.java   
@Public
@Stable
@Idempotent
public RefreshAdminAclsResponse refreshAdminAcls(
    RefreshAdminAclsRequest request)
throws YarnException, IOException;
项目:hadoop    文件:ResourceManagerAdministrationProtocol.java   
@Public
@Stable
@Idempotent
public RefreshServiceAclsResponse refreshServiceAcls(
    RefreshServiceAclsRequest request)
throws YarnException, IOException;
项目:hadoop    文件:ResourceManagerAdministrationProtocol.java   
@Public
@Evolving
@Idempotent
public ReplaceLabelsOnNodeResponse replaceLabelsOnNode(
    ReplaceLabelsOnNodeRequest request) throws YarnException, IOException;
项目:hadoop    文件:ClientProtocol.java   
/**
 * Get a report on the current datanode storages.
 */
@Idempotent
public DatanodeStorageReport[] getDatanodeStorageReport(
    HdfsConstants.DatanodeReportType type) throws IOException;
项目:hadoop    文件:DatanodeProtocol.java   
/**
 * errorReport() tells the NameNode about something that has gone
 * awry.  Useful for debugging.
 */
@Idempotent
public void errorReport(DatanodeRegistration registration,
                        int errorCode, 
                        String msg) throws IOException;
项目:hadoop    文件:DatanodeProtocol.java   
/**
 * Commit block synchronization in lease recovery
 */
@Idempotent
public void commitBlockSynchronization(ExtendedBlock block,
    long newgenerationstamp, long newlength,
    boolean closeFile, boolean deleteblock, DatanodeID[] newtargets,
    String[] newtargetstorages) throws IOException;
项目:hadoop    文件:ClientProtocol.java   
/**
 * Get the encryption zone for a path.
 */
@Idempotent
public EncryptionZone getEZForPath(String src)
  throws IOException;
项目:hadoop    文件:DatanodeProtocol.java   
/**
 * sendHeartbeat() tells the NameNode that the DataNode is still
 * alive and well.  Includes some status info, too. 
 * It also gives the NameNode a chance to return 
 * an array of "DatanodeCommand" objects in HeartbeatResponse.
 * A DatanodeCommand tells the DataNode to invalidate local block(s), 
 * or to copy them to other DataNodes, etc.
 * @param registration datanode registration information
 * @param reports utilization report per storage
 * @param xmitsInProgress number of transfers from this datanode to others
 * @param xceiverCount number of active transceiver threads
 * @param failedVolumes number of failed volumes
 * @param volumeFailureSummary info about volume failures
 * @throws IOException on error
 */
@Idempotent
public HeartbeatResponse sendHeartbeat(DatanodeRegistration registration,
                                     StorageReport[] reports,
                                     long dnCacheCapacity,
                                     long dnCacheUsed,
                                     int xmitsInProgress,
                                     int xceiverCount,
                                     int failedVolumes,
                                     VolumeFailureSummary volumeFailureSummary)
    throws IOException;
项目:hadoop    文件:ApplicationClientProtocol.java   
/**
 * <p>The interface used by clients to submit a new application to the
 * <code>ResourceManager.</code></p>
 * 
 * <p>The client is required to provide details such as queue, 
 * {@link Resource} required to run the <code>ApplicationMaster</code>, 
 * the equivalent of {@link ContainerLaunchContext} for launching
 * the <code>ApplicationMaster</code> etc. via the 
 * {@link SubmitApplicationRequest}.</p>
 * 
 * <p>Currently the <code>ResourceManager</code> sends an immediate (empty) 
 * {@link SubmitApplicationResponse} on accepting the submission and throws 
 * an exception if it rejects the submission. However, this call needs to be
 * followed by {@link #getApplicationReport(GetApplicationReportRequest)}
 * to make sure that the application gets properly submitted - obtaining a
 * {@link SubmitApplicationResponse} from ResourceManager doesn't guarantee
 * that RM 'remembers' this application beyond failover or restart. If RM
 * failover or RM restart happens before ResourceManager saves the
 * application's state successfully, the subsequent
 * {@link #getApplicationReport(GetApplicationReportRequest)} will throw
 * a {@link ApplicationNotFoundException}. The Clients need to re-submit
 * the application with the same {@link ApplicationSubmissionContext} when
 * it encounters the {@link ApplicationNotFoundException} on the
 * {@link #getApplicationReport(GetApplicationReportRequest)} call.</p>
 * 
 * <p>During the submission process, it checks whether the application
 * already exists. If the application exists, it will simply return
 * SubmitApplicationResponse</p>
 *
 * <p> In secure mode,the <code>ResourceManager</code> verifies access to
 * queues etc. before accepting the application submission.</p>
 * 
 * @param request request to submit a new application
 * @return (empty) response on accepting the submission
 * @throws YarnException
 * @throws IOException
 * @see #getNewApplication(GetNewApplicationRequest)
 */
@Public
@Stable
@Idempotent
public SubmitApplicationResponse submitApplication(
    SubmitApplicationRequest request) 
throws YarnException, IOException;
项目:hadoop    文件:ApplicationClientProtocol.java   
/**
 * <p>The interface used by clients to request the 
 * <code>ResourceManager</code> to abort submitted application.</p>
 * 
 * <p>The client, via {@link KillApplicationRequest} provides the
 * {@link ApplicationId} of the application to be aborted.</p>
 * 
 * <p> In secure mode,the <code>ResourceManager</code> verifies access to the
 * application, queue etc. before terminating the application.</p> 
 * 
 * <p>Currently, the <code>ResourceManager</code> returns an empty response
 * on success and throws an exception on rejecting the request.</p>
 * 
 * @param request request to abort a submitted application
 * @return <code>ResourceManager</code> returns an empty response
 *         on success and throws an exception on rejecting the request
 * @throws YarnException
 * @throws IOException
 * @see #getQueueUserAcls(GetQueueUserAclsInfoRequest) 
 */
@Public
@Stable
@Idempotent
public KillApplicationResponse forceKillApplication(
    KillApplicationRequest request) 
throws YarnException, IOException;
项目:hadoop    文件:ApplicationClientProtocol.java   
/**
 * <p>The interface used by clients to get metrics about the cluster from
 * the <code>ResourceManager</code>.</p>
 * 
 * <p>The <code>ResourceManager</code> responds with a
 * {@link GetClusterMetricsResponse} which includes the 
 * {@link YarnClusterMetrics} with details such as number of current
 * nodes in the cluster.</p>
 * 
 * @param request request for cluster metrics
 * @return cluster metrics
 * @throws YarnException
 * @throws IOException
 */
@Public
@Stable
@Idempotent
public GetClusterMetricsResponse getClusterMetrics(
    GetClusterMetricsRequest request) 
throws YarnException, IOException;
项目:hadoop    文件:ApplicationClientProtocol.java   
/**
 * <p>The interface used by clients to get information about <em>queues</em>
 * from the <code>ResourceManager</code>.</p>
 * 
 * <p>The client, via {@link GetQueueInfoRequest}, can ask for details such
 * as used/total resources, child queues, running applications etc.</p>
 *
 * <p> In secure mode,the <code>ResourceManager</code> verifies access before
 * providing the information.</p> 
 * 
 * @param request request to get queue information
 * @return queue information
 * @throws YarnException
 * @throws IOException
 */
@Public
@Stable
@Idempotent
public GetQueueInfoResponse getQueueInfo(
    GetQueueInfoRequest request) 
throws YarnException, IOException;
项目:hadoop    文件:ApplicationClientProtocol.java   
/**
  * <p>The interface used by clients to get information about <em>queue 
  * acls</em> for <em>current user</em> from the <code>ResourceManager</code>.
  * </p>
  * 
  * <p>The <code>ResourceManager</code> responds with queue acls for all
  * existing queues.</p>
  * 
  * @param request request to get queue acls for <em>current user</em>
  * @return queue acls for <em>current user</em>
  * @throws YarnException
  * @throws IOException
  */
 @Public
 @Stable
@Idempotent
 public GetQueueUserAclsInfoResponse getQueueUserAcls(
     GetQueueUserAclsInfoRequest request) 
 throws YarnException, IOException;
项目:hadoop    文件:ApplicationBaseProtocol.java   
/**
 * <p>
 * The interface used by clients to get a report of Applications matching the
 * filters defined by {@link GetApplicationsRequest} in the cluster from the
 * <code>ResourceManager</code> or <code>ApplicationHistoryServer</code>.
 * </p>
 *
 * <p>
 * The <code>ResourceManager</code> or <code>ApplicationHistoryServer</code>
 * responds with a {@link GetApplicationsResponse} which includes the
 * {@link ApplicationReport} for the applications.
 * </p>
 *
 * <p>
 * If the user does not have <code>VIEW_APP</code> access for an application
 * then the corresponding report will be filtered as described in
 * {@link #getApplicationReport(GetApplicationReportRequest)}.
 * </p>
 *
 * @param request
 *          request for report on applications
 * @return report on applications matching the given application types defined
 *         in the request
 * @throws YarnException
 * @throws IOException
 * @see GetApplicationsRequest
 */
@Public
@Stable
@Idempotent
public GetApplicationsResponse
    getApplications(GetApplicationsRequest request) throws YarnException,
        IOException;
项目:hadoop    文件:ApplicationBaseProtocol.java   
/**
 * The interface used by clients to get a report of an Application Attempt
 * from the <code>ResourceManager</code> or
 * <code>ApplicationHistoryServer</code>
 * <p>
 * The client, via {@link GetApplicationAttemptReportRequest} provides the
 * {@link ApplicationAttemptId} of the application attempt.
 * <p>
 * In secure mode,the <code>ResourceManager</code> or
 * <code>ApplicationHistoryServer</code> verifies access to the method before
 * accepting the request.
 * <p>
 * The <code>ResourceManager</code> or <code>ApplicationHistoryServer</code>
 * responds with a {@link GetApplicationAttemptReportResponse} which includes
 * the {@link ApplicationAttemptReport} for the application attempt.
 * <p>
 * If the user does not have <code>VIEW_APP</code> access then the following
 * fields in the report will be set to stubbed values:
 * <ul>
 *   <li>host</li>
 *   <li>RPC port</li>
 *   <li>client token</li>
 *   <li>diagnostics - set to "N/A"</li>
 *   <li>tracking URL</li>
 * </ul>
 *
 * @param request
 *          request for an application attempt report
 * @return application attempt report
 * @throws YarnException
 * @throws IOException
 */
@Public
@Unstable
@Idempotent
public GetApplicationAttemptReportResponse getApplicationAttemptReport(
    GetApplicationAttemptReportRequest request) throws YarnException,
    IOException;
项目:hadoop    文件:ApplicationMasterProtocol.java   
/**
 * <p>
 * The interface used by a new <code>ApplicationMaster</code> to register with
 * the <code>ResourceManager</code>.
 * </p>
 * 
 * <p>
 * The <code>ApplicationMaster</code> needs to provide details such as RPC
 * Port, HTTP tracking url etc. as specified in
 * {@link RegisterApplicationMasterRequest}.
 * </p>
 * 
 * <p>
 * The <code>ResourceManager</code> responds with critical details such as
 * maximum resource capabilities in the cluster as specified in
 * {@link RegisterApplicationMasterResponse}.
 * </p>
 * 
 * @param request
 *          registration request
 * @return registration respose
 * @throws YarnException
 * @throws IOException
 * @throws InvalidApplicationMasterRequestException
 *           The exception is thrown when an ApplicationMaster tries to
 *           register more then once.
 * @see RegisterApplicationMasterRequest
 * @see RegisterApplicationMasterResponse
 */
@Public
@Stable
@Idempotent
public RegisterApplicationMasterResponse registerApplicationMaster(
    RegisterApplicationMasterRequest request) 
throws YarnException, IOException;
项目:hadoop    文件:ClientProtocol.java   
/** 
 * Get a datanode for an existing pipeline.
 * 
 * @param src the file being written
 * @param fileId the ID of the file being written
 * @param blk the block being written
 * @param existings the existing nodes in the pipeline
 * @param excludes the excluded nodes
 * @param numAdditionalNodes number of additional datanodes
 * @param clientName the name of the client
 * 
 * @return the located block.
 * 
 * @throws AccessControlException If access is denied
 * @throws FileNotFoundException If file <code>src</code> is not found
 * @throws SafeModeException create not allowed in safemode
 * @throws UnresolvedLinkException If <code>src</code> contains a symlink
 * @throws IOException If an I/O error occurred
 */
@Idempotent
public LocatedBlock getAdditionalDatanode(final String src,
    final long fileId, final ExtendedBlock blk,
    final DatanodeInfo[] existings,
    final String[] existingStorageIDs,
    final DatanodeInfo[] excludes,
    final int numAdditionalNodes, final String clientName
    ) throws AccessControlException, FileNotFoundException,
        SafeModeException, UnresolvedLinkException, IOException;
项目:hadoop    文件:ClientProtocol.java   
/**
 * Get a partial listing of the indicated directory
 *
 * @param src the directory name
 * @param startAfter the name to start listing after encoded in java UTF8
 * @param needLocation if the FileStatus should contain block locations
 *
 * @return a partial listing starting after startAfter
 *
 * @throws AccessControlException permission denied
 * @throws FileNotFoundException file <code>src</code> is not found
 * @throws UnresolvedLinkException If <code>src</code> contains a symlink
 * @throws IOException If an I/O error occurred
 */
@Idempotent
public DirectoryListing getListing(String src,
                                   byte[] startAfter,
                                   boolean needLocation)
    throws AccessControlException, FileNotFoundException,
    UnresolvedLinkException, IOException;
项目:hadoop-oss    文件:RefreshUserMappingsProtocol.java   
/**
 * Refresh user to group mappings.
 * @throws IOException
 */
@Idempotent
public void refreshUserToGroupsMappings() throws IOException;
项目:hadoop-oss    文件:RefreshUserMappingsProtocol.java   
/**
 * Refresh superuser proxy group list
 * @throws IOException
 */
@Idempotent
public void refreshSuperUserGroupsConfiguration() throws IOException;
项目:hadoop-oss    文件:ZKFCProtocol.java   
/**
 * Request that this service yield from the active node election for the
 * specified time period.
 * 
 * If the node is not currently active, it simply prevents any attempts
 * to become active for the specified time period. Otherwise, it first
 * tries to transition the local service to standby state, and then quits
 * the election.
 * 
 * If the attempt to transition to standby succeeds, then the ZKFC receiving
 * this RPC will delete its own breadcrumb node in ZooKeeper. Thus, the
 * next node to become active will not run any fencing process. Otherwise,
 * the breadcrumb will be left, such that the next active will fence this
 * node.
 * 
 * After the specified time period elapses, the node will attempt to re-join
 * the election, provided that its service is healthy.
 * 
 * If the node has previously been instructed to cede active, and is still
 * within the specified time period, the later command's time period will
 * take precedence, resetting the timer.
 * 
 * A call to cedeActive which specifies a 0 or negative time period will
 * allow the target node to immediately rejoin the election, so long as
 * it is healthy.
 *  
 * @param millisToCede period for which the node should not attempt to
 * become active
 * @throws IOException if the operation fails
 * @throws AccessControlException if the operation is disallowed
 */
@Idempotent
public void cedeActive(int millisToCede)
    throws IOException, AccessControlException;
项目:hadoop-oss    文件:ZKFCProtocol.java   
/**
 * Request that this node try to become active through a graceful failover.
 * 
 * If the node is already active, this is a no-op and simply returns success
 * without taking any further action.
 * 
 * If the node is not healthy, it will throw an exception indicating that it
 * is not able to become active.
 * 
 * If the node is healthy and not active, it will try to initiate a graceful
 * failover to become active, returning only when it has successfully become
 * active. See {@link ZKFailoverController#gracefulFailoverToYou()} for the
 * implementation details.
 * 
 * If the node fails to successfully coordinate the failover, throws an
 * exception indicating the reason for failure.
 * 
 * @throws IOException if graceful failover fails
 * @throws AccessControlException if the operation is disallowed
 */
@Idempotent
public void gracefulFailover()
    throws IOException, AccessControlException;
项目:hadoop-oss    文件:HAServiceProtocol.java   
/**
 * Monitor the health of service. This periodically called by the HA
 * frameworks to monitor the health of the service.
 * 
 * Service is expected to perform checks to ensure it is functional.
 * If the service is not healthy due to failure or partial failure,
 * it is expected to throw {@link HealthCheckFailedException}.
 * The definition of service not healthy is left to the service.
 * 
 * Note that when health check of an Active service fails,
 * failover to standby may be done.
 * 
 * @throws HealthCheckFailedException
 *           if the health check of a service fails.
 * @throws AccessControlException
 *           if access is denied.
 * @throws IOException
 *           if other errors happen
 */
@Idempotent
public void monitorHealth() throws HealthCheckFailedException,
                                   AccessControlException,
                                   IOException;
项目:hadoop-oss    文件:HAServiceProtocol.java   
/**
 * Request service to transition to active state. No operation, if the
 * service is already in active state.
 * 
 * @throws ServiceFailedException
 *           if transition from standby to active fails.
 * @throws AccessControlException
 *           if access is denied.
 * @throws IOException
 *           if other errors happen
 */
@Idempotent
public void transitionToActive(StateChangeRequestInfo reqInfo)
                                 throws ServiceFailedException,
                                        AccessControlException,
                                        IOException;
项目:hadoop-oss    文件:HAServiceProtocol.java   
/**
 * Request service to transition to standby state. No operation, if the
 * service is already in standby state.
 * 
 * @throws ServiceFailedException
 *           if transition from active to standby fails.
 * @throws AccessControlException
 *           if access is denied.
 * @throws IOException
 *           if other errors happen
 */
@Idempotent
public void transitionToStandby(StateChangeRequestInfo reqInfo)
                                  throws ServiceFailedException,
                                         AccessControlException,
                                         IOException;
项目:hadoop-oss    文件:HAServiceProtocol.java   
/**
 * Return the current status of the service. The status indicates
 * the current <em>state</em> (e.g ACTIVE/STANDBY) as well as
 * some additional information.
 * 
 * @throws AccessControlException
 *           if access is denied.
 * @throws IOException
 *           if other errors happen
 * @see HAServiceStatus
 */
@Idempotent
public HAServiceStatus getServiceStatus() throws AccessControlException,
                                                 IOException;
项目:hadoop    文件:NamenodeProtocol.java   
/**
 * Get the transaction ID of the most recent checkpoint.
 */
@Idempotent
public long getMostRecentCheckpointTxId() throws IOException;
项目:hadoop-oss    文件:TraceAdminProtocol.java   
/**
 * List the currently active trace span receivers.
 * 
 * @throws IOException        On error.
 */
@Idempotent
public SpanReceiverInfo[] listSpanReceivers() throws IOException;
项目:hadoop-oss    文件:GenericRefreshProtocol.java   
/**
 * Refresh the resource based on identity passed in.
 * @throws IOException
 */
@Idempotent
Collection<RefreshResponse> refresh(String identifier, String[] args)
    throws IOException;
项目:hadoop-oss    文件:RefreshCallQueueProtocol.java   
/**
 * Refresh the callqueue.
 * @throws IOException
 */
@Idempotent
void refreshCallQueue() throws IOException;
项目:hadoop    文件:NamenodeProtocol.java   
/**
 * Report to the active name-node an error occurred on a subordinate node.
 * Depending on the error code the active node may decide to unregister the
 * reporting node.
 * 
 * @param registration requesting node.
 * @param errorCode indicates the error
 * @param msg free text description of the error
 * @throws IOException
 */
@Idempotent
public void errorReport(NamenodeRegistration registration,
                        int errorCode, 
                        String msg) throws IOException;
项目:hadoop    文件:DatanodeProtocol.java   
/**
 * blockReceivedAndDeleted() allows the DataNode to tell the NameNode about
 * recently-received and -deleted block data. 
 * 
 * For the case of received blocks, a hint for preferred replica to be 
 * deleted when there is any excessive blocks is provided.
 * For example, whenever client code
 * writes a new Block here, or another DataNode copies a Block to
 * this DataNode, it will call blockReceived().
 */
@Idempotent
public void blockReceivedAndDeleted(DatanodeRegistration registration,
                          String poolId,
                          StorageReceivedDeletedBlocks[] rcvdAndDeletedBlocks)
                          throws IOException;
项目:hadoop    文件:ApplicationClientProtocol.java   
/**
 * Move an application to a new queue.
 * 
 * @param request the application ID and the target queue
 * @return an empty response
 * @throws YarnException
 * @throws IOException
 */
@Public
@Unstable
@Idempotent
public MoveApplicationAcrossQueuesResponse moveApplicationAcrossQueues(
    MoveApplicationAcrossQueuesRequest request) throws YarnException, IOException;