1.3. 导航 CLI 资源
Data Grid CLI 会公开一个可容忍的树,供您列出、描述和操作 Data Grid 集群资源。
提示
按 tab 键显示可用的命令和选项。使用 -h 选项显示帮助文本。
当您连接到 Data Grid 集群时,它会在默认缓存容器上下文中打开。
[//containers/default]>
使用
ls列出资源。[//containers/default]> ls caches counters configurations schemas tasks使用
cd导航资源树。cd caches使用
describe查看资源的信息。describe{ "name" : "default", "version" : "xx.x.x-FINAL", "cluster_name" : "cluster", "coordinator" : true, "cache_configuration_names" : [ "org.infinispan.REPL_ASYNC", "___protobuf_metadata", "org.infinispan.DIST_SYNC", "org.infinispan.LOCAL", "org.infinispan.INVALIDATION_SYNC", "org.infinispan.REPL_SYNC", "org.infinispan.SCATTERED_SYNC", "org.infinispan.INVALIDATION_ASYNC", "org.infinispan.DIST_ASYNC" ], "physical_addresses" : "[192.0.2.0:7800]", "coordinator_address" : "<hostname>", "cache_manager_status" : "RUNNING", "created_cache_count" : "1", "running_cache_count" : "1", "node_address" : "<hostname>", "cluster_members" : [ "<hostname1>", "<hostname2>" ], "cluster_members_physical_addresses" : [ "192.0.2.0:7800", "192.0.2.0:7801" ], "cluster_size" : 2, "defined_caches" : [ { "name" : "mycache", "started" : true }, { "name" : "___protobuf_metadata", "started" : true } ] }
1.3.1. CLI 资源 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Data Grid CLI 会公开不同的资源:
- 创建、修改和管理本地或集群缓存。
- 为 Data Grid 集群执行管理操作。
缓存资源
[//containers/default]> ls
caches
counters
configurations
schemas
Cache-
Data Grid 缓存实例。默认缓存容器为空。使用 CLI 从模板或
infinispan.xml文件创建缓存。 计数器-
记录对象计数的
强或Weak计数器。 配置- Data Grid 配置。
模式- 协议缓冲(Protobuf)模式,该模式在缓存中结构数据。
tasks- 远程任务创建和管理数据仓库缓存定义。
集群资源
[hostname@cluster/]> ls
containers
cluster
server
containers- 在 Data Grid 集群上缓存容器。
cluster- 列出加入集群的数据仓库服务器。
server- 管理和监控数据中心服务器的资源。