Skip to main content
Version: 2.13.X

Avoiding Common Errors

Certain operations within Cogynt are technically possible, but inadvisable due to their inefficiency or resource consumption. This section outlines these operations and proposes alternative approaches where applicable.

Risk Modeling

When using a Bayesian table to model risk, there is an option to create a table that includes every possible combination of elements. Do not use this option for patterns containing more than ten elements, as the resulting number of combinations is overwhelming. This option is best suited for patterns that contain fewer than five elements.

Using Computational Operations

Certain computational operations are currently not optimized. For most purposes, this is only noticeable for the toArray() operation.

It is inefficient to use the toArray() operation to place aggregation results in an array if:

  • Your data requires lots of aggregations over certain partitions.
  • You know that the partitions will have tens or hundreds of thousands of updates.

The recommendation is to create as many partitions as you reasonably can, then perform the aggregations. Alternatively, avoid using toArray() entirely.

Deploying and Publishing

When deploying jobs, it sometimes makes sense for multiple patterns to deploy or publish to the same topic. In this instance, you may want to consider putting the patterns into the same deployment.

If you separate the patterns into different deployments, do not enable the Reset Topic option. Otherwise, jobs that are already running at the time of deployment will reset. In turn, this will cause Flink to lose those topics, and it will consistently fail to recover them.