이 콘텐츠는 선택한 언어로 제공되지 않습니다.

zk:create


Name

zk:create — create a znode

Synopsis

zk:create [ --help ] [ -r|--recursive ] [ -i|--import ] [ -e|--ephemeral ] [ -s|--sequential ] [ -a|--acl ListOfACLs ] [ -o|--overwrite ] { path } { data }

Description

Using this command, you can create the following different types of znode:
Persistent
The new znode is permanently stored in the ZooKeeper registry. This is the default.
Persistent sequential
The new znode is permanently stored in the ZooKeeper registry and a 10-digit sequence number is appended to the specified znode name. Selected by the --sequential option.
Ephemeral
The new znode exists only for the duration of the current client session. When the session is over, the znode is removed. Selected by the --ephemeral option.
Ephemeral sequential
The new znode exists only for the duration of the current client session and a 10-digit sequence number is appended to the specified znode name. When the session is over, the znode is removed. Selected by combining the --ephemeral option with the --sequential option.
You can optionally specify a list of ACLs to apply to the newly created znode. The ACL is specified as a comma-separated list, where each entry in the list has the following format:
Scheme:ID:Permissions
ZooKeeper supports the following built-in schemes:
world:anyone
The permissions apply to all users.
auth:
The permissions apply to all authenticated users, irrespective of their identity (the ID field is left empty).
digest:MD5Hash
The permissions apply to the user whose username and password generate the specified MD5 hash value, MD5Hash.
ip:IPAddress
The permissions apply to the ZooKeeper client with the specified IP address.
The Permissions string consists of one or more of the following characters: r (read), w (write), c (create), d (delete), and a (admin). For example, to create a new znode that explicitly grants all permissions to all users (which is, in fact, the default), you could use a command like the following:
karaf@root> zk:create --acl world:anyone:rwcda /path/to/the/new/znode
Important
To avoid corruption of the fabric registry, you should not create any znodes under the /fabric/ path using the zk:create command. These registry nodes should only be created through the fabric console commands—see Chapter 8, Fabric Console Commands.
Note
Fuse Fabric does not use the ACL security features of ZooKeeper. Currently, all znodes in the fabric registry are created without any ACL restrictions (equivalent to the world:anyone:rwcda ACL setting).

Arguments

Table 17.1, “zk:create Arguments” describes the commands arguments.
Table 17.1. zk:create Arguments
ArgumentInterpretation
--helpDisplays the online help for this command
-r,--recursiveAutomatically create any missing parent nodes in the specified path.
-i,--importInterpret the data argument as a URL that locates a resource containing the initial data for the new znode.
-e,--ephemeralMake the new znode epehemeral, so that it is automatically deleted after the current ZooKeeper client session closes.
-s,--sequentialMake the new znode sequential, which implies that a unique 10-digit suffix is appended to the znode name.
-a,--aclSpecifies the znode's ACL as a comma-separated list, where each entry in the list has the format, Scheme:ID:Permissions. The Permissions string consists of the following characters, concatenated in any order: r (read), w (write), c (create), d (delete), and a (admin).
-o,--overwriteOverwrite the existing znode at this location, if there is one.
path(Required) Path of the znode to create.
dataInitial data for the node or, if --import is specified, a URL pointing at a location that contains the initial data.
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.