Package org.apache.sysds.runtime.controlprogram.paramserv

# Class SparkPSWorker

java.lang.Object
org.apache.sysds.runtime.controlprogram.paramserv.PSWorker
org.apache.sysds.runtime.controlprogram.paramserv.LocalPSWorker
org.apache.sysds.runtime.controlprogram.paramserv.SparkPSWorker

All Implemented Interfaces:
  `Serializable`, `Callable<Void>`, `org.apache.spark.api.java.function.VoidFunction<scala.Tuple2<Integer,scala.Tuple2<MatrixBlock,MatrixBlock>>>`

public class SparkPSWorker extends LocalPSWorker implements org.apache.spark.api.java.function.VoidFunction<scala.Tuple2<Integer,scala.Tuple2<MatrixBlock,MatrixBlock>>>

See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`SparkPSWorker(String updFunc, String aggFunc, Statement.PSFrequency freq, int epochs, long batchSize, String program, boolean isLocal, HashMap<String,byte[]> clsMap, org.apache.spark.SparkConf conf, int port, org.apache.spark.util.LongAccumulator aSetup, org.apache.spark.util.LongAccumulator aWorker, org.apache.spark.util.LongAccumulator aUpdate, org.apache.spark.util.LongAccumulator aIndex, org.apache.spark.util.LongAccumulator aGrad, org.apache.spark.util.LongAccumulator aRPC, org.apache.spark.util.LongAccumulator aBatches, org.apache.spark.util.LongAccumulator aEpochs, int nbatches, boolean modelAvg)`

## Method Summary

Modifier and Type
Method
Description
`void`
`call(scala.Tuple2<Integer,scala.Tuple2<MatrixBlock,MatrixBlock>> input)`
`String`
`getWorkerName()`

### Methods inherited from class org.apache.sysds.runtime.controlprogram.paramserv.LocalPSWorker

`call`

### Methods inherited from class org.apache.sysds.runtime.controlprogram.paramserv.PSWorker

`getFeatures, getLabels, setFeatures, setLabels`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SparkPSWorker

public SparkPSWorker(String updFunc, String aggFunc, Statement.PSFrequency freq, int epochs, long batchSize, String program, boolean isLocal, HashMap<String,byte[]> clsMap, org.apache.spark.SparkConf conf, int port, org.apache.spark.util.LongAccumulator aSetup, org.apache.spark.util.LongAccumulator aWorker, org.apache.spark.util.LongAccumulator aUpdate, org.apache.spark.util.LongAccumulator aIndex, org.apache.spark.util.LongAccumulator aGrad, org.apache.spark.util.LongAccumulator aRPC, org.apache.spark.util.LongAccumulator aBatches, org.apache.spark.util.LongAccumulator aEpochs, int nbatches, boolean modelAvg)

## Method Details

### getWorkerName

public String getWorkerName()

Overrides:
  `getWorkerName` in class `LocalPSWorker`

### call

public void call(scala.Tuple2<Integer,scala.Tuple2<MatrixBlock,MatrixBlock>> input) throws Exception

Specified by:
  `call` in interface `org.apache.spark.api.java.function.VoidFunction<scala.Tuple2<Integer,scala.Tuple2<MatrixBlock,MatrixBlock>>>`
Throws:
  `Exception`