Class SumMaster

  • All Implemented Interfaces:
    ml.shifu.guagua.master.MasterComputable<ml.shifu.guagua.hadoop.io.GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>,​ml.shifu.guagua.hadoop.io.GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>>

    @ComputableMonitor
    public class SumMaster
    extends Object
    implements ml.shifu.guagua.master.MasterComputable<ml.shifu.guagua.hadoop.io.GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>,​ml.shifu.guagua.hadoop.io.GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>>
    Sum all workers' results together.

    If sum value is larger than 1000000L, use HaltBytable to stop iteration.

    • Constructor Detail

      • SumMaster

        public SumMaster()
    • Method Detail

      • compute

        public ml.shifu.guagua.hadoop.io.GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable> compute​(ml.shifu.guagua.master.MasterContext<ml.shifu.guagua.hadoop.io.GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>,​ml.shifu.guagua.hadoop.io.GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>> context)
        Specified by:
        compute in interface ml.shifu.guagua.master.MasterComputable<ml.shifu.guagua.hadoop.io.GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>,​ml.shifu.guagua.hadoop.io.GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>>