Class ScaleManager
java.lang.Object
org.openspaces.admin.internal.pu.scale_horizontal.ScaleManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringScale out meta data key holding the reason a scale out was aborted and rolled back (e.g. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringconvertToInstanceId(String idFromName) static ClusterTopologygetClusterTopology(AttributeStore attributeStore, String puName, int generation) static ClusterTopologyStategetClusterTopologyState(AttributeStore attributeStore, String puName) getLatestChunksMap(String puName) static InternalQuiesceDetailsgetQuiesceDetails(AttributeStore attributeStore, String puName) getScaleCredentials(String puName) booleanhasScaleCredentials(String puName) booleanisRESTScaleRequest(String puName) booleanstatic booleanbooleanpostScaleRequest(String puName) voidrejectScaleCredentials(String puName) Marks the credentials of the scale out of the pu as rejected by the space (e.g.voidremoveScaleCredentials(String puName) voidscaleIn(DefaultProcessingUnit pu, int factor, InternalAdminDriver driver) voidscaleOutUnSafe(DefaultProcessingUnit pu, int factor, String memory, String cpu, InternalAdminDriver driver) static voidsetClusterTopology(AttributeStore attributeStore, String puName, ClusterTopology topology) static voidsetClusterTopologyState(AttributeStore attributeStore, String puName, ClusterTopologyState topologyState) voidvoidsetScaleCredentials(String puName, CredentialsProvider credentialsProvider) voidsetScaleOutDetailsOnZK(DefaultProcessingUnit pu, int factor, String memory, String cpu, String requestId) static voidupdateGenerationAfterScaleOut(DefaultProcessingUnit pu, ClusterTopology currentMap, ClusterTopology newMap, AttributeStore attributeStore)
-
Field Details
-
FAILURE_REASON
Scale out meta data key holding the reason a scale out was aborted and rolled back (e.g. the scale tasks were rejected by a secured space).- See Also:
-
-
Constructor Details
-
ScaleManager
-
-
Method Details
-
setScaleCredentials
-
removeScaleCredentials
-
rejectScaleCredentials
Marks the credentials of the scale out of the pu as rejected by the space (e.g. an expired token), so they are not used again until a scale request provides new ones. -
hasScaleCredentials
- Returns:
- true if a scale request of this Admin provides valid credentials for the in-progress scale out of the pu
-
getScaleCredentials
- Returns:
- the credentials to execute the scale tasks of the given pu with - those of the user who requested the scale out, or the Admin's own credentials. Null if neither is available, or they were rejected.
-
getClusterTopologyState
public static ClusterTopologyState getClusterTopologyState(AttributeStore attributeStore, String puName) throws IOException - Throws:
IOException
-
getClusterTopology
public static ClusterTopology getClusterTopology(AttributeStore attributeStore, String puName, int generation) throws IOException - Throws:
IOException
-
setScaleOutDetailsOnZK
public void setScaleOutDetailsOnZK(DefaultProcessingUnit pu, int factor, String memory, String cpu, String requestId) throws IOException - Throws:
IOException
-
setRollbackDetailsOnZK
- Throws:
IOException
-
scaleIn
public void scaleIn(DefaultProcessingUnit pu, int factor, InternalAdminDriver driver) throws IOException, TransactionException, ExecutionException, InterruptedException -
scaleOutUnSafe
public void scaleOutUnSafe(DefaultProcessingUnit pu, int factor, String memory, String cpu, InternalAdminDriver driver) throws ExecutionException, InterruptedException, IOException, TransactionException -
updateGenerationAfterScaleOut
public static void updateGenerationAfterScaleOut(DefaultProcessingUnit pu, ClusterTopology currentMap, ClusterTopology newMap, AttributeStore attributeStore) throws IOException - Throws:
IOException
-
setClusterTopologyState
public static void setClusterTopologyState(AttributeStore attributeStore, String puName, ClusterTopologyState topologyState) -
setClusterTopology
public static void setClusterTopology(AttributeStore attributeStore, String puName, ClusterTopology topology) -
killPartitionInstances
-
convertToInstanceId
-
getQuiesceDetails
public static InternalQuiesceDetails getQuiesceDetails(AttributeStore attributeStore, String puName) throws IOException - Throws:
IOException
-
getLatestChunksMap
- Throws:
IOException
-
isScaling
- Throws:
IOException
-
isRESTScaleRequest
-
postScaleRequest
-