YARN-11381. Fix hadoop-yarn-common module Java Doc Errors. (#5153). Contributed by Shilun Fan.
Signed-off-by: Ayush Saxena <ayushsaxena@apache.org>
This commit is contained in:
parent
87429f443a
commit
1ddc9091f6
@ -91,6 +91,8 @@ public synchronized void close() {
|
||||
|
||||
/**
|
||||
* Getter/Setter methods for log4j.
|
||||
*
|
||||
* @return containerLogDir.
|
||||
*/
|
||||
|
||||
public String getContainerLogDir() {
|
||||
@ -118,6 +120,8 @@ public long getTotalLogFileSize() {
|
||||
/**
|
||||
* Setter so that log4j can configure it from the
|
||||
* configuration(log4j.properties).
|
||||
*
|
||||
* @param logSize log size.
|
||||
*/
|
||||
public void setTotalLogFileSize(long logSize) {
|
||||
maxEvents = (int)(logSize / EVENT_SIZE);
|
||||
|
@ -54,6 +54,8 @@ public void flush() {
|
||||
|
||||
/**
|
||||
* Getter/Setter methods for log4j.
|
||||
*
|
||||
* @return containerLogDir.
|
||||
*/
|
||||
|
||||
public String getContainerLogDir() {
|
||||
|
@ -73,7 +73,7 @@ protected T getProxyInternal() {
|
||||
|
||||
/**
|
||||
* Stop the current proxy when performFailover.
|
||||
* @param currentProxy
|
||||
* @param currentProxy currentProxy.
|
||||
*/
|
||||
@Override
|
||||
public synchronized void performFailover(T currentProxy) {
|
||||
|
@ -65,7 +65,7 @@ private ClientRMProxy(){
|
||||
* @param protocol Client protocol for which proxy is being requested.
|
||||
* @param <T> Type of proxy.
|
||||
* @return Proxy to the ResourceManager for the specified client protocol.
|
||||
* @throws IOException
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
public static <T> T createRMProxy(final Configuration configuration,
|
||||
final Class<T> protocol) throws IOException {
|
||||
|
@ -80,7 +80,7 @@ public ProxyInfo<T> getProxy() {
|
||||
|
||||
/**
|
||||
* PerformFailover does nothing in this class.
|
||||
* @param currentProxy
|
||||
* @param currentProxy currentProxy.
|
||||
*/
|
||||
@Override
|
||||
public void performFailover(T currentProxy) {
|
||||
@ -89,7 +89,7 @@ public void performFailover(T currentProxy) {
|
||||
|
||||
/**
|
||||
* Close the current proxy.
|
||||
* @throws IOException
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
|
@ -70,6 +70,8 @@ protected RMProxy() {
|
||||
|
||||
/**
|
||||
* Verify the passed protocol is supported.
|
||||
*
|
||||
* @param protocol protocol.
|
||||
*/
|
||||
@Private
|
||||
public void checkAllowedProtocols(Class<?> protocol) {}
|
||||
@ -77,6 +79,11 @@ public void checkAllowedProtocols(Class<?> protocol) {}
|
||||
/**
|
||||
* Get the ResourceManager address from the provided Configuration for the
|
||||
* given protocol.
|
||||
*
|
||||
* @param conf configuration.
|
||||
* @param protocol protocol.
|
||||
* @return inet socket address.
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
@Private
|
||||
public InetSocketAddress getRMAddress(
|
||||
@ -91,6 +98,13 @@ public InetSocketAddress getRMAddress(
|
||||
* this is a direct connection to the ResourceManager address. When HA is
|
||||
* enabled, the proxy handles the failover between the ResourceManagers as
|
||||
* well.
|
||||
*
|
||||
* @param configuration configuration.
|
||||
* @param protocol protocol.
|
||||
* @param instance RMProxy instance.
|
||||
* @param <T> Generic T.
|
||||
* @return RMProxy.
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
@Private
|
||||
protected static <T> T createRMProxy(final Configuration configuration,
|
||||
@ -108,6 +122,15 @@ protected static <T> T createRMProxy(final Configuration configuration,
|
||||
* this is a direct connection to the ResourceManager address. When HA is
|
||||
* enabled, the proxy handles the failover between the ResourceManagers as
|
||||
* well.
|
||||
*
|
||||
* @param configuration configuration.
|
||||
* @param protocol protocol.
|
||||
* @param instance RMProxy instance.
|
||||
* @param retryTime retry Time.
|
||||
* @param retryInterval retry Interval.
|
||||
* @param <T> Generic T.
|
||||
* @return RMProxy.
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
@Private
|
||||
protected static <T> T createRMProxy(final Configuration configuration,
|
||||
@ -136,6 +159,13 @@ private static <T> T newProxyInstance(final YarnConfiguration conf,
|
||||
/**
|
||||
* Get a proxy to the RM at the specified address. To be used to create a
|
||||
* RetryProxy.
|
||||
*
|
||||
* @param conf configuration.
|
||||
* @param protocol protocol.
|
||||
* @param rmAddress rmAddress.
|
||||
* @param <T> Generic T.
|
||||
* @return RM proxy.
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
@Private
|
||||
public <T> T getProxy(final Configuration conf,
|
||||
@ -195,7 +225,11 @@ private <T> RMFailoverProxyProvider<T> createRMFailoverProxyProvider(
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch retry policy from Configuration
|
||||
* Fetch retry policy from Configuration.
|
||||
*
|
||||
* @param conf configuration.
|
||||
* @param isHAEnabled is HA enabled.
|
||||
* @return RetryPolicy.
|
||||
*/
|
||||
@Private
|
||||
@VisibleForTesting
|
||||
@ -218,6 +252,12 @@ public static RetryPolicy createRetryPolicy(Configuration conf,
|
||||
/**
|
||||
* Fetch retry policy from Configuration and create the
|
||||
* retry policy with specified retryTime and retry interval.
|
||||
*
|
||||
* @param conf configuration.
|
||||
* @param retryTime retry time.
|
||||
* @param retryInterval retry interval.
|
||||
* @param isHAEnabled is HA enabled.
|
||||
* @return RetryPolicy.
|
||||
*/
|
||||
protected static RetryPolicy createRetryPolicy(Configuration conf,
|
||||
long retryTime, long retryInterval, boolean isHAEnabled) {
|
||||
|
@ -255,6 +255,9 @@ public abstract int initiateUpgrade(String appName, String fileName,
|
||||
*
|
||||
* @param appName the name of the application.
|
||||
* @param componentInstances the name of the component instances.
|
||||
* @return exit code.
|
||||
* @throws IOException io error occur.
|
||||
* @throws YarnException exceptions from yarn servers.
|
||||
*/
|
||||
@Public
|
||||
@Unstable
|
||||
@ -267,6 +270,9 @@ public abstract int actionUpgradeInstances(String appName,
|
||||
*
|
||||
* @param appName the name of the application.
|
||||
* @param components the name of the components.
|
||||
* @return exit code.
|
||||
* @throws IOException io error occur.
|
||||
* @throws YarnException exceptions from yarn servers.
|
||||
*/
|
||||
@Public
|
||||
@Unstable
|
||||
@ -279,6 +285,9 @@ public abstract int actionUpgradeComponents(String appName,
|
||||
* @param appName the name of the application.
|
||||
* @param userName the name of the user.
|
||||
* @return exit code
|
||||
* @throws IOException io error occur.
|
||||
* @throws YarnException exceptions from yarn servers.
|
||||
* @throws InterruptedException if interrupted.
|
||||
*/
|
||||
@Public
|
||||
@Unstable
|
||||
@ -297,6 +306,8 @@ public abstract String getInstances(String appName,
|
||||
* @param appName the name of the application
|
||||
* @param fileName specification of application upgrade to save.
|
||||
* @return exit code
|
||||
* @throws IOException io error occur.
|
||||
* @throws YarnException exceptions from yarn servers.
|
||||
*/
|
||||
@Public
|
||||
@Unstable
|
||||
@ -308,8 +319,8 @@ public abstract int actionUpgradeExpress(String appName, File fileName)
|
||||
*
|
||||
* @param appName the name of the application
|
||||
* @return exit code
|
||||
* @throws IOException
|
||||
* @throws YarnException
|
||||
* @throws IOException io error occur.
|
||||
* @throws YarnException exceptions from yarn servers.
|
||||
*/
|
||||
@Public
|
||||
@Unstable
|
||||
@ -321,6 +332,9 @@ public abstract int actionCancelUpgrade(String appName) throws IOException,
|
||||
*
|
||||
* @param appName the name of the application.
|
||||
* @param componentInstances the name of the component instances.
|
||||
* @throws IOException io error occur.
|
||||
* @throws YarnException exceptions from yarn servers.
|
||||
* @return exit code.
|
||||
*/
|
||||
@Public
|
||||
@Unstable
|
||||
|
@ -114,8 +114,8 @@ public abstract TimelinePutResponse putEntities(
|
||||
*
|
||||
* @param domain
|
||||
* an {@link TimelineDomain} object
|
||||
* @throws IOException
|
||||
* @throws YarnException
|
||||
* @throws IOException io error occur.
|
||||
* @throws YarnException exceptions from yarn servers.
|
||||
*/
|
||||
@Public
|
||||
public abstract void putDomain(
|
||||
@ -133,8 +133,8 @@ public abstract void putDomain(
|
||||
* @param domain
|
||||
* an {@link TimelineDomain} object
|
||||
* @param appAttemptId {@link ApplicationAttemptId}
|
||||
* @throws IOException
|
||||
* @throws YarnException
|
||||
* @throws IOException io error occur.
|
||||
* @throws YarnException exceptions from yarn servers.
|
||||
*/
|
||||
@Public
|
||||
public abstract void putDomain(ApplicationAttemptId appAttemptId,
|
||||
@ -151,8 +151,8 @@ public abstract void putDomain(ApplicationAttemptId appAttemptId,
|
||||
* securely talking to the timeline server
|
||||
* @return a delegation token ({@link Token}) that can be used to talk to the
|
||||
* timeline server
|
||||
* @throws IOException
|
||||
* @throws YarnException
|
||||
* @throws IOException io error occur.
|
||||
* @throws YarnException exceptions from yarn servers.
|
||||
*/
|
||||
@Public
|
||||
public abstract Token<TimelineDelegationTokenIdentifier> getDelegationToken(
|
||||
@ -166,8 +166,8 @@ public abstract Token<TimelineDelegationTokenIdentifier> getDelegationToken(
|
||||
* @param timelineDT
|
||||
* the delegation token to renew
|
||||
* @return the new expiration time
|
||||
* @throws IOException
|
||||
* @throws YarnException
|
||||
* @throws IOException io error occur.
|
||||
* @throws YarnException exceptions from yarn servers.
|
||||
*/
|
||||
@Public
|
||||
public abstract long renewDelegationToken(
|
||||
@ -181,8 +181,8 @@ public abstract long renewDelegationToken(
|
||||
*
|
||||
* @param timelineDT
|
||||
* the delegation token to cancel
|
||||
* @throws IOException
|
||||
* @throws YarnException
|
||||
* @throws IOException io error occur.
|
||||
* @throws YarnException exceptions from yarn servers.
|
||||
*/
|
||||
@Public
|
||||
public abstract void cancelDelegationToken(
|
||||
|
@ -42,6 +42,8 @@ public abstract class TimelineReaderClient extends CompositeService {
|
||||
|
||||
/**
|
||||
* Create a new instance of Timeline Reader Client.
|
||||
*
|
||||
* @return instance of Timeline Reader Client.
|
||||
*/
|
||||
@InterfaceAudience.Public
|
||||
public static TimelineReaderClient createTimelineReaderClient() {
|
||||
@ -59,7 +61,7 @@ public TimelineReaderClient(String name) {
|
||||
* @param fields Fields to be fetched. Defaults to INFO.
|
||||
* @param filters Filters to be applied while fetching entities.
|
||||
* @return entity of the application
|
||||
* @throws IOException
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
public abstract TimelineEntity getApplicationEntity(
|
||||
ApplicationId appId, String fields, Map<String, String> filters)
|
||||
@ -71,7 +73,7 @@ public abstract TimelineEntity getApplicationEntity(
|
||||
* @param fields Fields to be fetched. Defaults to INFO.
|
||||
* @param filters Filters to be applied while fetching entities.
|
||||
* @return entity associated with application attempt
|
||||
* @throws IOException
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
public abstract TimelineEntity getApplicationAttemptEntity(
|
||||
ApplicationAttemptId appAttemptId, String fields,
|
||||
@ -85,7 +87,7 @@ public abstract TimelineEntity getApplicationAttemptEntity(
|
||||
* @param limit Number of entities to return.
|
||||
* @param fromId Retrieve next set of generic ids from given fromId
|
||||
* @return list of application attempt entities
|
||||
* @throws IOException
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
public abstract List<TimelineEntity> getApplicationAttemptEntities(
|
||||
ApplicationId appId, String fields, Map<String, String> filters,
|
||||
@ -97,7 +99,7 @@ public abstract List<TimelineEntity> getApplicationAttemptEntities(
|
||||
* @param fields Fields to be fetched. Defaults to INFO.
|
||||
* @param filters Filters to be applied while fetching entities.
|
||||
* @return timeline entity for container
|
||||
* @throws IOException
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
public abstract TimelineEntity getContainerEntity(
|
||||
ContainerId containerId, String fields, Map<String, String> filters)
|
||||
@ -111,7 +113,7 @@ public abstract TimelineEntity getContainerEntity(
|
||||
* @param limit Number of entities to return.
|
||||
* @param fromId Retrieve next set of generic ids from given fromId
|
||||
* @return list of entities
|
||||
* @throws IOException
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
public abstract List<TimelineEntity> getContainerEntities(
|
||||
ApplicationId appId, String fields,
|
||||
|
@ -22,24 +22,28 @@
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
import org.apache.hadoop.classification.InterfaceAudience;
|
||||
import org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate;
|
||||
import org.apache.hadoop.ipc.RemoteException;
|
||||
import org.apache.hadoop.yarn.exceptions.YarnException;
|
||||
|
||||
import org.apache.hadoop.thirdparty.protobuf.ServiceException;
|
||||
|
||||
@InterfaceAudience.LimitedPrivate({ "MapReduce", "YARN" })
|
||||
@LimitedPrivate({ "MapReduce", "YARN" })
|
||||
public class RPCUtil {
|
||||
|
||||
/**
|
||||
* Returns an instance of {@link YarnException}
|
||||
* Returns an instance of {@link YarnException}.
|
||||
* @param t instance of Throwable.
|
||||
* @return instance of YarnException.
|
||||
*/
|
||||
public static YarnException getRemoteException(Throwable t) {
|
||||
return new YarnException(t);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an instance of {@link YarnException}
|
||||
* Returns an instance of {@link YarnException}.
|
||||
* @param message yarn exception message.
|
||||
* @return instance of YarnException.
|
||||
*/
|
||||
public static YarnException getRemoteException(String message) {
|
||||
return new YarnException(message);
|
||||
@ -92,6 +96,8 @@ private static <T extends RuntimeException> T instantiateRuntimeException(
|
||||
* ServiceException
|
||||
* @return An instance of the actual exception, which will be a subclass of
|
||||
* {@link YarnException} or {@link IOException}
|
||||
* @throws IOException io error occur.
|
||||
* @throws YarnException exceptions from yarn servers.
|
||||
*/
|
||||
public static Void unwrapAndThrowException(ServiceException se)
|
||||
throws IOException, YarnException {
|
||||
|
@ -919,6 +919,7 @@ public static void readAContainerLogsForALogType(
|
||||
* @param logUploadedTime the log uploaded time stamp
|
||||
* @param logType the given log type
|
||||
* @throws IOException if we can not read the container logs
|
||||
* @return If logType contains fileType, return 1, otherwise return 0.
|
||||
*/
|
||||
public static int readContainerLogsForALogType(
|
||||
DataInputStream valueStream, PrintStream out, long logUploadedTime,
|
||||
@ -934,7 +935,9 @@ public static int readContainerLogsForALogType(
|
||||
* @param out the output print stream
|
||||
* @param logUploadedTime the log uploaded time stamp
|
||||
* @param logType the given log type
|
||||
* @param bytes log bytes.
|
||||
* @throws IOException if we can not read the container logs
|
||||
* @return If logType contains fileType, return 1, otherwise return 0.
|
||||
*/
|
||||
public static int readContainerLogsForALogType(
|
||||
DataInputStream valueStream, PrintStream out, long logUploadedTime,
|
||||
|
@ -34,8 +34,8 @@ public interface AttributeValue {
|
||||
* validate the value based on the type and initialize for further compare
|
||||
* operations.
|
||||
*
|
||||
* @param value
|
||||
* @throws IOException
|
||||
* @param value value.
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
void validateAndInitializeValue(String value) throws IOException;
|
||||
|
||||
@ -43,8 +43,8 @@ public interface AttributeValue {
|
||||
* compare the value against the other based on the
|
||||
* AttributeExpressionOperation.
|
||||
*
|
||||
* @param other
|
||||
* @param op
|
||||
* @param other attribute value.
|
||||
* @param op attribute expression operation.
|
||||
* @return true if value <code>other</code> matches the current value for the
|
||||
* operation <code>op</code>.
|
||||
*/
|
||||
|
@ -337,10 +337,11 @@ public void addToCluserNodeLabels(Collection<NodeLabel> labels)
|
||||
}
|
||||
|
||||
/**
|
||||
* Add multiple node labels to repository
|
||||
* Add multiple node labels to repository.
|
||||
*
|
||||
* @param labels
|
||||
* new node labels added
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
@VisibleForTesting
|
||||
public void addToCluserNodeLabelsWithDefaultExclusivity(Set<String> labels)
|
||||
@ -394,9 +395,10 @@ protected void checkAddLabelsToNode(
|
||||
}
|
||||
|
||||
/**
|
||||
* add more labels to nodes
|
||||
* add more labels to nodes.
|
||||
*
|
||||
* @param addedLabelsToNode node {@literal ->} labels map
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
public void addLabelsToNode(Map<NodeId, Set<String>> addedLabelsToNode)
|
||||
throws IOException {
|
||||
@ -466,7 +468,7 @@ protected void internalRemoveFromClusterNodeLabels(Collection<String> labelsToRe
|
||||
*
|
||||
* @param labelsToRemove
|
||||
* node labels to remove
|
||||
* @throws IOException
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
public void removeFromClusterNodeLabels(Collection<String> labelsToRemove)
|
||||
throws IOException {
|
||||
@ -707,7 +709,7 @@ protected void internalUpdateLabelsOnNodes(
|
||||
|
||||
if (null != dispatcher && isCentralizedNodeLabelConfiguration) {
|
||||
// In case of DistributedNodeLabelConfiguration or
|
||||
// DelegatedCentralizedNodeLabelConfiguration, no need to save the the
|
||||
// DelegatedCentralizedNodeLabelConfiguration, no need to save the
|
||||
// NodeLabels Mapping to the back-end store, as on RM restart/failover
|
||||
// NodeLabels are collected from NM through Register/Heartbeat again
|
||||
// in case of DistributedNodeLabelConfiguration and collected from
|
||||
@ -727,9 +729,10 @@ protected void internalUpdateLabelsOnNodes(
|
||||
|
||||
/**
|
||||
* remove labels from nodes, labels being removed most be contained by these
|
||||
* nodes
|
||||
* nodes.
|
||||
*
|
||||
* @param removeLabelsFromNode node {@literal ->} labels map
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
public void
|
||||
removeLabelsFromNode(Map<NodeId, Set<String>> removeLabelsFromNode)
|
||||
@ -784,6 +787,7 @@ protected void checkReplaceLabelsOnNode(
|
||||
* replace labels to nodes
|
||||
*
|
||||
* @param replaceLabelsToNode node {@literal ->} labels map
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
public void replaceLabelsOnNode(Map<NodeId, Set<String>> replaceLabelsToNode)
|
||||
throws IOException {
|
||||
|
@ -35,7 +35,7 @@ public interface NodeAttributeStore extends Closeable {
|
||||
* Replace labels on node.
|
||||
*
|
||||
* @param nodeToAttribute node to attribute list.
|
||||
* @throws IOException
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
void replaceNodeAttributes(List<NodeToAttributes> nodeToAttribute)
|
||||
throws IOException;
|
||||
@ -44,7 +44,7 @@ void replaceNodeAttributes(List<NodeToAttributes> nodeToAttribute)
|
||||
* Add attribute to node.
|
||||
*
|
||||
* @param nodeToAttribute node to attribute list.
|
||||
* @throws IOException
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
void addNodeAttributes(List<NodeToAttributes> nodeToAttribute)
|
||||
throws IOException;
|
||||
@ -53,7 +53,7 @@ void addNodeAttributes(List<NodeToAttributes> nodeToAttribute)
|
||||
* Remove attribute from node.
|
||||
*
|
||||
* @param nodeToAttribute node to attribute list.
|
||||
* @throws IOException
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
void removeNodeAttributes(List<NodeToAttributes> nodeToAttribute)
|
||||
throws IOException;
|
||||
@ -62,16 +62,16 @@ void removeNodeAttributes(List<NodeToAttributes> nodeToAttribute)
|
||||
* Initialize based on configuration and NodeAttributesManager.
|
||||
*
|
||||
* @param configuration configuration instance.
|
||||
* @param mgr nodeattributemanager instance.
|
||||
* @throws Exception
|
||||
* @param mgr node attribute manager instance.
|
||||
* @throws Exception exception occurs.
|
||||
*/
|
||||
void init(Configuration configuration, NodeAttributesManager mgr)
|
||||
throws Exception;
|
||||
|
||||
/**
|
||||
* Recover store on resourcemanager startup.
|
||||
* @throws IOException
|
||||
* @throws YarnException
|
||||
* Recover store on resource manager startup.
|
||||
* @throws IOException io error occur.
|
||||
* @throws YarnException exceptions from yarn servers.
|
||||
*/
|
||||
void recover() throws IOException, YarnException;
|
||||
}
|
||||
|
@ -58,8 +58,8 @@ public abstract void replaceNodeAttributes(String prefix,
|
||||
* impacting other existing attribute mapping. Key would be name of the node
|
||||
* and value would be set of Attributes to be mapped.
|
||||
*
|
||||
* @param nodeAttributeMapping
|
||||
* @throws IOException
|
||||
* @param nodeAttributeMapping host name to a set of node attributes mapping.
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
public abstract void addNodeAttributes(
|
||||
Map<String, Set<NodeAttribute>> nodeAttributeMapping) throws IOException;
|
||||
@ -69,8 +69,8 @@ public abstract void addNodeAttributes(
|
||||
* impacting other existing attribute mapping. Key would be name of the node
|
||||
* and value would be set of Attributes to be removed.
|
||||
*
|
||||
* @param nodeAttributeMapping
|
||||
* @throws IOException
|
||||
* @param nodeAttributeMapping host name to a set of node attributes mapping.
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
public abstract void removeNodeAttributes(
|
||||
Map<String, Set<NodeAttribute>> nodeAttributeMapping) throws IOException;
|
||||
@ -93,6 +93,7 @@ public abstract Set<NodeAttribute> getClusterNodeAttributes(
|
||||
* If the attributeKeys set is null or empty, then mapping for all attributes
|
||||
* are returned.
|
||||
*
|
||||
* @param attributes attributes set.
|
||||
* @return a Map of attributeKeys to a map of hostnames to its attribute
|
||||
* values.
|
||||
*/
|
||||
@ -103,6 +104,7 @@ Map<String, AttributeValue>> getAttributesToNodes(
|
||||
/**
|
||||
* NodeAttribute to AttributeValue Map.
|
||||
*
|
||||
* @param hostName host name.
|
||||
* @return Map of NodeAttribute to AttributeValue.
|
||||
*/
|
||||
public abstract Map<NodeAttribute, AttributeValue> getAttributesForNode(
|
||||
@ -111,6 +113,7 @@ public abstract Map<NodeAttribute, AttributeValue> getAttributesForNode(
|
||||
/**
|
||||
* Get All node to Attributes list based on filter.
|
||||
*
|
||||
* @param prefix filter prefix set.
|
||||
* @return List of NodeToAttributes matching filter. If empty
|
||||
* or null is passed as argument will return all.
|
||||
*/
|
||||
@ -120,6 +123,7 @@ public abstract List<NodeToAttributes> getNodeToAttributes(
|
||||
/**
|
||||
* Get all node to Attributes mapping.
|
||||
*
|
||||
* @param hostNames host names.
|
||||
* @return Map of String to Set of nodesToAttributes matching
|
||||
* filter. If empty or null is passed as argument will return all.
|
||||
*/
|
||||
|
@ -133,8 +133,8 @@ public static void checkAndThrowAttributePrefix(String prefix)
|
||||
* <li>Missing prefix: the attribute doesn't have prefix defined</li>
|
||||
* <li>Malformed attribute prefix: the prefix is not in valid format</li>
|
||||
* </ul>
|
||||
* @param attributeSet
|
||||
* @throws IOException
|
||||
* @param attributeSet node attribute set.
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
public static void validateNodeAttributes(Set<NodeAttribute> attributeSet)
|
||||
throws IOException {
|
||||
@ -179,6 +179,9 @@ public static Set<NodeAttribute> filterAttributesByPrefix(
|
||||
|
||||
/**
|
||||
* Are these two input node attributes the same.
|
||||
*
|
||||
* @param leftNodeAttributes left node attribute.
|
||||
* @param rightNodeAttributes right node attribute.
|
||||
* @return true if they are the same
|
||||
*/
|
||||
public static boolean isNodeAttributesEquals(
|
||||
|
@ -37,18 +37,24 @@ public interface NodeLabelsStore extends Closeable {
|
||||
|
||||
/**
|
||||
* Store node {@literal ->} label.
|
||||
* @param nodeToLabels node to labels mapping.
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
void updateNodeToLabelsMappings(
|
||||
Map<NodeId, Set<String>> nodeToLabels) throws IOException;
|
||||
|
||||
/**
|
||||
* Store new labels.
|
||||
* @param labels labels.
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
void storeNewClusterNodeLabels(List<NodeLabel> label)
|
||||
void storeNewClusterNodeLabels(List<NodeLabel> labels)
|
||||
throws IOException;
|
||||
|
||||
/**
|
||||
* Remove labels.
|
||||
* @param labels labels.
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
void removeClusterNodeLabels(Collection<String> labels)
|
||||
throws IOException;
|
||||
@ -60,8 +66,8 @@ void removeClusterNodeLabels(Collection<String> labels)
|
||||
* ignoreNodeToLabelsMappings will be set to true and recover will be invoked
|
||||
* as RM will collect the node labels from NM through registration/HB.
|
||||
*
|
||||
* @throws IOException
|
||||
* @throws YarnException
|
||||
* @throws IOException io error occur.
|
||||
* @throws YarnException exceptions from yarn servers.
|
||||
*/
|
||||
void recover() throws IOException, YarnException;
|
||||
|
||||
|
@ -100,7 +100,7 @@ private static void registerLog(StoreType type, int opcode,
|
||||
/**
|
||||
* Get mirror operation of store Type.
|
||||
*
|
||||
* @param storeType
|
||||
* @param storeType storeType.
|
||||
* @return instance of FSNodeStoreLogOp.
|
||||
*/
|
||||
public static FSNodeStoreLogOp getMirrorOp(StoreType storeType) {
|
||||
@ -108,9 +108,9 @@ public static FSNodeStoreLogOp getMirrorOp(StoreType storeType) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Will return StoreOp instance basead on opCode and StoreType.
|
||||
* @param opCode
|
||||
* @param storeType
|
||||
* Will return StoreOp instance based on opCode and StoreType.
|
||||
* @param opCode opCode.
|
||||
* @param storeType storeType.
|
||||
* @return instance of FSNodeStoreLogOp.
|
||||
*/
|
||||
public static FSNodeStoreLogOp get(int opCode, StoreType storeType) {
|
||||
|
@ -34,7 +34,7 @@ public interface StoreOp<W, R, M> {
|
||||
*
|
||||
* @param write write to be done to
|
||||
* @param mgr manager used by store
|
||||
* @throws IOException
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
void write(W write, M mgr) throws IOException;
|
||||
|
||||
@ -43,7 +43,7 @@ public interface StoreOp<W, R, M> {
|
||||
*
|
||||
* @param read read to be done from
|
||||
* @param mgr manager used by store
|
||||
* @throws IOException
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
void recover(R read, M mgr) throws IOException;
|
||||
}
|
@ -418,7 +418,8 @@ public int getVersion() {
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Get the node-label-expression in the original ResourceRequest
|
||||
* Get the node-label-expression in the original ResourceRequest.
|
||||
* @return node label expression.
|
||||
*/
|
||||
public String getNodeLabelExpression() {
|
||||
if (proto.hasNodeLabelExpression()) {
|
||||
|
@ -79,6 +79,7 @@ public static void destroy() {
|
||||
/**
|
||||
* Initialize the provider. Invoked on daemon startup. DefaultYarnAuthorizer is
|
||||
* initialized based on configurations.
|
||||
* @param conf configuration.
|
||||
*/
|
||||
public abstract void init(Configuration conf);
|
||||
|
||||
|
@ -88,10 +88,11 @@ public void removeApplication(ApplicationId appId) {
|
||||
* <li>For all other users/groups application-acls are checked</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param callerUGI
|
||||
* @param applicationAccessType
|
||||
* @param applicationOwner
|
||||
* @param applicationId
|
||||
* @param callerUGI UserGroupInformation for the user.
|
||||
* @param applicationAccessType Application Access Type.
|
||||
* @param applicationOwner Application Owner.
|
||||
* @param applicationId ApplicationId.
|
||||
* @return true if the user has permission, false otherwise.
|
||||
*/
|
||||
public boolean checkAccess(UserGroupInformation callerUGI,
|
||||
ApplicationAccessType applicationAccessType, String applicationOwner,
|
||||
|
@ -37,7 +37,7 @@ public interface SharedCacheChecksum {
|
||||
*
|
||||
* @param in <code>InputStream</code> to be checksumed
|
||||
* @return the message digest of the input stream
|
||||
* @throws IOException
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
public String computeChecksum(InputStream in) throws IOException;
|
||||
}
|
||||
|
@ -58,8 +58,9 @@ public class SharedCacheChecksumFactory {
|
||||
/**
|
||||
* Get a new <code>SharedCacheChecksum</code> object based on the configurable
|
||||
* algorithm implementation
|
||||
* (see <code>yarn.sharedcache.checksum.algo.impl</code>)
|
||||
* (see <code>yarn.sharedcache.checksum.algo.impl</code>).
|
||||
*
|
||||
* @param conf configuration.
|
||||
* @return <code>SharedCacheChecksum</code> object
|
||||
*/
|
||||
public static SharedCacheChecksum getChecksum(Configuration conf) {
|
||||
|
@ -60,7 +60,7 @@ final public class StateMachineFactory
|
||||
* Constructor
|
||||
*
|
||||
* This is the only constructor in the API.
|
||||
*
|
||||
* @param defaultInitialState default initial state.
|
||||
*/
|
||||
public StateMachineFactory(STATE defaultInitialState) {
|
||||
this.transitionsListNode = null;
|
||||
|
@ -27,9 +27,13 @@
|
||||
public class VisualizeStateMachine {
|
||||
|
||||
/**
|
||||
* get Graph From Classes.
|
||||
*
|
||||
* @param graphName graphName.
|
||||
* @param classes list of classes which have static field
|
||||
* stateMachineFactory of type StateMachineFactory
|
||||
* @return graph represent this StateMachine
|
||||
* @throws Exception exception occurs.
|
||||
*/
|
||||
public static Graph getGraphFromClasses(String graphName, List<String> classes)
|
||||
throws Exception {
|
||||
|
@ -229,6 +229,8 @@ public static Set<String> getEnvVarsFromInputProperty(
|
||||
* This older version of this method is kept around for compatibility
|
||||
* because downstream frameworks like Spark and Tez have been using it.
|
||||
* Downstream frameworks are expected to move off of it.
|
||||
* @param env the environment to update.
|
||||
* @param envString String containing env variable definitions.
|
||||
*/
|
||||
@Deprecated
|
||||
public static void setEnvFromInputString(Map<String, String> env,
|
||||
@ -255,6 +257,10 @@ public static void addToEnvironment(
|
||||
* This older version of this method is kept around for compatibility
|
||||
* because downstream frameworks like Spark and Tez have been using it.
|
||||
* Downstream frameworks are expected to move off of it.
|
||||
*
|
||||
* @param environment map of environment variable.
|
||||
* @param variable variable.
|
||||
* @param value value.
|
||||
*/
|
||||
@Deprecated
|
||||
public static void addToEnvironment(
|
||||
|
@ -57,7 +57,8 @@ public class ConverterUtils {
|
||||
* @param url
|
||||
* url to convert
|
||||
* @return path from {@link URL}
|
||||
* @throws URISyntaxException
|
||||
* @throws URISyntaxException exception thrown to indicate that a string could not be parsed as a
|
||||
* URI reference.
|
||||
*/
|
||||
@Public
|
||||
@Deprecated
|
||||
@ -171,6 +172,7 @@ public static ApplicationId toApplicationId(
|
||||
*
|
||||
* @param protoToken the yarn token
|
||||
* @param serviceAddr the connect address for the service
|
||||
* @param <T> Generic Type T.
|
||||
* @return rpc token
|
||||
*/
|
||||
public static <T extends TokenIdentifier> Token<T> convertFromYarn(
|
||||
@ -191,6 +193,8 @@ public static <T extends TokenIdentifier> Token<T> convertFromYarn(
|
||||
*
|
||||
* @param protoToken the yarn token
|
||||
* @param service the service for the token
|
||||
* @param <T> Generic Type T.
|
||||
* @return rpc token
|
||||
*/
|
||||
public static <T extends TokenIdentifier> Token<T> convertFromYarn(
|
||||
org.apache.hadoop.yarn.api.records.Token protoToken,
|
||||
|
@ -131,6 +131,7 @@ public static Credentials readCredentialsFromConfigFile(Path configFile,
|
||||
*
|
||||
* @param tokens the Tokens from the ContainerLaunchContext.
|
||||
* @return the Credentials object populated from the Tokens.
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
public static Credentials getCredentialsFromTokensByteBuffer(
|
||||
ByteBuffer tokens) throws IOException {
|
||||
|
@ -123,10 +123,13 @@ private void createDir(Path path, FsPermission perm) throws IOException {
|
||||
* Creates the cache loader for the status loading cache. This should be used
|
||||
* to create an instance of the status cache that is passed into the
|
||||
* FSDownload constructor.
|
||||
*
|
||||
* @param conf configuration.
|
||||
* @return cache loader for the status loading cache.
|
||||
*/
|
||||
public static CacheLoader<Path,Future<FileStatus>>
|
||||
public static CacheLoader<Path, Future<FileStatus>>
|
||||
createStatusCacheLoader(final Configuration conf) {
|
||||
return new CacheLoader<Path,Future<FileStatus>>() {
|
||||
return new CacheLoader<Path, Future<FileStatus>>() {
|
||||
public Future<FileStatus> load(Path path) {
|
||||
try {
|
||||
FileSystem fs = path.getFileSystem(conf);
|
||||
@ -141,14 +144,19 @@ public Future<FileStatus> load(Path path) {
|
||||
|
||||
/**
|
||||
* Returns a boolean to denote whether a cache file is visible to all (public)
|
||||
* or not
|
||||
* or not.
|
||||
*
|
||||
* @param fs fileSystem.
|
||||
* @param current current path.
|
||||
* @param sStat file status.
|
||||
* @param statCache stat cache.
|
||||
* @return true if the path in the current path is visible to all, false
|
||||
* otherwise
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
@Private
|
||||
public static boolean isPublic(FileSystem fs, Path current, FileStatus sStat,
|
||||
LoadingCache<Path,Future<FileStatus>> statCache) throws IOException {
|
||||
LoadingCache<Path, Future<FileStatus>> statCache) throws IOException {
|
||||
current = fs.makeQualified(current);
|
||||
//the leaf level file should be readable by others
|
||||
if (!checkPublicPermsForAll(fs, sStat, FsAction.READ_EXECUTE, FsAction.READ)) {
|
||||
@ -455,7 +463,7 @@ public Void run() throws Exception {
|
||||
* Change to 755 or 700 for dirs, 555 or 500 for files.
|
||||
* @param fs FileSystem
|
||||
* @param path Path to modify perms for
|
||||
* @throws IOException
|
||||
* @throws IOException io error occur.
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
private void changePermissions(FileSystem fs, final Path path)
|
||||
|
@ -579,6 +579,9 @@ public String toString() {
|
||||
/**
|
||||
* Returns boolean indicating whether pid
|
||||
* is in process tree.
|
||||
*
|
||||
* @param pid pid.
|
||||
* @return if true, processTree contains pid, false, processTree does not contain pid.
|
||||
*/
|
||||
public boolean contains(String pid) {
|
||||
return processTree.containsKey(pid);
|
||||
@ -1000,9 +1003,9 @@ public String toString() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the {@link ProcfsBasedProcessTree}
|
||||
* Test the {@link ProcfsBasedProcessTree}.
|
||||
*
|
||||
* @param args
|
||||
* @param args the pid arg.
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
if (args.length != 1) {
|
||||
|
@ -79,8 +79,8 @@ public synchronized static void init(Configuration conf) {
|
||||
* Utility method for getting a hostname resolved to a node in the
|
||||
* network topology. This method initializes the class with the
|
||||
* right resolver implementation.
|
||||
* @param conf
|
||||
* @param hostName
|
||||
* @param conf configuration.
|
||||
* @param hostName hostname.
|
||||
* @return node {@link Node} after resolving the hostname
|
||||
*/
|
||||
public static Node resolve(Configuration conf, String hostName) {
|
||||
@ -92,8 +92,8 @@ public static Node resolve(Configuration conf, String hostName) {
|
||||
* Utility method for getting a list of hostname resolved to a list of node
|
||||
* in the network topology. This method initializes the class with the
|
||||
* right resolver implementation.
|
||||
* @param conf
|
||||
* @param hostNames
|
||||
* @param conf configuration.
|
||||
* @param hostNames list of hostName.
|
||||
* @return nodes {@link Node} after resolving the hostnames
|
||||
*/
|
||||
public static List<Node> resolve(
|
||||
@ -106,7 +106,7 @@ public static List<Node> resolve(
|
||||
* Utility method for getting a hostname resolved to a node in the
|
||||
* network topology. This method doesn't initialize the class.
|
||||
* Call {@link #init(Configuration)} explicitly.
|
||||
* @param hostName
|
||||
* @param hostName host name.
|
||||
* @return node {@link Node} after resolving the hostname
|
||||
*/
|
||||
public static Node resolve(String hostName) {
|
||||
@ -120,7 +120,7 @@ public static Node resolve(String hostName) {
|
||||
* Utility method for getting a list of hostname resolved to a list of node
|
||||
* in the network topology. This method doesn't initialize the class.
|
||||
* Call {@link #init(Configuration)} explicitly.
|
||||
* @param hostNames
|
||||
* @param hostNames list of hostNames.
|
||||
* @return nodes {@link Node} after resolving the hostnames
|
||||
*/
|
||||
public static List<Node> resolve(List<String> hostNames) {
|
||||
|
@ -67,7 +67,7 @@ public static String cjoin(Object... args) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Join on dot
|
||||
* Join on dot.
|
||||
* @param args to join
|
||||
* @return args joined by dot
|
||||
*/
|
||||
@ -76,7 +76,7 @@ public static String djoin(Object... args) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Join on underscore
|
||||
* Join on underscore.
|
||||
* @param args to join
|
||||
* @return args joined underscore
|
||||
*/
|
||||
@ -85,7 +85,7 @@ public static String _join(Object... args) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Join on slash
|
||||
* Join on slash.
|
||||
* @param args to join
|
||||
* @return args joined with slash
|
||||
*/
|
||||
@ -103,8 +103,8 @@ public static String pajoin(Object... args) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Join without separator
|
||||
* @param args
|
||||
* Join without separator.
|
||||
* @param args to join.
|
||||
* @return joined args with no separator
|
||||
*/
|
||||
public static String join(Object... args) {
|
||||
@ -131,7 +131,7 @@ public static Iterable<String> split(CharSequence s) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Split on _ and trim results
|
||||
* Split on _ and trim results.
|
||||
* @param s the string to split
|
||||
* @return an iterable of strings
|
||||
*/
|
||||
@ -140,7 +140,7 @@ public static Iterable<String> _split(CharSequence s) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether a url is absolute or note
|
||||
* Check whether a url is absolute or note.
|
||||
* @param url to check
|
||||
* @return true if url starts with scheme:// or //
|
||||
*/
|
||||
@ -149,7 +149,7 @@ public static boolean isAbsUrl(CharSequence url) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Join url components
|
||||
* Join url components.
|
||||
* @param pathPrefix for relative urls
|
||||
* @param args url components to join
|
||||
* @return an url string
|
||||
|
@ -38,7 +38,8 @@ public abstract class TrackingUriPlugin extends Configured {
|
||||
* Given an application ID, return a tracking URI.
|
||||
* @param id the ID for which a URI is returned
|
||||
* @return the tracking URI
|
||||
* @throws URISyntaxException
|
||||
* @throws URISyntaxException exception thrown to indicate that a string could not be parsed as a
|
||||
* URI reference.
|
||||
*/
|
||||
public abstract URI getTrackingUri(ApplicationId id)
|
||||
throws URISyntaxException;
|
||||
|
@ -80,6 +80,8 @@ public static String getUser() {
|
||||
|
||||
/**
|
||||
* Get the subversion URL for the root YARN directory.
|
||||
*
|
||||
* @return URL for the root YARN directory.
|
||||
*/
|
||||
public static String getUrl() {
|
||||
return YARN_VERSION_INFO._getUrl();
|
||||
@ -88,14 +90,18 @@ public static String getUrl() {
|
||||
/**
|
||||
* Get the checksum of the source files from which YARN was
|
||||
* built.
|
||||
**/
|
||||
*
|
||||
* @return srcChecksum.
|
||||
*/
|
||||
public static String getSrcChecksum() {
|
||||
return YARN_VERSION_INFO._getSrcChecksum();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the buildVersion which includes version,
|
||||
* revision, user and date.
|
||||
* revision, user and date.
|
||||
*
|
||||
* @return buildVersion.
|
||||
*/
|
||||
public static String getBuildVersion(){
|
||||
return YARN_VERSION_INFO._getBuildVersion();
|
||||
|
@ -91,13 +91,13 @@ public static long divideAndCeil(long a, float b) {
|
||||
|
||||
/**
|
||||
* Divides lhs by rhs.
|
||||
* If both lhs and rhs are having a value of 0, then we return 0.
|
||||
*
|
||||
* @param lhs left number.
|
||||
* @param rhs right number.
|
||||
* @return If both lhs and rhs are having a value of 0, then we return 0.
|
||||
* This is to avoid division by zero and return NaN as a result.
|
||||
* If lhs is zero but rhs is not, Float.infinity will be returned
|
||||
* as the result.
|
||||
* @param lhs
|
||||
* @param rhs
|
||||
* @return
|
||||
*/
|
||||
public static float divideSafelyAsFloat(long lhs, long rhs) {
|
||||
if (lhs == 0 && rhs == 0) {
|
||||
@ -263,6 +263,9 @@ public abstract float divide(
|
||||
|
||||
/**
|
||||
* Check if a smaller resource can be contained by bigger resource.
|
||||
* @param smaller smaller resource.
|
||||
* @param bigger bigger resource.
|
||||
* @return if true, smaller resource can be contained by bigger resource; false otherwise.
|
||||
*/
|
||||
public abstract boolean fitsIn(Resource smaller, Resource bigger);
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.apache.hadoop.classification.InterfaceAudience;
|
||||
import org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate;
|
||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||
import org.apache.hadoop.yarn.api.records.Resource;
|
||||
@ -31,7 +31,7 @@
|
||||
* Resources is a computation class which provides a set of apis to do
|
||||
* mathematical operations on Resource object.
|
||||
*/
|
||||
@InterfaceAudience.LimitedPrivate({ "YARN", "MapReduce" })
|
||||
@LimitedPrivate({ "YARN", "MapReduce" })
|
||||
@Unstable
|
||||
public class Resources {
|
||||
|
||||
@ -316,7 +316,11 @@ public static Resource multiply(Resource lhs, double by) {
|
||||
|
||||
/**
|
||||
* Multiply {@code rhs} by {@code by}, and add the result to {@code lhs}
|
||||
* without creating any new {@link Resource} object
|
||||
* without creating any new {@link Resource} object.
|
||||
* @param lhs {@link Resource} to subtract from.
|
||||
* @param rhs {@link Resource} to subtract.
|
||||
* @param by multiplier.
|
||||
* @return instance of Resource.
|
||||
*/
|
||||
public static Resource multiplyAndAddTo(
|
||||
Resource lhs, Resource rhs, double by) {
|
||||
|
@ -66,9 +66,9 @@ public class TimelineUtils {
|
||||
* @param o
|
||||
* an object to serialize
|
||||
* @return a JSON string
|
||||
* @throws IOException
|
||||
* @throws JsonMappingException
|
||||
* @throws JsonGenerationException
|
||||
* @throws IOException io error occur.
|
||||
* @throws JsonMappingException exception used to signal fatal problems with mapping of content.
|
||||
* @throws JsonGenerationException exception type for exceptions during JSON writing.
|
||||
*/
|
||||
public static String dumpTimelineRecordtoJSON(Object o)
|
||||
throws JsonGenerationException, JsonMappingException, IOException {
|
||||
@ -83,9 +83,9 @@ public static String dumpTimelineRecordtoJSON(Object o)
|
||||
* @param pretty
|
||||
* whether in a pretty format or not
|
||||
* @return a JSON string
|
||||
* @throws IOException
|
||||
* @throws JsonMappingException
|
||||
* @throws JsonGenerationException
|
||||
* @throws IOException io error occur.
|
||||
* @throws JsonMappingException exception used to signal fatal problems with mapping of content.
|
||||
* @throws JsonGenerationException exception type for exceptions during JSON writing.
|
||||
*/
|
||||
public static String dumpTimelineRecordtoJSON(Object o, boolean pretty)
|
||||
throws JsonGenerationException, JsonMappingException, IOException {
|
||||
|
@ -73,7 +73,7 @@ public class HamletGen {
|
||||
* @param implClass a generic hamlet implementation. e.g. {@link HamletImpl}
|
||||
* @param outputName name of the output class. e.g. {@link Hamlet}
|
||||
* @param outputPkg package name of the output class.
|
||||
* @throws IOException
|
||||
* @throws IOException io error occur.
|
||||
*/
|
||||
public void generate(Class<?> specClass, Class<?> implClass,
|
||||
String outputName, String outputPkg) throws IOException {
|
||||
|
@ -1251,7 +1251,7 @@ public interface _FormCtrl {
|
||||
|
||||
/**
|
||||
* Add a TEXTAREA element.
|
||||
* @param selector
|
||||
* @param selector the css selector in the form of (#id)*(.class)*
|
||||
* @return a new TEXTAREA element builder
|
||||
*/
|
||||
TEXTAREA textarea(String selector);
|
||||
@ -2080,13 +2080,13 @@ public interface BLOCKQUOTE extends Attrs, Block, _Script, _Child {
|
||||
*/
|
||||
public interface INS extends Attrs, Flow, _Child {
|
||||
/** info on reason for change
|
||||
* @param uri
|
||||
* @param uri the URI.
|
||||
* @return the current element builder
|
||||
*/
|
||||
INS $cite(String uri);
|
||||
|
||||
/** date and time of change
|
||||
* @param datetime
|
||||
* @param datetime the time.
|
||||
* @return the current element builder
|
||||
*/
|
||||
INS $datetime(String datetime);
|
||||
@ -2103,7 +2103,7 @@ public interface DEL extends Attrs, Flow, _Child {
|
||||
DEL $cite(String uri);
|
||||
|
||||
/** date and time of change
|
||||
* @param datetime the time
|
||||
* @param datetime the time.
|
||||
* @return the current element builder
|
||||
*/
|
||||
DEL $datetime(String datetime);
|
||||
@ -2205,13 +2205,13 @@ public interface LI extends Attrs, Flow, _Child {
|
||||
public interface FORM extends Attrs, _Child, /* (%block;|SCRIPT)+ -(FORM) */
|
||||
_Script, _Block, _FieldSet {
|
||||
/** server-side form handler
|
||||
* @param uri
|
||||
* @param uri the URI.
|
||||
* @return the current element builder
|
||||
*/
|
||||
FORM $action(String uri);
|
||||
|
||||
/** HTTP method used to submit the form
|
||||
* @param method
|
||||
* @param method method.
|
||||
* @return the current element builder
|
||||
*/
|
||||
FORM $method(Method method);
|
||||
@ -2220,37 +2220,37 @@ public interface FORM extends Attrs, _Child, /* (%block;|SCRIPT)+ -(FORM) */
|
||||
* contentype for "POST" method.
|
||||
* The default is "application/x-www-form-urlencoded".
|
||||
* Use "multipart/form-data" for input type=file
|
||||
* @param enctype
|
||||
* @param enctype enctype.
|
||||
* @return the current element builder
|
||||
*/
|
||||
FORM $enctype(String enctype);
|
||||
|
||||
/** list of MIME types for file upload
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
FORM $accept(String cdata);
|
||||
|
||||
/** name of form for scripting
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
FORM $name(String cdata);
|
||||
|
||||
/** the form was submitted
|
||||
* @param script
|
||||
* @param script to invoke.
|
||||
* @return the current element builder
|
||||
*/
|
||||
FORM $onsubmit(String script);
|
||||
|
||||
/** the form was reset
|
||||
* @param script
|
||||
* @param script to invoke.
|
||||
* @return the current element builder
|
||||
*/
|
||||
FORM $onreset(String script);
|
||||
|
||||
/** (space and/or comma separated) list of supported charsets
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
FORM $accept_charset(String cdata);
|
||||
@ -2262,25 +2262,25 @@ public interface FORM extends Attrs, _Child, /* (%block;|SCRIPT)+ -(FORM) */
|
||||
public interface LABEL extends Attrs, _Child, /* (%inline;)* -(LABEL) */
|
||||
PCData, FontStyle, Phrase, Special, _FormCtrl {
|
||||
/** matches field ID value
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
LABEL $for(String cdata);
|
||||
|
||||
/** accessibility key character
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
LABEL $accesskey(String cdata);
|
||||
|
||||
/** the element got the focus
|
||||
* @param script
|
||||
* @param script to invoke.
|
||||
* @return the current element builder
|
||||
*/
|
||||
LABEL $onfocus(String script);
|
||||
|
||||
/** the element lost the focus
|
||||
* @param script
|
||||
* @param script to invoke.
|
||||
* @return the current element builder
|
||||
*/
|
||||
LABEL $onblur(String script);
|
||||
@ -2292,19 +2292,19 @@ public interface LABEL extends Attrs, _Child, /* (%inline;)* -(LABEL) */
|
||||
@Element(endTag=false)
|
||||
public interface INPUT extends Attrs, _Child {
|
||||
/** what kind of widget is needed. default is "text".
|
||||
* @param inputType
|
||||
* @param inputType input value.
|
||||
* @return the current element builder
|
||||
*/
|
||||
INPUT $type(InputType inputType);
|
||||
|
||||
/** submit as part of form
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
INPUT $name(String cdata);
|
||||
|
||||
/** Specify for radio buttons and checkboxes
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
INPUT $value(String cdata);
|
||||
@ -2325,25 +2325,25 @@ public interface INPUT extends Attrs, _Child {
|
||||
INPUT $readonly();
|
||||
|
||||
/** specific to each type of field
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
INPUT $size(String cdata);
|
||||
|
||||
/** max chars for text fields
|
||||
* @param length
|
||||
* @param length max chars length.
|
||||
* @return the current element builder
|
||||
*/
|
||||
INPUT $maxlength(int length);
|
||||
|
||||
/** for fields with images
|
||||
* @param uri
|
||||
* @param uri the URI.
|
||||
* @return the current element builder
|
||||
*/
|
||||
INPUT $src(String uri);
|
||||
|
||||
/** short description
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
INPUT $alt(String cdata);
|
||||
@ -2355,43 +2355,43 @@ public interface INPUT extends Attrs, _Child {
|
||||
INPUT $ismap();
|
||||
|
||||
/** position in tabbing order
|
||||
* @param index
|
||||
* @param index the index
|
||||
* @return the current element builder
|
||||
*/
|
||||
INPUT $tabindex(int index);
|
||||
|
||||
/** accessibility key character
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
INPUT $accesskey(String cdata);
|
||||
|
||||
/** the element got the focus
|
||||
* @param script
|
||||
* @param script to invoke.
|
||||
* @return the current element builder
|
||||
*/
|
||||
INPUT $onfocus(String script);
|
||||
|
||||
/** the element lost the focus
|
||||
* @param script
|
||||
* @param script to invoke.
|
||||
* @return the current element builder
|
||||
*/
|
||||
INPUT $onblur(String script);
|
||||
|
||||
/** some text was selected
|
||||
* @param script
|
||||
* @param script to invoke.
|
||||
* @return the current element builder
|
||||
*/
|
||||
INPUT $onselect(String script);
|
||||
|
||||
/** the element value was changed
|
||||
* @param script
|
||||
* @param script to invoke.
|
||||
* @return the current element builder
|
||||
*/
|
||||
INPUT $onchange(String script);
|
||||
|
||||
/** list of MIME types for file upload (csv)
|
||||
* @param contentTypes
|
||||
* @param contentTypes content types.
|
||||
* @return the current element builder
|
||||
*/
|
||||
INPUT $accept(String contentTypes);
|
||||
@ -2426,13 +2426,13 @@ public interface SELECT extends Attrs, _Option, _Child {
|
||||
OPTGROUP optgroup();
|
||||
|
||||
/** field name
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
SELECT $name(String cdata);
|
||||
|
||||
/** rows visible
|
||||
* @param rows
|
||||
* @param rows number of rows.
|
||||
* @return the current element builder
|
||||
*/
|
||||
SELECT $size(int rows);
|
||||
@ -2448,25 +2448,25 @@ public interface SELECT extends Attrs, _Option, _Child {
|
||||
SELECT $disabled();
|
||||
|
||||
/** position in tabbing order
|
||||
* @param index
|
||||
* @param index the index
|
||||
* @return the current element builder
|
||||
*/
|
||||
SELECT $tabindex(int index);
|
||||
|
||||
/** the element got the focus
|
||||
* @param script
|
||||
* @param script to invoke.
|
||||
* @return the current element builder
|
||||
*/
|
||||
SELECT $onfocus(String script);
|
||||
|
||||
/** the element lost the focus
|
||||
* @param script
|
||||
* @param script to invoke.
|
||||
* @return the current element builder
|
||||
*/
|
||||
SELECT $onblur(String script);
|
||||
|
||||
/** the element value was changed
|
||||
* @param script
|
||||
* @param script to invoke.
|
||||
* @return the current element builder
|
||||
*/
|
||||
SELECT $onchange(String script);
|
||||
@ -2482,7 +2482,7 @@ public interface OPTGROUP extends Attrs, _Option, _Child {
|
||||
OPTGROUP $disabled();
|
||||
|
||||
/** for use in hierarchical menus
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
OPTGROUP $label(String cdata);
|
||||
@ -2504,13 +2504,13 @@ public interface OPTION extends Attrs, PCData, _Child {
|
||||
OPTION $disabled();
|
||||
|
||||
/** for use in hierarchical menus
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
OPTION $label(String cdata);
|
||||
|
||||
/** defaults to element content
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
OPTION $value(String cdata);
|
||||
@ -2521,19 +2521,19 @@ public interface OPTION extends Attrs, PCData, _Child {
|
||||
*/
|
||||
public interface TEXTAREA extends Attrs, PCData, _Child {
|
||||
/** variable name for the text
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
TEXTAREA $name(String cdata);
|
||||
|
||||
/** visible rows
|
||||
* @param rows
|
||||
* @param rows number of rows.
|
||||
* @return the current element builder
|
||||
*/
|
||||
TEXTAREA $rows(int rows);
|
||||
|
||||
/** visible columns
|
||||
* @param cols
|
||||
* @param cols number of cols.
|
||||
* @return the current element builder
|
||||
*/
|
||||
TEXTAREA $cols(int cols);
|
||||
@ -2549,37 +2549,37 @@ public interface TEXTAREA extends Attrs, PCData, _Child {
|
||||
TEXTAREA $readonly();
|
||||
|
||||
/** position in tabbing order
|
||||
* @param index
|
||||
* @param index the index
|
||||
* @return the current element builder
|
||||
*/
|
||||
TEXTAREA $tabindex(int index);
|
||||
|
||||
/** accessibility key character
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
TEXTAREA $accesskey(String cdata);
|
||||
|
||||
/** the element got the focus
|
||||
* @param script
|
||||
* @param script to invoke.
|
||||
* @return the current element builder
|
||||
*/
|
||||
TEXTAREA $onfocus(String script);
|
||||
|
||||
/** the element lost the focus
|
||||
* @param script
|
||||
* @param script to invoke.
|
||||
* @return the current element builder
|
||||
*/
|
||||
TEXTAREA $onblur(String script);
|
||||
|
||||
/** some text was selected
|
||||
* @param script
|
||||
* @param script to invoke.
|
||||
* @return the current element builder
|
||||
*/
|
||||
TEXTAREA $onselect(String script);
|
||||
|
||||
/** the element value was changed
|
||||
* @param script
|
||||
* @param script to invoke.
|
||||
* @return the current element builder
|
||||
*/
|
||||
TEXTAREA $onchange(String script);
|
||||
@ -2597,7 +2597,7 @@ public interface _Legend extends _Child {
|
||||
|
||||
/**
|
||||
* Add a LEGEND element.
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
_Legend legend(String cdata);
|
||||
@ -2614,7 +2614,7 @@ public interface FIELDSET extends Attrs, _Legend, PCData, Flow, _Child {
|
||||
*/
|
||||
public interface LEGEND extends Attrs, Inline, _Child {
|
||||
/** accessibility key character
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
LEGEND $accesskey(String cdata);
|
||||
@ -2626,19 +2626,19 @@ public interface LEGEND extends Attrs, Inline, _Child {
|
||||
public interface BUTTON extends /* (%flow;)* -(A|%formctrl|FORM|FIELDSET) */
|
||||
_Block, PCData, FontStyle, Phrase, _Special, _ImgObject, _SubSup, Attrs {
|
||||
/** name of the value
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
BUTTON $name(String cdata);
|
||||
|
||||
/** sent to server when submitted
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
BUTTON $value(String cdata);
|
||||
|
||||
/** for use as form button
|
||||
* @param type
|
||||
* @param type button type.
|
||||
* @return the current element builder
|
||||
*/
|
||||
BUTTON $type(ButtonType type);
|
||||
@ -2649,25 +2649,25 @@ public interface BUTTON extends /* (%flow;)* -(A|%formctrl|FORM|FIELDSET) */
|
||||
BUTTON $disabled();
|
||||
|
||||
/** position in tabbing order
|
||||
* @param index
|
||||
* @param index the index
|
||||
* @return the current element builder
|
||||
*/
|
||||
BUTTON $tabindex(int index);
|
||||
|
||||
/** accessibility key character
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
BUTTON $accesskey(String cdata);
|
||||
|
||||
/** the element got the focus
|
||||
* @param script
|
||||
* @param script to invoke.
|
||||
* @return the current element builder
|
||||
*/
|
||||
BUTTON $onfocus(String script);
|
||||
|
||||
/** the element lost the focus
|
||||
* @param script
|
||||
* @param script to invoke.
|
||||
* @return the current element builder
|
||||
*/
|
||||
BUTTON $onblur(String script);
|
||||
@ -2721,7 +2721,7 @@ public interface _Table extends _TableRow, _TableCol {
|
||||
|
||||
/**
|
||||
* Add a CAPTION element.
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
_Table caption(String cdata);
|
||||
@ -2813,7 +2813,7 @@ public interface TBODY extends Attrs, _TableRow, _Child {
|
||||
@Element(endTag=false)
|
||||
public interface COLGROUP extends Attrs, _TableCol, _Child {
|
||||
/** default number of columns in group. default: 1
|
||||
* @param cols
|
||||
* @param cols number of cols.
|
||||
* @return the current element builder
|
||||
*/
|
||||
COLGROUP $span(int cols);
|
||||
@ -2827,7 +2827,7 @@ public interface COLGROUP extends Attrs, _TableCol, _Child {
|
||||
@Element(endTag=false)
|
||||
public interface COL extends Attrs, _Child {
|
||||
/** COL attributes affect N columns. default: 1
|
||||
* @param cols
|
||||
* @param cols number of cols.
|
||||
* @return the current element builder
|
||||
*/
|
||||
COL $span(int cols);
|
||||
@ -2896,25 +2896,25 @@ public interface _Cell extends Attrs, Flow, _Child {
|
||||
// use $title for elaberation, when appropriate.
|
||||
// $axis omitted. use scope.
|
||||
/** space-separated list of id's for header cells
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
_Cell $headers(String cdata);
|
||||
|
||||
/** scope covered by header cells
|
||||
* @param scope
|
||||
* @param scope scope.
|
||||
* @return the current element builder
|
||||
*/
|
||||
_Cell $scope(Scope scope);
|
||||
|
||||
/** number of rows spanned by cell. default: 1
|
||||
* @param rows
|
||||
* @param rows number of rows.
|
||||
* @return the current element builder
|
||||
*/
|
||||
_Cell $rowspan(int rows);
|
||||
|
||||
/** number of cols spanned by cell. default: 1
|
||||
* @param cols
|
||||
* @param cols number of cols.
|
||||
* @return the current element builder
|
||||
*/
|
||||
_Cell $colspan(int cols);
|
||||
@ -2959,7 +2959,7 @@ public interface _Head extends HeadMisc {
|
||||
|
||||
/**
|
||||
* Add a complete BASE element.
|
||||
* @param uri
|
||||
* @param uri the URI.
|
||||
* @return the current element builder
|
||||
*/
|
||||
_Head base(String uri);
|
||||
@ -2984,7 +2984,7 @@ public interface TITLE extends I18nAttrs, PCData, _Child {
|
||||
@Element(endTag=false)
|
||||
public interface BASE extends _Child {
|
||||
/** URI that acts as base URI
|
||||
* @param uri
|
||||
* @param uri the URI.
|
||||
* @return the current element builder
|
||||
*/
|
||||
BASE $href(String uri);
|
||||
@ -2996,19 +2996,19 @@ public interface BASE extends _Child {
|
||||
@Element(endTag=false)
|
||||
public interface META extends I18nAttrs, _Child {
|
||||
/** HTTP response header name
|
||||
* @param header
|
||||
* @param header for the http-equiv attribute
|
||||
* @return the current element builder
|
||||
*/
|
||||
META $http_equiv(String header);
|
||||
|
||||
/** metainformation name
|
||||
* @param name
|
||||
* @param name of the meta element
|
||||
* @return the current element builder
|
||||
*/
|
||||
META $name(String name);
|
||||
|
||||
/** associated information
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
META $content(String cdata);
|
||||
@ -3021,19 +3021,19 @@ public interface META extends I18nAttrs, _Child {
|
||||
*/
|
||||
public interface STYLE extends I18nAttrs, _Content, _Child {
|
||||
/** content type of style language
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
STYLE $type(String cdata);
|
||||
|
||||
/** designed for use with these media
|
||||
* @param media
|
||||
* @param media set of media.
|
||||
* @return the current element builder
|
||||
*/
|
||||
STYLE $media(EnumSet<Media> media);
|
||||
|
||||
/** advisory title
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
STYLE $title(String cdata);
|
||||
@ -3044,25 +3044,25 @@ public interface STYLE extends I18nAttrs, _Content, _Child {
|
||||
*/
|
||||
public interface SCRIPT extends _Content, _Child {
|
||||
/** char encoding of linked resource
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
SCRIPT $charset(String cdata);
|
||||
|
||||
/** content type of script language
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
SCRIPT $type(String cdata);
|
||||
|
||||
/** URI for an external script
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
SCRIPT $src(String cdata);
|
||||
|
||||
/** UA may defer execution of script
|
||||
* @param cdata
|
||||
* @param cdata the content of the element.
|
||||
* @return the current element builder
|
||||
*/
|
||||
SCRIPT $defer(String cdata);
|
||||
|
@ -95,6 +95,13 @@ public static void setNMWebAppHostNameAndPort(Configuration conf,
|
||||
* Runs a certain function against the active RM. The function's first
|
||||
* argument is expected to be a string which contains the address of
|
||||
* the RM being tried.
|
||||
* @param conf configuration.
|
||||
* @param func throwing bi function.
|
||||
* @param arg T arg.
|
||||
* @param <T> Generic T.
|
||||
* @param <R> Generic R.
|
||||
* @throws Exception exception occurs.
|
||||
* @return instance of Generic R.
|
||||
*/
|
||||
public static <T, R> R execOnActiveRM(Configuration conf,
|
||||
ThrowingBiFunction<String, T, R> func, T arg) throws Exception {
|
||||
@ -389,7 +396,7 @@ public static String getTimelineCollectorWebAppURLWithoutScheme(
|
||||
* if url has scheme then it will be returned as it is else it will return
|
||||
* url with scheme.
|
||||
* @param schemePrefix eg. http:// or https://
|
||||
* @param url
|
||||
* @param url url.
|
||||
* @return url with scheme
|
||||
*/
|
||||
public static String getURLWithScheme(String schemePrefix, String url) {
|
||||
@ -428,7 +435,8 @@ public static String getAggregatedLogURL(String serverHttpAddress,
|
||||
/**
|
||||
* Choose which scheme (HTTP or HTTPS) to use when generating a URL based on
|
||||
* the configuration.
|
||||
*
|
||||
*
|
||||
* @param conf configuration.
|
||||
* @return the scheme (HTTP / HTTPS)
|
||||
*/
|
||||
public static String getHttpSchemePrefix(Configuration conf) {
|
||||
@ -438,6 +446,8 @@ public static String getHttpSchemePrefix(Configuration conf) {
|
||||
/**
|
||||
* Load the SSL keystore / truststore into the HttpServer builder.
|
||||
* @param builder the HttpServer2.Builder to populate with ssl config
|
||||
* @return HttpServer2.Builder instance (passed in as the first parameter)
|
||||
* after loading SSL stores
|
||||
*/
|
||||
public static HttpServer2.Builder loadSslConfiguration(
|
||||
HttpServer2.Builder builder) {
|
||||
|
@ -46,8 +46,8 @@ public class WebServiceClient {
|
||||
* Construct a new WebServiceClient based on the configuration. It will try to
|
||||
* load SSL certificates when it is specified.
|
||||
*
|
||||
* @param conf
|
||||
* @throws Exception
|
||||
* @param conf configuration.
|
||||
* @throws Exception exception occur.
|
||||
*/
|
||||
public static void initialize(Configuration conf) throws Exception {
|
||||
if (instance == null) {
|
||||
@ -75,9 +75,9 @@ SSLFactory getSSLFactory() {
|
||||
/**
|
||||
* Start SSL factory.
|
||||
*
|
||||
* @param conf
|
||||
* @return
|
||||
* @throws Exception
|
||||
* @param conf configuration.
|
||||
* @return SSL factory.
|
||||
* @throws Exception exception occur.
|
||||
*/
|
||||
private static SSLFactory createSSLFactory(Configuration conf)
|
||||
throws Exception {
|
||||
|
Loading…
Reference in New Issue
Block a user