GithubHelp home page GithubHelp logo

Comments (8)

sunweik avatar sunweik commented on June 23, 2024

Regarding mapper, your observation is right, one mapper is working for one source reader on one node. We need to have a discussion regarding this problem. Btw, can I know what kinda job you are putting on mapper?

Some nodes not executing anything seems like a bug in hash ring. But could you turn on TRACE log level on those nodes to double check it? If anything running on that node, you can easily tell it by tail log file. At the same time, I am going to run tests again our current hash ring.

from mupd8.

ZohebV avatar ZohebV commented on June 23, 2024

If your app has mappers only, and no updaters, the work packets will never be sent across the network.

from mupd8.

zheguang avatar zheguang commented on June 23, 2024

My guess is that your stream source is only accessible locally on one node (the node where all mappers are scheduled)? If you are using some distributed storage system as your source (e.g. HDFS, Amazon Simple Queue Service) you might be able to spread your source threads and corresponding mappers across your cluster.

If your stream is only coming in on that one node, then it'd probably be worthwhile to consider having a darn-simple mapper that simply distributes your incoming events evenly to your other nodes, and on those nodes your original CPU-intensive mappers will be running. So it'd go like this,

stream source --> darn-simple mapper --> {CPU-intensive mappers}

from mupd8.

ZohebV avatar ZohebV commented on June 23, 2024

It is not possible to write a simple mapper that will distribute events across nodes. This can only be done via an Updater as of now. Create a hash buckets of randomly generated keys and send them to their corresponding Updaters on different hosts.

from mupd8.

Teots avatar Teots commented on June 23, 2024

I tried to follow zheguang recommendation, but as ZohebV already said it did't work out. Both succeeding map task has been executed on the same node.

However the one thing that changed is that all other nodes are executing my update task now.

from mupd8.

zheguang avatar zheguang commented on June 23, 2024

@ZohebV Thanks for pointing that out! @Teots Sorry about the confusion. But I'm sure you get the idea. So please use a darn-simple Updater to "update" your incoming stream and publish to a bunch of outgoing streams.

from mupd8.

Teots avatar Teots commented on June 23, 2024

I replaced my mapper by an updater, doing the same job. Thus my topology looks like that:

Source -> Updater_1(Do calculation) -> Updater_2(Aggregate results)

Now my problem remains that some nodes aren't executing anything, but most of them are executing Updater_1 and Updater_2.

from mupd8.

ZohebV avatar ZohebV commented on June 23, 2024

@Teots Use more hash buckets and good hash functions/random number generators to ensure a more even distribution of keys

from mupd8.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.