Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vale/config/vocabularies/Hazelcast/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Logstash
Mac
macOS
Management Center
MBean
MBeans?
memcache
Merkle
Microsoft
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Each documentation page is built from an MDX file. Each file starts with YAML fr
- `sidebar_label`: the label that's shown in the side navigation.
- `sidebar_position`: the position of this page within its section in the side navigation.
- `slug`: used to maintain URLs from the previous documentation platform. Don't add a slug for new pages, or edit existing slugs.
- `hide_in_snapshot: true`: makes the page [unlisted](https://docusaurus.io/docs/create-doc#unlisted) in the unreleased snapshot version. An unlisted page is hidden from the side navigation, search engines, and the sitemap, and it stays reachable by its URL. The key has no effect in releases. The dev server shows the page in the side navigation, with an "Unlisted page" banner.
- `enterprise: true`, `beta: true`, or `experimental: true`: shows a badge at the top of the page. The `enterprise` and `beta` badges also show next to the page in the side navigation.

Pages in `cloud/` and `tutorials/` can also have `cloud_title`, `cloud_tags`, and `cloud_order` keys. The Hazelcast Cloud console reads them. Do not remove or rename them.
Expand Down
3 changes: 2 additions & 1 deletion docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {themes as prismThemes} from 'prism-react-renderer';
import type {Config} from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
import {redirects} from './src/redirects';
import {docs, versionedDocs, versionedInstances, latestSegs, canonicalSitemapItems} from './src/docsPlugins';
import {docs, versionedDocs, versionedInstances, latestSegs, canonicalSitemapItems, parseFrontMatter} from './src/docsPlugins';
import {variables, versionedVariables} from './src/variables';

// Retired versions served as static Antora HTML from a separate site. See plugins/archived-versions.
Expand Down Expand Up @@ -58,6 +58,7 @@ const config: Config = {
onBrokenAnchors: 'warn',

markdown: {
parseFrontMatter,
hooks: {
onBrokenMarkdownLinks: 'throw',
onBrokenMarkdownImages: 'throw',
Expand Down
6 changes: 3 additions & 3 deletions hazelcast/clients-and-apis/clients/java.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1812,10 +1812,10 @@ You need to restart clients after modifying system properties.
| <Variable href="https://docs.hazelcast.org/docs/{os-version}/javadoc/com/hazelcast/client/properties/ClientProperty.html#IO_OUTPUT_THREAD_COUNT" text="hazelcast.client.io.output.thread.count" code /> | -1 | int | Controls the number of I/O output threads. Defaults to -1, i.e., the system decides. If the client is using either the `ALL_MEMBERS` or the `MULTI_MEMBER` cluster routing mode, it defaults to 3, otherwise it defaults to 1. If there are more than 8 processors, it defaults to 3 threads. |
| <Variable href="https://docs.hazelcast.org/docs/{os-version}/javadoc/com/hazelcast/client/properties/ClientProperty.html#IO_WRITE_THROUGH_ENABLED" text="hazelcast.client.io.write.through" code /> | true | bool | Optimization that allows sending of packets over the network to be done on the calling thread if the conditions are right. This can reduce the latency and increase the performance for low threaded environments. |
| <Variable href="https://docs.hazelcast.org/docs/{os-version}/javadoc/com/hazelcast/client/properties/ClientProperty.html#MAX_CONCURRENT_INVOCATIONS" text="hazelcast.client.max.concurrent.invocations" code /> | `Integer.MAX_VALUE` | int | Maximum allowed number of concurrent invocations. You can apply a constraint on the number of concurrent invocations in order to prevent the system from overloading. If the maximum number of concurrent invocations is exceeded and a new invocation comes in, Hazelcast throws `HazelcastOverloadException`. |
| <Variable href="https://docs.hazelcast.org/docs/{os-version}/javadoc/com/hazelcast/client/properties/ClientProperty.html#METRICS_COLLECTION_FREQUENCY" text="hazelcast.client.metrics.collection.frequency" code /> | 5 | int | Frequency, in seconds, of the [metrics](../../operate-and-manage/maintaining-a-cluster/monitoring.mdx#metrics) collection cycle. Note that the preferred way for controlling this setting is [Metrics Configuration](../../operate-and-manage/maintaining-a-cluster/monitoring.mdx#configuration). |
| <Variable href="https://docs.hazelcast.org/docs/{os-version}/javadoc/com/hazelcast/client/properties/ClientProperty.html#METRICS_COLLECTION_FREQUENCY" text="hazelcast.client.metrics.collection.frequency" code /> | 5 | int | Frequency, in seconds, of the [metrics](../../operate-and-manage/monitoring/metrics.mdx) collection cycle. Note that the preferred way for controlling this setting is [Metrics Configuration](../../operate-and-manage/monitoring/metrics.mdx#configuration). |
| <Variable href="https://docs.hazelcast.org/docs/{os-version}/javadoc/com/hazelcast/client/properties/ClientProperty.html#METRICS_DEBUG" text="hazelcast.client.metrics.debug.enabled" code /> | false | bool | Enables collecting debug metrics if set to `true`, disables it otherwise. Note that this is meant to be enabled only if diagnostics is enabled, since currently only diagnostics consumes the debug metrics. |
| <Variable href="https://docs.hazelcast.org/docs/{os-version}/javadoc/com/hazelcast/client/properties/ClientProperty.html#METRICS_ENABLED" text="hazelcast.client.metrics.enabled" code /> | true | bool | Enables the [metrics collection](../../operate-and-manage/maintaining-a-cluster/monitoring.mdx#metrics) if set to `true`, disables it otherwise. Note that the preferred way for controlling this setting is [Metrics Configuration](../../operate-and-manage/maintaining-a-cluster/monitoring.mdx#configuration). When it is `true` you can monitor metrics of the clients that are connected to your Hazelcast cluster, using Hazelcast Management Center. See <Variable href="/management-center/{page-latest-supported-mc}/clusters/clients" text="here" /> for more information. |
| <Variable href="https://docs.hazelcast.org/docs/{os-version}/javadoc/com/hazelcast/client/properties/ClientProperty.html#METRICS_JMX_ENABLED" text="hazelcast.client.metrics.jmx.enabled" code /> | true | bool | Enables exposing the collected [metrics](../../operate-and-manage/maintaining-a-cluster/monitoring.mdx#metrics) over JMX if set to `true`, disables it otherwise. Note that the preferred way for controlling this setting is [Metrics Configuration](../../operate-and-manage/maintaining-a-cluster/monitoring.mdx#configuration). |
| <Variable href="https://docs.hazelcast.org/docs/{os-version}/javadoc/com/hazelcast/client/properties/ClientProperty.html#METRICS_ENABLED" text="hazelcast.client.metrics.enabled" code /> | true | bool | Enables the [metrics collection](../../operate-and-manage/monitoring/metrics.mdx) if set to `true`, disables it otherwise. Note that the preferred way for controlling this setting is [Metrics Configuration](../../operate-and-manage/monitoring/metrics.mdx#configuration). When it is `true` you can monitor metrics of the clients that are connected to your Hazelcast cluster, using Hazelcast Management Center. See <Variable href="/management-center/{page-latest-supported-mc}/clusters/clients" text="here" /> for more information. |
| <Variable href="https://docs.hazelcast.org/docs/{os-version}/javadoc/com/hazelcast/client/properties/ClientProperty.html#METRICS_JMX_ENABLED" text="hazelcast.client.metrics.jmx.enabled" code /> | true | bool | Enables exposing the collected [metrics](../../operate-and-manage/monitoring/metrics.mdx) over JMX if set to `true`, disables it otherwise. Note that the preferred way for controlling this setting is [Metrics Configuration](../../operate-and-manage/monitoring/metrics.mdx#configuration). |
| <Variable href="https://docs.hazelcast.org/docs/{os-version}/javadoc/com/hazelcast/client/properties/ClientProperty.html#OPERATION_BACKUP_TIMEOUT_MILLIS" text="hazelcast.client.operation.backup.timeout.millis" code /> | 5000 | int | If an operation has sync backups, this property specifies how long the invocation will wait for acks from the backup replicas. If acks are not received from some backups, there will not be any rollback on other successful replicas. |
| <Variable href="https://docs.hazelcast.org/docs/{os-version}/javadoc/com/hazelcast/client/properties/ClientProperty.html#FAIL_ON_INDETERMINATE_OPERATION_STATE" text="hazelcast.client.operation.fail.on.indeterminate.state" code /> | false | bool | When this configuration is enabled, if an operation has sync backups and acks are not received from backup replicas in time, or the member which owns primary replica of the target partition leaves the cluster, then the invocation fails with `IndeterminateOperationStateException`. However, even if the invocation fails, there will not be any rollback on other successful replicas. |
| <Variable href="https://docs.hazelcast.org/docs/{os-version}/javadoc/com/hazelcast/client/properties/ClientProperty.html#RESPONSE_THREAD_COUNT" text="hazelcast.client.response.thread.count" code /> | 2 | int | Number of the response threads. By default, there are two response threads; this gives stable and good performance. If set to 0, the response threads are bypassed and the response handling is done on the I/O threads. Under certain conditions this can give a higher throughput, but setting to 0 should be regarded as an experimental feature. If set to 0, the `IO_OUTPUT_THREAD_COUNT` is really going to matter because the inbound thread will have more work to do. By default when TLS is not enabled, there is just one inbound thread. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ A job with `FAILED` status may have been canceled by a user. To monitor for canc

You can see the job-specific metrics using the following methods:

- [Job API](../../operate-and-manage/maintaining-a-cluster/monitoring.mdx#via-job-api) via the `getMetrics()` method:
- [Job API](../../operate-and-manage/monitoring/metrics.mdx#job-api) via the `getMetrics()` method:

```java
JobMetrics metrics = job.getMetrics();
```

With this method, you can see the metrics for all running jobs, and finished jobs for which the `storeMetricsAfterJobCompletion` option is enabled. See the below table for this option's description.

- [JMX](../../operate-and-manage/maintaining-a-cluster/monitoring.mdx#over-jmx)/[Prometheus](../../operate-and-manage/maintaining-a-cluster/monitoring.mdx#prometheus): With these methods, the `userCanceled` metric is not available, and you can see the metrics only for running jobs.
- [JMX](../../operate-and-manage/monitoring/metrics.mdx#jmx)/[Prometheus](../../operate-and-manage/monitoring/metrics.mdx#prometheus): With these methods, the `userCanceled` metric is not available, and you can see the metrics only for running jobs.

See [Job-Specific Metrics](../../reference/list-of-metrics.mdx#job-metrics) to learn which metrics are available for jobs.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,16 @@ slug: /data-structures/reading-map-metrics

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import CodeBlock from "@theme/CodeBlock";
import Ex_management_ExampleLocalMapStats_java_tag_lms from "../../../../examples/management/ExampleLocalMapStats.java?tag=lms";

By default, you can read metrics for a given map, such as the primary and backup entry count, last update time, and locked entry count on each member of your cluster. You can access these statistics for the entire map, for the map entries on a specific cluster member, or specific map entries.

## Getting Statistics about All Map Entries {/* #accessing-entry-statistics */}

To get statistics for all map entries that are owned by a member, use the `getLocalMapStats()` method of the Java member API ([embedded mode](../../../../install-and-upgrade/overview/choosing-a-deployment-option.mdx)). This method returns data only if the `statistics-enabled` element is set to `true`, which is the default.
To get statistics for all map entries that are owned by a member, use the `getLocalMapStats()` method of the Java member API ([embedded mode](../../../../install-and-upgrade/overview/choosing-a-deployment-option.mdx)).

:::note

If you disable map statistics, statistics will not be available via the API, or in <Variable href="/management-center/{page-latest-supported-mc}/getting-started/overview" text="Hazelcast Management Center" />.

:::
The `statistics-enabled` element of the map is `true` by default. If you set it to `false`, the member does not record operation statistics for the map, such as operation counts, latencies, and index statistics. The member also then leaves the map out of the statistics that it reports to the [metrics system](../../../../operate-and-manage/monitoring/metrics.mdx) and <Variable href="/management-center/{page-latest-supported-mc}/getting-started/overview" text="Management Center"/>. The `getLocalMapStats()` method still returns the entry counts and memory costs of the map.

<Tabs groupId="config-format">
<TabItem value="xml" label="XML">
Expand Down Expand Up @@ -45,11 +43,27 @@ hazelcast:
</TabItem>
</Tabs>

```java
LocalMapStats mapStatistics = myMap.getLocalMapStats();
System.out.println( "Number of entries owned by this member = "
+ mapStatistics.getOwnedEntryCount() );
```
Below is example code where `getLocalMapStats()` and `getOwnedEntryCount()` get the number of entries owned by this member:

<CodeBlock language="java">{Ex_management_ExampleLocalMapStats_java_tag_lms}</CodeBlock>

:::note

The `getOwnedEntryMemoryCost()` method is also supported for the `NATIVE` in-memory format.

:::

The following are some of the metrics that you can access via the `LocalMapStats` object:
- Number of entries owned by the member (`getOwnedEntryCount()`)
- Number of backup entries held by the member (`getBackupEntryCount()`)
- Number of backups per entry (`getBackupCount()`)
- Memory cost (number of bytes) of owned entries in the member (`getOwnedEntryMemoryCost()`)
- Creation time of the map on the member (`getCreationTime()`)
- Number of hits (reads) of the locally owned entries (`getHits()`)
- Number of get and put operations on the map (`getPutOperationCount()` and `getGetOperationCount()`)
- Number of queries executed on the map (`getQueryCount()` and `getIndexedQueryCount()`) (it may be imprecise for queries involving partition predicates (`PartitionPredicate`) on the off-heap storage)

See the <Variable href="https://docs.hazelcast.org/docs/{os-version}/javadoc/com/hazelcast/map/LocalMapStats.html" text="LocalMapStats Javadoc" /> to see all the metrics.

:::note

Expand All @@ -59,7 +73,7 @@ If you need cluster-wide map statistics, you can get the local map statistics fr

## Getting Statistics about a Specific Map Entry

To get statistics for a specific map entry, you can use the `getEntryView(key)` method of one of the following available client libraries. To use this method, the map must have its `per-entry-stats-enabled` element set to `true`.
To get statistics for a specific map entry, you can use the `getEntryView(key)` method of one of the following available client libraries. To use this method, the map must have its `per-entry-stats-enabled` element set to `true`. The default is `false`.

This method returns the following statistics:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Reliable Topic is an enhanced version of the regular Topic and uses the same `IT

Use Reliable Topic when you need a robust, durable messaging system that can handle high throughput without losing messages, especially in scenarios where message delivery guarantees are crucial.

For more information about the metrics provided by Reliable Topic, see [Topic Statistics](../../../operate-and-manage/maintaining-a-cluster/monitoring.mdx#topic-statistics).
For more information about the metrics provided by Reliable Topic, see [Topic Statistics](../../../operate-and-manage/monitoring/metrics.mdx#topic-statistics).

Here is an example for a publisher using Reliable Topic:

Expand Down
28 changes: 28 additions & 0 deletions hazelcast/examples/management/MetricsConfiguration.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import com.hazelcast.client.config.ClientConfig;
import com.hazelcast.config.Config;

public class MetricsConfiguration {

public static void main(String[] args) {
//tag::member[]
Config config = new Config();
config.getMetricsConfig()
.setEnabled(true)
.setCollectionFrequencySeconds(5);
config.getMetricsConfig().getManagementCenterConfig()
.setEnabled(true)
.setRetentionSeconds(5);
config.getMetricsConfig().getJmxConfig()
.setEnabled(true);
//end::member[]

//tag::client[]
ClientConfig clientConfig = new ClientConfig();
clientConfig.getMetricsConfig()
.setEnabled(true)
.setCollectionFrequencySeconds(5);
clientConfig.getMetricsConfig().getJmxConfig()
.setEnabled(true);
//end::client[]
}
}
2 changes: 1 addition & 1 deletion hazelcast/frameworks-and-plugins/spring/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ The `hazelcast` XML namespace supports the following configuration:

- [Authentication overview](../../operate-and-manage/securing-a-cluster/authentication/authentication-overview.mdx)
- [Java Client Security](../../clients-and-apis/clients/java.mdx#client-security-configuration)
- [Enabling health check for a cluster](../../operate-and-manage/maintaining-a-cluster/monitoring.mdx#health-check-and-monitoring)
- [Enabling health check for a cluster](../../operate-and-manage/monitoring/health-check-and-monitoring.mdx)
- [Configuring transaction permissions on the members](../../operate-and-manage/securing-a-cluster/client-authorization.mdx#transaction-permission)

:::
Expand Down
4 changes: 2 additions & 2 deletions hazelcast/get-started/support.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ You can provide the following for each Hazelcast client configuration:

The Hazelcast logs contain useful information when debugging an issue in a Hazelcast cluster. Each member has its own Hazelcast log, which typically includes:

- Metrics about the Hazelcast member, such as [`HealthMonitor`](../operate-and-manage/maintaining-a-cluster/monitoring.mdx#health-check-and-monitoring) output.
- Metrics about the Hazelcast member, such as [`HealthMonitor`](../operate-and-manage/monitoring/health-check-and-monitoring.mdx) output.
- Log messages indicating when Hazelcast clients connect and disconnect from the member.
- Details about [slow operations](../develop-and-build/best-practices/threading.mdx#slowoperationdetector).
- Stack traces.
Expand Down Expand Up @@ -90,7 +90,7 @@ An extended set of diagnostics plugins is provided for both Hazelcast members an
- Details about the type and volume of operations run on the member
- WAN Replication diagnostic information

The Hazelcast configuration provides settings for the rotation and retention of these diagnostic log files. For more information, see [Diagnostics](../operate-and-manage/maintaining-a-cluster/monitoring.mdx#diagnostics).
The Hazelcast configuration provides settings for the rotation and retention of these diagnostic log files. For more information, see [Diagnostics](../operate-and-manage/monitoring/diagnostics.mdx).

:::note

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Community Edition Release Notes"
sidebar_label: "Release Notes"
sidebar_position: 1
slug: /release-notes/community
hide_in_snapshot: true
---

:::important
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ sidebar_label: "Release Notes"
sidebar_position: 1
slug: /release-notes/enterprise
enterprise: true
hide_in_snapshot: true
---

:::important
Expand Down
1 change: 1 addition & 0 deletions hazelcast/install-and-upgrade/releases.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Hazelcast Platform release notes"
sidebar_label: "Release Notes"
sidebar_position: 2
slug: /release-notes/releases
hide_in_snapshot: true
---

:::important
Expand Down
Loading