public class JetConfig extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BACKUP_COUNT
The default value of the
backup-count |
static int |
DEFAULT_FLOW_CONTROL_PERIOD_MS
The default value of the
flow-control period . |
Constructor and Description |
---|
JetConfig()
Creates a new, empty
JetConfig with the default configuration. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
getBackupCount()
Returns the
number of backups used for job
metadata and snapshots. |
int |
getCooperativeThreadCount()
Returns the number of cooperative execution threads.
|
EdgeConfig |
getDefaultEdgeConfig()
Returns the default DAG edge configuration.
|
int |
getFlowControlPeriodMs()
Returns the
flow-control period in
milliseconds. |
InstanceConfig |
getInstanceConfig()
Deprecated.
The fields from
InstanceConfig class were
moved to JetConfig class. Get the fields directly from
JetConfig . |
long |
getMaxProcessorAccumulatedRecords()
Returns the maximum number of records that can be accumulated by any single
Processor instance. |
long |
getScaleUpDelayMillis()
Returns the scale-up delay, see
setScaleUpDelayMillis(long) . |
int |
hashCode() |
boolean |
isEnabled()
Returns if Jet is enabled
|
boolean |
isLosslessRestartEnabled()
Returns if lossless restart is enabled, see
setLosslessRestartEnabled(boolean) . |
boolean |
isResourceUploadEnabled()
Returns if uploading resources when submitting the job enabled
|
JetConfig |
setBackupCount(int newBackupCount)
Sets the number of backups that Jet will maintain for the job metadata
and snapshots.
|
JetConfig |
setCooperativeThreadCount(int size)
Sets the number of threads each cluster member will use to execute Jet
jobs.
|
JetConfig |
setDefaultEdgeConfig(EdgeConfig defaultEdgeConfig)
Sets the configuration object that specifies the defaults to use
for a DAG edge configuration.
|
JetConfig |
setEnabled(boolean enabled)
Sets if Jet is enabled
|
JetConfig |
setFlowControlPeriodMs(int flowControlPeriodMs)
While executing a Jet job there is the issue of regulating the rate
at which one member of the cluster sends data to another member.
|
JetConfig |
setInstanceConfig(InstanceConfig instanceConfig)
Deprecated.
The fields from
InstanceConfig class were
moved to JetConfig class. Set the fields directly on
JetConfig . |
JetConfig |
setLosslessRestartEnabled(boolean enabled)
Sets whether lossless job restart is enabled for the node.
|
JetConfig |
setMaxProcessorAccumulatedRecords(long maxProcessorAccumulatedRecords)
Sets the maximum number of records that can be accumulated by any single
Processor instance. |
JetConfig |
setResourceUploadEnabled(boolean resourceUploadEnabled)
Sets if uploading resources when submitting the job enabled
|
JetConfig |
setScaleUpDelayMillis(long millis)
Sets the delay after which auto-scaled jobs will restart if a new member
is added to the cluster.
|
public static final int DEFAULT_FLOW_CONTROL_PERIOD_MS
flow-control period
.public static final int DEFAULT_BACKUP_COUNT
backup-count
public JetConfig()
JetConfig
with the default configuration.
Doesn't consider any configuration XML files.@Nonnull public JetConfig setCooperativeThreadCount(int size)
public int getCooperativeThreadCount()
@Nonnull public JetConfig setFlowControlPeriodMs(int flowControlPeriodMs)
public int getFlowControlPeriodMs()
flow-control period
in
milliseconds.@Nonnull public JetConfig setBackupCount(int newBackupCount)
For example, if you set the backup count to 2, Jet will replicate all the job metadata and snapshot data to two other members. If one or two members of the cluster fail, Jet can recover the data from the snapshot and continue executing the job on the remaining members without loss.
public int getBackupCount()
number of backups
used for job
metadata and snapshots.public JetConfig setScaleUpDelayMillis(long millis)
millis
- the delay, in millisecondspublic long getScaleUpDelayMillis()
setScaleUpDelayMillis(long)
.public JetConfig setLosslessRestartEnabled(boolean enabled)
If enabled, you have to also configure Hot Restart:
JetConfig jetConfig = new JetConfig();
jetConfig.getInstanceConfig().setLosslessRestartEnabled(true);
jetConfig.getHazelcastConfig().getHotRestartPersistenceConfig()
.setEnabled(true)
.setBaseDir(new File("/mnt/hot-restart"))
.setParallelism(2);
Note: the snapshots exported using Job.exportSnapshot(java.lang.String)
will also have Hot Restart storage enabled.
Feature is disabled by default. If you enable this option in open-source Hazelcast Jet, the member will fail to start, you need Jet Enterprise to run it and obtain a license from Hazelcast.
public boolean isLosslessRestartEnabled()
setLosslessRestartEnabled(boolean)
.public JetConfig setMaxProcessorAccumulatedRecords(long maxProcessorAccumulatedRecords)
Processor
instance.
Operations like grouping, sorting or joining require certain amount of
records to be accumulated before they can proceed. You can set this option
to reduce the probability of OutOfMemoryError
.
This option applies to each Processor
instance separately, hence the
effective limit of records accumulated by each cluster member is influenced
by the vertex's localParallelism
and the number of jobs in the cluster.
Currently, maxProcessorAccumulatedRecords
limits:
Note: the limit does not apply to streaming aggregations.
The default value is Long.MAX_VALUE
.
public long getMaxProcessorAccumulatedRecords()
Processor
instance.public boolean isEnabled()
public JetConfig setEnabled(boolean enabled)
public boolean isResourceUploadEnabled()
public JetConfig setResourceUploadEnabled(boolean resourceUploadEnabled)
@Nonnull @Deprecated public InstanceConfig getInstanceConfig()
InstanceConfig
class were
moved to JetConfig
class. Get the fields directly from
JetConfig
.@Nonnull @Deprecated public JetConfig setInstanceConfig(@Nonnull InstanceConfig instanceConfig)
InstanceConfig
class were
moved to JetConfig
class. Set the fields directly on
JetConfig
.@Nonnull public EdgeConfig getDefaultEdgeConfig()
@Nonnull public JetConfig setDefaultEdgeConfig(@Nonnull EdgeConfig defaultEdgeConfig)
Copyright © 2021 Hazelcast, Inc.. All rights reserved.