Flow: 一个 Process Group 级别的 NiFi 数据流, 已置于版本控制之下并保存到 Registry 中
Bundle: 包含一个或多个可在 NiFi 或 MiNiFi 中运行的扩展的二进制工件 (NAR包)
Bucket: 一个容器, 用于存储和组织版本化项目 (Bucket 可以包含多个 Flow 和 Bundle)
Policy: 定义用户或组执行给定操作的能力
表信息
列名 | 含义 |
---|---|
ID | bucket 标识符 |
NAME | bucket 名称 |
DESCRIPTION | bucket 描述 |
CREATED | bucket 创建时间 |
ALLOW_EXTENSION_BUNDLE_REDEPLOY | 是否允许重新部署扩展包 |
ALLOW_PUBLIC_READ | 是否允许未经身份验证的用户对桶中的项进行读访问 覆盖授予读访问权的任何特定策略 |
CREATE TABLE BUCKET (
ID VARCHAR(50) NOT NULL,
NAME VARCHAR(767) NOT NULL,
DESCRIPTION TEXT,
CREATED TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
CONSTRAINT PK__BUCKET_ID PRIMARY KEY (ID),
CONSTRAINT UNIQUE__BUCKET_NAME UNIQUE (NAME)
);
ALTER TABLE BUCKET ADD ALLOW_EXTENSION_BUNDLE_REDEPLOY INT NOT NULL DEFAULT 0;
ALTER TABLE BUCKET ADD ALLOW_PUBLIC_READ INT NOT NULL DEFAULT 0;
bucket 的项(flow, bundle)
表信息
列名 | 含义 |
---|---|
ID | item 标识符 |
NAME | item 名称 |
DESCRIPTION | item 描述 |
CREATED | item 创建时间 |
MODIFIED | item 修改时间 |
ITEM_TYPE | item 类型(flow, bundle) |
BUCKET_ID | 所属 bucket 标识符 |
CREATE TABLE BUCKET_ITEM (
ID VARCHAR(50) NOT NULL,
NAME VARCHAR(1000) NOT NULL,
DESCRIPTION TEXT,
CREATED TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
MODIFIED TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
ITEM_TYPE VARCHAR(50) NOT NULL,
BUCKET_ID VARCHAR(50) NOT NULL,
CONSTRAINT PK__BUCKET_ITEM_ID PRIMARY KEY (ID),
CONSTRAINT FK__BUCKET_ITEM_BUCKET_ID FOREIGN KEY (BUCKET_ID) REFERENCES BUCKET(ID) ON DELETE CASCADE
);
一个 Process Group 级别的 NiFi 数据流, 已置于版本控制之下并保存到 Registry 中
表信息
列名 | 含义 |
---|---|
ID | flow 标识符 |
CREATE TABLE FLOW (
ID VARCHAR(50) NOT NULL,
CONSTRAINT PK__FLOW_ID PRIMARY KEY (ID),
CONSTRAINT FK__FLOW_BUCKET_ITEM_ID FOREIGN KEY (ID) REFERENCES BUCKET_ITEM(ID) ON DELETE CASCADE
);
flow 的每个版本都会有一份快照
表信息
列名 | 含义 |
---|---|
FLOW_ID | flow 标识符 |
VERSION | flow 版本 |
CREATED | flow 创建时间 |
CREATED _BY | flow 创建者 |
COMMENTS | flow 评论 |
CREATE TABLE FLOW_SNAPSHOT (
FLOW_ID VARCHAR(50) NOT NULL,
VERSION INT NOT NULL,
CREATED TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
CREATED_BY VARCHAR(1000) NOT NULL,
COMMENTS TEXT,
CONSTRAINT PK__FLOW_SNAPSHOT_FLOW_ID_AND_VERSION PRIMARY KEY (FLOW_ID, VERSION),
CONSTRAINT FK__FLOW_SNAPSHOT_FLOW_ID FOREIGN KEY (FLOW_ID) REFERENCES FLOW(ID) ON DELETE CASCADE
);
表信息
列名 | 含义 |
---|---|
ID | 密钥标识符(UUID) |
TENANT_IDENTITY | 用户身份 |
KEY_VALUE | 密钥值(UUID) |
DDL
CREATE TABLE SIGNING_KEY (
ID VARCHAR(50) NOT NULL,
TENANT_IDENTITY VARCHAR(767) NOT NULL,
KEY_VALUE VARCHAR(50) NOT NULL,
CONSTRAINT PK__SIGNING_KEY_ID PRIMARY KEY (ID),
CONSTRAINT UNIQUE__SIGNING_KEY_TENANT_IDENTITY UNIQUE (TENANT_IDENTITY)
);
表信息
列名 | 含义 |
---|---|
ID | bundle 标识符 |
BUCKET_ID | bucket 标识符 |
BUCKET_TYPE | bucket 类型 |
GROUP_ID | group 标识符 |
ARTIFACT_ID | 工件标识符 |
DDL
CREATE TABLE BUNDLE (
ID VARCHAR(50) NOT NULL,
BUCKET_ID VARCHAR(50) NOT NULL,
BUNDLE_TYPE VARCHAR(200) NOT NULL,
GROUP_ID VARCHAR(200) NOT NULL,
ARTIFACT_ID VARCHAR(200) NOT NULL,
CONSTRAINT PK__EXTENSION_BUNDLE_ID PRIMARY KEY (ID),
CONSTRAINT FK__EXTENSION_BUNDLE_BUCKET_ITEM_ID FOREIGN KEY (ID) REFERENCES BUCKET_ITEM(ID) ON DELETE CASCADE,
CONSTRAINT FK__EXTENSION_BUNDLE_BUCKET_ID FOREIGN KEY(BUCKET_ID) REFERENCES BUCKET(ID) ON DELETE CASCADE,
CONSTRAINT UNIQUE__EXTENSION_BUNDLE_BUCKET_GROUP_ARTIFACT UNIQUE (BUCKET_ID, GROUP_ID, ARTIFACT_ID)
);
表信息
列名 | 含义 |
---|---|
ID | 扩展包的特定版本的数据库id |
BUNDLE_ID | 此版本附带的扩展包的外键 |
VERSION | 该bundle的版本 |
CREATED | |
CREATED_BY | |
DESCRIPTION | |
SHA_256_HEX | 此版本的二进制内容的SHA-256摘要的十六进制表示 |
SHA_S56_SUPPLIED | 指示SHA-256是否由客户端提供,这意味着它匹配服务器的计算,或者不是由客户端提供 |
CONTENT_SIZE | 以字节为单位的二进制内容的大小 |
SYSTEM_API_VERSION | 构建包所依据的系统API版本 |
BUILD_TOOL | 构建工具 |
BUILD_FLAGS | 构建标记 |
BUILD_BRANCH | 构建分支 |
BUILD_TAG | 构建标签 |
BUILD_REVISION | 构建修正 |
BUILT | 构建时间 |
BUILT_BY | 构建方式 |
DDL
CREATE TABLE BUNDLE_VERSION (
ID VARCHAR(50) NOT NULL,
BUNDLE_ID VARCHAR(50) NOT NULL,
VERSION VARCHAR(100) NOT NULL,
CREATED TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
CREATED_BY VARCHAR(767) NOT NULL,
DESCRIPTION TEXT,
SHA_256_HEX VARCHAR(512) NOT NULL,
SHA_256_SUPPLIED INT NOT NULL,
CONTENT_SIZE BIGINT NOT NULL,
SYSTEM_API_VERSION VARCHAR(50),
BUILD_TOOL VARCHAR(100),
BUILD_FLAGS VARCHAR(100),
BUILD_BRANCH VARCHAR(200),
BUILD_TAG VARCHAR(200),
BUILD_REVISION VARCHAR(100),
BUILT TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP(3),
BUILT_BY VARCHAR(767),
CONSTRAINT PK__BUNDLE_VERSION_ID PRIMARY KEY (ID),
CONSTRAINT FK__BUNDLE_VERSION_BUNDLE_ID FOREIGN KEY (BUNDLE_ID) REFERENCES BUNDLE(ID) ON DELETE CASCADE,
CONSTRAINT UNIQUE__BUNDLE_VERSION_BUNDLE_ID_VERSION UNIQUE (BUNDLE_ID, VERSION)
);
表信息
列名 | 含义 |
---|---|
ID | 此特定依赖项的数据库id |
BUNDLE_VERSION_ID | 扩展包版本的外键 |
GROUP_ID | 这个bundle对应的依赖项 |
ARTIFACT_ID | 这个bundle对应的依赖项 |
VERSION | 这个bundle对应的依赖项 |
DDL
CREATE TABLE BUNDLE_VERSION_DEPENDENCY (
ID VARCHAR(50) NOT NULL,
BUNDLE_VERSION_ID VARCHAR(50) NOT NULL,
GROUP_ID VARCHAR(200) NOT NULL,
ARTIFACT_ID VARCHAR(200) NOT NULL,
VERSION VARCHAR(100) NOT NULL,
CONSTRAINT PK__BUNDLE_VERSION_DEPENDENCY_ID PRIMARY KEY (ID),
CONSTRAINT FK__BUNDLE_VERSION_DEPENDENCY_BUNDLE_VERSION_ID FOREIGN KEY (BUNDLE_VERSION_ID) REFERENCES BUNDLE_VERSION(ID) ON DELETE CASCADE,
CONSTRAINT UNIQUE__BUNDLE_VERSION_DEPENDENCY_BUNDLE_ID_GAV UNIQUE (BUNDLE_VERSION_ID, GROUP_ID, ARTIFACT_ID, VERSION)
);
表信息
列名 | 含义 |
---|---|
ID | ID |
BUNDLE_VERSION_ID | Bundle版本ID |
NAME | 扩展名 |
DISPLAY_NAME | 显示名称 |
TYPE | 扩展类型 |
CONTENT | 序列化的内容扩展 |
ADDITIONAL_DETAILS | 如果提供,则在创建期间填充,但通常不会在检索时填充 |
HAD_ADDITIONAL_DETAILS | read-only让消费者知道还有其他细节没有返回,但可以稍后检索 |
DDL
CREATE TABLE EXTENSION (
ID VARCHAR(50) NOT NULL,
BUNDLE_VERSION_ID VARCHAR(50) NOT NULL,
NAME VARCHAR(500) NOT NULL,
DISPLAY_NAME VARCHAR(500) NOT NULL,
TYPE VARCHAR(100) NOT NULL,
CONTENT TEXT NOT NULL,
ADDITIONAL_DETAILS TEXT,
HAS_ADDITIONAL_DETAILS INT NOT NULL,
CONSTRAINT PK__EXTENSION_ID PRIMARY KEY (ID),
CONSTRAINT FK__EXTENSION_BUNDLE_VERSION_ID FOREIGN KEY (BUNDLE_VERSION_ID) REFERENCES BUNDLE_VERSION(ID) ON DELETE CASCADE,
CONSTRAINT UNIQUE__EXTENSION_BUNDLE_VERSION_ID_AND_NAME UNIQUE (BUNDLE_VERSION_ID, NAME)
);
表信息
列名 | 含义 |
---|---|
ID | ID |
EXTENSION_ID | Extension ID |
CLASS_NAME | 类名称 |
GROUP_ID | 组名称 |
ARTIFACT_ID | 工具ID |
VERSION | 版本 |
DDL
CREATE TABLE EXTENSION_PROVIDED_SERVICE_API (
ID VARCHAR(50) NOT NULL,
EXTENSION_ID VARCHAR(50) NOT NULL,
CLASS_NAME VARCHAR (200) NOT NULL,
GROUP_ID VARCHAR(200) NOT NULL,
ARTIFACT_ID VARCHAR(200) NOT NULL,
VERSION VARCHAR(100) NOT NULL,
CONSTRAINT PK__EXTENSION_PROVIDED_SERVICE_API_ID PRIMARY KEY (ID),
CONSTRAINT FK__EXTENSION_PROVIDED_SERVICE_API_EXTENSION_ID FOREIGN KEY (EXTENSION_ID) REFERENCES EXTENSION(ID) ON DELETE CASCADE,
CONSTRAINT UNIQUE__EXTENSION_PROVIDED_SERVICE_API UNIQUE (EXTENSION_ID, CLASS_NAME, GROUP_ID, ARTIFACT_ID, VERSION)
);
表信息
列名 | 含义 |
---|---|
ID | ID |
EXTENSION_ID | Extension ID |
REQUIRED_PERMISSION | 需要许可 |
EXPLANATION | 解释 |
DDL
CREATE TABLE EXTENSION_RESTRICTION (
ID VARCHAR(50) NOT NULL,
EXTENSION_ID VARCHAR(50) NOT NULL,
REQUIRED_PERMISSION VARCHAR(200) NOT NULL,
EXPLANATION VARCHAR (4096) NOT NULL,
CONSTRAINT PK__EXTENSION_RESTRICTION_ID PRIMARY KEY (ID),
CONSTRAINT FK__EXTENSION_RESTRICTION_EXTENSION_ID FOREIGN KEY (EXTENSION_ID) REFERENCES EXTENSION(ID) ON DELETE CASCADE,
CONSTRAINT UNIQUE__EXTENSION_RESTRICTION_EXTENSION_ID_REQUIRED_PERMISSION UNIQUE (EXTENSION_ID, REQUIRED_PERMISSION)
);
表信息
列名 | 含义 |
---|---|
EXTENSION_ID | ID |
TAG | 标签 |
DDL
CREATE TABLE EXTENSION_TAG (
EXTENSION_ID VARCHAR(50) NOT NULL,
TAG VARCHAR(200) NOT NULL,
CONSTRAINT PK__EXTENSION_TAG_EXTENSION_ID_AND_TAG PRIMARY KEY (EXTENSION_ID, TAG),
CONSTRAINT FK__EXTENSION_TAG_EXTENSION_ID FOREIGN KEY (EXTENSION_ID) REFERENCES EXTENSION(ID) ON DELETE CASCADE
);
数据库持久化, 将 Flow 内容存储在数据库表中, 数据库表已命名 FLOW_PERSISTENCE_PROVIDER
组件的所有配置
表信息
列名 | 含义 |
---|---|
ID | bundle 标识符 |
BUCKET_ID | bucket 标识符 |
FLOW_ID | flow 标识符 |
VERSION | flow 版本 |
FLOW_CONTENT | flow 内容 |
CREATE TABLE FLOW_PERSISTENCE_PROVIDER (
BUCKET_ID VARCHAR(50) NOT NULL,
FLOW_ID VARCHAR(50) NOT NULL,
VERSION INT NOT NULL,
FLOW_CONTENT LONGBLOB NOT NULL,
CONSTRAINT PK__FLOW_PERSISTENCE_PROVIDER PRIMARY KEY (BUCKET_ID, FLOW_ID, VERSION)
);
表示修订的模型对象。相等定义为匹配的组件ID和匹配的版本号或匹配的非空客户端ID。
表信息
列名 | 含义 |
---|---|
ENTITY_ID | Entity ID |
VERSION | 版本 |
CLIENT_ID | 客户端ID |
DDL
CREATE TABLE REVISION (
ENTITY_ID VARCHAR(200) NOT NULL,
VERSION BIGINT NOT NULL DEFAULT 0,
CLIENT_ID VARCHAR(100),
CONSTRAINT PK__REVISION_ENTITY_ID PRIMARY KEY (ENTITY_ID)
);
要为其创建授权策略的用户
表信息
列名 | 含义 |
---|---|
IDENTIFIER | 用户标识符 |
IDENTITY | 用户身份 |
DDL
CREATE TABLE UGP_USER (
IDENTIFIER VARCHAR(50) NOT NULL,
IDENTITY VARCHAR(767) NOT NULL,
CONSTRAINT PK__UGP_USER_IDENTIFIER PRIMARY KEY (IDENTIFIER),
CONSTRAINT UNIQUE__UGP_USER_IDENTITY UNIQUE (IDENTITY)
);
用户可以归属的组。
表信息
列名 | 含义 |
---|---|
IDENTIFIER | 组标识符 |
IDENTITY | 组名 |
DDL
CREATE TABLE UGP_GROUP (
IDENTIFIER VARCHAR(50) NOT NULL,
IDENTITY VARCHAR(767) NOT NULL,
CONSTRAINT PK__UGP_GROUP_IDENTIFIER PRIMARY KEY (IDENTIFIER),
CONSTRAINT UNIQUE__UGP_GROUP_IDENTITY UNIQUE (IDENTITY)
);
表信息
列名 | 含义 |
---|---|
USER_IDENTIFIER | 用户标识符 |
GROUP_IDENTIFIER | 组标识符 |
DDL
CREATE TABLE UGP_USER_GROUP (
USER_IDENTIFIER VARCHAR(50) NOT NULL,
GROUP_IDENTIFIER VARCHAR(50) NOT NULL,
CONSTRAINT PK__UGP_USER_GROUP PRIMARY KEY (USER_IDENTIFIER, GROUP_IDENTIFIER),
CONSTRAINT FK__UGP_USER_GROUP_GROUP_IDENTIFIER FOREIGN KEY (GROUP_IDENTIFIER) REFERENCES UGP_GROUP(IDENTIFIER) ON DELETE CASCADE
);
为一组用户标识符定义策略,以便在给定资源上执行一组操作。
表信息
列名 | 含义 |
---|---|
IDENTIFIER | 策略标识符 |
RESOURCE | 资源 |
ACTION | 用户/实体可以对资源采取的操作。 |
DDL
CREATE TABLE APP_POLICY (
IDENTIFIER VARCHAR(50) NOT NULL,
RESOURCE VARCHAR(700) NOT NULL,
ACTION VARCHAR(50) NOT NULL,
CONSTRAINT PK__APP_POLICY_IDENTIFIER PRIMARY KEY (IDENTIFIER),
CONSTRAINT UNIQUE__APP_POLICY_RESOURCE_ACTION UNIQUE (RESOURCE, ACTION)
);
表信息
列名 | 含义 |
---|---|
POLICY_IDENTIFIER | 策略标识符 |
USER_IDENTIFIER | 用户标识符 |
DDL
CREATE TABLE APP_POLICY_USER (
POLICY_IDENTIFIER VARCHAR(50) NOT NULL,
USER_IDENTIFIER VARCHAR(50) NOT NULL,
CONSTRAINT PK__APP_POLICY_USER PRIMARY KEY (POLICY_IDENTIFIER, USER_IDENTIFIER),
CONSTRAINT FK__APP_POLICY_USER_POLICY_IDENTIFIER FOREIGN KEY (POLICY_IDENTIFIER) REFERENCES APP_POLICY(IDENTIFIER) ON DELETE CASCADE
);
表信息
列名 | 含义 |
---|---|
POLICY_IDENTIFIER | 策略标识符 |
GROUP_IDENTIFIER | 组标识符 |
DDL
CREATE TABLE APP_POLICY_GROUP (
POLICY_IDENTIFIER VARCHAR(50) NOT NULL,
GROUP_IDENTIFIER VARCHAR(50) NOT NULL,
CONSTRAINT PK__APP_POLICY_GROUP PRIMARY KEY (POLICY_IDENTIFIER, GROUP_IDENTIFIER),
CONSTRAINT FK__APP_POLICY_GROUP_POLICY_IDENTIFIER FOREIGN KEY (POLICY_IDENTIFIER) REFERENCES APP_POLICY(IDENTIFIER) ON DELETE CASCADE
);