├── .github ├── dependabot.yml └── workflows │ └── maven-build.yml ├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── data ├── FlinkSQL field lineage solution and source code.drawio ├── doc │ └── bak │ │ ├── README.md │ │ └── README_CN.md ├── hive-conf-dir │ └── hive-site.xml ├── images │ ├── 1.1 Calcite workflow diagram.png │ ├── 1.2 Calcite SqlNode vs RelNode.png │ ├── 2.1 FlinkSQL execution flowchart.png │ ├── 2.2 FlinkSQL field lineage analysis flowchart.png │ ├── 2.2 FlinkSQL field lineage analysis thought.png │ ├── 5.2 Table Function debugging variable.png │ ├── Appreciation code.png │ ├── Architecture.png │ ├── Principle.png │ ├── Product.gif │ └── Product.png └── temperature_record.csv ├── docker-compose.yml ├── lineage-client ├── pom.xml └── src │ ├── main │ ├── assemblies │ │ ├── plugin-flink1.14.x-assembly.xml │ │ └── plugin-flink1.16.x-assembly.xml │ ├── java │ │ └── com │ │ │ └── hw │ │ │ └── lineage │ │ │ └── client │ │ │ └── LineageClient.java │ └── resources │ │ └── log4j.properties │ └── test │ └── java │ └── com │ └── hw │ └── lineage │ └── client │ └── LineageClientTest.java ├── lineage-common ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── hw │ └── lineage │ └── common │ ├── enums │ ├── CatalogType.java │ ├── SqlStatus.java │ ├── SqlType.java │ ├── StorageType.java │ ├── TableKind.java │ ├── TaskStatus.java │ ├── audit │ │ ├── ModuleCode.java │ │ ├── OperationStatus.java │ │ └── OperationType.java │ └── basic │ │ ├── IntEnum.java │ │ └── StringEnum.java │ ├── exception │ └── LineageException.java │ ├── model │ ├── ColumnInfo.java │ ├── FunctionInfo.java │ ├── FunctionResult.java │ ├── LineageResult.java │ ├── Property.java │ └── TableInfo.java │ ├── plugin │ └── Plugin.java │ ├── service │ └── LineageService.java │ ├── supplier │ └── CustomSupplier.java │ └── util │ ├── ArrayUtils.java │ ├── Base64Utils.java │ ├── Constant.java │ ├── ExceptionUtils.java │ ├── PageUtils.java │ ├── Preconditions.java │ └── function │ ├── FunctionUtils.java │ └── FunctionWithException.java ├── lineage-dist ├── pom.xml └── src │ └── main │ └── assemblies │ └── assembly.xml ├── lineage-flink1.14.x ├── pom.xml └── src │ ├── main │ ├── java │ │ ├── com │ │ │ └── hw │ │ │ │ └── lineage │ │ │ │ └── flink │ │ │ │ ├── FunctionVisitor.java │ │ │ │ └── LineageServiceImpl.java │ │ ├── extensions │ │ │ └── org │ │ │ │ └── apache │ │ │ │ └── flink │ │ │ │ └── table │ │ │ │ └── planner │ │ │ │ └── delegation │ │ │ │ └── ParserImpl │ │ │ │ └── ParserImplExtension.java │ │ └── org │ │ │ └── apache │ │ │ └── calcite │ │ │ └── rel │ │ │ └── metadata │ │ │ ├── RelColumnOrigin.java │ │ │ └── RelMdColumnOrigins.java │ └── resources │ │ ├── META-INF │ │ └── services │ │ │ └── com.hw.lineage.common.service.LineageService │ │ ├── log4j.properties │ │ └── log4j2.xml │ └── test │ ├── java │ ├── com │ │ └── hw │ │ │ └── lineage │ │ │ └── flink │ │ │ ├── SuiteTest.java │ │ │ ├── basic │ │ │ └── AbstractBasicTest.java │ │ │ ├── catalog │ │ │ └── CatalogTest.java │ │ │ ├── cep │ │ │ └── CepTest.java │ │ │ ├── common │ │ │ ├── CommonTest.java │ │ │ ├── MySuffixFunction.java │ │ │ └── SimpleTest.java │ │ │ ├── localtimestamp │ │ │ └── LocaltimestampTest.java │ │ │ ├── lookup │ │ │ └── join │ │ │ │ └── LookupJoinTest.java │ │ │ ├── parse │ │ │ └── ParseTest.java │ │ │ ├── proctime │ │ │ └── ProctimeTest.java │ │ │ ├── tablefuncion │ │ │ ├── MySplitFunction.java │ │ │ ├── SplitMultiParamsFunction.java │ │ │ ├── TableFunctionMultiParamsTest.java │ │ │ └── TableFunctionTest.java │ │ │ ├── tvf │ │ │ └── TvfTest.java │ │ │ ├── watermark │ │ │ └── WatermarkTest.java │ │ │ └── window │ │ │ └── WindowTest.java │ └── org │ │ └── apache │ │ ├── calcite │ │ └── rel │ │ │ └── metadata │ │ │ └── RelMdColumnOriginsTest.java │ │ └── flink │ │ └── table │ │ └── catalog │ │ └── hive │ │ └── HiveTestUtils.java │ └── resources │ └── hive-site.xml ├── lineage-flink1.16.x ├── pom.xml └── src │ ├── main │ ├── java │ │ ├── com │ │ │ └── hw │ │ │ │ └── lineage │ │ │ │ └── flink │ │ │ │ ├── FunctionVisitor.java │ │ │ │ └── LineageServiceImpl.java │ │ ├── extensions │ │ │ └── org │ │ │ │ └── apache │ │ │ │ └── flink │ │ │ │ └── table │ │ │ │ └── planner │ │ │ │ └── delegation │ │ │ │ └── ParserImpl │ │ │ │ └── ParserImplExtension.java │ │ └── org │ │ │ └── apache │ │ │ └── calcite │ │ │ └── rel │ │ │ └── metadata │ │ │ ├── RelColumnOrigin.java │ │ │ └── RelMdColumnOrigins.java │ └── resources │ │ ├── META-INF │ │ └── services │ │ │ └── com.hw.lineage.common.service.LineageService │ │ ├── log4j.properties │ │ └── log4j2.xml │ └── test │ ├── java │ ├── com │ │ └── hw │ │ │ └── lineage │ │ │ └── flink │ │ │ ├── SuiteTest.java │ │ │ ├── basic │ │ │ └── AbstractBasicTest.java │ │ │ ├── catalog │ │ │ └── CatalogTest.java │ │ │ ├── cep │ │ │ └── CepTest.java │ │ │ ├── common │ │ │ ├── CommonTest.java │ │ │ ├── MySuffixFunction.java │ │ │ └── SimpleTest.java │ │ │ ├── ctas │ │ │ └── CtasTest.java │ │ │ ├── localtimestamp │ │ │ └── LocaltimestampTest.java │ │ │ ├── lookup │ │ │ └── join │ │ │ │ └── LookupJoinTest.java │ │ │ ├── paimon │ │ │ └── PaimonTest.java │ │ │ ├── parse │ │ │ └── ParseTest.java │ │ │ ├── proctime │ │ │ └── ProctimeTest.java │ │ │ ├── tablefuncion │ │ │ ├── MySplitFunction.java │ │ │ ├── SplitMultiParamsFunction.java │ │ │ ├── TableFunctionMultiParamsTest.java │ │ │ └── TableFunctionTest.java │ │ │ ├── tvf │ │ │ └── TvfTest.java │ │ │ ├── watermark │ │ │ └── WatermarkTest.java │ │ │ └── window │ │ │ └── WindowTest.java │ └── org │ │ └── apache │ │ ├── calcite │ │ └── rel │ │ │ └── metadata │ │ │ └── RelMdColumnOriginsTest.java │ │ └── flink │ │ └── table │ │ └── catalog │ │ └── hive │ │ └── HiveTestUtils.java │ └── resources │ └── hive-site.xml ├── lineage-loader ├── pom.xml └── src │ ├── main │ └── java │ │ └── com │ │ └── hw │ │ └── lineage │ │ └── loader │ │ ├── classloading │ │ ├── ComponentClassLoader.java │ │ └── TemporaryClassLoaderContext.java │ │ └── plugin │ │ ├── PluginDescriptor.java │ │ ├── PluginLoader.java │ │ ├── finder │ │ ├── DirectoryBasedPluginFinder.java │ │ └── PluginFinder.java │ │ └── manager │ │ ├── DefaultPluginManager.java │ │ └── PluginManager.java │ └── test │ ├── assemblies │ ├── test-plugin-a-assembly.xml │ └── test-plugin-b-assembly.xml │ ├── java │ └── com │ │ └── hw │ │ └── lineage │ │ └── loader │ │ ├── PluginTestBase.java │ │ ├── TestLogger.java │ │ ├── plugin │ │ ├── PluginLoaderTest.java │ │ └── manager │ │ │ └── DefaultPluginManagerTest.java │ │ └── service │ │ ├── OtherTestService.java │ │ ├── TestService.java │ │ └── impl │ │ ├── plugina │ │ ├── DynamicClassA.java │ │ └── TestServiceA.java │ │ └── pluginb │ │ ├── OtherTestServiceB.java │ │ └── TestServiceB.java │ └── resources │ ├── plugin-a │ └── com.hw.lineage.loader.service.TestService │ └── plugin-b │ ├── com.hw.lineage.loader.service.OtherTestService │ └── com.hw.lineage.loader.service.TestService ├── lineage-server ├── lineage-server-application │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── com │ │ │ └── hw │ │ │ └── lineage │ │ │ └── server │ │ │ └── application │ │ │ ├── assembler │ │ │ └── DtoAssembler.java │ │ │ ├── command │ │ │ ├── audit │ │ │ │ └── CreateAuditCmd.java │ │ │ ├── catalog │ │ │ │ ├── CreateCatalogCmd.java │ │ │ │ ├── CreateDatabaseCmd.java │ │ │ │ ├── CreateTableCmd.java │ │ │ │ └── UpdateCatalogCmd.java │ │ │ ├── function │ │ │ │ ├── CreateFunctionCmd.java │ │ │ │ ├── ParseFunctionCmd.java │ │ │ │ └── UpdateFunctionCmd.java │ │ │ ├── permission │ │ │ │ ├── CreatePermissionCmd.java │ │ │ │ └── UpdatePermissionCmd.java │ │ │ ├── plugin │ │ │ │ ├── CreatePluginCmd.java │ │ │ │ └── UpdatePluginCmd.java │ │ │ ├── role │ │ │ │ ├── CreateRoleCmd.java │ │ │ │ └── UpdateRoleCmd.java │ │ │ ├── storage │ │ │ │ └── DeleteStorageCmd.java │ │ │ ├── task │ │ │ │ ├── CreateTaskCmd.java │ │ │ │ └── UpdateTaskCmd.java │ │ │ └── user │ │ │ │ ├── CreateUserCmd.java │ │ │ │ └── UpdateUserCmd.java │ │ │ ├── dto │ │ │ ├── AuditDTO.java │ │ │ ├── CatalogDTO.java │ │ │ ├── FunctionDTO.java │ │ │ ├── PermissionDTO.java │ │ │ ├── PluginDTO.java │ │ │ ├── RoleDTO.java │ │ │ ├── TableDTO.java │ │ │ ├── TaskDTO.java │ │ │ ├── TaskFunctionDTO.java │ │ │ ├── TaskLineageDTO.java │ │ │ ├── TaskSqlDTO.java │ │ │ ├── TaskSyntaxDTO.java │ │ │ ├── UserDTO.java │ │ │ ├── basic │ │ │ │ ├── BasicDTO.java │ │ │ │ └── RootDTO.java │ │ │ └── graph │ │ │ │ ├── LineageGraph.java │ │ │ │ ├── link │ │ │ │ ├── ColumnLink.java │ │ │ │ ├── TableLink.java │ │ │ │ └── basic │ │ │ │ │ └── Link.java │ │ │ │ └── vertex │ │ │ │ ├── Column.java │ │ │ │ └── Vertex.java │ │ │ └── service │ │ │ ├── AuditService.java │ │ │ ├── CatalogService.java │ │ │ ├── FunctionService.java │ │ │ ├── PermissionService.java │ │ │ ├── PluginService.java │ │ │ ├── RoleService.java │ │ │ ├── StorageService.java │ │ │ ├── TableService.java │ │ │ ├── TaskService.java │ │ │ ├── UserService.java │ │ │ └── impl │ │ │ ├── AuditServiceImpl.java │ │ │ ├── CatalogServiceImpl.java │ │ │ ├── FunctionServiceImpl.java │ │ │ ├── PermissionServiceImpl.java │ │ │ ├── PluginServiceImpl.java │ │ │ ├── RoleServiceImpl.java │ │ │ ├── StorageServiceImpl.java │ │ │ ├── TableServiceImpl.java │ │ │ ├── TaskServiceImpl.java │ │ │ └── UserServiceImpl.java │ │ └── test │ │ └── java │ │ └── com │ │ └── hw │ │ └── lineage │ │ └── server │ │ └── application │ │ └── assembler │ │ └── DtoAssemblerTest.java ├── lineage-server-domain │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── com │ │ │ └── hw │ │ │ └── lineage │ │ │ └── server │ │ │ └── domain │ │ │ ├── entity │ │ │ ├── Audit.java │ │ │ ├── Catalog.java │ │ │ ├── Function.java │ │ │ ├── Permission.java │ │ │ ├── Plugin.java │ │ │ ├── Role.java │ │ │ ├── Table.java │ │ │ ├── User.java │ │ │ ├── basic │ │ │ │ ├── BasicEntity.java │ │ │ │ └── RootEntity.java │ │ │ └── task │ │ │ │ ├── Task.java │ │ │ │ ├── TaskFunction.java │ │ │ │ ├── TaskLineage.java │ │ │ │ └── TaskSql.java │ │ │ ├── facade │ │ │ ├── AvatarFacade.java │ │ │ ├── LineageFacade.java │ │ │ └── StorageFacade.java │ │ │ ├── graph │ │ │ ├── GraphCalculator.java │ │ │ ├── GraphHelper.java │ │ │ ├── basic │ │ │ │ ├── Edge.java │ │ │ │ ├── Graph.java │ │ │ │ └── Node.java │ │ │ ├── column │ │ │ │ ├── ColumnEdge.java │ │ │ │ ├── ColumnGraph.java │ │ │ │ └── ColumnNode.java │ │ │ └── table │ │ │ │ ├── TableEdge.java │ │ │ │ ├── TableGraph.java │ │ │ │ └── TableNode.java │ │ │ ├── query │ │ │ ├── BasicCriteria.java │ │ │ ├── OrderCriteria.java │ │ │ ├── PageOrderCriteria.java │ │ │ ├── audit │ │ │ │ └── AuditQuery.java │ │ │ ├── catalog │ │ │ │ ├── CatalogCheck.java │ │ │ │ ├── CatalogEntry.java │ │ │ │ └── CatalogQuery.java │ │ │ ├── function │ │ │ │ ├── FunctionCheck.java │ │ │ │ ├── FunctionEntry.java │ │ │ │ ├── FunctionQuery.java │ │ │ │ ├── FunctionTaskQuery.java │ │ │ │ └── dto │ │ │ │ │ └── FunctionTaskDTO.java │ │ │ ├── permission │ │ │ │ ├── PermissionCheck.java │ │ │ │ └── PermissionQuery.java │ │ │ ├── plugin │ │ │ │ ├── PluginCheck.java │ │ │ │ └── PluginQuery.java │ │ │ ├── role │ │ │ │ ├── RoleCheck.java │ │ │ │ └── RoleQuery.java │ │ │ ├── task │ │ │ │ ├── TaskCheck.java │ │ │ │ ├── TaskFunctionQuery.java │ │ │ │ └── TaskQuery.java │ │ │ └── user │ │ │ │ ├── UserCheck.java │ │ │ │ └── UserQuery.java │ │ │ ├── repository │ │ │ ├── AuditRepository.java │ │ │ ├── CatalogRepository.java │ │ │ ├── FunctionRepository.java │ │ │ ├── PermissionRepository.java │ │ │ ├── PluginRepository.java │ │ │ ├── RoleRepository.java │ │ │ ├── TableRepository.java │ │ │ ├── TaskRepository.java │ │ │ ├── UserRepository.java │ │ │ └── basic │ │ │ │ ├── Entity.java │ │ │ │ ├── Identifier.java │ │ │ │ └── Repository.java │ │ │ ├── service │ │ │ ├── TaskDomainService.java │ │ │ └── impl │ │ │ │ └── TaskDomainServiceImpl.java │ │ │ └── vo │ │ │ ├── AuditId.java │ │ │ ├── CatalogId.java │ │ │ ├── FunctionId.java │ │ │ ├── PermissionId.java │ │ │ ├── PluginId.java │ │ │ ├── RoleId.java │ │ │ ├── SqlId.java │ │ │ ├── Storage.java │ │ │ ├── TableId.java │ │ │ ├── TaskId.java │ │ │ ├── TaskSource.java │ │ │ └── UserId.java │ │ └── test │ │ └── java │ │ └── com │ │ └── hw │ │ └── lineage │ │ └── server │ │ └── domain │ │ ├── graph │ │ ├── GraphCalculatorTest.java │ │ └── column │ │ │ └── ColumnEdgeTest.java │ │ └── vo │ │ └── TaskSourceTest.java ├── lineage-server-infrastructure │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── com │ │ │ └── hw │ │ │ └── lineage │ │ │ └── server │ │ │ └── infrastructure │ │ │ ├── config │ │ │ └── LineageConfig.java │ │ │ ├── facade │ │ │ └── impl │ │ │ │ ├── AvatarFacadeImpl.java │ │ │ │ ├── LineageFacadeImpl.java │ │ │ │ └── StorageFacadeImpl.java │ │ │ ├── graph │ │ │ └── GraphFactory.java │ │ │ ├── persistence │ │ │ ├── converter │ │ │ │ └── DataConverter.java │ │ │ ├── dos │ │ │ │ ├── AuditDO.java │ │ │ │ ├── CatalogDO.java │ │ │ │ ├── FunctionDO.java │ │ │ │ ├── PermissionDO.java │ │ │ │ ├── PluginDO.java │ │ │ │ ├── RoleDO.java │ │ │ │ ├── RolePermissionDO.java │ │ │ │ ├── RoleUserDO.java │ │ │ │ ├── TableDO.java │ │ │ │ ├── TaskDO.java │ │ │ │ ├── TaskFunctionDO.java │ │ │ │ ├── TaskLineageDO.java │ │ │ │ ├── TaskSqlDO.java │ │ │ │ └── UserDO.java │ │ │ ├── mapper │ │ │ │ ├── AuditDynamicSqlSupport.java │ │ │ │ ├── AuditMapper.java │ │ │ │ ├── CatalogDynamicSqlSupport.java │ │ │ │ ├── CatalogMapper.java │ │ │ │ ├── FunctionDynamicSqlSupport.java │ │ │ │ ├── FunctionMapper.java │ │ │ │ ├── PermissionDynamicSqlSupport.java │ │ │ │ ├── PermissionMapper.java │ │ │ │ ├── PluginDynamicSqlSupport.java │ │ │ │ ├── PluginMapper.java │ │ │ │ ├── RoleDynamicSqlSupport.java │ │ │ │ ├── RoleMapper.java │ │ │ │ ├── RolePermissionDynamicSqlSupport.java │ │ │ │ ├── RolePermissionMapper.java │ │ │ │ ├── RoleUserDynamicSqlSupport.java │ │ │ │ ├── RoleUserMapper.java │ │ │ │ ├── TableDynamicSqlSupport.java │ │ │ │ ├── TableMapper.java │ │ │ │ ├── TaskDynamicSqlSupport.java │ │ │ │ ├── TaskFunctionDynamicSqlSupport.java │ │ │ │ ├── TaskFunctionMapper.java │ │ │ │ ├── TaskLineageDynamicSqlSupport.java │ │ │ │ ├── TaskLineageMapper.java │ │ │ │ ├── TaskMapper.java │ │ │ │ ├── TaskSqlDynamicSqlSupport.java │ │ │ │ ├── TaskSqlMapper.java │ │ │ │ ├── UserDynamicSqlSupport.java │ │ │ │ ├── UserMapper.java │ │ │ │ └── custom │ │ │ │ │ ├── CustomCatalogMapper.java │ │ │ │ │ └── CustomFunctionMapper.java │ │ │ └── mybatis │ │ │ │ ├── MybatisConfig.java │ │ │ │ ├── function │ │ │ │ └── GroupConcat.java │ │ │ │ ├── generator │ │ │ │ └── CustomCommentGenerator.java │ │ │ │ ├── handler │ │ │ │ ├── ByteArrayBase64TypeHandler.java │ │ │ │ ├── IntEnumTypeHandler.java │ │ │ │ ├── JsonTypeHandler.java │ │ │ │ ├── LongListTypeHandler.java │ │ │ │ ├── MapTypeHandler.java │ │ │ │ ├── PropertyListTypeHandler.java │ │ │ │ ├── StringEnumTypeHandler.java │ │ │ │ └── impl │ │ │ │ │ ├── CatalogTypeHandler.java │ │ │ │ │ ├── ColumnGraphTypeHandler.java │ │ │ │ │ ├── ModuleCodeHandler.java │ │ │ │ │ ├── OperationStatusTypeHandler.java │ │ │ │ │ ├── OperationTypeHandler.java │ │ │ │ │ ├── SqlStatusTypeHandler.java │ │ │ │ │ ├── SqlTypeHandler.java │ │ │ │ │ ├── TableGraphTypeHandler.java │ │ │ │ │ └── TaskStatusTypeHandler.java │ │ │ │ └── plugin │ │ │ │ └── RenameDoPlugin.java │ │ │ └── repository │ │ │ └── impl │ │ │ ├── AbstractBasicRepository.java │ │ │ ├── AuditRepositoryImpl.java │ │ │ ├── CatalogRepositoryImpl.java │ │ │ ├── FunctionRepositoryImpl.java │ │ │ ├── PermissionRepositoryImpl.java │ │ │ ├── PluginRepositoryImpl.java │ │ │ ├── RoleRepositoryImpl.java │ │ │ ├── TableRepositoryImpl.java │ │ │ ├── TaskRepositoryImpl.java │ │ │ └── UserRepositoryImpl.java │ │ └── test │ │ └── java │ │ └── com │ │ └── hw │ │ └── lineage │ │ └── server │ │ └── infrastructure │ │ ├── facade │ │ └── impl │ │ │ ├── AvatarFacadeImplTest.java │ │ │ └── LineageFacadeImplTest.java │ │ └── persistence │ │ └── converter │ │ └── DataConverterTest.java ├── lineage-server-interfaces │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── com │ │ │ └── hw │ │ │ └── lineage │ │ │ └── server │ │ │ └── interfaces │ │ │ ├── aspect │ │ │ ├── AuditLog.java │ │ │ ├── ControllerAspect.java │ │ │ └── SkipLogAspect.java │ │ │ ├── config │ │ │ ├── LocaleValidatorConfig.java │ │ │ ├── SecurityConfig.java │ │ │ └── SwaggerConfig.java │ │ │ ├── controller │ │ │ ├── AuditController.java │ │ │ ├── CatalogController.java │ │ │ ├── FunctionController.java │ │ │ ├── PermissionController.java │ │ │ ├── PluginController.java │ │ │ ├── RoleController.java │ │ │ ├── SecurityController.java │ │ │ ├── StorageController.java │ │ │ ├── TaskController.java │ │ │ └── UserController.java │ │ │ ├── enhanced │ │ │ ├── EnhancedHttpRequestWrapper.java │ │ │ └── EnhancedParametersFilter.java │ │ │ ├── exception │ │ │ └── ExceptionHandlers.java │ │ │ ├── result │ │ │ ├── Result.java │ │ │ ├── ResultCode.java │ │ │ └── ResultMessage.java │ │ │ └── util │ │ │ ├── CopyUtils.java │ │ │ └── RequestUtils.java │ │ └── test │ │ └── java │ │ └── com │ │ └── hw │ │ └── lineage │ │ └── server │ │ └── interfaces │ │ └── controller │ │ └── SpelTest.java ├── lineage-server-start │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── hw │ │ │ │ └── lineage │ │ │ │ └── server │ │ │ │ └── start │ │ │ │ ├── LineageServerApplication.java │ │ │ │ └── MybatisGenerator.java │ │ └── resources │ │ │ ├── application-dev.properties │ │ │ ├── application-docker.properties │ │ │ ├── application-prod.properties │ │ │ ├── application-test.properties │ │ │ ├── application.properties │ │ │ ├── logback-spring.xml │ │ │ ├── mybatis │ │ │ └── mybatis-generator.xml │ │ │ └── scripts │ │ │ └── h2 │ │ │ ├── data.sql │ │ │ └── schema.sql │ │ └── test │ │ ├── assemblies │ │ ├── test-function-a-assembly.xml │ │ └── test-function-b-assembly.xml │ │ └── java │ │ └── com │ │ └── hw │ │ └── lineage │ │ ├── flink │ │ └── table │ │ │ └── udf │ │ │ ├── functiona │ │ │ └── FlinkSuffixFunction.java │ │ │ └── functionb │ │ │ ├── FlinkPrefixFunction.java │ │ │ └── FlinkSplitFunction.java │ │ └── server │ │ ├── AbstractSpringBootTest.java │ │ ├── domain │ │ └── repository │ │ │ ├── CatalogRepositoryTest.java │ │ │ └── FunctionRepositoryTest.java │ │ └── infrastructure │ │ ├── facade │ │ └── impl │ │ │ └── LineageFacadeImplTest.java │ │ └── persistence │ │ └── mapper │ │ └── PluginMapperTest.java └── pom.xml ├── lineage-web ├── .babelrc ├── README.md ├── config-overrides.js ├── package.json ├── pom.xml ├── public │ ├── favicon.ico │ ├── index.html │ └── manifest.json └── src │ ├── App.js │ ├── common │ ├── common.styl │ ├── flexbox.styl │ └── io-context.js │ ├── component │ ├── react-lineage-dag-resource.zip │ └── react-lineage-dag │ │ ├── index.js │ │ └── index.js.map │ ├── index.css │ ├── index.js │ ├── logo.svg │ ├── page-catalog │ ├── catalog-add-modal.js │ ├── catalog-detail │ │ ├── catalog-detail.js │ │ ├── detail-function-info.js │ │ ├── detail-table-info.js │ │ ├── detail-tree.js │ │ ├── function-info-audit.js │ │ ├── function-info-overview.js │ │ ├── index.js │ │ ├── modal-add-database.js │ │ ├── modal-add-function.js │ │ ├── modal-add-table.js │ │ ├── modal-apply-function.js │ │ ├── table-info-ddl.js │ │ ├── table-info-lineage.js │ │ └── table-info-overview.js │ ├── catalog-list.js │ ├── img │ │ └── HIVE.svg │ ├── index.css │ └── index.js │ ├── page-login │ ├── img │ │ ├── 768f621302960506517df905fd902ccd.jpg │ │ ├── c36657b90557d33f06e5f6a93dd4f938.jpeg │ │ ├── logo-blue.png │ │ └── logo-white.png │ ├── index.css │ └── index.js │ ├── page-plugin │ ├── index.css │ ├── index.js │ ├── plugin-add-modal.js │ └── plugin-list.js │ ├── page-sql │ ├── component │ │ └── operator │ │ │ ├── operator.jsx │ │ │ └── operator.styl │ ├── createContext.js │ ├── img │ │ ├── API-white.svg │ │ ├── API.svg │ │ ├── close.svg │ │ ├── enlarge.svg │ │ ├── expand-down-gray.svg │ │ ├── expand-down.svg │ │ ├── expand-up-gray.svg │ │ ├── expand-up.svg │ │ ├── field-white.svg │ │ ├── filed-icon.svg │ │ ├── fold-white.svg │ │ ├── fold.svg │ │ ├── full-screen.svg │ │ ├── icon-fresh.svg │ │ ├── info-white.svg │ │ ├── info.svg │ │ ├── lTor.svg │ │ ├── load.svg │ │ ├── rTol.svg │ │ ├── reduce.svg │ │ ├── return-screen.svg │ │ ├── shrink-down.svg │ │ ├── shrink-up.svg │ │ ├── sys-white.svg │ │ ├── table-blue.svg │ │ ├── table-white.svg │ │ ├── tag-white.svg │ │ ├── unfold-white.svg │ │ └── unfold.svg │ ├── index.css │ ├── index.js │ ├── job-list.js │ ├── job-sql.js │ ├── lineage-box.js │ ├── right-box.js │ ├── store.js │ └── utils.js │ └── page-user-manage │ ├── index.js │ ├── role.js │ ├── user-add-modal.js │ └── user.js ├── pom.xml ├── sbin ├── clear-docker-compose.sh ├── deploy.sh ├── start-docker-compose.sh ├── start.sh ├── stop-docker-compose.sh └── stop.sh ├── scripts └── mysql │ ├── 1_schema.sql │ └── 2_data.sql └── style ├── license-header └── spotless-formatter.xml /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "daily" 7 | -------------------------------------------------------------------------------- /.github/workflows/maven-build.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time 2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven 3 | 4 | # This workflow uses actions that are not certified by GitHub. 5 | # They are provided by a third-party and are governed by 6 | # separate terms of service, privacy policy, and support 7 | # documentation. 8 | 9 | name: Java CI with Maven 10 | 11 | on: 12 | push: 13 | branches: [ "dev" ] 14 | pull_request: 15 | branches: [ "dev", "main" ] 16 | 17 | jobs: 18 | build: 19 | 20 | runs-on: ubuntu-latest 21 | 22 | steps: 23 | - uses: actions/checkout@v4 24 | - name: Set up JDK 8 25 | uses: actions/setup-java@v3 26 | with: 27 | java-version: '8' 28 | distribution: 'temurin' 29 | cache: maven 30 | - name: Build with Maven 31 | run: mvn clean package -Ptest -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Mobile Tools for Java (J2ME) 2 | .mtj.tmp/ 3 | 4 | # Package Files # 5 | *.jar 6 | *.war 7 | *.ear 8 | 9 | # virtual machine crash logs 10 | hs_err_pid* 11 | 12 | *~ 13 | 14 | # eclipse ignore 15 | .settings 16 | .project 17 | .classpath 18 | .tomcatplugin 19 | logPath_IS_UNDEFINED 20 | *.gz 21 | 22 | # idea ignore 23 | .idea 24 | *.iml 25 | 26 | # maven ignore 27 | target 28 | 29 | # other ignore 30 | *.log 31 | *.tmp 32 | Thumbs.db 33 | *.DS_Store 34 | *.tgz 35 | 36 | 37 | # local env files 38 | .env.local 39 | .env.*.local 40 | 41 | # Log files 42 | *.log 43 | *.log.zip 44 | 45 | # Editor directories and files 46 | .vscode 47 | *.suo 48 | *.ntvs* 49 | *.njsproj 50 | *.sln 51 | *.sw? 52 | dist 53 | 54 | node_modules 55 | package-lock.json 56 | 57 | data/tmp 58 | data/storage 59 | data/logs 60 | 61 | lineage-web/build/ 62 | lineage-web/node/ 63 | static 64 | /lineage-server/lineage-server-start/data/ 65 | logs 66 | yarn.lock -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM openjdk:8-jdk-alpine 2 | 3 | LABEL mentainer="baisongxx@gmail.com" 4 | 5 | COPY lineage-dist/dist/flink-sql-lineage-1.0.0.tgz /opt/workspace/ 6 | 7 | RUN cd /opt/workspace && \ 8 | tar -xvzf flink-sql-lineage-1.0.0.tgz && \ 9 | chmod +x flink-sql-lineage-1.0.0/sbin/*.sh 10 | 11 | WORKDIR /opt/workspace/flink-sql-lineage-1.0.0 12 | 13 | EXPOSE 8194 14 | 15 | # add `tail -f /dev/null` to keep the container from exiting 16 | ENTRYPOINT ["/bin/sh", "-c", "sbin/start.sh && tail -f /dev/null"] 17 | -------------------------------------------------------------------------------- /data/hive-conf-dir/hive-site.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | hive.metastore.uris 6 | thrift://192.168.90.150:9083 7 | 8 | -------------------------------------------------------------------------------- /data/images/1.1 Calcite workflow diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HamaWhiteGG/flink-sql-lineage/c484f20e2c4f9e97a60f4f70bbe914e03a322776/data/images/1.1 Calcite workflow diagram.png -------------------------------------------------------------------------------- /data/images/1.2 Calcite SqlNode vs RelNode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HamaWhiteGG/flink-sql-lineage/c484f20e2c4f9e97a60f4f70bbe914e03a322776/data/images/1.2 Calcite SqlNode vs RelNode.png -------------------------------------------------------------------------------- /data/images/2.1 FlinkSQL execution flowchart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HamaWhiteGG/flink-sql-lineage/c484f20e2c4f9e97a60f4f70bbe914e03a322776/data/images/2.1 FlinkSQL execution flowchart.png -------------------------------------------------------------------------------- /data/images/2.2 FlinkSQL field lineage analysis flowchart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HamaWhiteGG/flink-sql-lineage/c484f20e2c4f9e97a60f4f70bbe914e03a322776/data/images/2.2 FlinkSQL field lineage analysis flowchart.png -------------------------------------------------------------------------------- /data/images/2.2 FlinkSQL field lineage analysis thought.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HamaWhiteGG/flink-sql-lineage/c484f20e2c4f9e97a60f4f70bbe914e03a322776/data/images/2.2 FlinkSQL field lineage analysis thought.png -------------------------------------------------------------------------------- /data/images/5.2 Table Function debugging variable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HamaWhiteGG/flink-sql-lineage/c484f20e2c4f9e97a60f4f70bbe914e03a322776/data/images/5.2 Table Function debugging variable.png -------------------------------------------------------------------------------- /data/images/Appreciation code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HamaWhiteGG/flink-sql-lineage/c484f20e2c4f9e97a60f4f70bbe914e03a322776/data/images/Appreciation code.png -------------------------------------------------------------------------------- /data/images/Architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HamaWhiteGG/flink-sql-lineage/c484f20e2c4f9e97a60f4f70bbe914e03a322776/data/images/Architecture.png -------------------------------------------------------------------------------- /data/images/Principle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HamaWhiteGG/flink-sql-lineage/c484f20e2c4f9e97a60f4f70bbe914e03a322776/data/images/Principle.png -------------------------------------------------------------------------------- /data/images/Product.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HamaWhiteGG/flink-sql-lineage/c484f20e2c4f9e97a60f4f70bbe914e03a322776/data/images/Product.gif -------------------------------------------------------------------------------- /data/images/Product.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HamaWhiteGG/flink-sql-lineage/c484f20e2c4f9e97a60f4f70bbe914e03a322776/data/images/Product.png -------------------------------------------------------------------------------- /data/temperature_record.csv: -------------------------------------------------------------------------------- 1 | 1,2021-09-14 15:37:03.3,30 2 | 1,2021-09-14 15:37:13.3,50 3 | 1,2021-09-14 15:37:23.3,55 4 | 1,2021-09-14 15:37:33.3,60 5 | 1,2021-09-14 15:37:43.3,55 6 | 1,2021-09-14 15:37:53.3,50 7 | 1,2021-09-14 15:38:03.3,45 8 | 2,2021-09-14 15:37:03.3,30 9 | 2,2021-09-14 15:37:13.3,50 10 | 2,2021-09-14 15:37:23.3,55 11 | 2,2021-09-14 15:37:33.3,45 12 | 2,2021-09-14 15:37:43.3,55 13 | 2,2021-09-14 15:37:53.3,50 14 | 2,2021-09-14 15:38:03.3,45 -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | 3 | services: 4 | mysql: 5 | container_name: mysql 6 | image: mysql:8.0 7 | environment: 8 | MYSQL_ROOT_PASSWORD: root@123456 9 | MYSQL_DATABASE: lineage 10 | ports: 11 | - "3306:3306" 12 | volumes: 13 | - "./data/storage/mysql:/var/lib/mysql" 14 | - "./scripts/mysql:/docker-entrypoint-initdb.d/" 15 | networks: 16 | springboot-mysql-net: 17 | 18 | lineage-server: 19 | container_name: lineage-server 20 | image: lineage-server:1.0.0 21 | build: 22 | context: ./ 23 | dockerfile: Dockerfile 24 | ports: 25 | - "8194:8194" 26 | depends_on: 27 | - mysql 28 | networks: 29 | springboot-mysql-net: 30 | restart: on-failure 31 | 32 | networks: 33 | springboot-mysql-net: 34 | -------------------------------------------------------------------------------- /lineage-client/src/main/assemblies/plugin-flink1.14.x-assembly.xml: -------------------------------------------------------------------------------- 1 | 4 | plugin-flink1.14.x 5 | 6 | dir 7 | 8 | false 9 | 10 | 11 | 12 | ${project.parent.basedir}/lineage-flink1.14.x/target 13 | flink1.14.x/ 14 | 15 | *.jar 16 | 17 | 18 | *-sources.jar 19 | 20 | 21 | 22 | 23 | ${project.parent.basedir}/lineage-flink1.14.x/target/lib 24 | flink1.14.x/lib/ 25 | 26 | * 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /lineage-client/src/main/assemblies/plugin-flink1.16.x-assembly.xml: -------------------------------------------------------------------------------- 1 | 4 | plugin-flink1.16.x 5 | 6 | dir 7 | 8 | false 9 | 10 | 11 | 12 | ${project.parent.basedir}/lineage-flink1.16.x/target 13 | flink1.16.x/ 14 | 15 | *.jar 16 | 17 | 18 | *-sources.jar 19 | 20 | 21 | 22 | 23 | ${project.parent.basedir}/lineage-flink1.16.x/target/lib 24 | flink1.16.x/lib/ 25 | 26 | * 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /lineage-client/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | ################################################################################ 18 | log4j.rootLogger=ERROR, console 19 | log4j.appender.console=org.apache.log4j.ConsoleAppender 20 | log4j.appender.console.layout=org.apache.log4j.PatternLayout 21 | log4j.appender.console.layout.ConversionPattern=%d %5p %t %-20c.%M:%L - %m%n 22 | log4j.logger.org.apache.calcite.rel.metadata=DEBUG 23 | log4j.logger.com.hw.lineage=DEBUG 24 | # Executing 'DROP FUNCTION IF EXISTS xxx' will print ERROR log, ignore it 25 | log4j.logger.org.apache.hadoop.hive.metastore=FATAL 26 | -------------------------------------------------------------------------------- /lineage-common/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.hw.lineage 7 | flink-sql-lineage 8 | 1.0.0 9 | 10 | 11 | lineage-common 12 | 13 | 14 | 15 | org.projectlombok 16 | lombok 17 | 18 | 19 | 20 | org.slf4j 21 | slf4j-api 22 | 23 | 24 | 25 | junit 26 | junit 27 | 28 | 29 | 30 | com.google.code.findbugs 31 | jsr305 32 | 33 | 34 | 35 | com.github.pagehelper 36 | pagehelper 37 | 38 | 39 | 40 | org.springframework 41 | spring-beans 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /lineage-common/src/main/java/com/hw/lineage/common/enums/CatalogType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.common.enums; 20 | 21 | import com.hw.lineage.common.enums.basic.StringEnum; 22 | 23 | /** 24 | * @description: CatalogType 25 | * @author: HamaWhite 26 | */ 27 | public enum CatalogType implements StringEnum { 28 | 29 | MEMORY("generic_in_memory"), 30 | HIVE("hive"), 31 | JDBC("jdbc"); 32 | 33 | private final String value; 34 | 35 | CatalogType(String value) { 36 | this.value = value; 37 | } 38 | 39 | @Override 40 | public String value() { 41 | return value; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /lineage-common/src/main/java/com/hw/lineage/common/enums/SqlStatus.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.common.enums; 20 | 21 | import com.hw.lineage.common.enums.basic.IntEnum; 22 | 23 | /** 24 | * @description: SqlStatus 25 | * @author: HamaWhite 26 | */ 27 | public enum SqlStatus implements IntEnum { 28 | 29 | FAILED(-1), 30 | SUCCESS(0), 31 | INIT(1), 32 | RUNNING(2); 33 | 34 | private final int value; 35 | 36 | SqlStatus(int value) { 37 | this.value = value; 38 | } 39 | 40 | @Override 41 | public int value() { 42 | return value; 43 | } 44 | } -------------------------------------------------------------------------------- /lineage-common/src/main/java/com/hw/lineage/common/enums/StorageType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.common.enums; 20 | 21 | import com.hw.lineage.common.enums.basic.StringEnum; 22 | 23 | /** 24 | * @description: StorageType 25 | * @author: HamaWhite 26 | */ 27 | public enum StorageType implements StringEnum { 28 | 29 | FUNCTION("functions"), 30 | CATALOG("catalogs"); 31 | 32 | private final String value; 33 | 34 | StorageType(String value) { 35 | this.value = value; 36 | } 37 | 38 | @Override 39 | public String value() { 40 | return value; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lineage-common/src/main/java/com/hw/lineage/common/enums/TableKind.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.common.enums; 20 | 21 | import com.hw.lineage.common.enums.basic.StringEnum; 22 | 23 | /** 24 | * @description: TableKind 25 | * @author: HamaWhite 26 | */ 27 | public enum TableKind implements StringEnum { 28 | 29 | TABLE("table"), 30 | VIEW("view"); 31 | 32 | private final String value; 33 | 34 | TableKind(String value) { 35 | this.value = value; 36 | } 37 | 38 | @Override 39 | public String value() { 40 | return value; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lineage-common/src/main/java/com/hw/lineage/common/enums/TaskStatus.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.common.enums; 20 | 21 | import com.hw.lineage.common.enums.basic.IntEnum; 22 | 23 | /** 24 | * @description: TaskStatus 25 | * @author: HamaWhite 26 | */ 27 | public enum TaskStatus implements IntEnum { 28 | 29 | FAILED(-1), 30 | SUCCESS(0), 31 | INIT(1), 32 | RUNNING(2), 33 | MODIFIED(3); 34 | 35 | private final int value; 36 | 37 | TaskStatus(int value) { 38 | this.value = value; 39 | } 40 | 41 | @Override 42 | public int value() { 43 | return value; 44 | } 45 | } -------------------------------------------------------------------------------- /lineage-common/src/main/java/com/hw/lineage/common/enums/audit/OperationStatus.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.common.enums.audit; 20 | 21 | import com.hw.lineage.common.enums.basic.IntEnum; 22 | 23 | /** 24 | * @description: OperationStatus 25 | * @author: HamaWhite 26 | */ 27 | public enum OperationStatus implements IntEnum { 28 | 29 | FAILED(-1), 30 | SUCCESS(0); 31 | 32 | private final int value; 33 | 34 | OperationStatus(int value) { 35 | this.value = value; 36 | } 37 | 38 | @Override 39 | public int value() { 40 | return value; 41 | } 42 | } -------------------------------------------------------------------------------- /lineage-common/src/main/java/com/hw/lineage/common/enums/basic/IntEnum.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.common.enums.basic; 20 | 21 | /** 22 | * @description: StringEnum 23 | * @author: HamaWhite 24 | */ 25 | public interface IntEnum> { 26 | 27 | int value(); 28 | } 29 | -------------------------------------------------------------------------------- /lineage-common/src/main/java/com/hw/lineage/common/enums/basic/StringEnum.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.common.enums.basic; 20 | 21 | /** 22 | * @description: StringEnum 23 | * @author: HamaWhite 24 | */ 25 | public interface StringEnum> { 26 | 27 | String value(); 28 | } 29 | -------------------------------------------------------------------------------- /lineage-common/src/main/java/com/hw/lineage/common/model/ColumnInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.common.model; 20 | 21 | import lombok.AllArgsConstructor; 22 | import lombok.Data; 23 | import lombok.NoArgsConstructor; 24 | import lombok.experimental.Accessors; 25 | 26 | /** 27 | * @description: ColumnInfo 28 | * @author: HamaWhite 29 | */ 30 | @Data 31 | @NoArgsConstructor 32 | @AllArgsConstructor 33 | @Accessors(chain = true) 34 | public class ColumnInfo { 35 | 36 | private String columnName; 37 | 38 | private String columnType; 39 | 40 | private String comment; 41 | 42 | private Boolean primaryKey; 43 | 44 | private String watermark; 45 | } 46 | -------------------------------------------------------------------------------- /lineage-common/src/main/java/com/hw/lineage/common/model/FunctionInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.common.model; 20 | 21 | import lombok.Data; 22 | import lombok.NoArgsConstructor; 23 | import lombok.experimental.Accessors; 24 | 25 | /** 26 | * @description: FunctionInfo 27 | * @author: HamaWhite 28 | */ 29 | @Data 30 | @NoArgsConstructor 31 | @Accessors(chain = true) 32 | public class FunctionInfo { 33 | 34 | private String functionName; 35 | 36 | private String invocation; 37 | 38 | private String className; 39 | 40 | private String descr; 41 | 42 | } 43 | -------------------------------------------------------------------------------- /lineage-common/src/main/java/com/hw/lineage/common/model/Property.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.common.model; 20 | 21 | import lombok.Data; 22 | 23 | import java.io.Serializable; 24 | 25 | /** 26 | * @description: Property 27 | * @author: HamaWhite 28 | */ 29 | @Data 30 | public class Property implements Serializable { 31 | 32 | private String name; 33 | 34 | private String value; 35 | 36 | private String description; 37 | 38 | private boolean custom = false; 39 | } 40 | -------------------------------------------------------------------------------- /lineage-common/src/main/java/com/hw/lineage/common/supplier/CustomSupplier.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.common.supplier; 20 | 21 | /** 22 | * @description: CustomSupplier 23 | * @author: HamaWhite 24 | */ 25 | @FunctionalInterface 26 | public interface CustomSupplier { 27 | 28 | void run(); 29 | } -------------------------------------------------------------------------------- /lineage-common/src/main/java/com/hw/lineage/common/util/Constant.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.common.util; 20 | 21 | /** 22 | * @description: Constant 23 | * @author: HamaWhite 24 | */ 25 | public class Constant { 26 | 27 | private Constant() { 28 | throw new IllegalStateException("Utility class"); 29 | } 30 | 31 | public static final String DELIMITER = "."; 32 | 33 | public static final int INITIAL_CAPACITY = 16; 34 | 35 | public static final String ILLEGAL_PARAM = "illegal param"; 36 | 37 | public static final Long DEFAULT_USER_ID = 0L; 38 | } 39 | -------------------------------------------------------------------------------- /lineage-flink1.14.x/src/main/resources/META-INF/services/com.hw.lineage.common.service.LineageService: -------------------------------------------------------------------------------- 1 | com.hw.lineage.flink.LineageServiceImpl 2 | -------------------------------------------------------------------------------- /lineage-flink1.14.x/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | ################################################################################ 18 | log4j.rootLogger=ERROR, console 19 | log4j.appender.console=org.apache.log4j.ConsoleAppender 20 | log4j.appender.console.layout=org.apache.log4j.PatternLayout 21 | log4j.appender.console.layout.ConversionPattern=%d %5p %t %-20c.%M:%L - %m%n 22 | log4j.logger.org.apache.calcite.rel.metadata=DEBUG 23 | log4j.logger.com.hw.lineage=DEBUG 24 | # Executing 'DROP FUNCTION IF EXISTS xxx' will print ERROR log, ignore it 25 | log4j.logger.org.apache.hadoop.hive.metastore=FATAL 26 | -------------------------------------------------------------------------------- /lineage-flink1.14.x/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /lineage-flink1.14.x/src/test/java/com/hw/lineage/flink/common/MySuffixFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.flink.common; 20 | 21 | import org.apache.flink.table.functions.ScalarFunction; 22 | 23 | /** 24 | * @description: MySuffixFunction 25 | * @author: HamaWhite 26 | */ 27 | public class MySuffixFunction extends ScalarFunction { 28 | 29 | public String eval(String input) { 30 | return input.concat("-HamaWhite"); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /lineage-flink1.16.x/src/main/resources/META-INF/services/com.hw.lineage.common.service.LineageService: -------------------------------------------------------------------------------- 1 | com.hw.lineage.flink.LineageServiceImpl 2 | -------------------------------------------------------------------------------- /lineage-flink1.16.x/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | ################################################################################ 18 | log4j.rootLogger=ERROR, console 19 | log4j.appender.console=org.apache.log4j.ConsoleAppender 20 | log4j.appender.console.layout=org.apache.log4j.PatternLayout 21 | log4j.appender.console.layout.ConversionPattern=%d %5p %t %-20c.%M:%L - %m%n 22 | log4j.logger.org.apache.calcite.rel.metadata=DEBUG 23 | log4j.logger.com.hw.lineage=DEBUG 24 | # Executing 'DROP FUNCTION IF EXISTS xxx' will print ERROR log, ignore it 25 | log4j.logger.org.apache.hadoop.hive.metastore=FATAL 26 | -------------------------------------------------------------------------------- /lineage-flink1.16.x/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /lineage-flink1.16.x/src/test/java/com/hw/lineage/flink/common/MySuffixFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.flink.common; 20 | 21 | import org.apache.flink.table.functions.ScalarFunction; 22 | 23 | /** 24 | * @description: MySuffixFunction 25 | * @author: HamaWhite 26 | */ 27 | public class MySuffixFunction extends ScalarFunction { 28 | 29 | public String eval(String input) { 30 | return input.concat("-HamaWhite"); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /lineage-loader/src/test/assemblies/test-plugin-a-assembly.xml: -------------------------------------------------------------------------------- 1 | 4 | test-plugin-a 5 | 6 | jar 7 | 8 | false 9 | 10 | 11 | 12 | ${project.build.testOutputDirectory} 13 | / 14 | 15 | 16 | com/hw/lineage/loader/service/impl/plugina/TestServiceA.class 17 | com/hw/lineage/loader/service/impl/plugina/DynamicClassA.class 18 | 19 | 20 | 21 | 22 | ${project.basedir}/src/test/resources/plugin-a 23 | /META-INF/services 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /lineage-loader/src/test/assemblies/test-plugin-b-assembly.xml: -------------------------------------------------------------------------------- 1 | 4 | test-plugin-b 5 | 6 | jar 7 | 8 | false 9 | 10 | 11 | 12 | ${project.build.testOutputDirectory} 13 | / 14 | 15 | 16 | com/hw/lineage/loader/service/impl/pluginb/TestServiceB.class 17 | com/hw/lineage/loader/service/impl/pluginb/OtherTestServiceB.class 18 | 19 | 20 | 21 | 22 | ${project.basedir}/src/test/resources/plugin-b 23 | /META-INF/services 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /lineage-loader/src/test/java/com/hw/lineage/loader/service/OtherTestService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.loader.service; 20 | 21 | import com.hw.lineage.common.plugin.Plugin; 22 | 23 | /** 24 | * @description: Another service interface for tests of plugin mechanism. 25 | * @author: HamaWhite 26 | */ 27 | public interface OtherTestService extends Plugin { 28 | 29 | String otherSay(String name); 30 | } 31 | -------------------------------------------------------------------------------- /lineage-loader/src/test/java/com/hw/lineage/loader/service/TestService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.loader.service; 20 | 21 | import com.hw.lineage.common.plugin.Plugin; 22 | 23 | /** 24 | * @description: Service interface for tests of plugin mechanism. 25 | * @author: HamaWhite 26 | */ 27 | public interface TestService extends Plugin { 28 | 29 | String say(String name); 30 | } 31 | -------------------------------------------------------------------------------- /lineage-loader/src/test/java/com/hw/lineage/loader/service/impl/plugina/DynamicClassA.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.loader.service.impl.plugina; 20 | 21 | import com.hw.lineage.loader.service.TestService; 22 | 23 | /** 24 | * This class exists in the test to validate that dynamic classloading ({@link 25 | * Class#forName(String)} works inside of plugin code. 26 | * 27 | * @description: DynamicClassA 28 | * @author: HamaWhite 29 | */ 30 | public class DynamicClassA implements TestService { 31 | 32 | @Override 33 | public String say(String name) { 34 | return "Dynamic-A-" + name; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lineage-loader/src/test/java/com/hw/lineage/loader/service/impl/pluginb/OtherTestServiceB.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.loader.service.impl.pluginb; 20 | 21 | import com.hw.lineage.loader.service.OtherTestService; 22 | 23 | /** 24 | * @description: Implementation of {@link OtherTestService}. 25 | * @author: HamaWhite 26 | */ 27 | public class OtherTestServiceB implements OtherTestService { 28 | 29 | public String otherSay(String name) { 30 | return "Other-B-" + name; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lineage-loader/src/test/java/com/hw/lineage/loader/service/impl/pluginb/TestServiceB.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.loader.service.impl.pluginb; 20 | 21 | import com.hw.lineage.loader.service.TestService; 22 | 23 | /** 24 | * @description: Second implementation of {@link TestService}. 25 | * @author: HamaWhite 26 | */ 27 | public class TestServiceB implements TestService { 28 | 29 | @Override 30 | public String say(String name) { 31 | return "B-" + name; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lineage-loader/src/test/resources/plugin-a/com.hw.lineage.loader.service.TestService: -------------------------------------------------------------------------------- 1 | com.hw.lineage.loader.service.impl.plugina.TestServiceA 2 | -------------------------------------------------------------------------------- /lineage-loader/src/test/resources/plugin-b/com.hw.lineage.loader.service.OtherTestService: -------------------------------------------------------------------------------- 1 | com.hw.lineage.loader.service.impl.pluginb.OtherTestServiceB 2 | -------------------------------------------------------------------------------- /lineage-loader/src/test/resources/plugin-b/com.hw.lineage.loader.service.TestService: -------------------------------------------------------------------------------- 1 | com.hw.lineage.loader.service.impl.pluginb.TestServiceB 2 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-application/src/main/java/com/hw/lineage/server/application/command/catalog/CreateDatabaseCmd.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.application.command.catalog; 20 | 21 | import io.swagger.annotations.ApiModelProperty; 22 | import lombok.Data; 23 | 24 | import javax.validation.constraints.NotBlank; 25 | 26 | import java.io.Serializable; 27 | 28 | /** 29 | * @description: CreateDatabaseCmd 30 | * @author: HamaWhite 31 | */ 32 | @Data 33 | public class CreateDatabaseCmd implements Serializable { 34 | 35 | @ApiModelProperty(hidden = true) 36 | private Long catalogId; 37 | 38 | @NotBlank 39 | private String database; 40 | 41 | private String comment; 42 | } 43 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-application/src/main/java/com/hw/lineage/server/application/command/catalog/CreateTableCmd.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.application.command.catalog; 20 | 21 | import io.swagger.annotations.ApiModelProperty; 22 | import lombok.Data; 23 | 24 | import javax.validation.constraints.NotBlank; 25 | 26 | import java.io.Serializable; 27 | 28 | /** 29 | * @description: CreateTableCmd 30 | * @author: HamaWhite 31 | */ 32 | @Data 33 | public class CreateTableCmd implements Serializable { 34 | 35 | @ApiModelProperty(hidden = true) 36 | private Long catalogId; 37 | 38 | @ApiModelProperty(hidden = true) 39 | private String database; 40 | 41 | @NotBlank 42 | private String ddl; 43 | } 44 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-application/src/main/java/com/hw/lineage/server/application/command/function/ParseFunctionCmd.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.application.command.function; 20 | 21 | import lombok.Data; 22 | 23 | import javax.validation.constraints.NotBlank; 24 | import javax.validation.constraints.NotNull; 25 | 26 | import java.io.Serializable; 27 | 28 | /** 29 | * @description: ParseFunctionCmd 30 | * @author: HamaWhite 31 | */ 32 | @Data 33 | public class ParseFunctionCmd implements Serializable { 34 | 35 | @NotNull 36 | private Long pluginId; 37 | @NotBlank 38 | private String functionPath; 39 | } 40 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-application/src/main/java/com/hw/lineage/server/application/command/function/UpdateFunctionCmd.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.application.command.function; 20 | 21 | import com.hw.lineage.server.domain.query.BasicCriteria; 22 | 23 | import io.swagger.annotations.ApiModelProperty; 24 | import lombok.Data; 25 | import lombok.ToString; 26 | 27 | /** 28 | * @description: UpdateFunctionCmd 29 | * @author: HamaWhite 30 | */ 31 | @Data 32 | @ToString(callSuper = true) 33 | public class UpdateFunctionCmd extends BasicCriteria { 34 | 35 | @ApiModelProperty(hidden = true) 36 | private Long functionId; 37 | 38 | private String invocation; 39 | 40 | private String descr; 41 | } 42 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-application/src/main/java/com/hw/lineage/server/application/command/permission/CreatePermissionCmd.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.application.command.permission; 20 | 21 | import lombok.Data; 22 | 23 | import javax.validation.constraints.NotBlank; 24 | 25 | import java.io.Serializable; 26 | 27 | /** 28 | * @description: CreatePermissionCmd 29 | * @author: HamaWhite 30 | */ 31 | @Data 32 | public class CreatePermissionCmd implements Serializable { 33 | 34 | @NotBlank 35 | private String permissionGroup; 36 | 37 | @NotBlank 38 | private String permissionName; 39 | 40 | @NotBlank 41 | private String permissionCode; 42 | } 43 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-application/src/main/java/com/hw/lineage/server/application/command/permission/UpdatePermissionCmd.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.application.command.permission; 20 | 21 | import io.swagger.annotations.ApiModelProperty; 22 | import lombok.Data; 23 | 24 | import java.io.Serializable; 25 | 26 | /** 27 | * @description: UpdatePermissionCmd 28 | * @author: HamaWhite 29 | */ 30 | @Data 31 | public class UpdatePermissionCmd implements Serializable { 32 | 33 | @ApiModelProperty(hidden = true) 34 | private Long permissionId; 35 | 36 | private String permissionGroup; 37 | 38 | private String permissionName; 39 | 40 | private String permissionCode; 41 | } 42 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-application/src/main/java/com/hw/lineage/server/application/command/plugin/UpdatePluginCmd.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.application.command.plugin; 20 | 21 | import com.hw.lineage.server.domain.query.BasicCriteria; 22 | 23 | import io.swagger.annotations.ApiModelProperty; 24 | import lombok.Data; 25 | import lombok.ToString; 26 | 27 | /** 28 | * @description: UpdatePluginCmd 29 | * @author: HamaWhite 30 | */ 31 | @Data 32 | @ToString(callSuper = true) 33 | public class UpdatePluginCmd extends BasicCriteria { 34 | 35 | @ApiModelProperty(hidden = true) 36 | private Long pluginId; 37 | 38 | private String pluginName; 39 | 40 | private String descr; 41 | } 42 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-application/src/main/java/com/hw/lineage/server/application/command/role/CreateRoleCmd.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.application.command.role; 20 | 21 | import lombok.Data; 22 | 23 | import javax.validation.constraints.NotBlank; 24 | 25 | import java.io.Serializable; 26 | 27 | /** 28 | * @description: CreateRoleCmd 29 | * @author: HamaWhite 30 | */ 31 | @Data 32 | public class CreateRoleCmd implements Serializable { 33 | 34 | @NotBlank 35 | private String roleName; 36 | } 37 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-application/src/main/java/com/hw/lineage/server/application/command/role/UpdateRoleCmd.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.application.command.role; 20 | 21 | import io.swagger.annotations.ApiModelProperty; 22 | import lombok.Data; 23 | 24 | import java.io.Serializable; 25 | 26 | /** 27 | * @description: UpdateRoleCmd 28 | * @author: HamaWhite 29 | */ 30 | @Data 31 | public class UpdateRoleCmd implements Serializable { 32 | 33 | @ApiModelProperty(hidden = true) 34 | private Long roleId; 35 | 36 | private String roleName; 37 | } 38 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-application/src/main/java/com/hw/lineage/server/application/command/storage/DeleteStorageCmd.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.application.command.storage; 20 | 21 | import lombok.Data; 22 | 23 | import javax.validation.constraints.NotBlank; 24 | 25 | import java.io.Serializable; 26 | 27 | /** 28 | * @description: DeleteStorageCmd 29 | * @author: HamaWhite 30 | */ 31 | @Data 32 | public class DeleteStorageCmd implements Serializable { 33 | 34 | @NotBlank 35 | private String filePath; 36 | 37 | } 38 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-application/src/main/java/com/hw/lineage/server/application/command/user/CreateUserCmd.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.application.command.user; 20 | 21 | import lombok.Data; 22 | 23 | import javax.validation.constraints.NotBlank; 24 | 25 | import java.io.Serializable; 26 | 27 | /** 28 | * @description: CreateUserCmd 29 | * @author: HamaWhite 30 | */ 31 | @Data 32 | public class CreateUserCmd implements Serializable { 33 | 34 | @NotBlank 35 | private String username; 36 | 37 | @NotBlank 38 | private String password; 39 | } 40 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-application/src/main/java/com/hw/lineage/server/application/command/user/UpdateUserCmd.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.application.command.user; 20 | 21 | import io.swagger.annotations.ApiModelProperty; 22 | import lombok.Data; 23 | 24 | import java.io.Serializable; 25 | 26 | /** 27 | * @description: UpdateUserCmd 28 | * @author: HamaWhite 29 | */ 30 | @Data 31 | public class UpdateUserCmd implements Serializable { 32 | 33 | @ApiModelProperty(hidden = true) 34 | private Long userId; 35 | 36 | private String username; 37 | 38 | private String password; 39 | 40 | private Boolean locked; 41 | } 42 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-application/src/main/java/com/hw/lineage/server/application/dto/FunctionDTO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.application.dto; 20 | 21 | import com.hw.lineage.server.application.dto.basic.BasicDTO; 22 | 23 | import lombok.Data; 24 | 25 | /** 26 | * @description: FunctionDTO 27 | * @author: HamaWhite 28 | */ 29 | @Data 30 | public class FunctionDTO extends BasicDTO { 31 | 32 | private Long functionId; 33 | 34 | private Long catalogId; 35 | 36 | private String functionName; 37 | 38 | private String database; 39 | 40 | private String invocation; 41 | 42 | private String functionPath; 43 | 44 | private String className; 45 | 46 | private String descr; 47 | } 48 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-application/src/main/java/com/hw/lineage/server/application/dto/PermissionDTO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.application.dto; 20 | 21 | import com.hw.lineage.server.application.dto.basic.RootDTO; 22 | 23 | import lombok.Data; 24 | 25 | /** 26 | * @description: PermissionDTO 27 | * @author: HamaWhite 28 | */ 29 | @Data 30 | public class PermissionDTO extends RootDTO { 31 | 32 | private Long permissionId; 33 | 34 | private String permissionGroup; 35 | 36 | private String permissionName; 37 | 38 | private String permissionCode; 39 | } 40 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-application/src/main/java/com/hw/lineage/server/application/dto/PluginDTO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.application.dto; 20 | 21 | import com.hw.lineage.server.application.dto.basic.BasicDTO; 22 | 23 | import lombok.Data; 24 | 25 | /** 26 | * @description: PluginDTO 27 | * @author: HamaWhite 28 | */ 29 | @Data 30 | public class PluginDTO extends BasicDTO { 31 | 32 | private Long pluginId; 33 | 34 | private String pluginName; 35 | 36 | private String pluginCode; 37 | 38 | private String descr; 39 | 40 | private Boolean defaultPlugin; 41 | } 42 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-application/src/main/java/com/hw/lineage/server/application/dto/RoleDTO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.application.dto; 20 | 21 | import com.hw.lineage.server.application.dto.basic.RootDTO; 22 | 23 | import lombok.Data; 24 | 25 | import java.util.List; 26 | 27 | /** 28 | * @description: RoleDTO 29 | * @author: HamaWhite 30 | */ 31 | @Data 32 | public class RoleDTO extends RootDTO { 33 | 34 | private Long roleId; 35 | 36 | private String roleName; 37 | 38 | private List permissionList; 39 | 40 | } 41 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-application/src/main/java/com/hw/lineage/server/application/dto/TableDTO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.application.dto; 20 | 21 | import com.hw.lineage.common.enums.TableKind; 22 | 23 | import lombok.AllArgsConstructor; 24 | import lombok.Data; 25 | 26 | /** 27 | * @description: TableDTO 28 | * @author: HamaWhite 29 | */ 30 | @Data 31 | @AllArgsConstructor 32 | public class TableDTO { 33 | 34 | private String tableName; 35 | 36 | private TableKind tableKind; 37 | } 38 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-application/src/main/java/com/hw/lineage/server/application/dto/TaskFunctionDTO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.application.dto; 20 | 21 | import lombok.Data; 22 | 23 | import java.io.Serializable; 24 | 25 | /** 26 | * @description: TaskFunctionDTO 27 | * @author: HamaWhite 28 | */ 29 | @Data 30 | public class TaskFunctionDTO implements Serializable { 31 | 32 | private Long taskId; 33 | 34 | private Long sqlId; 35 | 36 | private Long functionId; 37 | 38 | private String catalogName; 39 | 40 | private String database; 41 | 42 | private String functionName; 43 | 44 | private Long createTime; 45 | 46 | private Boolean invalid; 47 | } 48 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-application/src/main/java/com/hw/lineage/server/application/dto/TaskSyntaxDTO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.application.dto; 20 | 21 | import com.hw.lineage.common.enums.TaskStatus; 22 | 23 | import lombok.Data; 24 | 25 | import java.util.List; 26 | 27 | /** 28 | * @description: TaskSyntaxDTO 29 | * @author: HamaWhite 30 | */ 31 | @Data 32 | public class TaskSyntaxDTO { 33 | 34 | private Long taskId; 35 | 36 | private String taskName; 37 | 38 | private TaskStatus taskStatus; 39 | 40 | private String taskLog; 41 | 42 | private List taskSqlList; 43 | } 44 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-application/src/main/java/com/hw/lineage/server/application/dto/basic/BasicDTO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.application.dto.basic; 20 | 21 | import lombok.Data; 22 | 23 | /** 24 | * @description: BasicDTO 25 | * @author: HamaWhite 26 | */ 27 | @Data 28 | public abstract class BasicDTO extends RootDTO { 29 | 30 | private Long createUserId; 31 | 32 | private Long modifyUserId; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-application/src/main/java/com/hw/lineage/server/application/dto/basic/RootDTO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.application.dto.basic; 20 | 21 | import lombok.Data; 22 | 23 | import java.io.Serializable; 24 | 25 | /** 26 | * @description: RootDTO 27 | * @author: HamaWhite 28 | */ 29 | @Data 30 | public abstract class RootDTO implements Serializable { 31 | 32 | private Long createTime; 33 | 34 | private Long modifyTime; 35 | } 36 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-application/src/main/java/com/hw/lineage/server/application/dto/graph/link/TableLink.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.application.dto.graph.link; 20 | 21 | import com.hw.lineage.server.application.dto.graph.link.basic.Link; 22 | 23 | import lombok.Data; 24 | 25 | /** 26 | * @description: TableLink 27 | * @author: HamaWhite 28 | */ 29 | @Data 30 | public class TableLink extends Link { 31 | 32 | private String sqlSource; 33 | 34 | public TableLink(String id, String relU, String relV, String sqlSource) { 35 | super(id, relU, relV); 36 | this.sqlSource = sqlSource; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-application/src/main/java/com/hw/lineage/server/application/dto/graph/link/basic/Link.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.application.dto.graph.link.basic; 20 | 21 | import lombok.Data; 22 | import lombok.NoArgsConstructor; 23 | 24 | /** 25 | * @description: Link 26 | * @author: HamaWhite 27 | */ 28 | @Data 29 | @NoArgsConstructor 30 | public abstract class Link { 31 | 32 | private String id; 33 | 34 | private String relU; 35 | 36 | private String relV; 37 | 38 | public Link(String id, String relU, String relV) { 39 | this.id = id; 40 | this.relU = relU; 41 | this.relV = relV; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-application/src/main/java/com/hw/lineage/server/application/dto/graph/vertex/Column.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.application.dto.graph.vertex; 20 | 21 | import lombok.AllArgsConstructor; 22 | import lombok.Data; 23 | 24 | /** 25 | * @description: Column 26 | * @author: HamaWhite 27 | */ 28 | @Data 29 | @AllArgsConstructor 30 | public class Column { 31 | 32 | private String id; 33 | 34 | private String name; 35 | 36 | private Integer childrenCnt; 37 | } 38 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-application/src/main/java/com/hw/lineage/server/application/dto/graph/vertex/Vertex.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.application.dto.graph.vertex; 20 | 21 | import lombok.Data; 22 | import lombok.experimental.Accessors; 23 | 24 | import java.util.List; 25 | 26 | /** 27 | * @description: Vertex 28 | * @author: HamaWhite 29 | */ 30 | @Data 31 | @Accessors(chain = true) 32 | public class Vertex { 33 | 34 | private String id; 35 | 36 | private String name; 37 | 38 | private List columns; 39 | 40 | private Boolean hasUpstream; 41 | 42 | private Boolean hasDownstream; 43 | 44 | private String tableIcon; 45 | 46 | private Integer childrenCnt; 47 | } 48 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-application/src/main/java/com/hw/lineage/server/application/service/TableService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.application.service; 20 | 21 | /** 22 | * @description: TableService 23 | * @author: HamaWhite 24 | */ 25 | public interface TableService { 26 | 27 | /** 28 | * Create the tables of memory type catalog to flink when the application start 29 | */ 30 | void createMemoryTables(); 31 | } 32 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/entity/Role.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.entity; 20 | 21 | import com.hw.lineage.server.domain.entity.basic.RootEntity; 22 | import com.hw.lineage.server.domain.repository.basic.Entity; 23 | import com.hw.lineage.server.domain.vo.RoleId; 24 | 25 | import lombok.Data; 26 | import lombok.experimental.Accessors; 27 | 28 | /** 29 | * @description: Role 30 | * @author: HamaWhite 31 | */ 32 | @Data 33 | @Accessors(chain = true) 34 | public class Role extends RootEntity implements Entity { 35 | 36 | private RoleId roleId; 37 | 38 | private String roleName; 39 | } 40 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/entity/basic/BasicEntity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.entity.basic; 20 | 21 | import lombok.Data; 22 | import lombok.experimental.Accessors; 23 | 24 | /** 25 | * @description: BasicEntity 26 | * @author: HamaWhite 27 | */ 28 | @Data 29 | @Accessors(chain = true) 30 | public abstract class BasicEntity extends RootEntity { 31 | 32 | private Long createUserId; 33 | 34 | private Long modifyUserId; 35 | } 36 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/entity/basic/RootEntity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.entity.basic; 20 | 21 | import lombok.Data; 22 | import lombok.experimental.Accessors; 23 | 24 | /** 25 | * @description: RootEntity 26 | * @author: HamaWhite 27 | */ 28 | @Data 29 | @Accessors(chain = true) 30 | public abstract class RootEntity { 31 | 32 | private Long createTime; 33 | 34 | private Long modifyTime; 35 | 36 | private Boolean invalid; 37 | } 38 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/facade/AvatarFacade.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.facade; 20 | 21 | /** 22 | * @description: AvatarFacade 23 | * @author: HamaWhite 24 | */ 25 | public interface AvatarFacade { 26 | 27 | byte[] generateAvatar(long code); 28 | } 29 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/graph/column/ColumnNode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.graph.column; 20 | 21 | import com.hw.lineage.server.domain.graph.basic.Node; 22 | 23 | import lombok.Data; 24 | import lombok.EqualsAndHashCode; 25 | import lombok.ToString; 26 | 27 | /** 28 | * @description: ColumnNode 29 | * @author: HamaWhite 30 | */ 31 | @Data 32 | @ToString(callSuper = true) 33 | @EqualsAndHashCode(callSuper = true) 34 | public class ColumnNode extends Node { 35 | 36 | private Integer tableNodeId; 37 | 38 | public ColumnNode(Integer nodeId, String nodeName, Integer tableNodeId) { 39 | super(nodeId, nodeName); 40 | this.tableNodeId = tableNodeId; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/graph/table/TableGraph.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.graph.table; 20 | 21 | import com.hw.lineage.server.domain.graph.basic.Graph; 22 | 23 | import lombok.Data; 24 | import lombok.EqualsAndHashCode; 25 | import lombok.NoArgsConstructor; 26 | 27 | import java.util.Map; 28 | import java.util.Set; 29 | 30 | /** 31 | * @description: TableGraph 32 | * @author: HamaWhite 33 | */ 34 | 35 | @Data 36 | @NoArgsConstructor 37 | @EqualsAndHashCode(callSuper = true) 38 | public class TableGraph extends Graph { 39 | 40 | public TableGraph(Map nodeMap, Set edgeSet) { 41 | super(nodeMap, edgeSet); 42 | } 43 | } -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/query/BasicCriteria.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.query; 20 | 21 | import io.swagger.annotations.ApiModelProperty; 22 | import lombok.Data; 23 | 24 | import javax.validation.constraints.NotNull; 25 | 26 | import java.io.Serializable; 27 | 28 | /** 29 | * @description: BasicCriteria 30 | * @author: HamaWhite 31 | */ 32 | @Data 33 | public class BasicCriteria implements Serializable { 34 | 35 | @NotNull 36 | @ApiModelProperty(hidden = true) 37 | private Long userId; 38 | } 39 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/query/OrderCriteria.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.query; 20 | 21 | import lombok.Data; 22 | 23 | import java.io.Serializable; 24 | 25 | /** 26 | * @description: OrderCriteria 27 | * @author: HamaWhite 28 | */ 29 | @Data 30 | public class OrderCriteria implements Serializable { 31 | 32 | /** 33 | * sort field, default createTime 34 | */ 35 | private String sortColumn = "createTime"; 36 | 37 | private boolean descending = false; 38 | } 39 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/query/PageOrderCriteria.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.query; 20 | 21 | import lombok.Data; 22 | import lombok.ToString; 23 | 24 | /** 25 | * @description: PageOrderCriteria 26 | * @author: HamaWhite 27 | */ 28 | @Data 29 | @ToString(callSuper = true) 30 | public class PageOrderCriteria extends OrderCriteria { 31 | 32 | private Integer pageNum = 1; 33 | private Integer pageSize = 10; 34 | } 35 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/query/catalog/CatalogCheck.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.query.catalog; 20 | 21 | import lombok.Data; 22 | 23 | import javax.validation.constraints.NotNull; 24 | 25 | import java.io.Serializable; 26 | 27 | /** 28 | * @description: CatalogCheck 29 | * @author: HamaWhite 30 | */ 31 | @Data 32 | public class CatalogCheck implements Serializable { 33 | 34 | @NotNull 35 | private String catalogName; 36 | } 37 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/query/catalog/CatalogEntry.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.query.catalog; 20 | 21 | import lombok.Data; 22 | 23 | /** 24 | * @description: CatalogEntry 25 | * @author: HamaWhite 26 | */ 27 | @Data 28 | public class CatalogEntry { 29 | 30 | private Long pluginId; 31 | 32 | private String pluginCode; 33 | 34 | private Long catalogId; 35 | 36 | private String catalogName; 37 | 38 | } 39 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/query/catalog/CatalogQuery.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.query.catalog; 20 | 21 | import com.hw.lineage.common.enums.CatalogType; 22 | import com.hw.lineage.server.domain.query.PageOrderCriteria; 23 | 24 | import lombok.Data; 25 | import lombok.ToString; 26 | 27 | /** 28 | * @description: CatalogQuery 29 | * @author: HamaWhite 30 | */ 31 | @Data 32 | @ToString(callSuper = true) 33 | public class CatalogQuery extends PageOrderCriteria { 34 | 35 | private String catalogName; 36 | 37 | private CatalogType catalogType; 38 | } 39 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/query/function/FunctionCheck.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.query.function; 20 | 21 | import io.swagger.annotations.ApiModelProperty; 22 | import lombok.Data; 23 | 24 | import javax.validation.constraints.NotNull; 25 | 26 | import java.io.Serializable; 27 | 28 | /** 29 | * @description: FunctionCheck 30 | * @author: HamaWhite 31 | */ 32 | @Data 33 | public class FunctionCheck implements Serializable { 34 | 35 | @ApiModelProperty(hidden = true) 36 | private Long catalogId; 37 | 38 | @ApiModelProperty(hidden = true) 39 | private String database; 40 | 41 | @NotNull 42 | private String functionName; 43 | } 44 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/query/function/FunctionEntry.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.query.function; 20 | 21 | import lombok.Data; 22 | import lombok.NoArgsConstructor; 23 | 24 | /** 25 | * @description: FunctionEntry 26 | * @author: HamaWhite 27 | */ 28 | @Data 29 | @NoArgsConstructor 30 | public class FunctionEntry { 31 | 32 | private String pluginCode; 33 | 34 | private String catalogName; 35 | 36 | private String database; 37 | 38 | private Long functionId; 39 | 40 | private String functionName; 41 | } 42 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/query/function/FunctionQuery.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.query.function; 20 | 21 | import com.hw.lineage.server.domain.query.PageOrderCriteria; 22 | 23 | import io.swagger.annotations.ApiModelProperty; 24 | import lombok.Data; 25 | import lombok.ToString; 26 | 27 | /** 28 | * @description: FunctionQuery 29 | * @author: HamaWhite 30 | */ 31 | @Data 32 | @ToString(callSuper = true) 33 | public class FunctionQuery extends PageOrderCriteria { 34 | 35 | @ApiModelProperty(hidden = true) 36 | private Long catalogId; 37 | 38 | @ApiModelProperty(hidden = true) 39 | private String database; 40 | 41 | private String functionName; 42 | } -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/query/function/FunctionTaskQuery.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.query.function; 20 | 21 | import com.hw.lineage.server.domain.query.PageOrderCriteria; 22 | 23 | import io.swagger.annotations.ApiModelProperty; 24 | import lombok.Data; 25 | import lombok.ToString; 26 | 27 | /** 28 | * @description: FunctionTaskQuery 29 | * @author: HamaWhite 30 | */ 31 | @Data 32 | @ToString(callSuper = true) 33 | public class FunctionTaskQuery extends PageOrderCriteria { 34 | 35 | @ApiModelProperty(hidden = true) 36 | private Long functionId; 37 | } -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/query/function/dto/FunctionTaskDTO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.query.function.dto; 20 | 21 | import lombok.Data; 22 | 23 | import java.io.Serializable; 24 | import java.util.List; 25 | 26 | /** 27 | * @description: FunctionTaskDTO 28 | * @author: HamaWhite 29 | */ 30 | @Data 31 | public class FunctionTaskDTO implements Serializable { 32 | 33 | private Long taskId; 34 | 35 | private String taskName; 36 | 37 | private List sqlIdList; 38 | 39 | private Long createTime; 40 | } 41 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/query/permission/PermissionCheck.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.query.permission; 20 | 21 | import lombok.Data; 22 | 23 | import java.io.Serializable; 24 | 25 | /** 26 | * @description: PermissionCheck 27 | * @author: HamaWhite 28 | */ 29 | @Data 30 | public class PermissionCheck implements Serializable { 31 | 32 | private String permissionName; 33 | 34 | private String permissionCode; 35 | } 36 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/query/permission/PermissionQuery.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.query.permission; 20 | 21 | import com.hw.lineage.server.domain.query.PageOrderCriteria; 22 | 23 | import lombok.Data; 24 | import lombok.ToString; 25 | 26 | /** 27 | * @description: PermissionQuery 28 | * @author: HamaWhite 29 | */ 30 | @Data 31 | @ToString(callSuper = true) 32 | public class PermissionQuery extends PageOrderCriteria { 33 | 34 | private String permissionName; 35 | 36 | private String permissionCode; 37 | } -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/query/plugin/PluginCheck.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.query.plugin; 20 | 21 | import lombok.Data; 22 | 23 | import java.io.Serializable; 24 | 25 | /** 26 | * @description: PluginCheck 27 | * @author: HamaWhite 28 | */ 29 | @Data 30 | public class PluginCheck implements Serializable { 31 | 32 | private String pluginName; 33 | 34 | private String pluginCode; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/query/plugin/PluginQuery.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.query.plugin; 20 | 21 | import com.hw.lineage.server.domain.query.PageOrderCriteria; 22 | 23 | import lombok.Data; 24 | import lombok.ToString; 25 | 26 | /** 27 | * @description: PluginQuery 28 | * @author: HamaWhite 29 | */ 30 | @Data 31 | @ToString(callSuper = true) 32 | public class PluginQuery extends PageOrderCriteria { 33 | 34 | private String pluginName; 35 | 36 | private Boolean defaultPlugin; 37 | } -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/query/role/RoleCheck.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.query.role; 20 | 21 | import lombok.Data; 22 | 23 | import javax.validation.constraints.NotNull; 24 | 25 | import java.io.Serializable; 26 | 27 | /** 28 | * @description: RoleCheck 29 | * @author: HamaWhite 30 | */ 31 | @Data 32 | public class RoleCheck implements Serializable { 33 | 34 | @NotNull 35 | private String roleName; 36 | } 37 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/query/role/RoleQuery.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.query.role; 20 | 21 | import com.hw.lineage.server.domain.query.PageOrderCriteria; 22 | 23 | import lombok.Data; 24 | import lombok.ToString; 25 | 26 | /** 27 | * @description: RoleQuery 28 | * @author: HamaWhite 29 | */ 30 | @Data 31 | @ToString(callSuper = true) 32 | public class RoleQuery extends PageOrderCriteria { 33 | 34 | private String roleName; 35 | } -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/query/task/TaskCheck.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.query.task; 20 | 21 | import lombok.Data; 22 | 23 | import javax.validation.constraints.NotNull; 24 | 25 | import java.io.Serializable; 26 | 27 | /** 28 | * @description: TaskCheck 29 | * @author: HamaWhite 30 | */ 31 | @Data 32 | public class TaskCheck implements Serializable { 33 | 34 | @NotNull 35 | private String taskName; 36 | } 37 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/query/task/TaskFunctionQuery.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.query.task; 20 | 21 | import com.hw.lineage.server.domain.query.PageOrderCriteria; 22 | 23 | import io.swagger.annotations.ApiModelProperty; 24 | import lombok.Data; 25 | import lombok.ToString; 26 | 27 | /** 28 | * @description: TaskFunctionQuery 29 | * @author: HamaWhite 30 | */ 31 | @Data 32 | @ToString(callSuper = true) 33 | public class TaskFunctionQuery extends PageOrderCriteria { 34 | 35 | @ApiModelProperty(hidden = true) 36 | private Long taskId; 37 | } 38 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/query/task/TaskQuery.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.query.task; 20 | 21 | import com.hw.lineage.server.domain.query.PageOrderCriteria; 22 | 23 | import lombok.Data; 24 | import lombok.ToString; 25 | 26 | /** 27 | * @description: TaskQuery 28 | * @author: HamaWhite 29 | */ 30 | @Data 31 | @ToString(callSuper = true) 32 | public class TaskQuery extends PageOrderCriteria { 33 | 34 | private String taskName; 35 | } 36 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/query/user/UserCheck.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.query.user; 20 | 21 | import lombok.Data; 22 | 23 | import javax.validation.constraints.NotNull; 24 | 25 | import java.io.Serializable; 26 | 27 | /** 28 | * @description: UserCheck 29 | * @author: HamaWhite 30 | */ 31 | @Data 32 | public class UserCheck implements Serializable { 33 | 34 | @NotNull 35 | private String username; 36 | } 37 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/query/user/UserQuery.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.query.user; 20 | 21 | import com.hw.lineage.server.domain.query.PageOrderCriteria; 22 | 23 | import lombok.Data; 24 | import lombok.ToString; 25 | 26 | /** 27 | * @description: UserQuery 28 | * @author: HamaWhite 29 | */ 30 | @Data 31 | @ToString(callSuper = true) 32 | public class UserQuery extends PageOrderCriteria { 33 | 34 | private String username; 35 | } -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/repository/AuditRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.repository; 20 | 21 | import com.github.pagehelper.PageInfo; 22 | import com.hw.lineage.server.domain.entity.Audit; 23 | import com.hw.lineage.server.domain.query.audit.AuditQuery; 24 | import com.hw.lineage.server.domain.repository.basic.Repository; 25 | import com.hw.lineage.server.domain.vo.AuditId; 26 | 27 | /** 28 | * @description: AuditRepository 29 | * @author: HamaWhite 30 | */ 31 | public interface AuditRepository extends Repository { 32 | 33 | PageInfo findAll(AuditQuery auditQuery); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/repository/TableRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.repository; 20 | 21 | import com.hw.lineage.server.domain.entity.Table; 22 | import com.hw.lineage.server.domain.repository.basic.Repository; 23 | import com.hw.lineage.server.domain.vo.TableId; 24 | 25 | import java.util.List; 26 | 27 | /** 28 | * @description: TableRepository 29 | * @author: HamaWhite 30 | */ 31 | public interface TableRepository extends Repository { 32 | 33 | List findMemory(); 34 | } 35 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/repository/basic/Entity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.repository.basic; 20 | 21 | /** 22 | * @description: Marker interface of entity 23 | * @author: HamaWhite 24 | */ 25 | public interface Entity { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/repository/basic/Identifier.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.repository.basic; 20 | 21 | import java.io.Serializable; 22 | 23 | /** 24 | * @description: Marker interface of ID type Domain Primitive 25 | * @author: HamaWhite 26 | */ 27 | public interface Identifier extends Serializable { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/service/TaskDomainService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.service; 20 | 21 | import com.hw.lineage.server.domain.entity.task.Task; 22 | 23 | /** 24 | * @description: TaskDomainService 25 | * @author: HamaWhite 26 | */ 27 | public interface TaskDomainService { 28 | 29 | void generateTaskSql(Task task); 30 | } 31 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/vo/AuditId.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.vo; 20 | 21 | import com.hw.lineage.server.domain.repository.basic.Identifier; 22 | 23 | import lombok.Data; 24 | 25 | /** 26 | * @description: AuditId 27 | * @author: HamaWhite 28 | */ 29 | @Data 30 | public class AuditId implements Identifier { 31 | 32 | private final Long value; 33 | 34 | public AuditId(Long value) { 35 | this.value = value; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/vo/CatalogId.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.vo; 20 | 21 | import com.hw.lineage.server.domain.repository.basic.Identifier; 22 | 23 | import lombok.Data; 24 | 25 | /** 26 | * @description: CatalogId 27 | * @author: HamaWhite 28 | */ 29 | @Data 30 | public class CatalogId implements Identifier { 31 | 32 | private final Long value; 33 | 34 | public CatalogId(Long value) { 35 | this.value = value; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/vo/FunctionId.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.vo; 20 | 21 | import com.hw.lineage.server.domain.repository.basic.Identifier; 22 | 23 | import lombok.Data; 24 | 25 | /** 26 | * @description: FunctionId 27 | * @author: HamaWhite 28 | */ 29 | @Data 30 | public class FunctionId implements Identifier { 31 | 32 | private final Long value; 33 | 34 | public FunctionId(Long value) { 35 | this.value = value; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/vo/PermissionId.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.vo; 20 | 21 | import com.hw.lineage.server.domain.repository.basic.Identifier; 22 | 23 | import lombok.Data; 24 | 25 | /** 26 | * @description: PermissionId 27 | * @author: HamaWhite 28 | */ 29 | @Data 30 | public class PermissionId implements Identifier { 31 | 32 | private final Long value; 33 | 34 | public PermissionId(Long value) { 35 | this.value = value; 36 | } 37 | } -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/vo/PluginId.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.vo; 20 | 21 | import com.hw.lineage.server.domain.repository.basic.Identifier; 22 | 23 | import lombok.Data; 24 | 25 | /** 26 | * @description: PluginId 27 | * @author: HamaWhite 28 | */ 29 | @Data 30 | public class PluginId implements Identifier { 31 | 32 | private final Long value; 33 | 34 | public PluginId(Long value) { 35 | this.value = value; 36 | } 37 | } -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/vo/RoleId.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.vo; 20 | 21 | import com.hw.lineage.server.domain.repository.basic.Identifier; 22 | 23 | import lombok.Data; 24 | 25 | /** 26 | * @description: RoleId 27 | * @author: HamaWhite 28 | */ 29 | @Data 30 | public class RoleId implements Identifier { 31 | 32 | private final Long value; 33 | 34 | public RoleId(Long value) { 35 | this.value = value; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/vo/SqlId.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.vo; 20 | 21 | import lombok.Data; 22 | 23 | /** 24 | * @description: SqlId 25 | * @author: HamaWhite 26 | */ 27 | @Data 28 | public class SqlId { 29 | 30 | private final Long value; 31 | 32 | public SqlId(Long value) { 33 | this.value = value; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/vo/TableId.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.vo; 20 | 21 | import com.hw.lineage.server.domain.repository.basic.Identifier; 22 | 23 | import lombok.Data; 24 | 25 | /** 26 | * @description: TableId 27 | * @author: HamaWhite 28 | */ 29 | @Data 30 | public class TableId implements Identifier { 31 | 32 | private final Long value; 33 | 34 | public TableId(Long value) { 35 | this.value = value; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/vo/TaskId.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.vo; 20 | 21 | import com.hw.lineage.server.domain.repository.basic.Identifier; 22 | 23 | import lombok.Data; 24 | 25 | /** 26 | * @description: TaskId 27 | * @author: HamaWhite 28 | */ 29 | @Data 30 | public class TaskId implements Identifier { 31 | 32 | private final Long value; 33 | 34 | public TaskId(Long value) { 35 | this.value = value; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-domain/src/main/java/com/hw/lineage/server/domain/vo/UserId.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.domain.vo; 20 | 21 | import com.hw.lineage.server.domain.repository.basic.Identifier; 22 | 23 | import lombok.Data; 24 | 25 | /** 26 | * @description: UserId 27 | * @author: HamaWhite 28 | */ 29 | @Data 30 | public class UserId implements Identifier { 31 | 32 | private final Long value; 33 | 34 | public UserId(Long value) { 35 | this.value = value; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-infrastructure/src/main/java/com/hw/lineage/server/infrastructure/config/LineageConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.infrastructure.config; 20 | 21 | import org.springframework.beans.factory.annotation.Value; 22 | import org.springframework.stereotype.Component; 23 | 24 | import lombok.Data; 25 | 26 | /** 27 | * @description: LineageConfig 28 | * @author: HamaWhite 29 | */ 30 | @Data 31 | @Component 32 | public class LineageConfig { 33 | 34 | @Value("${lineage.plugin.dir}") 35 | private String pluginDir; 36 | 37 | @Value("${lineage.storage.dir}") 38 | private String storageDir; 39 | } 40 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-infrastructure/src/main/java/com/hw/lineage/server/infrastructure/persistence/mybatis/MybatisConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.infrastructure.persistence.mybatis; 20 | 21 | import org.mybatis.spring.annotation.MapperScan; 22 | import org.springframework.context.annotation.Configuration; 23 | 24 | /** 25 | * @description: MybatisConfig 26 | * @author: HamaWhite 27 | */ 28 | @Configuration 29 | @MapperScan("com.hw.lineage.server.infrastructure.persistence.mapper") 30 | public class MybatisConfig { 31 | } 32 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-infrastructure/src/main/java/com/hw/lineage/server/infrastructure/persistence/mybatis/handler/impl/CatalogTypeHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.infrastructure.persistence.mybatis.handler.impl; 20 | 21 | import com.hw.lineage.common.enums.CatalogType; 22 | import com.hw.lineage.server.infrastructure.persistence.mybatis.handler.StringEnumTypeHandler; 23 | 24 | /** 25 | * @description: CatalogTypeHandler 26 | * @author: HamaWhite 27 | */ 28 | public class CatalogTypeHandler extends StringEnumTypeHandler { 29 | 30 | public CatalogTypeHandler() { 31 | super(CatalogType.class); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-infrastructure/src/main/java/com/hw/lineage/server/infrastructure/persistence/mybatis/handler/impl/ColumnGraphTypeHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.infrastructure.persistence.mybatis.handler.impl; 20 | 21 | import com.hw.lineage.server.domain.graph.column.ColumnGraph; 22 | import com.hw.lineage.server.infrastructure.persistence.mybatis.handler.JsonTypeHandler; 23 | 24 | /** 25 | * @description: ColumnGraphTypeHandler 26 | * @author: HamaWhite 27 | */ 28 | public class ColumnGraphTypeHandler extends JsonTypeHandler { 29 | 30 | public ColumnGraphTypeHandler() { 31 | super(ColumnGraph.class); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-infrastructure/src/main/java/com/hw/lineage/server/infrastructure/persistence/mybatis/handler/impl/ModuleCodeHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.infrastructure.persistence.mybatis.handler.impl; 20 | 21 | import com.hw.lineage.common.enums.audit.ModuleCode; 22 | import com.hw.lineage.server.infrastructure.persistence.mybatis.handler.StringEnumTypeHandler; 23 | 24 | /** 25 | * @description: ModuleCodeHandler 26 | * @author: HamaWhite 27 | */ 28 | public class ModuleCodeHandler extends StringEnumTypeHandler { 29 | 30 | public ModuleCodeHandler() { 31 | super(ModuleCode.class); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-infrastructure/src/main/java/com/hw/lineage/server/infrastructure/persistence/mybatis/handler/impl/OperationStatusTypeHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.infrastructure.persistence.mybatis.handler.impl; 20 | 21 | import com.hw.lineage.common.enums.audit.OperationStatus; 22 | import com.hw.lineage.server.infrastructure.persistence.mybatis.handler.IntEnumTypeHandler; 23 | 24 | /** 25 | * @description: OperationStatusTypeHandler 26 | * @author: HamaWhite 27 | */ 28 | public class OperationStatusTypeHandler extends IntEnumTypeHandler { 29 | 30 | public OperationStatusTypeHandler() { 31 | super(OperationStatus.class); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-infrastructure/src/main/java/com/hw/lineage/server/infrastructure/persistence/mybatis/handler/impl/OperationTypeHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.infrastructure.persistence.mybatis.handler.impl; 20 | 21 | import com.hw.lineage.common.enums.audit.OperationType; 22 | import com.hw.lineage.server.infrastructure.persistence.mybatis.handler.StringEnumTypeHandler; 23 | 24 | /** 25 | * @description: OperationTypeHandler 26 | * @author: HamaWhite 27 | */ 28 | public class OperationTypeHandler extends StringEnumTypeHandler { 29 | 30 | public OperationTypeHandler() { 31 | super(OperationType.class); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-infrastructure/src/main/java/com/hw/lineage/server/infrastructure/persistence/mybatis/handler/impl/SqlStatusTypeHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.infrastructure.persistence.mybatis.handler.impl; 20 | 21 | import com.hw.lineage.common.enums.SqlStatus; 22 | import com.hw.lineage.server.infrastructure.persistence.mybatis.handler.IntEnumTypeHandler; 23 | 24 | /** 25 | * @description: SqlStatusTypeHandler 26 | * @author: HamaWhite 27 | */ 28 | public class SqlStatusTypeHandler extends IntEnumTypeHandler { 29 | 30 | public SqlStatusTypeHandler() { 31 | super(SqlStatus.class); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-infrastructure/src/main/java/com/hw/lineage/server/infrastructure/persistence/mybatis/handler/impl/SqlTypeHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.infrastructure.persistence.mybatis.handler.impl; 20 | 21 | import com.hw.lineage.common.enums.SqlType; 22 | import com.hw.lineage.server.infrastructure.persistence.mybatis.handler.StringEnumTypeHandler; 23 | 24 | /** 25 | * @description: SqlTypeHandler 26 | * @author: HamaWhite 27 | */ 28 | public class SqlTypeHandler extends StringEnumTypeHandler { 29 | 30 | public SqlTypeHandler() { 31 | super(SqlType.class); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-infrastructure/src/main/java/com/hw/lineage/server/infrastructure/persistence/mybatis/handler/impl/TableGraphTypeHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.infrastructure.persistence.mybatis.handler.impl; 20 | 21 | import com.hw.lineage.server.domain.graph.table.TableGraph; 22 | import com.hw.lineage.server.infrastructure.persistence.mybatis.handler.JsonTypeHandler; 23 | 24 | /** 25 | * @description: TableGraphTypeHandler 26 | * @author: HamaWhite 27 | */ 28 | public class TableGraphTypeHandler extends JsonTypeHandler { 29 | 30 | public TableGraphTypeHandler() { 31 | super(TableGraph.class); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-infrastructure/src/main/java/com/hw/lineage/server/infrastructure/persistence/mybatis/handler/impl/TaskStatusTypeHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.infrastructure.persistence.mybatis.handler.impl; 20 | 21 | import com.hw.lineage.common.enums.TaskStatus; 22 | import com.hw.lineage.server.infrastructure.persistence.mybatis.handler.IntEnumTypeHandler; 23 | 24 | /** 25 | * @description: TaskStatusTypeHandler 26 | * @author: HamaWhite 27 | */ 28 | public class TaskStatusTypeHandler extends IntEnumTypeHandler { 29 | 30 | public TaskStatusTypeHandler() { 31 | super(TaskStatus.class); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-interfaces/src/main/java/com/hw/lineage/server/interfaces/aspect/SkipLogAspect.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server.interfaces.aspect; 20 | 21 | import java.lang.annotation.*; 22 | 23 | /** 24 | * @description: SkipLogAspect 25 | * @author: HamaWhite 26 | */ 27 | @Target(ElementType.METHOD) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | @Documented 30 | public @interface SkipLogAspect { 31 | } 32 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-start/src/main/resources/application-dev.properties: -------------------------------------------------------------------------------- 1 | spring.application.version=${project.version} 2 | 3 | server.port=8194 4 | 5 | ## DataSource 6 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 7 | spring.datasource.url=jdbc:mysql://192.168.90.150:3306/lineage?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai 8 | spring.datasource.username=root 9 | spring.datasource.password=root@123456 10 | 11 | ## Servlet 12 | spring.servlet.multipart.max-file-size=20MB 13 | spring.servlet.multipart.max-request-size=20MB 14 | 15 | ## FlinkSQL Lineage 16 | lineage.plugin.dir=lineage-client/target/plugins 17 | lineage.storage.dir=data/storage 18 | 19 | ## LOG 20 | logging.file.path=data/logs -------------------------------------------------------------------------------- /lineage-server/lineage-server-start/src/main/resources/application-docker.properties: -------------------------------------------------------------------------------- 1 | server.port=8194 2 | 3 | ## DataSource 4 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 5 | spring.datasource.url=jdbc:mysql://mysql:3306/lineage?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai 6 | spring.datasource.username=root 7 | spring.datasource.password=root@123456 8 | 9 | ## Servlet 10 | spring.servlet.multipart.max-file-size=50MB 11 | spring.servlet.multipart.max-request-size=50MB 12 | 13 | # swagger3 14 | #springfox.documentation.swagger-ui.enabled=false 15 | 16 | ## FlinkSQL Lineage 17 | lineage.plugin.dir=plugins 18 | lineage.storage.dir=data/storage 19 | 20 | ## LOG 21 | logging.file.path=logs -------------------------------------------------------------------------------- /lineage-server/lineage-server-start/src/main/resources/application-prod.properties: -------------------------------------------------------------------------------- 1 | server.port=8194 2 | 3 | ## DataSource 4 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 5 | spring.datasource.url=jdbc:mysql://192.168.90.150:3306/lineage?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai 6 | spring.datasource.username=root 7 | spring.datasource.password=root@123456 8 | 9 | ## Servlet 10 | spring.servlet.multipart.max-file-size=50MB 11 | spring.servlet.multipart.max-request-size=50MB 12 | 13 | # swagger3 14 | #springfox.documentation.swagger-ui.enabled=false 15 | 16 | ## FlinkSQL Lineage 17 | lineage.plugin.dir=plugins 18 | lineage.storage.dir=data/storage 19 | 20 | ## LOG 21 | logging.file.path=logs -------------------------------------------------------------------------------- /lineage-server/lineage-server-start/src/main/resources/application-test.properties: -------------------------------------------------------------------------------- 1 | server.port=8194 2 | 3 | ## DataSource 4 | spring.sql.init.platform=h2 5 | spring.sql.init.mode=always 6 | spring.sql.init.schema-locations=classpath:scripts/h2/schema.sql 7 | spring.sql.init.data-locations=classpath:scripts/h2/data.sql 8 | 9 | spring.datasource.driver-class-name=org.h2.Driver 10 | spring.datasource.url=jdbc:h2:mem:lineage;DB_CLOSE_DELAY=-1;MODE=MySQL; 11 | spring.datasource.username=sa 12 | spring.datasource.password=sa 13 | 14 | ## Servlet 15 | spring.servlet.multipart.max-file-size=20MB 16 | spring.servlet.multipart.max-request-size=20MB 17 | 18 | ## FlinkSQL Lineage 19 | lineage.plugin.dir=lineage-client/target/plugins 20 | lineage.storage.dir=data/storage 21 | 22 | ## LOG 23 | logging.file.path=data/logs -------------------------------------------------------------------------------- /lineage-server/lineage-server-start/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.profiles.active=${profile.active} 2 | 3 | server.port=${server.port} 4 | spring.application.name=lineage-server 5 | 6 | ## DataSource 7 | spring.datasource.driver-class-name=${spring.datasource.driver-class-name} 8 | spring.datasource.url=${spring.datasource.url} 9 | spring.datasource.username=${spring.datasource.username} 10 | spring.datasource.password=${spring.datasource.password} 11 | 12 | # Springboot support swagger3 13 | spring.mvc.pathmatch.matching-strategy=ANT_PATH_MATCHER 14 | 15 | ## Servlet 16 | spring.servlet.multipart.max-file-size=${spring.servlet.multipart.max-file-size} 17 | spring.servlet.multipart.max-request-size=${spring.servlet.multipart.max-file-size} 18 | 19 | ## PageHelper 20 | # when the pageSize parameter is equal to 0, query all data 21 | pagehelper.pageSizeZero=true 22 | 23 | ## FlinkSQL Lineage 24 | lineage.plugin.dir=${lineage.plugin.dir} 25 | lineage.storage.dir=${lineage.storage.dir} 26 | 27 | ## LOG 28 | logging.file.path=${logging.file.path} 29 | 30 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-start/src/test/assemblies/test-function-a-assembly.xml: -------------------------------------------------------------------------------- 1 | 4 | test-function-a 5 | 6 | jar 7 | 8 | false 9 | 10 | 11 | 12 | ${project.build.testOutputDirectory} 13 | / 14 | 15 | com/hw/lineage/flink/table/udf/functiona/FlinkSuffixFunction.class 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-start/src/test/assemblies/test-function-b-assembly.xml: -------------------------------------------------------------------------------- 1 | 4 | test-function-b 5 | 6 | jar 7 | 8 | false 9 | 10 | 11 | 12 | ${project.build.testOutputDirectory} 13 | / 14 | 15 | com/hw/lineage/flink/table/udf/functionb/FlinkPrefixFunction.class 16 | com/hw/lineage/flink/table/udf/functionb/FlinkSplitFunction.class 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-start/src/test/java/com/hw/lineage/flink/table/udf/functiona/FlinkSuffixFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.flink.table.udf.functiona; 20 | 21 | import org.apache.flink.table.functions.ScalarFunction; 22 | 23 | /** 24 | * @description: FlinkSuffixFunction 25 | * @author: HamaWhite 26 | */ 27 | public class FlinkSuffixFunction extends ScalarFunction { 28 | 29 | public String eval(String input) { 30 | return input.concat("-HamaWhite"); 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /lineage-server/lineage-server-start/src/test/java/com/hw/lineage/flink/table/udf/functionb/FlinkPrefixFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.flink.table.udf.functionb; 20 | 21 | import org.apache.flink.table.functions.ScalarFunction; 22 | 23 | /** 24 | * @description: FlinkPrefixFunction 25 | * @author: HamaWhite 26 | */ 27 | public class FlinkPrefixFunction extends ScalarFunction { 28 | 29 | public String eval(String input, Integer value) { 30 | return "HamaWhite".concat(input).concat(" : " + value); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /lineage-server/lineage-server-start/src/test/java/com/hw/lineage/server/AbstractSpringBootTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.hw.lineage.server; 20 | 21 | import com.hw.lineage.server.start.LineageServerApplication; 22 | 23 | import org.junit.runner.RunWith; 24 | import org.springframework.boot.test.context.SpringBootTest; 25 | import org.springframework.test.context.ActiveProfiles; 26 | import org.springframework.test.context.junit4.SpringRunner; 27 | 28 | /** 29 | * @description: AbstractSpringBootTest 30 | * @author: HamaWhite 31 | */ 32 | @ActiveProfiles("test") 33 | @RunWith(SpringRunner.class) 34 | @SpringBootTest(classes = LineageServerApplication.class) 35 | public abstract class AbstractSpringBootTest { 36 | } 37 | -------------------------------------------------------------------------------- /lineage-server/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.hw.lineage 7 | flink-sql-lineage 8 | 1.0.0 9 | 10 | 11 | lineage-server 12 | pom 13 | 14 | lineage-server-application 15 | lineage-server-domain 16 | lineage-server-infrastructure 17 | lineage-server-interfaces 18 | lineage-server-start 19 | 20 | 21 | -------------------------------------------------------------------------------- /lineage-web/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/preset-env", 5 | { 6 | "modules": false 7 | } 8 | ], 9 | "@babel/preset-react", 10 | ], 11 | "exclude": ["/node_modules\/react/"], 12 | "plugins": [ 13 | [ 14 | "@babel/plugin-proposal-decorators", 15 | { "legacy": true } 16 | ], 17 | [ 18 | "@babel/plugin-proposal-class-properties", 19 | { "loose" : true } 20 | ] 21 | ], 22 | "env": { 23 | "development": { 24 | "plugins": [ 25 | [ 26 | "@babel/plugin-transform-runtime", 27 | { 28 | "corejs": 2 29 | } 30 | ], 31 | "@babel/plugin-transform-modules-commonjs" 32 | ] 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /lineage-web/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.hw.lineage 7 | flink-sql-lineage 8 | 1.0.0 9 | 10 | 11 | lineage-web 12 | 13 | 14 | -------------------------------------------------------------------------------- /lineage-web/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HamaWhiteGG/flink-sql-lineage/c484f20e2c4f9e97a60f4f70bbe914e03a322776/lineage-web/public/favicon.ico -------------------------------------------------------------------------------- /lineage-web/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 15 | 24 | FlinkSQL Lineage 25 | 31 | 32 | 33 |
34 | 35 | 36 | -------------------------------------------------------------------------------- /lineage-web/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "FlinkSQL Lineage", 3 | "name": "FlinkSQL Lineage", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /lineage-web/src/component/react-lineage-dag-resource.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HamaWhiteGG/flink-sql-lineage/c484f20e2c4f9e97a60f4f70bbe914e03a322776/lineage-web/src/component/react-lineage-dag-resource.zip -------------------------------------------------------------------------------- /lineage-web/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | min-width: 1000px; 9 | } 10 | 11 | code { 12 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 13 | monospace; 14 | } 15 | .logo { 16 | height: 50px; 17 | line-height: 50px; 18 | width: 100%; 19 | } 20 | .logo img { 21 | vertical-align: middle; 22 | padding: 2px; 23 | margin-left: 16px; 24 | margin-right: 8px; 25 | } 26 | .logo .logo-txt { 27 | color: #fff; 28 | animation: change_color .5s; 29 | } 30 | @keyframes change_color { 31 | 0% { 32 | color: #000; 33 | } 34 | 100% { 35 | color: #fff; 36 | } 37 | } 38 | 39 | @media screen and (max-width: 992px) { 40 | .logo .logo-txt { 41 | display: none; 42 | } 43 | } 44 | 45 | .header-box { 46 | padding: 0 16px; 47 | height: 50px; 48 | line-height: 50px; 49 | } 50 | #webpack-dev-server-client-overlay { 51 | display: none !important; 52 | } -------------------------------------------------------------------------------- /lineage-web/src/page-catalog/catalog-detail/index.js: -------------------------------------------------------------------------------- 1 | import CatalogDetail from './catalog-detail' 2 | 3 | export default CatalogDetail -------------------------------------------------------------------------------- /lineage-web/src/page-catalog/catalog-detail/modal-apply-function.js: -------------------------------------------------------------------------------- 1 | import React,{useState, useEffect} from 'react' 2 | import { Modal, Descriptions, Tabs, message } from 'antd' 3 | 4 | const {TabPane} = Tabs 5 | const Cm = (props) => { 6 | const {functionList, switchVisible, onOk} = props 7 | const [activeKey, setActiveKey] = useState('') 8 | 9 | const onChange = (key) => { 10 | console.log(key) 11 | setActiveKey(key) 12 | } 13 | 14 | const tabMap = functionList.map((t, i) => { 15 | return { 16 | key: t.functionName, 17 | label: t.functionName, 18 | children: 19 | {Object.keys(functionList[i]).map(f => {functionList[i][f]})} 20 | 21 | } 22 | }) 23 | 24 | useEffect(() => { 25 | functionList.length > 0 && setActiveKey(functionList[0].functionName) 26 | }, [functionList]) 27 | 28 | return ( 29 | { 33 | onOk({...functionList.filter(t => t.functionName === activeKey)[0]}) 34 | switchVisible(false) 35 | }} 36 | onCancel={() => { 37 | switchVisible(false) 38 | }} 39 | okText="apply" 40 | > 41 | 42 | 43 | ) 44 | } 45 | export default Cm -------------------------------------------------------------------------------- /lineage-web/src/page-catalog/index.css: -------------------------------------------------------------------------------- 1 | .catalog-list { 2 | height: 600px; 3 | overflow: scroll; 4 | } 5 | .list-item:hover { 6 | box-shadow: 0 2px 5px #eee; 7 | border: 1px solid #2f77ff; 8 | cursor: pointer; 9 | } 10 | .list-item .item-logo { 11 | width: 30px; 12 | height: 30px; 13 | } 14 | .list-item .item-content{ 15 | width: calc(100% - 30px); 16 | } 17 | .list-item-wrapper { 18 | position: relative; 19 | } 20 | .list-item-wrapper .options { 21 | display: block; 22 | position: absolute; 23 | right: 16px; 24 | top: 16px; 25 | } 26 | .list-item-wrapper:hover .options { 27 | display: block; 28 | } 29 | .item-content .item-info{ 30 | width: 100%; 31 | line-height: 30px; 32 | color: #666; 33 | font-size: 14px; 34 | padding-right: 10px; 35 | } 36 | 37 | /* detail css */ 38 | 39 | .left-tree { 40 | width: 270px; 41 | } 42 | .left-tree-box { 43 | border-right: 1px solid #ddd; 44 | } -------------------------------------------------------------------------------- /lineage-web/src/page-catalog/index.js: -------------------------------------------------------------------------------- 1 | import React,{useState, useEffect} from 'react' 2 | import { Outlet } from 'react-router-dom' 3 | import './index.css' 4 | 5 | const Page = () => { 6 | return ( 7 |
8 | 9 |
10 | ) 11 | } 12 | export default Page -------------------------------------------------------------------------------- /lineage-web/src/page-login/img/768f621302960506517df905fd902ccd.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HamaWhiteGG/flink-sql-lineage/c484f20e2c4f9e97a60f4f70bbe914e03a322776/lineage-web/src/page-login/img/768f621302960506517df905fd902ccd.jpg -------------------------------------------------------------------------------- /lineage-web/src/page-login/img/c36657b90557d33f06e5f6a93dd4f938.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HamaWhiteGG/flink-sql-lineage/c484f20e2c4f9e97a60f4f70bbe914e03a322776/lineage-web/src/page-login/img/c36657b90557d33f06e5f6a93dd4f938.jpeg -------------------------------------------------------------------------------- /lineage-web/src/page-login/img/logo-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HamaWhiteGG/flink-sql-lineage/c484f20e2c4f9e97a60f4f70bbe914e03a322776/lineage-web/src/page-login/img/logo-blue.png -------------------------------------------------------------------------------- /lineage-web/src/page-login/img/logo-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HamaWhiteGG/flink-sql-lineage/c484f20e2c4f9e97a60f4f70bbe914e03a322776/lineage-web/src/page-login/img/logo-white.png -------------------------------------------------------------------------------- /lineage-web/src/page-login/index.css: -------------------------------------------------------------------------------- 1 | 2 | 3 | .login-wrapper { 4 | width: 100vw; 5 | height: 100vh; 6 | display: flex; 7 | align-items: center; 8 | justify-content: center; 9 | } 10 | .login-title { 11 | font-size: 24px; 12 | color: #1777ff; 13 | font-weight: 400; 14 | } 15 | .login-bd { 16 | box-shadow: 1px 1px 10px #ddd; 17 | } 18 | 19 | /*风格一*/ 20 | .login-wrapper { 21 | background-image: url(./img/768f621302960506517df905fd902ccd.jpg); 22 | background-size: cover; 23 | background-repeat: no-repeat; 24 | background-attachment: fixed; 25 | } 26 | .login-title { 27 | font-size: 30px; 28 | font-weight: 600; 29 | color: #dbd6d6; 30 | } 31 | 32 | .login-bd { 33 | border: 1px solid #2a2929; 34 | background: #020a27b8; 35 | color: #eee; 36 | border-radius: 8px; 37 | } -------------------------------------------------------------------------------- /lineage-web/src/page-plugin/index.css: -------------------------------------------------------------------------------- 1 | .catalog-list { 2 | height: 600px; 3 | overflow: scroll; 4 | } 5 | .list-item { 6 | /* margin-bottom: 24px; */ 7 | } 8 | .list-item:hover { 9 | box-shadow: 0 2px 5px #eee; 10 | } 11 | .list-item .item-logo { 12 | width: 30px; 13 | height: 30px; 14 | } 15 | .list-item .item-content{ 16 | width: calc(100% - 30px); 17 | } 18 | .item-content .options { 19 | display: none; 20 | } 21 | .item-content:hover .options { 22 | display: block; 23 | } 24 | .item-content .item-info{ 25 | width: 100%; 26 | /* height: 30px; */ 27 | line-height: 30px; 28 | /* text-align: right; */ 29 | color: #666; 30 | font-size: 14px; 31 | padding-right: 10px; 32 | } 33 | 34 | /* detail css */ 35 | 36 | .left-tree { 37 | width: 270px; 38 | } 39 | .left-tree-box { 40 | border-right: 1px solid #ddd; 41 | } -------------------------------------------------------------------------------- /lineage-web/src/page-plugin/index.js: -------------------------------------------------------------------------------- 1 | import React,{useState, useEffect} from 'react' 2 | import { Outlet } from 'react-router-dom' 3 | import './index.css' 4 | 5 | const Page = () => { 6 | return ( 7 |
8 | 9 |
10 | ) 11 | } 12 | export default Page -------------------------------------------------------------------------------- /lineage-web/src/page-sql/component/operator/operator.styl: -------------------------------------------------------------------------------- 1 | .expand-down-icon { 2 | position: absolute; 3 | right: -15px; 4 | top: 9px; 5 | } 6 | .shrink-up-icon { 7 | position: absolute; 8 | left: -15px; 9 | top: 9px; 10 | } 11 | .expand-up-icon { 12 | position: absolute; 13 | left: -15px; 14 | top: 9px; 15 | } 16 | .shrink-down-icon { 17 | position: absolute; 18 | right: -15px; 19 | top: 9px; 20 | } 21 | .top-icon { 22 | cursor: pointer; 23 | margin: 0 2px; 24 | padding: 0 3px; 25 | height: 16px; 26 | line-height: 13px; 27 | 28 | &:hover { 29 | border-radius: 5px; 30 | background: rgba(0,0,0,0.06); 31 | } 32 | 33 | &.active { 34 | border-radius: 5px; 35 | background: rgba(0,0,0,0.06); 36 | } 37 | } 38 | .disabled { 39 | cursor: no-drop; 40 | } -------------------------------------------------------------------------------- /lineage-web/src/page-sql/createContext.js: -------------------------------------------------------------------------------- 1 | import {createContext} from 'react' 2 | 3 | const myContext = createContext(null) 4 | export default myContext 5 | -------------------------------------------------------------------------------- /lineage-web/src/page-sql/img/enlarge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 放大 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /lineage-web/src/page-sql/img/expand-down-gray.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 编组备份 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /lineage-web/src/page-sql/img/expand-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 编组 26备份 2 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /lineage-web/src/page-sql/img/expand-up-gray.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 编组备份 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /lineage-web/src/page-sql/img/expand-up.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 编组 26备份 2 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /lineage-web/src/page-sql/img/filed-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lineage-web/src/page-sql/img/full-screen.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 编组 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /lineage-web/src/page-sql/img/lTor.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /lineage-web/src/page-sql/img/load.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 编组 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /lineage-web/src/page-sql/img/rTol.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /lineage-web/src/page-sql/img/reduce.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 缩小 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /lineage-web/src/page-sql/img/return-screen.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 编组 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /lineage-web/src/page-user-manage/index.js: -------------------------------------------------------------------------------- 1 | import React,{useState, useEffect} from 'react' 2 | import { Outlet, Link } from 'react-router-dom' 3 | import { Tabs } from 'antd' 4 | 5 | const Page = () => { 6 | const items = [ 7 | { 8 | key: 'user', 9 | label: User, 10 | },{ 11 | key: 'role', 12 | label: Role, 13 | }] 14 | return ( 15 |
16 |
17 |
User Management
18 | 19 |
20 | 21 |
22 | ) 23 | } 24 | export default Page -------------------------------------------------------------------------------- /sbin/clear-docker-compose.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd $(dirname "$0") || exit 4 | cd .. || exit 5 | DEPLOY_DIR=$(pwd) 6 | 7 | echo 'Stop containers' 8 | docker-compose stop 9 | 10 | echo 'Delete containers' 11 | docker-compose rm -f 12 | 13 | echo 'Delete the images containing "lineage-server"' 14 | docker rmi $(docker images | grep lineage-server | awk '{print $3}') 15 | 16 | MYSQL_DATA_DIR=${DEPLOY_DIR}/data/storage/mysql 17 | 18 | if [ -d "${MYSQL_DATA_DIR}" ]; then 19 | echo "Delete mysql data dir $MYSQL_DATA_DIR" 20 | rm -rf "${MYSQL_DATA_DIR}" 21 | fi -------------------------------------------------------------------------------- /sbin/deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # note: Generate a key on the local computer ssh-keygen -t rsa 4 | # and append the public key of the local computer to the remote machine /home/deploy/.ssh/authorized_keys 5 | 6 | PACKAGE_NAME=flink-sql-lineage-1.0.0 7 | REMOTE_IP=192.168.90.150 8 | 9 | cd $(dirname "$0") || exit 10 | cd .. || exit 11 | PROJECT_DIR=$(pwd) 12 | 13 | echo 'Start maven packaging' 14 | mvn clean package -Pprod 15 | echo 'Finish maven package' 16 | 17 | echo 'Copy the deploy package to the server /opt/workspace' 18 | scp "$PROJECT_DIR"/lineage-dist/dist/${PACKAGE_NAME}.tgz deploy@${REMOTE_IP}:/opt/workspace/ 19 | 20 | echo 'Stop the service on the server and delete old package' 21 | ssh deploy@${REMOTE_IP} 'cd /opt/workspace/'${PACKAGE_NAME}'; sh sbin/stop.sh' 22 | ssh deploy@${REMOTE_IP} 'rm -rf /opt/workspace/'${PACKAGE_NAME}'' 23 | 24 | echo 'Execute the decompression command on the server and restart the service' 25 | ssh deploy@"${REMOTE_IP}" 'cd /opt/workspace; tar -xvzf '${PACKAGE_NAME}'.tgz; source ~/.bash_profile ; cd '${PACKAGE_NAME}'; sh sbin/start.sh' 26 | 27 | printf "\n\nDeployment completed\n" 28 | printf "It takes tens of seconds for the service to start, please wait a moment.\n\n" 29 | 30 | printf "Swagger API: http://%s:8194/swagger-ui/index.html\n" "${REMOTE_IP}" 31 | printf "Knife4j API: http://%s:8194/doc.html\n" "${REMOTE_IP}" 32 | printf "Quick Catalog API: http://%s:8194/catalogs/1\n" "${REMOTE_IP}" 33 | printf "Home Page: http://%s:8194\n" "${REMOTE_IP}" -------------------------------------------------------------------------------- /sbin/start-docker-compose.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | LOCAL_IP=127.0.0.1 4 | 5 | cd $(dirname "$0") || exit 6 | cd .. || exit 7 | DEPLOY_DIR=$(pwd) 8 | 9 | echo 'Start maven packaging' 10 | mvn clean package -Pdocker 11 | echo 'Finish maven package' 12 | 13 | MYSQL_DATA_DIR=${DEPLOY_DIR}/data/storage/mysql 14 | if [ ! -d "${MYSQL_DATA_DIR}" ]; then 15 | echo "Created mysql data dir $MYSQL_DATA_DIR" 16 | mkdir -p "${MYSQL_DATA_DIR}" 17 | fi 18 | 19 | echo 'Build, create, and start containers with Docker Compose' 20 | docker-compose up -d 21 | 22 | echo 'Lists all container information' 23 | docker-compose ps 24 | 25 | printf "\n\nDeployment completed\n" 26 | printf "It takes tens of seconds for the service to start, please wait a moment.\n\n" 27 | 28 | printf "Swagger API: http://%s:8194/swagger-ui/index.html\n" "${LOCAL_IP}" 29 | printf "Knife4j API: http://%s:8194/doc.html\n" "${LOCAL_IP}" 30 | printf "Quick Catalog API: http://%s:8194/catalogs/1\n" "${LOCAL_IP}" 31 | printf "Home Page: http://%s:8194\n" "${LOCAL_IP}" 32 | -------------------------------------------------------------------------------- /sbin/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | APP_NAME=lineage-server 4 | 5 | cd $(dirname "$0") || exit 6 | cd .. || exit 7 | DEPLOY_DIR=$(pwd) 8 | 9 | LOGS_DIR=${DEPLOY_DIR}/logs 10 | if [ ! -d "${LOGS_DIR}" ]; then 11 | mkdir "${LOGS_DIR}" 12 | fi 13 | 14 | LOG_FILE=${LOGS_DIR}/lineage-server.log 15 | JAVA_OUT=${DEPLOY_DIR}/${APP_NAME}_std_out.log 16 | PID_FILE=${DEPLOY_DIR}/${APP_NAME}.pid 17 | LOG_CONFIG=${DEPLOY_DIR}/conf/logback-spring.xml 18 | 19 | SPRING_CONFIG=$(ls -t "${DEPLOY_DIR}"/conf/*.properties | head -n 1) 20 | 21 | # , spring.config.location vs spring.config.additional-location 22 | SPRING_BOOT_OPTS="${SPRING_BOOT_OPTS} --spring.config.additional-location=${SPRING_CONFIG}" 23 | SPRING_BOOT_OPTS="${SPRING_BOOT_OPTS} --logging.config=${LOG_CONFIG}" 24 | 25 | RUN_JAR=$(ls -t "${DEPLOY_DIR}"/lineage-server/*.jar | head -n 1) 26 | 27 | printf "\n" 28 | echo "Spring config file: $SPRING_CONFIG" 29 | echo "Logback config file: $LOG_CONFIG" 30 | printf "\n" 31 | echo "Starting the $APP_NAME ..." 32 | 33 | # shellcheck disable=SC2086 34 | nohup java -Xmx2g -Xms2g -jar "$RUN_JAR" $SPRING_BOOT_OPTS &>"$JAVA_OUT" & 35 | echo $! >"$PID_FILE" 36 | 37 | sleep 30 38 | 39 | printf "\n\n" 40 | echo "Please check the std_out file: $JAVA_OUT" 41 | echo "Please check the log file: $LOG_FILE" 42 | printf "\n" 43 | -------------------------------------------------------------------------------- /sbin/stop-docker-compose.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd $(dirname "$0") || exit 4 | cd .. || exit 5 | 6 | echo 'Stop containers' 7 | docker-compose stop 8 | -------------------------------------------------------------------------------- /sbin/stop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | APP_NAME=lineage-server 4 | 5 | cd $(dirname "$0") || exit 6 | cd .. || exit 7 | DEPLOY_DIR=$(pwd) 8 | 9 | PIDS=$(ps ax |grep -v tail|grep -v grep|grep "$DEPLOY_DIR"|awk '{print $1}') 10 | if [ -z "$PIDS" ]; then 11 | echo "WARN: The $APP_NAME does not started!" 12 | exit 1 13 | fi 14 | 15 | echo -e "Stopping the $APP_NAME ...\c" 16 | for PID in ${PIDS} ; do 17 | kill "${PID}" > /dev/null 2>&1 18 | done 19 | 20 | COUNT=0 21 | while [ ${COUNT} -lt 1 ]; do 22 | echo -e ".\c" 23 | sleep 1 24 | COUNT=1 25 | for PID in ${PIDS} ; do 26 | PID_EXIST=$(ps -f -p "${PID}" | grep java) 27 | if [ -n "$PID_EXIST" ]; then 28 | COUNT=0 29 | break 30 | fi 31 | done 32 | done 33 | 34 | printf "\n" 35 | echo "$APP_NAME service stopped successfully." 36 | printf "\n" 37 | 38 | -------------------------------------------------------------------------------- /style/license-header: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | --------------------------------------------------------------------------------