Tags down


Lagom: is number of read side shards set per node or within the whole cluster?

By : Colombus
Date : October 16 2020, 06:10 PM
this will help Lagom allows splitting read side processor into shards to scale events processing. , It's the total number of shards for the whole cluster.
code :

Share : facebook icon twitter icon

Elasticsearch: on full cluster restart - Shards are not recovering and remaining as unassigned shards

By : Shadow C
Date : March 29 2020, 07:55 AM
should help you out When you are doing full cluster restart you need to start at least quorum of your data nodes. This is configured through index.recovery.initial_shards which prevents allocation stale shard copy.

CQRS (Lagom) elasticsearch read-side

By : teeohdoor
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , I don't have a huge amount of experience running ES in production, but essentially, ensuring that when you persist data, it stays persisted, especially in a distributed system, is hard. There are many, many edge cases that are very hard to get right, and it takes time for a database to mature and sort those edge cases out. A less durable database is one that probably hasn't ironed all these issues out.
Of course, ElasticSearch is popular open source database with a thriving community maintaining it, so there's likely no well defined cases where "your data will be lost in this circumstance", rather, there's likely cases that either haven't been come across yet, or when they have been come across by users in the wild, the users that came across them didn't care enough to debug it because they were only using ES as a secondary data store and were able to rebuild it from their primary data store. Whenever a case is identified that ES loses data under well understood circumstances, the maintainers of ES would be quick to fix that.

How can we use lagom's Read-side processor with Dgraph?

By : N.A.
Date : March 29 2020, 07:55 AM
With these it helps Lagom does not provide out-of-the-box support for Dgraph. If you have to use Lagom's Read-Side processor with Dgraph, then you have to use Lagom's Generic Read Side support. Like this:
code :
 * Read side processor for Dgraph.
public class FriendEventProcessor extends ReadSideProcessor<FriendEvent> {
    private static void createModel() {
        //TODO: Initialize schema in Dgraph

    public ReadSideProcessor.ReadSideHandler<FriendEvent> buildHandler() {
        return new ReadSideHandler<FriendEvent>() {
            private final Done doneInstance = Done.getInstance();

            public CompletionStage<Done> globalPrepare() {
                return CompletableFuture.completedFuture(doneInstance);

            public CompletionStage<Offset> prepare(final AggregateEventTag<FriendEvent> tag) {
                return CompletableFuture.completedFuture(Offset.NONE);

            public Flow<Pair<FriendEvent, Offset>, Done, ?> handle() {
                return Flow.<Pair<FriendEvent, Offset>>create()
                        .mapAsync(1, eventAndOffset -> {
                                    if (eventAndOffset.first() instanceof FriendCreated) {
                                        //TODO: Add Friend in Dgraph;

                                    return CompletableFuture.completedFuture(doneInstance);

    public PSequence<AggregateEventTag<FriendEvent>> aggregateTags() {
        return FriendEvent.TAG.allTags();
int NUM_SHARDS = 20;

  AggregateEventShards<FriendEvent> TAG =
          AggregateEventTag.sharded(FriendEvent.class, NUM_SHARDS);

  default AggregateEventShards<FriendEvent> aggregateTag() {
    return TAG;

On an Elasticsearch cluster, how to have a node not allocate shards on it?

By : user1949688
Date : March 29 2020, 07:55 AM
may help you . This can be done via this command (e.g. for a cluster node with IP
code :
PUT _cluster/settings
  "transient" : {
    "cluster.routing.allocation.exclude._ip" : ""

How to configure number of shards per cluster in elasticsearch

By : Jessica Ho
Date : March 29 2020, 07:55 AM
will help you So first off I'd start reading about indexes, primary shards, replica shards and nodes to understand the differences:
Related Posts Related Posts :
  • compare case class fields with sub fields of another case class in scala
  • throw exception does not work inside future.map scala?
  • Scala mockito: Delay Mockito.when().thenReturn(someFuture)
  • How to create multiple dataframe using same case class
  • How can I modify this Ordering?
  • reduce RDD having key as (String,String)
  • Accessibility of scala constructor parameters
  • list Pattern Matching to return a new list of every other element
  • How to Sorting results after run code in Spark
  • scala filter list of object if some fields in the object are same
  • Is there a way New->Scala Class in intellij can default to creating a case class (vs a regular class)?
  • Stop the fs2-stream after a timeout
  • Converting Case Classes with params as Case Classes to Avro Message to send to Kafka
  • Sum of an array elements through while loop
  • Scala: Using Trait + Companion object to enumerate implementations
  • Which tools can I use to benchmark a scala code?
  • can we declare variables and use them in for loop in scala
  • Bind columns of 2 different dataframes spark
  • How to manage the hierarchy of State in Functional Programming?
  • Sorting List of values in a RDD in Scala
  • Decreasing the compilation time when using shapeless HList
  • How to add the schema in a dataframe from a config file
  • scala - mock function and replace implementation in tests
  • Scala: no-name parameters in function with List and Option
  • How to obtain class type from case class value
  • How do I append an element to a list in Scala
  • How beneficial is Parallel Seq for executing sequence of statements?
  • How can I partition a RDD respecting order?
  • How to extract latest/recent partition from the list of year month day partition columns
  • Fs2 Stream.Compiler is not found (could not find implicit value Compiler[[x]F[x],G])
  • Can you mock a value rather than a method?
  • PureConfig ConfigLoader in Scala
  • Scala naming convention for Futures
  • case class inheriting another class/trait
  • what is the optimal way to show differences between two data sets
  • Is it safe to catch an Exception object
  • base64 decoding of a dataframe
  • Identifying object fields with strings in Scala
  • ScalaTest can't verify mock function invocations inside Future
  • Modify keys in Spray JSON
  • What is value of '_.nextInt' in this expression in Scala
  • Histogram for RDD in Scala?
  • Why there is a different error message on using += and a=x+y on a val variable?
  • Tail recursion and call by name / value
  • How to validate Date Column of dateframe
  • How can I get an empty collection of the same type as a given instance?
  • When to do .repartition(Int AnyValue) in Spark, right after reading the Parquet (or) after running computations on that
  • Databricks: Dataframe groupby agg, collector set include duplicate values
  • Import Scala object based on value of commandline argument
  • How to get the type parameters from an abstract class that is extended by an object
  • How can i check for empty values on spark Dataframe using User defined functions
  • Scala Tuple2Zipped vs IterableLike zip
  • Split one row into multiple rows of dataframe
  • How to divide values of two columns with another name in sqlcontext?
  • Is it possible to have a generic logging filter in finagle that can be "inserted anywhere" in a chain of andTh
  • How to sort data in Scala?
  • What (exactly) are "First Class" modules?
  • How to write empty data frame headers only to csv file?
  • When running scala code in spark I get "Task not serializable" , why?
  • Akka - Best Approach to configure an Actor that consumes a REST API service (blocking operation)
  • shadow
    Privacy Policy - Terms - Contact Us © 35dp-dentalpractice.co.uk