Questions tagged [reducers]

Refers to reducers in the mapreduce framework. Mappers split up a large problem and solve parts of it in parallel. Reducers collect and summarize the output of a map method.

Reference: https://en.wikipedia.org/wiki/MapReduce

819 questions
12
votes
4 answers

Number of reducers in hadoop

I was learning hadoop, I found number of reducers very confusing : 1) Number of reducers is same as number of partitions. 2) Number of reducers is 0.95 or 1.75 multiplied by (no. of nodes) * (no. of maximum containers per node). 3) Number of…
Mohit Jain
  • 357
  • 2
  • 7
  • 18
12
votes
4 answers

combiner and reducer can be different?

In many MapReduce programs, I see a reducer being used as a combiner as well. I know this is because of the specific nature of those programs. But I am wondering if they can be different.
kee
  • 10,969
  • 24
  • 107
  • 168
11
votes
2 answers

Redux - ReactJS app does not rerender (although JSON.parse for new object)

I have a ReactJS app with filters and use a RESET function for resetting those filters. What I also use: Redux, Redux Persist and React-router-dom. If I have a look at the Redux Devtools, it seems to work. But the App does not rerender correctly, a…
Gutelaunetyp
  • 2,144
  • 4
  • 15
  • 40
11
votes
2 answers

GraphQL - return calculated type dependent on argument

Overview (simplified): In my NodeJS server I've implemented the following GraphQL schema: type Item { name: String, value: Float } type Query { items(names: [String]!): [Item] } The client query then passes an array of names, as an…
Shlomi Schwartz
  • 8,693
  • 29
  • 109
  • 186
11
votes
1 answer

Why does my Redux reducer think my state is undefined?

I believe I'm copying the Todo tutorial pretty much line for line, I am getting this error: Error: Reducer "addReport" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the…
chum of chance
  • 6,200
  • 10
  • 46
  • 74
11
votes
2 answers

Hadoop MapReduce: Clarification on number of reducers

In the MapReduce framework, one reducer is used for each key generated by the mapper. So you would think that specifying the number of Reducers in Hadoop MapReduce wouldn't make any sense because it's dependent on the program. However, Hadoop…
clarity
  • 368
  • 1
  • 4
  • 14
10
votes
2 answers

NgRx store with pagination

I am trying to find out how to design the NgRx store when the server response is paginated. if we keep only 1 page at the time in the store then what is the point of using NgRx at all? if we keep slots for all pages and fill each page in the store…
ashil
  • 151
  • 1
  • 7
10
votes
3 answers

Redux - relation of reducers to actions

I am new to react/redux. I am trying to figure out how all the pieces in redux interact. The one thing giving me trouble is understanding the relation between actions and reducers. When an action is called, how does the store know which reducer to…
steveareeno
  • 1,925
  • 5
  • 39
  • 59
10
votes
2 answers

Do reducers (in Clojure) address the scaling foldr accumulation issue outlined by Guy Steele?

In her talk The Future Of Clojure Bodil makes the following claim: Guy Steele gave a talk at ICFP called Organizing Functional Code for Parallel Execution (or, foldl and foldr Considered Slightly Harmful) (Also in ACM). In it Guy Steele asserts…
hawkeye
  • 34,745
  • 30
  • 150
  • 304
10
votes
3 answers

Why is there no significant speedup using reducers in this example?

(require '[clojure.core.reducers :as r]) (def data (into [] (take 10000000 (repeatedly #(rand-int 1000))))) (defn frequencies [coll] (reduce (fn [counts x] (merge-with + counts {x 1})) {} coll)) (defn pfrequencies [coll] (r/reduce (fn…
Michiel Borkent
  • 34,228
  • 15
  • 86
  • 149
9
votes
1 answer

Why are Clojure's core.reducers faster than lazy collection functions

In many resources on Reducers (like the canonical blog post by Rich Hickey), it's claimed that reducers are faster than the regular collection functions ((map ... (filter ...)) etc.) because there is less overhead. What is the extra overhead that's…
zlatanski
  • 815
  • 1
  • 8
  • 13
9
votes
1 answer

Redux reducer / state-shape design for dependent state-slices

I enjoy the concept of reducer composition in Redux, but have run into a scenario where I would like to split a reducer up, but the children reducers would then rely on state-slices from the others to make their changes. For Example In my state, I…
lawls544
  • 711
  • 4
  • 10
9
votes
2 answers

Amazon MapReduce no reducer job

I am trying to create a mapper only job via AWS (a streaming job). The reducer field is required, so I am giving a dummy executable, and adding -jobconf mapred.map.tasks=0 to the Extra Args box. In the hadoop environment (version 0.20) I've…
sagie
  • 2,998
  • 3
  • 22
  • 31
8
votes
2 answers

StoreModule.forRoot() - how to return object without additional key

I am wondering how can I return object of the same type as reducer function: function storeReducer( state = INITIAL_APPLICATION_STATE, action: Actions ): ApplicationState { switch (action.type) { case LOAD_USER_THREADS_ACTION: return…
Mateusz
  • 1,163
  • 2
  • 13
  • 25
8
votes
1 answer

React.js/Redux: setInterval and clearInterval in Reducers

Currently I am working on FCC Game of Life and I was able figure out how to generate the next app state (incrementally). That being said, my next step is to figure out how to generate new app state (generation) continuously. In this case, I am…
Alejandro
  • 2,266
  • 6
  • 35
  • 63
1
2
3
54 55