Comments (8)
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.
If your app has mappers only, and no updaters, the work packets will never be sent across the network.
from mupd8.
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.
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.
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.
@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.
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.
@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)
- Enable source reader throttling on hot conductor backlogs HOT 1
- what happens after source reader fails to connect to a socket?
- Specify the number of task instances HOT 7
- JSONSource: exception in the socket reader initialization results in readLine() false-negative HOT 2
- Writes to the backing database are batched, instead of being throttled HOT 2
- External data source HOT 11
- Example documentation broken: OS 10.9 and compilation errors HOT 3
- Tutorial example not working HOT 5
- NPE Please FIX it. HOT 2
- NPE in MessageServer Server Thread
- java.lang.InterruptedException Should it kill the source thread or not ?
- NPE Again
- NPE when start-up followed by unclean shutdown HOT 3
- Example for setup in a cluster HOT 7
- Move 'org.codehaus' to 'com.fasterxml'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mupd8.