Merge pull request #31129 from ka1bi4/romanzhukov-DOCSUP-15137-zookeeperSessionUptime

DOCSUP-15137: [CLICKHOUSEDOCS] Document the zookeeperSessionUptime() function
This commit is contained in:
tavplubix 2021-11-09 14:14:26 +03:00 committed by GitHub
commit 9fe6687a62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 72 additions and 0 deletions

View File

@ -2463,3 +2463,39 @@ Result:
│ Linux 4.15.0-55-generic │ │ Linux 4.15.0-55-generic │
└─────────────────────────┘ └─────────────────────────┘
``` ```
## zookeeperSessionUptime {#zookeepersessionuptime}
Returns the uptime of the current ZooKeeper session in seconds.
**Syntax**
``` sql
zookeeperSessionUptime()
```
**Arguments**
- None.
**Returned value**
- Uptime of the current ZooKeeper session in seconds.
Type: [UInt32](../../sql-reference/data-types/int-uint.md).
**Example**
Query:
``` sql
SELECT zookeeperSessionUptime();
```
Result:
``` text
┌─zookeeperSessionUptime()─┐
│ 286 │
└──────────────────────────┘
```

View File

@ -2411,3 +2411,39 @@ SELECT getOSKernelVersion();
│ Linux 4.15.0-55-generic │ │ Linux 4.15.0-55-generic │
└─────────────────────────┘ └─────────────────────────┘
``` ```
## zookeeperSessionUptime {#zookeepersessionuptime}
Возвращает аптайм текущего сеанса ZooKeeper в секундах.
**Синтаксис**
``` sql
zookeeperSessionUptime()
```
**Аргументы**
- Нет.
**Возвращаемое значение**
- Аптайм текущего сеанса ZooKeeper в секундах.
Тип: [UInt32](../../sql-reference/data-types/int-uint.md).
**Пример**
Запрос:
``` sql
SELECT zookeeperSessionUptime();
```
Результат:
``` text
┌─zookeeperSessionUptime()─┐
│ 286 │
└──────────────────────────┘
```