com.hazelcast.mapreduce.impl.task
Class TransferableJobProcessInformation

java.lang.Object
  extended by com.hazelcast.mapreduce.impl.task.TransferableJobProcessInformation
All Implemented Interfaces:
JobProcessInformation, Portable

public class TransferableJobProcessInformation
extends Object
implements JobProcessInformation, Portable

This implementation of JobProcessInformation is used to transmit the currently processed number of records and the partition states to a requesting client. This information can only be requested by the job emitting client and by requesting it at the job owner.


Constructor Summary
TransferableJobProcessInformation()
           
TransferableJobProcessInformation(JobPartitionState[] partitionStates, int processedRecords)
           
 
Method Summary
 int getClassId()
          Returns class identifier for this portable class.
 int getFactoryId()
          Returns PortableFactory id for this portable class
 JobPartitionState[] getPartitionStates()
          Returns an array of JobPartitionStates holding information about the processing state (JobPartitionState.State) and the processing owner of this partition.
The index of the JobPartitionState inside of the array is the number of the processed partition if the KeyValueSource is PartitionIdAware or a randomly assigned id for the different members of the cluster.
 int getProcessedRecords()
          Returns the number of processed records.
The number of processed records is not a real time value but updated on regular base (after 1000 processed elements per node).
 void readPortable(PortableReader reader)
          Read portable fields using PortableReader
 void writePortable(PortableWriter writer)
          Serialize this portable object using PortableWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransferableJobProcessInformation

public TransferableJobProcessInformation()

TransferableJobProcessInformation

public TransferableJobProcessInformation(JobPartitionState[] partitionStates,
                                         int processedRecords)
Method Detail

getPartitionStates

public JobPartitionState[] getPartitionStates()
Description copied from interface: JobProcessInformation
Returns an array of JobPartitionStates holding information about the processing state (JobPartitionState.State) and the processing owner of this partition.
The index of the JobPartitionState inside of the array is the number of the processed partition if the KeyValueSource is PartitionIdAware or a randomly assigned id for the different members of the cluster.

Specified by:
getPartitionStates in interface JobProcessInformation
Returns:
partition state array with actual state information

getProcessedRecords

public int getProcessedRecords()
Description copied from interface: JobProcessInformation
Returns the number of processed records.
The number of processed records is not a real time value but updated on regular base (after 1000 processed elements per node).

Specified by:
getProcessedRecords in interface JobProcessInformation
Returns:
number of processed records

writePortable

public void writePortable(PortableWriter writer)
                   throws IOException
Description copied from interface: Portable
Serialize this portable object using PortableWriter

Specified by:
writePortable in interface Portable
Parameters:
writer - PortableWriter
Throws:
IOException

readPortable

public void readPortable(PortableReader reader)
                  throws IOException
Description copied from interface: Portable
Read portable fields using PortableReader

Specified by:
readPortable in interface Portable
Parameters:
reader - PortableReader
Throws:
IOException

getFactoryId

public int getFactoryId()
Description copied from interface: Portable
Returns PortableFactory id for this portable class

Specified by:
getFactoryId in interface Portable
Returns:
factory id

getClassId

public int getClassId()
Description copied from interface: Portable
Returns class identifier for this portable class. Class id should be unique per PortableFactory.

Specified by:
getClassId in interface Portable
Returns:
class id


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.