소스 검색

tui文档增加了导入导出功能

liuyt 2 주 전
부모
커밋
6645a3846a

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+.DS_Store

+ 32 - 159
M³多模数据平台安装部署手册(tui版本).md

@@ -397,7 +397,7 @@ $ cat out.log   # 错误日志
 2. 点击 "配置管理"
 3. 点击左侧树 `matrix -- etc -- web - <主机名> - app.ini` 修改按钮
 
-https://media/image22.tiff
+![image22](./assets/install_tui/image22.png)
 
 将 `HTTP_PORT`、`MASTER_PORT` 修改为需要的端口(1000以上)
 
@@ -405,189 +405,62 @@ https://media/image22.tiff
 
 ------
 
-## 7. 数据导入导出工具
+## 7. namespace导出导入工具
 
-工具路径:`$MATRIXROOT/bin`
-文件名:`odbtool`
+**导出功能使用方法:**
+./mxtui
+![image26](./assets/install_tui/image26.png)
 
-帮助文档:
+![image27](./assets/install_tui/image27.png)
 
-bash
+![image28](./assets/install_tui/image28.png)
 
-```
-./odbtool -help
-
-NAME:
-   odbtool - The odb tool
-
-USAGE:
-   odbtool [global options] command [command options] [arguments...]
-
-VERSION:
-   1.0.17
-
-COMMANDS:
-   mql        Execute mql
-   cql        Execute cql
-   export     Export data to mql file or xlsx file
-   import     Import data from mql file or xlsx file
-   help, h    Shows a list of commands or help for one command
-
-GLOBAL OPTIONS:
-   --keyspace value, -k value   Select keyspace (default: "matrix")
-   --addr value, -a value       ODB address or Cassandra address
-   --user value, -u value       ODB or Cassandra username
-   --pass value, -p value       ODB or Cassandra password
-   --help, -h                   show help
-   --version, -v                print the version
-```
+![image30](./assets/install_tui/image30.png)
 
+注:keyspace对应库的keyspace
 
+​       http host对应http://webserver ip:port
 
-### 7.1 导入mql文件
+​       company对应租户名称
 
-bash
+​       username对应用户名
 
-```
-./odbtool -k oootest -u admin -p admin import -help
+​       password对应密码
 
-NAME:
-   odbtool import - Import data from mql file or xlsx file
+​       export class对应要导出的namespace根类
 
-USAGE:
-   odbtool import [command options] [arguments...]
+​       Recursive 循环向下(子类)
 
-OPTIONS:
-   --file value   Import file path (.mql or .xlsx)
-```
+​        Matrix Root 安装软件的目录
 
+​       复制界面文字内容,windows按alt键鼠标选择复制,苹果电脑按option键鼠标选择复制
 
+**导入功能使用方法:**
+![image29](./assets/install_tui/image29.png)
 
-**导入举例:**
+![image31](./assets/install_tui/image31.png)
 
-bash
-
-```
-./odbtool -k oootest -u admin -p admin import --file /opt/matrix/var/test/entity.mql
-# -k oootest     keyspace名称
-# -u admin       odb用户名
-# -p admin       odb密码
-# import         导入命令
-# --file         mql文件
-```
+注:keyspace对应库的keyspace
 
+​       http host对应http://webserver ip:port
 
+​       company对应租户名称
 
-**断点续传:**
-
-bash
-
-```
-# 第一次执行时:-c 表示导入出错,立即停止
-/opt/matrix/agent/bin/odbtool -k icbctest import --file ./testinsert.mql -c
-# Import file ./testinsert.mql.
-# Import data success: 80, failure: 0.redis: 2026/04/21 18:44:01 pubsub.go:168: redis: discarding bad PubSub connection: read tcp 172.26.38.247:38536->172.26.38.247:11001: read: connection reset by peer
-# 2026-04-21 18:44:31.407 No client available
-# Import data success: 80, failure: 1.
-# Import mql (报错信息......error: [Unsure]
-# Error position index: 81
-
-# 第二次执行:-s 81 表示导入从81行开始
-/opt/matrix/agent/bin/odbtool -k icbctest import --file ./testinsert.mql -c -s 81
-# Import file ./testinsert.mql.
-# Continue from position: 81
-# Import data success: 594, failure: 0.
-```
+​       username对应用户名
 
+​       password对应密码
 
+​       ZIP File对应要导出zip文件路径
 
-### 7.2 导出mql文件
+​       Concurrency 导入时并发数(建议4-10,根据服务器性能做调整)
 
-bash
-
-```
-./odbtool -k oootest -u admin -p admin export -help
-
-NAME:
-   odbtool export - Export data to mql file or xlsx file
-
-USAGE:
-   odbtool export [command options] [arguments...]
-
-OPTIONS:
-   --ftype value      Export file type (mql or xlsx) (default: "mql")
-   --class value      Export class
-   --recursive, -r    Recursive subclass
-   --limit value      Data limit size (default: -1)
-   --where value      Query where conditions
-   --template, -t     Export template
-   --ignf value       Ignore fields
-   --ignc value       Ignore classes
-   --reldef           Export relation defined
-   --out value        Output file
-```
-
-
-
-**导出举例:**
-
-bash
-
-```
-./odbtool -k oootest -u admin -p admin export --class /m3event -r --out /opt/matrix/var/test/entity1.mql
-# Export class /m3event
-# Class /m3event size 0
-# Export class /m3event/entity
-# Class /m3event/entity size 0
-# Export class /m3event/entity/component
-# Class /m3event/entity/component size 1
-# Class /m3event/entity/component size 0
-# Export class /m3event/entity/link
-# Class /m3event/entity/link size 1
-# Class /m3event/entity/link size 0
-# Export class /m3event/entity/node
-# Class /m3event/entity/node size 1
-# Class /m3event/entity/node size 0
-# Export file to /opt/matrix/var/test/entity1.mql
-
-# -k oootest        keyspace名称
-# -u admin          odb用户名
-# -p admin          odb密码
-# export /m3event   导出命令
-# --class           导出的class
-# -r                循环向下导出
-# --file            输出mql文件路径
-```
-
-------
+​        Matrix Root 安装软件的目录
 
-## 8. namespace导出导入工具
-
-**导入脚本使用方法:**
-./odbtool.sh
-用法:
-  导出: ./odbtool.sh export --keyspace <keyspace> --username <user> --password <pwd> --class <class> [--recursive] [--host <host>]
-  导入: ./odbtool.sh import --keyspace <keyspace> --zip <file.zip> [--concurrent <num>]
-
-选项说明:
-  --keyspace       keyspace 名称 (默认: matrix)
-  --username       用户名 (默认: admin)
-  --password       密码 (默认: admin)
-  --class          根类名称 (如 /m3event)
-  --recursive      是否递归导出所有子类 (默认: 只导出指定类)
-  --host           Matrix API 主机地址 (默认: localhost:8080)
-  --zip            导入时指定 ZIP 包路径
-  --concurrent     导入数据时的并发线程数 (默认: CPU 核心数 * 2)
-
-**示例:**
-  **导出: **
-./odbtool.sh export --keyspace oktest --class /m3event --recursive --host 172.26.38.247:8080  
-  **导入: **
-./odbtool.sh import --keyspace oootest --zip ./matrix_export.zip --concurrent 8
+​       复制界面文字内容,windows按alt键鼠标选择复制,苹果电脑按option键鼠标选择复制
 
 ------
 
-## 9. 性能优化配置策略说明
+## 8. 性能优化配置策略说明
 
 ### 1) CPU 16核及以上,内存 >= 64G 且 < 128G
 
@@ -595,11 +468,11 @@ bash
 
 - `concurrent_writes` 修改为 128
 
-https://media/image23.png
+![image23](./assets/install_tui/image23.png)
 
 - `file_cache_size_in_mb` 修改为 4096
 
-https://media/image24.png
+![image24](./assets/install_tui/image24.png)
 
 修改文件:`$MATRIXROOT/cassandra/conf/jvm-servers.options`
 

BIN
assets/install_tui/image26.png


BIN
assets/install_tui/image27.png


BIN
assets/install_tui/image28.png


BIN
assets/install_tui/image29.png


BIN
assets/install_tui/image30.png


BIN
assets/install_tui/image31.png