diff --git a/README.md b/README.md
index 23003ad..5ddd977 100644
--- a/README.md
+++ b/README.md
@@ -275,24 +275,24 @@ BigDataTool采用模块化分层架构设计:
### Cassandra配置
```json
{
- "cluster_name": "生产集群",
- "hosts": ["192.168.1.100", "192.168.1.101"],
+ "cluster_name": "示例集群",
+ "hosts": ["127.0.0.1", "127.0.0.2"],
"port": 9042,
"datacenter": "dc1",
"username": "cassandra",
"password": "password",
- "keyspace": "my_keyspace",
- "table": "my_table"
+ "keyspace": "example_keyspace",
+ "table": "example_table"
}
```
### Redis配置
```json
{
- "name": "生产Redis",
+ "name": "示例Redis",
"nodes": [
- {"host": "192.168.1.200", "port": 7000},
- {"host": "192.168.1.201", "port": 7001}
+ {"host": "127.0.0.1", "port": 6379},
+ {"host": "127.0.0.2", "port": 6379}
],
"password": "redis_password",
"socket_timeout": 3,
diff --git a/modules/cassandra_client.py b/modules/cassandra_client.py
index e483963..8fc4623 100644
--- a/modules/cassandra_client.py
+++ b/modules/cassandra_client.py
@@ -83,16 +83,16 @@ def create_connection(config):
使用示例:
config = {
- 'hosts': ['192.168.1.100', '192.168.1.101'],
+ 'hosts': ['127.0.0.1'],
'port': 9042,
'username': 'cassandra',
'password': 'password',
- 'keyspace': 'my_keyspace',
+ 'keyspace': 'example_keyspace',
'datacenter': 'dc1'
}
cluster, session = create_connection(config)
if session:
- result = session.execute("SELECT * FROM my_table LIMIT 10")
+ result = session.execute("SELECT * FROM example_table LIMIT 10")
cluster.shutdown()
"""
start_time = time.time()
diff --git a/modules/redis_types.py b/modules/redis_types.py
index 9c398cf..d8a2a6e 100644
--- a/modules/redis_types.py
+++ b/modules/redis_types.py
@@ -65,7 +65,7 @@ def get_redis_value_with_type(redis_client, key):
- 数据异常:记录警告并提供基本信息
示例:
- >>> result = get_redis_value_with_type(client, "user:1001")
+ >>> result = get_redis_value_with_type(client, "user:example")
>>> print(result['type']) # 'string'
>>> print(result['value']) # 'John Doe'
>>> print(result['exists']) # True
diff --git a/static/js/app.js b/static/js/app.js
index ff146ca..9b7a6b6 100644
--- a/static/js/app.js
+++ b/static/js/app.js
@@ -3356,14 +3356,14 @@ function showImportDialog(env) {
请粘贴配置数据,支持以下格式:
示例格式:
-
clusterName: "Hot Cluster"
-clusterNodes: "10.20.2.22,10.20.2.23"
+ clusterName: "Example Cluster"
+clusterNodes: "127.0.0.1,127.0.0.2"
port: 9042
-datacenter: "cs01"
-username: "cbase"
-password: "antducbaseadmin@2022"
-keyspace: "yuqing_skinny"
-table: "status_test"
+datacenter: "dc1"
+username: "cassandra"
+password: "example_password"
+keyspace: "example_keyspace"
+table: "example_table"
diff --git a/static/js/redis_compare.js b/static/js/redis_compare.js
index 0b91c04..55db09e 100644
--- a/static/js/redis_compare.js
+++ b/static/js/redis_compare.js
@@ -1665,30 +1665,30 @@ function updateConfigTemplate() {
if (format === 'yaml') {
templateElement.textContent = `# Redis集群配置示例 (YAML格式)
cluster1:
- clusterName: "redis-production"
- clusterAddress: "10.20.2.109:6470"
+ clusterName: "redis-example1"
+ clusterAddress: "127.0.0.1:6379"
clusterPassword: ""
cachePrefix: "message.status.Reader."
cacheTtl: 2000
async: true
nodes:
- - host: "10.20.2.109"
- port: 6470
- - host: "10.20.2.110"
- port: 6470
+ - host: "127.0.0.1"
+ port: 6379
+ - host: "127.0.0.2"
+ port: 6379
cluster2:
- clusterName: "redis-test"
- clusterAddress: "10.20.2.109:6471"
+ clusterName: "redis-example2"
+ clusterAddress: "127.0.0.1:6380"
clusterPassword: ""
cachePrefix: "message.status.Reader."
cacheTtl: 2000
async: true
nodes:
- - host: "10.20.2.109"
- port: 6471
- - host: "10.20.2.110"
- port: 6471
+ - host: "127.0.0.1"
+ port: 6380
+ - host: "127.0.0.2"
+ port: 6380
queryOptions:
mode: "random" # random 或 specified
@@ -1697,32 +1697,32 @@ queryOptions:
sourceCluster: "cluster2"
# 指定Key模式下的键值列表
keys:
- - "user:1001"
- - "user:1002"`;
+ - "user:example1"
+ - "user:example2"`;
} else {
templateElement.textContent = `{
"cluster1": {
- "clusterName": "redis-production",
- "clusterAddress": "10.20.2.109:6470",
+ "clusterName": "redis-example1",
+ "clusterAddress": "127.0.0.1:6379",
"clusterPassword": "",
"cachePrefix": "message.status.Reader.",
"cacheTtl": 2000,
"async": true,
"nodes": [
- {"host": "10.20.2.109", "port": 6470},
- {"host": "10.20.2.110", "port": 6470}
+ {"host": "127.0.0.1", "port": 6379},
+ {"host": "127.0.0.2", "port": 6379}
]
},
"cluster2": {
- "clusterName": "redis-test",
- "clusterAddress": "10.20.2.109:6471",
+ "clusterName": "redis-example2",
+ "clusterAddress": "127.0.0.1:6380",
"clusterPassword": "",
"cachePrefix": "message.status.Reader.",
"cacheTtl": 2000,
"async": true,
"nodes": [
- {"host": "10.20.2.109", "port": 6471},
- {"host": "10.20.2.110", "port": 6471}
+ {"host": "127.0.0.1", "port": 6380},
+ {"host": "127.0.0.2", "port": 6380}
]
},
"queryOptions": {
@@ -1730,7 +1730,7 @@ queryOptions:
"count": 100,
"pattern": "*",
"sourceCluster": "cluster2",
- "keys": ["user:1001", "user:1002"]
+ "keys": ["user:example1", "user:example2"]
}
}`;
}
diff --git a/templates/db_compare.html b/templates/db_compare.html
index 58d26aa..952c784 100644
--- a/templates/db_compare.html
+++ b/templates/db_compare.html
@@ -475,7 +475,7 @@