Class RemoveInternalClusterShardingData$
- java.lang.Object
-
- org.apache.pekko.cluster.sharding.RemoveInternalClusterShardingData$
-
public class RemoveInternalClusterShardingData$ extends java.lang.Object
Utility program that removes the internal data stored with Pekko Persistence by the ClusterShardCoordinator
. The data contains the locations of the shards using Pekko Persistence and it can safely be removed when restarting the whole Pekko Cluster. Note that this is not application data.Never use this program while there are running Pekko Cluster that is using Cluster Sharding. Stop all Cluster nodes before using this program.
It can be needed to remove the data if the Cluster
ShardCoordinator
cannot startup because of corrupt data, which may happen if accidentally two clusters were running at the same time, e.g. caused by using auto-down and there was a network partition.Use this program as a standalone Java main program:
java -classpath <jar files, including pekko-cluster-sharding> org.apache.pekko.cluster.sharding.RemoveInternalClusterShardingData -2.3 entityType1 entityType2 entityType3
The program is included in the
pekko-cluster-sharding
jar file. It is easiest to run it with same classpath and configuration as your ordinary application. It can be run from sbt or maven in similar way.Specify the entity type names (same as you use in the
start
method ofClusterSharding
) as program arguments.If you specify
-2.3
as the first program argument it will also try to remove data that was stored by Cluster Sharding in Akka 2.3.x using different persistenceId.
-
-
Field Summary
Fields Modifier and Type Field Description static RemoveInternalClusterShardingData$
MODULE$
Static reference to the singleton instance of this Scala object.
-
Constructor Summary
Constructors Constructor Description RemoveInternalClusterShardingData$()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
main(java.lang.String[] args)
scala.concurrent.Future<scala.runtime.BoxedUnit>
remove(ActorSystem system, java.lang.String journalPluginId, scala.collection.immutable.Set<java.lang.String> typeNames, boolean remove2dot3Data)
API corresponding to themain(java.lang.String[])
method as described in theRemoveInternalClusterShardingData companion object
-
-
-
Field Detail
-
MODULE$
public static final RemoveInternalClusterShardingData$ MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Method Detail
-
main
public void main(java.lang.String[] args)
-
remove
public scala.concurrent.Future<scala.runtime.BoxedUnit> remove(ActorSystem system, java.lang.String journalPluginId, scala.collection.immutable.Set<java.lang.String> typeNames, boolean remove2dot3Data)
API corresponding to themain(java.lang.String[])
method as described in theRemoveInternalClusterShardingData companion object
-
-