MapReduce Frameworks Lab

From CSE231 Wiki
Revision as of 08:23, 3 March 2022 by Cosgroved (talk | contribs)
Jump to navigation Jump to search

Bottleneck MapReduce Framework

Matrix MapReduce Framework


combineAndFinishAll

method: Map<K, R> combineAndFinishAll(Map<K, A>[][] input) Parallel.svg (parallel implementation required)

In this stage, you will take the matrix you just completed and combine all of the separate rows down to one array. Afterward, you will convert this combined array of maps into one final map. This method should run in parallel.

As mentioned previously, you should go directly down the matrix to access the same bucket across the different slices you created in the mapAndAccumulateAll step. For all of the maps in a column, you should go through each entry and combine it down into one row. You will need to make use of the Collector’s finisher again, but you will also need to make use of the combiner. You can access the Collector’s combiner using the combiner() method. Although the combine step differs from the bottlenecked framework, the finish step should mirror what you did previously.

Hint: You can use the provided MultiWrapMap class to return the final row as a valid output. You should also combine before you finish.

Matrix combine finish all.png slide

Testing Your Solution

Correctness

There is a top-level test suite comprised of sub test suites which can be invoked separately when you want to focus on one part of the assignment.

class: FrameworksLabTestSuite.java Junit.png
package: mapreduce.framework.lab
source folder: testing/src/test/java

Bottlenecked

class: BottleneckedFrameworkTestSuite.java Junit.png
package: mapreduce.framework.lab.bottlenecked
source folder: testing/src/test/java

MapAll

class: BottleneckedFrameworkTestSuite.java Junit.png
package: mapreduce.framework.lab.bottlenecked
source folder: testing/src/test/java

AccumulateAll

class: BottleneckedAccumulateAllTestSuite.java Junit.png
package: mapreduce.framework.lab.bottlenecked
source folder: testing/src/test/java

FinishAll

class: BottleneckedFinishAllTestSuite.java Junit.png
package: mapreduce.framework.lab.bottlenecked
source folder: testing/src/test/java

Holistic

class: BottleneckedHolisticTestSuite.java Junit.png
package: mapreduce.framework.lab.bottlenecked
source folder: testing/src/test/java

Matrix

class: MatrixFrameworkTestSuite.java Junit.png
package: mapreduce.framework.lab.matrix
source folder: testing/src/test/java

MapAccumulateAll

class: MatrixMapAccumulateAllTestSuite.java Junit.png
package: mapreduce.framework.lab.matrix
source folder: testing/src/test/java

CombineFinishAll

class: MatrixCombineFinishAllTestSuite.java Junit.png
package: mapreduce.framework.lab.matrix
source folder: testing/src/test/java

Holistic

class: MatrixHolisticTestSuite.java Junit.png
package: mapreduce.framework.lab.matrix
source folder: testing/src/test/java

Rubric

As always, please make sure to cite your work appropriately.

Total points: 100

Bottlenecked framework subtotal: 40

  • Correct mapAll (10)
  • Correct accumulateAll (20)
  • Correct finishAll (10)

Matrix framework subtotal: 60

  • Correct mapAndAccumulateAll (30)
  • Correct combineAndFinishAll (30)

-->