/** * Get the groups which are mapped to the given user. * @param user The user to get the groups for. * @return The set of groups the user belongs to. * @throws IOException */ @Idempotent public String[] getGroupsForUser(String user) throws IOException; }
/** * Refresh user to group mappings. * @throws IOException */ @Idempotent public void refreshUserToGroupsMappings() throws IOException;
/** * Refresh superuser proxy group list * @throws IOException */ @Idempotent public void refreshSuperUserGroupsConfiguration() throws IOException; }
/** * Refresh the resource based on identity passed in. * @throws IOException */ @Idempotent Collection<RefreshResponse> refresh(String identifier, String[] args) throws IOException; }
/** * Refresh the callqueue. * @throws IOException */ @Idempotent void refreshCallQueue() throws IOException; }
/** * List the currently active trace span receivers. * * @throws IOException On error. */ @Idempotent public SpanReceiverInfo[] listSpanReceivers() throws IOException;
/** * Refresh the service-level authorization policy in-effect. * @throws IOException */ @Idempotent void refreshServiceAcl() throws IOException; }
/** * 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; }
/** * 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;
/** * 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;
/** * 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;
/** * 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; }
@Idempotent public void cedeActive(int millisToCede) throws IOException, AccessControlException;
/** * Discard journal segments whose first TxId is greater than or equal to the * given txid. */ @Idempotent void discardSegments(String journalId, String nameServiceId, long startTxId) throws IOException;
/** * same as {@link org.apache.hadoop.hdfs.protocol.ClientProtocol#reportBadBlocks(LocatedBlock[])} * } */ @Idempotent public void reportBadBlocks(LocatedBlock[] blocks) throws IOException;
/** * Request name-node version and storage information. * * @return {@link NamespaceInfo} identifying versions and storage information * of the name-node * @throws IOException */ @Idempotent public NamespaceInfo versionRequest() throws IOException;
@Idempotent void sendLifeline(DatanodeRegistration registration, StorageReport[] reports, long dnCacheCapacity, long dnCacheUsed, int xmitsInProgress, int xceiverCount, int failedVolumes, VolumeFailureSummary volumeFailureSummary) throws IOException; }
/** * 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;
/** * Return a structure containing details about all edit logs * available to be fetched from the NameNode. * @param sinceTxId return only logs that contain transactions >= sinceTxId */ @Idempotent public RemoteEditLogManifest getEditLogManifest(long sinceTxId) throws IOException;
/** * Get the associated block pool id. * @return the block pool id associated with the Namenode running * the in-memory alias map. */ @Idempotent String getBlockPoolId() throws IOException; }