public class EdgeConfig extends Object implements IdentifiedDataSerializable
Edge
that holds fine-tuning parameters that influence its performance
characteristics.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PACKET_SIZE_LIMIT
The default
packet size limit . |
static int |
DEFAULT_QUEUE_SIZE
The default size of the
concurrent queues
connecting processors within a cluster member. |
static int |
DEFAULT_RECEIVE_WINDOW_MULTIPLIER
The default
receive window multiplier . |
Constructor and Description |
---|
EdgeConfig() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
getClassId()
Returns type identifier for this class.
|
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
getPacketSizeLimit()
Returns the limit on the
network packet size ,
in bytes |
int |
getQueueSize()
Returns the size of the SPSC queues used to implement this edge.
|
int |
getReceiveWindowMultiplier() |
int |
hashCode() |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
EdgeConfig |
setPacketSizeLimit(int packetSizeLimit)
For a distributed edge, data is sent to a remote member via Hazelcast network
packets.
|
EdgeConfig |
setQueueSize(int queueSize)
Sets the capacity of processor-to-processor concurrent queues.
|
EdgeConfig |
setReceiveWindowMultiplier(int receiveWindowMultiplier)
Sets the scaling factor used by the adaptive receive window sizing
function.
|
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public static final int DEFAULT_QUEUE_SIZE
concurrent queues
connecting processors within a cluster member.public static final int DEFAULT_RECEIVE_WINDOW_MULTIPLIER
receive window multiplier
.public static final int DEFAULT_PACKET_SIZE_LIMIT
packet size limit
.public EdgeConfig setQueueSize(int queueSize)
When data needs to travel between two processors on the same cluster member, Jet sends it over a concurrent single-producer, single-consumer (SPSC) queue of fixed capacity.
Since there are several processors executing the logic of each vertex,
and since the queues are SPSC, there will be senderParallelism *
receiverParallelism
queues representing the edge on each member. The
edge capacity should strike a balance between performance and memory
usage. The default of 1024 is a good size for
simple DAGs and moderate parallelism.
this
instance for fluent APIpublic int getQueueSize()
public EdgeConfig setReceiveWindowMultiplier(int receiveWindowMultiplier)
For each distributed edge the receiving member regularly sends flow-control ("ack") packets to its sender which prevent it from sending too much data and overflowing the buffers. The sender is allowed to send the data one receive window further than the last acknowledged byte and the receive window is sized in proportion to the rate of processing at the receiver.
Ack packets are sent in regular intervals
and the receive window multiplier sets the
factor of the linear relationship between the amount of data processed
within one such interval and the size of the receive window.
To put it another way, let us define an ackworth as the amount of data processed between two consecutive ack packets. The receive window multiplier determines the number of ackworths the sender can be ahead of the last acked byte.
The default value is 3. This setting has no effect on a non-distributed edge.
this
instance for fluent APIpublic int getReceiveWindowMultiplier()
receive window multiplier
public EdgeConfig setPacketSizeLimit(int packetSizeLimit)
Note that a single item cannot straddle packets, therefore the maximum packet size can exceed the value configured here by the size of a single data item.
The default value is 16384. This setting has no effect on a non-distributed edge.
this
instance for fluent APIpublic int getPacketSizeLimit()
network packet size
,
in bytespublic int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getClassId()
IdentifiedDataSerializable
getClassId
in interface IdentifiedDataSerializable
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.Copyright © 2021 Hazelcast, Inc.. All rights reserved.