Merge pull request #684 from WeBankFinTech/dev-1.0.0. Prepare for release 1.0.0-RC1

[release] Prepare for release 1.0.0-RC1
diff --git a/.gitignore b/.gitignore
index c8a07d7..5198048 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,84 +2,105 @@
 .idea
 .DS_Store
 
-target/
+
+out/
+linkis.ipr
+linkis.iws
+
+linkis-commons/linkis-common/target/
+linkis-commons/linkis-hadoop-common/target/
+linkis-commons/linkis-httpclient/target/
+linkis-commons/linkis-message-scheduler/target/
+linkis-commons/linkis-module/target/
+linkis-commons/linkis-mybatis/target/
+linkis-commons/linkis-protocol/target/
+linkis-commons/linkis-rpc/target/
+linkis-commons/linkis-scheduler/target/
+linkis-commons/linkis-storage/target/
+
+linkis-computation-governance/linkis-computation-client/target/
+linkis-computation-governance/linkis-computation-governance-common/target/
+linkis-computation-governance/linkis-engineconn-manager/linkis-engineconn-linux-launch/target/
+linkis-computation-governance/linkis-engineconn-manager/linkis-engineconn-manager-core/target/
+linkis-computation-governance/linkis-engineconn-manager/linkis-engineconn-manager-server/target/
+
+linkis-computation-governance/linkis-engineconn/linkis-computation-engineconn/target/
+linkis-computation-governance/linkis-engineconn/linkis-engineconn-common/target/
+linkis-computation-governance/linkis-engineconn/linkis-engineconn-launch/target/
+linkis-computation-governance/linkis-engineconn/linkis-engineconn-executor/accessible-executor/target/
+linkis-computation-governance/linkis-engineconn/linkis-engineconn-executor/callback-service/target/
+linkis-computation-governance/linkis-engineconn/linkis-engineconn-executor/executor-core/target/
+linkis-computation-governance/linkis-engineconn/linkis-engineconn-executor/resource-executor/target/
+linkis-computation-governance/linkis-entrance-client/target/
+linkis-computation-governance/linkis-entrance/target/
+linkis-computation-governance/linkis-manager/label-common/target/
+linkis-computation-governance/linkis-manager/label-manager/target/
+linkis-computation-governance/linkis-manager/linkis-application-manager/target/
+linkis-computation-governance/linkis-manager/linkis-manager-commons/linkis-manager-common/target/
+linkis-computation-governance/linkis-manager/linkis-manager-commons/linkis-manager-service-common/target/
+linkis-computation-governance/linkis-manager/linkis-manager-commons/linkis-resource-manager-common/target/
+linkis-computation-governance/linkis-manager/linkis-manager-monitor/target/
+linkis-computation-governance/linkis-manager/linkis-manager-persistence/target/
+linkis-computation-governance/linkis-manager/linkis-resource-manager/target/
+
+
+
+linkis-public-enhancements/linkis-bml/linkis-bml-client/target/
+linkis-public-enhancements/linkis-bml/linkis-bml-common/target/
+linkis-public-enhancements/linkis-bml/linkis-bml-server/target/
+linkis-public-enhancements/linkis-bml/linkis-bml-engine-hook/target/
+linkis-public-enhancements/linkis-context-service/linkis-cs-cache/target/
+linkis-public-enhancements/linkis-context-service/linkis-cs-client/target/
+linkis-public-enhancements/linkis-context-service/linkis-cs-common/target/
+linkis-public-enhancements/linkis-context-service/linkis-cs-engine-support/target/
+linkis-public-enhancements/linkis-context-service/linkis-cs-highavailable/target/
+linkis-public-enhancements/linkis-context-service/linkis-cs-listener/target/
+linkis-public-enhancements/linkis-context-service/linkis-cs-persistence/target/
+linkis-public-enhancements/linkis-context-service/linkis-cs-search/target/
+linkis-public-enhancements/linkis-context-service/linkis-cs-server/target/
+linkis-public-enhancements/linkis-datasource/datasourcemanager/common/target/
+linkis-public-enhancements/linkis-datasource/datasourcemanager/server/target/
+linkis-public-enhancements/linkis-datasource/linkis-metadata/target/
+linkis-public-enhancements/linkis-datasource/metadatamanager/common/target/
+linkis-public-enhancements/linkis-datasource/metadatamanager/server/target/
+linkis-public-enhancements/linkis-datasource/metadatamanager/service/elasticsearch/target/
+linkis-public-enhancements/linkis-datasource/metadatamanager/service/hive/target/
+linkis-public-enhancements/linkis-datasource/metadatamanager/service/mysql/target/
+linkis-public-enhancements/linkis-publicService/linkis-configuration/target/
+linkis-public-enhancements/linkis-publicService/linkis-instance-label/client/target/
+linkis-public-enhancements/linkis-publicService/linkis-instance-label/target/
+linkis-public-enhancements/linkis-publicService/linkis-jobhistory/target/
+linkis-public-enhancements/linkis-publicService/linkis-script-dev/linkis-storage-script-dev-client/target/
+linkis-public-enhancements/linkis-publicService/linkis-script-dev/linkis-storage-script-dev-server/target/
+linkis-public-enhancements/linkis-publicService/linkis-udf/target/
+linkis-public-enhancements/linkis-publicService/linkis-variable/target/
+linkis-public-enhancements/linkis-publicService/target/
+
+
+linkis-spring-cloud-services/linkis-service-discovery/linkis-eureka/target/
+linkis-spring-cloud-services/linkis-service-gateway/linkis-gateway-core/target/
+linkis-spring-cloud-services/linkis-service-gateway/linkis-gateway-httpclient-support/target/
+linkis-spring-cloud-services/linkis-service-gateway/linkis-gateway-server-support/target/
+linkis-spring-cloud-services/linkis-service-gateway/linkis-spring-cloud-gateway/target/
+
+
+
+
+linkis-engineconn-plugins/linkis-engineconn-plugin-framework/linkis-engineconn-plugin-cache/target/
+linkis-engineconn-plugins/linkis-engineconn-plugin-framework/linkis-engineconn-plugin-core/target/
+linkis-engineconn-plugins/linkis-engineconn-plugin-framework/linkis-engineconn-plugin-loader/target/
+linkis-engineconn-plugins/linkis-engineconn-plugin-framework/linkis-engineconn-plugin-server/target/
+linkis-engineconn-plugins/engineconn-plugins/jdbc/target/
+linkis-engineconn-plugins/engineconn-plugins/hive/target/
+linkis-engineconn-plugins/engineconn-plugins/io_file/target/
+linkis-engineconn-plugins/engineconn-plugins/python/target/
+linkis-engineconn-plugins/engineconn-plugins/spark/target/
+linkis-engineconn-plugins/engineconn-plugins/pipeline/target/
+linkis-engineconn-plugins/engineconn-plugins/shell/target/
+
+linkis-orchestrator/plugin/linkis-orchestrator-ecm-plugin/target/
 
 assembly/target
-
-core/cloudModule/target/
-core/cloudMybatis/target/
-core/cloudProtocol/target/
-core/cloudRPC/target/
-core/common/target/
-core/httpclient/target/
-core/scheduler/target/
-eurekaServer/target/
-gateway/core/target/
-gateway/gateway-httpclient-support/target/
-gateway/gateway-ujes-support/target/
-gateway/springcloudgateway/target/
-
-
-metadata/target/
-publicService/application/target/
-publicService/configuration/target/
-publicService/jobhistory/target/
-publicService/target/
-publicService/udf/target/
-publicService/variable/target/
-publicService/workspace/target/
-resourceManager/resourcemanagerclient/target/
-resourceManager/resourcemanagercommon/target/
-resourceManager/resourcemanagerserver/target/
-storage/storage/target/
-
-contextservice/cs-cache/target
-contextservice/cs-client/target
-contextservice/cs-common/target
-contextservice/cs-highavailable/target
-contextservice/cs-listener/target
-contextservice/cs-persistence/target
-contextservice/cs-search/target
-contextservice/cs-server/target
-contextservice/cs-ujes-client/target
-
-datasource/datasourcemanager/common/target
-datasource/datasourcemanager/server/target
-datasource/metadatamanager/common/target
-datasource/metadatamanager/server/target
-datasource/metadatamanager/service/elasticsearch/target
-datasource/metadatamanager/service/hive/target
-datasource/metadatamanager/service/mysql/target
-
-
-
-ujes/client/target/
-ujes/definedEngines/hive/engine/target/
-ujes/definedEngines/hive/enginemanager/target/
-ujes/definedEngines/hive/entrance/target/
-ujes/definedEngines/jdbc/entrance/target/
-ujes/definedEngines/pipeline/engine/target/
-ujes/definedEngines/pipeline/enginemanager/target/
-ujes/definedEngines/pipeline/entrance/target/
-ujes/definedEngines/python/engine/target/
-ujes/definedEngines/python/enginemanager/target/
-ujes/definedEngines/python/entrance/target/
-ujes/definedEngines/spark/engine/target/
-ujes/definedEngines/spark/enginemanager/target/
-ujes/definedEngines/spark/entrance/target/
-ujes/definedEngines/presto/entrance/target/
-ujes/engine/target/
-ujes/enginemanager/target/
-ujes/entrance/target/
-
-ujes/definedEngines/mlsql/entrance/target/
 assembly/public-module/target/
-bml/bml-engine-hook/target/
-bml/bmlclient/target/
-bml/bmlcommon/target/
-bml/bmlserver/target/
-core/hadoop-common/target/
-publicService/workspace/client/workspace-httpclient/target/
-userControl/target/
 
 
diff --git a/README-ZH.md b/README-ZH.md
new file mode 100644
index 0000000..1cb9df3
--- /dev/null
+++ b/README-ZH.md
@@ -0,0 +1,149 @@
+Linkis
+============
+
+[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
+
+[English](README.md) | 中文
+
+# 引言:
+
+Linkis 在上层应用和底层引擎之间构建了一层计算中间件,上层应用只需对接 Linkis 提供的 REST/WS/JDBC 等标准接口,就能连接到 MySQL/Spark/Hive/Presto/Flink 等各种底层计算存储引擎,并实现上层应用间的互通。
+
+作为计算中间件,提供强大的连通,复用,扩展和管控能力。并通过解耦应用层和引擎层,简化复杂的网状调用关系,降低整体复杂度和开发、运维成本。
+
+自2019年开源以来,累计试用企业近 **700** 家,沙箱试用用户 **1000+**,涉及 互联网、金融、通信等多个行业,被很多企业用作大数据平台底层计算存储引擎组件的统一入口。
+
+没有 Linkis 之前如下:
+
+![原大数据生态图](docs/zh_CN/images/ch3/原大数据生态图.jpg)
+
+有了 Linkis 之后如下:
+
+![Linkis效果图](docs/zh_CN/images/ch3/解决方案.jpg)
+<br>
+<br>
+
+基于Linkis计算中间件的架构设计理念,我们在上层构建了很多的应用系统。目前已开源的有:
+
+- [**DataSphere Studio - 数据应用开发管理门户**](https://github.com/WeBankFinTech/DataSphereStudio)
+
+- [**Qualitis - 数据质量工具**](https://github.com/WeBankFinTech/Qualitis)
+
+- [**Scriptis - 数据研发IDE工具**](https://github.com/WeBankFinTech/Scriptis)
+
+- [**Visualis - 数据可视化工具**](https://github.com/WeBankFinTech/Visualis)
+
+- [**Schedulis - 工作流调度工具**](https://github.com/WeBankFinTech/Schedulis)
+
+更多工具准备开源中,敬请期待!
+
+----
+
+# 核心特点:
+
+- **丰富的底层计算存储引擎支持度**。
+
+    **目前支持的计算存储引擎**有:Spark、Hive、Python、Presto、ElasticSearch、MLSQL、TiSpark、JDBC和Shell等。
+    
+    **正在支持中的计算存储引擎**有:Flink、Impala和Clickhouse等。
+
+    **支持的脚本语言有**:SparkSQL、Scala、Pyspark、R、Python、JDBC、HiveQL和Shell等;
+
+- **强大的计算治理能力**。Linkis 1.0 总体分为三大模块:公共增强服务、计算治理服务、微服务治理服务。三大模块简介如下:
+    
+    1. 公共增强服务为 Linkis 0.X 已经提供的物料库服务、上下文服务、数据源服务和公共服务等;
+    
+    2. 微服务治理服务为 Linkis 0.X 已经提供的Spring Cloud Gateway、Eureka和Open Feign,同时 Linkis1.0 还会提供对 Nacos 的支持;
+    
+    3. 计算治理服务是 Linkis 1.0 的核心重点,从 提交 —> 准备 —> 执行三个阶段,来全面升级Linkis 对 用户任务的执行管控能力。
+
+- **全栈计算存储引擎架构支持**。作为计算中间件,将接收、执行和管理针对各种计算存储引擎的任务和请求,包括离线批量任务、交互式查询任务、实时流式任务和存储型任务,并提供强大的复用、预热、限流、切换、全生命周期管理等计算治理能力;
+
+- **更强大的资源管理能力**。 ResourceManager 不仅具备 Linkis0.X 对 Yarn 和 Linkis EngineManager 的资源管理能力,还将提供基于标签的多级资源分配和回收能力,让 ResourceManager 具备跨集群、跨计算资源类型的强大资源管理能力。
+
+- **全流程标签化**。基于多级组合标签,提供跨IDC、跨集群的计算任务路由管控能力,和EngineConnManager, EngineConn 的多租户隔离能力;
+
+- **统一上下文服务**。统一用户和系统资源文件(JAR、ZIP、Properties等),跨用户、系统、计算引擎的参数和变量统一管理,一处设置,处处自动引用;
+
+- **统一物料**。系统和用户级物料管理,可分享和流转,跨用户、系统共享物料,支持全生命周期自动管理;
+
+
+----
+
+# 文档列表
+
+### Linkis1.0 常用文档
+
+[**Linkis1.0 快速安装使用文档**](https://github.com/WeBankFinTech/Linkis/wiki/%E5%A6%82%E4%BD%95%E5%BF%AB%E9%80%9F%E5%AE%89%E8%A3%85%E4%BD%BF%E7%94%A8Linkis-1.0-RC1)
+
+[**Linkis1.0 用户使用文档**](https://github.com/WeBankFinTech/Linkis/wiki/Linkis1.0%E7%94%A8%E6%88%B7%E4%BD%BF%E7%94%A8%E6%96%87%E6%A1%A3)
+
+[**快速了解 Linkis1.0 全新架构**](https://github.com/WeBankFinTech/Linkis/wiki/Linkis1.0%E4%B8%8ELinkis0.X%E7%9A%84%E5%8C%BA%E5%88%AB%E7%AE%80%E8%BF%B0)
+
+### Linkis0.X 常用文档
+
+[Linkis0.X 快速安装使用文档](https://github.com/WeBankFinTech/Linkis/wiki/%E5%A6%82%E4%BD%95%E5%BF%AB%E9%80%9F%E5%AE%89%E8%A3%85%E4%BD%BF%E7%94%A8Linkis)
+
+[Linkis0.X 上层前端应用的HTTP接入文档](https://github.com/WeBankFinTech/Linkis/wiki/%E4%B8%8A%E5%B1%82%E5%89%8D%E7%AB%AF%E5%BA%94%E7%94%A8HTTP%E6%8E%A5%E5%85%A5%E6%96%87%E6%A1%A3)
+
+[Linkis0.X 上层前端应用的WebSocket接入文档](https://github.com/WeBankFinTech/Linkis/wiki/%E4%B8%8A%E5%B1%82%E5%89%8D%E7%AB%AF%E5%BA%94%E7%94%A8WebSocket%E6%8E%A5%E5%85%A5%E6%96%87%E6%A1%A3)
+
+[Linkis0.X 架构文档](https://github.com/WeBankFinTech/Linkis/wiki/%E6%80%BB%E4%BD%93%E6%9E%B6%E6%9E%84%E8%AE%BE%E8%AE%A1%E4%BB%8B%E7%BB%8D)
+
+**更多关于 Linkis1.0 和 Linkis0.X 的文档,请 [点我访问](https://github.com/WeBankFinTech/Linkis/wiki)**
+
+----
+
+# Architecture:
+
+![introduction_new](images/zh_CN/Linkis1.0/architecture/Linkis1.0-architecture.png)
+
+----
+
+# RoadMap
+
+### 1. 实现 Orchestrator 编排架构,提供丰富的计算策略支持
+
+- 支持多活
+- 支持主备
+- 支持事务
+- 支持重放
+- 支持多数据源混算
+- 支持多数据源异构
+
+### 2. Linkis1.0 管理台优化
+
+- 统一数据源模块优化
+- UDF模块优化
+- JobHistory优化,支持展示Orchestrator所有编排任务的详细Metrics信息。
+
+### 3. Linkis1.0 支持Flink引擎,完成所有未适配引擎的新架构适配
+
+- 适配 Presto 引擎
+- 适配 ElasticSearch 引擎
+- 适配 Impala 引擎
+
+
+<br>
+
+**如果您有任何需求,欢迎给我们提issue,我们将会及时给您回复。**
+
+----
+
+# Contributing
+
+非常欢迎广大的社区伙伴给我们贡献新引擎和代码!
+
+----
+
+# Communication
+
+如果您想得到最快的响应,请给我们提issue,或者您也可以扫码进群:
+
+![introduction05](docs/zh_CN/images/introduction/introduction05.png)
+
+----
+
+# License
+
+**Linkis is under the Apache 2.0 license. See the [LICENSE](/LICENSE) file for details.**
diff --git a/README.md b/README.md
index 6043000..9aa18cb 100644
--- a/README.md
+++ b/README.md
@@ -3,15 +3,15 @@
 
 [![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
 
-English | [中文](docs/zh_CN/README.md)
+English | [中文](README-ZH.md)
 
-## Introduction
+# Introduction
 
-Linkis helps easily connect to various back-end computation/storage engines(Spark, Python, TiDB...), exposes various interfaces(REST, JDBC, Java ...), with multi-tenancy, high performance, and resource control.
+ Linkis builds a layer of computation middleware between upper applications and underlying engines. By using standard interfaces such as REST/WS/JDBC provided by Linkis, the upper applications can easily access the underlying engines such as MySQL/Spark/Hive/Presto/Flink, etc., and achieve the intercommunication of user resources like unified variables, scripts, UDFs, functions and resource files at the same time.
 
-Linkis connects with computation/storage engines(Spark, Hive, Python and HBase), exposes REST/WS interface, and executes multi-language jobs(SQL, Pyspark, HiveQL and Scala), as a computation middleware.
+As a computation middleware, Linkis provides powerful connectivity, reuse, expansion, and computation governance capabilities. By decoupling the application layer and the engine layer, it simplifies the complex network call relationship, and thus reduces the overall complexity and saves the development and maintenance costs as well.
 
-Based on the microservices architecture, Linkis provides enterprise-level features of multi-tenant isolation, resource management and access control. It also offers convenient support to manage unified variables, UDFs, functions and resource files. it is also guaranteed with sophisticated task/job lifecycle management capabilities under high-concurrency, high-performance and high-availability scenarios.
+Since the first release of Linkis in 2019, it has accumulated more than **700** trial companies and **1000+** sandbox trial users, which involving diverse industries, from finance, banking, tele-communication, to manufactory, internet companies and so on. Lots of companies have already used Linkis as a unified entrance for the underlying computation and storage engines of the big data platform.
 
 
 ![linkis-intro-01](https://user-images.githubusercontent.com/11496700/84615498-c3030200-aefb-11ea-9b16-7e4058bf6026.png)
@@ -20,45 +20,60 @@
 <br>
 <br>
 
-Based on the concept of the computation middleware architecture of Linkis, we have built a large amount of applications and systems on top of it.Currently available open-source project: 
- - [**DataSphere Studio - Data Application Development& Management Portal**](https://github.com/WeBankFinTech/DataSphereStudio)
+Based on Linkis the computation middleware, we've built a lot of applications and systems on top of it. The following are the currently available open-source projects: 
+
+ - [**DataSphere Studio - Data Application Development & Management Framework**](https://github.com/WeBankFinTech/DataSphereStudio)
+
  - [**Qualitis - Data Quality Tool**](https://github.com/WeBankFinTech/Qualitis)
+
  - [**Scriptis - Data Development IDE Tool**](https://github.com/WeBankFinTech/Scriptis)
+
  - [**Visualis - Data Visualization Tool**](https://github.com/WeBankFinTech/Visualis)
 
- There will be more tools released as open-source projects, please stay tuned!
+ - [**Schedulis - Workflow Task Scheduling Tool**](https://github.com/WeBankFinTech/Schedulis)
 
-## Features
+More upcoming tools to release, please stay tuned!
 
-- Unified Job Execution Services: A distributed REST/WebSocket service for processing scripts execution requests from user.
+# Features
 
-  Available computation engines so far: Spark, Python, TiSpark, Hive and Shell.
+- **Support for diverse underlying computation storage engines**.
 
-  Available languages so far: SparkSQL, Spark Scala, PySpark, R, Python, HQL and Shell.
-
-- Resource Management Services: Available for real-time control/limit of resource usage from both perspectives of amount and load for both systems and users. With dynamic charts of resource statistics, it is convenient to monitor and manage resource usage for systems and users.
+    **Currently supported computation/storage engines**: Spark, Hive, Python, Presto, ElasticSearch, MLSQL, TiSpark, JDBC, Shell, etc;
+    
+    **Computation/storage engines to be supported**: Flink, Impala, Clickhouse, etc;
+    
+    **Supported script languages**: SparkSQL, Scala, Pyspark, R, Python, JDBC, HiveQL and Shell, etc.
   
-	Available resource types so far: Yarn queue resources, server(CPU and memory), number of concurrent instances per user.
+- **Powerful computation governance capabilities**. Linkis 1.0 services could be divided into three categories: public enhancement services, computation governance services, and microservice governance services.
+                                                    
+    1. The public enhancement service including the material library service, context service, data source service and public services already provided by Linkis 0.X;
+                                                    
+    2. The microservice governance services including Spring Cloud Gateway, Eureka and Open Feign already provided by Linkis 0.X, with extra Nacos support which will be provided by Linkis 1.0;
+                                                    
+    3. The computation governance services. It could be divided into three stages: submission -> preparation -> execution, to comprehensively upgrade the ability of Linkis to execute, manage and control user tasks.
 
+- **Support for full stack computation storage engine**. As a computation middleware, it will receive, execute and manage tasks and requests for various computation storage engines, including batch tasks, interactive query tasks, real-time streaming tasks and storage tasks, and provide powerful computation governance capabilities such as reuse, warm-up , current-limiting, engine-switching, and full life cycle management of engines;
 
-- Application Management Services: Manages global user applications, including offline batch applications, interactive query applications and real-time streaming applications. Also provides powerful reusability especially for offline and interactive applications, with complete lifecycle management which automatically releases idle applications for users.
+- **More powerful resource management capabilities**.  ResourceManager is not only capable of managing resources for Yarn and Linkis EngineManger as in Linkis 0.X, but also extends its capabilities to providing tag-based multi-level resource allocation and recycling, allowing itself to have powerful resource management capabilities across mutiple Yarn clusters and mutiple computation resource types;
 
-- Unified Storage Services: The generic IO architecture can quickly integrate with various storage systems and provide a unified invokable entrance. It is also highly integrated with most common data formats and easy to use.
+- **Whole-process label support**. Based on multi-level combined tags, Linkis 1.0 provides cross-IDC and cross-cluster computation task routing and control capabilities, and multi-tenant capabilities for EngineConnManager and EngineConn;
 
-- Unified Context Services: Unite resources files of users and systems (JAR, ZIP, Properties). With unified management of arguments/variables for users, systems and engines, it is achieved that modification in random place will reflect in all the other places automatically.
+- **Unified Context Service**. Unified user and system resource files (JAR, ZIP, Properties, etc.), unified management of parameters and variables across users, systems and engines. Setting once, reference anywhere;
 
-
-
-- Material Library: System and user-level material management, capable of sharing, transferring materials and automatic lifecycle management. 
-
-- Metadata Services: Real-time display of dataset table structure and partitions.
-
- **Compared with similar systems**
-
-![introduction01](https://user-images.githubusercontent.com/11496700/84625630-403b7080-af16-11ea-8816-392dda3584d1.png)
+- **Unified materials**. System and user-level unified material management, which can be shared and transferred across users and systems, and support automatic management of the material life cycle.
 
 # Documentations:
 
+### Linkis 1.0 documentations
+
+[**Linkis 1.0 Quick Deploy**](https://github.com/WeBankFinTech/Linkis/wiki/%E5%A6%82%E4%BD%95%E5%BF%AB%E9%80%9F%E5%AE%89%E8%A3%85%E4%BD%BF%E7%94%A8Linkis-1.0-RC1)
+
+[**Linkis 1.0 User Documentation**](https://github.com/WeBankFinTech/Linkis/wiki/Linkis1.0%E7%94%A8%E6%88%B7%E4%BD%BF%E7%94%A8%E6%96%87%E6%A1%A3)
+
+[**Quickly understand the new architecture of Linkis 1.0**](https://github.com/WeBankFinTech/Linkis/wiki/Linkis1.0%E4%B8%8ELinkis0.X%E7%9A%84%E5%8C%BA%E5%88%AB%E7%AE%80%E8%BF%B0)
+
+### Linkis 0.X documentations
+
 [Linkis, make big data easier](docs/en_US/ch3/Linkis_Introduction.md)
 
 [Linkis Quick Deploy](docs/en_US/ch1/deploy.md)
@@ -75,15 +90,45 @@
 
 # Architecture:
 
-![introduction02](https://user-images.githubusercontent.com/11496700/84615549-e9c13880-aefb-11ea-870e-6d2e9b8fa08d.png)
+![architecture](images/en_US/Linkis1.0/architecture/Linkis1.0-architecture.png)
 
 ----
 
-## Communication
-If you desire immediate response, please kindly raise issues to us or scan the below QR code by WeChat and QQ to join our group:
+# RoadMap
+
+### 1. Implement Orchestrator architecture and support for rich computation and orchestration strategies:
+
+- Support multi-activation for engines and clusters
+- Support active and standby
+- Support transaction
+- Support playback
+- Support mixed computation of multiple data sources
+- Support heterogeneous computation of multiple data sources
+
+### 2. Linkis 1.0 management console optimization
+
+- Unified data source module optimization
+- UDF module optimization
+- JobHistory is planned to support the display of detailed Metrics information of all orchestration tasks of one job in Orchestrator.
+
+### 3. Linkis 1.0 supports Flink engine and completes the new architecture adaptation for all unadapted engines
+
+- Optimize Presto engine for new architecture
+- Optimize ElasticSearch engine for new architecture
+- Optimize Impala engine for new architecture
+
+ If you have any needs, please submit an issue, and we will reply to you in time.
+
+# Contributing
+
+ We welcome all community partners to contribute new computation storage engines and other codes to us!
+
+# Communication
+
+ If you desire immediate response, please kindly raise issues to us or scan the below QR code by WeChat and QQ to join our group:
 <br>
 ![introduction05](https://user-images.githubusercontent.com/11496700/84615565-f2197380-aefb-11ea-8288-c2d7b0410933.png)
 
-## License
+# License
 
-Linkis is under the Apache 2.0 license. See the [LICENSE ](http://www.apache.org/licenses/LICENSE-2.0)file for details.
\ No newline at end of file
+ Linkis is under the Apache 2.0 license. See the [LICENSE ](http://www.apache.org/licenses/LICENSE-2.0)file for details.
diff --git a/assembly/pom.xml b/assembly/pom.xml
index 3cda062..2a7706a 100644
--- a/assembly/pom.xml
+++ b/assembly/pom.xml
@@ -1,13 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   ~ Copyright 2019 WeBank
-  ~
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~  you may not use this file except in compliance with the License.
   ~ You may obtain a copy of the License at
-  ~
   ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~
   ~ Unless required by applicable law or agreed to in writing, software
   ~ distributed under the License is distributed on an "AS IS" BASIS,
   ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,8 +18,7 @@
     <parent>
         <groupId>com.webank.wedatasphere.linkis</groupId>
         <artifactId>linkis</artifactId>
-        <version>0.11.0</version>
-        <relativePath>../pom.xml</relativePath>
+        <version>1.0.0-RC1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
@@ -61,7 +57,7 @@
                             </goals>
                             <configuration>
                                     <skipAssembly>false</skipAssembly>
-                                    <finalName>wedatasphere-linkis-${project.version}-dist</finalName>
+                                    <finalName>wedatasphere-linkis-${linkis.version}-dist</finalName>
                                     <appendAssemblyId>false</appendAssemblyId>
                                     <attach>false</attach>
                                     <descriptors>
@@ -74,5 +70,4 @@
          </plugins>
    </build>
 
-
 </project>
\ No newline at end of file
diff --git a/assembly/public-module/pom.xml b/assembly/public-module/pom.xml
index 6bc40c7..c9bc553 100644
--- a/assembly/public-module/pom.xml
+++ b/assembly/public-module/pom.xml
@@ -18,7 +18,7 @@
     <parent>
         <artifactId>linkis</artifactId>
         <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
+        <version>1.0.0-RC1</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
@@ -29,7 +29,8 @@
     <dependencies>
         <dependency>
             <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cloudRPC</artifactId>
+            <artifactId>linkis-message-scheduler</artifactId>
+            <version>${linkis.version}</version>
             <exclusions>
                 <exclusion>
                     <groupId>tomcat</groupId>
@@ -39,11 +40,36 @@
                     <groupId>tomcat</groupId>
                     <artifactId>jasper-runtime</artifactId>
                 </exclusion>
+                <exclusion>
+                    <groupId>io.protostuff</groupId>
+                    <artifactId>protostuff-core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>io.protostuff</groupId>
+                    <artifactId>protostuff-runtime</artifactId>
+                </exclusion>
+                <exclusion>
+                    <artifactId>jackson-annotations</artifactId>
+                    <groupId>com.fasterxml.jackson.core</groupId>
+                </exclusion>
+                <exclusion>
+                    <artifactId>jackson-core</artifactId>
+                    <groupId>com.fasterxml.jackson.core</groupId>
+                </exclusion>
+                <exclusion>
+                    <artifactId>jackson-databind</artifactId>
+                    <groupId>com.fasterxml.jackson.core</groupId>
+                </exclusion>
+                <exclusion>
+                    <artifactId>jsr305</artifactId>
+                    <groupId>com.google.code.findbugs</groupId>
+                </exclusion>
             </exclusions>
         </dependency>
         <dependency>
             <groupId>com.webank.wedatasphere.linkis</groupId>
             <artifactId>linkis-storage</artifactId>
+            <version>${linkis.version}</version>
             <exclusions>
                 <exclusion>
                     <groupId>org.apache.httpcomponents</groupId>
@@ -66,8 +92,20 @@
                     <artifactId>jetty-util</artifactId>
                 </exclusion>
                 <exclusion>
-                    <artifactId>jackson-databind</artifactId>
-                    <groupId>com.fasterxml.jackson.core</groupId>
+                    <artifactId>zookeeper</artifactId>
+                    <groupId>org.apache.zookeeper</groupId>
+                </exclusion>
+                <exclusion>
+                    <artifactId>netty</artifactId>
+                    <groupId>io.netty</groupId>
+                </exclusion>
+                <exclusion>
+                    <artifactId>netty-all</artifactId>
+                    <groupId>io.netty</groupId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.ow2.asm</groupId>
+                    <artifactId>asm</artifactId>
                 </exclusion>
             </exclusions>
         </dependency>
@@ -76,6 +114,27 @@
             <artifactId>httpclient</artifactId>
             <version>${httpclient.version}</version>
         </dependency>
+
+        <dependency>
+            <groupId>io.protostuff</groupId>
+            <artifactId>protostuff-core</artifactId>
+            <version>1.6.2</version>
+        </dependency>
+
+
+        <!-- https://mvnrepository.com/artifact/io.protostuff/protostuff-runtime -->
+        <dependency>
+            <groupId>io.protostuff</groupId>
+            <artifactId>protostuff-runtime</artifactId>
+            <version>1.6.2</version>
+        </dependency>
+
+        <dependency>
+            <groupId>io.protostuff</groupId>
+            <artifactId>protostuff-api</artifactId>
+            <version>1.6.2</version>
+        </dependency>
+
     </dependencies>
 
     <build>
@@ -114,7 +173,7 @@
                 </executions>
                 <configuration>
                     <skipAssembly>false</skipAssembly>
-                    <finalName>module</finalName>
+                    <finalName>out</finalName>
                     <appendAssemblyId>false</appendAssemblyId>
                     <attach>false</attach>
                     <descriptors>
diff --git a/assembly/public-module/src/main/assembly/distribution.xml b/assembly/public-module/src/main/assembly/distribution.xml
index 865b4a9..5568d90 100644
--- a/assembly/public-module/src/main/assembly/distribution.xml
+++ b/assembly/public-module/src/main/assembly/distribution.xml
@@ -1,12 +1,9 @@
 <!--
   ~ Copyright 2019 WeBank
-  ~
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~  you may not use this file except in compliance with the License.
   ~ You may obtain a copy of the License at
-  ~
   ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~
   ~ Unless required by applicable law or agreed to in writing, software
   ~ distributed under the License is distributed on an "AS IS" BASIS,
   ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,10 +17,10 @@
         xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/2.3 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
     <id>module</id>
     <formats>
-        <format>zip</format>
+        <format>dir</format>
     </formats>
-    <includeBaseDirectory>true</includeBaseDirectory>
-    <baseDirectory>module</baseDirectory>
+    <includeBaseDirectory>false</includeBaseDirectory>
+<!--    <baseDirectory>lib</baseDirectory>-->
 
     <dependencySets>
         <dependencySet>
@@ -36,11 +33,11 @@
             <useStrictFiltering>true</useStrictFiltering>
             <useTransitiveFiltering>true</useTransitiveFiltering>
             <excludes>
-                <exclude>io.netty:netty-buffer*</exclude>
-                <exclude>io.netty:netty-codec*</exclude>
-                <exclude>io.netty:netty-common*</exclude>
-                <exclude>io.netty:netty-handler*</exclude>
-                <exclude>io.netty:netty-transport*</exclude>
+<!--                <exclude>io.netty:netty-buffer*</exclude>-->
+<!--                <exclude>io.netty:netty-codec*</exclude>-->
+<!--                <exclude>io.netty:netty-common*</exclude>-->
+<!--                <exclude>io.netty:netty-handler*</exclude>-->
+<!--                <exclude>io.netty:netty-transport*</exclude>-->
             </excludes>
         </dependencySet>
     </dependencySets>
diff --git a/assembly/src/main/assembly/assembly.xml b/assembly/src/main/assembly/assembly.xml
index 1c19030..9c811ef 100644
--- a/assembly/src/main/assembly/assembly.xml
+++ b/assembly/src/main/assembly/assembly.xml
@@ -1,12 +1,9 @@
 <!--
   ~ Copyright 2019 WeBank
-  ~
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~  you may not use this file except in compliance with the License.
   ~ You may obtain a copy of the License at
-  ~
   ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~
   ~ Unless required by applicable law or agreed to in writing, software
   ~ distributed under the License is distributed on an "AS IS" BASIS,
   ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -53,10 +50,23 @@
       <includes>
         <include>**/*</include>
       </includes>
-      <fileMode>0777</fileMode>
+        <fileMode>0777</fileMode>
       <lineEnding>unix</lineEnding>
     </fileSet>
 
+      <fileSet>
+          <directory>
+              ${project.parent.basedir}/sbin/
+          </directory>
+          <outputDirectory>sbin</outputDirectory>
+          <includes>
+              <include>**/*</include>
+          </includes>
+          <fileMode>0777</fileMode>
+          <directoryMode>0755</directoryMode>
+          <lineEnding>unix</lineEnding>
+      </fileSet>
+
     <fileSet>
       <directory>
         ${project.parent.basedir}/db/
@@ -67,265 +77,323 @@
       </includes>
     </fileSet>
 
-    <!--spark-->
+            <!--spark-->
     <fileSet>
       <directory>
-          ${project.parent.basedir}/ujes/definedEngines/spark/entrance/target/
+          ${project.parent.basedir}/linkis-engineconn-plugins/engineconn-plugins/spark/target/out/
       </directory>
-      <outputDirectory>share/linkis/ujes/spark</outputDirectory>
+      <outputDirectory>lib/linkis-engineconn-plugins/</outputDirectory>
       <includes>
-        <include>*.zip</include>
+        <include>**/*</include>
       </includes>
     </fileSet>
 
+            <!--hive-->
     <fileSet>
       <directory>
-          ${project.parent.basedir}/ujes/definedEngines/spark/enginemanager/target/
+          ${project.parent.basedir}/linkis-engineconn-plugins/engineconn-plugins/hive/target/out/
       </directory>
-      <outputDirectory>share/linkis/ujes/spark</outputDirectory>
+      <outputDirectory>lib/linkis-engineconn-plugins/</outputDirectory>
       <includes>
-        <include>*.zip</include>
+        <include>**/*</include>
       </includes>
     </fileSet>
 
-    <!--hive-->
+            <!--python-->
     <fileSet>
       <directory>
-          ${project.parent.basedir}/ujes/definedEngines/hive/entrance/target/
+        ${project.parent.basedir}/linkis-engineconn-plugins/engineconn-plugins/python/target/out/
       </directory>
-      <outputDirectory>share/linkis/ujes/hive</outputDirectory>
+      <outputDirectory>lib/linkis-engineconn-plugins/</outputDirectory>
       <includes>
-        <include>*.zip</include>
+        <include>**/*</include>
       </includes>
     </fileSet>
 
+            <!--shell-->
     <fileSet>
       <directory>
-          ${project.parent.basedir}/ujes/definedEngines/hive/enginemanager/target/
+        ${project.parent.basedir}/linkis-engineconn-plugins/engineconn-plugins/shell/target/out/
       </directory>
-      <outputDirectory>share/linkis/ujes/hive</outputDirectory>
+      <outputDirectory>lib/linkis-engineconn-plugins/</outputDirectory>
       <includes>
-        <include>*.zip</include>
-      </includes>
-    </fileSet>
-
-    <!--python-->
-    <fileSet>
-      <directory>
-        ${project.parent.basedir}/ujes/definedEngines/python/entrance/target/
-      </directory>
-      <outputDirectory>share/linkis/ujes/python</outputDirectory>
-      <includes>
-        <include>*.zip</include>
-      </includes>
-    </fileSet>
-
-    <fileSet>
-      <directory>
-        ${project.parent.basedir}/ujes/definedEngines/python/enginemanager/target/
-      </directory>
-      <outputDirectory>share/linkis/ujes/python</outputDirectory>
-      <includes>
-        <include>*.zip</include>
-      </includes>
-    </fileSet>
-
-    <!--shell-->
-    <fileSet>
-      <directory>
-        ${project.parent.basedir}/ujes/definedEngines/shell/entrance/target/
-      </directory>
-      <outputDirectory>share/linkis/ujes/shell</outputDirectory>
-      <includes>
-        <include>*.zip</include>
-      </includes>
-    </fileSet>
-
-    <fileSet>
-      <directory>
-        ${project.parent.basedir}/ujes/definedEngines/shell/enginemanager/target/
-      </directory>
-      <outputDirectory>share/linkis/ujes/shell</outputDirectory>
-      <includes>
-        <include>*.zip</include>
+        <include>**/*</include>
       </includes>
     </fileSet>
 
 
-
-    <!-- &lt;!&ndash;pipeline&ndash;&gt;
-     <fileSet>
-       <directory>
-         ${project.parent.basedir}/ujes/definedEngines/pipeline/entrance/target/
-       </directory>
-       <outputDirectory>share/linkis/ujes/pipeline</outputDirectory>
-       <includes>
-         <include>*.zip</include>
-       </includes>
-     </fileSet>
-
-     <fileSet>
-       <directory>
-         ${project.parent.basedir}/ujes/definedEngines/pipeline/enginemanager/target/
-       </directory>
-       <outputDirectory>share/linkis/ujes/pipeline</outputDirectory>
-       <includes>
-         <include>*.zip</include>
-       </includes>
-     </fileSet>-->
-
-    <!--jdbc-->
-    <fileSet>
-      <directory>
-        ${project.parent.basedir}/ujes/definedEngines/jdbc/entrance/target/
-      </directory>
-      <outputDirectory>share/linkis/ujes/jdbc</outputDirectory>
-      <includes>
-        <include>*.zip</include>
-      </includes>
-    </fileSet>
-
-   <!-- &lt;!&ndash;mlsql&ndash;&gt;
-    <fileSet>
-      <directory>
-        ${project.parent.basedir}/ujes/definedEngines/mlsql/entrance/target/
-      </directory>
-      <outputDirectory>share/linkis/ujes/mlsql</outputDirectory>
-      <includes>
-        <include>*.zip</include>
-      </includes>
-    </fileSet>-->
-
-    <!-- elasticsearch -->
-    <fileSet>
-      <directory>
-        ${project.parent.basedir}/ujes/definedEngines/es/entrance/target/
-      </directory>
-      <outputDirectory>share/linkis/ujes/es</outputDirectory>
-      <includes>
-        <include>*.zip</include>
-      </includes>
-    </fileSet>
-
-    <!-- presto -->
-    <fileSet>
-      <directory>
-        ${project.parent.basedir}/ujes/definedEngines/presto/entrance/target/
-      </directory>
-      <outputDirectory>share/linkis/ujes/presto</outputDirectory>
-      <includes>
-        <include>*.zip</include>
-      </includes>
-    </fileSet>
-
-    <!--resourcemanager-->
-    <fileSet>
-      <directory>
-        ${project.parent.basedir}/resourceManager/resourcemanagerserver/target/
-      </directory>
-      <outputDirectory>share/linkis/rm/</outputDirectory>
-      <includes>
-        <include>*.zip</include>
-      </includes>
-    </fileSet>
-
-    <!--bml-->
-    <fileSet>
-      <directory>
-        ${project.parent.basedir}/bml/bmlserver/target/
-      </directory>
-      <outputDirectory>share/linkis/linkis-bml/</outputDirectory>
-      <includes>
-        <include>*.zip</include>
-      </includes>
-    </fileSet>
-
-    <!--gateway-->
-    <fileSet>
-      <directory>
-        ${project.parent.basedir}/gateway/gateway-ujes-support/target/
-      </directory>
-      <outputDirectory>share/springcloud/gateway/</outputDirectory>
-      <includes>
-        <include>*.zip</include>
-      </includes>
-    </fileSet>
-      <!--eurekaserver-->
+      <!--lib-->
+        <!--linkis-spring-cloud-services-->
+            <!--linkis-gateway-->
       <fileSet>
           <directory>
-              ${project.parent.basedir}/eurekaServer/target/
+              ${project.parent.basedir}/linkis-spring-cloud-services/linkis-service-gateway/linkis-gateway-server-support/target/out/lib
           </directory>
-          <outputDirectory>share/springcloud/eureka/</outputDirectory>
+          <outputDirectory>
+              lib/linkis-spring-cloud-services/linkis-mg-gateway
+          </outputDirectory>
           <includes>
-              <include>*.zip</include>
+              <include>*.jar</include>
           </includes>
       </fileSet>
-      <!--module-->
+
       <fileSet>
           <directory>
-              ${project.parent.basedir}/assembly/public-module/target/
+              ${project.parent.basedir}/linkis-spring-cloud-services/linkis-service-gateway/linkis-gateway-server-support/target/out/conf
           </directory>
-          <outputDirectory>share/linkis/module/</outputDirectory>
+          <outputDirectory>
+              conf/linkis-spring-cloud-services/linkis-mg-gateway
+          </outputDirectory>
           <includes>
-              <include>*.zip</include>
+              <include>*</include>
           </includes>
       </fileSet>
-     <!--publicservice-->
-    <fileSet>
-      <directory>
-        ${project.parent.basedir}/publicService/target/
-      </directory>
-      <outputDirectory>share/linkis/linkis-publicservice/</outputDirectory>
-      <includes>
-        <include>*.zip</include>
-      </includes>
-    </fileSet>
-    <!--database-->
-    <fileSet>
-      <directory>
-        ${project.parent.basedir}/metadata/target/
-      </directory>
-      <outputDirectory>share/linkis/linkis-metadata/</outputDirectory>
-      <includes>
-        <include>*.zip</include>
-      </includes>
-    </fileSet>
-    <!-- context service-->
-    <fileSet>
-      <directory>
-        ${project.parent.basedir}/contextservice/cs-server/target/
-      </directory>
-      <outputDirectory>share/linkis/linkis-cs-server/</outputDirectory>
-      <includes>
-        <include>*.zip</include>
-      </includes>
-    </fileSet>
-    <!--datasource manage server-->
-    <fileSet>
-      <directory>
-        ${project.parent.basedir}/datasource/datasourcemanager/server/target
-      </directory>
-      <outputDirectory>share/linkis/datasource/linkis-dsm-server/</outputDirectory>
-      <includes>
-        <include>*.zip</include>
-      </includes>
-    </fileSet>
 
 
-    <!--metadata manage server-->
-    <fileSet>
-      <directory>
-        ${project.parent.basedir}/datasource/metadatamanager/server/target
-      </directory>
-      <outputDirectory>share/linkis/datasource/linkis-mdm-server/</outputDirectory>
-      <includes>
-        <include>*.zip</include>
-      </includes>
-    </fileSet>
+            <!--linkis-eureka-->
+      <fileSet>
+          <directory>
+              ${project.parent.basedir}/linkis-spring-cloud-services/linkis-service-discovery/linkis-eureka/target/out/lib
+          </directory>
+          <outputDirectory>
+              lib/linkis-spring-cloud-services/linkis-mg-eureka
+          </outputDirectory>
+          <includes>
+              <include>*.jar</include>
+          </includes>
+      </fileSet>
+
+      <fileSet>
+          <directory>
+              ${project.parent.basedir}/linkis-spring-cloud-services/linkis-service-discovery/linkis-eureka/target/out/conf
+          </directory>
+          <outputDirectory>
+              conf/linkis-spring-cloud-services/linkis-mg-eureka
+          </outputDirectory>
+          <includes>
+              <include>*</include>
+          </includes>
+      </fileSet>
+
+      <!--lib-->
+        <!--linkis-commons-->
+            <!--public-module-->
+      <fileSet>
+          <directory>
+              ${project.parent.basedir}/assembly/public-module/target/out/lib
+          </directory>
+          <outputDirectory>lib/linkis-commons/public-module/</outputDirectory>
+          <includes>
+              <include>*.jar</include>
+          </includes>
+      </fileSet>
+
+      <!--lib-->
+        <!--linkis-computation-governance-->
+            <!--linkis-gc-manager-->
+      <fileSet>
+          <directory>
+              ${project.parent.basedir}/linkis-computation-governance/linkis-engineconn-manager/linkis-engineconn-manager-server/target/out/lib
+          </directory>
+          <outputDirectory>
+              lib/linkis-computation-governance/linkis-cg-engineconnmanager
+          </outputDirectory>
+          <includes>
+              <include>*.jar</include>
+          </includes>
+      </fileSet>
+
+      <fileSet>
+          <directory>
+              ${project.parent.basedir}/linkis-computation-governance/linkis-engineconn-manager/linkis-engineconn-manager-server/target/out/conf
+          </directory>
+          <outputDirectory>
+              conf/linkis-computation-governance/linkis-cg-engineconnmanager
+          </outputDirectory>
+          <includes>
+              <include>*</include>
+          </includes>
+      </fileSet>
+
+            <!--engineConnPlugin-->
+      <fileSet>
+          <directory>
+              ${project.parent.basedir}/linkis-engineconn-plugins/linkis-engineconn-plugin-framework/linkis-engineconn-plugin-server/target/out/lib/
+          </directory>
+          <outputDirectory>
+              lib/linkis-computation-governance/linkis-cg-engineplugin
+          </outputDirectory>
+          <includes>
+              <include>*.jar</include>
+          </includes>
+      </fileSet>
+
+      <fileSet>
+          <directory>
+              ${project.parent.basedir}/linkis-engineconn-plugins/linkis-engineconn-plugin-framework/linkis-engineconn-plugin-server/target/out/conf/
+          </directory>
+          <outputDirectory>
+              conf/linkis-computation-governance/linkis-cg-engineplugin
+          </outputDirectory>
+          <includes>
+              <include>*</include>
+          </includes>
+      </fileSet>
+
+            <!--application-manager-->
+      <fileSet>
+          <directory>
+              ${project.parent.basedir}/linkis-computation-governance/linkis-manager/linkis-application-manager/target/out/lib
+          </directory>
+          <outputDirectory>
+              lib/linkis-computation-governance/linkis-cg-linkismanager
+          </outputDirectory>
+          <includes>
+              <include>*.jar</include>
+          </includes>
+      </fileSet>
+
+      <fileSet>
+          <directory>
+              ${project.parent.basedir}/linkis-computation-governance/linkis-manager/linkis-application-manager/target/out/conf
+          </directory>
+          <outputDirectory>
+              conf/linkis-computation-governance/linkis-cg-linkismanager
+          </outputDirectory>
+          <includes>
+              <include>*</include>
+          </includes>
+      </fileSet>
+
+            <!--entrance-->
+      <fileSet>
+          <directory>
+              ${project.parent.basedir}/linkis-computation-governance/linkis-entrance/target/out/lib
+          </directory>
+          <outputDirectory>
+              lib/linkis-computation-governance/linkis-cg-entrance
+          </outputDirectory>
+          <includes>
+              <include>*.jar</include>
+          </includes>
+      </fileSet>
+
+      <fileSet>
+          <directory>
+              ${project.parent.basedir}/linkis-computation-governance/linkis-entrance/target/out/conf
+          </directory>
+          <outputDirectory>
+              conf/linkis-computation-governance/linkis-cg-entrance
+          </outputDirectory>
+          <includes>
+              <include>*</include>
+          </includes>
+      </fileSet>
+
+      <!--lib-->
+        <!--linkis-public-enhancements-->
+            <!--bml-->
+      <fileSet>
+          <directory>
+              ${project.parent.basedir}/linkis-public-enhancements/linkis-bml/linkis-bml-server/target/out/lib
+          </directory>
+          <outputDirectory>
+              lib/linkis-public-enhancements/linkis-ps-bml
+          </outputDirectory>
+          <includes>
+              <include>*.jar</include>
+          </includes>
+      </fileSet>
+
+      <fileSet>
+          <directory>
+              ${project.parent.basedir}/linkis-public-enhancements/linkis-bml/linkis-bml-server/target/out/conf
+          </directory>
+          <outputDirectory>
+              conf/linkis-public-enhancements/linkis-ps-bml
+          </outputDirectory>
+          <includes>
+              <include>*</include>
+          </includes>
+      </fileSet>
+
+            <!--publicservice-->
+      <fileSet>
+          <directory>
+              ${project.parent.basedir}/linkis-public-enhancements/linkis-publicservice/target/out/lib
+          </directory>
+          <outputDirectory>
+              lib/linkis-public-enhancements/linkis-ps-publicservice
+          </outputDirectory>
+          <includes>
+              <include>*.jar</include>
+          </includes>
+      </fileSet>
+
+      <fileSet>
+          <directory>
+              ${project.parent.basedir}/linkis-public-enhancements/linkis-publicservice/target/out/conf
+          </directory>
+          <outputDirectory>
+              conf/linkis-public-enhancements/linkis-ps-publicservice
+          </outputDirectory>
+          <includes>
+              <include>*</include>
+          </includes>
+      </fileSet>
+
+            <!--datasource-->
+      <fileSet>
+          <directory>
+              ${project.parent.basedir}/linkis-public-enhancements/linkis-datasource/linkis-metadata/target/out/lib
+          </directory>
+          <outputDirectory>
+              lib/linkis-public-enhancements/linkis-ps-datasource
+          </outputDirectory>
+          <includes>
+              <include>*.jar</include>
+          </includes>
+      </fileSet>
+
+      <fileSet>
+          <directory>
+              ${project.parent.basedir}/linkis-public-enhancements/linkis-datasource/linkis-metadata/target/out/conf
+          </directory>
+          <outputDirectory>
+              conf/linkis-public-enhancements/linkis-ps-datasource
+          </outputDirectory>
+          <includes>
+              <include>*</include>
+          </includes>
+      </fileSet>
+
+        <!--linkis-contextservice-->
+      <fileSet>
+          <directory>
+              ${project.parent.basedir}/linkis-public-enhancements/linkis-context-service/linkis-cs-server/target/out/lib
+          </directory>
+          <outputDirectory>
+              lib/linkis-public-enhancements/linkis-ps-cs
+          </outputDirectory>
+          <includes>
+              <include>*.jar</include>
+          </includes>
+      </fileSet>
+
+      <fileSet>
+          <directory>
+              ${project.parent.basedir}/linkis-public-enhancements/linkis-context-service/linkis-cs-server/target/out/conf
+          </directory>
+          <outputDirectory>
+              conf/linkis-public-enhancements/linkis-ps-cs
+          </outputDirectory>
+          <includes>
+              <include>*</include>
+          </includes>
+      </fileSet>
+
   </fileSets>
 
-
-
   <dependencySets>
     <dependencySet>
       <outputDirectory>lib</outputDirectory>
@@ -342,4 +410,4 @@
     </dependencySet>
   </dependencySets>
 
-</assembly>
+</assembly>
\ No newline at end of file
diff --git a/bin/checkEnv.sh b/bin/checkEnv.sh
old mode 100755
new mode 100644
diff --git a/bin/checkServices.sh b/bin/checkServices.sh
index 7e53bb5..561277b 100644
--- a/bin/checkServices.sh
+++ b/bin/checkServices.sh
@@ -29,11 +29,9 @@
 MICRO_SERVICE_IP=$2
 MICRO_SERVICE_PORT=$3
 
-
-source ${workDir}/bin/common.sh
 local_host="`hostname --fqdn`"
 
-ipaddr=$(ip addr | awk '/^[0-9]+: / {}; /inet.*global/ {print gensub(/(.*)\/(.*)/, "\\1", "g", $2)}'|awk 'NR==1')
+ipaddr=$(ip addr | awk '/^[0-9]+: / {}; /inet.*global/ {print gensub(/(.*)\/(.*)/, "\\1", "g", $2)}')
 
 function isLocal(){
     if [ "$1" == "127.0.0.1" ];then
@@ -60,7 +58,6 @@
 
 }
 
-
 echo "Start to Check if your microservice:$MICRO_SERVICE_NAME is normal via telnet"
 echo "--------------------------------------------------------------------------------------------------------------------------"
 echo $MICRO_SERVICE_NAME
diff --git a/bin/common.sh b/bin/common.sh
old mode 100755
new mode 100644
index c0ba755..49d5cf7
--- a/bin/common.sh
+++ b/bin/common.sh
@@ -20,7 +20,7 @@
 
 local_host="`hostname --fqdn`"
 
-ipaddr=$(ip addr | awk '/^[0-9]+: / {}; /inet.*global/ {print gensub(/(.*)\/(.*)/, "\\1", "g", $2)}'  | awk 'NR==1')
+ipaddr=$(ip addr | awk '/^[0-9]+: / {}; /inet.*global/ {print gensub(/(.*)\/(.*)/, "\\1", "g", $2)}')
 
 function isLocal(){
     if [ "$1" == "127.0.0.1" ];then
diff --git a/bin/install.sh b/bin/install.sh
old mode 100755
new mode 100644
index b646689..be8cfee
--- a/bin/install.sh
+++ b/bin/install.sh
@@ -17,7 +17,6 @@
 
 #Actively load user env
 source ~/.bash_profile
-
 shellDir=`dirname $0`
 workDir=`cd ${shellDir}/..;pwd`
 
@@ -45,7 +44,14 @@
     exit 1
 fi
 
-source ${workDir}/bin/common.sh
+function isSuccess(){
+if [ $? -ne 0 ]; then
+    echo "Failed to " + $1
+    exit 1
+else
+    echo "Succeed to" + $1
+fi
+}
 
 function checkPythonAndJava(){
     python --version
@@ -83,8 +89,8 @@
 }
 
 function checkSpark(){
-	spark-submit --version
-	isSuccess "execute spark-submit --version"
+ spark-submit --version
+ isSuccess "execute spark-submit --version"
 }
 
 say() {
@@ -113,52 +119,66 @@
 
 ##load config
 echo "step1:load config "
-export LINKIS_CONFIG_PATH=${LINKIS_CONFIG_PATH:-"${workDir}/conf/config.sh"}
+export LINKIS_CONFIG_PATH=${LINKIS_CONFIG_PATH:-"${workDir}/conf/linkis-env.sh"}
 export LINKIS_DB_CONFIG_PATH=${LINKIS_DB_CONFIG_PATH:-"${workDir}/conf/db.sh"}
-export DISTRIBUTION=${DISTRIBUTION:-"${workDir}/conf/config.sh"}
 source ${LINKIS_CONFIG_PATH}
 source ${LINKIS_DB_CONFIG_PATH}
-source ${DISTRIBUTION}
 isSuccess "load config"
+local_host="`hostname --fqdn`"
 
+ipaddr=$(ip addr | awk '/^[0-9]+: / {}; /inet.*global/ {print gensub(/(.*)\/(.*)/, "\\1", "g", $2)}')
 
+function isLocal(){
+    if [ "$1" == "127.0.0.1" ];then
+        return 0
+    elif [ $1 == "localhost" ]; then
+        return 0
+    elif [ $1 == $local_host ]; then
+        return 0
+    elif [ $1 == $ipaddr ]; then
+        return 0
+    fi
+        return 1
+}
 
-##install mode choice
-if [ "$INSTALL_MODE" == "" ];then
-  echo "Please enter the mode selection such as: 1"
-  echo " 1: Lite"
-  echo " 2: Simple"
-  echo " 3: Standard"
-  echo ""
-  read -p "Please input the choice:"  idx
-  INSTALL_MODE=$idx
-fi
+function executeCMD(){
+   isLocal $1
+   flag=$?
+   if [ $flag == "0" ];then
+      echo "Is local execution:$2"
+      eval $2
+   else
+      echo "Is remote execution:$2"
+      ssh -p $SSH_PORT $1 $2
+   fi
 
-if [[ '1' = "$INSTALL_MODE" ]];then
-  echo "You chose Lite installation mode"
-  checkPythonAndJava
-elif [[ '2' = "$INSTALL_MODE" ]];then
-  echo "You chose Simple installation mode"
-  checkPythonAndJava
-  checkHadoopAndHive
-elif [[ '3' = "$INSTALL_MODE" ]];then
-  echo "You chose Standard installation mode"
-  checkPythonAndJava
-  checkHadoopAndHive
-  checkSpark
-else
-  echo "no choice,exit!"
-  exit 1
-fi
+}
+function copyFile(){
+   isLocal $1
+   flag=$?
+   src=$2
+   dest=$3
+   if [ $flag == "0" ];then
+      echo "Is local cp "
+      eval "cp -r $src $dest"
+   else
+      echo "Is remote cp "
+      scp -r -P $SSH_PORT  $src $1:$dest
+   fi
+
+}
+
 
 ##env check
 echo "Do you want to clear Linkis table information in the database?"
 echo " 1: Do not execute table-building statements"
 echo " 2: Dangerous! Clear all data and rebuild the tables"
+echo " other: exit"
 echo ""
 
 MYSQL_INSTALL_MODE=1
 
+#使用read参数[-p]后,允许在[-p]后面跟一字符串,在字符串后面跟n个shell变量。n个shell变量用来接收从shell界面输入的字符串
 read -p "Please input the choice:"  idx
 if [[ '2' = "$idx" ]];then
   MYSQL_INSTALL_MODE=2
@@ -171,7 +191,6 @@
   exit 1
 fi
 
-
 echo "create hdfs  directory and local directory"
 if [ "$WORKSPACE_USER_ROOT_PATH" != "" ]
 then
@@ -183,6 +202,7 @@
   elif [[ $WORKSPACE_USER_ROOT_PATH == hdfs://* ]];then
     localRootDir=${WORKSPACE_USER_ROOT_PATH#hdfs://}
     hdfs dfs -mkdir -p $localRootDir/$deployUser
+    hdfs dfs -chmod -R 775 $localRootDir/$deployUser
   else
     echo "does not support $WORKSPACE_USER_ROOT_PATH filesystem types"
   fi
@@ -190,491 +210,147 @@
 isSuccess "create  $WORKSPACE_USER_ROOT_PATH directory"
 
 
-if [ "$HDFS_USER_ROOT_PATH" != "" ]
+########################  init hdfs and db  ################################
+ if [ "$HDFS_USER_ROOT_PATH" != "" ]
+ then
+     localRootDir=$HDFS_USER_ROOT_PATH
+   if [[ $HDFS_USER_ROOT_PATH == file://* ]];then
+     localRootDir=${HDFS_USER_ROOT_PATH#file://}
+     mkdir -p $localRootDir/$deployUser
+     sudo chmod -R 775 $localRootDir/$deployUser
+   elif [[ $HDFS_USER_ROOT_PATH == hdfs://* ]];then
+     localRootDir=${HDFS_USER_ROOT_PATH#hdfs://}
+     hdfs dfs -mkdir -p $localRootDir/$deployUser
+     hdfs dfs -chmod -R 775 $localRootDir/$deployUser
+   else
+     echo "does not support $HDFS_USER_ROOT_PATH filesystem types"
+   fi
+ fi
+ isSuccess "create  $HDFS_USER_ROOT_PATH directory"
+
+
+ if [ "$RESULT_SET_ROOT_PATH" != "" ]
+ then
+   localRootDir=$RESULT_SET_ROOT_PATH
+   if [[ $RESULT_SET_ROOT_PATH == file://* ]];then
+     localRootDir=${RESULT_SET_ROOT_PATH#file://}
+         mkdir -p $localRootDir/$deployUser
+         sudo chmod -R 775 $localRootDir/$deployUser
+   elif [[ $RESULT_SET_ROOT_PATH == hdfs://* ]];then
+     localRootDir=${RESULT_SET_ROOT_PATH#hdfs://}
+         hdfs dfs -mkdir -p $localRootDir/$deployUser
+         hdfs dfs -chmod -R 775 $localRootDir/$deployUser
+   else
+     echo "does not support $RESULT_SET_ROOT_PATH filesystem types"
+   fi
+ fi
+ isSuccess "create  $RESULT_SET_ROOT_PATH directory"
+
+## sql init
+if [ "$YARN_RESTFUL_URL" != "" ]
 then
-    localRootDir=$HDFS_USER_ROOT_PATH
-  if [[ $HDFS_USER_ROOT_PATH == file://* ]];then
-    localRootDir=${HDFS_USER_ROOT_PATH#file://}
-    mkdir -p $localRootDir/$deployUser
-    sudo chmod -R 775 $localRootDir/$deployUser
-  elif [[ $HDFS_USER_ROOT_PATH == hdfs://* ]];then
-    localRootDir=${HDFS_USER_ROOT_PATH#hdfs://}
-    hdfs dfs -mkdir -p $localRootDir/$deployUser
-  else
-    echo "does not support $HDFS_USER_ROOT_PATH filesystem types"
-  fi
+  sed -i ${txt}  "s#@YARN_RESTFUL_URL#$YARN_RESTFUL_URL#g" $workDir/db/linkis_dml.sql
 fi
-isSuccess "create  $HDFS_USER_ROOT_PATH directory"
 
+common_conf=$workDir/conf/linkis.properties
+SERVER_IP=$local_host
 
-if [ "$RESULT_SET_ROOT_PATH" != "" ]
+##Label set start
+if [ "$SPARK_VERSION" != "" ]
 then
-  localRootDir=$RESULT_SET_ROOT_PATH
-  if [[ $RESULT_SET_ROOT_PATH == file://* ]];then
-    localRootDir=${RESULT_SET_ROOT_PATH#file://}
-        mkdir -p $localRootDir/$deployUser
-        sudo chmod -R 775 $localRootDir/$deployUser
-  elif [[ $RESULT_SET_ROOT_PATH == hdfs://* ]];then
-    localRootDir=${RESULT_SET_ROOT_PATH#hdfs://}
-        hdfs dfs -mkdir -p $localRootDir/$deployUser
-  else
-    echo "does not support $RESULT_SET_ROOT_PATH filesystem types"
-  fi
+  sed -i ${txt}  "s#spark-2.4.3#spark-$SPARK_VERSION#g" $workDir/db/linkis_dml.sql
+  executeCMD $SERVER_IP   "sed -i ${txt}  \"s#\#wds.linkis.spark.engine.version.*#wds.linkis.spark.engine.version=$SPARK_VERSION#g\" $common_conf"
 fi
-isSuccess "create  $RESULT_SET_ROOT_PATH directory"
 
-##init db
+if [ "$HIVE_VERSION" != "" ]
+then
+  sed -i ${txt}  "s#hive-1.2.1#hive-$HIVE_VERSION#g" $workDir/db/linkis_dml.sql
+  executeCMD $SERVER_IP   "sed -i ${txt}  \"s#\#wds.linkis.hive.engine.version.*#wds.linkis.hive.engine.version=$HIVE_VERSION#g\" $common_conf"
+fi
+
+if [ "$PYTHON_VERSION" != "" ]
+then
+  sed -i ${txt}  "s#python-python2#python-$PYTHON_VERSION#g" $workDir/db/linkis_dml.sql
+  executeCMD $SERVER_IP   "sed -i ${txt}  \"s#\#wds.linkis.python.engine.version.*#wds.linkis.python.engine.version=$PYTHON_VERSION#g\" $common_conf"
+fi
+
+##Label set end
+
+
+#init db
 if [[ '2' = "$MYSQL_INSTALL_MODE" ]];then
-    mysql -h$MYSQL_HOST -P$MYSQL_PORT -u$MYSQL_USER -p$MYSQL_PASSWORD --default-character-set=utf8 -e "CREATE DATABASE IF NOT EXISTS $MYSQL_DB DEFAULT CHARSET utf8 COLLATE utf8_general_ci;"
-	mysql -h$MYSQL_HOST -P$MYSQL_PORT -u$MYSQL_USER -p$MYSQL_PASSWORD -D$MYSQL_DB  --default-character-set=utf8 -e "source ${workDir}/db/linkis_ddl.sql"
-	isSuccess "source linkis_ddl.sql"
-	mysql -h$MYSQL_HOST -P$MYSQL_PORT -u$MYSQL_USER -p$MYSQL_PASSWORD -D$MYSQL_DB  --default-character-set=utf8 -e "source ${workDir}/db/linkis_dml.sql"
-	isSuccess "source linkis_dml.sql"
-	echo "Rebuild the table"
+     mysql -h$MYSQL_HOST -P$MYSQL_PORT -u$MYSQL_USER -p$MYSQL_PASSWORD --default-character-set=utf8 -e "CREATE DATABASE IF NOT EXISTS $MYSQL_DB DEFAULT CHARSET utf8 COLLATE utf8_general_ci;"
+  mysql -h$MYSQL_HOST -P$MYSQL_PORT -u$MYSQL_USER -p$MYSQL_PASSWORD -D$MYSQL_DB  --default-character-set=utf8 -e "source ${workDir}/db/linkis_ddl.sql"
+  isSuccess "source linkis_ddl.sql"
+  mysql -h$MYSQL_HOST -P$MYSQL_PORT -u$MYSQL_USER -p$MYSQL_PASSWORD -D$MYSQL_DB  --default-character-set=utf8 -e "source ${workDir}/db/linkis_dml.sql"
+  isSuccess "source linkis_dml.sql"
+  echo "Rebuild the table"
 fi
-
-##Deal special symbol '#'
+###########################################################################
+#Deal special symbol '#'
 HIVE_META_PASSWORD=$(echo ${HIVE_META_PASSWORD//'#'/'\#'})
 MYSQL_PASSWORD=$(echo ${MYSQL_PASSWORD//'#'/'\#'})
 
-##Eurkea install
-SERVER_NAME=eureka
-SERVER_IP=$EUREKA_INSTALL_IP
-SERVER_PORT=$EUREKA_PORT
-SERVER_HOME=$LINKIS_INSTALL_HOME
-echo "$SERVER_NAME-step1: create dir"
-if test -z "$SERVER_IP"
+#Deal common config
+echo "Update common config..."
+
+if test -z "$GATEWAY_INSTALL_IP"
 then
-  SERVER_IP=$local_host
-fi
-EUREKA_URL=http://$SERVER_IP:$EUREKA_PORT/eureka/
-
-if ! executeCMD $SERVER_IP "test -e $SERVER_HOME"; then
-  executeCMD $SERVER_IP  "sudo mkdir -p $SERVER_HOME;sudo chown -R $deployUser:$deployUser $SERVER_HOME"
-  isSuccess "create the dir of $SERVER_HOME"
+  export GATEWAY_INSTALL_IP="`hostname --fqdn`"
 fi
 
-echo "$SERVER_NAME-step2:copy install package"
-copyFile $SERVER_IP ${workDir}/share/springcloud/$SERVER_NAME/$SERVER_NAME.zip $SERVER_HOME
-isSuccess "copy $SERVER_NAME"
-executeCMD $SERVER_IP   "cd $SERVER_HOME/;rm -rf eureka;unzip  $SERVER_NAME.zip > /dev/null;cd -"
-echo "$SERVER_NAME-step3:subsitution conf"
-eureka_conf_path=$SERVER_HOME/$SERVER_NAME/conf/application-$SERVER_NAME.yml
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#port:.*#port: $SERVER_PORT#g\" $eureka_conf_path"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#defaultZone:.*#defaultZone: $EUREKA_URL#g\" $eureka_conf_path"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#hostname:.*#hostname: $SERVER_IP#g\" $eureka_conf_path"
-isSuccess "subsitution conf of $SERVER_NAME"
-echo "<----------------$SERVER_NAME:end------------------->"
-##Eurkea install  end
+executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.server.version.*#wds.linkis.server.version=$LINKIS_SERVER_VERSION#g\" $common_conf"
+executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.gateway.url.*#wds.linkis.gateway.url=http://$GATEWAY_INSTALL_IP:$GATEWAY_PORT#g\" $common_conf"
+executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.eureka.defaultZone.*#wds.linkis.eureka.defaultZone=$EUREKA_URL#g\" $common_conf"
+executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.server.mybatis.datasource.url.*#wds.linkis.server.mybatis.datasource.url=jdbc:mysql://${MYSQL_HOST}:${MYSQL_PORT}/${MYSQL_DB}?characterEncoding=UTF-8#g\" $common_conf"
+executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.server.mybatis.datasource.username.*#wds.linkis.server.mybatis.datasource.username=$MYSQL_USER#g\" $common_conf"
+executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.server.mybatis.datasource.password.*#wds.linkis.server.mybatis.datasource.password=$MYSQL_PASSWORD#g\" $common_conf"
 
+executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.ldap.proxy.url.*#wds.linkis.ldap.proxy.url=$LDAP_URL#g\" $common_conf"
+executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.ldap.proxy.baseDN.*#wds.linkis.ldap.proxy.baseDN=$LDAP_BASEDN#g\" $common_conf"
+executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.ldap.proxy.userNameFormat.*#wds.linkis.ldap.proxy.userNameFormat=$LDAP_USER_NAME_FORMAT#g\" $common_conf"
+executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.admin.user.*#wds.linkis.gateway.admin.user=$deployUser#g\" $common_conf"
+# hadoop config
+executeCMD $SERVER_IP   "sed -i ${txt}  \"s#\#hadoop.config.dir.*#hadoop.config.dir=$HADOOP_CONF_DIR#g\" $common_conf"
+#hive config
+executeCMD $SERVER_IP   "sed -i ${txt}  \"s#\#hive.config.dir.*#hive.config.dir=$HIVE_CONF_DIR#g\" $common_conf"
 
+#spark config
+executeCMD $SERVER_IP   "sed -i ${txt}  \"s#spark.config.dir.*#spark.config.dir=$SPARK_CONF_DIR#g\" $common_conf"
 
-##function
-function installPackage(){
-echo "$SERVER_NAME-step1: create dir"
-if test -z "$SERVER_IP"
-then
-  SERVER_IP=$local_host
-fi
-
-if ! executeCMD $SERVER_IP "test -e $SERVER_HOME"; then
-  executeCMD $SERVER_IP "sudo mkdir -p $SERVER_HOME;sudo chown -R $deployUser:$deployUser $SERVER_HOME"
-  isSuccess "create the dir of  $SERVER_NAME"
-fi
-
-if ! executeCMD $SERVER_IP "test -e $SERVER_HOME/module"; then
-    copyFile $SERVER_IP ${workDir}/share/linkis/module/module.zip $SERVER_HOME
-    isSuccess "cp module.zip"
-    executeCMD $SERVER_IP  "cd $SERVER_HOME/;unzip -o  module.zip > /dev/null;cd -"
-    isSuccess "unzip module.zip"
-fi
-
-echo "$SERVER_NAME-step2:copy install package"
-copyFile $SERVER_IP ${workDir}/share/$PACKAGE_DIR/$SERVER_NAME.zip $SERVER_HOME
-isSuccess "copy  ${SERVER_NAME}.zip"
-executeCMD $SERVER_IP "cd $SERVER_HOME/;rm -rf $SERVER_NAME-bak; mv -f $SERVER_NAME $SERVER_NAME-bak;cd -"
-executeCMD $SERVER_IP "cd $SERVER_HOME/;unzip -o $SERVER_NAME.zip > /dev/null; cd -"
-isSuccess "unzip  ${SERVER_NAME}.zip"
-echo "$SERVER_NAME-step3:subsitution conf"
-SERVER_CONF_PATH=$SERVER_HOME/$SERVER_NAME/conf/application.yml
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#port:.*#port: $SERVER_PORT#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#defaultZone:.*#defaultZone: $EUREKA_URL#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#hostname:.*#hostname: $SERVER_IP#g\" $SERVER_CONF_PATH"
-isSuccess "subsitution conf of $SERVER_NAME"
-}
-##function end
-
-##cp module to em lib
-function emExtraInstallModule(){
-    executeCMD $SERVER_IP  "cd $SERVER_HOME/;cp -f module/lib/* $SERVER_HOME/$SERVER_NAME/lib/;cd -"
-    isSuccess "copy module"
-}
-##replace conf  1. replace if it exists 2.not exists add
-function replaceConf(){
-    option=$1
-    value=$2
-    file=$3
-    executeCMD $SERVER_IP  "grep -q '^$option' $file && sed -i ${txt} 's/^$option.*/$option=$value/' $file || echo '$option=$value' >> $file"
-    isSuccess "copy module"
-}
-
-
-##GateWay Install
-PACKAGE_DIR=springcloud/gateway
-SERVER_NAME=linkis-gateway
-SERVER_IP=$GATEWAY_INSTALL_IP
-SERVER_PORT=$GATEWAY_PORT
-SERVER_HOME=$LINKIS_INSTALL_HOME
-if test -z "$SERVER_IP"
-then
-  GATEWAY_INSTALL_IP=$local_host
-fi
-
-###install dir
-installPackage
-###update linkis.properties
-echo "$SERVER_NAME-step4:update linkis conf"
-SERVER_CONF_PATH=$SERVER_HOME/$SERVER_NAME/conf/linkis.properties
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.ldap.proxy.url.*#wds.linkis.ldap.proxy.url=$LDAP_URL#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.ldap.proxy.baseDN.*#wds.linkis.ldap.proxy.baseDN=$LDAP_BASEDN#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.gateway.admin.user.*#wds.linkis.gateway.admin.user=$deployUser#g\" $SERVER_CONF_PATH"
-isSuccess "subsitution linkis.properties of $SERVER_NAME"
-echo "<----------------$SERVER_NAME:end------------------->"
-##GateWay Install end
-
-##publicservice install
-PACKAGE_DIR=linkis/linkis-publicservice
-SERVER_NAME=linkis-publicservice
-SERVER_IP=$PUBLICSERVICE_INSTALL_IP
-SERVER_PORT=$PUBLICSERVICE_PORT
-SERVER_HOME=$LINKIS_INSTALL_HOME
-###install dir
-installPackage
-###update linkis.properties
-echo "$SERVER_NAME-step4:update linkis conf"
-SERVER_CONF_PATH=$SERVER_HOME/$SERVER_NAME/conf/linkis.properties
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.server.mybatis.datasource.url.*#wds.linkis.server.mybatis.datasource.url=jdbc:mysql://${MYSQL_HOST}:${MYSQL_PORT}/${MYSQL_DB}?characterEncoding=UTF-8#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.server.mybatis.datasource.username.*#wds.linkis.server.mybatis.datasource.username=$MYSQL_USER#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.server.mybatis.datasource.password.*#wds.linkis.server.mybatis.datasource.password=$MYSQL_PASSWORD#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.workspace.filesystem.localuserrootpath.*#wds.linkis.workspace.filesystem.localuserrootpath=$WORKSPACE_USER_ROOT_PATH#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.workspace.filesystem.hdfsuserrootpath.prefix.*#wds.linkis.workspace.filesystem.hdfsuserrootpath.prefix=$HDFS_USER_ROOT_PATH#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#\#hadoop.config.dir.*#hadoop.config.dir=$HADOOP_CONF_DIR#g\" $SERVER_CONF_PATH"
-replaceConf "wds.linkis.gateway.url" "http://$GATEWAY_INSTALL_IP:$GATEWAY_PORT" "$SERVER_CONF_PATH"
-isSuccess "subsitution linkis.properties of $SERVER_NAME"
-echo "<----------------$SERVER_NAME:end------------------->"
-##publicservice end
-
-##ResourceManager install
-PACKAGE_DIR=linkis/rm
-SERVER_NAME=linkis-resourcemanager
-SERVER_IP=$RESOURCEMANAGER_INSTALL_IP
-SERVER_PORT=$RESOURCEMANAGER_PORT
-SERVER_HOME=$LINKIS_INSTALL_HOME
-###install dir
-installPackage
-###update linkis.properties
-echo "$SERVER_NAME-step4:update linkis conf"
-SERVER_CONF_PATH=$SERVER_HOME/$SERVER_NAME/conf/linkis.properties
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.server.mybatis.datasource.url.*#wds.linkis.server.mybatis.datasource.url=jdbc:mysql://${MYSQL_HOST}:${MYSQL_PORT}/${MYSQL_DB}?characterEncoding=UTF-8#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.server.mybatis.datasource.username.*#wds.linkis.server.mybatis.datasource.username=$MYSQL_USER#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.server.mybatis.datasource.password.*#wds.linkis.server.mybatis.datasource.password=$MYSQL_PASSWORD#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#\#hadoop.config.dir.*#hadoop.config.dir=$HADOOP_CONF_DIR#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "rm $SERVER_HOME/$SERVER_NAME/lib/json4s-*3.5.3.jar"
-echo "subsitution linkis.properties of $SERVER_NAME"
-echo "<----------------$SERVER_NAME:end------------------->"
-##ResourceManager install end
-
-
-##PythonEM install
-PACKAGE_DIR=linkis/ujes/python
-SERVER_NAME=linkis-ujes-python-enginemanager
-SERVER_IP=$PYTHON_INSTALL_IP
-SERVER_PORT=$PYTHON_EM_PORT
-SERVER_HOME=$LINKIS_INSTALL_HOME
-###install dir
-installPackage
-emExtraInstallModule
-###update linkis.properties
-echo "$SERVER_NAME-step4:update linkis conf"
-SERVER_CONF_PATH=$SERVER_HOME/$SERVER_NAME/conf/linkis.properties
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.enginemanager.sudo.script.*#wds.linkis.enginemanager.sudo.script=$SERVER_HOME/$SERVER_NAME/bin/rootScript.sh#g\" $SERVER_CONF_PATH"
-SERVER_ENGINE_CONF_PATH=$SERVER_HOME/$SERVER_NAME/conf/linkis-engine.properties
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#\#hadoop.config.dir.*#hadoop.config.dir=$HADOOP_CONF_DIR#g\" $SERVER_ENGINE_CONF_PATH"
-replaceConf "wds.linkis.gateway.url" "http://$GATEWAY_INSTALL_IP:$GATEWAY_PORT" "$SERVER_ENGINE_CONF_PATH"
-isSuccess "subsitution linkis.properties of $SERVER_NAME"
-echo "<----------------$SERVER_NAME:end------------------->"
-
-
-##PythonEntrance install
-PACKAGE_DIR=linkis/ujes/python
-SERVER_NAME=linkis-ujes-python-entrance
-SERVER_PORT=$PYTHON_ENTRANCE_PORT
-###install dir
-installPackage
-###update linkis.properties
-echo "$SERVER_NAME-step4:update linkis conf"
-SERVER_CONF_PATH=$SERVER_HOME/$SERVER_NAME/conf/linkis.properties
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.entrance.config.logPath.*#wds.linkis.entrance.config.logPath=$WORKSPACE_USER_ROOT_PATH#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.resultSet.store.path.*#wds.linkis.resultSet.store.path=$RESULT_SET_ROOT_PATH#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#\#hadoop.config.dir.*#hadoop.config.dir=$HADOOP_CONF_DIR#g\" $SERVER_CONF_PATH"
-replaceConf "wds.linkis.gateway.url" "http://$GATEWAY_INSTALL_IP:$GATEWAY_PORT" "$SERVER_CONF_PATH"
-isSuccess "subsitution linkis.properties of $SERVER_NAME"
-echo "<----------------$SERVER_NAME:end------------------->"
-##PythonEntrance install end
-
-if [[ '1' = "$INSTALL_MODE" ]];then
-	echo "Lite install end"
-	exit 0
-fi
-
-##BML install
-PACKAGE_DIR=linkis/linkis-bml
-SERVER_NAME=linkis-bml
-SERVER_IP=$BML_INSTALL_IP
-SERVER_PORT=$BML_PORT
-SERVER_HOME=$LINKIS_INSTALL_HOME
-###install dir
-installPackage
-###update linkis.properties
-echo "$SERVER_NAME-step4:update linkis conf"
-SERVER_CONF_PATH=$SERVER_HOME/$SERVER_NAME/conf/linkis.properties
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.server.mybatis.datasource.url.*#wds.linkis.server.mybatis.datasource.url=jdbc:mysql://${MYSQL_HOST}:${MYSQL_PORT}/${MYSQL_DB}?characterEncoding=UTF-8#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.server.mybatis.datasource.username.*#wds.linkis.server.mybatis.datasource.username=$MYSQL_USER#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.server.mybatis.datasource.password.*#wds.linkis.server.mybatis.datasource.password=$MYSQL_PASSWORD#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#\#hadoop.config.dir.*#hadoop.config.dir=$HADOOP_CONF_DIR#g\" $SERVER_CONF_PATH"
-isSuccess "subsitution linkis.properties of $SERVERNAME"
-echo "<----------------$SERVER_NAME:end------------------->"
-##BML end
-
-##linkis-metadata install
-PACKAGE_DIR=linkis/linkis-metadata
-SERVER_NAME=linkis-metadata
-SERVER_IP=$METADATA_INSTALL_IP
-SERVER_PORT=$METADATA_PORT
-SERVER_HOME=$LINKIS_INSTALL_HOME
-###install dir
-installPackage
-###update linkis.properties
-echo "$SERVER_NAME-step4:update linkis conf"
-SERVER_CONF_PATH=$SERVER_HOME/$SERVER_NAME/conf/linkis.properties
-executeCMD $SERVER_IP  "sed -i ${txt}  \"s#wds.linkis.server.mybatis.datasource.url.*#wds.linkis.server.mybatis.datasource.url=jdbc:mysql://${MYSQL_HOST}:${MYSQL_PORT}/${MYSQL_DB}?characterEncoding=UTF-8#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP  "sed -i ${txt}  \"s#wds.linkis.server.mybatis.datasource.username.*#wds.linkis.server.mybatis.datasource.username=$MYSQL_USER#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP  "sed -i ${txt}  \"s#wds.linkis.server.mybatis.datasource.password.*#wds.linkis.server.mybatis.datasource.password=$MYSQL_PASSWORD#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#\#hive.config.dir.*#hive.config.dir=$HIVE_CONF_DIR#g\" $SERVER_CONF_PATH"
 if [ "$HIVE_META_URL" != "" ]
 then
-  executeCMD $SERVER_IP   "sed -i ${txt}  \"s#hive.meta.url.*#hive.meta.url=$HIVE_META_URL#g\" $SERVER_CONF_PATH"
+  executeCMD $SERVER_IP   "sed -i ${txt}  \"s#hive.meta.url.*#hive.meta.url=$HIVE_META_URL#g\" $common_conf"
 fi
 if [ "$HIVE_META_USER" != "" ]
 then
-  executeCMD $SERVER_IP   "sed -i ${txt}  \"s#hive.meta.user.*#hive.meta.user=$HIVE_META_USER#g\" $SERVER_CONF_PATH"
+  executeCMD $SERVER_IP   "sed -i ${txt}  \"s#hive.meta.user.*#hive.meta.user=$HIVE_META_USER#g\" $common_conf"
 fi
 if [ "$HIVE_META_PASSWORD" != "" ]
 then
   HIVE_META_PASSWORD=$(echo ${HIVE_META_PASSWORD//'#'/'\#'})
-  executeCMD $SERVER_IP   "sed -i ${txt}  \"s#hive.meta.password.*#hive.meta.password=$HIVE_META_PASSWORD#g\" $SERVER_CONF_PATH"
-fi
-isSuccess "subsitution linkis.properties of $SERVER_NAME"
-echo "<----------------$SERVER_NAME:end------------------->"
-##metadata end
-
-##linkis-cs-server install
-PACKAGE_DIR=linkis/linkis-cs-server
-SERVER_NAME=linkis-cs-server
-SERVER_IP=$CS_INSTALL_IP
-SERVER_PORT=$CS_PORT
-SERVER_HOME=$LINKIS_INSTALL_HOME
-###install dir
-installPackage
-###update linkis.properties
-echo "$SERVER_NAME-step4:update linkis conf"
-SERVER_CONF_PATH=$SERVER_HOME/$SERVER_NAME/conf/linkis.properties
-executeCMD $SERVER_IP  "sed -i ${txt}  \"s#wds.linkis.server.mybatis.datasource.url.*#wds.linkis.server.mybatis.datasource.url=jdbc:mysql://${MYSQL_HOST}:${MYSQL_PORT}/${MYSQL_DB}?characterEncoding=UTF-8#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP  "sed -i ${txt}  \"s#wds.linkis.server.mybatis.datasource.username.*#wds.linkis.server.mybatis.datasource.username=$MYSQL_USER#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP  "sed -i ${txt}  \"s#wds.linkis.server.mybatis.datasource.password.*#wds.linkis.server.mybatis.datasource.password=$MYSQL_PASSWORD#g\" $SERVER_CONF_PATH"
-isSuccess "subsitution linkis.properties of $SERVER_NAME"
-echo "<----------------$SERVER_NAME:end------------------->"
-##cs end
-
-##HiveEM install
-PACKAGE_DIR=linkis/ujes/hive
-SERVER_NAME=linkis-ujes-hive-enginemanager
-SERVER_IP=$HIVE_INSTALL_IP
-SERVER_PORT=$HIVE_EM_PORT
-SERVER_HOME=$LINKIS_INSTALL_HOME
-###install dir
-installPackage
-emExtraInstallModule
-###update linkis.properties
-echo "$SERVER_NAME-step4:update linkis conf"
-SERVER_CONF_PATH=$SERVER_HOME/$SERVER_NAME/conf/linkis.properties
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.enginemanager.sudo.script.*#wds.linkis.enginemanager.sudo.script=$SERVER_HOME/$SERVER_NAME/bin/rootScript.sh#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#\#hadoop.config.dir.*#hadoop.config.dir=$HADOOP_CONF_DIR#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#\#hive.config.dir.*#hive.config.dir=$HIVE_CONF_DIR#g\" $SERVER_CONF_PATH"
-SERVER_ENGINE_CONF_PATH=$SERVER_HOME/$SERVER_NAME/conf/linkis-engine.properties
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#\#hadoop.config.dir.*#hadoop.config.dir=$HADOOP_CONF_DIR#g\" $SERVER_ENGINE_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#\#hive.config.dir.*#hive.config.dir=$HIVE_CONF_DIR#g\" $SERVER_ENGINE_CONF_PATH"
-replaceConf "wds.linkis.gateway.url" "http://$GATEWAY_INSTALL_IP:$GATEWAY_PORT" "$SERVER_ENGINE_CONF_PATH"
-isSuccess "subsitution linkis.properties of $SERVER_NAME"
-executeCMD $SERVER_IP   "rm $SERVER_HOME/$SERVER_NAME/lib/guava-25.1-jre.jar"
-executeCMD $SERVER_IP   "rm $SERVER_HOME/$SERVER_NAME/lib/servlet-api-2.5.jar"
-echo "<----------------$SERVER_NAME:end------------------->"
-##HiveEM install end
-
-##HiveEntrance install
-PACKAGE_DIR=linkis/ujes/hive
-SERVER_NAME=linkis-ujes-hive-entrance
-SERVER_PORT=$HIVE_ENTRANCE_PORT
-###install dir
-installPackage
-###update linkis.properties
-echo "$SERVER_NAME-step4:update linkis conf"
-SERVER_CONF_PATH=$SERVER_HOME/$SERVER_NAME/conf/linkis.properties
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.entrance.config.logPath.*#wds.linkis.entrance.config.logPath=$WORKSPACE_USER_ROOT_PATH#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.resultSet.store.path.*#wds.linkis.resultSet.store.path=$RESULT_SET_ROOT_PATH#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#\#hadoop.config.dir.*#hadoop.config.dir=$HADOOP_CONF_DIR#g\" $SERVER_CONF_PATH"
-replaceConf "wds.linkis.gateway.url" "http://$GATEWAY_INSTALL_IP:$GATEWAY_PORT" "$SERVER_CONF_PATH"
-isSuccess "subsitution linkis.properties of $SERVER_NAME"
-echo "<----------------$SERVER_NAME:end------------------->"
-##HiveEntrance install end
-
-
-if [[ '2' = "$INSTALL_MODE" ]];then
-	echo "Simple install end"
-	exit 0
+  executeCMD $SERVER_IP   "sed -i ${txt}  \"s#hive.meta.password.*#hive.meta.password=$HIVE_META_PASSWORD#g\" $common_conf"
 fi
 
-if [[ '3' != "$INSTALL_MODE" ]];then
-	exit 0
+
+executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.filesystem.root.path.*#wds.linkis.filesystem.root.path=$WORKSPACE_USER_ROOT_PATH#g\" $common_conf"
+executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.filesystem.hdfs.root.path.*#wds.linkis.filesystem.hdfs.root.path=$HDFS_USER_ROOT_PATH#g\" $common_conf"
+
+# engineconn
+if test -z $ENGINECONN_ROOT_PATH
+then
+  ENGINECONN_ROOT_PATH=$workDir/engineroot
 fi
+executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.engineconn.root.dir.*#wds.linkis.engineconn.root.dir=$ENGINECONN_ROOT_PATH#g\" $common_conf"
+executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.engineconn.home.*#wds.linkis.engineconn.home=${workDir}/lib/linkis-engineconn-plugins#g\" $common_conf"
+executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.engineconn.plugin.loader.store.path.*#wds.linkis.engineconn.plugin.loader.store.path=${workDir}/lib/linkis-engineconn-plugins#g\" $common_conf"
 
-##SparkEM install
-PACKAGE_DIR=linkis/ujes/spark
-SERVER_NAME=linkis-ujes-spark-enginemanager
-SERVER_IP=$SPARK_INSTALL_IP
-SERVER_PORT=$SPARK_EM_PORT
-SERVER_HOME=$LINKIS_INSTALL_HOME
-###install dir
-installPackage
-emExtraInstallModule
-###update linkis.properties
-echo "$SERVER_NAME-step4:update linkis conf"
-SERVER_CONF_PATH=$SERVER_HOME/$SERVER_NAME/conf/linkis.properties
-ENGINE_CONF_PATH=$SERVER_HOME/$SERVER_NAME/conf/linkis-engine.properties
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.enginemanager.sudo.script.*#wds.linkis.enginemanager.sudo.script=$SERVER_HOME/$SERVER_NAME/bin/rootScript.sh#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.enginemanager.core.jar.*#wds.linkis.enginemanager.core.jar=$SERVER_HOME/$SERVER_NAME/lib/linkis-ujes-spark-engine-$LINKIS_VERSION.jar#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.spark.driver.conf.mainjar.*#wds.linkis.spark.driver.conf.mainjar=$SERVER_HOME/$SERVER_NAME/conf:$SERVER_HOME/$SERVER_NAME/lib/*#g\" $SERVER_CONF_PATH"
-SERVER_ENGINE_CONF_PATH=$SERVER_HOME/$SERVER_NAME/conf/linkis-engine.properties
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#\#hadoop.config.dir.*#hadoop.config.dir=$HADOOP_CONF_DIR#g\" $SERVER_ENGINE_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#\#spark.config.dir.*#spark.config.dir=$SPARK_CONF_DIR#g\" $SERVER_ENGINE_CONF_PATH"
-replaceConf "wds.linkis.gateway.url" "http://$GATEWAY_INSTALL_IP:$GATEWAY_PORT" "$SERVER_ENGINE_CONF_PATH"
-isSuccess "subsitution linkis.properties of $SERVER_NAME"
-echo "<----------------$SERVER_NAME:end------------------->"
-##SparkEM install end
+# common lib
+executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.public_module.path.*#wds.linkis.public_module.path=${workDir}/lib/linkis-commons/public-module#g\" $common_conf"
 
-##SparkEntrance install
-PACKAGE_DIR=linkis/ujes/spark
-SERVER_NAME=linkis-ujes-spark-entrance
-SERVER_PORT=$SPARK_ENTRANCE_PORT
-###install dir
-installPackage
-###update linkis.properties
-echo "$SERVER_NAME-step4:update linkis conf"
-SERVER_CONF_PATH=$SERVER_HOME/$SERVER_NAME/conf/linkis.properties
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.entrance.config.logPath.*#wds.linkis.entrance.config.logPath=$WORKSPACE_USER_ROOT_PATH#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.resultSet.store.path.*#wds.linkis.resultSet.store.path=$HDFS_USER_ROOT_PATH#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#\#hadoop.config.dir.*#hadoop.config.dir=$HADOOP_CONF_DIR#g\" $SERVER_CONF_PATH"
-replaceConf "wds.linkis.gateway.url" "http://$GATEWAY_INSTALL_IP:$GATEWAY_PORT" "$SERVER_CONF_PATH"
-isSuccess "subsitution linkis.properties of $SERVER_NAME"
-echo "<----------------$SERVER_NAME:end------------------->"
-##SparkEntrance install end
-
-
-##JDBCEntrance install
-PACKAGE_DIR=linkis/ujes/jdbc
-SERVER_NAME=linkis-ujes-jdbc-entrance
-SERVER_IP=$JDBC_INSTALL_IP
-SERVER_PORT=$JDBC_ENTRANCE_PORT
-###install dir
-installPackage
-###update linkis.properties
-echo "$SERVER_NAME-step4:update linkis conf"
-SERVER_CONF_PATH=$SERVER_HOME/$SERVER_NAME/conf/linkis.properties
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.entrance.config.logPath.*#wds.linkis.entrance.config.logPath=$WORKSPACE_USER_ROOT_PATH#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.resultSet.store.path.*#wds.linkis.resultSet.store.path=$HDFS_USER_ROOT_PATH#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#\#hadoop.config.dir.*#hadoop.config.dir=$HADOOP_CONF_DIR#g\" $SERVER_CONF_PATH"
-replaceConf "wds.linkis.gateway.url" "http://$GATEWAY_INSTALL_IP:$GATEWAY_PORT" "$SERVER_CONF_PATH"
-isSuccess "subsitution linkis.properties of $SERVER_NAME"
-echo "<----------------$SERVER_NAME:end------------------->"
-##JDBCEntrance install end
-
-
-##ShellEM install
-PACKAGE_DIR=linkis/ujes/shell
-SERVER_NAME=linkis-ujes-shell-enginemanager
-SERVER_IP=$SHELL_INSTALL_IP
-SERVER_PORT=$SHELL_EM_PORT
-SERVER_HOME=$LINKIS_INSTALL_HOME
-###install dir
-installPackage
-emExtraInstallModule
-###update linkis.properties
-echo "$SERVER_NAME-step4:update linkis conf"
-SERVER_CONF_PATH=$SERVER_HOME/$SERVER_NAME/conf/linkis.properties
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#wds.linkis.enginemanager.sudo.script.*#wds.linkis.enginemanager.sudo.script=$SERVER_HOME/$SERVER_NAME/bin/rootScript.sh#g\" $SERVER_CONF_PATH"
-SERVER_ENGINE_CONF_PATH=$SERVER_HOME/$SERVER_NAME/conf/linkis-engine.properties
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#\#hadoop.config.dir.*#hadoop.config.dir=$HADOOP_CONF_DIR#g\" $SERVER_ENGINE_CONF_PATH"
-replaceConf "wds.linkis.gateway.url" "http://$GATEWAY_INSTALL_IP:$GATEWAY_PORT" "$SERVER_ENGINE_CONF_PATH"
-isSuccess "subsitution linkis.properties of $SERVER_NAME"
-echo "<----------------$SERVER_NAME:end------------------->"
-
-##SHELLEntrance install
-PACKAGE_DIR=linkis/ujes/shell
-SERVER_NAME=linkis-ujes-shell-entrance
-SERVER_PORT=$SHELL_ENTRANCE_PORT
-###install dir
-installPackage
-###update linkis.properties
-echo "$SERVER_NAME-step4:update linkis conf"
-SERVER_CONF_PATH=$SERVER_HOME/$SERVER_NAME/conf/linkis.properties
-executeCMD $SERVER_IP   "sed -i ${txt}  \"s#\#hadoop.config.dir.*#hadoop.config.dir=$HADOOP_CONF_DIR#g\" $SERVER_CONF_PATH"
-replaceConf "wds.linkis.gateway.url" "http://$GATEWAY_INSTALL_IP:$GATEWAY_PORT" "$SERVER_CONF_PATH"
-isSuccess "subsitution linkis.properties of $SERVER_NAME"
-echo "<----------------$SERVER_NAME:end------------------->"
-##SHELLEntrance install end
-
-
-##Datasource Manager Server install
-PACKAGE_DIR=linkis/datasource/linkis-dsm-server
-SERVER_NAME=linkis-dsm-server
-SERVER_PORT=$DSM_PORT
-###install dir
-installPackage
-###update linkis.properties
-echo "$SERVER_NAME-step4:update linkis conf"
-SERVER_CONF_PATH=$SERVER_HOME/$SERVER_NAME/conf/linkis.properties
-executeCMD $SERVER_IP  "sed -i ${txt}  \"s#wds.linkis.server.mybatis.datasource.url.*#wds.linkis.server.mybatis.datasource.url=jdbc:mysql://${MYSQL_HOST}:${MYSQL_PORT}/${MYSQL_DB}?characterEncoding=UTF-8#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP  "sed -i ${txt}  \"s#wds.linkis.server.mybatis.datasource.username.*#wds.linkis.server.mybatis.datasource.username=$MYSQL_USER#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP  "sed -i ${txt}  \"s#wds.linkis.server.mybatis.datasource.password.*#wds.linkis.server.mybatis.datasource.password=$MYSQL_PASSWORD#g\" $SERVER_CONF_PATH"
-executeCMD $SERVER_IP  "sed -i ${txt}  \"s#wds.linkis.server.dsm.admin.users.*#wds.linkis.server.dsm.admin.users=$deployUser#g\" $SERVER_CONF_PATH"
-replaceConf "wds.linkis.gateway.url" "http://$GATEWAY_INSTALL_IP:$GATEWAY_PORT" "$SERVER_CONF_PATH"
-isSuccess "subsitution linkis.properties of $SERVER_NAME"
-echo "<----------------$SERVER_NAME:end------------------->"
-##Datasource Manager Server install end
+echo "Congratulations! You have installed Linkis $LINKIS_VERSION successfully, please use sbin/start-all.sh to start it!"
 
 
 
-##Metadata Manager Server install
-PACKAGE_DIR=linkis/datasource/linkis-mdm-server
-SERVER_NAME=linkis-mdm-server
-SERVER_PORT=$MDM_PORT
-###install dir
-installPackage
-###update linkis.properties
-echo "$SERVER_NAME-step4:update linkis conf"
-SERVER_CONF_PATH=$SERVER_HOME/$SERVER_NAME/conf/linkis.properties
-replaceConf "wds.linkis.gateway.url" "http://$GATEWAY_INSTALL_IP:$GATEWAY_PORT" "$SERVER_CONF_PATH"
-isSuccess "subsitution linkis.properties of $SERVER_NAME"
-echo "<----------------$SERVER_NAME:end------------------->"
-##Metadata Manager Server install end
+
 
diff --git a/bin/start-all.sh b/bin/start-all.sh
deleted file mode 100755
index 05f5046..0000000
--- a/bin/start-all.sh
+++ /dev/null
@@ -1,314 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-
-
-# Start all linkis applications
-info="We will start all linkis applications, it will take some time, please wait"
-echo ${info}
-
-#Actively load user env
-source /etc/profile
-source ~/.bash_profile
-
-shellDir=`dirname $0`
-workDir=`cd ${shellDir}/..;pwd`
-
-CONF_DIR="${workDir}"/conf
-export LINKIS_DSS_CONF_FILE=${LINKIS_DSS_CONF_FILE:-"${CONF_DIR}/config.sh"}
-export DISTRIBUTION=${DISTRIBUTION:-"${CONF_DIR}/config.sh"}
-#source $LINKIS_DSS_CONF_FILE
-source ${DISTRIBUTION}
-
-source ${workDir}/bin/common.sh
-
-
-local_host="`hostname --fqdn`"
-
-ipaddr=$(ip addr | awk '/^[0-9]+: / {}; /inet.*global/ {print gensub(/(.*)\/(.*)/, "\\1", "g", $2)}'|awk 'NR==1')
-
-function isLocal(){
-    if [ "$1" == "127.0.0.1" ];then
-        return 0
-    elif [ $1 == "localhost" ]; then
-        return 0
-    elif [ $1 == $local_host ]; then
-        return 0
-    elif [ $1 == $ipaddr ]; then
-        return 0
-    fi
-        return 1
-}
-
-function executeCMD(){
-   isLocal $1
-   flag=$?
-   echo "Is local "$flag
-   if [ $flag == "0" ];then
-      eval $2
-   else
-      ssh -p $SSH_PORT $1 $2
-   fi
-
-}
-
-
-#if there is no LINKIS_INSTALL_HOME,we need to source config again
-if [ -z ${LINKIS_INSTALL_HOME} ];then
-    echo "Info: LINKIS_INSTALL_HOME does not exist, we will source config"
-    if [ ! -f "${LINKIS_DSS_CONF_FILE}" ];then
-        echo "Error: can not find config file, start applications failed"
-        exit 1
-    else
-        source ${LINKIS_DSS_CONF_FILE}
-    fi
-fi
-APP_PREFIX="linkis-"
-
-function startApp(){
-echo "<-------------------------------->"
-echo "Begin to start $SERVER_NAME"
-SERVER_PATH=${APP_PREFIX}${SERVER_NAME}
-
-SERVER_BIN=${LINKIS_INSTALL_HOME}/${SERVER_PATH}/bin
-SERVER_LOCAL_START_CMD="dos2unix ${SERVER_BIN}/* > /dev/null 2>&1; dos2unix ${SERVER_BIN}/../conf/* > /dev/null 2>&1; sh ${SERVER_BIN}/start-${SERVER_NAME}.sh"
-SERVER_REMOTE_START_CMD="source /etc/profile;source ~/.bash_profile;cd ${SERVER_BIN}; dos2unix ./* > /dev/null 2>&1; dos2unix ../conf/* > /dev/null 2>&1; sh start-${SERVER_NAME}.sh > /dev/null 2>&1"
-if test -z "$SERVER_IP"
-then
-  SERVER_IP=$local_host
-fi
-
-if ! executeCMD $SERVER_IP "test -e $SERVER_BIN"; then
-  echo "$SERVER_NAME is not installed,the startup steps will be skipped"
-  return
-fi
-
-isLocal $SERVER_IP
-flag=$?
-echo "Is local "$flag
-if [ $flag == "0" ];then
-   eval $SERVER_LOCAL_START_CMD
-else
-   ssh -p $SSH_PORT $SERVER_IP $SERVER_REMOTE_START_CMD
-fi
-isSuccess "End to start $SERVER_NAME"
-echo "<-------------------------------->"
-sleep 3
-}
-
-
-#eureka
-SERVER_NAME="eureka"
-APP_PREFIX=""
-SERVER_IP=$EUREKA_INSTALL_IP
-startApp
-
-
-APP_PREFIX="linkis-"
-#gateway
-SERVER_NAME="gateway"
-SERVER_IP=$GATEWAY_INSTALL_IP
-startApp
-
-#publicservice
-SERVER_NAME="publicservice"
-SERVER_IP=$PUBLICSERVICE_INSTALL_IP
-startApp
-
-
-#metadata
-SERVER_NAME="metadata"
-SERVER_IP=$METADATA_INSTALL_IP
-startApp
-
-#bml
-SERVER_NAME="bml"
-SERVER_IP=$BML_INSTALL_IP
-startApp
-
-#cs-server
-SERVER_NAME="cs-server"
-SERVER_IP=$CS_INSTALL_IP
-startApp
-
-#datasource management
-SERVER_NAME="dsm-server"
-SERVER_IP=$DSM_INSTALL_IP
-startApp
-
-#metadata management
-SERVER_NAME="mdm-server"
-SERVER_IP=$MDM_INSTALL_IP
-startApp
-
-#resourcemanager
-SERVER_NAME="resourcemanager"
-SERVER_IP=$RESOURCEMANAGER_INSTALL_IP
-startApp
-echo "sleep 15 seconds to wait RM to be ready"
-sleep 15
-
-APP_PREFIX="linkis-ujes-"
-
-#python-entrance
-SERVER_NAME="python-entrance"
-SERVER_IP=$PYTHON_INSTALL_IP
-startApp
-
-#python-enginemanager
-SERVER_NAME="python-enginemanager"
-SERVER_IP=$PYTHON_INSTALL_IP
-startApp
-
-#shell-entrance
-SERVER_NAME="shell-entrance"
-SERVER_IP=$SHELL_INSTALL_IP
-startApp
-
-#shell-enginemanager
-SERVER_NAME="shell-enginemanager"
-SERVER_IP=$SHELL_INSTALL_IP
-startApp
-
-#spark-entrance
-SERVER_NAME="spark-entrance"
-SERVER_IP=$SPARK_INSTALL_IP
-startApp
-
-#spark-enginemanager
-SERVER_NAME="spark-enginemanager"
-SERVER_IP=$SPARK_INSTALL_IP
-startApp
-
-#hive-entrance
-SERVER_NAME="hive-entrance"
-SERVER_IP=$HIVE_INSTALL_IP
-startApp
-
-
-#hive-enginemanager
-SERVER_NAME="hive-enginemanager"
-SERVER_IP=$HIVE_INSTALL_IP
-startApp
-
-
-#JDBCEntrance
-SERVER_NAME="jdbc-entrance"
-SERVER_IP=$JDBC_INSTALL_IP
-startApp
-
-
-
-echo "start-all shell script executed completely"
-
-echo "Start to check all dss microservice"
-
-function checkServer(){
-echo "<-------------------------------->"
-echo "Begin to check $SERVER_NAME"
-if test -z "$SERVER_IP"
-then
-  SERVER_IP=$local_host
-fi
-
-SERVER_BIN=${LINKIS_INSTALL_HOME}/$SERVER_NAME/bin
-
-if ! executeCMD $SERVER_IP "test -e $SERVER_BIN"; then
-  echo "$SERVER_NAME is not installed,the checkServer steps will be skipped"
-  return
-fi
-
-sh $workDir/bin/checkServices.sh $SERVER_NAME $SERVER_IP $SERVER_PORT
-isSuccess "start $SERVER_NAME "
-echo "<-------------------------------->"
-sleep 5
-}
-SERVER_NAME="eureka"
-SERVER_IP=$EUREKA_INSTALL_IP
-SERVER_PORT=$EUREKA_PORT
-checkServer
-
-APP_PREFIX="linkis-"
-SERVER_NAME=$APP_PREFIX"gateway"
-SERVER_IP=$GATEWAY_INSTALL_IP
-SERVER_PORT=$GATEWAY_PORT
-checkServer
-
-SERVER_NAME=$APP_PREFIX"publicservice"
-SERVER_IP=$PUBLICSERVICE_INSTALL_IP
-SERVER_PORT=$PUBLICSERVICE_PORT
-checkServer
-
-SERVER_NAME=$APP_PREFIX"metadata"
-SERVER_IP=$METADATA_INSTALL_IP
-SERVER_PORT=$METADATA_PORT
-checkServer
-
-SERVER_NAME=$APP_PREFIX"resourcemanager"
-SERVER_IP=$RESOURCEMANAGER_INSTALL_IP
-SERVER_PORT=$RESOURCEMANAGER_PORT
-checkServer
-
-
-SERVER_NAME=$APP_PREFIX"bml"
-SERVER_IP=$BML_INSTALL_IP
-SERVER_PORT=$BML_PORT
-checkServer
-
-#cs-server
-SERVER_NAME="cs-server"
-SERVER_IP=$CS_INSTALL_IP
-checkServer
-
-APP_PREFIX="linkis-ujes-"
-SERVER_NAME=$APP_PREFIX"python-entrance"
-SERVER_IP=$PYTHON_INSTALL_IP
-SERVER_PORT=$PYTHON_ENTRANCE_PORT
-checkServer
-
-SERVER_NAME=$APP_PREFIX"python-enginemanager"
-SERVER_IP=$PYTHON_INSTALL_IP
-SERVER_PORT=$PYTHON_EM_PORT
-checkServer
-
-SERVER_NAME=$APP_PREFIX"spark-entrance"
-SERVER_IP=$SPARK_INSTALL_IP
-SERVER_PORT=$SPARK_ENTRANCE_PORT
-checkServer
-
-SERVER_NAME=$APP_PREFIX"spark-enginemanager"
-SERVER_IP=$SPARK_INSTALL_IP
-SERVER_PORT=$SPARK_EM_PORT
-checkServer
-
-SERVER_NAME=$APP_PREFIX"hive-enginemanager"
-SERVER_IP=$HIVE_INSTALL_IP
-SERVER_PORT=$HIVE_EM_PORT
-checkServer
-
-SERVER_NAME=$APP_PREFIX"hive-entrance"
-SERVER_IP=$HIVE_INSTALL_IP
-SERVER_PORT=$HIVE_ENTRANCE_PORT
-checkServer
-
-SERVER_NAME=$APP_PREFIX"jdbc-entrance"
-SERVER_IP=$JDBC_INSTALL_IP
-SERVER_PORT=$JDBC_ENTRANCE_PORT
-checkServer
-
-
-echo "Linkis started successfully"
diff --git a/bin/stop-all.sh b/bin/stop-all.sh
deleted file mode 100755
index 098a577..0000000
--- a/bin/stop-all.sh
+++ /dev/null
@@ -1,227 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-
-
-# Stop all linkis applications
-info="We will stop all linkis applications, it will take some time, please wait"
-echo ${info}
-
-#Actively load user env
-source /etc/profile
-source ~/.bash_profile
-
-workDir=`dirname "${BASH_SOURCE-$0}"`
-workDir=`cd "$workDir"; pwd`
-
-
-CONF_DIR="${workDir}"/../conf
-export LINKIS_DSS_CONF_FILE=${LINKIS_DSS_CONF_FILE:-"${CONF_DIR}/config.sh"}
-export DISTRIBUTION=${DISTRIBUTION:-"${CONF_DIR}/config.sh"}
-source ${DISTRIBUTION}
-function isSuccess(){
-if [ $? -ne 0 ]; then
-    echo "ERROR:  " + $1
-    exit 1
-else
-    echo "INFO:" + $1
-fi
-}
-
-
-local_host="`hostname --fqdn`"
-
-ipaddr=$(ip addr | awk '/^[0-9]+: / {}; /inet.*global/ {print gensub(/(.*)\/(.*)/, "\\1", "g", $2)}'|awk 'NR==1')
-
-function isLocal(){
-    if [ "$1" == "127.0.0.1" ];then
-        return 0
-    elif [ $1 == "localhost" ]; then
-        return 0
-    elif [ $1 == $local_host ]; then
-        return 0
-    elif [ $1 == $ipaddr ]; then
-        return 0
-    fi
-        return 1
-}
-
-
-source ${workDir}/bin/common.sh
-
-
-#if there is no LINKIS_INSTALL_HOME,we need to source config again
-if [ -z ${LINKIS_INSTALL_HOME} ];then
-    echo "Warning: LINKIS_INSTALL_HOME does not exist, we will source config"
-    if [ ! -f "${LINKIS_DSS_CONF_FILE}" ];then
-        echo "Error: can not find config file, stop applications failed"
-        exit 1
-    else
-        source ${LINKIS_DSS_CONF_FILE}
-    fi
-fi
-APP_PREFIX="linkis-"
-
-function stopApp(){
-echo "<-------------------------------->"
-echo "Begin to stop $SERVER_NAME"
-SERVER_PATH=${APP_PREFIX}${SERVER_NAME}
-SERVER_BIN=${LINKIS_INSTALL_HOME}/${SERVER_PATH}/bin
-SERVER_LOCAL_STOP_CMD="sh ${SERVER_BIN}/stop-${SERVER_NAME}.sh"
-SERVER_REMOTE_STOP_CMD="source /etc/profile;source ~/.bash_profile;cd ${SERVER_BIN}; sh stop-${SERVER_NAME}.sh "
-if test -z "$SERVER_IP"
-then
-  SERVER_IP=$local_host
-fi
-
-if ! executeCMD $SERVER_IP "test -e $SERVER_BIN"; then
-  echo "$SERVER_NAME is not installed,the stopApp steps will be skipped"
-  return
-fi
-
-isLocal $SERVER_IP
-flag=$?
-echo "Is local "$flag
-if [ $flag == "0" ];then
-   eval $SERVER_LOCAL_STOP_CMD
-else
-   ssh -p $SSH_PORT $SERVER_IP $SERVER_REMOTE_STOP_CMD
-fi
-echo "<-------------------------------->"
-sleep 3
-}
-
-
-#eureka
-SERVER_NAME="eureka"
-APP_PREFIX=""
-SERVER_IP=$EUREKA_INSTALL_IP
-stopApp
-
-
-APP_PREFIX="linkis-"
-#gateway
-SERVER_NAME="gateway"
-SERVER_IP=$GATEWAY_INSTALL_IP
-stopApp
-
-#publicservice
-SERVER_NAME="publicservice"
-SERVER_IP=$PUBLICSERVICE_INSTALL_IP
-stopApp
-
-#bml
-SERVER_NAME="bml"
-SERVER_IP=$BML_INSTALL_IP
-stopApp
-
-
-#metadata
-SERVER_NAME="metadata"
-SERVER_IP=$METADATA_INSTALL_IP
-stopApp
-
-#cs-server
-SERVER_NAME="cs-server"
-SERVER_IP=$CS_INSTALL_IP
-stopApp
-
-#datasource management
-SERVER_NAME="dsm-server"
-SERVER_IP=$DSM_INSTALL_IP
-stopApp
-
-#metadata management
-SERVER_NAME="mdm-server"
-SERVER_IP=$MDM_INSTALL_IP
-stopApp
-
-APP_PREFIX="linkis-ujes-"
-
-#python-entrance
-SERVER_NAME="python-entrance"
-SERVER_IP=$PYTHON_INSTALL_IP
-stopApp
-
-#python-enginemanager
-SERVER_NAME="python-enginemanager"
-SERVER_IP=$PYTHON_INSTALL_IP
-stopApp
-
-#shell-entrance
-SERVER_NAME="shell-entrance"
-SERVER_IP=$SHELL_INSTALL_IP
-stopApp
-
-#shell-enginemanager
-SERVER_NAME="shell-enginemanager"
-SERVER_IP=$SHELL_INSTALL_IP
-stopApp
-
-#spark-entrance
-SERVER_NAME="spark-entrance"
-SERVER_IP=$SPARK_INSTALL_IP
-stopApp
-
-#spark-enginemanager
-SERVER_NAME="spark-enginemanager"
-SERVER_IP=$SPARK_INSTALL_IP
-stopApp
-
-#hive-entrance
-SERVER_NAME="hive-entrance"
-SERVER_IP=$HIVE_INSTALL_IP
-stopApp
-
-
-#hive-enginemanager
-SERVER_NAME="hive-enginemanager"
-SERVER_IP=$HIVE_INSTALL_IP
-stopApp
-
-#cs-server
-SERVER_NAME="cs-server"
-SERVER_IP=$CS_INSTALL_IP
-stopApp
-
-
-#JDBCEntrance
-SERVER_NAME="jdbc-entrance"
-SERVER_IP=$JDBC_INSTALL_IP
-stopApp
-
-SERVER_NAME="pipeline-entrance"
-SERVER_IP=$PIPELINE_INSTALL_IP
-stopApp
-
-SERVER_NAME="pipeline-enginemanager"
-SERVER_IP=$PIPELINE_INSTALL_IP
-stopApp
-
-SERVER_NAME="io-enginemanager"
-SERVER_IP=$IO_INSTALL_IP
-stopApp
-
-
-
-APP_PREFIX="linkis-"
-#resourcemanager
-SERVER_NAME="resourcemanager"
-SERVER_IP=$RESOURCEMANAGER_INSTALL_IP
-stopApp
-
-echo "stop-all shell script executed completely"
diff --git a/bml/bml-engine-hook/pom.xml b/bml/bml-engine-hook/pom.xml
deleted file mode 100644
index 0559429..0000000
--- a/bml/bml-engine-hook/pom.xml
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>linkis-bml-hook</artifactId>
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-common</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-bmlclient</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.apache.httpcomponents</groupId>
-                    <artifactId>httpclient</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.apache.httpcomponents</groupId>
-                    <artifactId>httpcore</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.apache.httpcomponents</groupId>
-                    <artifactId>httpcore</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.eclipse.jetty</groupId>
-                    <artifactId>jetty-servlet</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.eclipse.jetty</groupId>
-                    <artifactId>jetty-security</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.eclipse.jetty</groupId>
-                    <artifactId>jetty-server</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.eclipse.jetty</groupId>
-                    <artifactId>jetty-http</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.eclipse.jetty</groupId>
-                    <artifactId>jetty-util</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.eclipse.jetty</groupId>
-                    <artifactId>jetty-io</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>javax.servlet</groupId>
-                    <artifactId>javax.servlet-api</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-storage</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-ujes-engine</artifactId>
-            <scope>provided</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>${basedir}/src/main/resources</directory>
-            </resource>
-        </resources>
-    </build>
-
-
-</project>
\ No newline at end of file
diff --git a/bml/bml-engine-hook/src/main/scala/com/webank/wedatasphere/linkis/bml/conf/BmlHookConf.scala b/bml/bml-engine-hook/src/main/scala/com/webank/wedatasphere/linkis/bml/conf/BmlHookConf.scala
deleted file mode 100644
index 6ba4f2f..0000000
--- a/bml/bml-engine-hook/src/main/scala/com/webank/wedatasphere/linkis/bml/conf/BmlHookConf.scala
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.webank.wedatasphere.linkis.bml.conf
-
-import com.webank.wedatasphere.linkis.bml.utils.BmlHookUtils
-import com.webank.wedatasphere.linkis.common.conf.CommonVars
-
-/**
-  * created by cooperyang on 2019/9/23
-  * Description:
-  */
-object BmlHookConf {
-  val WORK_DIR_STR = CommonVars("wds.linkis.bml.work.dir", BmlHookUtils.getCurrentWorkDir)
-}
diff --git a/bml/bml-engine-hook/src/main/scala/com/webank/wedatasphere/linkis/bml/exception/BmlHookDownloadException.scala b/bml/bml-engine-hook/src/main/scala/com/webank/wedatasphere/linkis/bml/exception/BmlHookDownloadException.scala
deleted file mode 100644
index b67b065..0000000
--- a/bml/bml-engine-hook/src/main/scala/com/webank/wedatasphere/linkis/bml/exception/BmlHookDownloadException.scala
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.webank.wedatasphere.linkis.bml.exception
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException
-
-/**
-  * created by cooperyang on 2019/9/25
-  * Description:
-  */
-case class BmlHookDownloadException(errMsg:String) extends ErrorException(50046, errMsg)
diff --git a/bml/bml-engine-hook/src/main/scala/com/webank/wedatasphere/linkis/bml/hook/BmlEnginePreExecuteHook.scala b/bml/bml-engine-hook/src/main/scala/com/webank/wedatasphere/linkis/bml/hook/BmlEnginePreExecuteHook.scala
deleted file mode 100644
index 398d857..0000000
--- a/bml/bml-engine-hook/src/main/scala/com/webank/wedatasphere/linkis/bml/hook/BmlEnginePreExecuteHook.scala
+++ /dev/null
@@ -1,89 +0,0 @@
-package com.webank.wedatasphere.linkis.bml.hook
-
-import java.io.File
-import java.util
-
-import com.webank.wedatasphere.linkis.bml.client.{BmlClient, BmlClientFactory}
-import com.webank.wedatasphere.linkis.bml.conf.BmlHookConf
-import com.webank.wedatasphere.linkis.bml.exception.BmlHookDownloadException
-import com.webank.wedatasphere.linkis.bml.utils.BmlHookUtils
-import com.webank.wedatasphere.linkis.common.exception.ErrorException
-import com.webank.wedatasphere.linkis.common.utils.{Logging, Utils}
-import com.webank.wedatasphere.linkis.engine.ResourceExecuteRequest
-import com.webank.wedatasphere.linkis.engine.execute.EngineExecutorContext
-import com.webank.wedatasphere.linkis.engine.extension.EnginePreExecuteHook
-import com.webank.wedatasphere.linkis.scheduler.executer.ExecuteRequest
-import org.apache.commons.lang.StringUtils
-
-import scala.collection.JavaConversions._
-/**
-  * created by cooperyang on 2019/9/23
-  * Description:
-  */
-class BmlEnginePreExecuteHook extends EnginePreExecuteHook with Logging{
-  override val hookName: String = "BmlEnginePreExecuteHook"
-
-  val RESOURCES_STR = "resources"
-
-  val RESOURCE_ID_STR = "resourceId"
-
-  val VERSION_STR = "version"
-
-  val FILE_NAME_STR = "fileName"
-
-  val processUser:String = System.getProperty("user.name")
-
-  val defaultUser:String = "hadoop"
-
-  val bmlClient:BmlClient = if (StringUtils.isNotEmpty(processUser))
-    BmlClientFactory.createBmlClient(processUser) else BmlClientFactory.createBmlClient(defaultUser)
-
-  val seperator:String = File.separator
-
-  val pathType:String = "file://"
-
-  override def callPreExecuteHook(engineExecutorContext: EngineExecutorContext, executeRequest: ExecuteRequest, code: String): String = {
-    val workDir = BmlHookConf.WORK_DIR_STR.getValue
-    val jobId = engineExecutorContext.getJobId
-    var hookCode = code
-    executeRequest match {
-      case resourceExecuteRequest:ResourceExecuteRequest => val resources = resourceExecuteRequest.resources
-        if (null == resources) return hookCode
-        val resourcePaths = resources map {
-          case resource:util.Map[String, Object] => val fileName = resource.get(FILE_NAME_STR).toString
-            val resourceId = resource.get(RESOURCE_ID_STR).toString
-            val version = resource.get(VERSION_STR).toString
-            val fullPath = if (workDir.endsWith(seperator)) pathType + workDir + fileName else
-              pathType + workDir + seperator + fileName
-            val response = Utils.tryCatch{
-              bmlClient.downloadResource(processUser, resourceId, version, fullPath, true)
-            }{
-              case error:ErrorException => logger.error("download resource for {} failed", error)
-                throw error
-              case t:Throwable => logger.error(s"download resource for $jobId failed", t)
-                val e1 = BmlHookDownloadException(t.getMessage)
-                e1.initCause(t)
-                throw t
-            }
-            if (response.isSuccess){
-              logger.info(s"for job $jobId resourceId $resourceId version $version download to path $fullPath ok")
-              fullPath
-            }else{
-              logger.warn(s"for job $jobId resourceId $resourceId version $version download to path $fullPath Failed")
-              null
-            }
-          case _ =>
-            logger.warn("job resource cannot download")
-            null
-        }
-        hookCode = if (StringUtils.isNotBlank(hookCode)) hookCode else executeRequest.code
-        hookCode = callResourcesDownloadedHook(resourcePaths.toArray, engineExecutorContext, executeRequest, hookCode)
-      case _ =>
-    }
-    if (StringUtils.isNotBlank(hookCode)) hookCode else executeRequest.code
-  }
-
-  def callResourcesDownloadedHook(resourcePaths: Array[String], engineExecutorContext: EngineExecutorContext, executeRequest: ExecuteRequest, code: String): String = {
-    code
-  }
-}
diff --git a/bml/bml-engine-hook/src/main/scala/com/webank/wedatasphere/linkis/bml/hook/BmlResourceParser.scala b/bml/bml-engine-hook/src/main/scala/com/webank/wedatasphere/linkis/bml/hook/BmlResourceParser.scala
deleted file mode 100644
index 632e9f9..0000000
--- a/bml/bml-engine-hook/src/main/scala/com/webank/wedatasphere/linkis/bml/hook/BmlResourceParser.scala
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.webank.wedatasphere.linkis.bml.hook
-
-/**
-  * created by cooperyang on 2019/9/23
-  * Description:
-  */
-
-case class ResourceVersion(resourceId:String, version:String)
-
-
-trait BmlResourceParser {
-  /**
-    * 通过传入的code
-    * @param code
-    * @return
-    */
-  def getResource(code:String):Array[ResourceVersion]
-}
-
-
-object DefaultBmlResourceParser extends BmlResourceParser{
-  /**
-    * 通过传入的code
-    *
-    * @param code
-    * @return
-    */
-  override def getResource(code: String): Array[ResourceVersion] = Array.empty
-}
\ No newline at end of file
diff --git a/bml/bml-engine-hook/src/main/scala/com/webank/wedatasphere/linkis/bml/utils/BmlHookUtils.scala b/bml/bml-engine-hook/src/main/scala/com/webank/wedatasphere/linkis/bml/utils/BmlHookUtils.scala
deleted file mode 100644
index 6e0d970..0000000
--- a/bml/bml-engine-hook/src/main/scala/com/webank/wedatasphere/linkis/bml/utils/BmlHookUtils.scala
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.webank.wedatasphere.linkis.bml.utils
-
-/**
-  * created by cooperyang on 2019/9/24
-  * Description:
-  */
-object BmlHookUtils {
-  val WORK_DIR_STR = "user.dir"
-  def getCurrentWorkDir:String = System.getProperty(WORK_DIR_STR)
-
-
-  def deleteAllFiles(workDir:String):Unit = {
-
-  }
-
-
-
-}
diff --git a/bml/bmlclient/pom.xml b/bml/bmlclient/pom.xml
deleted file mode 100644
index ffe4470..0000000
--- a/bml/bmlclient/pom.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>linkis-bmlclient</artifactId>
-
-
-    <properties>
-        <httpcomponents-client.version>4.4</httpcomponents-client.version>
-    </properties>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-bmlcommon</artifactId>
-            
-        </dependency>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-storage</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-common</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-gateway-httpclient-support</artifactId>
-            </dependency>
-
-    </dependencies>
-
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>${basedir}/src/main/resources</directory>
-            </resource>
-        </resources>
-    </build>
-
-
-
-
-
-</project>
\ No newline at end of file
diff --git a/bml/bmlclient/src/main/java/com/webank/wedatasphere/linkis/bml/client/AbstractBmlClient.java b/bml/bmlclient/src/main/java/com/webank/wedatasphere/linkis/bml/client/AbstractBmlClient.java
deleted file mode 100644
index 5b9620f..0000000
--- a/bml/bmlclient/src/main/java/com/webank/wedatasphere/linkis/bml/client/AbstractBmlClient.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.client;
-
-import java.util.Map;
-
-/**
- * created by cooperyang on 2019/5/15
- * Description:
- */
-public abstract class AbstractBmlClient implements BmlClient{
-    protected String user;
-    protected Map<String, Object> properties;
-
-    public String getUser() {
-        return user;
-    }
-
-    public void setUser(String user) {
-        this.user = user;
-    }
-
-    public Map<String, Object> getProperties() {
-        return properties;
-    }
-
-    public void setProperties(Map<String, Object> properties) {
-        this.properties = properties;
-    }
-}
diff --git a/bml/bmlclient/src/main/java/com/webank/wedatasphere/linkis/bml/client/BmlClient.java b/bml/bmlclient/src/main/java/com/webank/wedatasphere/linkis/bml/client/BmlClient.java
deleted file mode 100644
index e8d5a55..0000000
--- a/bml/bmlclient/src/main/java/com/webank/wedatasphere/linkis/bml/client/BmlClient.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.client;
-
-import com.webank.wedatasphere.linkis.bml.protocol.*;
-
-import java.io.InputStream;
-
-/**
- * created by cooperyang on 2019/5/15
- * Description:
- */
-public interface BmlClient {
-    /**
-     * 传入resourceID bmlclient会resource的输入流,如果不传入version,默认返回最新的版本
-     * @param resourceID resourceID
-     * @return InputStream
-     */
-    public BmlDownloadResponse downloadResource(String user, String resourceID);
-
-    public BmlDownloadResponse downloadResource(String user, String resourceId, String version);
-
-
-    public BmlDownloadResponse downloadResource(String user, String resourceId, String version, String path, boolean overwrite);
-
-
-    /**
-     * relateResource方法将targetFilePath路径的文件关联到resourceID下面
-     * targetFilePath需要包括schema,如果不包含schema,默认是hdfs
-     * @param resourceID resourceID
-     * @param targetFilePath 指定文件目录
-     * @return BmlRelateResult  包含resourceId和新的version
-     */
-    public BmlRelateResponse relateResource(String resourceID, String targetFilePath);
-
-
-    /**
-     * 更新资源信息
-     * @param resourceID 资源id
-     * @param filePath 目标文件路径
-     * @return resourceId 新的版本信息
-     */
-
-    public BmlUpdateResponse updateResource(String user, String resourceID, String filePath);
-
-    public BmlUpdateResponse updateResource(String user, String resourceID, String filePath, InputStream inputStream);
-
-
-
-
-    /**
-     * 上传资源,用户指定输入流
-     * @param user 用户名
-     * @param filePath 上传的资源的路径
-     * @param inputStream  上传资源的输入流
-     * @return 包含resourceId和version
-     */
-    public BmlUploadResponse uploadResource(String user, String filePath, InputStream inputStream);
-
-    /**
-     * 上传文件,用户指定文件路径,客户端自动获取输入流
-     * @param user 用户名
-     * @param filePath 文件路径
-     * @return 包含resourceId和version
-     */
-    public BmlUploadResponse uploadResource(String user, String filePath);
-
-
-
-
-
-    /**
-     * 获取resource的所有版本
-     * @param user 用户名
-     * @param resourceId 资源Id
-     * @return resourceId对应下的所有版本信息
-     */
-    public BmlResourceVersionsResponse getVersions(String user, String resourceId);
-
-
-    /**
-     *
-     */
-    public BmlDeleteResponse deleteResource(String user, String resourceId, String version);
-
-    public BmlDeleteResponse deleteResource(String user, String resourceId);
-
-}
diff --git a/bml/bmlclient/src/main/java/com/webank/wedatasphere/linkis/bml/client/BmlClientFactory.java b/bml/bmlclient/src/main/java/com/webank/wedatasphere/linkis/bml/client/BmlClientFactory.java
deleted file mode 100644
index 5e42561..0000000
--- a/bml/bmlclient/src/main/java/com/webank/wedatasphere/linkis/bml/client/BmlClientFactory.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.client;
-
-import com.webank.wedatasphere.linkis.bml.client.impl.HttpBmlClient;
-
-import java.util.Map;
-
-/**
- * created by cooperyang on 2019/5/15
- * Description:
- */
-public class BmlClientFactory {
-    public static BmlClient createBmlClient(){
-        return createBmlClient(null, null);
-    }
-
-
-    public static BmlClient createBmlClient(String user){
-        return createBmlClient(user, null);
-    }
-
-
-    public static BmlClient createBmlClient(String user, Map<String, Object> properties){
-        AbstractBmlClient bmlClient = new HttpBmlClient();
-        bmlClient.setUser(user);
-        bmlClient.setProperties(properties);
-        return bmlClient;
-    }
-
-
-}
diff --git a/bml/bmlclient/src/main/scala/com/webank/wedatasphere/linkis/bml/client/impl/HttpBmlClient.scala b/bml/bmlclient/src/main/scala/com/webank/wedatasphere/linkis/bml/client/impl/HttpBmlClient.scala
deleted file mode 100644
index e7d6367..0000000
--- a/bml/bmlclient/src/main/scala/com/webank/wedatasphere/linkis/bml/client/impl/HttpBmlClient.scala
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.client.impl
-
-import java.io.{File, IOException, InputStream}
-import java.util
-
-import com.webank.wedatasphere.linkis.bml.client.AbstractBmlClient
-import com.webank.wedatasphere.linkis.bml.common._
-import com.webank.wedatasphere.linkis.bml.conf.BmlConfiguration
-import com.webank.wedatasphere.linkis.bml.http.HttpConf
-import com.webank.wedatasphere.linkis.bml.protocol._
-import com.webank.wedatasphere.linkis.bml.request._
-import com.webank.wedatasphere.linkis.bml.response._
-import com.webank.wedatasphere.linkis.common.io.FsPath
-import com.webank.wedatasphere.linkis.httpclient.authentication.AuthenticationStrategy
-import com.webank.wedatasphere.linkis.httpclient.config.{ClientConfig, ClientConfigBuilder}
-import com.webank.wedatasphere.linkis.httpclient.dws.DWSHttpClient
-import com.webank.wedatasphere.linkis.httpclient.dws.authentication.{StaticAuthenticationStrategy, TokenAuthenticationStrategy}
-import com.webank.wedatasphere.linkis.httpclient.dws.config.DWSClientConfig
-import com.webank.wedatasphere.linkis.storage.FSFactory
-import org.apache.commons.io.IOUtils
-import org.apache.commons.lang.StringUtils
-import org.slf4j.{Logger, LoggerFactory}
-
-/**
-  * created by cooperyang on 2019/5/23
-  * Description:
-  */
-class HttpBmlClient extends AbstractBmlClient{
-
-  private val logger:Logger = LoggerFactory.getLogger(classOf[HttpBmlClient])
-
-  val serverUrl:String = HttpConf.gatewayInstance
-  val maxConnection:Int = 10
-  val readTimeout:Int = 10000
-  val authenticationStrategy:AuthenticationStrategy = new TokenAuthenticationStrategy()
-  val clientConfig:ClientConfig = ClientConfigBuilder.newBuilder().addUJESServerUrl(serverUrl)
-    .connectionTimeout(30000).discoveryEnabled(false)
-    .loadbalancerEnabled(false).maxConnectionSize(maxConnection)
-    .retryEnabled(false).readTimeout(readTimeout)
-    .setAuthenticationStrategy(authenticationStrategy).setAuthTokenKey(BmlConfiguration.AUTH_TOKEN_KEY.getValue)
-    .setAuthTokenValue(BmlConfiguration.AUTH_TOKEN_VALUE.getValue).build()
-  val dwsClientConfig:DWSClientConfig = new DWSClientConfig(clientConfig)
-  dwsClientConfig.setDWSVersion(BmlConfiguration.DWS_VERSION.getValue)
-  val dwsClientName:String = "BML-Client"
-  val dwsClient:DWSHttpClient = new DWSHttpClient(dwsClientConfig, dwsClientName)
-
-  val FIRST_VERSION:String = "v000001"
-
-
-
-  override def downloadResource(user:String, resourceID: String): BmlDownloadResponse = {
-    downloadResource(user, resourceID, "")
-  }
-
-  override def downloadResource(user: String, resourceId: String, version: String): BmlDownloadResponse = {
-    val bmlDownloadAction = BmlDownloadAction()
-    import scala.collection.JavaConversions._
-    bmlDownloadAction.getParameters +="resourceId"->resourceId
-    // TODO: 不能放非空的参数
-    if(version != null)bmlDownloadAction.getParameters +="version"->version
-    bmlDownloadAction.setUser(user)
-    val result = dwsClient.execute(bmlDownloadAction)
-    new BmlDownloadResponse(true,bmlDownloadAction.getInputStream,resourceId,version,null)
-    /*    result match {
-          case downloadResult:BmlResourceDownloadResult => val isSuccess = if (downloadResult.getStatusCode == 0) true else false
-            if (isSuccess){
-              downloadResult.setInputStream(bmlDownloadAction.getInputStream)
-              BmlDownloadResponse(isSuccess, downloadResult.inputStream, downloadResult.getResourceId, downloadResult.getVersion, "")
-            }else{
-              logger.error(s"user ${user} download resource $resourceId  version $version failed, status code is ${ downloadResult.getStatusCode}")
-              BmlDownloadResponse(isSuccess, null, null, null, null)
-            }
-          case r:BmlResult => logger.error(s"result type ${r.getResultType} not match BmlResourceDownloadResult")
-            throw POSTResultNotMatchException()
-          case _ => throw POSTResultNotMatchException()
-        }*/
-  }
-
-  /**
-    * 下载资源到指定的path中
-    * @param user 用户名
-    * @param resourceId 资源ID
-    * @param version 版本信息
-    * @param path 指定的目录,前面要加schema share:// local:// 等
-    * @param overwrite 是否是追加
-    * @return 返回的inputStream已经被全部读完,所以返回一个null,另外的fullFileName是整个文件的名字
-    */
-  override def downloadResource(user: String, resourceId: String, version: String, path: String, overwrite:Boolean = false): BmlDownloadResponse = {
-    //1检查目录是否存在,包括path的schema
-    //2检查文件是否存在,如果文件存在,并且overwrite是false,则报错
-    //3获取downloaded_file_name 拼成一个完整的filePath
-    //4获取inputStream,然后写入到filePath中
-    val fsPath = new FsPath(path)
-    val fileSystem = FSFactory.getFsByProxyUser(fsPath, user)
-    fileSystem.init(new util.HashMap[String, String]())
-//    if (fileSystem.exists(fsPath)){
-//      logger.error(s"path $path not exists")
-//      throw IllegalPathException()
-//    }
-//    val getBasicAction = BmlGetBasicAction(resourceId)
-//    val getBasicResult = dwsClient.execute(getBasicAction) match{
-//      case result:BmlGetBasicResult => result
-//      case _ => throw GetResultNotMatchException()
-//    }
-
-//    val fileName:StringBuilder = new StringBuilder
-//    fileName.append(path).append(if (path.endsWith("/")) "" else "/")
-
-//    if (getBasicResult != null && getBasicResult.getStatusCode == 0){
-//      val downloadedFileName = getBasicResult.downloadedFileName
-//      if (StringUtils.isNotEmpty(downloadedFileName)){
-//        fileName.append(downloadedFileName)
-//      }else{
-//        throw BmlResponseErrorException("返回的downloadedFileName参数为空")
-//      }
-//    }else{
-//      logger.error(s"获取 $resourceId 资源失败, BmlServer的返回码是 ${getBasicResult.getStatusCode}")
-//      throw BmlResponseErrorException("通过http方式获取")
-//    }
-
-    val fullFileName = path
-    val downloadAction = BmlDownloadAction() // TODO: 这里暂时还没改
-    import scala.collection.JavaConversions._
-    downloadAction.getParameters += "resourceId" -> resourceId
-    // TODO: 不能放非空的参数
-    if(version != null) downloadAction.getParameters += "version" -> version
-    downloadAction.setUser(user)
-    val downloadResult = dwsClient.execute(downloadAction)
-    val fullFilePath = new FsPath(fullFileName)
-    if (downloadResult != null){
-      val inputStream = downloadAction.getInputStream
-      val outputStream = fileSystem.write(fullFilePath, overwrite)
-      try{
-        IOUtils.copy(inputStream, outputStream)
-      }catch{
-        case e:IOException => logger.error("inputStream和outputStream流copy失败", e)
-          val exception = BmlClientFailException("inputStream和outputStream流copy失败")
-          exception.initCause(e)
-          throw e
-        case t:Throwable => logger.error("流复制失败",t)
-          throw t
-      }finally{
-        IOUtils.closeQuietly(inputStream)
-        IOUtils.closeQuietly(outputStream)
-      }
-      BmlDownloadResponse(true, null, resourceId, version, fullFileName)
-    }else{
-      BmlDownloadResponse(false, null, null, null, null)
-    }
-  }
-
-  /**
-    * 更新资源信息
-    *
-    * @param resourceID 资源id
-    * @param filePath   目标文件路径
-    * @return resourceId 新的版本信息
-    */
-  override def updateResource(user:String, resourceID: String, filePath: String): BmlUpdateResponse = {
-    val inputStream:InputStream = getInputStream(filePath)
-    updateResource(user, resourceID, filePath, inputStream)
-  }
-
-  override def updateResource(user:String, resourceID: String, filePath: String, inputStream: InputStream): BmlUpdateResponse = {
-    val _inputStreams = new util.HashMap[String, InputStream]()
-    _inputStreams.put("file", inputStream)
-    val bmlUpdateAction = BmlUpdateAction(null, _inputStreams)
-    bmlUpdateAction.setUser(user)
-    bmlUpdateAction.inputStreamNames.put("file", pathToName(filePath))
-    bmlUpdateAction.getParameters.put("resourceId",resourceID)
-    val result = dwsClient.execute(bmlUpdateAction)
-    result match{
-      case updateResult:BmlUpdateResult => val isSuccess= if (updateResult.getStatus == 0) true else false
-        if (isSuccess){
-          val resourceId = updateResult.getResourceId
-          val version = updateResult.getVersion
-          BmlUpdateResponse(isSuccess, resourceId, version)
-        }else{
-          logger.error(s"user $user update resource failed, status code is ${updateResult.getStatusCode}")
-          BmlUpdateResponse(isSuccess, null, null)
-        }
-      case r:BmlResult => logger.error(s"result type ${r.getResultType} not match BmlResourceDownloadResult")
-        throw POSTResultNotMatchException()
-      case _ => throw POSTResultNotMatchException()
-    }
-  }
-
-  /**
-    * relateResource方法将targetFilePath路径的文件关联到resourceID下面
-    * targetFilePath需要包括schema,如果不包含schema,默认是hdfs
-    *
-    * @param resourceID     resourceID
-    * @param targetFilePath 指定文件目录
-    * @return BmlRelateResult  包含resourceId和新的version
-    */
-  override def relateResource(resourceID: String, targetFilePath: String): BmlRelateResponse = {
-    null
-  }
-
-
-
-
-  /**
-    * 获取resourceid 对应资源的所有版本
-    * @param user       用户名
-    * @param resourceId 资源Id
-    * @return resourceId对应下的所有版本信息
-    */
-  override def getVersions(user: String, resourceId: String): BmlResourceVersionsResponse = {
-    val getVersionsAction = BmlGetVersionsAction(user, resourceId)
-    val result = dwsClient.execute(getVersionsAction)
-    result match{
-      case _result:BmlResourceVersionResult => val isSuccess= if (_result.getStatus == 0) true else false
-        if (isSuccess){
-          val resourceId = _result.getResourceId
-          val resourceVersions = _result.getResourceVersions
-          BmlResourceVersionsResponse(isSuccess,resourceId, resourceVersions)
-        }else{
-          logger.error(s"user $user get versions failed, status code is ${_result.getStatusCode}")
-          BmlResourceVersionsResponse(isSuccess, null, null)
-        }
-      case r:BmlResult => logger.error(s"result type ${r.getResultType} not match BmlResourceDownloadResult")
-        throw POSTResultNotMatchException()
-      case _ => throw POSTResultNotMatchException()
-    }
-  }
-
-
-
-
-  /**
-    * 上传文件,用户指定文件路径,客户端自动获取输入流
-    * @param user     用户名
-    * @param filePath 文件路径
-    * @return 包含resourceId和version
-    */
-  override def uploadResource(user: String, filePath: String): BmlUploadResponse = {
-    val inputStream:InputStream = getInputStream(filePath)
-    uploadResource(user, filePath, inputStream)
-  }
-
-
-  private def pathToName(filePath:String):String = new File(filePath).getName
-
-
-  /**
-    * 上传资源
-    *
-    * @param user        用户名
-    * @param filePath    上传的资源的路径
-    * @param inputStream 上传资源的输入流
-    * @return
-    */
-  override def uploadResource(user: String, filePath: String, inputStream: InputStream): BmlUploadResponse = {
-    val _inputStreams = new util.HashMap[String, InputStream]()
-    _inputStreams.put("file", inputStream)
-    val uploadAction = BmlUploadAction(null, _inputStreams)
-    uploadAction.inputStreamNames.put("file", pathToName(filePath))
-    uploadAction.setUser(user)
-    val result = dwsClient.execute(uploadAction)
-    result match {
-      case bmlUploadResult:BmlUploadResult => val isSuccess = if(bmlUploadResult.getStatus == 0) true else false
-        if (isSuccess){
-          val resourceId = bmlUploadResult.getResourceId
-          val version =  bmlUploadResult.getVersion
-          BmlUploadResponse(isSuccess, resourceId,version)
-        }else{
-          logger.error(s"user $user upload resource failed, status code is ${bmlUploadResult.getStatusCode}")
-          BmlUploadResponse(isSuccess, null, null)
-        }
-      case r:BmlResult => logger.error(s"result type ${r.getResultType} not match BmlResourceDownloadResult")
-        throw POSTResultNotMatchException()
-      case _ => throw POSTResultNotMatchException()
-    }
-  }
-
-
-  /**
-   *
-   */
-  override def deleteResource(user: String, resourceId: String, version: String): BmlDeleteResponse = {
-    null
-  }
-
-  override def deleteResource(user: String, resourceId: String): BmlDeleteResponse = {
-    val deleteAction = BmlDeleteAction(resourceId)
-    deleteAction.getParameters.put("resourceId", resourceId)
-    val result = dwsClient.execute(deleteAction)
-    result match {
-      case bmlDeleteResult: BmlDeleteResult => val isSuccess= if (bmlDeleteResult.getStatus == 0) true else false
-        if (isSuccess){
-          BmlDeleteResponse(isSuccess)
-        }else{
-          logger.error(s"user $user update resource failed, status code is ${bmlDeleteResult.getStatusCode}")
-          BmlDeleteResponse(isSuccess)
-        }
-      case r:BmlResult => logger.error(s"result type ${r.getResultType} not match BmlResourceDownloadResult")
-        throw POSTResultNotMatchException()
-      case _ =>  throw POSTResultNotMatchException()
-    }
-  }
-
-  //todo 现在是为了通过编译
-  private def getInputStream(str: String):InputStream = {
-    null
-  }
-
-}
diff --git a/bml/bmlclient/src/main/scala/com/webank/wedatasphere/linkis/bml/common/POSTActionFailException.scala b/bml/bmlclient/src/main/scala/com/webank/wedatasphere/linkis/bml/common/POSTActionFailException.scala
deleted file mode 100644
index 8d3c1c6..0000000
--- a/bml/bmlclient/src/main/scala/com/webank/wedatasphere/linkis/bml/common/POSTActionFailException.scala
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.common
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException
-
-/**
-  * created by cooperyang on 2019/5/26
-  * Description:
-  */
-case class POSTActionFailException() extends ErrorException(70025, "物料库客户端请求失败"){
-
-}
-
-
-case class POSTResultNotMatchException() extends ErrorException(70021, "物料库客户端POST请求返回的result不匹配")
-
-
-case class IllegalPathException() extends ErrorException(70035, "传入物料库的目录不存在或非法")
-
-
-case class BmlResponseErrorException(errorMessage:String) extends ErrorException(70038, errorMessage)
-
-
-case class GetResultNotMatchException() extends ErrorException(70078, "物料库客户端get请求返回的result不匹配")
-
-case class BmlClientFailException(errorMsg:String) extends ErrorException(70081, "物料库客户端出现错误")
\ No newline at end of file
diff --git a/bml/bmlclient/src/main/scala/com/webank/wedatasphere/linkis/bml/conf/BmlConfiguration.scala b/bml/bmlclient/src/main/scala/com/webank/wedatasphere/linkis/bml/conf/BmlConfiguration.scala
deleted file mode 100644
index cc2e6d9..0000000
--- a/bml/bmlclient/src/main/scala/com/webank/wedatasphere/linkis/bml/conf/BmlConfiguration.scala
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.conf
-
-import com.webank.wedatasphere.linkis.common.conf.CommonVars
-
-/**
-  * created by cooperyang on 2019/5/15
-  * Description:
-  */
-object BmlConfiguration {
-
-
-  val DWS_VERSION:CommonVars[String] = CommonVars[String]("wds.linkis.bml.dws.version", "v1")
-
-  val URL_PREFIX:CommonVars[String] =
-    CommonVars[String]("wds.linkis.bml.url.prefix", "/api/rest_j/v1/bml", "bml服务的url前缀")
-
-  val UPLOAD_URL:CommonVars[String] = CommonVars[String]("wds.linkis.bml.upload.url","upload")
-
-  val UPDATE_VERSION_URL:CommonVars[String] = CommonVars[String]("wds.linkis.bml.updateVersion.url", "updateVersion","更新版本的url")
-
-  val UPDATE_BASIC_URL:CommonVars[String] = CommonVars[String]("wds.linkis.bml.updateBasic.url", "updateBasic","更新基本信息的url")
-
-  val RELATE_HDFS:CommonVars[String] = CommonVars[String]("wds.linkis.bml.relateHdfs.url", "relateHdfs", "关联hdfs资源的url")
-
-  val RELATE_STORAGE:CommonVars[String] = CommonVars[String]("wds.linkis.bml.relateStorage.url", "relateStorage", "关联共享存储的url")
-
-  val GET_RESOURCES:CommonVars[String] = CommonVars[String]("wds.linkis.bml.getResourceMsg.url","getResourceMsg", "获取资源的信息")
-
-  val DOWNLOAD_URL:CommonVars[String] = CommonVars[String]("wds.linkis.bml.download.url", "download")
-
-  val DELETE_URL:CommonVars[String] = CommonVars[String]("wds.linkis.bml.delete.url", "delete")
-
-  val GET_VERSIONS_URL:CommonVars[String] = CommonVars[String]("wds.linkis.bml.getVersions.url", "getVersions")
-
-  val GET_BASIC_URL:CommonVars[String] = CommonVars[String]("wds.linkis.bml.getBasic.url","getBasic")
-
-  val AUTH_TOKEN_KEY:CommonVars[String] = CommonVars[String]("wds.linkis.bml.auth.token.key", "Validation-Code")
-
-  val AUTH_TOKEN_VALUE:CommonVars[String] = CommonVars[String]("wds.linkis.bml.auth.token.value", "BML-AUTH")
-
-
-}
diff --git a/bml/bmlclient/src/main/scala/com/webank/wedatasphere/linkis/bml/http/HttpConf.scala b/bml/bmlclient/src/main/scala/com/webank/wedatasphere/linkis/bml/http/HttpConf.scala
deleted file mode 100644
index 4d335e3..0000000
--- a/bml/bmlclient/src/main/scala/com/webank/wedatasphere/linkis/bml/http/HttpConf.scala
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.http
-
-import com.webank.wedatasphere.linkis.bml.conf.BmlConfiguration
-import com.webank.wedatasphere.linkis.common.conf.Configuration
-
-/**
-  * created by cooperyang on 2019/5/15
-  * Description:
-  */
-object HttpConf {
-
-  val gatewayInstance: String = Configuration.getGateWayURL()
-  val urlPrefix: String = if (BmlConfiguration.URL_PREFIX.getValue.endsWith("/")) {
-    BmlConfiguration.URL_PREFIX.getValue.substring(0, BmlConfiguration.URL_PREFIX.getValue.length - 1)
-  } else BmlConfiguration.URL_PREFIX.getValue
-
-  val uploadURL:String = urlPrefix + "/" + BmlConfiguration.UPLOAD_URL.getValue
-  val downloadURL:String =  urlPrefix + "/" + BmlConfiguration.DOWNLOAD_URL.getValue
-  val deleteURL:String = urlPrefix + "/" + BmlConfiguration.DELETE_URL
-  val updateVersionURL:String = urlPrefix + "/" + BmlConfiguration.UPDATE_VERSION_URL.getValue
-  val relateHdfsURL:String = gatewayInstance + urlPrefix + "/" + BmlConfiguration.RELATE_HDFS.getValue
-  val relateStorageURL:String = gatewayInstance + urlPrefix + "/" + BmlConfiguration.RELATE_STORAGE.getValue
-  val getResourcesUrl:String = gatewayInstance + urlPrefix + "/" + BmlConfiguration.GET_RESOURCES.getValue
-  val updateBasicUrl:String = gatewayInstance + urlPrefix + "/" + BmlConfiguration.UPDATE_BASIC_URL.getValue
-  val getVersionsUrl:String = gatewayInstance + urlPrefix + "/" + BmlConfiguration.GET_VERSIONS_URL.getValue
-  val getBasicUrl:String = gatewayInstance + urlPrefix + "/" + BmlConfiguration.GET_BASIC_URL.getValue
-  def main(args: Array[String]): Unit = {
-    println(uploadURL)
-    println(downloadURL)
-    println(updateVersionURL)
-    println(relateHdfsURL)
-    println(relateStorageURL)
-    println(getResourcesUrl)
-    println(updateBasicUrl)
-  }
-
-
-}
diff --git a/bml/bmlclient/src/main/scala/com/webank/wedatasphere/linkis/bml/request/BmlPOSTAction.scala b/bml/bmlclient/src/main/scala/com/webank/wedatasphere/linkis/bml/request/BmlPOSTAction.scala
deleted file mode 100644
index be915be..0000000
--- a/bml/bmlclient/src/main/scala/com/webank/wedatasphere/linkis/bml/request/BmlPOSTAction.scala
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.request
-
-import java.io.{File, InputStream}
-import java.util
-
-import com.webank.wedatasphere.linkis.bml.http.HttpConf
-import com.webank.wedatasphere.linkis.httpclient.request._
-
-/**
-  * created by cooperyang on 2019/5/23
-  * Description:
-  */
-
-abstract class BmlPOSTAction extends POSTAction
-
-abstract class BmlGETAction extends GetAction
-
-
-/**
-  *  BmlUpload
-  * @param filePaths
-  * @param _inputStreams
-  */
-case class BmlUploadAction(filePaths:Array[String],
-                           _inputStreams:util.Map[String,InputStream]) extends BmlPOSTAction with UploadAction{
-
-  private val streamNames = new util.HashMap[String,String]
-
-  override val files: util.Map[String, String] = {
-    if (null == filePaths || filePaths.length == 0) new util.HashMap[String,String]() else{
-      val map = new java.util.HashMap[String, String]
-      filePaths foreach {
-        filePath => val arr = filePath.split(File.separator)
-          val fileName = arr(arr.length - 1)
-          map.put("file", filePath)
-      }
-      map
-    }
-  }
-
-  override def inputStreams: util.Map[String, InputStream] = _inputStreams
-
-  override def inputStreamNames: util.Map[String, String] = streamNames
-
-  //  override def inputStreams: util.Map[String, InputStream] = {
-  //    if (files.size() == 0) new util.HashMap[String, InputStream]() else{
-  //      val map = new util.HashMap[String, InputStream]()
-  //      files foreach {
-  //        case (fileName, filePath) => val fs = FSFactory.getFs(new FsPath(filePath))
-  //          fs.init(null)
-  //          val inputStream = fs.read(new FsPath(filePath))
-  //
-  //      }
-  //    }
-  //  }
-
-  private var _user:String = _
-
-  override def setUser(user: String): Unit = this._user = user
-
-  override def getUser: String = this._user
-
-  override def getRequestPayload: String = ""
-
-  override def getURL: String = HttpConf.uploadURL
-}
-
-case class BmlUpdateAction(filePaths:Array[String],
-                           _inputStreams:util.Map[String,InputStream]) extends BmlPOSTAction with UploadAction{
-  override def getURL: String = HttpConf.updateVersionURL
-
-  override def getRequestPayload: String = ""
-
-  private var _user:String = _
-
-  private val streamNames = new util.HashMap[String,String]
-
-  override val files: util.Map[String, String] = {
-    if (null == filePaths || filePaths.length == 0) new util.HashMap[String,String]() else{
-      val map = new java.util.HashMap[String, String]
-      filePaths foreach {
-        filePath => val arr = filePath.split(File.separator)
-          val fileName = arr(arr.length - 1)
-          map.put("file", filePath)
-      }
-      map
-    }
-  }
-
-  override def setUser(user: String): Unit = this._user = user
-
-  override def getUser: String = this._user
-  override def inputStreams: util.Map[String, InputStream] = _inputStreams
-
-  override def inputStreamNames: util.Map[String, String] = streamNames
-}
-
-
-case class BmlDownloadAction() extends BmlGETAction with DownloadAction with UserAction{
-
-  private var inputStream:InputStream = _
-  private var user:String = _
-
-  def getInputStream:InputStream = this.inputStream
-
-  def setInputStream(inputStream: InputStream):Unit = this.inputStream = inputStream
-
-  override def getURL: String = HttpConf.downloadURL
-
-  override def write(inputStream: InputStream): Unit = this.inputStream = inputStream
-
-  override def setUser(user: String): Unit = this.user = user
-
-  override def getUser: String = this.user
-}
-
-
-
-
-case class BmlRelateAction(user:String,
-                           resourceId:String,
-                           inputStream: InputStream) extends BmlPOSTAction{
-  override def getRequestPayload: String = ""
-
-  override def getURL: String = HttpConf.updateVersionURL
-}
-
-
-case class BmlGetVersionsAction(user:String,
-                                resourceId:String) extends BmlPOSTAction{
-  override def getRequestPayload: String = ""
-
-  override def getURL: String = HttpConf.getVersionsUrl
-}
-
-
-case class BmlUpdateBasicAction(properties:java.util.Map[String, String]) extends BmlPOSTAction{
-  override def getRequestPayload: String = ""
-
-  override def getURL: String = HttpConf.updateBasicUrl
-}
-
-
-case class BmlGetBasicAction(resourceId:String) extends BmlGETAction with UserAction {
-
-  private var user:String = _
-
-  override def getURL: String = HttpConf.getBasicUrl
-
-  override def setUser(user: String): Unit = this.user = user
-
-  override def getUser: String = this.user
-}
-
-
-
-case class BmlDeleteAction(resourceId:String) extends BmlPOSTAction {
-  override def getRequestPayload: String = ""
-
-  override def getURL: String = HttpConf.deleteURL
-}
-
-
-
diff --git a/bml/bmlclient/src/main/scala/com/webank/wedatasphere/linkis/bml/response/BmlResult.scala b/bml/bmlclient/src/main/scala/com/webank/wedatasphere/linkis/bml/response/BmlResult.scala
deleted file mode 100644
index a63943b..0000000
--- a/bml/bmlclient/src/main/scala/com/webank/wedatasphere/linkis/bml/response/BmlResult.scala
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.response
-
-import java.io.InputStream
-
-import com.webank.wedatasphere.linkis.bml.protocol.ResourceVersions
-import com.webank.wedatasphere.linkis.httpclient.dws.annotation.DWSHttpMessageResult
-import com.webank.wedatasphere.linkis.httpclient.dws.response.DWSResult
-
-/**
-  * created by cooperyang on 2019/5/23
-  * Description:
-  */
-abstract class BmlResult extends DWSResult{
-  private var resourceId:String = _
-  private var version:String = _
-
-  def setResourceId(resourceId:String):Unit = this.resourceId = resourceId
-  def getResourceId:String = this.resourceId
-
-  def setVersion(version:String):Unit = this.version = version
-  def getVersion:String = this.version
-
-  def getResultType:String = this.getClass.toString
-
-}
-
-
-
-@DWSHttpMessageResult("/api/rest_j/v\\d+/bml/updateVersion")
-class BmlUpdateResult extends BmlResult {
-
-}
-
-
-@DWSHttpMessageResult("/api/rest_j/v\\d+/bml/upload")
-class BmlUploadResult extends BmlResult {
-}
-
-
-@DWSHttpMessageResult("/api/rest_j/v\\d+/bml/updateBasic")
-class BmlUpdateBasicResult extends BmlResult {
-}
-
-
-class BmlRelateResult extends BmlResult{
-}
-
-
-@DWSHttpMessageResult("/api/rest_j/v\\d+/bml/relateStorage")
-class BmlRelateStorageResult extends BmlRelateResult {
-}
-
-@DWSHttpMessageResult("/api/rest_j/v\\d+/bml/relateHdfs")
-class BmlRelateHdfsResult extends BmlRelateResult {
-}
-
-
-
-//case class Version(version:String,
-//                   resource:String)
-//case class ResourceVersions(resourceId:String,
-//                           user:String,
-//                           system:String,
-//                           versions:java.util.List[Version])
-
-@DWSHttpMessageResult("/api/rest_j/v\\d+/bml/getVersions")
-class BmlResourceVersionResult extends BmlResult{
-  var resourceVersions:ResourceVersions = _
-
-  def setResourceVersions(resourceVersions: ResourceVersions):Unit = this.resourceVersions = resourceVersions
-  def getResourceVersions:ResourceVersions = this.resourceVersions
-}
-
-
-
-
-
-@DWSHttpMessageResult("/api/rest_j/v\\d+/bml/download")
-class BmlResourceDownloadResult extends BmlResult{
-  var inputStream:InputStream = _
-  def setInputStream(inputStream:InputStream):Unit = this.inputStream = inputStream
-  def getInputStream:InputStream = this.inputStream
-}
-
-
-@DWSHttpMessageResult("/api/rest_j/v\\d+/bml/getBasic")
-class BmlGetBasicResult extends BmlResult{
-  var downloadedFileName:String = _
-  def getDownloadedFileName:String = this.downloadedFileName
-  def setDownloadedFileName(downloadedFileName:String):Unit = this.downloadedFileName = downloadedFileName
-}
-
-@DWSHttpMessageResult("/api/rest_j/v\\d+/bml/delete")
-class BmlDeleteResult extends BmlResult{
-
-}
\ No newline at end of file
diff --git a/bml/bmlcommon/pom.xml b/bml/bmlcommon/pom.xml
deleted file mode 100644
index 5810ec7..0000000
--- a/bml/bmlcommon/pom.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>linkis-bmlcommon</artifactId>
-
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>${basedir}/src/main/resources</directory>
-            </resource>
-        </resources>
-    </build>
-
-
-
-
-
-</project>
\ No newline at end of file
diff --git a/bml/bmlcommon/src/main/java/com/webank/wedatasphere/linkis/bml/model/AbstractAuditable.java b/bml/bmlcommon/src/main/java/com/webank/wedatasphere/linkis/bml/model/AbstractAuditable.java
deleted file mode 100644
index f362ccb..0000000
--- a/bml/bmlcommon/src/main/java/com/webank/wedatasphere/linkis/bml/model/AbstractAuditable.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.model;
-
-import java.util.Date;
-
-/**
- * created by cooperyang on 2019/5/14
- * Description:
- */
-public abstract class AbstractAuditable {
-    private Date created;
-    private Date updated;
-    private String createdBy;
-    private String updatedBy;
-
-    public Date getCreated() {
-        return created;
-    }
-
-    public void setCreated(Date created) {
-        this.created = created;
-    }
-
-    public Date getUpdated() {
-        return updated;
-    }
-
-    public void setUpdated(Date updated) {
-        this.updated = updated;
-    }
-
-    public String getCreatedBy() {
-        return createdBy;
-    }
-
-    public void setCreatedBy(String createdBy) {
-        this.createdBy = createdBy;
-    }
-
-    public String getUpdatedBy() {
-        return updatedBy;
-    }
-
-    public void setUpdatedBy(String updatedBy) {
-        this.updatedBy = updatedBy;
-    }
-
-    public void setInfoOnCreate(String user) {
-        Date current = new Date();
-        this.setCreated(current);
-        this.setUpdated(current);
-        this.setCreatedBy(user);
-        this.setUpdatedBy(user);
-    }
-
-    public void setInfoOnUpdate(String user) {
-        Date current = new Date();
-        this.setUpdated(current);
-        this.setUpdatedBy(user);
-    }
-
-}
diff --git a/bml/bmlcommon/src/main/scala/com/webank/wedatasphere/linkis/bml/protocol/BmlProtocol.scala b/bml/bmlcommon/src/main/scala/com/webank/wedatasphere/linkis/bml/protocol/BmlProtocol.scala
deleted file mode 100644
index c8f29e4..0000000
--- a/bml/bmlcommon/src/main/scala/com/webank/wedatasphere/linkis/bml/protocol/BmlProtocol.scala
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.protocol
-
-import java.io.InputStream
-
-/**
-  * created by cooperyang on 2019/5/14
-  * Description:
-  */
-trait BmlProtocol {
-
-}
-
-trait BmlRequest extends BmlProtocol
-
-abstract class BmlResponse(isSuccess:Boolean) extends BmlProtocol
-
-
-//case class BmlUploadRequest() extends BmlRequest
-//
-//case class BmlDownloadRequest(resourceId:String,
-//                              version:String
-//                              ) extends BmlRequest
-//
-//case class BmlUpdateRequest(resourceID:String) extends BmlRequest
-
-
-case class BmlUploadResponse(isSuccess:Boolean,
-                             resourceId:String,
-                             version:String) extends BmlResponse(isSuccess)
-
-case class BmlDownloadResponse(isSuccess:Boolean,
-                               inputStream:InputStream,
-                               resourceId:String,
-                               version:String,
-                               fullFilePath:String) extends BmlResponse(isSuccess)
-
-
-
-case class BmlUpdateResponse(isSuccess:Boolean,
-                             resourceId:String,
-                             version:String
-                            ) extends BmlResponse(isSuccess)
-
-
-case class BmlRelateResponse(isSuccess:Boolean,
-                             resourceId:String,
-                             version:String
-                            ) extends BmlResponse(isSuccess)
-
-
-case class Version(version:String,
-                   resource:String)
-case class ResourceVersions(resourceId:String,
-                            user:String,
-                            system:String,
-                            versions:java.util.List[Version])
-
-
-case class BmlResourceVersionsResponse(isSuccess:Boolean,
-                                       resourceId:String,
-                                       resourceVersions: ResourceVersions) extends BmlResponse(isSuccess)
-
-
-case class BmlDeleteResponse(isSuccess:Boolean) extends BmlResponse(isSuccess)
\ No newline at end of file
diff --git a/bml/bmlserver/Dockerfile b/bml/bmlserver/Dockerfile
deleted file mode 100644
index 19973e5..0000000
--- a/bml/bmlserver/Dockerfile
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-#  Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM wedatasphere/linkis:emr-base-spark2.4.4
-
-MAINTAINER wedatasphere@webank.com
-
-RUN yum install -y unzip
-WORKDIR /opt/linkis
-
-COPY target/linkis-bml.zip /opt/linkis
-RUN unzip linkis-bml.zip
-
-WORKDIR /opt/linkis/linkis-bml/bin
-ENTRYPOINT ["/opt/linkis/linkis-bml/bin/startup.sh"]
diff --git a/bml/bmlserver/bin/start-bml.sh b/bml/bmlserver/bin/start-bml.sh
deleted file mode 100755
index 80cc775..0000000
--- a/bml/bmlserver/bin/start-bml.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-
-cd `dirname $0`
-cd ..
-HOME=`pwd`
-
-export SERVER_PID=$HOME/bin/linkis.pid
-export SERVER_LOG_PATH=$HOME/logs
-export SERVER_CLASS=com.webank.wedatasphere.linkis.DataWorkCloudApplication
-
-if test -z "$SERVER_HEAP_SIZE"
-then
-  export SERVER_HEAP_SIZE="512M"
-fi
-
-if test -z "$SERVER_JAVA_OPTS"
-then
-  export SERVER_JAVA_OPTS=" -Xmx$SERVER_HEAP_SIZE -XX:+UseG1GC -Xloggc:$HOME/logs/linkis-gc.log"
-fi
-
-if [[ -f "${SERVER_PID}" ]]; then
-    pid=$(cat ${SERVER_PID})
-    if kill -0 ${pid} >/dev/null 2>&1; then
-      echo "Server is already running."
-      exit 1
-    fi
-fi
-
-nohup java $SERVER_JAVA_OPTS -cp ../module/lib/*:$HOME/conf:$HOME/lib/* $SERVER_CLASS 2>&1 > $SERVER_LOG_PATH/linkis.out &
-pid=$!
-if [[ -z "${pid}" ]]; then
-    echo "server $SERVER_NAME start failed!"
-    exit 1
-else
-    echo "server $SERVER_NAME start succeeded!"
-    echo $pid > $SERVER_PID
-    sleep 1
-fi
\ No newline at end of file
diff --git a/bml/bmlserver/bin/startup.sh b/bml/bmlserver/bin/startup.sh
deleted file mode 100755
index 34b2e0d..0000000
--- a/bml/bmlserver/bin/startup.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/bash
-cd `dirname $0`
-cd ..
-HOME=`pwd`
-
-export SERVER_LOG_PATH=$HOME/logs
-export SERVER_CLASS=com.webank.wedatasphere.linkis.DataWorkCloudApplication
-
-
-if test -z "$SERVER_HEAP_SIZE"
-then
-  export SERVER_HEAP_SIZE="512M"
-fi
-
-if test -z "$SERVER_JAVA_OPTS"
-then
-  export SERVER_JAVA_OPTS=" -Xmx$SERVER_HEAP_SIZE -XX:+UseG1GC -Xloggc:$HOME/logs/linkis-bml-gc.log"
-fi
-
-if test -z "$START_PORT"
-then
-  export START_PORT=14006
-fi
-
-export SERVER_PID=$HOME/bin/linkis.pid
-
-if [[ -f "${SERVER_PID}" ]]; then
-    pid=$(cat ${SERVER_PID})
-    if kill -0 ${pid} >/dev/null 2>&1; then
-      echo "Server is already running."
-      exit 1
-    fi
-fi
-
-cp -f /opt/linkis/conf/linkis.properties /opt/linkis/linkis-bml/conf
-
-nohup java $SERVER_JAVA_OPTS -Deurekaurl=$EUREKA_URL -Duser.timezone=Asia/Shanghai -cp $HOME/conf:$HOME/lib/* $SERVER_CLASS --server.port=$START_PORT 2>&1 > $SERVER_LOG_PATH/linkis-bml.log &
-
-pid=$!
-if [[ -z "${pid}" ]]; then
-    echo "server $SERVER_NAME start failed!"
-    exit 1
-else
-    echo "server $SERVER_NAME start succeeded!"
-    echo $pid > $SERVER_PID
-    sleep 1
-fi
-
-tail -f /dev/null
diff --git a/bml/bmlserver/bin/stop-bml.sh b/bml/bmlserver/bin/stop-bml.sh
deleted file mode 100755
index f032887..0000000
--- a/bml/bmlserver/bin/stop-bml.sh
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/bash
-
-cd `dirname $0`
-cd ..
-HOME=`pwd`
-
-export SERVER_PID=$HOME/bin/linkis.pid
-
-function wait_for_server_to_die() {
-  local pid
-  local count
-  pid=$1
-  timeout=$2
-  count=0
-  timeoutTime=$(date "+%s")
-  let "timeoutTime+=$timeout"
-  currentTime=$(date "+%s")
-  forceKill=1
-
-  while [[ $currentTime -lt $timeoutTime ]]; do
-    $(kill ${pid} > /dev/null 2> /dev/null)
-    if kill -0 ${pid} > /dev/null 2>&1; then
-      sleep 3
-    else
-      forceKill=0
-      break
-    fi
-    currentTime=$(date "+%s")
-  done
-
-  if [[ forceKill -ne 0 ]]; then
-    $(kill -9 ${pid} > /dev/null 2> /dev/null)
-  fi
-}
-
-if [[ ! -f "${SERVER_PID}" ]]; then
-    echo "server $SERVER_NAME is not running"
-else
-    pid=$(cat ${SERVER_PID})
-    if [[ -z "${pid}" ]]; then
-      echo "server $SERVER_NAME is not running"
-    else
-      wait_for_server_to_die $pid 40
-      $(rm -f ${SERVER_PID})
-      echo "server $SERVER_NAME is stopped."
-    fi
-fi
\ No newline at end of file
diff --git a/bml/bmlserver/bin/stop.sh b/bml/bmlserver/bin/stop.sh
deleted file mode 100755
index f032887..0000000
--- a/bml/bmlserver/bin/stop.sh
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/bash
-
-cd `dirname $0`
-cd ..
-HOME=`pwd`
-
-export SERVER_PID=$HOME/bin/linkis.pid
-
-function wait_for_server_to_die() {
-  local pid
-  local count
-  pid=$1
-  timeout=$2
-  count=0
-  timeoutTime=$(date "+%s")
-  let "timeoutTime+=$timeout"
-  currentTime=$(date "+%s")
-  forceKill=1
-
-  while [[ $currentTime -lt $timeoutTime ]]; do
-    $(kill ${pid} > /dev/null 2> /dev/null)
-    if kill -0 ${pid} > /dev/null 2>&1; then
-      sleep 3
-    else
-      forceKill=0
-      break
-    fi
-    currentTime=$(date "+%s")
-  done
-
-  if [[ forceKill -ne 0 ]]; then
-    $(kill -9 ${pid} > /dev/null 2> /dev/null)
-  fi
-}
-
-if [[ ! -f "${SERVER_PID}" ]]; then
-    echo "server $SERVER_NAME is not running"
-else
-    pid=$(cat ${SERVER_PID})
-    if [[ -z "${pid}" ]]; then
-      echo "server $SERVER_NAME is not running"
-    else
-      wait_for_server_to_die $pid 40
-      $(rm -f ${SERVER_PID})
-      echo "server $SERVER_NAME is stopped."
-    fi
-fi
\ No newline at end of file
diff --git a/bml/bmlserver/conf/application.yml b/bml/bmlserver/conf/application.yml
deleted file mode 100644
index a1a3ec8..0000000
--- a/bml/bmlserver/conf/application.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-server:
-  port: 8056
-spring:
-  application:
-    name: bml-server
-
-eureka:
-  client:
-    serviceUrl:
-      defaultZone: ${eurekaurl}
-  instance:
-    lease-renewal-interval-in-second: 5
-    lease-expiration-duration-in-second: 10
-    prefer-ip-address: true
-    instance-id: ${spring.cloud.client.ip-address}:${server.port}
-    metadata-map:
-      test: test-user
-
-management:
-  endpoints:
-    web:
-      exposure:
-        include: refresh,info
-logging:
-  config: classpath:log4j2.xml
-
-
-pagehelper:
-  helper-dialect: mysql
-  reasonable: true
-  support-methods-arguments: true
-  params: countSql
-
-
-#    register-with-eureka: false
-#    fetch-registry: false
diff --git a/bml/bmlserver/conf/linkis.properties b/bml/bmlserver/conf/linkis.properties
deleted file mode 100644
index 4135383..0000000
--- a/bml/bmlserver/conf/linkis.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-wds.linkis.server.mybatis.mapperLocations=classpath:com/webank/wedatasphere/linkis/bml/dao/impl/*.xml
-wds.linkis.server.mybatis.typeAliasesPackage=com.webank.wedatasphere.linkis.bml.dao
-wds.linkis.server.mybatis.BasePackage=com.webank.wedatasphere.linkis.bml.dao
-wds.test.mode=true
-wds.linkis.server.restful.scan.packages=com.webank.wedatasphere.linkis.bml.restful
-
-#sit
-wds.linkis.server.mybatis.datasource.url=
-wds.linkis.server.mybatis.datasource.username=
-wds.linkis.server.mybatis.datasource.password=
-wds.linkis.server.version=v1
-
-#hadoop.config.dir
\ No newline at end of file
diff --git a/bml/bmlserver/conf/log4j2.xml b/bml/bmlserver/conf/log4j2.xml
deleted file mode 100644
index 3da04d9..0000000
--- a/bml/bmlserver/conf/log4j2.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration status="error" monitorInterval="30">
-    <appenders>
-        <Console name="Console" target="SYSTEM_OUT">
-            <ThresholdFilter level="trace" onMatch="ACCEPT" onMismatch="DENY"/>
-            <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%t] %logger{36} %L %M - %msg%xEx%n"/>
-        </Console>
-        <RollingFile name="RollingFile" fileName="logs/BmlServer.log"
-                     filePattern="logs/%d{yyyy-MM}/BmlServer-log-%d{yyyy-MM-dd}-%i.log.gz">
-            <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%t] %logger{36} %L %M - %msg%xEx%n"/>
-            <SizeBasedTriggeringPolicy size="100MB"/>
-            <DefaultRolloverStrategy max="20"/>
-        </RollingFile>
-    </appenders>
-    <loggers>
-        <root level="INFO">
-            <appender-ref ref="RollingFile"/>
-            <appender-ref ref="Console"/>
-        </root>
-    </loggers>
-</configuration>
-
diff --git a/bml/bmlserver/pom.xml b/bml/bmlserver/pom.xml
deleted file mode 100644
index 3799c53..0000000
--- a/bml/bmlserver/pom.xml
+++ /dev/null
@@ -1,110 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>linkis-bmlserver</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-mybatis</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-bmlcommon</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cloudRPC</artifactId>
-            <version>${project.version}</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>asm</artifactId>
-                    <groupId>org.ow2.asm</groupId>
-                </exclusion>
-            </exclusions>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-storage</artifactId>
-            <version>${project.version}</version>
-            <scope>provided</scope>
-        </dependency>
-
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>2.3</version>
-                <inherited>false</inherited>
-                <executions>
-                    <execution>
-                        <id>make-assembly</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                        <configuration>
-                            <descriptors>
-                                <descriptor>src/main/assembly/distribution.xml</descriptor>
-                            </descriptors>
-                        </configuration>
-                    </execution>
-                </executions>
-                <configuration>
-                    <skipAssembly>false</skipAssembly>
-                    <finalName>linkis-bml</finalName>
-                    <appendAssemblyId>false</appendAssemblyId>
-                    <attach>false</attach>
-                    <descriptors>
-                        <descriptor>src/main/assembly/distribution.xml</descriptor>
-                    </descriptors>
-                </configuration>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>src/main/java</directory>
-                <includes>
-                    <include>**/*.xml</include>
-                </includes>
-            </resource>
-            <resource>
-                <directory>src/main/resources</directory>
-                <excludes>
-                    <exclude>**/*.properties</exclude>
-                    <exclude>**/application.yml</exclude>
-                    <exclude>**/bootstrap.yml</exclude>
-                    <exclude>**/log4j2.xml</exclude>
-                </excludes>
-            </resource>
-        </resources>
-    </build>
-</project>
\ No newline at end of file
diff --git a/bml/bmlserver/pom_k8s.xml b/bml/bmlserver/pom_k8s.xml
deleted file mode 100644
index ec9e478..0000000
--- a/bml/bmlserver/pom_k8s.xml
+++ /dev/null
@@ -1,152 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>linkis-bmlserver</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-mybatis</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-bmlcommon</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cloudRPC</artifactId>
-            <exclusions>
-                <exclusion>
-                    <artifactId>asm</artifactId>
-                    <groupId>org.ow2.asm</groupId>
-                </exclusion>
-                <exclusion>
-                    <groupId>tomcat</groupId>
-                    <artifactId>jasper-compiler</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>tomcat</groupId>
-                    <artifactId>jasper-runtime</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-storage</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.apache.httpcomponents</groupId>
-                    <artifactId>httpclient</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>tomcat</groupId>
-                    <artifactId>jasper-compiler</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>tomcat</groupId>
-                    <artifactId>jasper-runtime</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpclient</artifactId>
-            <version>${httpclient.version}</version>
-        </dependency>
-
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>2.3</version>
-                <inherited>false</inherited>
-                <executions>
-                    <execution>
-                        <id>make-assembly</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                        <configuration>
-                            <descriptors>
-                                <descriptor>src/main/assembly/distribution.xml</descriptor>
-                            </descriptors>
-                        </configuration>
-                    </execution>
-                </executions>
-                <configuration>
-                    <skipAssembly>false</skipAssembly>
-                    <finalName>linkis-bml</finalName>
-                    <appendAssemblyId>false</appendAssemblyId>
-                    <attach>false</attach>
-                    <descriptors>
-                        <descriptor>src/main/assembly/distribution.xml</descriptor>
-                    </descriptors>
-                </configuration>
-            </plugin>
-<!--            <plugin>-->
-<!--                <groupId>com.spotify</groupId>-->
-<!--                <artifactId>dockerfile-maven-plugin</artifactId>-->
-<!--                <version>1.3.4</version>-->
-<!--                <executions>-->
-<!--                    <execution>-->
-<!--                        <id>default</id>-->
-<!--                        <phase>package</phase>-->
-<!--                        <goals>-->
-<!--                            <goal>build</goal>-->
-<!--                            <goal>tag</goal>-->
-<!--                        </goals>-->
-<!--                    </execution>-->
-<!--                </executions>-->
-<!--                <configuration>-->
-<!--                    <repository>${harbor.reposity}/linkis-bml</repository>-->
-<!--                    <tag>${linkis.version}</tag>-->
-<!--                    <dockerInfoDirectory>${basedir}/dockerinfo</dockerInfoDirectory>-->
-<!--                </configuration>-->
-<!--            </plugin>-->
-        </plugins>
-        <resources>
-            <resource>
-                <directory>src/main/java</directory>
-                <includes>
-                    <include>**/*.xml</include>
-                </includes>
-            </resource>
-            <resource>
-                <directory>src/main/resources</directory>
-                <excludes>
-                    <exclude>**/*.properties</exclude>
-                    <exclude>**/application.yml</exclude>
-                    <exclude>**/bootstrap.yml</exclude>
-                    <exclude>**/log4j2.xml</exclude>
-                </excludes>
-            </resource>
-        </resources>
-    </build>
-</project>
\ No newline at end of file
diff --git a/bml/bmlserver/src/main/assembly/distribution.xml b/bml/bmlserver/src/main/assembly/distribution.xml
deleted file mode 100644
index ff80357..0000000
--- a/bml/bmlserver/src/main/assembly/distribution.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<!--
-  ~ Copyright 2019 WeBank
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<assembly
-        xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/2.3"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/2.3 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-    <id>linkis-bml</id>
-    <formats>
-        <format>zip</format>
-    </formats>
-    <includeBaseDirectory>true</includeBaseDirectory>
-    <baseDirectory>linkis-bml</baseDirectory>
-
-    <dependencySets>
-        <dependencySet>
-            <!-- Enable access to all projects in the current multimodule build! <useAllReactorProjects>true</useAllReactorProjects> -->
-            <!-- Now, select which projects to include in this module-set. -->
-            <outputDirectory>lib</outputDirectory>
-            <useProjectArtifact>true</useProjectArtifact>
-            <useTransitiveDependencies>true</useTransitiveDependencies>
-            <unpack>false</unpack>
-            <useStrictFiltering>true</useStrictFiltering>
-            <useTransitiveFiltering>true</useTransitiveFiltering>
-        </dependencySet>
-    </dependencySets>
-
-    <fileSets>
-        <fileSet>
-            <directory>${basedir}/conf</directory>
-            <includes>
-                <include>*</include>
-            </includes>
-            <fileMode>0777</fileMode>
-            <outputDirectory>conf</outputDirectory>
-            <lineEnding>unix</lineEnding>
-        </fileSet>
-        <fileSet>
-            <directory>${basedir}/bin</directory>
-            <includes>
-                <include>*</include>
-            </includes>
-            <fileMode>0777</fileMode>
-            <outputDirectory>bin</outputDirectory>
-            <lineEnding>unix</lineEnding>
-        </fileSet>
-        <fileSet>
-            <directory>.</directory>
-            <excludes>
-                <exclude>*/**</exclude>
-            </excludes>
-            <outputDirectory>logs</outputDirectory>
-        </fileSet>
-    </fileSets>
-
-</assembly>
-
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/Entity/DownloadModel.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/Entity/DownloadModel.java
deleted file mode 100644
index 7b96ef5..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/Entity/DownloadModel.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.Entity;
-
-import java.util.Date;
-
-/**
- * created by cooperyang on 2019/5/30
- * Description:
- */
-public class DownloadModel {
-    private int id;
-    private Date startTime;
-    private Date endTime;
-    private String clientIp;
-    /**
-     * state 表示下载是否成功
-     * 0 表示成功
-     * 1 表示失败
-     */
-    private Integer state;
-    private String resourceId;
-    private String version;
-    private String downloader;
-
-    public DownloadModel(){
-
-    }
-
-    public DownloadModel(String resourceId, String version,String downloader, String clientIp){
-        this.resourceId = resourceId;
-        this.version=version;
-        this.startTime = new Date(System.currentTimeMillis());
-        this.downloader = downloader;
-        this.clientIp = clientIp;
-    }
-
-
-    public String getVersion() {
-        return version;
-    }
-
-    public void setVersion(String version) {
-        this.version = version;
-    }
-
-    public int getId() {
-        return id;
-    }
-
-    public void setId(int id) {
-        this.id = id;
-    }
-
-    public Date getStartTime() {
-        return startTime;
-    }
-
-    public void setStartTime(Date startTime) {
-        this.startTime = startTime;
-    }
-
-    public Date getEndTime() {
-        return endTime;
-    }
-
-    public void setEndTime(Date endTime) {
-        this.endTime = endTime;
-    }
-
-    public String getClientIp() {
-        return clientIp;
-    }
-
-    public void setClientIp(String clientIp) {
-        this.clientIp = clientIp;
-    }
-
-    public Integer getState() {
-        return state;
-    }
-
-    public void setState(Integer state) {
-        this.state = state;
-    }
-
-    public String getResourceId() {
-        return resourceId;
-    }
-
-    public void setResourceId(String resourceId) {
-        this.resourceId = resourceId;
-    }
-
-    public String getDownloader() {
-        return downloader;
-    }
-
-    public void setDownloader(String downloader) {
-        this.downloader = downloader;
-    }
-
-    @Override
-    public String toString() {
-        return "DownloadModel{" +
-                "id=" + id +
-                ", startTime=" + startTime +
-                ", endTime=" + endTime +
-                ", clientIp='" + clientIp + '\'' +
-                ", state=" + state +
-                ", resourceId='" + resourceId + '\'' +
-                ", downloader='" + downloader + '\'' +
-                '}';
-    }
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/Entity/Resource.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/Entity/Resource.java
deleted file mode 100644
index 709c365..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/Entity/Resource.java
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.Entity;
-
-import java.util.Date;
-import java.util.Map;
-
-/**
- * Created by cooperyang on 2019/5/16.
- */
-public class Resource {
-
-    private static final String MAX_VERSION = "maxVersion";
-    private static final String IS_PRIVATE = "isPrivate";
-    private static final String RESOURCE_HEADER = "resourceHeader";
-    private static final String DOWNLOAD_FILE_NAME = "downloadedFileName";
-    private static final String SYSTEM = "system";
-    private static final String IS_EXPIRE = "isExpire";
-    private static final String EXPIRE_TYPE = "expireType";
-    private static final String EXPIRE_TIME = "expireTime";
-    private static final String UPDATER = "updator";
-
-
-
-
-    private int id;
-
-    private boolean isPrivate;
-
-    private String resourceHeader;
-
-    private String downloadedFileName;
-
-    private String sys;
-
-    private Date createTime;
-
-    private boolean isExpire;
-
-    private String expireType;
-
-    /**
-     *  expireTime的形式是 yyyy-MM-dd
-     *  或 yyyy-MM-dd HH:mm:ss
-     */
-    private String expireTime;
-
-    private Date updateTime;
-
-    private String updator;
-
-    private int maxVersion;
-
-    private String resourceId;
-
-    private String user;
-
-    private String system;
-
-    private boolean enableFlag;
-
-    public String getResourceId() {
-        return resourceId;
-    }
-
-    public void setResourceId(String resourceId) {
-        this.resourceId = resourceId;
-    }
-
-    public String getUser() {
-        return user;
-    }
-
-    public void setUser(String user) {
-        this.user = user;
-    }
-
-    public String getSystem() {
-        return system;
-    }
-
-    public void setSystem(String system) {
-        this.system = system;
-    }
-
-    public Resource() {
-    }
-
-    public Resource(String resourceId, String user, String downloadedFileName){
-        this.user = user;
-        this.resourceId = resourceId;
-        this.createTime = new Date(System.currentTimeMillis());
-        this.setUpdateTime(new Date(System.currentTimeMillis()));
-        this.enableFlag = true;
-        this.downloadedFileName = downloadedFileName;
-    }
-
-    public boolean isEnableFlag() {
-        return enableFlag;
-    }
-
-    public void setEnableFlag(boolean enableFlag) {
-        this.enableFlag = enableFlag;
-    }
-
-    public int getId() {
-        return id;
-    }
-
-    public void setId(int id) {
-        this.id = id;
-    }
-
-    public boolean isPrivate() {
-        return isPrivate;
-    }
-
-    public void setPrivate(boolean aPrivate) {
-        isPrivate = aPrivate;
-    }
-
-    public String getResourceHeader() {
-        return resourceHeader;
-    }
-
-    public void setResourceHeader(String resourceHeader) {
-        this.resourceHeader = resourceHeader;
-    }
-
-    public String getDownloadedFileName() {
-        return downloadedFileName;
-    }
-
-    public void setDownloadedFileName(String downloadedFileName) {
-        this.downloadedFileName = downloadedFileName;
-    }
-
-    public String getSys() {
-        return sys;
-    }
-
-    public void setSys(String sys) {
-        this.sys = sys;
-    }
-
-    public Date getCreateTime() {
-        return createTime;
-    }
-
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
-
-    public boolean isExpire() {
-        return isExpire;
-    }
-
-    public void setExpire(boolean expire) {
-        isExpire = expire;
-    }
-
-    public String getExpireType() {
-        return expireType;
-    }
-
-    public void setExpireType(String expireType) {
-        this.expireType = expireType;
-    }
-
-    public String getExpireTime() {
-        return expireTime;
-    }
-
-    public void setExpireTime(String expireTime) {
-        this.expireTime = expireTime;
-    }
-
-    public Date getUpdateTime() {
-        return updateTime;
-    }
-
-    public void setUpdateTime(Date updateTime) {
-        this.updateTime = updateTime;
-    }
-
-    public String getUpdator() {
-        return updator;
-    }
-
-    public void setUpdator(String updator) {
-        this.updator = updator;
-    }
-
-    public int getMaxVersion() {
-        return maxVersion;
-    }
-
-    public void setMaxVersion(int maxVersion) {
-        this.maxVersion = maxVersion;
-    }
-
-    public static Resource createNewResource(String resourceId, String user, String downloadedFileName, Map<String, Object> properties){
-        Resource resource = new Resource(resourceId, user, downloadedFileName);
-        if (properties.get(MAX_VERSION) == null){
-            resource.setMaxVersion(10);
-        }else{
-            resource.setMaxVersion(Integer.parseInt(properties.get(MAX_VERSION).toString()));
-        }
-        if (properties.get(IS_EXPIRE) == null){
-            //默认是不过期的
-            resource.setExpire(false);
-        }else{
-            resource.setExpire(properties.get(IS_EXPIRE).toString().equalsIgnoreCase("true"));
-        }
-        if (properties.get(SYSTEM) == null){
-            resource.setSystem("WTSS");
-        }else{
-            resource.setSystem(properties.get(SYSTEM).toString());
-        }
-        if (properties.get(IS_PRIVATE) == null){
-            resource.setPrivate(true);
-        }else{
-            resource.setPrivate(properties.get(IS_PRIVATE).toString().equalsIgnoreCase("true"));
-        }
-        if (properties.get(RESOURCE_HEADER) == null){
-            resource.setResourceHeader(null);
-        }else{
-            resource.setResourceHeader((String)(properties.get(RESOURCE_HEADER)));
-        }
-        //如果资源是过期的,需要设置资源过期的类型和时间
-        if (resource.isExpire()){
-            if (properties.get(EXPIRE_TYPE) == null){
-                resource.setExpireType("time");
-            }else{
-                resource.setExpireType((String)(properties.get(EXPIRE_TYPE)));
-            }
-            if (properties.get(EXPIRE_TIME) == null){
-                //默认设置50天过期
-                resource.setExpireTime("50d");
-            }else{
-                resource.setExpireTime((String)(properties.get(EXPIRE_TIME)));
-            }
-        }
-        return resource;
-    }
-
-
-
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/Entity/ResourceTask.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/Entity/ResourceTask.java
deleted file mode 100644
index 5cdcc92..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/Entity/ResourceTask.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.Entity;
-
-import com.webank.wedatasphere.linkis.bml.common.Constant;
-import com.webank.wedatasphere.linkis.bml.common.OperationEnum;
-import com.webank.wedatasphere.linkis.bml.threading.TaskState;
-import com.webank.wedatasphere.linkis.rpc.Sender;
-
-import java.util.Date;
-import java.util.Map;
-
-/**
- * @author cooperyang
- * @date 2019-9-16
- */
-public class ResourceTask {
-
-    private long id;
-
-    private String resourceId;
-
-    private String version;
-
-    /**
-     * 操作类型.upload = 0, update = 1
-     */
-    private String operation;
-
-    /**
-     * 任务当前状态:Inited, Schduled, Running, Succeed, Failed,Cancelled
-     */
-    private String state;
-
-    /**
-     * 当前执行用户
-     */
-    private String submitUser;
-
-    /**
-     * 当前执行系统
-     */
-    private String system;
-
-    /**
-     * 物料库实例
-     */
-    private String instance;
-
-    /**
-     * 请求IP
-     */
-    private String clientIp;
-
-    private String errMsg;
-
-    private String extraParams;
-
-    private Date startTime;
-
-    private Date endTime;
-
-    private Date lastUpdateTime;
-
-    public static ResourceTask createUploadTask(String resourceId, String user,
-        Map<String, Object> properties) {
-        ResourceTask resourceTask = new ResourceTask();
-        resourceTask.setResourceId(resourceId);
-        resourceTask.setVersion(Constant.FIRST_VERSION);
-        resourceTask.setOperation(OperationEnum.UPLOAD.getValue());
-        resourceTask.setState(TaskState.SCHEDULED.getValue());
-        resourceTask.setSubmitUser(user);
-        resourceTask.setSystem((String)properties.get("system"));
-        resourceTask.setClientIp((String)properties.get("clientIp"));
-        resourceTask.setInstance(Sender.getThisInstance());
-        resourceTask.setStartTime(new Date());
-        resourceTask.setLastUpdateTime(new Date());
-        return resourceTask;
-    }
-
-    public static ResourceTask createUpdateTask(String resourceId, String version, String user,
-        String system, Map<String, Object> properties) {
-        ResourceTask resourceTask = new ResourceTask();
-        resourceTask.setResourceId(resourceId);
-        resourceTask.setVersion(version);
-        resourceTask.setOperation(OperationEnum.UPDATE.getValue());
-        resourceTask.setState(TaskState.SCHEDULED.getValue());
-        resourceTask.setSubmitUser(user);
-        resourceTask.setClientIp((String)properties.get("clientIp"));
-        resourceTask.setSystem(system);
-        resourceTask.setInstance(Sender.getThisInstance());
-        resourceTask.setStartTime(new Date());
-        resourceTask.setLastUpdateTime(new Date());
-        return resourceTask;
-    }
-
-  public static ResourceTask createDownloadTask(String resourceId, String version, String user,
-      String system, String clientIp) {
-    ResourceTask resourceTask = new ResourceTask();
-    resourceTask.setResourceId(resourceId);
-    resourceTask.setVersion(version);
-    resourceTask.setOperation(OperationEnum.DOWNLOAD.getValue());
-    resourceTask.setState(TaskState.RUNNING.getValue());
-    resourceTask.setSubmitUser(user);
-    resourceTask.setClientIp(clientIp);
-    resourceTask.setSystem(system);
-    resourceTask.setInstance(Sender.getThisInstance());
-    resourceTask.setStartTime(new Date());
-    resourceTask.setLastUpdateTime(new Date());
-    return resourceTask;
-  }
-
-  public static ResourceTask createDeleteVersionTask(String resourceId, String version, String user,
-      String system, String clientIp) {
-    ResourceTask resourceTask = new ResourceTask();
-    resourceTask.setResourceId(resourceId);
-    resourceTask.setVersion(version);
-    resourceTask.setOperation(OperationEnum.DELETE_VERSION.getValue());
-    resourceTask.setState(TaskState.RUNNING.getValue());
-    resourceTask.setSubmitUser(user);
-    resourceTask.setClientIp(clientIp);
-    resourceTask.setSystem(system);
-    resourceTask.setInstance(Sender.getThisInstance());
-    resourceTask.setStartTime(new Date());
-    resourceTask.setLastUpdateTime(new Date());
-    return resourceTask;
-  }
-
-  public static ResourceTask createDeleteResourceTask(String resourceId, String user, String system,
-      String clientIp, String extraParams) {
-    ResourceTask resourceTask = new ResourceTask();
-    resourceTask.setResourceId(resourceId);
-    resourceTask.setExtraParams(extraParams);
-    resourceTask.setOperation(OperationEnum.DELETE_RESOURCE.getValue());
-    resourceTask.setState(TaskState.RUNNING.getValue());
-    resourceTask.setSubmitUser(user);
-    resourceTask.setClientIp(clientIp);
-    resourceTask.setSystem(system);
-    resourceTask.setInstance(Sender.getThisInstance());
-    resourceTask.setStartTime(new Date());
-    resourceTask.setLastUpdateTime(new Date());
-    return resourceTask;
-  }
-
-  public static ResourceTask createDeleteResourcesTask(String user, String system, String clientIp,
-      String extraParams) {
-    ResourceTask resourceTask = new ResourceTask();
-    resourceTask.setExtraParams(extraParams);
-    resourceTask.setOperation(OperationEnum.DELETE_RESOURCES.getValue());
-    resourceTask.setState(TaskState.RUNNING.getValue());
-    resourceTask.setSubmitUser(user);
-    resourceTask.setClientIp(clientIp);
-    resourceTask.setSystem(system);
-    resourceTask.setInstance(Sender.getThisInstance());
-    resourceTask.setStartTime(new Date());
-    resourceTask.setLastUpdateTime(new Date());
-    return resourceTask;
-  }
-
-  public String getResourceId() {
-        return resourceId;
-    }
-
-    public void setResourceId(String resourceId) {
-        this.resourceId = resourceId;
-    }
-
-    public String getSubmitUser() {
-        return submitUser;
-    }
-
-    public void setSubmitUser(String submitUser) {
-        this.submitUser = submitUser;
-    }
-
-    public long getId() {
-        return id;
-    }
-
-    public void setId(long id) {
-        this.id = id;
-    }
-
-    public String getVersion() {
-        return version;
-    }
-
-    public void setVersion(String version) {
-        this.version = version;
-    }
-
-    public String getOperation() {
-        return operation;
-    }
-
-    public void setOperation(String operation) {
-        this.operation = operation;
-    }
-
-    public String getState() {
-        return state;
-    }
-
-    public void setState(String state) {
-        this.state = state;
-    }
-
-    public String getSystem() {
-        return system;
-    }
-
-    public void setSystem(String system) {
-        this.system = system;
-    }
-
-    public String getInstance() {
-        return instance;
-    }
-
-    public void setInstance(String instance) {
-        this.instance = instance;
-    }
-
-    public String getErrMsg() {
-        return errMsg;
-    }
-
-    public void setErrMsg(String errMsg) {
-        this.errMsg = errMsg;
-    }
-
-    public Date getStartTime() {
-        return startTime;
-    }
-
-    public void setStartTime(Date startTime) {
-        this.startTime = startTime;
-    }
-
-    public Date getEndTime() {
-        return endTime;
-    }
-
-    public void setEndTime(Date endTime) {
-        this.endTime = endTime;
-    }
-
-    public Date getLastUpdateTime() {
-        return lastUpdateTime;
-    }
-
-    public void setLastUpdateTime(Date lastUpdateTime) {
-        this.lastUpdateTime = lastUpdateTime;
-    }
-
-    public String getClientIp() {
-        return clientIp;
-    }
-
-    public void setClientIp(String clientIp) {
-        this.clientIp = clientIp;
-    }
-
-  public String getExtraParams() {
-    return extraParams;
-  }
-
-  public void setExtraParams(String extraParams) {
-    this.extraParams = extraParams;
-  }
-
-  @Override
-  public String toString() {
-    return "ResourceTask{" + "id=" + id + ", resourceId='" + resourceId + '\'' + ", version='" +
-        version + '\'' + ", operation='" + operation + '\'' + ", state='" + state + '\'' +
-        ", submitUser='" + submitUser + '\'' + ", system='" + system + '\'' + ", instance='" +
-        instance + '\'' + ", clientIp='" + clientIp + '\'' + ", errMsg='" + errMsg + '\'' +
-        ", extraParams='" + extraParams + '\'' + ", startTime=" + startTime + ", endTime=" +
-        endTime + ", lastUpdateTime=" + lastUpdateTime + '}';
-  }
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/Entity/ResourceVersion.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/Entity/ResourceVersion.java
deleted file mode 100644
index 769c4a1..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/Entity/ResourceVersion.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.Entity;
-
-import java.util.Date;
-
-/**
- * Created by cooperyang on 2019/5/16.
- */
-public class ResourceVersion {
-
-    private long id;
-
-    private String resourceId;
-
-    private String fileMd5;
-
-    private String version;
-
-    private long size;
-
-    private String resource;
-
-    private String description;
-
-    private String clientIp;
-
-    private boolean enableFlag;
-
-    private String user;
-
-    private String system;
-
-
-    private Date startTime;
-
-    private Date endTime;
-
-
-    private long startByte;
-
-    private long endByte;
-
-
-    private String updator;
-
-    public String getResourceId() {
-        return resourceId;
-    }
-
-    public void setResourceId(String resourceId) {
-        this.resourceId = resourceId;
-    }
-
-    public String getUser() {
-        return user;
-    }
-
-    public void setUser(String user) {
-        this.user = user;
-    }
-
-    public String getSystem() {
-        return system;
-    }
-
-    public void setSystem(String system) {
-        this.system = system;
-    }
-
-    public String getVersion() {
-        return version;
-    }
-
-    public void setVersion(String version) {
-        this.version = version;
-    }
-
-    public String getResource() {
-        return resource;
-    }
-
-    public void setResource(String resource) {
-        this.resource = resource;
-    }
-
-
-    public long getId() {
-        return id;
-    }
-
-    public void setId(long id) {
-        this.id = id;
-    }
-
-    public String getFileMd5() {
-        return fileMd5;
-    }
-
-    public void setFileMd5(String fileMd5) {
-        this.fileMd5 = fileMd5;
-    }
-
-    public long getSize() {
-        return size;
-    }
-
-    public void setSize(long size) {
-        this.size = size;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public String getClientIp() {
-        return clientIp;
-    }
-
-    public void setClientIp(String clientIp) {
-        this.clientIp = clientIp;
-    }
-
-    public boolean isEnableFlag() {
-        return enableFlag;
-    }
-
-    public void setEnableFlag(boolean enableFlag) {
-        this.enableFlag = enableFlag;
-    }
-
-    public long getStartByte() {
-        return startByte;
-    }
-
-    public void setStartByte(long startByte) {
-        this.startByte = startByte;
-    }
-
-    public long getEndByte() {
-        return endByte;
-    }
-
-    public void setEndByte(long endByte) {
-        this.endByte = endByte;
-    }
-
-
-    public Date getStartTime() {
-        return startTime;
-    }
-
-    public void setStartTime(Date startTime) {
-        this.startTime = startTime;
-    }
-
-    public Date getEndTime() {
-        return endTime;
-    }
-
-    public void setEndTime(Date endTime) {
-        this.endTime = endTime;
-    }
-
-    public String getUpdator() {
-        return updator;
-    }
-
-    public void setUpdator(String updator) {
-        this.updator = updator;
-    }
-
-    public static ResourceVersion createNewResourceVersion(String resourceId, String resourcePath, String fileMd5,
-                                                           String clientIp, long size, String version, long startByte){
-        ResourceVersion resourceVersion = new ResourceVersion();
-        resourceVersion.setResourceId(resourceId);
-        resourceVersion.setResource(resourcePath);
-        resourceVersion.setFileMd5(fileMd5);
-        resourceVersion.setClientIp(clientIp);
-        resourceVersion.setSize(size);
-        resourceVersion.setEnableFlag(true);
-        resourceVersion.setVersion(version);
-        resourceVersion.setStartByte(startByte);
-        resourceVersion.setEndByte(startByte + size - 1);
-        resourceVersion.setStartTime(new Date(System.currentTimeMillis()));
-        resourceVersion.setEndTime(new Date(System.currentTimeMillis()));
-        return resourceVersion;
-    }
-
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/Entity/Version.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/Entity/Version.java
deleted file mode 100644
index 2366c21..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/Entity/Version.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.Entity;
-
-/**
- * Created by cooperyang on 2019/5/16.
- */
-public class Version {
-
-    private String version;
-
-    private String resource;
-
-    public String getVersion() {
-        return version;
-    }
-
-    public void setVersion(String version) {
-        this.version = version;
-    }
-
-    public String getResource() {
-        return resource;
-    }
-
-    public void setResource(String resource) {
-        this.resource = resource;
-    }
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/common/Constant.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/common/Constant.java
deleted file mode 100644
index 65e8b0f..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/common/Constant.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.common;
-
-import com.google.common.collect.Lists;
-
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * Created by cooperyang on 2019/5/21.
- */
-public interface Constant {
-
-    String FILE_SYSTEM_USER = "neiljianliu";
-
-    List<String> resourceTypes = Lists.newArrayList(Arrays.asList("hdfs", "share", "file"));
-
-    String FIRST_VERSION = "v000001";
-
-    String DEFAULT_SYSTEM = "WTSS";
-
-    String TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
-
-    String VERSION_FORMAT = "%06d";
-
-    String VERSION_PREFIX = "v";
-
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/common/ExecutorManager.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/common/ExecutorManager.java
deleted file mode 100644
index 3a9e9be..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/common/ExecutorManager.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.common;
-
-
-import com.google.common.util.concurrent.ThreadFactoryBuilder;
-
-import com.webank.wedatasphere.linkis.bml.conf.BmlServerConfiguration;
-
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-
-/**
- * 线程池管理器,用于获取各个线程池单例
- *
- * @author cooperyang
- * @date 2019-9-16
- */
-public class ExecutorManager {
-
-  /**
-   * 使用多线程安全单例模式
-   * 使用关键代码块synchronized,保证效率,synchronized代码块中二次检查,保证实例不被重复实例化
-   */
-  private static ThreadPoolExecutor uploadThreadPool;
-  private static ThreadPoolExecutor updateThreadPool;
-  private static ThreadPoolExecutor downloadThreadPool;
-  private static final int BML_MAX_THREAD_SIZE = ((Number)BmlServerConfiguration.BML_MAX_THREAD_SIZE().getValue()).intValue();
-
-  public ExecutorManager() {
-  }
-
-  /**
-   * 获取上传任务的线程池
-   *
-   * @return 线程名为upload-thread-%d
-   */
-  public static ThreadPoolExecutor getUploadThreadPool() {
-    if (uploadThreadPool != null) {
-      return uploadThreadPool;
-    }
-    synchronized (ExecutorManager.class) {
-      if (uploadThreadPool == null) {
-        // 自定义线程名,方便出错时回溯
-        ThreadFactory namedThreadFactory = new ThreadFactoryBuilder().setNameFormat(
-            "upload-thread-%d").build();
-        uploadThreadPool = new ThreadPoolExecutor(BML_MAX_THREAD_SIZE,
-                                                  BML_MAX_THREAD_SIZE, 0L,
-                                                  TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(),
-                                                  namedThreadFactory,
-                                                  new ThreadPoolExecutor.AbortPolicy());
-      }
-    }
-
-    return uploadThreadPool;
-  }
-
-  /**
-   * 获取更新任务的线程池
-   *
-   * @return 线程名为update-thread-%d
-   */
-  public static ThreadPoolExecutor getUpdateThreadPool() {
-    if (updateThreadPool != null) {
-      return updateThreadPool;
-    }
-    synchronized (ExecutorManager.class) {
-      if (updateThreadPool == null) {
-        // 自定义线程名,方便出错时回溯
-        ThreadFactory namedThreadFactory = new ThreadFactoryBuilder().setNameFormat(
-            "update-thread-%d").build();
-        updateThreadPool = new ThreadPoolExecutor(BML_MAX_THREAD_SIZE,
-                                                  BML_MAX_THREAD_SIZE, 0L,
-                                                  TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(),
-                                                  namedThreadFactory,
-                                                  new ThreadPoolExecutor.AbortPolicy());
-      }
-    }
-
-    return updateThreadPool;
-  }
-
-  /**
-   * 获取下载任务的线程池
-   *
-   * @return 线程名为download-thread-%d
-   */
-  public static ThreadPoolExecutor getDownloadThreadPool() {
-    if (downloadThreadPool != null) {
-      return downloadThreadPool;
-    }
-    synchronized (ExecutorManager.class) {
-      if (downloadThreadPool == null) {
-        // 自定义线程名,方便出错时回溯
-        ThreadFactory namedThreadFactory = new ThreadFactoryBuilder().setNameFormat(
-            "download-thread-%d").build();
-        downloadThreadPool = new ThreadPoolExecutor(BML_MAX_THREAD_SIZE,
-                                                    BML_MAX_THREAD_SIZE, 0L,
-                                                  TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(),
-                                                  namedThreadFactory,
-                                                  new ThreadPoolExecutor.AbortPolicy());
-      }
-    }
-
-    return downloadThreadPool;
-  }
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/common/HdfsResourceHelper.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/common/HdfsResourceHelper.java
deleted file mode 100644
index 35072a6..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/common/HdfsResourceHelper.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.common;
-
-import com.webank.wedatasphere.linkis.bml.conf.BmlServerConfiguration;
-import com.webank.wedatasphere.linkis.common.io.Fs;
-import com.webank.wedatasphere.linkis.common.io.FsPath;
-import com.webank.wedatasphere.linkis.storage.FSFactory;
-import com.webank.wedatasphere.linkis.storage.utils.FileSystemUtils;
-import org.apache.commons.codec.binary.Hex;
-import org.apache.commons.codec.digest.DigestUtils;
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.security.MessageDigest;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * created by cooperyang on 2019/5/21
- * Description: 资源文件上传到hdfs存储目录,存储的原则是一个资源
- */
-public class HdfsResourceHelper implements ResourceHelper {
-
-    private static final Logger logger = LoggerFactory.getLogger(HdfsResourceHelper.class);
-
-    private static final String SCHEMA = "hdfs://";
-
-    @Override
-    public long upload(String path, String user, InputStream inputStream,
-                       StringBuilder stringBuilder) throws UploadResourceException {
-        OutputStream outputStream = null;
-        long size = -1;
-        Fs fileSystem = null;
-        try {
-            FsPath fsPath = new FsPath(path);
-            fileSystem = FSFactory.getFsByProxyUser(fsPath, user);
-            fileSystem.init(new HashMap<String, String>());
-            if (!fileSystem.exists(fsPath)) FileSystemUtils.createNewFile(fsPath, user, true);
-            outputStream = fileSystem.write(fsPath, false);
-            byte[] buffer = new byte[1024];
-            int ch = 0;
-            MessageDigest md5Digest = DigestUtils.getMd5Digest();
-            while ((ch = inputStream.read(buffer)) != -1) {
-                md5Digest.update(buffer, 0, ch);
-                outputStream.write(buffer, 0, ch);
-                size += ch;
-            }
-            if (stringBuilder != null) {
-                stringBuilder.append(Hex.encodeHexString(md5Digest.digest()));
-            }
-        } catch (final IOException e) {
-            logger.error("{} write to {} failed, reason is, IOException:", user, path, e);
-            UploadResourceException uploadResourceException = new UploadResourceException();
-            uploadResourceException.initCause(e);
-            throw uploadResourceException;
-        } catch (final Throwable t) {
-            logger.error("{} write to {} failed, reason is", user, path, t);
-            UploadResourceException uploadResourceException = new UploadResourceException();
-            uploadResourceException.initCause(t);
-            throw uploadResourceException;
-        } finally {
-            IOUtils.closeQuietly(outputStream);
-            if (fileSystem != null) try {
-                fileSystem.close();
-            } catch (IOException e) {
-                e.printStackTrace();
-            }
-            IOUtils.closeQuietly(inputStream);
-        }
-        size += 1;
-        return size;
-    }
-
-
-    @Override
-    public void update(String path) {
-
-    }
-
-
-    @Override
-    public void getResource(String path, int start, int end) {
-
-    }
-
-    @Override
-    public String getSchema() {
-        return SCHEMA;
-    }
-
-    @Override
-    public String generatePath(String user, String fileName, Map<String, Object> properties) {
-        String resourceHeader = (String) properties.get("resourceHeader");
-        SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
-        String dateStr = format.format(new Date());
-        if (StringUtils.isNotEmpty(resourceHeader)) {
-            return getSchema() + BmlServerConfiguration.BML_HDFS_PREFIX().getValue()
-                    + "/" + user + "/" + dateStr + "/" + resourceHeader + "/" + fileName;
-        } else {
-            return getSchema() + BmlServerConfiguration.BML_HDFS_PREFIX().getValue() + "/" + user + "/" + dateStr + "/" + fileName;
-        }
-    }
-
-
-    @Override
-    public boolean checkIfExists(String path, String user) throws IOException {
-        Fs fileSystem = FSFactory.getFs(new FsPath(path));
-        fileSystem.init(new HashMap<String, String>());
-        try {
-            return fileSystem.exists(new FsPath(path));
-        } finally {
-            fileSystem.close();
-        }
-    }
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/common/OperationEnum.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/common/OperationEnum.java
deleted file mode 100644
index 04105b6..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/common/OperationEnum.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.common;
-
-/**
- * @author cooperyang
- * @date 2019-9-17
- */
-public enum OperationEnum {
-    /**
-     * 任务操作类型
-     */
-    UPLOAD("upload", 0),
-    UPDATE("update", 1),
-    DOWNLOAD("download", 2),
-    DELETE_VERSION("deleteVersion", 3),
-    DELETE_RESOURCE("deleteResource", 4),
-    DELETE_RESOURCES("deleteResources", 5);
-    private String value;
-    private int id;
-    private OperationEnum(String value, int id){
-        this.value = value;
-        this.id = id;
-    }
-
-    public String getValue() {
-        return value;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
-
-    public int getId() {
-        return id;
-    }
-
-    public void setId(int id) {
-        this.id = id;
-    }
-
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/common/ResourceHelper.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/common/ResourceHelper.java
deleted file mode 100644
index 618ad70..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/common/ResourceHelper.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.common;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Map;
-
-/**
- * created by cooperyang on 2019/5/21
- * Description:
- */
-public interface ResourceHelper {
-
-
-    public long upload(String path, String user, InputStream inputStream, StringBuilder stringBuilder) throws UploadResourceException;
-
-    public void update(String path);
-
-    public void getResource(String path, int start, int end);
-
-    public String generatePath(String user, String fileName, Map<String, Object> properties);
-
-    public String getSchema();
-
-
-    boolean checkIfExists(String path, String user) throws IOException;
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/common/ResourceHelperFactory.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/common/ResourceHelperFactory.java
deleted file mode 100644
index 9dfe3b1..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/common/ResourceHelperFactory.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.common;
-
-
-/**
- * created by cooperyang on 2019/5/21
- * Description:
- */
-public class ResourceHelperFactory {
-    public static ResourceHelper getResourceHelper(){
-        return new HdfsResourceHelper();
-    }
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/common/ScheduledTask.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/common/ScheduledTask.java
deleted file mode 100644
index 9973f30..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/common/ScheduledTask.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package com.webank.wedatasphere.linkis.bml.common;
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import com.webank.wedatasphere.linkis.bml.conf.BmlServerConfiguration;
-import com.webank.wedatasphere.linkis.bml.service.ResourceService;
-import com.webank.wedatasphere.linkis.bml.service.VersionService;
-import com.webank.wedatasphere.linkis.common.utils.Utils;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.concurrent.TimeUnit;
-
-import javax.annotation.PostConstruct;
-
-/**
- * created by cooperyang on 2019/6/4
- * Description:
- */
-@Component
-public class ScheduledTask {
-
-
-    @Autowired
-    private ResourceService resourceService;
-
-    @Autowired
-    private VersionService versionService;
-
-    private Logger logger = LoggerFactory.getLogger(ScheduledTask.class);
-
-    private class CleanExpiredThread implements Runnable{
-        @Override
-        public void run() {
-//            resourceService.cleanExpiredResources();
-//            versionService.cleanExpiredVersions();
-        }
-    }
-
-    @PostConstruct
-    public void init(){
-        logger.info("Schedule Task is init");
-        CleanExpiredThread cleanExpiredThread = new CleanExpiredThread();
-        Utils.defaultScheduler().scheduleAtFixedRate(cleanExpiredThread, 10,
-                                                     ((Number)BmlServerConfiguration.BML_CLEAN_EXPIRED_TIME().getValue()).intValue(), TimeUnit.SECONDS);
-    }
-
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/dao/DownloadDao.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/dao/DownloadDao.java
deleted file mode 100644
index eb2c867..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/dao/DownloadDao.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.dao;
-
-import com.webank.wedatasphere.linkis.bml.Entity.DownloadModel;
-
-import org.apache.ibatis.annotations.Param;
-
-/**
- * created by cooperyang on 2019/5/30
- * Description:
- */
-public interface DownloadDao {
-
-    void insertDownloadModel(@Param("downloadModel") DownloadModel downloadModel);
-
-
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/dao/ResourceDao.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/dao/ResourceDao.java
deleted file mode 100644
index 6401978..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/dao/ResourceDao.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.dao;
-
-import com.webank.wedatasphere.linkis.bml.Entity.Resource;
-
-import org.apache.ibatis.annotations.Param;
-import org.apache.ibatis.annotations.Select;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * created by cooperyang on 2019/5/14
- * Description:
- */
-public interface ResourceDao {
-
-    List<Resource> getResources(Map paramMap);
-
-    void deleteResource(@Param("resourceId") String resourceId);
-
-    void batchDeleteResources(@Param("resourceIds") List<String> resourceIds);
-
-    long uploadResource(Resource resource);
-
-
-    @Select("select exists(select * from `linkis_resources` where resource_id = #{resourceId}  and enable_flag = 1 )")
-    int checkExists(@Param("resourceId") String resourceId);
-
-    Resource getResource(@Param("resourceId") String resourceId);
-
-    @Select("select owner from `linkis_resources` where resource_id = #{resourceId} ")
-    String getUserByResourceId(@Param("resourceId") String resourceId);
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/dao/TaskDao.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/dao/TaskDao.java
deleted file mode 100644
index 254972c..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/dao/TaskDao.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.dao;
-
-import com.webank.wedatasphere.linkis.bml.Entity.ResourceTask;
-
-import org.apache.ibatis.annotations.Param;
-
-import java.util.Date;
-
-/**
- * @author cooperyang
- * @date 2019-9-16
- */
-public interface TaskDao {
-
-  /**
-   * 插入任务信息
-   * @param resourceTask 任务信息
-   * @return 主键ID
-   */
-    long insert(ResourceTask resourceTask);
-
-  /**
-   * 更新任务状态
-   * @param taskId 任务ID
-   * @param state 执行状态
-   * @param updateTime 操作时间
-   */
-    void updateState(@Param("taskId") long taskId, @Param("state") String state, @Param("updateTime") Date updateTime);
-
-  /**
-   * 更新任务状态为失败
-   * @param taskId 任务ID
-   * @param state 执行状态
-   * @param updateTime 操作时间
-   * @param errMsg 异常信息
-   */
-    void updateState2Failed(@Param("taskId") long taskId, @Param("state") String state, @Param("updateTime") Date updateTime, @Param("errMsg") String errMsg);
-
-  /**
-   * 获取资源最大版本号
-   * @param resourceId 资源ID
-   * @return 资源最大版本号
-   */
-    String getNewestVersion(@Param("resourceId") String resourceId);
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/dao/VersionDao.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/dao/VersionDao.java
deleted file mode 100644
index 2c23ab2..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/dao/VersionDao.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.dao;
-
-import com.webank.wedatasphere.linkis.bml.Entity.ResourceVersion;
-import com.webank.wedatasphere.linkis.bml.Entity.Version;
-
-import org.apache.ibatis.annotations.Param;
-import org.apache.ibatis.annotations.Select;
-import org.apache.ibatis.annotations.Update;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * created by cooperyang on 2019/5/14
- * Description:
- */
-public interface VersionDao {
-
-    Version getVersion(@Param("resourceId") String resourceId, @Param("version") String version);
-
-//    List<Version> getVersions(@Param("resourceId") String resourceId, @Param("versions") List<String> versions);
-
-    List<Version> getVersions(@Param("resourceId") String resourceId);
-
-
-    List<ResourceVersion> getResourcesVersions(Map paramMap);
-
-    void deleteVersion(@Param("resourceId") String resourceId, @Param("version") String version);
-
-    void deleteVersions(@Param("resourceId") String resourceId);
-
-    void bathDeleteVersions(@Param("resourceIds") List<String> resourceIds, @Param("versions") List<String> versions);
-
-    long insertNewVersion(ResourceVersion resourceVersion);
-
-    String getResourcePath(@Param("resourceId") String resourceId);
-
-
-    String getNewestVersion(@Param("resourceId") String resourceId);
-
-
-    @Select("select start_byte from linkis_resources_version where resource_id = #{resourceId} and version = #{version}")
-    long getStartByteForResource(@Param("resourceId") String resourceId, @Param("version") String version);
-
-
-
-    @Select("select end_byte from linkis_resources_version where resource_id = #{resourceId} and version = #{version}")
-    long getEndByte(@Param("resourceId") String resourceId, @Param("version") String version);
-
-    @Select("select * from linkis_resources_version where resource_id=#{resourceId} and version = #{version} and enable_flag = 1")
-    ResourceVersion findResourceVersion(@Param("resourceId") String resourceId,
-                                        @Param("version") String version);
-
-    List<ResourceVersion> getAllResourcesViaSystem(@Param("system") String system, @Param("user") String user);
-    List<ResourceVersion> selectResourcesViaSystemByPage(@Param("system") String system, @Param("user") String user);
-
-
-    @Select("select exists(select * from `linkis_resources_version` where resource_id=#{resourceId} and version=#{version} and enable_flag = 1)")
-    int checkVersion(@Param("resourceId") String resourceId, @Param("version") String version);
-
-
-    @Select("select enable_flag from `linkis_resources_version` where resource_id = #{resourceId} and version = #{version}")
-    int selectResourceVersionEnbleFlag(@Param("resourceId") String resourceId, @Param("version") String version);
-
-    /**
-     * 将resourceId对应的所有版本的enable_flag设为0,这样就不能继续访问该资源的任意版本
-     * @param resourceId resourceId
-     */
-    @Update("update `linkis_resources_version` set enable_flag = 0 where resource_id = #{resourceId}")
-    void deleteResource(@Param("resourceId") String resourceId);
-
-
-    void batchDeleteResources(@Param("resourceIds") List<String> resourceIds);
-
-
-    ResourceVersion getResourceVersion(@Param("resourceId") String resourceId, @Param("version") String version);
-
-
-
-    List<Version> selectVersionByPage(@Param("resourceId") String resourceId);
-
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/restful/BmlRestfulApi.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/restful/BmlRestfulApi.java
deleted file mode 100644
index 412bfeb..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/restful/BmlRestfulApi.java
+++ /dev/null
@@ -1,545 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.restful;
-
-import com.webank.wedatasphere.linkis.bml.Entity.*;
-import com.webank.wedatasphere.linkis.bml.common.*;
-import com.webank.wedatasphere.linkis.bml.service.*;
-import com.webank.wedatasphere.linkis.bml.threading.TaskState;
-import com.webank.wedatasphere.linkis.bml.util.HttpRequestHelper;
-import com.webank.wedatasphere.linkis.bml.vo.ResourceBasicVO;
-import com.webank.wedatasphere.linkis.bml.vo.ResourceVO;
-import com.webank.wedatasphere.linkis.bml.vo.ResourceVersionsVO;
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.server.Message;
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang.StringUtils;
-import org.codehaus.jackson.JsonNode;
-import org.glassfish.jersey.media.multipart.FormDataMultiPart;
-import org.glassfish.jersey.media.multipart.FormDataParam;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.ws.rs.*;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import java.io.IOException;
-import java.util.*;
-
-/**
- * created by cooperyang on 2019/5/14
- * Description:
- */
-@Path("bml")
-@Component
-public class BmlRestfulApi {
-
-    @Autowired
-    private BmlService bmlService;
-
-    @Autowired
-    private VersionService versionService;
-
-    @Autowired
-    private ResourceService resourceService;
-
-    @Autowired
-    private DownloadService downloadService;
-
-    @Autowired
-    private TaskService taskService;
-
-    private Logger logger = LoggerFactory.getLogger(getClass());
-
-    private static final String URL_PREFIX = "/bml/";
-
-    @GET
-    @Path("getVersions")
-    public Response getVersions(@QueryParam("resourceId") String resourceId,
-                                @QueryParam("currentPage") String  currentPage,
-                                @QueryParam("pageSize") String pageSize,
-                                @Context HttpServletRequest request)throws ErrorException{
-
-        String user = RestfulUtils.getUserName(request);
-        if (StringUtils.isEmpty(resourceId) || !resourceService.checkResourceId(resourceId)){
-            logger.error("用户{} 提供的resourceId {} is illegal", user, resourceId );
-            throw new BmlServerParaErrorException("您提交的resourceId无效");
-        }
-
-
-        Integer current = 0;
-        Integer size = 0;
-        if (StringUtils.isEmpty(currentPage)  || !StringUtils.isNumeric(currentPage)){
-            current = 1;
-        }else{
-            current = Integer.valueOf(currentPage);
-        }
-        if ( StringUtils.isEmpty(pageSize )  || !StringUtils.isNumeric(pageSize) ){
-            size = 10;
-        }else{
-            size = Integer.valueOf(pageSize);
-        }
-
-
-        Message message = null;
-
-        try{
-            logger.info("用户 {} 开始获取 {} 的所有版本信息", user, resourceId);
-            List<Version> versionList = versionService.selectVersionByPage(current, size, resourceId);
-            if (versionList.size() > 0){
-                message = Message.ok("成功获取版本信息");
-                message.setMethod(URL_PREFIX + "getVersions");
-                message.setStatus(0);
-                ResourceVersionsVO resourceVersionsVO = new ResourceVersionsVO();
-                resourceVersionsVO.setVersions(versionList);
-                resourceVersionsVO.setResourceId(resourceId);
-                resourceVersionsVO.setUser(user);
-                message.data("ResourceVersions", resourceVersionsVO);
-            }else{
-                logger.warn("user {} 获取资源未报错,但是获取到的version长度为0", user, resourceId);
-                message = Message.error("未能正确获取到版本信息");
-                message.setMethod(URL_PREFIX + "getVersions");
-                message.setStatus(2);
-            }
-            logger.info("用户 {} 结束获取 {} 的所有版本信息", user, resourceId);
-        }catch(final Exception e){
-            logger.error("user {} 获取resourceId {} 资源的版本信息失败", user, resourceId, e);
-            throw new BmlQueryFailException("抱歉,查询版本信息失败");
-        }
-
-        return Message.messageToResponse(message);
-    }
-
-    @GET
-    @Path("getResources")
-    public Response getResources(@QueryParam("system") String system,
-                                 @QueryParam("currentPage") String  currentPage,
-                                 @QueryParam("pageSize") String pageSize,
-                                 @Context HttpServletRequest request,
-                                 @Context HttpServletResponse response)throws ErrorException {
-
-        String user = RestfulUtils.getUserName(request);
-
-        if (StringUtils.isEmpty(system)) {
-            //默认系统是wtss
-            system = Constant.DEFAULT_SYSTEM;
-        }
-
-        Integer current = 0;
-        Integer size = 0;
-        if (StringUtils.isEmpty(currentPage)  || !StringUtils.isNumeric(currentPage)){
-            current = 1;
-        }else{
-            current = Integer.valueOf(currentPage);
-        }
-        if ( StringUtils.isEmpty(pageSize )  || !StringUtils.isNumeric(pageSize) ){
-            size = 10;
-        }else{
-            size = Integer.valueOf(pageSize);
-        }
-        Message message = null;
-        try{
-            logger.info("用户 {} 开始获取系统 {} 的所有资源", user, system);
-            List<ResourceVersion> resourceVersionPageInfoList  = versionService.selectResourcesViaSystemByPage(current, size, system, user);
-            if (resourceVersionPageInfoList.size() > 0){
-                message = Message.ok("获取您在系统" + system + "中所有资源成功");
-                message.setStatus(0);
-                message.setMethod(URL_PREFIX + "getResources");
-                List<ResourceVO> resourceVOList = new ArrayList<>();
-                for(ResourceVersion resourceVersion : resourceVersionPageInfoList){
-                    ResourceVO resourceVO = new ResourceVO();
-                    resourceVO.setResource(resourceVersion.getResource());
-                    resourceVO.setUser(user);
-                    resourceVO.setResourceId(resourceVersion.getResourceId());
-                    resourceVO.setVersion(resourceVersion.getVersion());
-                    resourceVOList.add(resourceVO);
-                }
-                message.data("Resources", resourceVOList);
-            }else{
-                logger.warn("用户 {} 获取系统 {} 资源的size为0", user, system);
-                message = Message.error("未能成功获取到所有资源信息");
-                message.setStatus(2);
-                message.setMethod(URL_PREFIX + "getResources");
-            }
-            logger.info("用户 {} 结束获取系统 {} 的所有资源", user, system);
-        }catch(final Exception e){
-            logger.error("用户 {} 获取系统 {} 所有资源失败.",user, system, e);
-            throw new BmlQueryFailException("获取系统所有资源信息失败");
-        }
-
-        return Message.messageToResponse(message);
-    }
-
-
-
-    @POST
-    @Path("deleteVersion")
-    @Consumes(MediaType.APPLICATION_JSON)
-    @Produces(MediaType.APPLICATION_JSON)
-    public Response deleteVersion(JsonNode jsonNode,
-                                  @Context HttpServletRequest request) throws IOException, ErrorException{
-
-
-        String user = RestfulUtils.getUserName(request);
-
-        if (null == jsonNode.get("resourceId") || null == jsonNode.get("version") ||
-                StringUtils.isEmpty(jsonNode.get("resourceId").getTextValue()) || StringUtils.isEmpty(jsonNode.get("version").getTextValue())) {
-            throw new BmlServerParaErrorException("删除指定版本,需要指定resourceId 和 version");
-        }
-
-
-
-        String resourceId = jsonNode.get("resourceId").getTextValue();
-        String version = jsonNode.get("version").getTextValue();
-        //检查资源和版本是否存在
-        if (!resourceService.checkResourceId(resourceId) || !versionService.checkVersion(resourceId, version)
-                || !versionService.canAccess(resourceId, version)){
-            throw new BmlServerParaErrorException("传入的resourceId或version非法,或已删除");
-        }
-        Message message = null;
-        ResourceTask resourceTask = taskService.createDeleteVersionTask(resourceId, version, user, HttpRequestHelper.getIp(request));
-        try{
-            logger.info("用户 {} 开始删除 resourceId: {} version: {} 的资源", resourceId, version);
-            versionService.deleteResourceVersion(resourceId, version);
-            message = Message.ok("删除版本成功");
-            message.setMethod(URL_PREFIX + "deleteVersion");
-            message.setStatus(0);
-            logger.info("用户 {} 结束删除 resourceId: {} version: {} 的资源", resourceId, version);
-            taskService.updateState(resourceTask.getId(), TaskState.SUCCESS.getValue(), new Date());
-            logger.info("删除版本成功.更新任务 taskId:{}-resourceId:{} 为 {} 状态.", resourceTask.getId(), resourceTask.getResourceId(), TaskState.SUCCESS.getValue());
-        }catch(final Exception e){
-            logger.error("用户{}删除resource {}, version {} 失败", user, resourceId, version, e);
-            taskService.updateState2Failed(resourceTask.getId(), TaskState.FAILED.getValue(), new Date(), e.getMessage());
-            logger.info("删除版本失败.更新任务 taskId:{}-resourceId:{} 为 {} 状态.", resourceTask.getId(), resourceTask.getResourceId(), TaskState.FAILED.getValue());
-            throw new BmlQueryFailException("删除资源版本失败");
-        }
-        return Message.messageToResponse(message);
-    }
-
-    @POST
-    @Path("deleteResource")
-    @Consumes(MediaType.APPLICATION_JSON)
-    @Produces(MediaType.APPLICATION_JSON)
-    public Response deleteResource(JsonNode jsonNode,
-                                   @Context HttpServletRequest request) throws IOException, ErrorException{
-
-
-        String user = RestfulUtils.getUserName(request);
-
-        if (null == jsonNode.get("resourceId")) {
-            throw new BmlServerParaErrorException("您未传入有效的resourceId");
-        }
-
-        String resourceId = jsonNode.get("resourceId").getTextValue();
-        if (StringUtils.isEmpty(resourceId) || !resourceService.checkResourceId(resourceId)) {
-            logger.error("错误的resourceId  is {} ", resourceId);
-            throw new BmlServerParaErrorException("resourceId:"+resourceId+"为空,非法或者已被删除!");
-        }
-
-        Message message = null;
-        ResourceTask resourceTask = taskService.createDeleteResourceTask(resourceId, user, HttpRequestHelper.getIp(request));
-        try{
-            logger.info("用户 {}  开始删除 resourceId: {} 对应的所有资源", user, resourceId);
-            resourceService.deleteResource(resourceId);
-            message = Message.ok("删除资源成功");
-            message.setMethod(URL_PREFIX + "deleteResource");
-            message.setStatus(0);
-            logger.info("用户 {}  结束删除 resourceId: {} 对应的所有资源", user, resourceId);
-            taskService.updateState(resourceTask.getId(), TaskState.SUCCESS.getValue(), new Date());
-            logger.info("删除资源成功.更新任务 taskId:{}-resourceId:{} 为 {} 状态.", resourceTask.getId(), resourceTask.getResourceId(), TaskState.SUCCESS.getValue());
-        }catch(final Exception e){
-            logger.error("用户 {} 删除资源 {} 失败", user, resourceId);
-            taskService.updateState2Failed(resourceTask.getId(), TaskState.FAILED.getValue(), new Date(), e.getMessage());
-            logger.info("删除资源失败.更新任务 taskId:{}-resourceId:{} 为 {} 状态.", resourceTask.getId(), resourceTask.getResourceId(), TaskState.FAILED.getValue());
-            throw new BmlQueryFailException("删除资源操作失败");
-        }
-
-        return Message.messageToResponse(message);
-
-    }
-
-    @POST
-    @Path("deleteResources")
-    public Response deleteResources(JsonNode jsonNode,
-                                    @Context HttpServletRequest request) throws IOException, ErrorException{
-        String user = RestfulUtils.getUserName(request);
-        List<String> resourceIds = new ArrayList<>();
-
-        if (null == jsonNode.get("resourceIds")) {
-            throw new BmlServerParaErrorException("批量删除未传入resourceIds参数");
-        }
-
-        Iterator<JsonNode> jsonNodeIter = jsonNode.get("resourceIds").getElements();
-        while (jsonNodeIter.hasNext()) {
-            resourceIds.add(jsonNodeIter.next().asText());
-        }
-
-        if (0 == resourceIds.size()) {
-            throw new BmlServerParaErrorException("批量删除资源操作传入的resourceIds参数为空");
-        }else{
-            for (String resourceId:  resourceIds) {
-                if (StringUtils.isBlank(resourceId) || !resourceService.checkResourceId(resourceId)) {
-                    Message message = Message.error("resourceId:"+resourceId+"为空,非法或已被删除");
-                    message.setMethod(URL_PREFIX + "deleteResources");
-                    message.setStatus(1);
-                    return Message.messageToResponse(message);
-                }
-            }
-        }
-
-        ResourceTask resourceTask = taskService.createDeleteResourcesTask(resourceIds, user, HttpRequestHelper.getIp(request));
-        Message message = null;
-        try{
-            logger.info("用户 {} 开始批删除资源", user);
-            resourceService.batchDeleteResources(resourceIds);
-            message = Message.ok("批量删除资源成功");
-            message.setMethod(URL_PREFIX + "deleteResources");
-            message.setStatus(0);
-            logger.info("用户 {} 结束批量删除资源", user);
-            taskService.updateState(resourceTask.getId(), TaskState.SUCCESS.getValue(), new Date());
-            logger.info("批量删除资源成功.更新任务 taskId:{}-resourceId:{} 为 {} 状态.", resourceTask.getId(), resourceTask.getResourceId(), TaskState.SUCCESS.getValue());
-        }catch(final Exception e){
-            logger.error("用户 {} 批量删除资源失败", user, e);
-            taskService.updateState2Failed(resourceTask.getId(), TaskState.FAILED.getValue(), new Date(), e.getMessage());
-            logger.info("批量删除资源失败.更新任务 taskId:{}-resourceId:{} 为 {} 状态.", resourceTask.getId(), resourceTask.getResourceId(), TaskState.FAILED.getValue());
-            throw new BmlQueryFailException("批量删除资源操作失败");
-        }
-        return Message.messageToResponse(message);
-    }
-
-    /**
-     * 通过resourceId 和 version两个参数获取下载对应的资源
-     * @param resourceId 资源Id
-     * @param version 资源版本,如果不指定,默认为最新
-     * @param resp httpServletResponse
-     * @param request httpServletRequest
-     * @return Response
-     * @throws IOException
-     * @throws ErrorException
-     */
-    @GET
-    @Path("download")
-    public Response download(@QueryParam("resourceId") String resourceId,
-                             @QueryParam("version") String version,
-                             @Context HttpServletResponse resp,
-                             @Context HttpServletRequest request) throws IOException, ErrorException {
-        String user = RestfulUtils.getUserName(request);
-
-        if (StringUtils.isBlank(resourceId) || !resourceService.checkResourceId(resourceId)) {
-            Message message = Message.error("resourceId:"+resourceId+"为空,非法或者已被删除!");
-            message.setMethod(URL_PREFIX + "download");
-            message.setStatus(1);
-            return Message.messageToResponse(message);
-        }
-
-        if (!resourceService.checkAuthority(user, resourceId)){
-            throw new BmlPermissionDeniedException("您没有权限下载此资源");
-        }
-        //判version空,返回最新版本
-        if (StringUtils.isBlank(version)){
-            version = versionService.getNewestVersion(resourceId);
-        }
-        //判version不存在或者非法
-        if (!versionService.checkVersion(resourceId, version)) {
-            Message message = Message.error("version:"+version+"不存在,非法或者已被删除");
-            message.setMethod(URL_PREFIX + "download");
-            message.setStatus(1);
-            return Message.messageToResponse(message);
-        }
-        //判resourceId和version是否过期
-        if (!resourceService.checkExpire(resourceId, version)){
-            throw new BmlResourceExpiredException(resourceId);
-        }
-
-        Message message = null;
-        resp.setContentType("application/x-msdownload");
-        resp.setHeader("Content-Disposition", "attachment");
-        String ip = HttpRequestHelper.getIp(request);
-        DownloadModel downloadModel = new DownloadModel(resourceId, version,user, ip);
-        try{
-            logger.info("用户 {} 开始下载资源 resourceId is {}, version is {} ,ip is {} ", user, resourceId, version, ip);
-            Map<String, Object> properties = new HashMap<>();
-            boolean downloadResult = versionService.downloadResource(user, resourceId, version, resp.getOutputStream(), properties);
-            downloadModel.setEndTime(new Date(System.currentTimeMillis()));
-            downloadModel.setState(0);
-            if (downloadResult){
-                message = Message.ok("下载资源成功");
-                message.setStatus(0);
-                message.setMethod(URL_PREFIX + "download");
-            }else{
-                logger.warn("用户 {} 下载资源 resourceId: {}, version:{} 出现问题,复制的size小于0", user, resourceId, version);
-                downloadModel.setState(1);
-                message = Message.error("下载资源失败");
-                message.setStatus(1);
-                message.setMethod(URL_PREFIX + "download");
-            }
-            downloadService.addDownloadRecord(downloadModel);
-            logger.info("用户 {} 结束下载资源 {} ", user, resourceId);
-        }catch(IOException e){
-            logger.error("用户 {} 下载资源 resourceId: {}, version:{} 出现IO异常", user, resourceId, version, e);
-            downloadModel.setEndTime(new Date());
-            downloadModel.setState(1);
-            downloadService.addDownloadRecord(downloadModel);
-            throw new ErrorException(73562, "抱歉,后台IO错误造成您本次下载资源失败");
-        }catch(final Throwable t){
-            logger.error("用户 {} 下载资源 resourceId: {}, version:{} 出现异常", user, resourceId, version, t);
-            downloadModel.setEndTime(new Date());
-            downloadModel.setState(1);
-            downloadService.addDownloadRecord(downloadModel);
-            throw new ErrorException(73561, "抱歉,后台服务出错导致您本次下载资源失败");
-        }finally{
-            IOUtils.closeQuietly(resp.getOutputStream());
-        }
-        logger.info("{} 下载资源 {} 成功", user, resourceId);
-        return Message.messageToResponse(message);
-    }
-
-    @POST
-    @Path("upload")
-    public Response uploadResource(@Context HttpServletRequest req,
-                                   @FormDataParam("system") String system,
-                                   @FormDataParam("resourceHeader") String resourceHeader,
-                                   @FormDataParam("isExpire") String isExpire,
-                                   @FormDataParam("expireType") String expireType,
-                                   @FormDataParam("expireTime") String expireTime,
-                                   @FormDataParam("maxVersion") int maxVersion,
-                                   FormDataMultiPart form) throws ErrorException {
-        String user = RestfulUtils.getUserName(req);
-        Message message;
-        try{
-            logger.info("用户 {} 开始上传资源", user);
-            Map<String, Object> properties = new HashMap<>();
-            properties.put("system", system);
-            properties.put("resourceHeader", resourceHeader);
-            properties.put("isExpire", isExpire);
-            properties.put("expireType", expireType);
-            properties.put("expireTime", expireTime);
-            properties.put("maxVersion", maxVersion);
-            String clientIp = HttpRequestHelper.getIp(req);
-            properties.put("clientIp", clientIp);
-            ResourceTask resourceTask = taskService.createUploadTask(form, user, properties);
-            message = Message.ok("提交上传资源任务成功");
-            message.setMethod(URL_PREFIX + "upload");
-            message.setStatus(0);
-            message.data("resourceId", resourceTask.getResourceId());
-            message.data("version", resourceTask.getVersion());
-            message.data("taskId", resourceTask.getId());
-            logger.info("用户 {} 提交上传资源任务成功, resourceId is {}", user, resourceTask.getResourceId());
-        } catch(final Exception e){
-            logger.error("upload resource for user : {} failed, reason:", user, e);
-            ErrorException exception = new ErrorException(50073, "提交上传资源任务失败:" + e.getMessage());
-            exception.initCause(e);
-            throw exception;
-        }
-        return Message.messageToResponse(message);
-    }
-
-    /**
-     * 用户通过http的方式更新资源文件
-     * @param request httpServletRequest
-     * @param resourceId 用户希望更新资源的resourceId
-     * @param formDataMultiPart form表单内容
-     * @return resourceId 以及 新的版本号
-     */
-    @POST
-    @Path("updateVersion")
-    public Response updateVersion(@Context HttpServletRequest request,
-                                  @FormDataParam("resourceId") String resourceId,
-                                  FormDataMultiPart formDataMultiPart)throws Exception{
-        String user = RestfulUtils.getUserName(request);
-        if (StringUtils.isEmpty(resourceId) || !resourceService.checkResourceId(resourceId)) {
-            logger.error("错误的resourceId  is {} ", resourceId);
-            throw new BmlServerParaErrorException("resourceId:"+resourceId+"为空,非法或者已被删除!");
-        }
-        if (StringUtils.isEmpty(versionService.getNewestVersion(resourceId))) {
-            logger.error("resourceId:{} 之前未上传物料,或物料已被删除,请先调用上传接口.", resourceId);
-            throw new BmlServerParaErrorException("resourceId:"+resourceId+" 之前未上传物料,或物料已被删除,请先调用上传接口.!");
-        }
-        Message message;
-        try{
-            logger.info("用户 {} 开始更新资源 {} ", user, resourceId);
-            String clientIp = HttpRequestHelper.getIp(request);
-            Map<String, Object> properties = new HashMap<>();
-            properties.put("clientIp", clientIp);
-            ResourceTask resourceTask = taskService.createUpdateTask(resourceId, user, formDataMultiPart, properties);
-            message = Message.ok("提交更新资源任务成功");
-            message.data("resourceId",resourceId).data("version", resourceTask.getVersion()).data("taskId", resourceTask.getId());
-        }catch(final ErrorException e){
-            logger.error("{} update resource failed, resourceId is {}, reason:", user, resourceId, e);
-            throw e;
-        } catch(final Exception e){
-            logger.error("{} update resource failed, resourceId is {}, reason:", user, resourceId, e);
-            ErrorException exception = new ErrorException(50073, "提交上传资源任务失败:" + e.getMessage());
-            exception.initCause(e);
-            throw exception;
-        }
-        logger.info("用户 {} 结束更新资源 {} ", user, resourceId);
-        return Message.messageToResponse(message);
-    }
-
-
-    @GET
-    @Path("getBasic")
-    public Response getBasic(@QueryParam("resourceId") String resourceId,
-                             @Context HttpServletRequest request)throws ErrorException{
-        String user = RestfulUtils.getUserName(request);
-
-        if (StringUtils.isEmpty(resourceId) || !resourceService.checkResourceId(resourceId)){
-            throw new BmlServerParaErrorException("获取资源基本信息未传入resourceId参数或参数非法");
-        }
-
-        Message message = null;
-        try{
-            Resource resource = resourceService.getResource(resourceId);
-            //int numberOfVersions = versionService.getNumOfVersions(resourceId);
-            if (!resource.isEnableFlag()){
-                logger.warn("用户 {} 想要查询的资源 {} 已经被删除", user, resourceId);
-                message = Message.error("资源已经被删除");
-            }else{
-                logger.info("用户 {} 开始获取 {} 的基本信息", user, resourceId);
-                ResourceBasicVO basic = new ResourceBasicVO();
-                basic.setResourceId(resourceId);
-                basic.setCreateTime(resource.getCreateTime());
-                basic.setDownloadedFileName(resource.getDownloadedFileName());
-                basic.setOwner(resource.getUser());
-                //todo cooperyang 正确的版本信息
-                basic.setNumberOfVerions(10);
-                if (resource.isExpire()){
-                    basic.setExpireTime(RestfulUtils.getExpireTime(resource.getCreateTime(),resource.getExpireType(), resource.getExpireTime()));
-                }else{
-                    basic.setExpireTime("资源不过期");
-                }
-                message = Message.ok("获取资源基本信息成功");
-                message.setStatus(0);
-                message.setMethod(URL_PREFIX + "getBasic");
-                message.data("basic", basic);
-                logger.info("用户 {} 结束获取 {} 的基本信息", user, resourceId);
-            }
-        }catch(final Exception e){
-            logger.error("用户 {} 获取 {} 资源信息失败", user, resourceId, e);
-            throw new BmlQueryFailException("获取资源基本信息失败");
-        }
-
-        return Message.messageToResponse(message);
-    }
-
-
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/restful/RestfulUtils.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/restful/RestfulUtils.java
deleted file mode 100644
index 7244ca6..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/restful/RestfulUtils.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.restful;
-
-import com.webank.wedatasphere.linkis.bml.common.BmlAuthorityException;
-import com.webank.wedatasphere.linkis.bml.common.Constant;
-import com.webank.wedatasphere.linkis.bml.service.ResourceService;
-import com.webank.wedatasphere.linkis.server.security.SecurityFilter;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import javax.servlet.http.HttpServletRequest;
-
-/**
- * created by cooperyang on 2019/5/30
- * Description:
- */
-public class RestfulUtils {
-
-
-    private static final Long SECOND = 1000L;
-    private static final Long MINUTE = 60 * SECOND;
-    private static final Long HOUR = 60 * MINUTE;
-    private static final Long DAY = 24 * HOUR;
-    private static final Long MONTH = 30 * DAY;
-    private static final Long YEAR = 365 * DAY;
-    public static String getUserName(HttpServletRequest request)throws BmlAuthorityException{
-        String user;
-        try{
-            user = SecurityFilter.getLoginUsername(request);
-        }catch(final Exception e){
-            throw new BmlAuthorityException();
-        }
-        return user;
-    }
-
-    /**
-     * 用于检查用户user是否有权限对resourceId对应的资源有修改权限
-     * @param user 传入的用户名
-     * @param resourceId resourceId
-     * @param resourceService service服务层
-     * @return
-     */
-    public static boolean canAccessResource(String user, String resourceId,
-                                            ResourceService resourceService){
-        //String realUser = resourceService.getOwner(resourceId);
-        //return user.equals(realUser);
-        //todo cooperyang
-        return true;
-    }
-
-    public static String getExpireTime(Date createTime, String expireType, String expireTime){
-
-        SimpleDateFormat simpleDateFormat = new SimpleDateFormat(Constant.TIME_FORMAT);
-        String retTime = null;
-
-        if ("date".equals(expireType)){
-            return expireTime;
-        }else{
-            int num = Integer.parseInt(expireTime.substring(0, expireTime.length() - 1));
-            switch (expireTime.charAt(expireTime.length() - 1)){
-                case 'y': retTime = simpleDateFormat.format(new Date(createTime.getTime() + num * YEAR));
-                    break;
-                case 'M': retTime = simpleDateFormat.format(new Date(createTime.getTime() + num * MONTH));
-                    break;
-                case 'd': retTime = simpleDateFormat.format(new Date(createTime.getTime() + num * DAY));
-                    break;
-                case 'H': retTime = simpleDateFormat.format(new Date(createTime.getTime() + num * HOUR));
-                    break;
-                case 'm': retTime = simpleDateFormat.format(new Date(createTime.getTime() + num * MINUTE));
-                    break;
-                default: retTime = simpleDateFormat.format(new Date(createTime.getTime() + 10 * DAY));
-            }
-        }
-        return retTime;
-    }
-
-
-
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/BmlService.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/BmlService.java
deleted file mode 100644
index d5bb3a1..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/BmlService.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.service;
-
-/**
- * created by cooperyang on 2019/5/14
- * Description:
- */
-public interface BmlService {
-
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/DownloadService.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/DownloadService.java
deleted file mode 100644
index c0dc04c..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/DownloadService.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.service;
-
-import com.webank.wedatasphere.linkis.bml.Entity.DownloadModel;
-
-/**
- * created by cooperyang on 2019/6/3
- * Description:
- */
-public interface DownloadService {
-    public void addDownloadRecord(DownloadModel downloadModel);
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/ResourceService.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/ResourceService.java
deleted file mode 100644
index bfed9c0..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/ResourceService.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.service;
-
-import com.webank.wedatasphere.linkis.bml.Entity.Resource;
-import com.webank.wedatasphere.linkis.bml.service.impl.ResourceServiceImpl;
-
-import org.glassfish.jersey.media.multipart.FormDataMultiPart;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * Created by cooperyang on 2019/5/17.
- */
-public interface ResourceService {
-
-   List<Resource> getResources(Map paramMap);
-
-   void deleteResource(String resourceId);
-
-   void batchDeleteResources(List<String> resourceIds);
-
-   /**
-    * 用于上传文件的函数,上传文件的步骤
-    * 1.根据用户名和resourceHeader信息为用户创建一个文件
-    * 2.利用storage模块将二进制流存入到物料库
-    * 3.二进制流的存储方式有两种,根据资源文件的大小选择合并或者是单独存储
-    * 4.生成resourceID
-    * 4.更新resource 和 resource_version表
-    * @param formDataMultiPart notnull
-    * @param user um_user
-    * @param properties Map
-    */
-   List<ResourceServiceImpl.UploadResult> upload(FormDataMultiPart formDataMultiPart, String user, Map<String, Object> properties)throws Exception;
-
-   boolean checkResourceId(String resourceId);
-
-
-   Resource getResource(String resourceId);
-
-
-    boolean checkAuthority(String user, String resourceId);
-
-   boolean checkExpire(String resourceId, String version);
-
-   void cleanExpiredResources();
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/TaskService.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/TaskService.java
deleted file mode 100644
index cad6695..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/TaskService.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.service;
-
-import com.webank.wedatasphere.linkis.bml.Entity.ResourceTask;
-
-import org.apache.ibatis.annotations.Param;
-import org.glassfish.jersey.media.multipart.FormDataMultiPart;
-
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author cooperyang
- * @date 2019-9-16
- */
-public interface TaskService {
-
-  ResourceTask createUploadTask(FormDataMultiPart form, String user, Map<String, Object> properties)
-      throws Exception;
-
-  ResourceTask createUpdateTask(String resourceId, String user, FormDataMultiPart formDataMultiPart, Map<String, Object> properties)
-      throws Exception;
-
-  ResourceTask createDownloadTask(String resourceId, String version, String user, String clientIp);
-
-  /**
-   * 更新任务状态
-   * @param taskId 任务ID
-   * @param state 执行状态
-   * @param updateTime 操作时间
-   */
-  void updateState(long taskId, String state, Date updateTime);
-
-  /**
-   * 更新任务状态为失败
-   * @param taskId 任务ID
-   * @param state 执行状态
-   * @param updateTime 操作时间
-   * @param errMsg 异常信息
-   */
-  void updateState2Failed(long taskId, String state, Date updateTime, String errMsg);
-
-  ResourceTask createDeleteVersionTask(String resourceId, String version, String user, String ip);
-
-  ResourceTask createDeleteResourceTask(String resourceId, String user, String ip);
-
-  ResourceTask createDeleteResourcesTask(List<String> resourceIds, String user, String ip);
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/VersionService.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/VersionService.java
deleted file mode 100644
index 332a8b5..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/VersionService.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.service;
-
-import com.webank.wedatasphere.linkis.bml.Entity.ResourceVersion;
-import com.webank.wedatasphere.linkis.bml.Entity.Version;
-
-import org.glassfish.jersey.media.multipart.FormDataMultiPart;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Created by cooperyang on 2019/5/17.
- */
-public interface VersionService {
-
-   Version getVersion(String resourceId, String version);
-
-//   List<Version> getVersions(String resourceId, List<String> versions);
-
-   List<ResourceVersion> getResourcesVersions(Map paramMap);
-
-   List<ResourceVersion> getAllResourcesViaSystem(String system, String user);
-   //分页查询VResourcesViaSystem
-   public List<ResourceVersion> selectResourcesViaSystemByPage(int currentPage, int pageSize, String system, String user);
-
-   void deleteResourceVersion(String resourceId, String version);
-
-   void deleteResourceVersions(String resourceId);
-
-   void deleteResourcesVersions(List<String> resourceIds, List<String> versions);
-
-
-   /**
-    * 通过resourceId 获取对应资源所有的版本信息
-    * @param resourceId resourceId
-    * @return Version的链表
-    */
-   List<Version> getVersions(String resourceId);
-
-   //分页查询Version
-   List<Version> selectVersionByPage(int currentPage, int pageSize, String resourceId);
-
-
-
-   /**
-    * 更新资源的步骤是
-    * 1.获取resourceID对应资源的path
-    * 2.将资源的二进制流append到path对应的文件末尾
-    * @param resourceId resourceId
-    * @param user 用户信息
-    * @param formDataMultiPart 上传的二进制流
-    * @param params 可选参数
-    * @return 新的version
-    * @throws Exception
-    */
-   String updateVersion(String resourceId, String user, FormDataMultiPart formDataMultiPart, Map<String, Object> params)throws Exception;
-
-
-   String getNewestVersion(String resourceId);
-
-
-
-   boolean downloadResource(String user, String resourceId, String version, OutputStream outputStream, Map<String, Object> properties) throws IOException;
-
-   boolean checkVersion(String resourceId, String version);
-
-
-   boolean canAccess(String resourceId, String version);
-
-
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/impl/BmlServiceImpl.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/impl/BmlServiceImpl.java
deleted file mode 100644
index 316de03..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/impl/BmlServiceImpl.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.service.impl;
-
-import com.webank.wedatasphere.linkis.bml.service.BmlService;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Service;
-
-/**
- * Created by cooperyang on 2019/5/16.
- */
-@Service
-public class BmlServiceImpl implements BmlService {
-
-    private static final Logger logger = LoggerFactory.getLogger(BmlServiceImpl.class);
-
-
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/impl/DownloadServiceImpl.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/impl/DownloadServiceImpl.java
deleted file mode 100644
index 9560e7f..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/impl/DownloadServiceImpl.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.service.impl;
-
-import com.webank.wedatasphere.linkis.bml.Entity.DownloadModel;
-import com.webank.wedatasphere.linkis.bml.dao.DownloadDao;
-import com.webank.wedatasphere.linkis.bml.service.DownloadService;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-/**
- * created by cooperyang on 2019/6/3
- * Description:
- */
-@Service
-public class DownloadServiceImpl implements DownloadService {
-
-
-    @Autowired
-    DownloadDao downloadDao;
-
-    @Override
-    public void addDownloadRecord(DownloadModel downloadModel) {
-        downloadDao.insertDownloadModel(downloadModel);
-    }
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/impl/ResourceServiceImpl.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/impl/ResourceServiceImpl.java
deleted file mode 100644
index 6d38cb4..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/impl/ResourceServiceImpl.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.service.impl;
-
-import com.webank.wedatasphere.linkis.bml.Entity.Resource;
-import com.webank.wedatasphere.linkis.bml.Entity.ResourceVersion;
-import com.webank.wedatasphere.linkis.bml.common.Constant;
-import com.webank.wedatasphere.linkis.bml.common.ResourceHelper;
-import com.webank.wedatasphere.linkis.bml.common.ResourceHelperFactory;
-import com.webank.wedatasphere.linkis.bml.dao.ResourceDao;
-import com.webank.wedatasphere.linkis.bml.dao.VersionDao;
-import com.webank.wedatasphere.linkis.bml.service.ResourceService;
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import org.apache.commons.lang.StringUtils;
-import org.glassfish.jersey.media.multipart.FormDataBodyPart;
-import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
-import org.glassfish.jersey.media.multipart.FormDataMultiPart;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import javax.validation.constraints.NotNull;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Created by cooperyang on 2019/5/17.
- */
-@Service
-public class ResourceServiceImpl implements ResourceService {
-
-    private static final Logger logger = LoggerFactory.getLogger(ResourceServiceImpl.class);
-
-    @Autowired
-    private ResourceDao resourceDao;
-
-    @Autowired
-    private VersionDao versionDao;
-
-
-    private static final String FIRST_VERSION = "v000001";
-
-    @Override
-    public List<Resource> getResources(Map paramMap) {
-        return resourceDao.getResources(paramMap);
-    }
-
-    @Override
-    public void deleteResource(String resourceId) {
-        resourceDao.deleteResource(resourceId);
-        versionDao.deleteResource(resourceId);
-    }
-
-    @Override
-    public void batchDeleteResources(List<String> resourceIds) {
-        resourceDao.batchDeleteResources(resourceIds);
-        versionDao.batchDeleteResources(resourceIds);
-    }
-
-    @Transactional(rollbackFor = ErrorException.class)
-    @Override
-    public List<UploadResult> upload(FormDataMultiPart formDataMultiPart, String user, Map<String, Object> properties)throws Exception{
-        ResourceHelper resourceHelper = ResourceHelperFactory.getResourceHelper();
-        List<FormDataBodyPart> files = formDataMultiPart.getFields("file");
-        List<UploadResult> results = new ArrayList<>();
-        String resourceId = (String) properties.get("resourceId");
-        for (FormDataBodyPart p : files) {
-            InputStream inputStream = p.getValueAs(InputStream.class);
-            FormDataContentDisposition fileDetail = p.getFormDataContentDisposition();
-            String fileName = new String(fileDetail.getFileName().getBytes("ISO8859-1"), "UTF-8");
-            String path = resourceHelper.generatePath(user, resourceId, properties);
-            StringBuilder sb = new StringBuilder();
-            //在upload之前首先应该判断一下这个path是否是已经存在了,如果存在了,抛出异常
-            boolean isFileExists = resourceHelper.checkIfExists(path, user);
-//            if (isFileExists){
-//                throw new ErrorException(70035, "同名文件已经于今日已经上传,请使用更新操作");
-//            }
-            long size = resourceHelper.upload(path, user, inputStream, sb);
-            String md5String = sb.toString();
-            boolean isSuccess = false;
-            if (StringUtils.isNotEmpty(md5String) && size >= 0) {
-                isSuccess = true;
-            }
-            Resource resource = Resource.createNewResource(resourceId, user, fileName, properties);
-            //插入一条记录到resource表
-            long id = resourceDao.uploadResource(resource);
-            logger.info("{} uploaded a resource and resourceId is {}", user, resource.getResourceId());
-            //插入一条记录到resource version表
-            String clientIp = (String) properties.get("clientIp");
-            ResourceVersion resourceVersion = ResourceVersion.createNewResourceVersion(resourceId, path, md5String,
-                    clientIp, size, Constant.FIRST_VERSION, 1);
-            versionDao.insertNewVersion(resourceVersion);
-            UploadResult uploadResult = new UploadResult(resourceId, FIRST_VERSION, isSuccess);
-            results.add(uploadResult);
-        }
-        return results;
-    }
-
-    @Override
-    public boolean checkResourceId(String resourceId) {
-        return resourceDao.checkExists(resourceId) == 1;
-    }
-
-    public static class UploadResult{
-        private String resourceId;
-        private String version;
-        private boolean isSuccess;
-
-        public UploadResult(String resourceId, String version, boolean isSuccess){
-            this.resourceId = resourceId;
-            this.version = version;
-            this.isSuccess = isSuccess;
-        }
-
-        public String getResourceId() {
-            return resourceId;
-        }
-
-        public void setResourceId(String resourceId) {
-            this.resourceId = resourceId;
-        }
-
-        public String getVersion() {
-            return version;
-        }
-
-        public void setVersion(String version) {
-            this.version = version;
-        }
-
-        public boolean isSuccess() {
-            return isSuccess;
-        }
-
-        public void setSuccess(boolean success) {
-            isSuccess = success;
-        }
-    }
-
-
-    @Override
-    public Resource getResource(String resourceId) {
-        return resourceDao.getResource(resourceId);
-    }
-
-
-    @Override
-    public boolean checkAuthority(@NotNull String user, String resourceId) {
-        return user.equals(resourceDao.getUserByResourceId(resourceId));
-    }
-
-
-    @Override
-    public boolean checkExpire(String resourceId, String version) {
-        Resource resource = resourceDao.getResource(resourceId);
-        ResourceVersion resourceVersion = versionDao.getResourceVersion(resourceId, version);
-        if (!resource.isEnableFlag() || !resourceVersion.isEnableFlag()) {
-            return false;
-        }
-        return true;
-    }
-
-
-    @Override
-    public void cleanExpiredResources() {
-       //1 找出已经过期的所有的资源
-       //2 将这些资源干掉
-//        List<Resource> resources = resourceDao.getResources();
-//        List<Resource> expiredResources = new ArrayList<>();
-//        for(Resource resource : resources){
-//            if (resource.isExpire() && resource.isEnableFlag()){
-//                String expiredTimeStr = RestfulUtils.getExpireTime(resource.getCreateTime(), resource.getExpireType(), resource.getExpireTime());
-//
-//            }
-//        }
-        //resourceDao.cleanExpiredResources();
-    }
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/impl/TaskServiceImpl.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/impl/TaskServiceImpl.java
deleted file mode 100644
index 830b6c0..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/impl/TaskServiceImpl.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.service.impl;
-
-import com.webank.wedatasphere.linkis.bml.Entity.ResourceTask;
-import com.webank.wedatasphere.linkis.bml.Entity.Version;
-import com.webank.wedatasphere.linkis.bml.common.Constant;
-import com.webank.wedatasphere.linkis.bml.common.UpdateResourceException;
-import com.webank.wedatasphere.linkis.bml.dao.ResourceDao;
-import com.webank.wedatasphere.linkis.bml.dao.TaskDao;
-import com.webank.wedatasphere.linkis.bml.dao.VersionDao;
-import com.webank.wedatasphere.linkis.bml.service.ResourceService;
-import com.webank.wedatasphere.linkis.bml.service.TaskService;
-import com.webank.wedatasphere.linkis.bml.service.VersionService;
-import com.webank.wedatasphere.linkis.bml.threading.TaskState;
-import org.apache.commons.collections4.CollectionUtils;
-import org.apache.commons.lang.StringUtils;
-import org.glassfish.jersey.media.multipart.FormDataMultiPart;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-import java.util.stream.Collectors;
-
-/**
- * @author cooperyang
- * @date 2019-9-16
- */
-@Service
-public class TaskServiceImpl implements TaskService {
-
-    @Autowired
-    private ResourceService resourceService;
-
-    @Autowired
-    private VersionService versionService;
-
-    @Autowired
-    private TaskDao taskDao;
-
-    @Autowired
-    private ResourceDao resourceDao;
-
-    @Autowired
-    private VersionDao versionDao;
-
-    private static final Logger LOGGER = LoggerFactory.getLogger(TaskServiceImpl.class);
-
-    @Override
-    public ResourceTask createUploadTask(FormDataMultiPart form, String user,
-        Map<String, Object> properties) throws Exception {
-        //创建上传任务记录
-        String resourceId = UUID.randomUUID().toString();
-        ResourceTask resourceTask = ResourceTask.createUploadTask(resourceId, user, properties);
-        taskDao.insert(resourceTask);
-        LOGGER.info("成功保存上传任务信息.taskId:{},resourceTask:{}", resourceTask.getId(), resourceTask.toString());
-        taskDao.updateState(resourceTask.getId(), TaskState.RUNNING.getValue(), new Date());
-        LOGGER.info("成功更新任务 taskId:{}-resourceId:{} 为 {} 状态.", resourceTask.getId(), resourceTask.getResourceId(), TaskState.RUNNING.getValue());
-        properties.put("resourceId", resourceTask.getResourceId());
-        try {
-          ResourceServiceImpl.UploadResult result = resourceService.upload(form, user, properties).get(0);
-          if (result.isSuccess()){
-            taskDao.updateState(resourceTask.getId(), TaskState.SUCCESS.getValue(), new Date());
-            LOGGER.info("上传资源成功.更新任务 taskId:{}-resourceId:{} 为 {} 状态.", resourceTask.getId(), resourceTask.getResourceId(), TaskState.SUCCESS.getValue());
-          } else {
-            taskDao.updateState(resourceTask.getId(), TaskState.FAILED.getValue(), new Date());
-            LOGGER.info("上传资源失败.更新任务 taskId:{}-resourceId:{} 为 {} 状态.", resourceTask.getId(), resourceTask.getResourceId(), TaskState.FAILED.getValue());
-          }
-        } catch (Exception e) {
-          taskDao.updateState2Failed(resourceTask.getId(), TaskState.FAILED.getValue(), new Date(), e.getMessage());
-          LOGGER.error("上传资源失败.更新任务 taskId:{}-resourceId:{} 为 {} 状态.", resourceTask.getId(), resourceTask.getResourceId(), TaskState.FAILED.getValue(), e);
-          throw e;
-        }
-        //创建上传任务线程
-      return resourceTask;
-    }
-
-  @Override
-  public ResourceTask createUpdateTask(String resourceId, String user,
-      FormDataMultiPart formDataMultiPart, Map<String, Object> properties) throws Exception{
-      final String resourceIdLock = resourceId.intern();
-      /*
-      多个BML服务器实例对同一资源resourceId同时更新,规定只能有一个实例能更新成功,
-      实现方案是:linkis_resources_task.resource_id和version设置唯一索引
-      同一台服务器实例对同一资源更新,上传资源前,需要对resourceId这个字符串的intern进行加锁,这样所有需要更新该资源的用户都会同步
-       */
-      synchronized (resourceIdLock){
-        String system = resourceDao.getResource(resourceId).getSystem();
-        //生成新的version
-        String lastVersion = getResourceLastVersion(resourceId);
-        String newVersion = generateNewVersion(lastVersion);
-        ResourceTask resourceTask = ResourceTask.createUpdateTask(resourceId, newVersion, user, system, properties);
-        try {
-          taskDao.insert(resourceTask);
-        } catch (Exception e) {
-          UpdateResourceException updateResourceException = new UpdateResourceException();
-          updateResourceException.initCause(e);
-          throw updateResourceException;
-        }
-        LOGGER.info("成功保存上传任务信息.taskId:{},resourceTask:{}", resourceTask.getId(), resourceTask.toString());
-        taskDao.updateState(resourceTask.getId(), TaskState.RUNNING.getValue(), new Date());
-        LOGGER.info("成功更新任务 taskId:{}-resourceId:{} 为 {} 状态.", resourceTask.getId(), resourceTask.getResourceId(), TaskState.RUNNING.getValue());
-        properties.put("newVersion", resourceTask.getVersion());
-        try {
-          versionService.updateVersion(resourceTask.getResourceId(), user, formDataMultiPart, properties);
-          taskDao.updateState(resourceTask.getId(), TaskState.SUCCESS.getValue(), new Date());
-          LOGGER.info("上传更新资源成功.更新任务 taskId:{}-resourceId:{} 为 {} 状态.", resourceTask.getId(), resourceTask.getResourceId(), TaskState.SUCCESS.getValue());
-        } catch (Exception e) {
-          taskDao.updateState2Failed(resourceTask.getId(), TaskState.FAILED.getValue(), new Date(), e.getMessage());
-          LOGGER.error("上传更新资源失败.更新任务 taskId:{}-resourceId:{} 为 {} 状态.", resourceTask.getId(), resourceTask.getResourceId(), TaskState.FAILED.getValue(), e);
-          throw e;
-        }
-        //创建上传任务线程
-        return resourceTask;
-      }
-  }
-
-  @Override
-  public ResourceTask createDownloadTask(String resourceId, String version, String user,
-      String clientIp) {
-    String system = resourceDao.getResource(resourceId).getSystem();
-    ResourceTask resourceTask = ResourceTask.createDownloadTask(resourceId, version, user, system, clientIp);
-    taskDao.insert(resourceTask);
-    LOGGER.info("成功保存下载任务信息.taskId:{},resourceTask:{}", resourceTask.getId(), resourceTask.toString());
-    return resourceTask;
-  }
-
-  /**
-   * 更新任务状态
-   *
-   * @param taskId 任务ID
-   * @param state 执行状态
-   * @param updateTime 操作时间
-   */
-  @Override
-  public void updateState(long taskId, String state, Date updateTime) {
-    taskDao.updateState(taskId, state, updateTime);
-  }
-
-  /**
-   * 更新任务状态为失败
-   *
-   * @param taskId 任务ID
-   * @param state 执行状态
-   * @param updateTime 操作时间
-   * @param errMsg 异常信息
-   */
-  @Override
-  public void updateState2Failed(long taskId, String state, Date updateTime, String errMsg) {
-    taskDao.updateState2Failed(taskId, state, updateTime, errMsg);
-  }
-
-  @Override
-  public ResourceTask createDeleteVersionTask(String resourceId, String version, String user,
-      String clientIp) {
-    String system = resourceDao.getResource(resourceId).getSystem();
-    ResourceTask resourceTask = ResourceTask.createDeleteVersionTask(resourceId, version, user, system, clientIp);
-    taskDao.insert(resourceTask);
-    LOGGER.info("成功保存删除资源版本任务信息.taskId:{},resourceTask:{}", resourceTask.getId(), resourceTask.toString());
-    return resourceTask;
-  }
-
-  @Override
-  public ResourceTask createDeleteResourceTask(String resourceId, String user, String clientIp) {
-    String system = resourceDao.getResource(resourceId).getSystem();
-    List<Version> versions = versionDao.getVersions(resourceId);
-    StringBuilder extraParams = new StringBuilder();
-    extraParams.append("delete resourceId:").append(resourceId);
-    extraParams.append(", and delete versions is :");
-    String delVersions = null;
-    if (CollectionUtils.isNotEmpty(versions)) {
-      delVersions = versions.stream().map(Version::getVersion).collect(Collectors.joining(","));
-    }
-    extraParams.append(delVersions);
-    ResourceTask resourceTask = ResourceTask.createDeleteResourceTask(resourceId, user, system, clientIp, extraParams.toString());
-    taskDao.insert(resourceTask);
-    LOGGER.info("成功保存下载任务信息.taskId:{},resourceTask:{}", resourceTask.getId(), resourceTask.toString());
-    return resourceTask;
-  }
-
-  @Override
-  public ResourceTask createDeleteResourcesTask(List<String> resourceIds, String user, String clientIp) {
-    String system = resourceDao.getResource(resourceIds.get(0)).getSystem();
-    StringBuilder extraParams = new StringBuilder();
-    for (String resourceId : resourceIds) {
-      extraParams.append("delete resourceId:").append(resourceId);
-      extraParams.append(", and delete versions is :");
-      String delVersions = null;
-      List<Version> versions = versionDao.getVersions(resourceId);
-      if (CollectionUtils.isNotEmpty(versions)) {
-        delVersions = versions.stream().map(Version::getVersion).collect(Collectors.joining(","));
-      }
-      extraParams.append(delVersions);
-      extraParams.append(System.lineSeparator());
-    }
-    ResourceTask resourceTask = ResourceTask.createDeleteResourcesTask(user, system, clientIp, extraParams.toString());
-    taskDao.insert(resourceTask);
-    LOGGER.info("成功保存下载任务信息.taskId:{},resourceTask:{}", resourceTask.getId(), resourceTask.toString());
-    return resourceTask;
-  }
-
-  /**
-   * 先查看linkis_resources_task有没有最新版本号,如果有则以此为主+1返回
-   * 如果没有则以linkis_resources_version最新版本号+1返回
-   * @param resourceId 资源ID
-   * @return 下一个版本号
-   */
-  private String getResourceLastVersion(String resourceId) {
-      String lastVersion = taskDao.getNewestVersion(resourceId);
-      if (StringUtils.isBlank(lastVersion)) {
-        lastVersion = versionDao.getNewestVersion(resourceId);
-      }
-      return lastVersion;
-  }
-
-  private String generateNewVersion(String version){
-    int next = Integer.parseInt(version.substring(1, version.length())) + 1;
-    return Constant.VERSION_PREFIX + String.format(Constant.VERSION_FORMAT, next);
-  }
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/impl/VersionServiceImpl.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/impl/VersionServiceImpl.java
deleted file mode 100644
index 1003fa1..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/service/impl/VersionServiceImpl.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.service.impl;
-
-import com.github.pagehelper.PageHelper;
-import com.github.pagehelper.PageInfo;
-import com.webank.wedatasphere.linkis.bml.Entity.ResourceVersion;
-import com.webank.wedatasphere.linkis.bml.Entity.Version;
-import com.webank.wedatasphere.linkis.bml.common.Constant;
-import com.webank.wedatasphere.linkis.bml.common.ResourceHelper;
-import com.webank.wedatasphere.linkis.bml.common.ResourceHelperFactory;
-import com.webank.wedatasphere.linkis.bml.dao.VersionDao;
-import com.webank.wedatasphere.linkis.bml.service.ResourceService;
-import com.webank.wedatasphere.linkis.bml.service.VersionService;
-import com.webank.wedatasphere.linkis.common.io.Fs;
-import com.webank.wedatasphere.linkis.common.io.FsPath;
-import com.webank.wedatasphere.linkis.storage.FSFactory;
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang.StringUtils;
-import org.glassfish.jersey.media.multipart.FormDataBodyPart;
-import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
-import org.glassfish.jersey.media.multipart.FormDataMultiPart;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Created by cooperyang on 2019/5/17.
- */
-@Service
-public class VersionServiceImpl implements VersionService {
-
-    private static final Logger logger = LoggerFactory.getLogger(VersionServiceImpl.class);
-
-    @Autowired
-    private VersionDao versionDao;
-
-    @Autowired
-    private ResourceService resourceService;
-
-    @Override
-    public Version getVersion(String resourceId, String version) {
-        return versionDao.getVersion(resourceId, version);
-    }
-
-
-
-    @Override
-    public List<ResourceVersion> getResourcesVersions(Map paramMap) {
-        return versionDao.getResourcesVersions(paramMap);
-    }
-
-    @Override
-    public void deleteResourceVersion(String resourceId, String version) {
-        versionDao.deleteVersion(resourceId, version);
-    }
-
-    @Override
-    public void deleteResourceVersions(String resourceId) {
-    }
-
-    @Override
-    public void deleteResourcesVersions(List<String> resourceIds, List<String> versions) {
-
-    }
-
-    @Override
-    public String updateVersion(String resourceId, String user, FormDataMultiPart formDataMultiPart,
-                                Map<String, Object> params)throws Exception{
-        ResourceHelper resourceHelper = ResourceHelperFactory.getResourceHelper();
-        FormDataBodyPart file = formDataMultiPart.getField("file");
-        InputStream inputStream = file.getValueAs(InputStream.class);
-        final String resourceIdLock = resourceId.intern();
-        FormDataContentDisposition fileDetail = file.getFormDataContentDisposition();
-        String fileName = new String(fileDetail.getFileName().getBytes("ISO8859-1"), "UTF-8");
-        //获取资源的path
-        String path = versionDao.getResourcePath(resourceId);
-        String newVersion;
-        //上传资源前,需要对resourceId这个字符串的intern进行加锁,这样所有需要更新该资源的用户都会同步
-        synchronized (resourceIdLock){
-            //资源上传到hdfs
-            StringBuilder stringBuilder = new StringBuilder();
-            long size = resourceHelper.upload(path, user, inputStream, stringBuilder);
-            String md5String = stringBuilder.toString();
-            String clientIp = params.get("clientIp").toString();
-            //生成新的version
-            String lastVersion = versionDao.getNewestVersion(resourceId);
-            newVersion = params.get("newVersion").toString();
-            long startByte = versionDao.getEndByte(resourceId, lastVersion) + 1;
-            //更新resource_version表
-            ResourceVersion resourceVersion = ResourceVersion.createNewResourceVersion(resourceId, path,
-                    md5String, clientIp, size, newVersion, startByte);
-            versionDao.insertNewVersion(resourceVersion);
-        }
-        return newVersion;
-    }
-
-    private String generateNewVersion(String version){
-        int next = Integer.parseInt(version.substring(1, version.length())) + 1;
-        return Constant.VERSION_PREFIX + String.format(Constant.VERSION_FORMAT, next);
-    }
-
-    @Override
-    public String getNewestVersion(String resourceId) {
-        return versionDao.getNewestVersion(resourceId);
-    }
-
-    @Override
-    public boolean downloadResource(String user, String resourceId, String version, OutputStream outputStream,
-                                    Map<String, Object> properties)throws IOException {
-        //1获取resourceId 和 version对应的资源所在的路径
-        //2获取的startByte和EndByte
-        //3使用storage获取输入流
-        ResourceVersion resourceVersion = versionDao.findResourceVersion(resourceId, version);
-        long startByte = resourceVersion.getStartByte();
-        long endByte = resourceVersion.getEndByte();
-        String path = resourceVersion.getResource();
-        Fs fileSystem = FSFactory.getFsByProxyUser(new FsPath(path), user);
-        fileSystem.init(new HashMap<String, String>());
-        InputStream inputStream = fileSystem.read(new FsPath(path));
-        inputStream.skip(startByte - 1);
-        logger.info("{} 下载资源 {} inputStream skipped {} bytes", user, resourceId, (startByte - 1));
-        byte[] buffer = new byte[1024];
-        long size = endByte - startByte + 1;
-        int left = (int) size;
-        try {
-            while(left > 0) {
-                int readed = inputStream.read(buffer);
-                int useful = Math.min(readed, left);
-                if(useful < 0){
-                    break;
-                }
-                left -= useful;
-                byte[] bytes = new byte[useful];
-                for (int i = 0; i <useful ; i++) {
-                    bytes[i] = buffer[i];
-                }
-                outputStream.write(bytes);
-            }
-        }finally {
-            //int size = IOUtils.copy(inputStream, outputStream);
-            IOUtils.closeQuietly(inputStream);
-            fileSystem.close();
-        }
-        return size >= 0 ;
-    }
-
-    @Override
-    public List<Version> getVersions(String resourceId) {
-        return versionDao.getVersions(resourceId);
-    }
-//    @Override
-//    public List<Version> getVersions(String resourceId, List<String> versions) {
-//        return versionDao.getVersions(resourceId, versions);
-//    }
-
-    //分页查询
-    public List<Version> selectVersionByPage(int currentPage, int pageSize,String resourceId){
-        List<Version> rvList = null;
-        if(StringUtils.isNotEmpty(resourceId)){
-            PageHelper.startPage(currentPage, pageSize);
-            rvList =versionDao.selectVersionByPage(resourceId);
-        } else {
-            rvList = new ArrayList<Version>();
-        }
-        PageInfo<Version> pageInfo = new PageInfo<>(rvList);
-        return pageInfo.getList();
-    }
-
-    @Override
-    public List<ResourceVersion> getAllResourcesViaSystem(String system, String user) {
-        return versionDao.getAllResourcesViaSystem(system, user);
-    }
-    @Override
-    public List<ResourceVersion> selectResourcesViaSystemByPage(int currentPage, int pageSize,String system, String user){
-        List<ResourceVersion> resourceVersions = null;
-        if(StringUtils.isNotEmpty(system) || StringUtils.isNotEmpty(user)){
-            PageHelper.startPage(currentPage, pageSize);
-            resourceVersions = versionDao.selectResourcesViaSystemByPage(system, user);
-        } else {
-            resourceVersions = new ArrayList<ResourceVersion>();
-        }
-        PageInfo<ResourceVersion> pageInfo = new PageInfo<>(resourceVersions);
-        return pageInfo.getList();
-    }
-
-    @Override
-    public boolean checkVersion(String resourceId, String version) {
-        return versionDao.checkVersion(resourceId, version) == 1;
-    }
-
-    @Override
-    public boolean canAccess(String resourceId, String version) {
-        return versionDao.selectResourceVersionEnbleFlag(resourceId, version) == 1;
-    }
-
-
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/threading/Scheduler.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/threading/Scheduler.java
deleted file mode 100644
index ea642ef..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/threading/Scheduler.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.threading;
-
-/**
- * created by cooperyang on 2019/9/16
- * Description:
- */
-public interface Scheduler {
-
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/threading/Task.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/threading/Task.java
deleted file mode 100644
index 4679a4d..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/threading/Task.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.threading;
-
-/**
- * created by cooperyang on 2019/9/16
- * Description:
- */
-public abstract class Task {
-
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/threading/TaskState.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/threading/TaskState.java
deleted file mode 100644
index d22b2e7..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/threading/TaskState.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.threading;
-
-/**
- * created by cooperyang on 2019/9/16
- * Description:
- */
-public enum TaskState {
-    /**
-     * 任务的状态的内容
-     */
-    INITED("inited", 0),
-    SCHEDULED("scheduled", 1),
-    RUNNING("running", 2),
-    SUCCESS("success",3),
-    FAILED("failed", 4),
-    CANCELLED("cancelled", 5);
-    private String value;
-    private int id;
-    private TaskState(String value, int id){
-        this.value = value;
-        this.id = id;
-    }
-
-    public String getValue() {
-        return value;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
-
-    public int getId() {
-        return id;
-    }
-
-    public void setId(int id) {
-        this.id = id;
-    }
-
-    public static boolean isCompleted(TaskState state){
-        return state.equals(SUCCESS) || state.equals(FAILED) || state.equals(CANCELLED);
-    }
-
-    public static boolean isCompleted(String state){
-        return SUCCESS.getValue().equals(state) || FAILED.getValue().equals(state) || CANCELLED.getValue().equals(state);
-    }
-
-
-
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/util/HttpRequestHelper.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/util/HttpRequestHelper.java
deleted file mode 100644
index 4712f8e..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/util/HttpRequestHelper.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.util;
-
-import org.apache.commons.lang.StringUtils;
-
-import javax.servlet.http.HttpServletRequest;
-
-/**
- * created by cooperyang on 2019/5/23
- * Description:
- */
-public class HttpRequestHelper {
-
-    private static final String UN_KNOWN = "unKnown";
-
-    public static String getIp(HttpServletRequest request) {
-        String ip = request.getHeader("X-Forwarded-For");
-        if(StringUtils.isNotEmpty(ip) && !UN_KNOWN.equalsIgnoreCase(ip)){
-            //多次反向代理后会有多个ip值,第一个ip才是真实ip
-            int index = ip.indexOf(",");
-            if(index != -1){
-                return ip.substring(0,index);
-            }else{
-                return ip;
-            }
-        }
-        ip = request.getHeader("X-Real-IP");
-        if(StringUtils.isNotEmpty(ip) && !UN_KNOWN.equalsIgnoreCase(ip)){
-            return ip;
-        }
-        return request.getRemoteAddr();
-    }
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/util/MD5Utils.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/util/MD5Utils.java
deleted file mode 100644
index 927173b..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/util/MD5Utils.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.util;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.security.MessageDigest;
-
-/**
- * created by cooperyang on 2019/5/23
- * Description:
- */
-public class MD5Utils {
-
-    private static final char[] HEX_DIGITS = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
-
-    private static final Logger logger = LoggerFactory.getLogger(MD5Utils.class);
-
-    public static String getMD5(String s) {
-        try {
-            byte[] btInput = s.getBytes("utf-8");
-            MessageDigest mdInst = MessageDigest.getInstance("MD5");
-            mdInst.update(btInput);
-            byte[] md = mdInst.digest();
-            int j = md.length;
-            char str[] = new char[j * 2];
-            int k = 0;
-            for (int i = 0; i < j; i++) {
-                byte byte0 = md[i];
-                str[k++] = HEX_DIGITS[byte0 >>> 4 & 0xf];
-                str[k++] = HEX_DIGITS[byte0 & 0xf];
-            }
-            return new String(str);
-        } catch (Exception e) {
-            logger.error("create MD5 for failed, reason:", e);
-            return null;
-        }
-    }
-
-    public static String getMD5(byte[] btInput) {
-        try {
-            MessageDigest mdInst = MessageDigest.getInstance("MD5");
-            mdInst.update(btInput);
-            byte[] md = mdInst.digest();
-            int j = md.length;
-            char str[] = new char[j * 2];
-            int k = 0;
-            for (int i = 0; i < j; i++) {
-                byte byte0 = md[i];
-                str[k++] = HEX_DIGITS[byte0 >>> 4 & 0xf];
-                str[k++] = HEX_DIGITS[byte0 & 0xf];
-            }
-            return new String(str);
-        } catch (Exception e) {
-            logger.error("create MD5 for failed, reason:", e);
-            return null;
-        }
-    }
-
-
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/vo/ResourceBasicVO.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/vo/ResourceBasicVO.java
deleted file mode 100644
index 38aa914..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/vo/ResourceBasicVO.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.vo;
-
-import java.util.Date;
-
-/**
- * created by cooperyang on 2019/5/30
- * Description: 给用户查看的资源基本信息的VO类
- */
-
-public class ResourceBasicVO {
-    private String resourceId;
-    private String owner;
-    private String downloadedFileName;
-    private String system;
-    private String expireTime;
-    private Integer numberOfVerions;
-    private Date createTime;
-
-    public String getResourceId() {
-        return resourceId;
-    }
-
-    public void setResourceId(String resourceId) {
-        this.resourceId = resourceId;
-    }
-
-    public String getOwner() {
-        return owner;
-    }
-
-    public void setOwner(String owner) {
-        this.owner = owner;
-    }
-
-    public String getDownloadedFileName() {
-        return downloadedFileName;
-    }
-
-    public void setDownloadedFileName(String downloadedFileName) {
-        this.downloadedFileName = downloadedFileName;
-    }
-
-    public String getSystem() {
-        return system;
-    }
-
-    public void setSystem(String system) {
-        this.system = system;
-    }
-
-    public String getExpireTime() {
-        return expireTime;
-    }
-
-    public void setExpireTime(String expireTime) {
-        this.expireTime = expireTime;
-    }
-
-    public int getNumberOfVerions() {
-        return numberOfVerions;
-    }
-
-    public void setNumberOfVerions(int numberOfVerions) {
-        this.numberOfVerions = numberOfVerions;
-    }
-
-    public Date getCreateTime() {
-        return createTime;
-    }
-
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/vo/ResourceVO.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/vo/ResourceVO.java
deleted file mode 100644
index 950cd26..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/vo/ResourceVO.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.vo;
-
-/**
- * created by cooperyang on 2019/5/29
- * Description:
- */
-public class ResourceVO {
-    private String user;
-    private String resourceId;
-    private String version;
-    private String resource;
-
-    public String getUser() {
-        return user;
-    }
-
-    public void setUser(String user) {
-        this.user = user;
-    }
-
-    public String getResourceId() {
-        return resourceId;
-    }
-
-    public void setResourceId(String resourceId) {
-        this.resourceId = resourceId;
-    }
-
-    public String getVersion() {
-        return version;
-    }
-
-    public void setVersion(String version) {
-        this.version = version;
-    }
-
-    public String getResource() {
-        return resource;
-    }
-
-    public void setResource(String resource) {
-        this.resource = resource;
-    }
-}
diff --git a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/vo/ResourceVersionsVO.java b/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/vo/ResourceVersionsVO.java
deleted file mode 100644
index 60560c4..0000000
--- a/bml/bmlserver/src/main/java/com/webank/wedatasphere/linkis/bml/vo/ResourceVersionsVO.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.vo;
-
-import com.webank.wedatasphere.linkis.bml.Entity.Version;
-
-import java.util.List;
-
-/**
- * Created by cooperyang on 2019/5/16.
- */
-public class ResourceVersionsVO {
-
-    private String resourceId;
-
-    private String user;
-
-    //private String system;
-
-    private List<Version> versions;
-
-    public String getResourceId() {
-        return resourceId;
-    }
-
-    public void setResourceId(String resourceId) {
-        this.resourceId = resourceId;
-    }
-
-    public String getUser() {
-        return user;
-    }
-
-    public void setUser(String user) {
-        this.user = user;
-    }
-
-//    public String getSystem() {
-//        return system;
-//    }
-//
-//    public void setSystem(String system) {
-//        this.system = system;
-//    }
-
-    public List<Version> getVersions() {
-        return versions;
-    }
-
-    public void setVersions(List<Version> versions) {
-        this.versions = versions;
-    }
-}
diff --git a/bml/bmlserver/src/main/scala/com/webank/wedatasphere/linkis/bml/common/BmlAuthorityException.scala b/bml/bmlserver/src/main/scala/com/webank/wedatasphere/linkis/bml/common/BmlAuthorityException.scala
deleted file mode 100644
index bcc25fa..0000000
--- a/bml/bmlserver/src/main/scala/com/webank/wedatasphere/linkis/bml/common/BmlAuthorityException.scala
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.common
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException
-
-/**
-  * created by cooperyang on 2019/5/21
-  * Description:
-  */
-case class BmlAuthorityException() extends ErrorException(60036, "未登录或登录过期,无法访问物料库")
-
-case class UploadResourceException() extends ErrorException(60050, "首次上传资源失败")
-
-case class UpdateResourceException() extends ErrorException(60051, "更新资源失败")
-
diff --git a/bml/bmlserver/src/main/scala/com/webank/wedatasphere/linkis/bml/common/BmlPermissionDeniedException.scala b/bml/bmlserver/src/main/scala/com/webank/wedatasphere/linkis/bml/common/BmlPermissionDeniedException.scala
deleted file mode 100644
index 639c185..0000000
--- a/bml/bmlserver/src/main/scala/com/webank/wedatasphere/linkis/bml/common/BmlPermissionDeniedException.scala
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.common
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException
-
-/**
-  * created by cooperyang on 2019/5/31
-  * Description:
-  */
-case class BmlPermissionDeniedException(errorMsg:String) extends ErrorException(75569, errorMsg)
diff --git a/bml/bmlserver/src/main/scala/com/webank/wedatasphere/linkis/bml/common/BmlQueryFailException.scala b/bml/bmlserver/src/main/scala/com/webank/wedatasphere/linkis/bml/common/BmlQueryFailException.scala
deleted file mode 100644
index 38218a0..0000000
--- a/bml/bmlserver/src/main/scala/com/webank/wedatasphere/linkis/bml/common/BmlQueryFailException.scala
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.common
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException
-
-/**
-  * created by cooperyang on 2019/5/28
-  * Description:
-  */
-case class BmlQueryFailException(errorMsg:String) extends ErrorException(70068, errorMsg)
diff --git a/bml/bmlserver/src/main/scala/com/webank/wedatasphere/linkis/bml/common/BmlResourceExpiredException.scala b/bml/bmlserver/src/main/scala/com/webank/wedatasphere/linkis/bml/common/BmlResourceExpiredException.scala
deleted file mode 100644
index 85a1920..0000000
--- a/bml/bmlserver/src/main/scala/com/webank/wedatasphere/linkis/bml/common/BmlResourceExpiredException.scala
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.common
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException
-
-/**
-  * created by cooperyang on 2019/5/31
-  * Description:
-  */
-case class BmlResourceExpiredException(resourceId:String) extends ErrorException(78531, resourceId + "已经过期,不能下载")
diff --git a/bml/bmlserver/src/main/scala/com/webank/wedatasphere/linkis/bml/common/BmlServerParaErrorException.scala b/bml/bmlserver/src/main/scala/com/webank/wedatasphere/linkis/bml/common/BmlServerParaErrorException.scala
deleted file mode 100644
index 5976fbf..0000000
--- a/bml/bmlserver/src/main/scala/com/webank/wedatasphere/linkis/bml/common/BmlServerParaErrorException.scala
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.common
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException
-
-/**
-  * created by cooperyang on 2019/5/28
-  * Description:
-  */
-case class BmlServerParaErrorException(errorMsg:String) extends ErrorException(78361, errorMsg)
diff --git a/bml/bmlserver/src/main/scala/com/webank/wedatasphere/linkis/bml/conf/BmlServerConfiguration.scala b/bml/bmlserver/src/main/scala/com/webank/wedatasphere/linkis/bml/conf/BmlServerConfiguration.scala
deleted file mode 100644
index 4479226..0000000
--- a/bml/bmlserver/src/main/scala/com/webank/wedatasphere/linkis/bml/conf/BmlServerConfiguration.scala
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.conf
-
-import java.util.concurrent.TimeUnit
-
-import com.webank.wedatasphere.linkis.common.conf.CommonVars
-
-/**
-  * created by cooperyang on 2019/5/21
-  * Description:
-  */
-object BmlServerConfiguration {
-  val BML_HDFS_PREFIX = CommonVars("wds.linkis.bml.hdfs.prefix", "/tmp/linkis")
-
-  val BML_CLEAN_EXPIRED_TIME:CommonVars[Int] = CommonVars[Int]("wds.linkis.bml.cleanExpired.time", 100)
-
-  val BML_CLEAN_EXPIRED_TIME_TYPE = CommonVars("wds.linkis.bml.clean.time.type", TimeUnit.HOURS)
-
-  val BML_MAX_THREAD_SIZE:CommonVars[Int] = CommonVars[Int]("wds.linkis.server.maxThreadSize", 30)
-
-}
diff --git a/bml/bmlserver/src/main/scala/com/webank/wedatasphere/linkis/bml/protocol/BmlServerProtocol.scala b/bml/bmlserver/src/main/scala/com/webank/wedatasphere/linkis/bml/protocol/BmlServerProtocol.scala
deleted file mode 100644
index 7976631..0000000
--- a/bml/bmlserver/src/main/scala/com/webank/wedatasphere/linkis/bml/protocol/BmlServerProtocol.scala
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.protocol
-
-/**
-  * created by cooperyang on 2019/5/28
-  * Description:
-  */
-trait BmlServerProtocol
-
-case class BmlDownloadElementProtocol(path:String,
-                                   startByte:Long,
-                                   endByte:Long) extends BmlServerProtocol
-
diff --git a/bml/bmlserver/src/main/scala/com/webank/wedatasphere/linkis/bml/rpc/BmlReceiver.scala b/bml/bmlserver/src/main/scala/com/webank/wedatasphere/linkis/bml/rpc/BmlReceiver.scala
deleted file mode 100644
index 59ac372..0000000
--- a/bml/bmlserver/src/main/scala/com/webank/wedatasphere/linkis/bml/rpc/BmlReceiver.scala
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.bml.rpc
-
-import com.webank.wedatasphere.linkis.rpc.{Receiver, Sender}
-
-import scala.concurrent.duration.Duration
-
-/**
-  * created by cooperyang on 2019/5/14
-  * Description:
-  */
-class BmlReceiver extends Receiver{
-
-
-  override def receive(message: Any, sender: Sender): Unit = ???
-
-  override def receiveAndReply(message: Any, sender: Sender): Any = ???
-
-  override def receiveAndReply(message: Any, duration: Duration, sender: Sender): Any = ???
-
-
-}
diff --git a/conf/config.sh b/conf/config.sh
deleted file mode 100755
index d6f7ad0..0000000
--- a/conf/config.sh
+++ /dev/null
@@ -1,135 +0,0 @@
-#!/bin/sh
-
-shellDir=`dirname $0`
-workDir=`cd ${shellDir}/..;pwd`
-
-###
-SSH_PORT=22
-
-### deploy user
-deployUser=hadoop
-
-
-### The install home path of Linkis
-LINKIS_INSTALL_HOME=$workDir        #Must provided
-
-
-
-### Specifies the user workspace, which is used to store the user's script files and log files.
-### Generally local directory
-WORKSPACE_USER_ROOT_PATH=file:///tmp/linkis/ ##file:// required
-### User's root hdfs path
-HDFS_USER_ROOT_PATH=hdfs:///tmp/linkis ##hdfs:// required
-
-### Path to store job ResultSet:file or hdfs path
-RESULT_SET_ROOT_PATH=hdfs:///tmp/linkis
-
-### Provide the DB information of Hive metadata database.
-HIVE_META_URL=
-HIVE_META_USER=
-HIVE_META_PASSWORD=
-
-###HADOOP CONF DIR
-HADOOP_CONF_DIR=/appcom/config/hadoop-config
-
-###HIVE CONF DIR
-HIVE_CONF_DIR=/appcom/config/hive-config
-
-###SPARK CONF DIR
-SPARK_CONF_DIR=/appcom/config/spark-config
-
-################### The install Configuration of all Micro-Services #####################
-#
-#    NOTICE:
-#       1. If you just wanna try, the following micro-service configuration can be set without any settings.
-#            These services will be installed by default on this machine.
-#       2. In order to get the most complete enterprise-level features, we strongly recommend that you install
-#            Linkis in a distributed manner and set the following microservice parameters
-#
-
-###  EUREKA install information
-###  You can access it in your browser at the address below:http://${EUREKA_INSTALL_IP}:${EUREKA_PORT}
-#EUREKA_INSTALL_IP=127.0.0.1         # Microservices Service Registration Discovery Center
-EUREKA_PORT=20303
-
-###  Gateway install information
-#GATEWAY_INSTALL_IP=127.0.0.1
-GATEWAY_PORT=9001
-
-###  publicservice
-#PUBLICSERVICE_INSTALL_IP=127.0.0.1
-PUBLICSERVICE_PORT=9102
-
-
-### Hive Metadata Query service, provide the metadata information of Hive databases.
-#METADATA_INSTALL_IP=127.0.0.1
-METADATA_PORT=9103
-
-
-### ResourceManager
-#RESOURCEMANAGER_INSTALL_IP=127.0.0.1
-RESOURCEMANAGER_PORT=9104
-
-
-### Spark
-### This service is used to provide spark capability.
-#SPARK_INSTALL_IP=127.0.0.1
-SPARK_EM_PORT=9105
-SPARK_ENTRANCE_PORT=9106
-
-
-### Hive
-### This service is used to provide hive capability.
-#HIVE_INSTALL_IP=127.0.0.1
-HIVE_EM_PORT=9107
-HIVE_ENTRANCE_PORT=9108
-
-
-### PYTHON
-### This service is used to provide python capability.
-#PYTHON_INSTALL_IP=127.0.0.1
-PYTHON_EM_PORT=9109
-PYTHON_ENTRANCE_PORT=9110
-
-
-### JDBC
-### This service is used to provide jdbc capability.
-#JDBC_INSTALL_IP=127.0.0.1
-JDBC_ENTRANCE_PORT=9111
-
-### SHELL
-### This service is used to provide shell capability.
-#SHELL_INSTALL_IP=127.0.0.1
-SHELL_EM_PORT=9114
-SHELL_ENTRANCE_PORT=9115
-
-
-
-### BML
-### This service is used to provide BML capability.
-#BML_INSTALL_IP=127.0.0.1
-BML_PORT=9113
-
-### cs
-#CS_INSTALL_IP=127.0.0.1
-CS_PORT=9116
-
-
-### datasource management server
-#DSM_INSTALL_IP=127.0.0.1
-DSM_PORT=9117
-
-### metadata management server
-#MDM_INSTALL_IP=127.0.0.1
-MDM_PORT=9118
-
-########################################################################################
-
-## LDAP is for enterprise authorization, if you just want to have a try, ignore it.
-#LDAP_URL=ldap://localhost:1389/
-#LDAP_BASEDN=dc=webank,dc=com
-
-## java application default jvm memory
-export SERVER_HEAP_SIZE="512M"
-
-LINKIS_VERSION=0.11.0
diff --git a/conf/linkis-env.sh b/conf/linkis-env.sh
new file mode 100644
index 0000000..59319ac
--- /dev/null
+++ b/conf/linkis-env.sh
@@ -0,0 +1,135 @@
+#!/bin/bash
+#
+# description:  Starts and stops Server
+#
+# @name:        linkis-demo
+
+# @created:     01.16.2021
+#
+# Modified for Linkis 1.0.0
+
+# SSH_PORT=22
+
+### deploy user
+deployUser=hadoop
+
+##Linkis_SERVER_VERSION
+LINKIS_SERVER_VERSION=v1
+
+### Specifies the user workspace, which is used to store the user's script files and log files.
+### Generally local directory
+WORKSPACE_USER_ROOT_PATH=file:///tmp/linkis/ ##file:// required
+### User's root hdfs path
+HDFS_USER_ROOT_PATH=hdfs:///tmp/linkis ##hdfs:// required
+
+### Path to store job ResultSet:file or hdfs path
+RESULT_SET_ROOT_PATH=hdfs:///tmp/linkis ##hdfs:// required
+
+### Path to store started engines and engine logs, must be local
+ENGINECONN_ROOT_PATH=/appcom/tmp   ## file://  required
+
+ENTRANCE_CONFIG_LOG_PATH=hdfs:///tmp/linkis/ ##file:// required
+
+### Provide the DB information of Hive metadata database.
+HIVE_META_URL=
+HIVE_META_USER=
+HIVE_META_PASSWORD=
+
+##YARN REST URL  spark engine required
+YARN_RESTFUL_URL=http://127.0.0.1:8088
+
+###HADOOP CONF DIR
+HADOOP_CONF_DIR=/appcom/config/hadoop-config
+
+###HIVE CONF DIR
+HIVE_CONF_DIR=/appcom/config/hive-config
+
+###SPARK CONF DIR
+SPARK_CONF_DIR=/appcom/config/spark-config
+
+## Engine version conf
+#SPARK_VERSION
+#SPARK_VERSION=2.4.3
+##HIVE_VERSION
+#HIVE_VERSION=1.2.1
+#PYTHON_VERSION=python2
+
+################### The install Configuration of all Micro-Services #####################
+#
+#    NOTICE:
+#       1. If you just wanna try, the following micro-service configuration can be set without any settings.
+#            These services will be installed by default on this machine.
+#       2. In order to get the most complete enterprise-level features, we strongly recommend that you install
+#            Linkis in a distributed manner and set the following microservice parameters
+#
+
+###  EUREKA install information
+###  You can access it in your browser at the address below:http://${EUREKA_INSTALL_IP}:${EUREKA_PORT}
+#EUREKA_INSTALL_IP=127.0.0.1         # Microservices Service Registration Discovery Center
+EUREKA_PORT=20303
+EUREKA_PREFER_IP=false
+
+###  Gateway install information
+#GATEWAY_INSTALL_IP=127.0.0.1
+GATEWAY_PORT=9001
+
+### ApplicationManager
+#MANAGER_INSTALL_IP=127.0.0.1
+MANAGER_PORT=9101
+
+### EngineManager
+#ENGINECONNMANAGER_INSTALL_IP=127.0.0.1
+ENGINECONNMANAGER_PORT=9102
+
+
+
+### EnginePluginServer
+#ENGINECONN_PLUGIN_SERVER_INSTALL_IP=127.0.0.1
+ENGINECONN_PLUGIN_SERVER_PORT=9103
+
+### LinkisEntrance
+#ENTRANCE_INSTALL_IP=127.0.0.1
+ENTRANCE_PORT=9104
+
+###  publicservice
+#PUBLICSERVICE_INSTALL_IP=127.0.0.1
+PUBLICSERVICE_PORT=9105
+
+
+### Hive Metadata Query service, provide the metadata information of Hive databases.
+#DATASOURCE_INSTALL_IP=127.0.0.1
+DATASOURCE_PORT=9106
+
+### BML
+### This service is used to provide BML capability.
+#BML_INSTALL_IP=127.0.0.1
+BML_PORT=9107
+
+### cs
+#CS_INSTALL_IP=127.0.0.1
+CS_PORT=9108
+
+########################################################################################
+
+## LDAP is for enterprise authorization, if you just want to have a try, ignore it.
+#LDAP_URL=ldap://localhost:1389/
+#LDAP_BASEDN=dc=webank,dc=com
+#LDAP_USER_NAME_FORMAT=cn=%s@xxx.com,OU=xxx,DC=xxx,DC=com
+
+## java application default jvm memory
+export SERVER_HEAP_SIZE="512M"
+
+if test -z "$EUREKA_INSTALL_IP"
+then
+  export EUREKA_INSTALL_IP="`hostname --fqdn`"
+fi
+if [ "true" != "$EUREKA_PREFER_IP" ]
+then
+  export EUREKA_HOSTNAME=$EUREKA_INSTALL_IP
+fi
+export EUREKA_URL=http://$EUREKA_INSTALL_IP:$EUREKA_PORT/eureka/
+
+LINKIS_VERSION=1.0.0
+
+# for install
+LINKIS_PUBLIC_MODULE=lib/linkis-commons/public-module
\ No newline at end of file
diff --git a/conf/linkis.properties b/conf/linkis.properties
new file mode 100644
index 0000000..5654baf
--- /dev/null
+++ b/conf/linkis.properties
@@ -0,0 +1,51 @@
+#
+# Copyright 2019 WeBank
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+##
+#wds.linkis.test.mode=true
+wds.linkis.server.version=v1
+##spring conf
+wds.linkis.gateway.url=http://127.0.0.1:9001
+wds.linkis.eureka.defaultZone=http://127.0.0.1:20303/eureka/
+##mybatis
+wds.linkis.server.mybatis.datasource.url=
+wds.linkis.server.mybatis.datasource.username=
+wds.linkis.server.mybatis.datasource.password=
+##hive meta
+hive.meta.url=
+hive.meta.user=
+hive.meta.password=
+##LDAP
+wds.linkis.ldap.proxy.url=
+wds.linkis.ldap.proxy.baseDN=
+wds.linkis.ldap.proxy.userNameFormat=
+
+wds.linkis.admin.user=hadoop
+#hadoopconfig
+#hadoop.config.dir=/appcom/config/hadoop-config
+#hive.config.dir=
+#spark.config.dir
+##fileSystem
+wds.linkis.filesystem.root.path=file:///tmp/linkis/
+wds.linkis.filesystem.hdfs.root.path=hdfs:///tmp/linkis/
+#engine plugin
+wds.linkis.engineconn.root.dir=/appcom/tmp
+wds.linkis.engineconn.home=/appcom/Install/LinkisInstall/lib/linkis-engineconn-plugins
+wds.linkis.engineconn.plugin.loader.store.path=/appcom/Install/LinkisInstall/lib/linkis-engineconn-plugins
+wds.linkis.public_module.path=/appcom/Install/LinkisInstall/lib/linkis-commons/public-module
+##engine Version
+#wds.linkis.spark.engine.version=
+#wds.linkis.hive.engine.version=
+#wds.linkis.python.engine.version=
\ No newline at end of file
diff --git a/contextservice/cs-cache/pom.xml b/contextservice/cs-cache/pom.xml
deleted file mode 100644
index 1969444..0000000
--- a/contextservice/cs-cache/pom.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>linkis-cs-cache</artifactId>
-
-    <dependencies>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cs-common</artifactId>
-            </dependency>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cs-persistence</artifactId>
-            </dependency>
-
-        <dependency>
-            <groupId>org.reflections</groupId>
-            <artifactId>reflections</artifactId>
-            <version>0.9.10</version>
-        </dependency>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-module</artifactId>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>RELEASE</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cs-listener</artifactId>
-            <scope>compile</scope>
-        </dependency>
-
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>${basedir}/src/main/resources</directory>
-            </resource>
-        </resources>
-        <finalName>${project.artifactId}-${project.version}</finalName>
-    </build>
-</project>
\ No newline at end of file
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/ContextCacheService.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/ContextCacheService.java
deleted file mode 100644
index f8c655a..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/ContextCacheService.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-
-import java.util.List;
-
-/**
- * @author peacewong
- * @date 2020/2/9 16:20
- */
-public interface ContextCacheService {
-
-   ContextKeyValue put(ContextID contextID, ContextKeyValue csKeyValue) throws CSErrorException;
-
-   ContextKeyValue rest(ContextID contextID, ContextKey csKey);
-
-   ContextKeyValue get(ContextID contextID, ContextKey csKey);
-
-   List<ContextKeyValue> getValues(ContextID contextID, String keyword, ContextType csType);
-
-   List<ContextKeyValue> getAllLikes(ContextID contextID, String regex, ContextType csType);
-
-   List<ContextKeyValue> getAll(ContextID contextID);
-
-   List<ContextKeyValue> getAllByScope(ContextID contextID, ContextScope scope, ContextType csType);
-
-   List<ContextKeyValue> getAllByType(ContextID contextID, ContextType csType);
-
-   ContextKeyValue remove(ContextID contextID, ContextKey csKey);
-
-   void  removeAll(ContextID contextID);
-
-   void  removeAll(ContextID contextID, ContextScope scope, ContextType csType);
-
-   void  removeAll(ContextID contextID, ContextType csType);
-
-   void removeByKeyPrefix(ContextID contextID, String preFix);
-
-   void removeByKeyPrefix(ContextID contextID, String preFix, ContextType csType);
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/DefaultContextCacheService.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/DefaultContextCacheService.java
deleted file mode 100644
index c964299..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/DefaultContextCacheService.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.ContextCache;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.DefaultContextCache;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.csid.ContextIDValue;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.lang.StringUtils;
-import org.jvnet.hk2.annotations.Service;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * @author peacewong
- * @date 2020/2/12 21:25
- */
-@Component
-public class DefaultContextCacheService implements ContextCacheService {
-
-    private static final Logger logger = LoggerFactory.getLogger(DefaultContextCacheService.class);
-
-
-    @Autowired
-    private ContextCache contextCache ;
-
-    @Override
-    public ContextKeyValue put(ContextID contextID, ContextKeyValue csKeyValue) throws CSErrorException {
-
-        if (null == contextID || null == csKeyValue) {
-            return null;
-        }
-
-        logger.info("Start to put contextKey({}) to ContextID({})", csKeyValue.getContextKey().getKey(), contextID.getContextId());
-        ContextIDValue contextIDValue = contextCache.getContextIDValue(contextID);
-        ContextKeyValue oldValue = contextIDValue.getContextKeyValueContext().put(csKeyValue);
-        logger.info("Finished to put contextKey({}) to ContextID({})", csKeyValue.getContextKey().getKey(), contextID.getContextId());
-
-        return oldValue;
-    }
-
-    @Override
-    public ContextKeyValue rest(ContextID contextID, ContextKey csKey) {
-        if (null == contextID || null == csKey) {
-            return null;
-        }
-        try {
-            ContextIDValue contextIDValue = contextCache.getContextIDValue(contextID);
-            return contextIDValue.getContextKeyValueContext().remove(csKey);
-        } catch (Exception e) {
-            logger.error(String.format("Failed to rest contextID(%s) of csKey(%s)",
-                    contextID.getContextId(), csKey.getKey()), e);
-        }
-        return null;
-    }
-
-    @Override
-    public ContextKeyValue get(ContextID contextID, ContextKey csKey) {
-        if (null == contextID || null == csKey) {
-            return null;
-        }
-        try {
-            ContextIDValue contextIDValue = contextCache.getContextIDValue(contextID);
-            return contextIDValue.getContextKeyValueContext().getContextKeyValue(csKey, csKey.getContextType());
-        } catch (Exception e) {
-            logger.error(String.format("Failed to get contextID(%s) of csKey(%s)",
-                    contextID.getContextId(), csKey.getKey()), e);
-        }
-        return null;
-    }
-
-    @Override
-    public List<ContextKeyValue> getValues(ContextID contextID, String keyword, ContextType csType) {
-        if (null == contextID || StringUtils.isBlank(keyword)) {
-            return null;
-        }
-        try {
-            ContextIDValue contextIDValue = contextCache.getContextIDValue(contextID);
-            return contextIDValue.getContextKeyValueContext().getValues(keyword, csType);
-        } catch (Exception e) {
-            logger.error(String.format("Failed to getValues contextID(%s) of keyword(%s)",
-                    contextID.getContextId(), keyword), e);
-        }
-        return null;
-    }
-
-    @Override
-    public List<ContextKeyValue> getAllLikes(ContextID contextID, String regex, ContextType csType) {
-        if (null == contextID || StringUtils.isBlank(regex)) {
-            return null;
-        }
-        try {
-            ContextIDValue contextIDValue = contextCache.getContextIDValue(contextID);
-            return contextIDValue.getContextKeyValueContext().getAllLikes(regex, csType);
-        } catch (Exception e) {
-            logger.error(String.format("Failed to getAllLikes contextID(%s) of regex(%s)",
-                    contextID.getContextId(), regex), e);
-        }
-        return null;
-    }
-
-    @Override
-    public List<ContextKeyValue> getAll(ContextID contextID) {
-
-        if (null == contextID) {
-            return null;
-        }
-        try {
-            ContextIDValue contextIDValue = contextCache.getContextIDValue(contextID);
-            return contextIDValue.getContextKeyValueContext().getAll();
-        } catch (Exception e) {
-            logger.error(String.format("Failed to getAllByType contextID(%s)",
-                    contextID.getContextId()), e);
-        }
-        return null;
-    }
-
-    @Override
-    public List<ContextKeyValue> getAllByScope(ContextID contextID, ContextScope scope, ContextType csType) {
-        if (null == contextID && null == scope) {
-            return null;
-        }
-        try {
-            ContextIDValue contextIDValue = contextCache.getContextIDValue(contextID);
-            List<ContextKeyValue> valueCSTypeList = contextIDValue.getContextKeyValueContext().getAllValues(csType);
-            if (CollectionUtils.isNotEmpty(valueCSTypeList)){
-                return  valueCSTypeList.stream()
-                        .filter(contextKeyValue -> scope.equals(contextKeyValue.getContextKey().getContextScope()))
-                        .collect(Collectors.toList());
-            }
-        } catch (Exception e) {
-            logger.error(String.format("Failed to getAllByScope contextID(%s) of ContextScope(%s) of csType(%s)",
-                    contextID.getContextId(), scope, csType), e);
-        }
-        return null;
-    }
-
-    @Override
-    public List<ContextKeyValue> getAllByType(ContextID contextID, ContextType csType) {
-        if (null == contextID || StringUtils.isBlank(contextID.getContextId())) {
-            return null;
-        }
-        try {
-            ContextIDValue contextIDValue = contextCache.getContextIDValue(contextID);
-            List<ContextKeyValue> allValues = contextIDValue.getContextKeyValueContext().getAllValues(csType);
-            return allValues;
-        } catch (Exception e) {
-            logger.error(String.format("Failed to getAllByType contextID(%s) of csType(%s)",
-                    contextID.getContextId(), csType), e);
-        }
-        return null;
-    }
-
-    @Override
-    public ContextKeyValue remove(ContextID contextID, ContextKey csKey) {
-        if (null == contextID || csKey == null) {
-            return null;
-        }
-        try {
-            ContextIDValue contextIDValue = contextCache.getContextIDValue(contextID);
-            return contextIDValue.getContextKeyValueContext().remove(csKey);
-        } catch (Exception e) {
-            logger.error(String.format("Failed to remove contextID(%s) of csKey(%s)",
-                    contextID.getContextId(), csKey.getKey()), e);
-        }
-        return null;
-    }
-
-    @Override
-    public void removeAll(ContextID contextID) {
-        if (null == contextID) {
-            return;
-        }
-        try {
-            contextCache.remove(contextID);
-        } catch (Exception e) {
-            logger.error(String.format("Failed to removeAll contextID(%s)", contextID.getContextId()), e);
-        }
-    }
-
-    /**
-     * TODO This method has poor performance and is not implemented now
-     * @param contextID
-     * @param scope
-     * @param csType
-     */
-    @Override
-    public void removeAll(ContextID contextID, ContextScope scope, ContextType csType) {
-
-    }
-
-    @Override
-    public void removeAll(ContextID contextID, ContextType csType) {
-        if (null == contextID) {
-            return;
-        }
-        try {
-            ContextIDValue contextIDValue = contextCache.getContextIDValue(contextID);
-            contextIDValue.getContextKeyValueContext().removeAll(csType);
-        } catch (Exception e) {
-            logger.error(String.format("Failed to removeAll contextID(%s) of csType(%s)", contextID.getContextId(), csType), e);
-        }
-    }
-
-    @Override
-    public void removeByKeyPrefix(ContextID contextID, String preFix) {
-        if (null == contextID || StringUtils.isBlank(preFix)) {
-            return ;
-        }
-        try {
-            ContextIDValue contextIDValue = contextCache.getContextIDValue(contextID);
-            contextIDValue.getContextKeyValueContext().removeByKeyPrefix(preFix);
-        } catch (Exception e) {
-            logger.error(String.format("Failed to removeByKeyPrefix contextID(%s) of key preFix(%s)",
-                    contextID.getContextId(), preFix), e);
-        }
-    }
-
-    @Override
-    public void removeByKeyPrefix(ContextID contextID, String preFix, ContextType csType) {
-        if (null == contextID || StringUtils.isBlank(preFix) || null == csType) {
-            return ;
-        }
-        try {
-            ContextIDValue contextIDValue = contextCache.getContextIDValue(contextID);
-            contextIDValue.getContextKeyValueContext().removeByKeyPrefix(preFix, csType);
-        } catch (Exception e) {
-            logger.error(String.format("Failed to removeByKeyPrefix contextID(%s) of key preFix(%s) and csyTye(%s)",
-                    contextID.getContextId(), preFix, csType.name()), e);
-        }
-    }
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/ContextCache.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/ContextCache.java
deleted file mode 100644
index c036626..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/ContextCache.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.cache;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.csid.ContextIDValue;
-import com.webank.wedatasphere.linkis.cs.contextcache.metric.ContextCacheMetric;
-
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ExecutionException;
-
-/**
- * @author peacewong
- * @date 2020/2/12 16:45
- */
-public interface ContextCache {
-
-    ContextIDValue getContextIDValue(ContextID contextID)  throws CSErrorException;
-
-    void remove(ContextID contextID);
-
-    void put(ContextIDValue contextIDValue) throws CSErrorException;
-
-    Map<String, ContextIDValue> getAllPresent(List<ContextID> contextIDList);
-
-    void refreshAll() throws CSErrorException;
-
-    void putAll(List<ContextIDValue> contextIDValueList) throws CSErrorException;
-
-    ContextIDValue loadContextIDValue(ContextID contextID);
-
-    ContextCacheMetric getContextCacheMetric();
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/DefaultContextCache.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/DefaultContextCache.java
deleted file mode 100644
index ab2eeb1..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/DefaultContextCache.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.cache;
-
-import com.google.common.cache.Cache;
-import com.google.common.cache.CacheBuilder;
-import com.google.common.cache.RemovalListener;
-import com.webank.wedatasphere.linkis.common.listener.Event;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.csid.ContextIDValue;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.csid.ContextIDValueGenerator;
-import com.webank.wedatasphere.linkis.cs.contextcache.metric.ContextCacheMetric;
-import com.webank.wedatasphere.linkis.cs.contextcache.metric.ContextIDMetric;
-import com.webank.wedatasphere.linkis.cs.contextcache.metric.DefaultContextCacheMetric;
-import com.webank.wedatasphere.linkis.cs.listener.CSIDListener;
-import com.webank.wedatasphere.linkis.cs.listener.ListenerBus.ContextAsyncListenerBus;
-import com.webank.wedatasphere.linkis.cs.listener.event.ContextIDEvent;
-import com.webank.wedatasphere.linkis.cs.listener.event.impl.DefaultContextIDEvent;
-import com.webank.wedatasphere.linkis.cs.listener.manager.imp.DefaultContextListenerManager;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.PostConstruct;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-
-import static com.webank.wedatasphere.linkis.cs.listener.event.enumeration.OperateType.*;
-
-/**
- * @author peacewong
- * @date 2020/2/12 17:50
- */
-@Component
-public class DefaultContextCache implements ContextCache , CSIDListener {
-
-    private static final Logger logger = LoggerFactory.getLogger(DefaultContextCache.class);
-
-    ContextAsyncListenerBus listenerBus = DefaultContextListenerManager.getInstance().getContextAsyncListenerBus();
-
-
-    @Autowired
-    private RemovalListener<String, ContextIDValue> contextIDRemoveListener;
-
-    @Autowired
-    private ContextIDValueGenerator contextIDValueGenerator ;
-
-    private Cache<String, ContextIDValue> cache =  null;
-
-    private ContextCacheMetric contextCacheMetric = new DefaultContextCacheMetric();
-
-    @PostConstruct
-    private void init(){
-        this.cache = CacheBuilder.newBuilder().maximumSize(3000)
-                .removalListener(contextIDRemoveListener)
-                .recordStats().build();
-    }
-
-    @Override
-    public ContextIDValue getContextIDValue(ContextID contextID) throws CSErrorException {
-        if(null == contextID || StringUtils.isBlank(contextID.getContextId())) {
-            return null;
-        }
-        try {
-            ContextIDValue contextIDValue = cache.getIfPresent(contextID.getContextId());
-            if (contextIDValue == null){
-                contextIDValue = contextIDValueGenerator.createContextIDValue(contextID);
-                put(contextIDValue);
-                DefaultContextIDEvent defaultContextIDEvent = new DefaultContextIDEvent();
-                defaultContextIDEvent.setContextID(contextID);
-                defaultContextIDEvent.setOperateType(ADD);
-                listenerBus.post(defaultContextIDEvent);
-            }
-            DefaultContextIDEvent defaultContextIDEvent = new DefaultContextIDEvent();
-            defaultContextIDEvent.setContextID(contextID);
-            defaultContextIDEvent.setOperateType(ACCESS);
-            listenerBus.post(defaultContextIDEvent);
-            return contextIDValue;
-        } catch (Exception e){
-            String errorMsg = String.format("Failed to get contextIDValue of ContextID(%s)", contextID.getContextId());
-            logger.error(errorMsg);
-            throw new CSErrorException(97001, errorMsg, e);
-        }
-    }
-
-    @Override
-    public void remove(ContextID contextID) {
-        if ( null != contextID && StringUtils.isNotBlank(contextID.getContextId())){
-            logger.info("From cache to remove contextID:{}", contextID.getContextId());
-            cache.invalidate(contextID.getContextId());
-        }
-    }
-
-    @Override
-    public void put(ContextIDValue contextIDValue) throws CSErrorException {
-
-        if(contextIDValue != null && StringUtils.isNotBlank(contextIDValue.getContextID())){
-            cache.put(contextIDValue.getContextID(), contextIDValue);
-        }
-    }
-
-    @Override
-    public Map<String, ContextIDValue> getAllPresent(List<ContextID> contextIDList) {
-        List<String> contextIDKeys = contextIDList.stream().map(contextID -> {
-            if(StringUtils.isBlank(contextID.getContextId())) {
-                return  null;
-            }
-            return contextID.getContextId();
-        }).filter(StringUtils :: isNotBlank).collect(Collectors.toList());
-        return cache.getAllPresent(contextIDKeys);
-    }
-
-    @Override
-    public void refreshAll() throws CSErrorException {
-        //TODO
-    }
-
-    @Override
-    public void putAll(List<ContextIDValue> contextIDValueList) throws CSErrorException {
-        for (ContextIDValue contextIDValue : contextIDValueList){
-            put(contextIDValue);
-        }
-    }
-
-    @Override
-    public ContextIDValue loadContextIDValue(ContextID contextID) {
-        return null;
-    }
-
-    @Override
-    public ContextCacheMetric getContextCacheMetric() {
-        return this.contextCacheMetric;
-    }
-
-    @Override
-    public void onCSIDAccess(ContextIDEvent contextIDEvent) {
-        ContextID contextID = contextIDEvent.getContextID();
-        try {
-            ContextIDValue contextIDValue = getContextIDValue(contextID);
-            ContextIDMetric contextIDMetric = contextIDValue.getContextIDMetric();
-
-            contextIDMetric.setLastAccessTime(System.currentTimeMillis());
-            contextIDMetric.addCount();
-            getContextCacheMetric().addCount();
-        } catch (CSErrorException e) {
-            logger.error("Failed to deal CSIDAccess event csid is {}", contextID.getContextId());
-        }
-    }
-
-    @Override
-    public void onCSIDADD(ContextIDEvent contextIDEvent) {
-        logger.info("deal contextID ADD event of {}", contextIDEvent.getContextID());
-        getContextCacheMetric().addCount();
-        getContextCacheMetric().setCachedCount(getContextCacheMetric().getCachedCount() + 1);
-        logger.info("Now, The cachedCount is (%d)", getContextCacheMetric().getCachedCount());
-    }
-
-    @Override
-    public void onCSIDRemoved(ContextIDEvent contextIDEvent) {
-        logger.info("deal contextID remove event of {}", contextIDEvent.getContextID());
-        getContextCacheMetric().setCachedCount(getContextCacheMetric().getCachedCount() - 1);
-        logger.info("Now, The cachedCount is (%d)", getContextCacheMetric().getCachedCount());
-    }
-
-    @Override
-    public void onEventError( Event event,  Throwable t) {
-        logger.error("Failed to deal event", t);
-    }
-
-    @Override
-    public void onEvent(Event event) {
-        DefaultContextIDEvent defaultContextIDEvent = null;
-        if (event != null && event instanceof DefaultContextIDEvent){
-            defaultContextIDEvent = (DefaultContextIDEvent) event;
-        }
-        if (null == defaultContextIDEvent) {
-            return;
-        }
-        if (ADD.equals(defaultContextIDEvent.getOperateType())){
-           onCSIDADD(defaultContextIDEvent);
-        } else if (DELETE.equals(defaultContextIDEvent.getOperateType())) {
-            onCSIDRemoved(defaultContextIDEvent);
-        } else {
-            onCSIDAccess(defaultContextIDEvent);
-        }
-    }
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/csid/ContextIDValue.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/csid/ContextIDValue.java
deleted file mode 100644
index f149e5b..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/csid/ContextIDValue.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.cache.csid;
-
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.cskey.ContextKeyValueContext;
-import com.webank.wedatasphere.linkis.cs.contextcache.metric.ContextIDMetric;
-
-/**
- * @author peacewong
- * @date 2020/2/12 16:59
- */
-public interface ContextIDValue {
-
-    String getContextID();
-
-    ContextKeyValueContext getContextKeyValueContext();
-
-    void  refresh();
-
-    ContextIDMetric getContextIDMetric();
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/csid/ContextIDValueGenerator.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/csid/ContextIDValueGenerator.java
deleted file mode 100644
index ed50f7d..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/csid/ContextIDValueGenerator.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.cache.csid;
-
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-
-/**
- * @author peacewong
- * @date 2020/2/13 14:47
- */
-public interface ContextIDValueGenerator {
-
-    ContextIDValue createContextIDValue(ContextID contextID) throws CSErrorException;
-
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/csid/impl/ContextIDValueGeneratorImpl.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/csid/impl/ContextIDValueGeneratorImpl.java
deleted file mode 100644
index 3ffcd8f..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/csid/impl/ContextIDValueGeneratorImpl.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.cache.csid.impl;
-
-import com.webank.wedatasphere.linkis.common.exception.FatalException;
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.ContextIDListenerDomain;
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.ContextKeyListenerDomain;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.csid.ContextIDValue;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.csid.ContextIDValueGenerator;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.cskey.ContextKeyValueContext;
-import com.webank.wedatasphere.linkis.cs.listener.callback.imp.DefaultContextIDCallbackEngine;
-import com.webank.wedatasphere.linkis.cs.listener.callback.imp.DefaultContextKeyCallbackEngine;
-import com.webank.wedatasphere.linkis.cs.listener.manager.imp.DefaultContextListenerManager;
-import com.webank.wedatasphere.linkis.cs.persistence.ContextPersistenceManager;
-import com.webank.wedatasphere.linkis.cs.persistence.persistence.ContextIDListenerPersistence;
-import com.webank.wedatasphere.linkis.cs.persistence.persistence.ContextKeyListenerPersistence;
-import com.webank.wedatasphere.linkis.cs.persistence.persistence.ContextMapPersistence;
-import org.apache.commons.collections.CollectionUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Lookup;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.PostConstruct;
-import java.util.List;
-
-/**
- * @author peacewong
- * @date 2020/2/13 14:52
- */
-@Component
-public abstract class ContextIDValueGeneratorImpl implements ContextIDValueGenerator {
-
-    private static final Logger logger = LoggerFactory.getLogger(ContextIDValueGeneratorImpl.class);
-
-
-    @Lookup
-    protected abstract ContextKeyValueContext getContextKeyValueContext();
-
-    @Autowired
-    private ContextPersistenceManager contextPersistenceManager;
-
-
-    private ContextMapPersistence contextMapPersistence;
-
-    private ContextIDListenerPersistence contextIDListenerPersistence;
-
-    private ContextKeyListenerPersistence contextKeyListenerPersistence;
-
-    private DefaultContextIDCallbackEngine contextIDCallbackEngine;
-
-    private DefaultContextKeyCallbackEngine contextKeyCallbackEngine;
-
-    @PostConstruct
-    void init() throws FatalException{
-        try {
-            this.contextIDCallbackEngine = DefaultContextListenerManager.getInstance().getContextIDCallbackEngine();
-            this.contextKeyCallbackEngine = DefaultContextListenerManager.getInstance().getContextKeyCallbackEngine();
-            this.contextMapPersistence = contextPersistenceManager.getContextMapPersistence();
-            this.contextIDListenerPersistence = contextPersistenceManager.getContextIDListenerPersistence();
-            this.contextKeyListenerPersistence = contextPersistenceManager.getContextKeyListenerPersistence();
-        } catch (Exception e) {
-            throw new FatalException(97001, "Failed to get proxy of contextMapPersistence");
-        }
-    }
-
-
-    @Override
-    public ContextIDValue createContextIDValue(ContextID contextID) throws CSErrorException {
-        logger.info("Start to createContextIDValue of ContextID({}) ", contextID.getContextId());
-
-        if (contextMapPersistence == null ) {
-            throw new CSErrorException(97001, "Failed to get proxy of contextMapPersistence");
-        }
-
-        List<ContextKeyValue> contextKeyValueList = contextMapPersistence.getAll(contextID);
-
-        ContextKeyValueContext contextKeyValueContext = getContextKeyValueContext();
-        contextKeyValueContext.setContextID(contextID);
-        contextKeyValueContext.putAll(contextKeyValueList);
-
-
-        try {
-            logger.info("For contextID({}) register contextKeyListener", contextID.getContextId());
-            List<ContextKeyListenerDomain> contextKeyListenerPersistenceAll = this.contextKeyListenerPersistence.getAll(contextID);
-            if (CollectionUtils.isNotEmpty(contextKeyListenerPersistenceAll)){
-                for (ContextKeyListenerDomain contextKeyListenerDomain : contextKeyListenerPersistenceAll){
-                    this.contextKeyCallbackEngine.registerClient(contextKeyListenerDomain);
-                }
-            }
-            logger.info("For contextID({}) register contextIDListener", contextID.getContextId());
-            List<ContextIDListenerDomain> contextIDListenerPersistenceAll = this.contextIDListenerPersistence.getAll(contextID);
-
-            if (CollectionUtils.isNotEmpty(contextIDListenerPersistenceAll)){
-                for (ContextIDListenerDomain contextIDListenerDomain : contextIDListenerPersistenceAll){
-                    this.contextIDCallbackEngine.registerClient(contextIDListenerDomain);
-                }
-            }
-        } catch (Throwable e) {
-            logger.error("Failed to register listener: ", e);
-        }
-
-        logger.info("Finished to createContextIDValue of ContextID({}) ", contextID.getContextId());
-        return new ContextIDValueImpl(contextID.getContextId(), contextKeyValueContext);
-    }
-
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/csid/impl/ContextIDValueImpl.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/csid/impl/ContextIDValueImpl.java
deleted file mode 100644
index 7c271e6..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/csid/impl/ContextIDValueImpl.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.cache.csid.impl;
-
-import com.webank.wedatasphere.linkis.common.listener.Event;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.csid.ContextIDValue;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.cskey.ContextKeyValueContext;
-import com.webank.wedatasphere.linkis.cs.contextcache.metric.ContextIDMetric;
-import com.webank.wedatasphere.linkis.cs.contextcache.metric.DefaultContextIDMetric;
-import com.webank.wedatasphere.linkis.cs.contextcache.metric.SizeEstimator;
-import com.webank.wedatasphere.linkis.cs.listener.CSKeyListener;
-import com.webank.wedatasphere.linkis.cs.listener.event.ContextKeyEvent;
-import com.webank.wedatasphere.linkis.cs.listener.event.enumeration.OperateType;
-import com.webank.wedatasphere.linkis.cs.listener.event.impl.DefaultContextKeyEvent;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import static com.webank.wedatasphere.linkis.cs.listener.event.enumeration.OperateType.*;
-
-/**
- * @author peacewong
- * @date 2020/2/12 20:56
- */
-public class ContextIDValueImpl implements ContextIDValue, CSKeyListener {
-
-    private static final Logger logger = LoggerFactory.getLogger(ContextIDValueImpl.class);
-
-
-    private String contextID;
-
-    private ContextKeyValueContext contextKeyValueContext;
-
-    private ContextIDMetric contextIDMetric = new DefaultContextIDMetric();
-
-    public ContextIDValueImpl() {
-
-    }
-
-    public ContextIDValueImpl(String contextID, ContextKeyValueContext contextKeyValueContext) {
-        this.contextID = contextID;
-        this.contextKeyValueContext = contextKeyValueContext;
-    }
-
-    @Override
-    public String getContextID() {
-        return this.contextID;
-    }
-
-    @Override
-    public ContextKeyValueContext getContextKeyValueContext() {
-        return this.contextKeyValueContext;
-    }
-
-    @Override
-    public void refresh() {
-        //TODO
-    }
-
-    @Override
-    public ContextIDMetric getContextIDMetric() {
-        return this.contextIDMetric;
-    }
-
-
-    @Override
-    public void onEvent(Event event) {
-        DefaultContextKeyEvent defaultContextKeyEvent = null;
-        if (event != null && event instanceof DefaultContextKeyEvent){
-            defaultContextKeyEvent = (DefaultContextKeyEvent) event;
-        }
-        if (null == defaultContextKeyEvent) {
-            return;
-        }
-        if (ACCESS.equals(defaultContextKeyEvent.getOperateType())){
-            onCSKeyAccess(defaultContextKeyEvent);
-        } else {
-            onCSKeyUpdate(defaultContextKeyEvent);
-        }
-    }
-
-    @Override
-    public void onCSKeyUpdate(ContextKeyEvent contextKeyEvent) {
-
-        DefaultContextKeyEvent defaultContextKeyEvent = (DefaultContextKeyEvent) contextKeyEvent;
-        logger.debug("Start to deal csKeyEvent of csID({})", this.contextID);
-        if (ADD == defaultContextKeyEvent.getOperateType()) {
-            Long size = SizeEstimator.estimate(defaultContextKeyEvent.getContextKeyValue());
-            this.contextIDMetric.setMemory(getContextIDMetric().getMemory() + size);
-        } else if (DELETE == defaultContextKeyEvent.getOperateType()) {
-            Long size = SizeEstimator.estimate(defaultContextKeyEvent.getContextKeyValue());
-            this.contextIDMetric.setMemory(getContextIDMetric().getMemory() - size);
-        } else if (REMOVEALL == defaultContextKeyEvent.getOperateType()) {
-            Long size = SizeEstimator.estimate(getContextKeyValueContext());
-            this.contextIDMetric.setMemory(size);
-        } else {
-            long size = SizeEstimator.estimate(defaultContextKeyEvent.getContextKeyValue()) - SizeEstimator.estimate(defaultContextKeyEvent.getOldValue());
-            this.contextIDMetric.setMemory(getContextIDMetric().getMemory() - size);
-        }
-        logger.info("Now, The Memory of ContextID({}) are %d", contextID, getContextIDMetric().getMemory());
-        logger.debug("Finished to deal csKeyEvent of csID({})", this.contextID);
-    }
-
-    @Override
-    public void onCSKeyAccess(ContextKeyEvent contextKeyEvent) {
-       //TODO null
-    }
-
-    @Override
-    public void onEventError( Event event,  Throwable t) {
-        logger.error("Failed to deal event", t);
-    }
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/cskey/ContextKeyValueContext.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/cskey/ContextKeyValueContext.java
deleted file mode 100644
index 67180ab..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/cskey/ContextKeyValueContext.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.cache.cskey;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSWarnException;
-import com.webank.wedatasphere.linkis.cs.contextcache.index.ContextInvertedIndexSet;
-import com.webank.wedatasphere.linkis.cs.contextcache.parser.ContextKeyValueParser;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author peacewong
- * @date 2020/2/12 10:24
- */
-public interface ContextKeyValueContext {
-
-    ContextID getContextID();
-
-    void setContextID(ContextID contextID) throws CSWarnException;
-
-    ContextInvertedIndexSet getContextInvertedIndexSet();
-
-    ContextValueMapSet getContextValueMapSet();
-
-    ContextKeyValueParser getContextKeyValueParser();
-
-    ContextKeyValue put(ContextKeyValue contextKeyValue);
-
-    ContextKeyValue  getContextKeyValue(ContextKey contextKey, ContextType contextType);
-
-    List<ContextKeyValue>  getValues(String keyword, ContextType contextType);
-
-    List<ContextKeyValue>  getValues(List<String> contextKeys, ContextType contextType);
-
-    List<ContextKeyValue>  getAllValues(ContextType contextType);
-
-    List<ContextKeyValue>  getAllLikes(String regex,ContextType contextType);
-
-    List<ContextKeyValue> getAll();
-
-    ContextKeyValue remove(ContextKey contextKey);
-
-    Map<String, ContextKeyValue> removeAll(ContextType contextType);
-
-    Boolean putAll(List<ContextKeyValue> contextKeyValueList);
-
-    void removeByKeyPrefix(String preFix);
-
-    void removeByKeyPrefix(String preFix, ContextType csType);
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/cskey/ContextValueMapSet.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/cskey/ContextValueMapSet.java
deleted file mode 100644
index 91e7512..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/cskey/ContextValueMapSet.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.cache.cskey;
-
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author peacewong
- * @date 2020/2/11 15:20
- */
-public interface ContextValueMapSet {
-
-    Map<String, ContextKeyValue> getContextValueMap(ContextType contextType);
-
-    ContextKeyValue put(ContextKeyValue contextKeyValue);
-
-    ContextKeyValue getByContextKey(ContextKey contextKey, ContextType contextType);
-
-    ContextKeyValue getByContextKey(String contextKey, ContextType contextType);
-
-    List<ContextKeyValue> getByContextKeys(List<String> contextKeys, ContextType contextType);
-
-    List<ContextKeyValue> getAllValuesByType(ContextType contextType);
-
-    List<ContextKeyValue> getAllLikes(String regex, ContextType contextType);
-
-    List<ContextKeyValue> getAll();
-
-    ContextKeyValue remove(String contextKey, ContextType contextType);
-
-    Map<String, ContextKeyValue> removeAll(ContextType contextType);
-
-    List<ContextKey> findByKeyPrefix(String preFix);
-
-    List<ContextKey> findByKeyPrefix(String preFix, ContextType csType);
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/cskey/impl/ContextValueMapSetImpl.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/cskey/impl/ContextValueMapSetImpl.java
deleted file mode 100644
index 4c00aa2..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/cskey/impl/ContextValueMapSetImpl.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.cache.cskey.impl;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.cskey.ContextValueMapSet;
-import com.webank.wedatasphere.linkis.cs.contextcache.index.ContextInvertedIndexSetImpl;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.*;
-
-/**
- * @author peacewong
- * @date 2020/2/11 20:06
- */
-public class ContextValueMapSetImpl implements ContextValueMapSet {
-
-
-    private static final Logger logger = LoggerFactory.getLogger(ContextInvertedIndexSetImpl.class);
-
-    Map<String, Map<String, ContextKeyValue>> contextValueMapSet = new HashMap<>();
-
-    @Override
-    public Map<String, ContextKeyValue> getContextValueMap(ContextType contextType) {
-        if(contextType == null) {
-            contextType = ContextType.METADATA;
-        }
-        String csType = contextType.name();
-        if (!contextValueMapSet.containsKey(csType)) {
-            synchronized (csType.intern()) {
-                if (!contextValueMapSet.containsKey(csType)) {
-                    logger.info("For ContextType({}) init ContextValueMap", csType);
-                    contextValueMapSet.put(csType, new HashMap<String, ContextKeyValue>(16));
-                }
-            }
-        }
-        return contextValueMapSet.get(csType);
-    }
-
-    @Override
-    public ContextKeyValue put(ContextKeyValue contextKeyValue) {
-        if (contextKeyValue.getContextKey() != null
-                && contextKeyValue.getContextValue() != null
-                && StringUtils.isNotBlank(contextKeyValue.getContextKey().getKey())) {
-            return getContextValueMap(contextKeyValue.getContextKey().getContextType()).put(contextKeyValue.getContextKey().getKey(), contextKeyValue);
-        }
-        return null;
-    }
-
-
-    @Override
-    public ContextKeyValue getByContextKey(ContextKey contextKey, ContextType contextType) {
-        if (contextKey != null && StringUtils.isNotBlank(contextKey.getKey())) {
-           return getContextValueMap(contextType).get(contextKey.getKey());
-        }
-        return null;
-    }
-
-    @Override
-    public ContextKeyValue getByContextKey(String contextKey, ContextType contextType) {
-        if (StringUtils.isNotBlank(contextKey)) {
-            return getContextValueMap(contextType).get(contextKey);
-        }
-        return null;
-    }
-
-    @Override
-    public List<ContextKeyValue> getByContextKeys(List<String> contextKeys, ContextType contextType) {
-        if(CollectionUtils.isEmpty(contextKeys)) {
-            return null;
-        }
-        List<ContextKeyValue> contextKeyValueList = new ArrayList<>();
-        for (String contextKey : contextKeys) {
-            ContextKeyValue contextKeyValue = getByContextKey(contextKey, contextType);
-            if (null != contextKeyValue) {
-                contextKeyValueList.add(contextKeyValue);
-            }
-        }
-        return contextKeyValueList;
-    }
-
-    @Override
-    public List<ContextKeyValue> getAllValuesByType(ContextType contextType) {
-        
-        Collection<ContextKeyValue> values = getContextValueMap(contextType).values();
-
-        if (null != values){
-            return new ArrayList<>(values);
-        }
-        return null;
-    }
-
-
-    @Override
-    public List<ContextKeyValue> getAllLikes(String regex, ContextType contextType) {
-        if (StringUtils.isBlank(regex)){
-            return null;
-        }
-        Map<String, ContextKeyValue> contextValueMap = getContextValueMap(contextType);
-        List<ContextKeyValue> contextKeyValueList = new ArrayList<>();
-        Iterator<String> iterator = contextValueMap.keySet().iterator();
-        while (iterator.hasNext()){
-            String key = iterator.next();
-            if(key.matches(regex)){
-                contextKeyValueList.add(contextValueMap.get(key));
-            }
-        }
-        return contextKeyValueList;
-    }
-
-    @Override
-    public List<ContextKeyValue> getAll() {
-        List<ContextKeyValue> contextKeyValueList = new ArrayList<>();
-
-        for (Map<String, ContextKeyValue> contextKeyValueMap : contextValueMapSet.values()){
-            contextKeyValueList.addAll(contextKeyValueMap.values());
-        }
-        return contextKeyValueList;
-    }
-
-
-    @Override
-    public ContextKeyValue remove(String contextKey, ContextType contextType) {
-        if (StringUtils.isNotBlank(contextKey)){
-            return  getContextValueMap(contextType).remove(contextKey);
-        }
-        return null;
-    }
-
-    @Override
-    public Map<String, ContextKeyValue> removeAll(ContextType contextType) {
-        return contextValueMapSet.remove(contextType);
-    }
-
-    @Override
-    public List<ContextKey> findByKeyPrefix(String preFix) {
-        if (StringUtils.isBlank(preFix)){
-            return null;
-        }
-        List<ContextKey> contextKeyValueList = new ArrayList<>();
-        for (Map<String, ContextKeyValue> contextKeyValueMap : contextValueMapSet.values()) {
-            Iterator<String> iterator = contextKeyValueMap.keySet().iterator();
-            while (iterator.hasNext()) {
-                String key = iterator.next();
-                if (key.startsWith(preFix)) {
-                    contextKeyValueList.add(contextKeyValueMap.get(key).getContextKey());
-                }
-            }
-        }
-        return contextKeyValueList;
-    }
-
-    @Override
-    public List<ContextKey> findByKeyPrefix(String preFix, ContextType csType) {
-        if (StringUtils.isBlank(preFix)){
-            return null;
-        }
-        Map<String, ContextKeyValue> contextValueMap = getContextValueMap(csType);
-        List<ContextKey> contextKeyValueList = new ArrayList<>();
-        Iterator<String> iterator = contextValueMap.keySet().iterator();
-        while (iterator.hasNext()){
-            String key = iterator.next();
-            if(key.startsWith(preFix)){
-                contextKeyValueList.add(contextValueMap.get(key).getContextKey());
-            }
-        }
-        return contextKeyValueList;
-    }
-
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/cskey/impl/DefaultContextKeyValueContext.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/cskey/impl/DefaultContextKeyValueContext.java
deleted file mode 100644
index 3dfce39..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/cskey/impl/DefaultContextKeyValueContext.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.cache.cskey.impl;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSWarnException;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.cskey.ContextKeyValueContext;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.cskey.ContextValueMapSet;
-import com.webank.wedatasphere.linkis.cs.contextcache.index.ContextInvertedIndexSet;
-import com.webank.wedatasphere.linkis.cs.contextcache.index.ContextInvertedIndexSetImpl;
-import com.webank.wedatasphere.linkis.cs.contextcache.parser.ContextKeyValueParser;
-import com.webank.wedatasphere.linkis.cs.listener.ListenerBus.ContextAsyncListenerBus;
-import com.webank.wedatasphere.linkis.cs.listener.event.enumeration.OperateType;
-import com.webank.wedatasphere.linkis.cs.listener.event.impl.DefaultContextKeyEvent;
-import com.webank.wedatasphere.linkis.cs.listener.manager.imp.DefaultContextListenerManager;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Scope;
-import org.springframework.stereotype.Component;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * @author peacewong
- * @date 2020/2/12 15:34
- */
-@Component
-@Scope("prototype")
-public class DefaultContextKeyValueContext implements ContextKeyValueContext {
-
-    private static final Logger logger = LoggerFactory.getLogger(DefaultContextKeyValueContext.class);
-
-    ContextInvertedIndexSet contextInvertedIndexSet = new ContextInvertedIndexSetImpl();
-
-    ContextValueMapSet contextValueMapSet = new ContextValueMapSetImpl();
-
-    ContextAsyncListenerBus listenerBus = DefaultContextListenerManager.getInstance().getContextAsyncListenerBus();
-
-    private ContextID contextID;
-
-    @Autowired
-    ContextKeyValueParser contextKeyValueParser ;
-
-    @Override
-    public ContextID getContextID() {
-        return this.contextID;
-    }
-
-    @Override
-    public void setContextID(ContextID contextID) throws CSWarnException {
-        if (this.contextID == null){
-            this.contextID = contextID;
-        } else {
-            logger.error("Do not set contextID repeatedly.The current context is {}", this.contextID.getContextId());
-            throw new CSWarnException(97001, "Do not set contextID repeatedly");
-        }
-
-    }
-
-    @Override
-    public ContextInvertedIndexSet getContextInvertedIndexSet() {
-        return this.contextInvertedIndexSet;
-    }
-
-    @Override
-    public ContextValueMapSet getContextValueMapSet() {
-        return this.contextValueMapSet;
-    }
-
-    @Override
-    public ContextKeyValueParser getContextKeyValueParser() {
-        return this.contextKeyValueParser;
-    }
-
-
-    @Override
-    public ContextKeyValue put(ContextKeyValue contextKeyValue) {
-        ContextKey contextKey = contextKeyValue.getContextKey();
-        if (contextKey == null || StringUtils.isBlank(contextKey.getKey())) {
-            return null;
-        }
-        ContextKeyValue oldValue = getContextValueMapSet().put(contextKeyValue);
-        Set<String> keyWords = getContextKeyValueParser().parse(contextKeyValue);
-
-        getContextInvertedIndexSet().addKeywords(keyWords, contextKey.getKey(), contextKey.getContextType());
-        DefaultContextKeyEvent defaultContextKeyEvent = new DefaultContextKeyEvent();
-        defaultContextKeyEvent.setContextID(contextID);
-        defaultContextKeyEvent.setContextKeyValue(contextKeyValue);
-        defaultContextKeyEvent.setOldValue(oldValue);
-        if (null != oldValue ){
-            defaultContextKeyEvent.setOperateType(OperateType.UPDATE);
-        } else {
-            defaultContextKeyEvent.setOperateType(OperateType.ADD);
-        }
-        listenerBus.post(defaultContextKeyEvent);
-        return oldValue;
-    }
-
-    @Override
-    public ContextKeyValue remove(ContextKey contextKey) {
-        if (contextKey == null || StringUtils.isBlank(contextKey.getKey())) {
-            return null;
-        }
-        ContextKeyValue contextKeyValue = getContextValueMapSet().remove(contextKey.getKey(), contextKey.getContextType());
-        if (null == contextKeyValue){
-            return null;
-        }
-        Set<String> keyWords = getContextKeyValueParser().parse(contextKeyValue);
-        Iterator<String> iterator = keyWords.iterator();
-        ContextInvertedIndexSet contextInvertedIndexSet = getContextInvertedIndexSet();
-        while (iterator.hasNext()) {
-            contextInvertedIndexSet.remove(iterator.next(), contextKey.getKey(), contextKey.getContextType());
-        }
-        logger.info("Succeed to remove contextKey of {}", contextKey.getKey());
-        DefaultContextKeyEvent defaultContextKeyEvent = new DefaultContextKeyEvent();
-        defaultContextKeyEvent.setContextID(contextID);
-        defaultContextKeyEvent.setContextKeyValue(contextKeyValue);
-        defaultContextKeyEvent.setOperateType(OperateType.DELETE);
-        listenerBus.post(defaultContextKeyEvent);
-        return contextKeyValue;
-    }
-
-    @Override
-    public ContextKeyValue getContextKeyValue(ContextKey contextKey, ContextType contextType) {
-        return getContextValueMapSet().getByContextKey(contextKey, contextType);
-    }
-
-
-    @Override
-    public List<ContextKeyValue> getValues(String keyword, ContextType contextType) {
-        List<String> contextKeys = getContextInvertedIndexSet().getContextKeys(keyword, contextType);
-        return getValues(contextKeys, contextType);
-    }
-
-    @Override
-    public List<ContextKeyValue> getValues(List<String> contextKeys, ContextType contextType) {
-        return getContextValueMapSet().getByContextKeys(contextKeys, contextType);
-    }
-
-    @Override
-    public List<ContextKeyValue> getAllValues(ContextType contextType) {
-        return getContextValueMapSet().getAllValuesByType(contextType);
-    }
-
-    @Override
-    public List<ContextKeyValue> getAllLikes(String regex, ContextType contextType) {
-        return getContextValueMapSet().getAllLikes(regex, contextType);
-    }
-
-    @Override
-    public List<ContextKeyValue> getAll() {
-
-        return contextValueMapSet.getAll();
-    }
-
-
-    @Override
-    public Map<String, ContextKeyValue> removeAll(ContextType contextType) {
-
-        DefaultContextKeyEvent defaultContextKeyEvent = new DefaultContextKeyEvent();
-        defaultContextKeyEvent.setContextID(contextID);
-        defaultContextKeyEvent.setOperateType(OperateType.REMOVEALL);
-        listenerBus.post(defaultContextKeyEvent);
-        getContextInvertedIndexSet().removeAll(contextType);
-        logger.warn("ContextID({}) removeAll contextKey of  contextType({})", contextID.getContextId(), contextType.name());
-        return getContextValueMapSet().removeAll(contextType);
-    }
-
-
-
-    @Override
-    public Boolean putAll(List<ContextKeyValue> contextKeyValueList) {
-        for (ContextKeyValue contextKeyValue : contextKeyValueList) {
-            put(contextKeyValue);
-        }
-        return true;
-    }
-
-    @Override
-    public void removeByKeyPrefix(String preFix) {
-        List<ContextKey> removeKeys = getContextValueMapSet().findByKeyPrefix(preFix);
-        if (CollectionUtils.isNotEmpty(removeKeys)){
-            for (ContextKey key : removeKeys){
-                remove(key);
-            }
-            logger.warn("Remove keyValue by key preFix: " + preFix);
-        }
-
-    }
-
-    @Override
-    public void removeByKeyPrefix(String preFix, ContextType csType) {
-        List<ContextKey> removeKeys = getContextValueMapSet().findByKeyPrefix(preFix, csType);
-        if (CollectionUtils.isNotEmpty(removeKeys)){
-            for (ContextKey key : removeKeys){
-                remove(key);
-            }
-            logger.warn("Remove keyValue by key preFix{} and csType{} ", preFix, csType);
-        }
-    }
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/guava/ContextIDCacheLoader.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/guava/ContextIDCacheLoader.java
deleted file mode 100644
index d081e57..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/guava/ContextIDCacheLoader.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/*
-package com.webank.wedatasphere.linkis.cs.contextcache.cache.guava;
-
-import com.google.common.cache.CacheLoader;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.csid.ContextIDValue;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.csid.ContextIDValueGenerator;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-@Component
-public class ContextIDCacheLoader extends CacheLoader<String, ContextIDValue> {
-
-    private static final Logger logger = LoggerFactory.getLogger(ContextIDCacheLoader.class);
-
-    @Autowired
-    private ContextIDValueGenerator contextIDValueGenerator;
-    
-    @Override
-    public ContextIDValue load(String contextID) throws Exception {
-        logger.info("Start to load contextID:{}", contextID);
-        ContextIDValue contextIDValue = contextIDValueGenerator.createContextIDValue(contextID);
-
-        logger.info("Finished to load contextID:{}", contextID);
-        return contextIDValue;
-    }
-}
-*/
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/guava/ContextIDRemoveListener.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/guava/ContextIDRemoveListener.java
deleted file mode 100644
index d6889b3..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cache/guava/ContextIDRemoveListener.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.cache.guava;
-
-import com.google.common.cache.RemovalListener;
-import com.google.common.cache.RemovalNotification;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.csid.ContextIDValue;
-import com.webank.wedatasphere.linkis.cs.listener.ListenerBus.ContextAsyncListenerBus;
-import com.webank.wedatasphere.linkis.cs.listener.event.impl.DefaultContextIDEvent;
-import com.webank.wedatasphere.linkis.cs.listener.manager.imp.DefaultContextListenerManager;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Component;
-
-import static com.webank.wedatasphere.linkis.cs.listener.event.enumeration.OperateType.ACCESS;
-
-@Component
-public class ContextIDRemoveListener implements RemovalListener<String, ContextIDValue> {
-
-    private static final Logger logger = LoggerFactory.getLogger(ContextIDRemoveListener.class);
-
-
-    ContextAsyncListenerBus listenerBus = DefaultContextListenerManager.getInstance().getContextAsyncListenerBus();
-
-
-    @Override
-    public void onRemoval(RemovalNotification<String, ContextIDValue> removalNotification) {
-        ContextIDValue value = removalNotification.getValue();
-        String contextIDStr = removalNotification.getKey();
-        if (StringUtils.isBlank(contextIDStr) || null == value || null == value.getContextID() ){
-            return;
-        }
-        logger.info("Start to remove ContextID({}) from cache", contextIDStr);
-        DefaultContextIDEvent defaultContextIDEvent = new DefaultContextIDEvent();
-        defaultContextIDEvent.setContextID(value.getContextKeyValueContext().getContextID());
-        defaultContextIDEvent.setOperateType(ACCESS);
-        listenerBus.post(defaultContextIDEvent);
-        logger.info("Finished to remove ContextID({}) from cache", contextIDStr);
-    }
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cleaner/AUTOCleaner.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cleaner/AUTOCleaner.java
deleted file mode 100644
index c6de1c0..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/cleaner/AUTOCleaner.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.cleaner;
-
-/**
- * @author peacewong
- * @date 2020/2/15 11:44
- */
-public interface AUTOCleaner {
-
-    void  triggerCleanup();
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/conf/ContextCacheConf.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/conf/ContextCacheConf.java
deleted file mode 100644
index 52418ce..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/conf/ContextCacheConf.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.conf;
-
-import com.webank.wedatasphere.linkis.common.conf.CommonVars;
-
-/**
- * @author peacewong
- * @date 2020/2/9 17:04
- */
-public class ContextCacheConf {
-
-    public final static String KEYWORD_SCAN_PACKAGE = CommonVars.apply("wds.linkis.cs.keyword.scan.package","com.webank.wedatasphere.linkis.cs").getValue();
-    public final static String KEYWORD_SPLIT = CommonVars.apply("wds.linkis.cs.keyword.split",",").getValue();
-
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/index/ContextInvertedIndex.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/index/ContextInvertedIndex.java
deleted file mode 100644
index 0a30f95..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/index/ContextInvertedIndex.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.index;
-
-import java.util.List;
-
-/**
- * @author peacewong
- * @date 2020/2/10 9:42
- */
-public interface ContextInvertedIndex {
-
-    List<String> getContextKeys(String keyword);
-
-    boolean addValue(String keyword, String contextKey);
-
-    List<String> getContextKeys(List<String> keywords);
-
-    boolean remove(String keyword, String contextKey);
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/index/ContextInvertedIndexSet.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/index/ContextInvertedIndexSet.java
deleted file mode 100644
index 594ae65..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/index/ContextInvertedIndexSet.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.index;
-
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-
-import java.util.List;
-import java.util.Set;
-
-/**
- * @author peacewong
- * @date 2020/2/10 17:27
- */
-public interface ContextInvertedIndexSet {
-
-    ContextInvertedIndex getContextInvertedIndex(ContextType contextType);
-
-    boolean addValue(String keyword, ContextKey contextKey);
-
-    boolean addValue(String keyword, String contextKey, ContextType contextType);
-
-    boolean addKeywords(Set<String> keywords, String contextKey, ContextType contextType);
-
-    List<String> getContextKeys(String keyword, ContextType contextType);
-
-    boolean remove(String keyword, String contextKey, ContextType contextType);
-
-    ContextInvertedIndex removeAll(ContextType contextType);
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/index/ContextInvertedIndexSetImpl.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/index/ContextInvertedIndexSetImpl.java
deleted file mode 100644
index c31acbf..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/index/ContextInvertedIndexSetImpl.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.index;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.*;
-
-/**
- * @author peacewong
- * @date 2020/2/10 19:54
- */
-public class ContextInvertedIndexSetImpl  implements ContextInvertedIndexSet{
-
-    private static final Logger logger = LoggerFactory.getLogger(ContextInvertedIndexSetImpl.class);
-
-    private Map<String, ContextInvertedIndex> invertedIndexMap = new HashMap<>();
-
-    @Override
-    public ContextInvertedIndex getContextInvertedIndex(ContextType contextType) {
-        String csType = contextType.name();
-        if (! invertedIndexMap.containsKey(csType)){
-            synchronized (csType.intern()){
-                if (! invertedIndexMap.containsKey(csType)){
-                    logger.info("For ContextType({}) init invertedIndex", csType);
-                    invertedIndexMap.put(csType, new DefaultContextInvertedIndex());
-                }
-            }
-        }
-       return invertedIndexMap.get(csType);
-    }
-
-    @Override
-    public boolean addValue(String keyword, ContextKey contextKey) {
-        return addValue(keyword, contextKey.getKey(), contextKey.getContextType());
-    }
-
-    @Override
-    public boolean addValue(String keyword, String contextKey, ContextType contextType) {
-        return  getContextInvertedIndex(contextType).addValue(keyword, contextKey);
-    }
-
-    @Override
-    public boolean addKeywords(Set<String> keywords, String contextKey, ContextType contextType) {
-        Iterator<String> iterator = keywords.iterator();
-        while (iterator.hasNext()){
-            addValue(iterator.next(), contextKey, contextType);
-        }
-        return true;
-    }
-
-    @Override
-    public List<String> getContextKeys(String keyword, ContextType contextType) {
-        return getContextInvertedIndex(contextType).getContextKeys(keyword);
-    }
-
-    @Override
-    public boolean remove(String keyword, String contextKey, ContextType contextType) {
-        return getContextInvertedIndex(contextType).remove(keyword, contextKey);
-    }
-
-    @Override
-    public ContextInvertedIndex removeAll(ContextType contextType) {
-        return invertedIndexMap.remove(contextType.name());
-    }
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/index/DefaultContextInvertedIndex.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/index/DefaultContextInvertedIndex.java
deleted file mode 100644
index 6c708a1..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/index/DefaultContextInvertedIndex.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.index;
-
-import com.google.common.collect.HashMultimap;
-import com.google.common.collect.Multimap;
-import org.apache.commons.collections.CollectionUtils;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-/**
- * @author peacewong
- * @date 2020/2/10 9:45
- */
-public class DefaultContextInvertedIndex implements ContextInvertedIndex {
-
-    /**
-     *  TODO Added ContextKey scoring feature
-     */
-    Multimap<String, String> indexMultimap = HashMultimap.create();
-
-    @Override
-    public List<String> getContextKeys(String keyword) {
-        Collection<String> keywords = indexMultimap.get(keyword);
-        return new ArrayList<String>(keywords);
-    }
-
-    @Override
-    public boolean addValue(String keyword, String contextKey) {
-       return indexMultimap.put(keyword, contextKey);
-    }
-
-    @Override
-    public List<String> getContextKeys(List<String> keywords) {
-        if(CollectionUtils.isEmpty(keywords)) {
-            return null;
-        }
-        List<String> contextKeys = new ArrayList<>();
-        for(String keyword:keywords){
-            contextKeys.addAll(getContextKeys(keyword));
-        }
-        return contextKeys;
-    }
-
-    @Override
-    public boolean remove(String keyword, String contextKey) {
-        return indexMultimap.remove(keyword, contextKey);
-    }
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/metric/ClassIntrospector.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/metric/ClassIntrospector.java
deleted file mode 100644
index c53901d..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/metric/ClassIntrospector.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.metric;
-
-
-import java.lang.reflect.Array;
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.IdentityHashMap;
-import java.util.List;
-import java.util.Map;
-
-import sun.misc.Unsafe;
-
-/**
- * @author peacewong
- * @date 2020/2/16 14:41
- */
-public class ClassIntrospector {
-
-    private static final Unsafe unsafe;
-    /**
-     * Size of any Object reference
-     */
-    private static final int objectRefSize;
-
-    static {
-        try {
-            Field field = Unsafe.class.getDeclaredField("theUnsafe");
-            field.setAccessible(true);
-            unsafe = (Unsafe) field.get(null);
-
-            // 可以通过Object[]数组得到oop指针究竟是压缩后的4个字节还是未压缩的8个字节
-            objectRefSize = unsafe.arrayIndexScale(Object[].class);
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
-     * Sizes of all primitive values
-     */
-    private static final Map<Class<?>, Integer> primitiveSizes;
-
-    static {
-        primitiveSizes = new HashMap<Class<?>, Integer>(10);
-        primitiveSizes.put(byte.class, 1);
-        primitiveSizes.put(char.class, 2);
-        primitiveSizes.put(int.class, 4);
-        primitiveSizes.put(long.class, 8);
-        primitiveSizes.put(float.class, 4);
-        primitiveSizes.put(double.class, 8);
-        primitiveSizes.put(boolean.class, 1);
-    }
-
-    /**
-     * Get object information for any Java object. Do not pass primitives to
-     * this method because they will boxed and the information you will get will
-     * be related to a boxed version of your value.
-     *
-     * @param obj Object to introspect
-     * @return Object info
-     * @throws IllegalAccessException
-     */
-    public ObjectInfo introspect(final Object obj)
-            throws IllegalAccessException {
-        try {
-            return introspect(obj, null);
-        } finally { // clean visited cache before returning in order to make
-            // this object reusable
-            m_visited.clear();
-        }
-    }
-
-    // we need to keep track of already visited objects in order to support
-    // cycles in the object graphs
-    private IdentityHashMap<Object, Boolean> m_visited = new IdentityHashMap<Object, Boolean>(
-            100);
-
-    private ObjectInfo introspect(final Object obj, final Field fld)
-            throws IllegalAccessException {
-        // use Field type only if the field contains null. In this case we will
-        // at least know what's expected to be
-        // stored in this field. Otherwise, if a field has interface type, we
-        // won't see what's really stored in it.
-        // Besides, we should be careful about primitives, because they are
-        // passed as boxed values in this method
-        // (first arg is object) - for them we should still rely on the field
-        // type.
-        boolean isPrimitive = fld != null && fld.getType().isPrimitive();
-        boolean isRecursive = false; // will be set to true if we have already
-        // seen this object
-        if (!isPrimitive) {
-            if (m_visited.containsKey(obj)) {
-                isRecursive = true;
-            }
-            m_visited.put(obj, true);
-        }
-
-        final Class<?> type = (fld == null || (obj != null && !isPrimitive)) ? obj
-                .getClass() : fld.getType();
-        int arraySize = 0;
-        int baseOffset = 0;
-        int indexScale = 0;
-        if (type.isArray() && obj != null) {
-            baseOffset = unsafe.arrayBaseOffset(type);
-            indexScale = unsafe.arrayIndexScale(type);
-            arraySize = baseOffset + indexScale * Array.getLength(obj);
-        }
-
-        final ObjectInfo root;
-        if (fld == null) {
-            root = new ObjectInfo("", type.getCanonicalName(), getContents(obj,
-                    type), 0, getShallowSize(type), arraySize, baseOffset,
-                    indexScale);
-        } else {
-            final int offset = (int) unsafe.objectFieldOffset(fld);
-            root = new ObjectInfo(fld.getName(), type.getCanonicalName(),
-                    getContents(obj, type), offset, getShallowSize(type),
-                    arraySize, baseOffset, indexScale);
-        }
-
-        if (!isRecursive && obj != null) {
-            if (isObjectArray(type)) {
-                // introspect object arrays
-                final Object[] ar = (Object[]) obj;
-                for (final Object item : ar) {
-                    if (item != null) {
-                        root.addChild(introspect(item, null));
-                    }
-                }
-            } else {
-                for (final Field field : getAllFields(type)) {
-                    if ((field.getModifiers() & Modifier.STATIC) != 0) {
-                        continue;
-                    }
-                    field.setAccessible(true);
-                    root.addChild(introspect(field.get(obj), field));
-                }
-            }
-        }
-
-        root.sort(); // sort by offset
-        return root;
-    }
-
-    // get all fields for this class, including all superclasses fields
-    private static List<Field> getAllFields(final Class<?> type) {
-        if (type.isPrimitive()) {
-            return Collections.emptyList();
-        }
-        Class<?> cur = type;
-        final List<Field> res = new ArrayList<Field>(10);
-        while (true) {
-            Collections.addAll(res, cur.getDeclaredFields());
-            if (cur == Object.class) {
-                break;
-            }
-            cur = cur.getSuperclass();
-        }
-        return res;
-    }
-
-    // check if it is an array of objects. I suspect there must be a more
-    // API-friendly way to make this check.
-    private static boolean isObjectArray(final Class<?> type) {
-        if (!type.isArray()) {
-            return false;
-        }
-        if (type == byte[].class || type == boolean[].class
-                || type == char[].class || type == short[].class
-                || type == int[].class || type == long[].class
-                || type == float[].class || type == double[].class) {
-            return false;
-        }
-        return true;
-    }
-
-    // advanced toString logic
-    private static String getContents(final Object val, final Class<?> type) {
-        if (val == null) {
-            return "null";
-        }
-        if (type.isArray()) {
-            if (type == byte[].class)
-                return Arrays.toString((byte[]) val);
-            else if (type == boolean[].class)
-                return Arrays.toString((boolean[]) val);
-            else if (type == char[].class)
-                return Arrays.toString((char[]) val);
-            else if (type == short[].class)
-                return Arrays.toString((short[]) val);
-            else if (type == int[].class)
-                return Arrays.toString((int[]) val);
-            else if (type == long[].class)
-                return Arrays.toString((long[]) val);
-            else if (type == float[].class)
-                return Arrays.toString((float[]) val);
-            else if (type == double[].class)
-                return Arrays.toString((double[]) val);
-            else
-                return Arrays.toString((Object[]) val);
-        }
-        return val.toString();
-    }
-
-    // obtain a shallow size of a field of given class (primitive or object
-    // reference size)
-    private static int getShallowSize(final Class<?> type) {
-        if (type.isPrimitive()) {
-            final Integer res = primitiveSizes.get(type);
-            return res != null ? res : 0;
-        } else {
-            return objectRefSize;
-        }
-    }
-}
\ No newline at end of file
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/metric/ContextCacheMetric.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/metric/ContextCacheMetric.java
deleted file mode 100644
index 32edcee..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/metric/ContextCacheMetric.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.metric;
-
-/**
- * @author peacewong
- * @date 2020/2/14 15:17
- */
-public interface ContextCacheMetric extends Metrtic {
-
-    int getUsedCount();
-
-    void addCount();
-
-
-    int getCachedCount();
-
-    void setCachedCount(int count);
-
-    long getCachedMemory();
-
-    void setCachedMemory(long memory);
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/metric/ContextIDMetric.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/metric/ContextIDMetric.java
deleted file mode 100644
index 0ae24c2..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/metric/ContextIDMetric.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.metric;
-
-/**
- * @author peacewong
- * @date 2020/2/12 17:01
- */
-public interface ContextIDMetric extends Metrtic{
-
-    int getUsedCount();
-
-    void addCount();
-
-    long getMemory();
-
-    void setMemory(long memory);
-
-    long getCachedTime();
-
-    long getLastAccessTime();
-
-    void setLastAccessTime(long accessTime);
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/metric/DefaultContextCacheMetric.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/metric/DefaultContextCacheMetric.java
deleted file mode 100644
index ebf42d6..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/metric/DefaultContextCacheMetric.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.metric;
-
-/**
- * @author peacewong
- * @date 2020/2/16 19:15
- */
-public class DefaultContextCacheMetric implements ContextCacheMetric {
-
-    private int usedCount;
-
-    private int cachedCount;
-
-    private long memory;
-
-
-    @Override
-    public int getUsedCount() {
-        return this.usedCount;
-    }
-
-    @Override
-    public void addCount() {
-        this.usedCount++ ;
-    }
-
-    @Override
-    public int getCachedCount() {
-        return this.cachedCount;
-    }
-
-    @Override
-    public void setCachedCount(int count) {
-        if (count < 0) {
-            count =0;
-        }
-        this.cachedCount = count;
-    }
-
-    @Override
-    public long getCachedMemory() {
-        return this.memory;
-    }
-
-    @Override
-    public void setCachedMemory(long memory) {
-        if (memory < 0){
-            memory = 0;
-        }
-        this.memory = memory;
-    }
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/metric/DefaultContextIDMetric.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/metric/DefaultContextIDMetric.java
deleted file mode 100644
index 84eb113..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/metric/DefaultContextIDMetric.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.metric;
-
-/**
- * @author peacewong
- * @date 2020/2/15 16:19
- */
-public class DefaultContextIDMetric implements ContextIDMetric {
-
-    private int usedCount;
-
-    private long memory;
-
-    private long cachedTime = System.currentTimeMillis();
-
-    private long accessTime = System.currentTimeMillis();
-
-    @Override
-    public int getUsedCount() {
-        return this.usedCount;
-    }
-
-    @Override
-    public void addCount() {
-        this.usedCount++;
-    }
-
-    @Override
-    public long getMemory() {
-        return this.memory;
-    }
-
-    @Override
-    public void setMemory(long memory) {
-        if (memory < 0) {
-            memory = 0;
-        }
-        this.memory = memory;
-    }
-
-    @Override
-    public long getCachedTime() {
-        return this.cachedTime;
-    }
-
-    @Override
-    public long getLastAccessTime() {
-        return this.accessTime;
-    }
-
-    @Override
-    public void setLastAccessTime(long accessTime) {
-        this.accessTime = accessTime;
-    }
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/metric/Metrtic.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/metric/Metrtic.java
deleted file mode 100644
index 832e973..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/metric/Metrtic.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.metric;
-
-/**
- * @author peacewong
- * @date 2020/2/14 15:17
- */
-public interface Metrtic {
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/metric/ObjectInfo.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/metric/ObjectInfo.java
deleted file mode 100644
index ac703ec..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/metric/ObjectInfo.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.metric;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-/**
- * @author peacewong
- * @date 2020/2/16 14:37
- */
-public class ObjectInfo {
-
-    /** Field name */
-    public final String name;
-    /** Field type name */
-    public final String type;
-    /** Field data formatted as string */
-    public final String contents;
-    /** Field offset from the start of parent object */
-    public final int offset;
-    /** Memory occupied by this field */
-    public final int length;
-    /** Offset of the first cell in the array */
-    public final int arrayBase;
-    /** Size of a cell in the array */
-    public final int arrayElementSize;
-    /** Memory occupied by underlying array (shallow), if this is array type */
-    public final int arraySize;
-    /** This object fields */
-    public final List<ObjectInfo> children;
-
-    public ObjectInfo(String name, String type, String contents, int offset, int length, int arraySize,
-                      int arrayBase, int arrayElementSize)
-    {
-        this.name = name;
-        this.type = type;
-        this.contents = contents;
-        this.offset = offset;
-        this.length = length;
-        this.arraySize = arraySize;
-        this.arrayBase = arrayBase;
-        this.arrayElementSize = arrayElementSize;
-        children = new ArrayList<ObjectInfo>( 1 );
-    }
-
-    public void addChild( final ObjectInfo info )
-    {
-        if ( info != null ) {
-            children.add( info );
-        }
-    }
-
-    /**
-     * Get the full amount of memory occupied by a given object. This value may be slightly less than
-     * an actual value because we don't worry about memory alignment - possible padding after the last object field.
-     *
-     * The result is equal to the last field offset + last field length + all array sizes + all child objects deep sizes
-     * @return Deep object size
-     */
-    public long getDeepSize()
-    {
-        //return length + arraySize + getUnderlyingSize( arraySize != 0 );
-        return addPaddingSize(arraySize + getUnderlyingSize( arraySize != 0 ));
-    }
-
-    long size = 0;
-
-    private long getUnderlyingSize( final boolean isArray )
-    {
-        //long size = 0;
-        for ( final ObjectInfo child : children ){
-            size += child.arraySize + child.getUnderlyingSize( child.arraySize != 0 );
-        }
-        if ( !isArray && !children.isEmpty() ){
-            int tempSize = children.get( children.size() - 1 ).offset + children.get( children.size() - 1 ).length;
-            size += addPaddingSize(tempSize);
-        }
-
-        return size;
-    }
-
-    private static final class OffsetComparator implements Comparator<ObjectInfo>
-    {
-        @Override
-        public int compare( final ObjectInfo o1, final ObjectInfo o2 )
-        {
-            return o1.offset - o2.offset; //safe because offsets are small non-negative numbers
-        }
-    }
-
-    //sort all children by their offset
-    public void sort()
-    {
-        Collections.sort( children, new OffsetComparator() );
-    }
-
-    @Override
-    public String toString() {
-        final StringBuilder sb = new StringBuilder();
-        toStringHelper( sb, 0 );
-        return sb.toString();
-    }
-
-    private void toStringHelper( final StringBuilder sb, final int depth )
-    {
-        depth( sb, depth ).append("name=").append( name ).append(", type=").append( type )
-                .append( ", contents=").append( contents ).append(", offset=").append( offset )
-                .append(", length=").append( length );
-        if ( arraySize > 0 )
-        {
-            sb.append(", arrayBase=").append( arrayBase );
-            sb.append(", arrayElemSize=").append( arrayElementSize );
-            sb.append( ", arraySize=").append( arraySize );
-        }
-        for ( final ObjectInfo child : children )
-        {
-            sb.append( '\n' );
-            child.toStringHelper(sb, depth + 1);
-        }
-    }
-
-    private StringBuilder depth( final StringBuilder sb, final int depth )
-    {
-        for ( int i = 0; i < depth; ++i ) {
-            sb.append( "\t");
-        }
-        return sb;
-    }
-
-    private long addPaddingSize(long size){
-        if(size % 8 != 0){
-            return (size / 8 + 1) * 8;
-        }
-        return size;
-    }
-
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/metric/SizeEstimator.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/metric/SizeEstimator.java
deleted file mode 100644
index f1ebd11..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/metric/SizeEstimator.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.metric;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author peacewong
- * @date 2020/2/16 15:33
- */
-public class SizeEstimator {
-
-    private static final Logger logger = LoggerFactory.getLogger(SizeEstimator.class);
-
-
-    private static ClassIntrospector classIntrospector = new ClassIntrospector();
-
-    public static Long estimate(Object obj) {
-        try {
-            if (obj == null){
-                return  0L;
-            }
-            ObjectInfo info = classIntrospector.introspect(obj);
-            return info.getDeepSize();
-        } catch (Throwable e) {
-            logger.info("estimate size failed", e);
-        }
-        return 0L;
-    }
-
-}
-
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/parser/ContextKeyValueParser.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/parser/ContextKeyValueParser.java
deleted file mode 100644
index 17460ae..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/parser/ContextKeyValueParser.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.parser;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-
-import java.util.Set;
-
-/**
- * @author peacewong
- * @date 2020/2/9 16:15
- */
-public interface ContextKeyValueParser {
-
-    Set<String> parse(ContextKeyValue contextKeyValue);
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/parser/DefaultContextKeyValueParser.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/parser/DefaultContextKeyValueParser.java
deleted file mode 100644
index 93fd3e2..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/parser/DefaultContextKeyValueParser.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.parser;
-
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.contextcache.conf.ContextCacheConf;
-import com.webank.wedatasphere.linkis.server.BDPJettyServerHelper;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.PostConstruct;
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * @author peacewong
- * @date 2020/2/9 16:19
- */
-@Component
-public class DefaultContextKeyValueParser implements ContextKeyValueParser {
-
-    private static final Logger logger = LoggerFactory.getLogger(DefaultContextKeyValueParser.class);
-
-
-    private ObjectMapper jackson = BDPJettyServerHelper.jacksonJson();
-
-    @PostConstruct
-    private void init() {
-        logger.info("init keyValueParser");
-    }
-
-
-    @Override
-    public Set<String> parse(ContextKeyValue contextKeyValue) {
-        //先解析key
-        Set<String> keywordSet = new HashSet<>();
-        try {
-            if (contextKeyValue != null && contextKeyValue.getContextValue() != null && StringUtils.isNotBlank(contextKeyValue.getContextValue().getKeywords())){
-                String keywordObj = contextKeyValue.getContextValue().getKeywords();
-
-                try {
-                    Set<String> keySet = jackson.readValue(keywordObj, new TypeReference<Set<String>>() {});
-                    keywordSet.addAll(keySet);
-                 } catch (Exception e) {
-                    //TODO Delete later
-                    logger.info("deal Exception", e);
-                    String[] keywords = keywordObj.split(ContextCacheConf.KEYWORD_SPLIT);
-                    for (String keyword: keywords){
-                        keywordSet.add(keyword);
-                    }
-                }
-                //TODO The contextKey default are keyword
-                keywordSet.add(contextKeyValue.getContextKey().getKey());
-            }
-        } catch (Exception e){
-            if (null != contextKeyValue && null != contextKeyValue.getContextKey() && StringUtils.isNotBlank(contextKeyValue.getContextKey().getKey())){
-                logger.error("Failed to parse keywords of " + contextKeyValue.getContextKey().getKey(), e);
-            } else {
-                logger.error("Failed to parse keywords of contextKey", e);
-            }
-
-        }
-        return keywordSet;
-    }
-
-}
diff --git a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/utils/ContextCacheUtils.java b/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/utils/ContextCacheUtils.java
deleted file mode 100644
index bd1f61b..0000000
--- a/contextservice/cs-cache/src/main/java/com/webank/wedatasphere/linkis/cs/contextcache/utils/ContextCacheUtils.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.utils;
-
-import java.util.HashSet;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * @author peacewong
- * @date 2020/2/9 17:31
- */
-public class ContextCacheUtils {
-
-    public static Set<String> getString(String s, String regex) {
-
-        Set<String> keywords = new HashSet<>();
-        Pattern p = Pattern.compile(regex);
-        Matcher m = p.matcher(s);
-        while(m.find()) {
-            keywords.add(m.group());
-
-        }
-        return keywords;
-    }
-}
diff --git a/contextservice/cs-cache/src/test/java/com/webank/wedatasphere/linkis/cs/contextcache/test/csid/TestContextID.java b/contextservice/cs-cache/src/test/java/com/webank/wedatasphere/linkis/cs/contextcache/test/csid/TestContextID.java
deleted file mode 100644
index a2344cd..0000000
--- a/contextservice/cs-cache/src/test/java/com/webank/wedatasphere/linkis/cs/contextcache/test/csid/TestContextID.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.test.csid;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-
-/**
- * @author peacewong
- * @date 2020/2/13 20:41
- */
-public class TestContextID implements ContextID {
-
-    String contextID;
-
-    @Override
-    public String getContextId() {
-        return contextID;
-    }
-
-    @Override
-    public void setContextId(String contextId) {
-        this.contextID = contextId;
-    }
-}
diff --git a/contextservice/cs-cache/src/test/java/com/webank/wedatasphere/linkis/cs/contextcache/test/keyword/TestContextKey.java b/contextservice/cs-cache/src/test/java/com/webank/wedatasphere/linkis/cs/contextcache/test/keyword/TestContextKey.java
deleted file mode 100644
index a52adca..0000000
--- a/contextservice/cs-cache/src/test/java/com/webank/wedatasphere/linkis/cs/contextcache/test/keyword/TestContextKey.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.test.keyword;
-
-import com.webank.wedatasphere.linkis.cs.common.annotation.KeywordMethod;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-
-/**
- * @author peacewong
- * @date 2020/2/13 16:32
- */
-public class TestContextKey implements ContextKey {
-
-    private  String key;
-
-    private String keywords;
-
-    @KeywordMethod
-    @Override
-    public String getKey() {
-        return this.key;
-    }
-
-    @Override
-    public void setKey(String key) {
-        this.key = key;
-    }
-
-    @Override
-    public ContextType getContextType() {
-        return ContextType.METADATA;
-    }
-
-    @Override
-    public void setContextType(ContextType contextType) {
-
-    }
-
-    @Override
-    public ContextScope getContextScope() {
-        return ContextScope.PUBLIC;
-    }
-
-    @Override
-    public void setContextScope(ContextScope contextScope) {
-
-    }
-
-    @KeywordMethod(splitter = ",")
-    @Override
-    public String getKeywords() {
-        return this.keywords;
-    }
-
-    @Override
-    public void setKeywords(String keywords) {
-        this.keywords = keywords;
-    }
-
-    @Override
-    public int getType() {
-        return 0;
-    }
-
-    @Override
-    public void setType(int type) {
-
-    }
-}
diff --git a/contextservice/cs-cache/src/test/java/com/webank/wedatasphere/linkis/cs/contextcache/test/keyword/TestContextKeyValue.java b/contextservice/cs-cache/src/test/java/com/webank/wedatasphere/linkis/cs/contextcache/test/keyword/TestContextKeyValue.java
deleted file mode 100644
index f279ca7..0000000
--- a/contextservice/cs-cache/src/test/java/com/webank/wedatasphere/linkis/cs/contextcache/test/keyword/TestContextKeyValue.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.test.keyword;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextValue;
-
-/**
- * @author peacewong
- * @date 2020/2/13 16:46
- */
-public class TestContextKeyValue  implements ContextKeyValue {
-
-    private ContextKey contextKey;
-
-    private ContextValue contextValue;
-
-    @Override
-    public ContextKey getContextKey() {
-        return this.contextKey;
-    }
-
-    @Override
-    public void setContextKey(ContextKey contextKey) {
-        this.contextKey = contextKey;
-    }
-
-    @Override
-    public ContextValue getContextValue() {
-        return this.contextValue;
-    }
-
-    @Override
-    public void setContextValue(ContextValue contextValue) {
-        this.contextValue = contextValue;
-    }
-}
diff --git a/contextservice/cs-cache/src/test/java/com/webank/wedatasphere/linkis/cs/contextcache/test/keyword/TestContextKeyValueParser.java b/contextservice/cs-cache/src/test/java/com/webank/wedatasphere/linkis/cs/contextcache/test/keyword/TestContextKeyValueParser.java
deleted file mode 100644
index dab52e3..0000000
--- a/contextservice/cs-cache/src/test/java/com/webank/wedatasphere/linkis/cs/contextcache/test/keyword/TestContextKeyValueParser.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.test.keyword;
-
-/**
- * @author peacewong
- * @date 2020/2/13 16:26
- */
-public class TestContextKeyValueParser {
-
-   /* @Test
-    public void testParser() {
-
-        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext("com.webank.wedatasphere.linkis.cs");
-        System.out.println("ioc容器加载完成");
-        ContextKeyValueParser contextKeyValueParser = context.getBean(ContextKeyValueParser.class);
-        ContextKey contextKey1 = new TestContextKey();
-        contextKey1.setKey("key1");
-        contextKey1.setKeywords("keyword1,keyword2,keyword3");
-
-        ContextValue contextValue1 = new TestContextValue();
-        contextValue1.setKeywords("keyword4-keyword5-keyword6");
-        contextValue1.setValue("hello,hello2");
-        ContextKeyValue contextKeyValue1 = new TestContextKeyValue();
-        contextKeyValue1.setContextKey(contextKey1);
-        contextKeyValue1.setContextValue(contextValue1);
-        List<ContextKeyValue> contextKeyValueList = new ArrayList<>();
-        contextKeyValueList.add(contextKeyValue1);
-        Set<String> parse = contextKeyValueParser.parse(contextKeyValue1);
-        parse.stream().forEach(System.out::println);
-    }
-
-    public List<ContextKeyValue> testGetKeyValues(){
-        List<ContextKeyValue> contextKeyValueList = new ArrayList<>();
-        ContextKey contextKey1 = new TestContextKey();
-        contextKey1.setKey("key1");
-        contextKey1.setKeywords("keyword1,keyword2,keyword3");
-
-        ContextValue contextValue1 = new TestContextValue();
-        contextValue1.setKeywords("keyword4-keyword5-keyword6");
-        contextValue1.setValue("hello,hello2");
-        ContextKeyValue contextKeyValue1 = new TestContextKeyValue();
-        contextKeyValue1.setContextKey(contextKey1);
-        contextKeyValue1.setContextValue(contextValue1);
-
-        contextKeyValueList.add(contextKeyValue1);
-
-        ContextKey contextKey2 = new TestContextKey();
-        contextKey2.setKey("key2");
-        contextKey2.setKeywords("keywordd1,keywordd2,keywordd3");
-
-        ContextValue contextValue2 = new TestContextValue();
-        contextValue1.setKeywords("keywordd4-keywordd5-keywordd6");
-        contextValue1.setValue("hello,hello2");
-        ContextKeyValue contextKeyValue2 = new TestContextKeyValue();
-        contextKeyValue1.setContextKey(contextKey2);
-        contextKeyValue1.setContextValue(contextValue2);
-        contextKeyValueList.add(contextKeyValue2);
-        return contextKeyValueList;
-    }*/
-}
diff --git a/contextservice/cs-cache/src/test/java/com/webank/wedatasphere/linkis/cs/contextcache/test/keyword/TestContextValue.java b/contextservice/cs-cache/src/test/java/com/webank/wedatasphere/linkis/cs/contextcache/test/keyword/TestContextValue.java
deleted file mode 100644
index 65e53df..0000000
--- a/contextservice/cs-cache/src/test/java/com/webank/wedatasphere/linkis/cs/contextcache/test/keyword/TestContextValue.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.test.keyword;
-
-import com.webank.wedatasphere.linkis.cs.common.annotation.KeywordMethod;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextValue;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ValueBean;
-
-/**
- * @author peacewong
- * @date 2020/2/13 16:44
- */
-public class TestContextValue  implements ContextValue {
-
-    private  Object value;
-
-    private String keywords;
-
-    @KeywordMethod(splitter = "-")
-    @Override
-    public String getKeywords() {
-        return this.keywords;
-    }
-
-    @Override
-    public void setKeywords(String keywords) {
-        this.keywords = keywords;
-    }
-
-    @KeywordMethod(regex = "hello")
-    @Override
-    public Object getValue() {
-        return this.value;
-    }
-
-    @Override
-    public void setValue(Object value) {
-        this.value = value;
-    }
-}
diff --git a/contextservice/cs-cache/src/test/java/com/webank/wedatasphere/linkis/cs/contextcache/test/service/TestContextCacheService.java b/contextservice/cs-cache/src/test/java/com/webank/wedatasphere/linkis/cs/contextcache/test/service/TestContextCacheService.java
deleted file mode 100644
index 3414c3f..0000000
--- a/contextservice/cs-cache/src/test/java/com/webank/wedatasphere/linkis/cs/contextcache/test/service/TestContextCacheService.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.contextcache.test.service;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextValue;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.contextcache.ContextCacheService;
-import com.webank.wedatasphere.linkis.cs.contextcache.test.csid.TestContextID;
-import com.webank.wedatasphere.linkis.cs.contextcache.test.keyword.TestContextKey;
-import com.webank.wedatasphere.linkis.cs.contextcache.test.keyword.TestContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.contextcache.test.keyword.TestContextValue;
-import org.junit.Before;
-import org.junit.Test;
-import org.springframework.context.annotation.AnnotationConfigApplicationContext;
-
-import java.util.List;
-
-/**
- * @author peacewong
- * @date 2020/2/13 19:58
- */
-public class TestContextCacheService {
-
-    AnnotationConfigApplicationContext context;
-
-    private String contextIDStr = "84693";
-
-    private ContextCacheService contextCacheService;
-
-    @Before
-    public void generateData() throws CSErrorException {
-        context = new AnnotationConfigApplicationContext("com.webank.wedatasphere.linkis.cs","com.webank.wedatasphere.linkis.mybatis");
-        System.out.println("ioc容器加载完成");
-        contextCacheService = context.getBean(ContextCacheService.class);
-       /* ContextPersistenceManager persistenceManager = context.getBean(ContextPersistenceManager.class);
-        persistenceManager.getContextIDPersistence().deleteContextID(contextIDStr);
-        PersistenceContextID persistenceContextID = new PersistenceContextID();
-        persistenceContextID.setContextId(String.valueOf(contextIDStr));
-        persistenceContextID.setUser("johnnwang");
-        persistenceContextID.setExpireTime(new Date());
-        persistenceContextID.setExpireType(ExpireType.TODAY);
-        persistenceContextID.setInstance("updateInstance");
-        persistenceContextID.setBackupInstance("updatebackup");
-        persistenceContextID.setApplication("hive");
-        persistenceManager.getContextIDPersistence().createContextID(persistenceContextID);
-        ContextID contextID = persistenceManager.getContextIDPersistence().getContextID(persistenceContextID.getContextId());
-        System.out.println(contextID.getContextId());
-
-        TestContextKey contextKey = new TestContextKey();
-        contextKey.setContextScope(ContextScope.FRIENDLY);
-        contextKey.setContextType(ContextType.OBJECT);
-        contextKey.setKey("flow1.node1.test");
-        contextKey.setKeywords("flow1,flow2,flow3");
-        TestContextValue contextValue = new TestContextValue();
-        contextValue.setKeywords("test1,test2,test3");
-        contextValue.setValue("test1.flow1");
-        TestContextKeyValue testContextKeyValue = new TestContextKeyValue();
-        testContextKeyValue.setContextKey(contextKey);
-        testContextKeyValue.setContextValue(contextValue);
-        persistenceManager.getContextMapPersistence().create(contextID, testContextKeyValue);*/
-    }
-
-    //@Test
-    public void testGetAll() {
-        try {
-            ContextID contextID = new TestContextID();
-            contextID.setContextId(contextIDStr);
-            List<ContextKeyValue> all = contextCacheService.getAll(contextID);
-            if (null != all){
-                all.stream().forEach(contextKeyValue -> {
-                    System.out.println(contextKeyValue.getContextKey().getKey());
-                    System.out.println(contextKeyValue.getContextValue().getValue());
-                });
-            }
-        } catch (Exception e){
-            e.printStackTrace();
-        }
-
-    }
-
-
-
-   // @Test
-    public void testGet() {
-        ContextID contextID = new TestContextID();
-        contextID.setContextId(contextIDStr);
-        ContextKey contextKey1 = new TestContextKey();
-        contextKey1.setKey("flow1.node1.test");
-        ContextKeyValue contextKeyValue1 = contextCacheService.get(contextID, contextKey1);
-        System.out.println(contextKeyValue1.getContextValue().getValue());
-    }
-
-   // @Test
-    public void testGetValues() {
-        ContextID contextID = new TestContextID();
-        contextID.setContextId(contextIDStr);
-        List<ContextKeyValue> contextKeyValueList = contextCacheService.getValues(contextID, "flow2", ContextType.METADATA);
-        if (null != contextKeyValueList){
-            contextKeyValueList.stream().forEach(contextKeyValue -> {
-                System.out.println(contextKeyValue.getContextKey().getKey());
-            });
-        }
-
-
-    }
-
-   // @Test
-    public void testLike() {
-        ContextID contextID = new TestContextID();
-        contextID.setContextId(contextIDStr);
-        List<ContextKeyValue> contextKeyValueList = contextCacheService.getAllLikes(contextID, ".*node1.*", ContextType.METADATA);
-        if (null != contextKeyValueList){
-            contextKeyValueList.stream().forEach(contextKeyValue -> {
-                System.out.println(contextKeyValue.getContextKey().getKey());
-            });
-        }
-
-
-    }
-
-   // @Before
-    public void testPut() throws CSErrorException {
-
-        ContextID contextID = new TestContextID();
-        contextID.setContextId(contextIDStr);
-        ContextKey contextKey1 = new TestContextKey();
-        contextKey1.setKey("key1");
-        contextKey1.setKeywords("keyword1,keyword2,keyword3");
-        ContextKeyValue contextKeyValue1 = contextCacheService.get(contextID, contextKey1);
-
-        ContextKey contextKey3 = new TestContextKey();
-        contextKey3.setKey("key3");
-        contextKey3.setKeywords("keyworddd1,keyworddd2,keyworddd3");
-
-        ContextValue contextValue3 = new TestContextValue();
-        contextValue3.setKeywords("keyworddd4-keyworddd5-keyworddd6");
-        contextValue3.setValue("hello,hello3");
-        ContextKeyValue contextKeyValue3 = new TestContextKeyValue();
-        contextKeyValue3.setContextKey(contextKey3);
-        contextKeyValue3.setContextValue(contextValue3);
-        contextCacheService.put(contextID, contextKeyValue3);
-
-        ContextKeyValue contextKeyValue4 = contextCacheService.get(contextID, contextKey3);
-        System.out.println(contextKeyValue4.getContextKey().getKey());
-    }
-}
diff --git a/contextservice/cs-cache/src/test/resources/linkis.properties b/contextservice/cs-cache/src/test/resources/linkis.properties
deleted file mode 100644
index ce3f1ee..0000000
--- a/contextservice/cs-cache/src/test/resources/linkis.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-wds.linkis.test.mode=true
-
-wds.linkis.server.mybatis.datasource.url=jdbc:mysql://127.0.0.1:3306/ide_gz_bdap_sit_01?characterEncoding=UTF-8
-wds.linkis.server.mybatis.datasource.username=
-wds.linkis.server.mybatis.datasource.password=
-
-
-wds.linkis.log.clear=true
-wds.linkis.server.version=v1
-
-##restful
-wds.linkis.server.restful.scan.packages=com.webank.wedatasphere.linkis.cs.server.restful
-
-##mybatis
-wds.linkis.server.mybatis.mapperLocations=classpath*:com\\webank\\wedatasphere\\linkis\\cs\\persistence\\dao\\impl\\*.xml
-
-wds.linkis.server.mybatis.typeAliasesPackage=com.webank.wedatasphere.linkis.cs.persistence.entity
-
-wds.linkis.server.mybatis.BasePackage=com.webank.wedatasphere.linkis.cs.persistence.dao
diff --git a/contextservice/cs-cache/src/test/resources/log4j.properties b/contextservice/cs-cache/src/test/resources/log4j.properties
deleted file mode 100644
index a7e6854..0000000
--- a/contextservice/cs-cache/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-### set log levels ###
-
-log4j.rootCategory=INFO,console
-
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.Threshold=INFO
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-#log4j.appender.console.layout.ConversionPattern= %d{ISO8601} %-5p (%t) [%F:%M(%L)] - %m%n
-log4j.appender.console.layout.ConversionPattern= %d{ISO8601} %-5p (%t) %p %c{1} - %m%n
-
-
-log4j.appender.com.webank.bdp.ide.core=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.com.webank.bdp.ide.core.Threshold=INFO
-log4j.additivity.com.webank.bdp.ide.core=false
-log4j.appender.com.webank.bdp.ide.core.layout=org.apache.log4j.PatternLayout
-log4j.appender.com.webank.bdp.ide.core.Append=true
-log4j.appender.com.webank.bdp.ide.core.File=logs/linkis.log
-log4j.appender.com.webank.bdp.ide.core.layout.ConversionPattern= %d{ISO8601} %-5p (%t) [%F:%M(%L)] - %m%n
-
-log4j.logger.org.springframework=INFO
diff --git a/contextservice/cs-cache/src/test/resources/log4j2.xml b/contextservice/cs-cache/src/test/resources/log4j2.xml
deleted file mode 100644
index 2a9e19f..0000000
--- a/contextservice/cs-cache/src/test/resources/log4j2.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Copyright 2019 WeBank
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
--->
-<configuration status="error" monitorInterval="30">
-    <appenders>
-        <Console name="Console" target="SYSTEM_OUT">
-            <ThresholdFilter level="INFO" onMatch="ACCEPT" onMismatch="DENY"/>
-            <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%t] %logger{36} %L %M - %msg%xEx%n"/>
-        </Console>
-        <RollingFile name="RollingFile" fileName="logs/linkis.log"
-                     filePattern="logs/$${date:yyyy-MM}/linkis-log-%d{yyyy-MM-dd}-%i.log">
-            <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5level] [%-40t] %c{1.} (%L) [%M] - %msg%xEx%n"/>
-            <SizeBasedTriggeringPolicy size="100MB"/>
-            <DefaultRolloverStrategy max="20"/>
-        </RollingFile>
-    </appenders>
-    <loggers>
-        <root level="INFO">
-            <appender-ref ref="RollingFile"/>
-            <appender-ref ref="Console"/>
-        </root>
-    </loggers>
-</configuration>
-
diff --git a/contextservice/cs-client/pom.xml b/contextservice/cs-client/pom.xml
deleted file mode 100644
index 820c8df..0000000
--- a/contextservice/cs-client/pom.xml
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>linkis-cs-client</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-common</artifactId>
-            </dependency>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-gateway-httpclient-support</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>com.webank.wedatasphere.linkis</groupId>
-                    <artifactId>linkis-storage</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-httpclient</artifactId>
-            </dependency>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cs-common</artifactId>
-            </dependency>
-
-<!--        <dependency>-->
-<!--            <groupId>com.webank.wedatasphere.linkis</groupId>-->
-<!--            <artifactId>linkis-cs-highavailable</artifactId>-->
-<!--        </dependency>-->
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cs-listener</artifactId>
-            </dependency>
-
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.12</version>
-            <scope>test</scope>
-        </dependency>
-
-
-
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>${basedir}/src/main/resources</directory>
-            </resource>
-        </resources>
-    </build>
-
-</project>
\ No newline at end of file
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/AbstractContextClient.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/AbstractContextClient.java
deleted file mode 100644
index 525d28f..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/AbstractContextClient.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client;
-
-/**
- * created by cooperyang on 2020/2/11
- * Description:
- */
-public abstract class AbstractContextClient implements ContextClient{
-
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/Context.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/Context.java
deleted file mode 100644
index a670924..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/Context.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.cs.client.listener.ContextIDListener;
-import com.webank.wedatasphere.linkis.cs.client.listener.ContextKeyListener;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextValue;
-
-import java.util.List;
-
-
-/**
- * created by cooperyang on 2020/2/10
- * Description:Context是一个接口让用户能够在微服务中进行对一个工作流的Context进行操作
- * 他应该有一个默认的实现,比如LinkisWorkFlowContext
- */
-public interface Context {
-
-    /**
-     * 每一个Context都应该有一个ContextID与之对应d
-     * @return contextID是该Context对应的ContextID
-     */
-    public ContextID getContextID();
-
-    /**
-     * 设置ContextID
-     * @param contextID contextID
-     */
-    public void setContextID(ContextID contextID);
-
-    /**
-     * 通过contextKey来获取对应的contextValue
-     * @param contextKey 是标识一个ContextValue的一个key值,比如资源文件的名称
-     * @return 返回key对应的value, 比如resourceid 和 version
-     */
-    public ContextValue getContextValue(ContextKey contextKey) throws ErrorException;
-
-    /**
-     * 设置contextKeyValue
-     * @param contextKeyAndValue 需要设置的ContextKeyValue
-     * @throws ErrorException  可能由于网络原因出现的
-     */
-
-    public void setContextKeyAndValue(ContextKeyValue contextKeyAndValue) throws ErrorException;
-
-
-
-    public void set(ContextKey contextKey, ContextValue contextValue) throws ErrorException;
-
-    public void setLocal(ContextKey contextKey, ContextValue contextValue);
-
-    public void setLocal(ContextKeyValue contextKeyValue);
-
-    /**
-     * todo 是通过ContextCondition进行搜索
-     * @return
-     */
-    public List<ContextKeyValue> searchContext(List<ContextType> contextTypes,
-                                               List<ContextScope> contextScopes,
-                                               List<String> contains,
-                                               List<String> regex) throws ErrorException;
-
-
-    public void reset(ContextKey contextKey) throws ErrorException;
-
-    public void reset() throws ErrorException;
-
-
-    public void remove(ContextKey contextKey) throws ErrorException;
-
-    public void removeAll()throws ErrorException;
-
-    public void onBind(ContextIDListener contextIDListener) throws ErrorException;
-
-    public void onBind(ContextKey contextKey, ContextKeyListener contextKeyListener) throws ErrorException;
-
-
-
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/ContextClient.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/ContextClient.java
deleted file mode 100644
index 3c3a3be..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/ContextClient.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.cs.client.listener.ContextIDListener;
-import com.webank.wedatasphere.linkis.cs.client.listener.ContextKeyListener;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextValue;
-
-import java.io.Closeable;
-import java.util.List;
-import java.util.Map;
-
-/**
- * created by cooperyang on 2020/2/10
- * Description:
- */
-public interface ContextClient extends Closeable {
-    /**
-     * 通过与cs-server进行交互生成一个工作流的Context
-     * 传入的信息应该有工程名 工作流名
-     * user是传入的用户名
-     * @return 用户可以使用的Context
-     */
-    @Deprecated
-    Context createContext(String projectName, String flowName, String use, Map<String, Object> params) throws ErrorException;
-
-
-    Context createContext(ContextID contextID) throws ErrorException;
-
-
-    /**
-     * 通过ContextID获取
-     * @param contextID
-     * @return
-     * @throws ErrorException
-     */
-    Context getContext(ContextID contextID) throws ErrorException;
-
-    Context getContext(String contextIDStr) throws ErrorException;
-
-    ContextValue getContextValue(ContextID contextID, ContextKey contextKey) throws ErrorException;
-
-
-
-    void update(ContextID contextID, ContextKey contextKey, ContextValue contextValue) throws ErrorException;
-
-
-    /**
-     * 通过contextID和contextKey进行对某一个contextKey进行reset
-     * @param contextID contextId
-     * @param contextKey contexKey
-     * @throws ErrorException 可能捕获的异常
-     */
-    void reset(ContextID contextID, ContextKey contextKey) throws ErrorException;
-
-
-    /**
-     * 将整个contextID所有的contextKey进行reset,这个会用在工作流实时执行之前的一个reset
-     * @param contextID contextID
-     * @throws ErrorException
-     */
-    void reset(ContextID contextID) throws ErrorException;
-
-
-
-
-
-    /**
-     * 删除的操作是为了能够将contextid下面的contextkey进行删除
-     * 如果contextKey是空的话,则全部删除
-     * @param contextID
-     * @param contextKey
-     * @throws ErrorException
-     */
-    void remove(ContextID contextID, ContextKey contextKey) throws ErrorException;
-
-    void setContextKeyValue(ContextID contextID, ContextKeyValue contextKeyValue) throws ErrorException;
-
-    void bindContextIDListener(ContextIDListener contextIDListener) throws ErrorException;
-
-    void bindContextKeyListener(ContextKeyListener contextKeyListener) throws ErrorException;
-
-    /**
-     * 通过各种condition搜索contextkeyValue
-     * @return 一个contextKeyValue数组
-     * @throws ErrorException 可能出现的error
-     */
-    List<ContextKeyValue> search(ContextID contextID, List<ContextType> contextTypes,
-                                 List<ContextScope> contextScopes,
-                                 List<String> contains,
-                                 List<String> regex) throws ErrorException;
-
-    /**
-     * 通过各种condition搜索contextkeyValue
-     * upstreamOnly 表示取跟当前节点上游中查询
-     * nodeName 获取该节点的关系节点
-     * num 获取的节点数量,1 返回最近的一个, 无穷大表示所有节点
-     * @return 一个contextKeyValue数组
-     * @throws ErrorException 可能出现的error
-     */
-    List<ContextKeyValue> search(ContextID contextID, List<ContextType> contextTypes,
-                                 List<ContextScope> contextScopes,
-                                 List<String> contains,
-                                 List<String> regex,
-                                 boolean upstreamOnly,
-                                 String nodeName,
-                                 int num,
-                                 List<Class> contextValueTypes) throws ErrorException;
-
-
-
-    void removeAllValueByKeyPrefixAndContextType(ContextID contextID, ContextType contextType, String keyPrefix) throws  ErrorException;
-
-    void removeAllValueByKeyPrefix(ContextID contextID, String keyPrefix) throws ErrorException;
-
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/LinkisContext.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/LinkisContext.java
deleted file mode 100644
index 8360d7f..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/LinkisContext.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client;
-
-/**
- * created by cooperyang on 2020/2/17
- * Description:
- */
-public abstract class LinkisContext implements Context{
-
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/LinkisWorkFlowContext.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/LinkisWorkFlowContext.java
deleted file mode 100644
index c13169e..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/LinkisWorkFlowContext.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.cs.client.listener.ContextIDListener;
-import com.webank.wedatasphere.linkis.cs.client.listener.ContextKeyListener;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.*;
-
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- * created by cooperyang on 2020/2/17
- * Description:
- */
-public class LinkisWorkFlowContext extends LinkisContext{
-
-    private ContextID contextID;
-
-    private ContextClient contextClient;
-
-    private String user;
-
-
-    private Map<ContextKey, ContextValue> keyValues = new ConcurrentHashMap<>();
-
-    @Override
-    public ContextID getContextID() {
-        return this.contextID;
-    }
-
-    @Override
-    public void setContextID(ContextID contextID) {
-        this.contextID = contextID;
-    }
-
-    public String getUser() {
-        return user;
-    }
-
-    public void setUser(String user) {
-        this.user = user;
-    }
-
-    @Override
-    public ContextValue getContextValue(ContextKey contextKey) throws ErrorException{
-        if(keyValues.containsKey(contextKey)){
-            return keyValues.get(contextKey);
-        }else{
-            return this.contextClient.getContextValue(this.contextID, contextKey);
-        }
-    }
-
-
-    @Override
-    public void setContextKeyAndValue(ContextKeyValue contextKeyValue) throws ErrorException{
-        //todo 这个地方是为了进行一次缓存 不过有待商榷
-        //this.setLocal(contextKeyValue);
-        this.contextClient.setContextKeyValue(this.contextID, contextKeyValue);
-    }
-
-    @Override
-    public void set(ContextKey contextKey, ContextValue contextValue) throws ErrorException{
-        setLocal(contextKey, contextValue);
-        ContextKeyValue contextKeyValue = new CommonContextKeyValue();
-        contextKeyValue.setContextKey(contextKey);
-        contextKeyValue.setContextValue(contextValue);
-        this.setContextKeyAndValue(contextKeyValue);
-    }
-
-
-    @Override
-    public void setLocal(ContextKey contextKey, ContextValue contextValue) {
-        this.keyValues.put(contextKey, contextValue);
-    }
-
-    @Override
-    public void setLocal(ContextKeyValue contextKeyValue) {
-        this.keyValues.put(contextKeyValue.getContextKey(), contextKeyValue.getContextValue());
-    }
-
-    @Override
-    public List<ContextKeyValue> searchContext(List<ContextType> contextTypes,
-                                               List<ContextScope> contextScopes,
-                                               List<String> contains,
-                                               List<String> regex) throws ErrorException {
-        return this.contextClient.search(contextID, contextTypes, contextScopes, contains, regex);
-    }
-
-
-    @Override
-    public void reset(ContextKey contextKey) throws ErrorException{
-        this.contextClient.reset(contextID, contextKey);
-    }
-
-    @Override
-    public void reset() throws ErrorException {
-        this.contextClient.reset(this.contextID);
-    }
-
-    @Override
-    public void remove(ContextKey contextKey) throws ErrorException{
-        this.contextClient.remove(contextID, contextKey);
-    }
-
-    @Override
-    public void removeAll()throws ErrorException {
-        this.contextClient.remove(contextID, null);
-    }
-
-    @Override
-    public void onBind(ContextIDListener contextIDListener) throws ErrorException{
-        contextIDListener.setContextID(this.contextID);
-        contextIDListener.setContext(this);
-        this.contextClient.bindContextIDListener(contextIDListener);
-    }
-
-    @Override
-    public void onBind(ContextKey contextKey, ContextKeyListener contextKeyListener) throws ErrorException {
-        contextKeyListener.setContextKey(contextKey);
-        contextKeyListener.setContext(this);
-        this.contextClient.bindContextKeyListener(contextKeyListener);
-    }
-
-    public ContextClient getContextClient() {
-        return contextClient;
-    }
-
-    public void setContextClient(ContextClient contextClient) {
-        this.contextClient = contextClient;
-    }
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/builder/ContextClientConfig.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/builder/ContextClientConfig.java
deleted file mode 100644
index 505bd67..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/builder/ContextClientConfig.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.builder;
-
-/**
- * created by cooperyang on 2020/2/10
- * Description:
- */
-public abstract class ContextClientConfig {
-
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/builder/ContextClientFactory.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/builder/ContextClientFactory.java
deleted file mode 100644
index 0e45602..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/builder/ContextClientFactory.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.builder;
-
-import com.webank.wedatasphere.linkis.cs.client.ContextClient;
-import com.webank.wedatasphere.linkis.cs.client.http.HttpContextClient;
-
-/**
- * created by cooperyang on 2020/2/10
- * Description:
- */
-public class ContextClientFactory {
-
-
-    private static final ContextClientConfig DEFAULT_CONTEXT_CLIENT_CONFIG;
-
-    static{
-        DEFAULT_CONTEXT_CLIENT_CONFIG = new HttpContextClientConfig();
-    }
-
-    public static ContextClient getOrCreateContextClient(){
-        return getOrCreateContextClient(DEFAULT_CONTEXT_CLIENT_CONFIG);
-    }
-
-    public static ContextClient getOrCreateContextClient(ContextClientConfig contextClientConfig){
-        return HttpContextClient.getInstance(contextClientConfig);
-    }
-
-
-
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/builder/HttpContextClientConfig.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/builder/HttpContextClientConfig.java
deleted file mode 100644
index ef9b914..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/builder/HttpContextClientConfig.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.builder;
-
-import com.webank.wedatasphere.linkis.common.conf.Configuration;
-import com.webank.wedatasphere.linkis.cs.client.utils.ContextClientConf;
-import com.webank.wedatasphere.linkis.httpclient.authentication.AuthenticationStrategy;
-import com.webank.wedatasphere.linkis.httpclient.config.ClientConfig;
-import com.webank.wedatasphere.linkis.httpclient.config.ClientConfigBuilder;
-import com.webank.wedatasphere.linkis.httpclient.dws.authentication.TokenAuthenticationStrategy;
-
-/**
- * created by cooperyang on 2020/2/10
- * Description: 以http的方式和cs-server进行交互的配置,包括http的诸多配置
- */
-public class HttpContextClientConfig extends ContextClientConfig{
-
-
-    private ClientConfig clientConfig;
-
-
-    public HttpContextClientConfig(){
-        //初始化clientConfig
-        String gatewayUrl = Configuration.getGateWayURL();
-        AuthenticationStrategy authenticationStrategy = new TokenAuthenticationStrategy();
-        int maxConnection = 10;
-        int connectionTimeout = 3000;
-        int readTimeout = 10000;
-        clientConfig = ClientConfigBuilder.newBuilder().addUJESServerUrl(gatewayUrl).
-                connectionTimeout(connectionTimeout).discoveryEnabled(false).loadbalancerEnabled(false).
-                maxConnectionSize(maxConnection).retryEnabled(false).readTimeout(readTimeout)
-                .setAuthenticationStrategy(authenticationStrategy).setAuthTokenKey(ContextClientConf.CONTEXT_CLIENT_AUTH_KEY().getValue())
-                .setAuthTokenValue(ContextClientConf.CONTEXT_CLIENT_AUTH_VALUE().getValue()).build();
-
-    }
-
-
-
-    /**
-     *
-     * @return 返回一个的
-     */
-    public ClientConfig getClientConfig(){
-        return this.clientConfig;
-    }
-
-
-
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/builder/RPCHttpContextClientConfig.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/builder/RPCHttpContextClientConfig.java
deleted file mode 100644
index 0318e9f..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/builder/RPCHttpContextClientConfig.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.builder;
-
-/**
- * created by cooperyang on 2020/2/10
- * Description:
- */
-public class RPCHttpContextClientConfig {
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/http/ContextPostActionBuilder.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/http/ContextPostActionBuilder.java
deleted file mode 100644
index 55c0228..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/http/ContextPostActionBuilder.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.http;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.cs.client.utils.SerializeHelper;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.protocol.ContextHTTPConstant;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Created by v_wbjftang on 2020/3/4.
- */
-public class ContextPostActionBuilder {
-
-    private final DefaultContextPostAction action;
-
-    private Map<String, Object> requestParams = new HashMap<String, Object>(4);
-    private Map<String, String> headerParams = new HashMap<>(2);
-
-    public ContextPostActionBuilder(String url) {
-        action = new DefaultContextPostAction(url);
-    }
-
-    public static ContextPostActionBuilder of(String url) {
-        return new ContextPostActionBuilder(url);
-    }
-
-    public ContextPostActionBuilder with(ContextID contextID) throws ErrorException {
-        String contextIDStr = SerializeHelper.serializeContextID(contextID);
-        requestParams.put(ContextHTTPConstant.CONTEXT_ID_STR, contextIDStr);
-        return this;
-    }
-
-
-    public ContextPostActionBuilder with(String key, Object object) throws ErrorException {
-        requestParams.put(key, object);
-        return this;
-    }
-
-    public ContextPostActionBuilder addHeader(String key, String value) throws ErrorException {
-        headerParams.put(key, value);
-        return this;
-    }
-
-  /*  public ContextPostActionBuilder with(ContextKey contextKey) {
-        return this;
-    }
-
-    public ContextPostActionBuilder with(ContextKeyValue keyValue) {
-        return this;
-    }
-
-    public ContextPostActionBuilder with(ContextValue value) {
-        return this;
-    }*/
-
-    public DefaultContextPostAction build() {
-        action.getRequestPayloads().putAll(requestParams);
-        action.getHeaders().putAll(headerParams);
-        return action;
-    }
-
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/http/HttpContextClient.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/http/HttpContextClient.java
deleted file mode 100644
index 30649ee..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/http/HttpContextClient.java
+++ /dev/null
@@ -1,603 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.http;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.cs.client.AbstractContextClient;
-import com.webank.wedatasphere.linkis.cs.client.Context;
-import com.webank.wedatasphere.linkis.cs.client.LinkisWorkFlowContext;
-import com.webank.wedatasphere.linkis.cs.client.builder.ContextClientConfig;
-import com.webank.wedatasphere.linkis.cs.client.builder.HttpContextClientConfig;
-import com.webank.wedatasphere.linkis.cs.client.listener.ContextIDListener;
-import com.webank.wedatasphere.linkis.cs.client.listener.ContextKeyListener;
-import com.webank.wedatasphere.linkis.cs.client.listener.HeartBeater;
-import com.webank.wedatasphere.linkis.cs.client.utils.ContextClientConf;
-import com.webank.wedatasphere.linkis.cs.client.utils.ContextServerHttpConf;
-import com.webank.wedatasphere.linkis.cs.client.utils.ExceptionHelper;
-import com.webank.wedatasphere.linkis.cs.client.utils.SerializeHelper;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.*;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.protocol.ContextHTTPConstant;
-import com.webank.wedatasphere.linkis.cs.common.search.ContextSearchConditionMapBuilder;
-import com.webank.wedatasphere.linkis.httpclient.config.ClientConfig;
-import com.webank.wedatasphere.linkis.httpclient.dws.DWSHttpClient;
-import com.webank.wedatasphere.linkis.httpclient.dws.config.DWSClientConfig;
-import com.webank.wedatasphere.linkis.httpclient.dws.response.DWSResult;
-import com.webank.wedatasphere.linkis.httpclient.request.Action;
-import com.webank.wedatasphere.linkis.httpclient.response.Result;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-
-/**
- * created by cooperyang on 2020/2/11
- * Description: HttpContextClient是ContextClient的使用Http方式进行通信的具体实现
- * 一般可以将其做成单例
- */
-public class HttpContextClient extends AbstractContextClient {
-
-
-    private static final Logger LOGGER = LoggerFactory.getLogger(HttpContextClient.class);
-
-    private DWSHttpClient dwsHttpClient;
-    private ContextClientConfig contextClientConfig;
-    private final String linkis_version = ContextClientConf.LINKIS_WEB_VERSION().getValue();
-
-    private final String name = "HttpContextClient";
-
-    private static HttpContextClient httpContextClient;
-
-    private HeartBeater heartBeater;
-
-
-
-
-    private HttpContextClient(){
-
-    }
-
-    private HttpContextClient(ContextClientConfig contextClientConfig){
-        //初始化dwsHttpClient
-        this.contextClientConfig = contextClientConfig;
-        if (contextClientConfig instanceof HttpContextClientConfig){
-            HttpContextClientConfig httpContextClientConfig = (HttpContextClientConfig)contextClientConfig;
-            ClientConfig clientConfig = httpContextClientConfig.getClientConfig();
-            DWSClientConfig dwsClientConfig = new DWSClientConfig(clientConfig);
-            dwsClientConfig.setDWSVersion(linkis_version);
-            dwsHttpClient = new DWSHttpClient(dwsClientConfig, name);
-        }
-        if ("true".equals(ContextClientConf.HEART_BEAT_ENABLED().getValue())){
-            this.heartBeater  = new HttpHeartBeater(contextClientConfig);
-            heartBeater.start();
-        }
-    }
-
-
-    public static HttpContextClient getInstance(ContextClientConfig contextClientConfig){
-        if (httpContextClient == null){
-            synchronized (HttpContextClient.class){
-                if (httpContextClient == null){
-                    httpContextClient = new HttpContextClient(contextClientConfig);
-                }
-            }
-        }
-        return httpContextClient;
-    }
-
-
-    @Override
-    @Deprecated
-    public Context createContext(String projectName, String flowName, String user, Map<String, Object> params) throws ErrorException{
-        ContextCreateAction contextCreateAction = new ContextCreateAction();
-        LinkisHAWorkFlowContextID contextID = new LinkisHAWorkFlowContextID();
-        contextID.setProject(projectName);
-        contextID.setFlow(flowName);
-        String contextIDStr = SerializeHelper.serializeContextID(contextID);
-        contextCreateAction.addHeader(ContextHTTPConstant.CONTEXT_ID_STR, contextIDStr);
-        contextCreateAction.getRequestPayloads().put(ContextHTTPConstant.CONTEXT_ID_STR, contextIDStr);
-        Result result = null;
-        try{
-            result = dwsHttpClient.execute(contextCreateAction);
-        }catch(Exception e) {
-            LOGGER.error("create context failed", e);
-            ExceptionHelper.throwErrorException(80015, "create context failed", e);
-        }
-        if (result instanceof ContextCreateResult){
-            ContextCreateResult contextCreateResult = (ContextCreateResult)result;
-            int status = contextCreateResult.getStatus();
-            if (status != 0){
-                String errMsg = contextCreateResult.getMessage();
-                LOGGER.error("create context for project {}, flow {} failed, msg is {}", projectName, flowName, errMsg);
-                throw new ErrorException(80014, "create context failed" + errMsg);
-            }else{
-                LinkisWorkFlowContext context = new LinkisWorkFlowContext();
-                Map<String, Object> map = contextCreateResult.getData();
-                contextID.setContextId(map.get("contextId").toString());
-                context.setContextID(contextID);
-                context.setContextClient(this);
-                context.setUser(user);
-                return context;
-            }
-        }else if (result != null){
-            LOGGER.error("result is not a correct type, result type is {}", result.getClass().getSimpleName());
-            throw new ErrorException(80015, "result is not a correct type");
-        }else{
-            LOGGER.error("result is null");
-            throw new ErrorException(80015, "result is null");
-        }
-    }
-
-
-    @Override
-    public Context createContext(ContextID contextID) throws ErrorException {
-        ContextCreateAction contextCreateAction = new ContextCreateAction();
-        String contextIDStr = SerializeHelper.serializeContextID(contextID);
-        contextCreateAction.addHeader(ContextHTTPConstant.CONTEXT_ID_STR, contextIDStr);
-        contextCreateAction.getRequestPayloads().put(ContextHTTPConstant.CONTEXT_ID_STR, contextIDStr);
-        Result result = null;
-        try{
-            result = dwsHttpClient.execute(contextCreateAction);
-        }catch(Exception e) {
-            LOGGER.error("create context failed", e);
-            ExceptionHelper.throwErrorException(80015, "create context failed", e);
-        }
-        if (result instanceof ContextCreateResult){
-            ContextCreateResult contextCreateResult = (ContextCreateResult)result;
-            int status = contextCreateResult.getStatus();
-            if (status != 0){
-                String errMsg = contextCreateResult.getMessage();
-                LOGGER.error("create context failed, msg is {}", errMsg);
-                throw new ErrorException(80014, "create context failed" + errMsg);
-            }else{
-                LinkisWorkFlowContext context = new LinkisWorkFlowContext();
-                Map<String, Object> map = contextCreateResult.getData();
-                contextID.setContextId(map.get("contextId").toString());
-                context.setContextID(contextID);
-                context.setContextClient(this);
-                return context;
-            }
-        }else if (result != null){
-            LOGGER.error("result is not a correct type, result type is {}", result.getClass().getSimpleName());
-            throw new ErrorException(80015, "result is not a correct type");
-        }else{
-            LOGGER.error("result is null");
-            throw new ErrorException(80015, "result is null");
-        }
-    }
-
-    @Override
-    public Context getContext(ContextID contextId) throws ErrorException{
-        LinkisWorkFlowContext context = new LinkisWorkFlowContext();
-        context.setContextID(contextId);
-        context.setContextClient(this);
-        return context;
-    }
-
-    @Override
-    public Context getContext(String contextIDStr) throws ErrorException {
-        ContextID contextID = SerializeHelper.deserializeContextID(contextIDStr);
-        return getContext(contextID);
-    }
-
-    @Override
-    public ContextValue getContextValue(ContextID contextID, ContextKey contextKey) throws ErrorException {
-        String contextIDStr = SerializeHelper.serializeContextID(contextID);
-        String contextKeyStr = SerializeHelper.serializeContextKey(contextKey);
-        ContextGetValueAction contextGetValueAction = new ContextGetValueAction();
-        contextGetValueAction.addHeader(ContextHTTPConstant.CONTEXT_ID_STR, contextIDStr);
-        contextGetValueAction.getRequestPayloads().put(ContextHTTPConstant.CONTEXT_ID_STR, contextIDStr);
-        contextGetValueAction.getRequestPayloads().put(ContextHTTPConstant.CONTEXT_KEY_STR, contextKeyStr);
-        Result result = null;
-        try{
-            result = dwsHttpClient.execute(contextGetValueAction);
-        }catch(Exception e) {
-            LOGGER.error("get context value id: {} , key: {} failed", contextIDStr, contextKeyStr, e);
-            ExceptionHelper.throwErrorException(80015, "get context value failed", e);
-        }
-        if (result instanceof ContextGetValueResult){
-            ContextGetValueResult contextGetValueResult = (ContextGetValueResult)result;
-            int status = contextGetValueResult.getStatus();
-            if (status != 0){
-                String errMsg = contextGetValueResult.getMessage();
-                LOGGER.error("get context value id: {} , key: {} failed, msg is {}", contextIDStr, contextKeyStr, errMsg);
-                throw new ErrorException(80014, "create context failed" + errMsg);
-            }else{
-                Map<String, Object> map = contextGetValueResult.getData();
-                if( null == map || null == map.get("contextValue") ){
-                    return null;
-                }
-                String contextValueStr = map.get("contextValue").toString();
-                return SerializeHelper.deserializeContextValue(contextValueStr);
-            }
-        }else if (result != null){
-            LOGGER.error("result is not a correct type, result type is {}", result.getClass().getSimpleName());
-            throw new ErrorException(80015, "result is not a correct type");
-        }else{
-            LOGGER.error("result is null");
-            throw new ErrorException(80015, "result is null");
-        }
-    }
-
-
-    @Override
-    public void update(ContextID contextID, ContextKey contextKey, ContextValue contextValue) throws ErrorException {
-        String contextIdStr = SerializeHelper.SERIALIZE_HELPER.serialize(contextID);
-        String contextKeyValueStr = SerializeHelper.SERIALIZE_HELPER.serialize(new CommonContextKeyValue(contextKey, contextValue));
-        ContextSetKeyValueAction contextSetKeyValueAction = new ContextSetKeyValueAction();
-        contextSetKeyValueAction.addHeader(ContextHTTPConstant.CONTEXT_ID_STR, contextIdStr);
-        contextSetKeyValueAction.getRequestPayloads().put("contextID", contextIdStr);
-        contextSetKeyValueAction.getRequestPayloads().put("contextKeyValue", contextKeyValueStr);
-        Result result = null;
-        try{
-            result = dwsHttpClient.execute(contextSetKeyValueAction);
-        }catch(Exception e) {
-            LOGGER.error("update context failed", e);
-            ExceptionHelper.throwErrorException(80015, "update context failed", e);
-        }
-        if (result instanceof ContextSetKeyValueResult){
-            ContextSetKeyValueResult contextSetKeyValueResult = (ContextSetKeyValueResult)result;
-            int status = contextSetKeyValueResult.getStatus();
-            if (status != 0){
-                String errMsg = contextSetKeyValueResult.getMessage();
-                LOGGER.error("调用客户端去更新contextId {} 失败, 返回的错误信息是 {} ", contextIdStr, errMsg);
-            }
-        }else if (result != null){
-            LOGGER.error("result is not a correct type, result type is {}", result.getClass().getSimpleName());
-            throw new ErrorException(80015, "result is not a correct type");
-        }else{
-            LOGGER.error("result is null");
-            throw new ErrorException(80015, "result is null");
-        }
-    }
-
-    @Override
-    public void reset(ContextID contextID, ContextKey contextKey) throws ErrorException{
-        String contextIdStr = SerializeHelper.SERIALIZE_HELPER.serialize(contextID);
-        String contextKeyStr = SerializeHelper.SERIALIZE_HELPER.serialize(contextKey);
-        ContextResetValueAction contextResetValueAction = new ContextResetValueAction();
-        contextResetValueAction.getRequestPayloads().put("contextKey", contextKeyStr);
-        contextResetValueAction.getRequestPayloads().put("contextID", contextIdStr);
-       // contextResetValueAction.getParameters().put("contextId", contextID.getContextId());
-        Result result = null;
-        try{
-            result = dwsHttpClient.execute(contextResetValueAction);
-        }catch(Exception e) {
-            LOGGER.error("reset contextID {}, contextKey {}  failed", contextIdStr, contextKeyStr, e);
-            ExceptionHelper.throwErrorException(80015, "reset context failed", e);
-        }
-        if (result instanceof ContextResetResult){
-            ContextResetResult contextResetResult = (ContextResetResult)result;
-            int status = contextResetResult.getStatus();
-            if (status != 0){
-                String errMsg = contextResetResult.getMessage();
-                LOGGER.error("调用客户端去reset contextId {}, contextKey {} 失败, 返回的错误信息是 {} ", contextIdStr, contextKeyStr,errMsg);
-                throw new ErrorException(80015, "reset contextID failed");
-            }
-        }else if (result != null){
-            LOGGER.error("result is not a correct type, result type is {}", result.getClass().getSimpleName());
-            throw new ErrorException(80015, "result is not a correct type");
-        }else{
-            LOGGER.error("result is null");
-            throw new ErrorException(80015, "result is null");
-        }
-    }
-
-    @Override
-    public void reset(ContextID contextID) throws ErrorException {
-        String contextIdStr = SerializeHelper.serializeContextID(contextID);
-        ContextResetIDAction contextResetIDAction = new ContextResetIDAction();
-        contextResetIDAction.getRequestPayloads().put(ContextHTTPConstant.CONTEXT_ID_STR, contextIdStr);
-        //contextResetIDAction.getParameters().put("contextId", contextID.getContextId());
-        Result result = null;
-        try{
-            result = dwsHttpClient.execute(contextResetIDAction);
-        }catch(Exception e) {
-            LOGGER.error("reset contextID {} failed", contextIdStr, e);
-            ExceptionHelper.throwErrorException(80015, "reset context failed", e);
-        }
-        if (result instanceof ContextResetIDResult){
-            ContextResetIDResult contextResetResult = (ContextResetIDResult)result;
-            int status = contextResetResult.getStatus();
-            if (status != 0){
-                String errMsg = contextResetResult.getMessage();
-                LOGGER.error("调用客户端去reset contextId {} 失败, 返回的错误信息是 {} ", contextIdStr,errMsg);
-                throw new ErrorException(80015, "reset contextID failed");
-            }
-        }else if (result != null){
-            LOGGER.error("result is not a correct type, result type is {}", result.getClass().getSimpleName());
-            throw new ErrorException(80015, "result is not a correct type");
-        }else{
-            LOGGER.error("result is null");
-            throw new ErrorException(80015, "result is null");
-        }
-    }
-
-    @Override
-    public void remove(ContextID contextID, ContextKey contextKey) throws ErrorException{
-        String contextIdStr = SerializeHelper.serializeContextID(contextID);
-        String contextKeyStr = SerializeHelper.serializeContextKey(contextKey);
-        ContextRemoveAction contextRemoveAction = new ContextRemoveAction(contextIdStr, contextKeyStr);
-        contextRemoveAction.addHeader(ContextHTTPConstant.CONTEXT_ID_STR, contextIdStr);
-        contextRemoveAction.getRequestPayloads().put(ContextHTTPConstant.CONTEXT_KEY_STR, contextKeyStr);
-        contextRemoveAction.getRequestPayloads().put(ContextHTTPConstant.CONTEXT_ID_STR, contextIdStr);
-        contextRemoveAction.getRequestPayloads().put("contextId", contextID.getContextId());
-        Result result = null;
-        try{
-            result = dwsHttpClient.execute(contextRemoveAction);
-        }catch(Exception e) {
-            LOGGER.error("remove context id {} context key {} failed", contextIdStr, contextIdStr, e);
-            ExceptionHelper.throwErrorException(80015, "remove context failed", e);
-        }
-        if (result instanceof ContextRemoveResult){
-            ContextRemoveResult contextRemoveResult = (ContextRemoveResult)result;
-            int status = contextRemoveResult.getStatus();
-            if (status != 0){
-                String errMsg = contextRemoveResult.getMessage();
-                LOGGER.error("remove context failed contextID {}, contextKey {} ", contextIdStr, contextKey.getKey());
-            }
-        }else if (result != null){
-            LOGGER.error("result is not a correct type, result type is {}", result.getClass().getSimpleName());
-            throw new ErrorException(80015, "result is not a correct type");
-        }else{
-            LOGGER.error("result is null");
-            throw new ErrorException(80015, "result is null");
-        }
-    }
-
-    @Override
-    public void setContextKeyValue(ContextID contextID, ContextKeyValue contextKeyValue) throws ErrorException {
-        String contextIDStr = SerializeHelper.SERIALIZE_HELPER.serialize(contextID);
-        String contextKeyValueStr = SerializeHelper.SERIALIZE_HELPER.serialize(contextKeyValue);
-        ContextSetKeyValueAction action = new ContextSetKeyValueAction();
-        action.addHeader(ContextHTTPConstant.CONTEXT_ID_STR, contextIDStr);
-        action.getRequestPayloads().put("contextID", contextIDStr);
-        action.getRequestPayloads().put("contextKeyValue", contextKeyValueStr);
-        Result result = null;
-        try{
-            result = dwsHttpClient.execute(action);
-        }catch(Exception e) {
-            LOGGER.error("set value failed", e);
-            ExceptionHelper.throwErrorException(80015, "update context failed", e);
-        }
-        if (result instanceof ContextSetKeyValueResult){
-            ContextSetKeyValueResult contextSetKeyValueResult = (ContextSetKeyValueResult)result;
-            int status = contextSetKeyValueResult.getStatus();
-            if (status != 0){
-                String errMsg = contextSetKeyValueResult.getMessage();
-                LOGGER.error("set value failed {} ,err is {}", contextIDStr, errMsg);
-            }
-        }else if (result != null){
-            LOGGER.error("result is not a correct type, result type is {}", result.getClass().getSimpleName());
-            throw new ErrorException(80015, "result is not a correct type");
-        }else{
-            LOGGER.error("result is null");
-            throw new ErrorException(80015, "result is null");
-        }
-    }
-
-    @Override
-    public void bindContextIDListener(ContextIDListener contextIDListener) throws ErrorException{
-        ContextID contextID = contextIDListener.getContextID();
-        String contextIDStr = SerializeHelper.serializeContextID(contextID);
-        ContextBindIDAction contextBindIDAction = new ContextBindIDAction();
-        contextBindIDAction.getRequestPayloads().put(ContextHTTPConstant.CONTEXT_ID_STR, contextIDStr);
-       // contextBindIDAction.getParameters().put("contextId", contextID.getContextId());
-        Result result = null;
-        try{
-            result = dwsHttpClient.execute(contextBindIDAction);
-        }catch(Exception e) {
-            LOGGER.error("bind context id {} failed", contextIDStr, e);
-            ExceptionHelper.throwErrorException(80015, "bind context id failed", e);
-        }
-        if (result instanceof ContextBindIDResult){
-            ContextBindIDResult contextBindIDResult = (ContextBindIDResult)result;
-            int status = contextBindIDResult.getStatus();
-            if (status != 0){
-                String errMsg = contextBindIDResult.getMessage();
-                LOGGER.error("bind context id failed {} ,err is {}", contextIDStr, errMsg);
-            }
-        }else if (result != null){
-            LOGGER.error("result is not a correct type, result type is {}", result.getClass().getSimpleName());
-            throw new ErrorException(80015, "result is not a correct type");
-        }else{
-            LOGGER.error("result is null");
-            throw new ErrorException(80015, "result is null");
-        }
-    }
-
-    @Override
-    public void bindContextKeyListener(ContextKeyListener contextKeyListener) throws ErrorException{
-        ContextID contextID = contextKeyListener.getContext().getContextID();
-        ContextKey contextKey =contextKeyListener.getContextKey();
-        String contextIDStr = SerializeHelper.serializeContextID(contextID);
-        String contextKeyStr = SerializeHelper.serializeContextKey(contextKey);
-        ContextBindKeyAction contextBindKeyAction = new ContextBindKeyAction();
-        contextBindKeyAction.addHeader(ContextHTTPConstant.CONTEXT_ID_STR, contextIDStr);
-        contextBindKeyAction.getRequestPayloads().put(ContextHTTPConstant.CONTEXT_ID_STR, contextIDStr);
-        contextBindKeyAction.getRequestPayloads().put(ContextHTTPConstant.CONTEXT_KEY_STR, contextKeyStr);
-        //todo 这里要改一下source的来历
-        contextBindKeyAction.getRequestPayloads().put("source", name);
-        Result result = null;
-        try{
-            result = dwsHttpClient.execute(contextBindKeyAction);
-        }catch(Exception e) {
-            LOGGER.error("bind context id {} context key {} failed", contextIDStr, contextKeyStr, e);
-            ExceptionHelper.throwErrorException(80015, "bind context key failed", e);
-        }
-        if (result instanceof ContextBindKeyResult){
-            ContextBindKeyResult contextBindKeyResult = (ContextBindKeyResult)result;
-            int status = contextBindKeyResult.getStatus();
-            if (status != 0){
-                String errMsg = contextBindKeyResult.getMessage();
-                LOGGER.error("bind context id {} context key {} failed ,err is {}", contextIDStr, contextKeyStr, errMsg);
-            }
-        }else if (result != null){
-            LOGGER.error("result is not a correct type, result type is {}", result.getClass().getSimpleName());
-            throw new ErrorException(80015, "result is not a correct type");
-        }else{
-            LOGGER.error("result is null");
-            throw new ErrorException(80015, "result is null");
-        }
-    }
-
-    @Override
-    public List<ContextKeyValue> search(ContextID contextID,
-                                        List<ContextType> contextTypes,
-                                        List<ContextScope> contextScopes,
-                                        List<String> contains,
-                                        List<String> regex) throws ErrorException {
-        return search(contextID, contextTypes, contextScopes, contains, regex, false, null, Integer.MAX_VALUE, null);
-    }
-
-    @Override
-    public List<ContextKeyValue> search(ContextID contextID,
-                                        List<ContextType> contextTypes,
-                                        List<ContextScope> contextScopes,
-                                        List<String> contains,
-                                        List<String> regex,
-                                        boolean upstream,
-                                        String nodeName,
-                                        int num,
-                                        List<Class> contextValueTypes) throws ErrorException {
-        ContextSearchConditionMapBuilder builder = ContextSearchConditionMapBuilder.newBuilder();
-        if (contextTypes != null){
-            contextTypes.forEach(builder::contextTypes);
-        }
-        if (contextScopes != null){
-            contextScopes.forEach(builder::contextScopes);
-        }
-        if (contains != null){
-            contains.forEach(builder::contains);
-        }
-        if (regex != null){
-            regex.forEach(builder::regex);
-        }
-        builder.nearest(nodeName, num, upstream);
-        if (contextValueTypes != null) {
-            contextValueTypes.forEach(builder::contextValueTypes);
-        }
-        String contextIDStr = SerializeHelper.serializeContextID(contextID);
-        ContextSearchContextAction contextSearchContextAction = new ContextSearchContextAction();
-        contextSearchContextAction.addHeader(ContextHTTPConstant.CONTEXT_ID_STR, contextIDStr);
-        contextSearchContextAction.getRequestPayloads().put("condition", builder.build());
-        contextSearchContextAction.getRequestPayloads().put("contextID", contextIDStr);
-        Result result = null;
-        try{
-            result = dwsHttpClient.execute(contextSearchContextAction);
-        }catch(Exception e) {
-            LOGGER.error("search condition failed", e);
-            ExceptionHelper.throwErrorException(80015, "search condition failed", e);
-        }
-        if (result instanceof ContextSearchResult){
-            ContextSearchResult contextSearchResult = (ContextSearchResult)result;
-            int status = contextSearchResult.getStatus();
-            if (status != 0){
-                String errMsg = contextSearchResult.getMessage();
-                LOGGER.error("search condition failed, err is  {}", errMsg);
-            }else{
-                Map<String, Object> data = contextSearchResult.getData();
-                if(data.get("contextKeyValue") != null){
-                    List<ContextKeyValue> retKvs = new ArrayList<>();
-                    Object o = data.get("contextKeyValue");
-                    List<String> list = (List<String>)o;
-                    list.stream().map(s -> {
-                        try{
-                            return SerializeHelper.deserializeContextKeyValue(s);
-                        }catch(ErrorException e){
-                            LOGGER.error("failed to deserialize {} to a contextKeyValue", s, e);
-                            return null;
-                        }
-                    }).filter(Objects::nonNull).forEach(retKvs::add);
-                    return retKvs;
-                }
-            }
-        }else if (result != null){
-            LOGGER.error("result is not a correct type, result type is {}", result.getClass().getSimpleName());
-            throw new ErrorException(80015, "result is not a correct type");
-        }else{
-            LOGGER.error("result is null");
-            throw new ErrorException(80015, "result is null");
-        }
-        return null;
-    }
-
-
-
-    @Override
-    public void removeAllValueByKeyPrefixAndContextType(ContextID contextID, ContextType contextType, String keyPrefix) throws ErrorException {
-        String contextIDStr = SerializeHelper.serializeContextID(contextID);
-        DefaultContextPostAction action = ContextPostActionBuilder.of(ContextServerHttpConf.removeAllValueByKeyPrefixAndContextTypeURL())
-                .with(ContextHTTPConstant.CONTEXT_ID_STR, contextIDStr).with(ContextHTTPConstant.CONTEXT_KEY_TYPE_STR, contextType.toString())
-                .with(ContextHTTPConstant.CONTEXT_KEY_PREFIX_STR, keyPrefix).addHeader(ContextHTTPConstant.CONTEXT_ID_STR, contextIDStr).build();
-        checkDWSResult(execute(action));
-    }
-
-    @Override
-    public void removeAllValueByKeyPrefix(ContextID contextID, String keyPrefix) throws ErrorException {
-        String contextIDStr = SerializeHelper.serializeContextID(contextID);
-        DefaultContextPostAction action = ContextPostActionBuilder.of(ContextServerHttpConf.removeAllValueByKeyPrefixURL())
-                .with(ContextHTTPConstant.CONTEXT_ID_STR, contextIDStr).with(ContextHTTPConstant.CONTEXT_KEY_PREFIX_STR, keyPrefix)
-                .addHeader(ContextHTTPConstant.CONTEXT_ID_STR, contextIDStr).build();
-        checkDWSResult(execute(action));
-    }
-
-    private Result execute(Action action) throws ErrorException {
-        try{
-            return dwsHttpClient.execute(action);
-        }catch(Exception e) {
-            LOGGER.error("execute failed", e);
-            ExceptionHelper.throwErrorException(80015, "execute failed", e);
-        }
-        return null;
-    }
-
-    private DWSResult checkDWSResult(Result result) throws CSErrorException {
-        if(result instanceof DWSResult){
-            int status = ((DWSResult) result).getStatus();
-            if (status != 0){
-                String errMsg = ((DWSResult) result).getMessage();
-                LOGGER.error("request failed, err is  {}", errMsg);
-                throw new CSErrorException(80015,errMsg);
-            }else {
-                return (DWSResult)result;
-            }
-        }else {
-            throw new CSErrorException(80015,"resulet is not instance of DWSResult");
-        }
-    }
-
-    @Override
-    public void close() throws IOException {
-        try{
-            LOGGER.info("client close");
-            if (null != this.dwsHttpClient){
-                this.dwsHttpClient.close();
-                this.heartBeater.close();
-            }
-        } catch (Exception e){
-            LOGGER.error("Failed to close httpContextClient", e);
-            throw new IOException(e);
-        }
-
-    }
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/http/HttpHeartBeater.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/http/HttpHeartBeater.java
deleted file mode 100644
index 08f6a17..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/http/HttpHeartBeater.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.http;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.common.listener.Event;
-import com.webank.wedatasphere.linkis.common.utils.Utils;
-import com.webank.wedatasphere.linkis.cs.client.builder.ContextClientConfig;
-import com.webank.wedatasphere.linkis.cs.client.builder.HttpContextClientConfig;
-import com.webank.wedatasphere.linkis.cs.client.listener.*;
-import com.webank.wedatasphere.linkis.cs.client.utils.ContextClientConf;
-import com.webank.wedatasphere.linkis.cs.client.utils.SerializeHelper;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.*;
-import com.webank.wedatasphere.linkis.cs.listener.callback.imp.ContextKeyValueBean;
-import com.webank.wedatasphere.linkis.cs.listener.event.enumeration.OperateType;
-import com.webank.wedatasphere.linkis.cs.listener.event.impl.DefaultContextKeyEvent;
-import com.webank.wedatasphere.linkis.httpclient.config.ClientConfig;
-import com.webank.wedatasphere.linkis.httpclient.dws.DWSHttpClient;
-import com.webank.wedatasphere.linkis.httpclient.dws.config.DWSClientConfig;
-import com.webank.wedatasphere.linkis.httpclient.dws.response.DWSResult;
-import com.webank.wedatasphere.linkis.httpclient.response.Result;
-import org.apache.commons.io.IOUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.concurrent.TimeUnit;
-
-/**
- * created by cooperyang on 2020/2/18
- * Description: heartbeater类的作用是为了csclient能够和csserver进行每秒钟交互的一个类,从server中获取内容,
- * 然后封装成事件投递到 事件总线,来让监听器进行消费
- */
-public class HttpHeartBeater implements HeartBeater {
-
-
-    private static final Logger LOGGER = LoggerFactory.getLogger(HttpHeartBeater.class);
-
-    private ContextClientListenerBus<ContextClientListener, Event> contextClientListenerBus =
-            ContextClientListenerManager.getContextClientListenerBus();
-
-    private final String name = "ContextClientHTTPHeatBeater";
-
-    //todo 要改成某一个微服务的标识
-    private final String client_source = "TestClient";
-
-
-    private DWSHttpClient dwsHttpClient;
-
-
-
-    public HttpHeartBeater(ContextClientConfig contextClientConfig){
-        if (contextClientConfig instanceof HttpContextClientConfig){
-            HttpContextClientConfig httpContextClientConfig = (HttpContextClientConfig)contextClientConfig;
-            ClientConfig clientConfig = httpContextClientConfig.getClientConfig();
-            DWSClientConfig dwsClientConfig = new DWSClientConfig(clientConfig);
-            dwsClientConfig.setDWSVersion(ContextClientConf.LINKIS_WEB_VERSION().getValue());
-            dwsHttpClient = new DWSHttpClient(dwsClientConfig, name);
-        }
-    }
-
-
-
-
-
-    @Override
-    @SuppressWarnings("unchecked")
-    public void heartBeat() {
-        ContextHeartBeatAction contextHeartBeatAction = new ContextHeartBeatAction(client_source);
-        contextHeartBeatAction.getRequestPayloads().put("source", client_source);
-        Result result = null;
-        try{
-            result = dwsHttpClient.execute(contextHeartBeatAction);
-        }catch(Exception e){
-            LOGGER.error("执行heartbeat出现失败", e);
-            return ;
-        }
-        if (result instanceof ContextHeartBeatResult){
-            ContextHeartBeatResult contextHeartBeatResult = (ContextHeartBeatResult)result;
-            Map<String,Object> data = contextHeartBeatResult.getData();
-            Object object = data.get("ContextKeyValueBean");
-            List<ContextKeyValueBean> kvBeans = new ArrayList<>();
-            if (object instanceof List){
-                List<Object> list = (List<Object>)object;
-                list.stream().
-                        filter(Objects::nonNull).
-                        map(Object::toString).
-                        map(str -> {
-                            try{
-                                return SerializeHelper.deserializeContextKVBean(str);
-                            }catch(ErrorException e){
-                                return null;
-                            }
-                        }).filter(Objects::nonNull).forEach(kvBeans::add);
-            }
-            if (kvBeans.size() > 0){
-                dealCallBack(kvBeans);
-            }
-        }
-    }
-
-    @Override
-    public void dealCallBack(List<ContextKeyValueBean> kvs) {
-        for(ContextKeyValueBean kv : kvs){
-            //todo 先忽略掉contextIDEvent
-            ContextKeyValue contextKeyValue = new CommonContextKeyValue();
-            contextKeyValue.setContextKey(kv.getCsKey());
-            contextKeyValue.setContextValue(kv.getCsValue());
-            DefaultContextKeyEvent event = new DefaultContextKeyEvent();
-            event.setContextID(kv.getCsID());
-            event.setOperateType(OperateType.UPDATE);
-            event.setContextKeyValue(contextKeyValue);
-            contextClientListenerBus.post(event);
-        }
-    }
-
-
-    @Override
-    public void start() {
-        Utils.defaultScheduler().scheduleAtFixedRate(new Runnable() {
-            @Override
-            public void run() {
-                heartBeat();
-            }
-        }, 0, 1, TimeUnit.HOURS);
-    }
-
-    @Override
-    public void close() throws IOException {
-        try{
-            if (null != this.dwsHttpClient){
-                this.dwsHttpClient.close();
-            }
-        } catch (Exception e){
-            LOGGER.error("Failed to close httpContextClient", e);
-            throw new IOException(e);
-        }
-    }
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/listener/ContextClientEvent.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/listener/ContextClientEvent.java
deleted file mode 100644
index 9847922..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/listener/ContextClientEvent.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.listener;
-
-import com.webank.wedatasphere.linkis.common.listener.Event;
-
-/**
- * created by cooperyang on 2020/2/18
- * Description:
- */
-public interface ContextClientEvent extends Event {
-
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/listener/ContextClientListener.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/listener/ContextClientListener.java
deleted file mode 100644
index 09cf07c..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/listener/ContextClientListener.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.listener;
-
-import com.webank.wedatasphere.linkis.common.listener.Event;
-import com.webank.wedatasphere.linkis.common.listener.EventListener;
-
-/**
- * created by cooperyang on 2020/2/11
- * Description:
- */
-public interface ContextClientListener extends EventListener {
-    void onContextCreated(Event event);
-    void onContextUpdated(Event event);
-    void onEvent(Event event);
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/listener/ContextClientListenerBus.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/listener/ContextClientListenerBus.java
deleted file mode 100644
index 359841d..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/listener/ContextClientListenerBus.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.listener;
-
-import com.webank.wedatasphere.linkis.common.listener.Event;
-import com.webank.wedatasphere.linkis.common.listener.ListenerBus;
-import com.webank.wedatasphere.linkis.common.listener.ListenerEventBus;
-
-/**
- * created by cooperyang on 2020/2/11
- * Description:
- */
-public class ContextClientListenerBus<L extends ContextClientListener, E extends Event> extends ListenerEventBus<L, E> {
-
-
-    private static final String NAME = "ContextClientListenerBus";
-
-    private static final int CAPACITY = 10;
-
-    private static final int THREAD_SIZE = 20;
-
-    private static final int MAX_FREE_TIME = 5000;
-
-    public ContextClientListenerBus(){
-        super(CAPACITY, NAME,THREAD_SIZE,MAX_FREE_TIME);
-    }
-
-
-
-    @Override
-    public void doPostEvent(L listener, E event) {
-        listener.onEvent(event);
-    }
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/listener/ContextClientListenerManager.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/listener/ContextClientListenerManager.java
deleted file mode 100644
index 6e00b9b..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/listener/ContextClientListenerManager.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.listener;
-
-import com.webank.wedatasphere.linkis.common.listener.Event;
-
-/**
- * created by cooperyang on 2020/2/11
- * Description:
- * Manager的作用是为了方便用户将的
- */
-public class ContextClientListenerManager {
-
-    private static ContextClientListenerBus<ContextClientListener, Event> contextClientListenerBus;
-
-    public static ContextClientListenerBus<ContextClientListener, Event> getContextClientListenerBus(){
-        if (contextClientListenerBus == null){
-            synchronized (ContextClientListenerManager.class){
-                if (contextClientListenerBus == null){
-                    contextClientListenerBus = new ContextClientListenerBus<ContextClientListener, Event>();
-                }
-            }
-        }
-        return contextClientListenerBus;
-    }
-
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/listener/ContextIDListener.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/listener/ContextIDListener.java
deleted file mode 100644
index 84b9924..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/listener/ContextIDListener.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.listener;
-
-import com.webank.wedatasphere.linkis.common.listener.Event;
-import com.webank.wedatasphere.linkis.cs.client.Context;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.listener.event.enumeration.OperateType;
-import com.webank.wedatasphere.linkis.cs.listener.event.impl.DefaultContextIDEvent;
-
-
-/**
- * created by cooperyang on 2020/2/17
- * Description: 这个listener是用来监听contextID的,用户可以进行实现
- */
-public abstract class ContextIDListener implements ContextClientListener{
-
-
-    private ContextID contextID;
-
-    private Context context;
-
-
-    public ContextIDListener(){
-
-    }
-
-    public ContextIDListener(ContextID contextID){
-        this.contextID = contextID;
-    }
-
-    public ContextID getContextID() {
-        return contextID;
-    }
-
-    public void setContextID(ContextID contextID) {
-        this.contextID = contextID;
-    }
-
-
-    public Context getContext() {
-        return context;
-    }
-
-    public void setContext(Context context) {
-        this.context = context;
-    }
-
-    @Override
-    public void onContextCreated(Event event) {
-
-    }
-
-    @Override
-    public void onContextUpdated(Event event) {
-
-    }
-
-    public abstract void onContextRemoved(Event event);
-
-
-    @Override
-    public void onEvent(Event event) {
-        if (event instanceof DefaultContextIDEvent){
-            DefaultContextIDEvent defaultContextKeyEvent = (DefaultContextIDEvent)event;
-            if (defaultContextKeyEvent.getContextID().equals(contextID)){
-                switch(defaultContextKeyEvent.getOperateType()){
-                    case UPDATE : onContextUpdated(defaultContextKeyEvent);
-                            break;
-                    case CREATE: onContextCreated(defaultContextKeyEvent);break;
-                    case REMOVE: onContextRemoved(defaultContextKeyEvent);break;
-                    default: break;
-                }
-            }
-        }
-    }
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/listener/ContextKeyListener.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/listener/ContextKeyListener.java
deleted file mode 100644
index d6e57d9..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/listener/ContextKeyListener.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.listener;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.common.listener.Event;
-import com.webank.wedatasphere.linkis.cs.client.Context;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.listener.event.impl.DefaultContextKeyEvent;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * created by cooperyang on 2020/2/18
- * Description:一个微服务对contextKey的监听器
- */
-public abstract class ContextKeyListener implements ContextClientListener{
-
-    private static final Logger LOGGER = LoggerFactory.getLogger(ContextKeyListener.class);
-
-    private ContextKey contextKey;
-
-    private Context context;
-
-    public ContextKeyListener(){
-
-    }
-
-    public ContextKeyListener(ContextKey contextKey){
-        this.contextKey =  contextKey;
-    }
-
-    public ContextKey getContextKey() {
-        return contextKey;
-    }
-
-    public void setContextKey(ContextKey contextKey) {
-        this.contextKey = contextKey;
-    }
-
-    public Context getContext() {
-        return context;
-    }
-
-    public void setContext(Context context) {
-        this.context = context;
-    }
-
-    @Override
-    public void onContextUpdated(Event event) {
-        if (event instanceof DefaultContextKeyEvent){
-            context.setLocal(((DefaultContextKeyEvent) event).getContextKeyValue());
-        }
-    }
-
-    @Override
-    public void onEvent(Event event) {
-        if (event instanceof DefaultContextKeyEvent){
-            DefaultContextKeyEvent defaultContextKeyEvent = (DefaultContextKeyEvent)event;
-            if (defaultContextKeyEvent.getContextKeyValue().getContextKey().equals(contextKey)){
-                switch(defaultContextKeyEvent.getOperateType()){
-                    case UPDATE:onContextUpdated(defaultContextKeyEvent);break;
-                    case CREATE:onContextCreated(defaultContextKeyEvent);break;
-                    default:break;
-                }
-            }
-        }
-    }
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/listener/ContextUpdateEvent.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/listener/ContextUpdateEvent.java
deleted file mode 100644
index 3218cd2..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/listener/ContextUpdateEvent.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.listener;
-
-/**
- * created by cooperyang on 2020/2/18
- * Description:
- */
-public class ContextUpdateEvent implements ContextClientEvent{
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/listener/HeartBeater.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/listener/HeartBeater.java
deleted file mode 100644
index fce9002..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/listener/HeartBeater.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.listener;
-
-import com.webank.wedatasphere.linkis.cs.listener.callback.imp.ContextKeyValueBean;
-
-import java.io.Closeable;
-import java.util.List;
-
-/**
- * created by cooperyang on 2020/2/11
- * Description:
- */
-public interface HeartBeater extends Closeable {
-    /**
-     *
-     */
-    public void heartBeat();
-    public void dealCallBack(List<ContextKeyValueBean> kvs);
-
-    public void start();
-
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSMetaDataService.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSMetaDataService.java
deleted file mode 100644
index 2ec5617..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSMetaDataService.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.service;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.common.io.MetaData;
-import com.webank.wedatasphere.linkis.cs.client.utils.SerializeHelper;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.exception.ErrorCode;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Map;
-
-/**
- * @Author alexyang
- * @Date 2020/3/9
- */
-public class CSMetaDataService implements MetaDataService {
-
-    private static final Logger logger = LoggerFactory.getLogger(CSMetaDataService.class);
-
-    private static CSMetaDataService csMetaDataService;
-
-    private CSMetaDataService() {
-
-    }
-
-    public static CSMetaDataService getInstance() {
-        if (null == csMetaDataService) {
-            synchronized (CSMetaDataService.class) {
-                if (null == csMetaDataService) {
-                    csMetaDataService = new CSMetaDataService();
-                }
-            }
-        }
-        return csMetaDataService;
-    }
-
-    @Override
-    public Map<ContextKey, MetaData> getAllUpstreamMetaData(String contextIDStr, String nodeName) throws CSErrorException {
-        if (StringUtils.isBlank(contextIDStr) || StringUtils.isBlank(nodeName)) {
-            return null;
-        }
-        try {
-            ContextID contextID = SerializeHelper.deserializeContextID(contextIDStr);
-            return DefaultSearchService.getInstance().searchUpstreamContextMap(contextID, nodeName, Integer.MAX_VALUE, MetaData.class);
-        } catch (ErrorException e) {
-            logger.error("Deserialize contextid error. contextID : " + contextIDStr + ", e ", e);
-            throw new CSErrorException(ErrorCode.DESERIALIZE_ERROR, "Deserialize contextid error. contextID : " + contextIDStr + ", e " + e.getDesc());
-        }
-    }
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSNodeService.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSNodeService.java
deleted file mode 100644
index fd44141..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSNodeService.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.service;
-
-/**
- * @author peacewong
- * @date 2020/3/21 19:17
- */
-public interface CSNodeService {
-
-    void initNodeCSInfo(String contextIDStr, String ndeName);
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSNodeServiceImpl.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSNodeServiceImpl.java
deleted file mode 100644
index 0c7e448..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSNodeServiceImpl.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.service;
-
-import com.webank.wedatasphere.linkis.cs.client.ContextClient;
-import com.webank.wedatasphere.linkis.cs.client.builder.ContextClientFactory;
-import com.webank.wedatasphere.linkis.cs.client.utils.SerializeHelper;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.utils.CSCommonUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author peacewong
- * @date 2020/3/21 19:18
- */
-public class CSNodeServiceImpl implements CSNodeService{
-
-    private final static Logger logger = LoggerFactory.getLogger(CSNodeServiceImpl.class);
-
-    private SearchService searchService = DefaultSearchService.getInstance();
-
-    private static CSNodeService csNodeService;
-
-    private CSNodeServiceImpl() {
-
-    }
-
-    public static CSNodeService getInstance() {
-        if (null == csNodeService) {
-            synchronized (CSNodeServiceImpl.class) {
-                if (null == csNodeService) {
-                    csNodeService = new CSNodeServiceImpl();
-                }
-            }
-        }
-        return csNodeService;
-    }
-
-    @Override
-    public void initNodeCSInfo(String contextIDStr, String ndeName) {
-
-        try {
-            ContextClient contextClient = ContextClientFactory.getOrCreateContextClient();
-            ContextID contextID = SerializeHelper.deserializeContextID(contextIDStr);
-            contextClient.removeAllValueByKeyPrefixAndContextType(contextID, ContextType.METADATA, CSCommonUtils.NODE_PREFIX + ndeName);
-        } catch (Exception e) {
-            logger.error("Failed to init node cs Info", e);
-        }
-    }
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSResourceService.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSResourceService.java
deleted file mode 100644
index 837f5da..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSResourceService.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.service;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.cs.client.utils.SerializeHelper;
-import com.webank.wedatasphere.linkis.cs.common.entity.metadata.CSTable;
-import com.webank.wedatasphere.linkis.cs.common.entity.resource.BMLResource;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.exception.ErrorCode;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Author alexyang
- * @Date 2020/3/9
- */
-public class CSResourceService implements ResourceService {
-
-    private static final Logger logger = LoggerFactory.getLogger(CSResourceService.class);
-
-    private static CSResourceService csResourceService;
-
-    private CSResourceService() {
-
-    }
-
-    public static CSResourceService getInstance() {
-        if (null == csResourceService) {
-            synchronized (CSResourceService.class) {
-                if (null == csResourceService) {
-                    csResourceService = new CSResourceService();
-                }
-            }
-        }
-        return csResourceService;
-    }
-
-    @Override
-    public Map<ContextKey, BMLResource> getAllUpstreamBMLResource(String contextIDStr, String nodeName) throws CSErrorException {
-        if (StringUtils.isBlank(contextIDStr) || StringUtils.isBlank(nodeName)) {
-            return null;
-        }
-        try {
-            ContextID contextID = SerializeHelper.deserializeContextID(contextIDStr);
-            return DefaultSearchService.getInstance().searchUpstreamContextMap(contextID, nodeName, Integer.MAX_VALUE, BMLResource.class);
-        } catch (ErrorException e) {
-            logger.error("Deserialize contextid error. contextID : " + contextIDStr + ", e ", e);
-            throw new CSErrorException(ErrorCode.DESERIALIZE_ERROR, "Deserialize contextid error. contextID : " + contextIDStr + ", e " + e.getDesc());
-        }
-    }
-
-    @Override
-    public List<BMLResource> getUpstreamBMLResource(String contextIDStr, String nodeName) throws CSErrorException {
-        List<BMLResource> rsList = new ArrayList<>();
-        if (StringUtils.isBlank(contextIDStr) || StringUtils.isBlank(nodeName)) {
-            return rsList;
-        }
-        try {
-            ContextID contextID = SerializeHelper.deserializeContextID(contextIDStr);
-            if (null != contextID) {
-                rsList = DefaultSearchService.getInstance().searchUpstreamContext(contextID, nodeName, Integer.MAX_VALUE, BMLResource.class);
-            }
-            return rsList;
-        } catch (ErrorException e) {
-            logger.error("Failed to get Resource: " + e.getMessage());
-            throw new CSErrorException(ErrorCode.DESERIALIZE_ERROR, "Deserialize contextID error. contextIDStr : ", e);
-        }
-    }
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSResultDataService.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSResultDataService.java
deleted file mode 100644
index f930374..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSResultDataService.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.service;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.data.CSResultData;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-
-import java.util.List;
-
-/**
- * @author peacewong
- * @date 2020/3/13 20:00
- */
-public interface CSResultDataService {
-
-    CSResultData getCSResultData(String contextIDStr, String contextKey)throws CSErrorException;
-
-    void putCSResultData(String contextIDStr, String contextKeyStr, CSResultData csResultData) throws CSErrorException;
-
-    List<CSResultData> getUpstreamCSResultData(String contextIDStr, String nodeName) throws CSErrorException;
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSResultDataServiceImpl.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSResultDataServiceImpl.java
deleted file mode 100644
index e646047..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSResultDataServiceImpl.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.service;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.cs.client.ContextClient;
-import com.webank.wedatasphere.linkis.cs.client.builder.ContextClientFactory;
-import com.webank.wedatasphere.linkis.cs.client.utils.SerializeHelper;
-import com.webank.wedatasphere.linkis.cs.common.entity.data.CSResultData;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.CommonContextValue;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextValue;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.exception.ErrorCode;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author peacewong
- * @date 2020/3/13 20:23
- */
-public class CSResultDataServiceImpl  implements CSResultDataService{
-
-    private final static Logger logger = LoggerFactory.getLogger(CSResultDataServiceImpl.class);
-
-    private SearchService searchService = DefaultSearchService.getInstance();
-
-    private static CSResultDataService csResultDataService;
-
-    private CSResultDataServiceImpl() {
-
-    }
-
-    public static CSResultDataService getInstance() {
-        if (null == csResultDataService) {
-            synchronized (CSResultDataServiceImpl.class) {
-                if (null == csResultDataService) {
-                    csResultDataService = new CSResultDataServiceImpl();
-                }
-            }
-        }
-        return csResultDataService;
-    }
-
-    @Override
-    public CSResultData getCSResultData(String contextIDStr, String contextKeyStr) throws CSErrorException {
-        if (StringUtils.isBlank(contextIDStr) || StringUtils.isBlank(contextKeyStr)) {
-            return null;
-        }
-        try {
-            ContextID contextID = SerializeHelper.deserializeContextID(contextIDStr);
-            ContextKey contextKey = SerializeHelper.deserializeContextKey(contextKeyStr);
-            return searchService.getContextValue(contextID, contextKey, CSResultData.class);
-        } catch (ErrorException e) {
-            logger.error("Deserialize failed, invalid contextId : " + contextIDStr + ", or contextKey : " + contextKeyStr + ", e : " + e.getMessage());
-            logger.error("exception ", e);
-            throw new CSErrorException(ErrorCode.DESERIALIZE_ERROR, "Deserialize failed, invalid contextId : " + contextIDStr + ", or contextKey : " + contextKeyStr + ", e : " + e.getMessage());
-        }
-    }
-
-    @Override
-    public void putCSResultData(String contextIDStr, String contextKeyStr, CSResultData csResultData) throws CSErrorException {
-        ContextClient contextClient = ContextClientFactory.getOrCreateContextClient();
-        try {
-            ContextID contextID = SerializeHelper.deserializeContextID(contextIDStr);
-            ContextKey contextKey = SerializeHelper.deserializeContextKey(contextKeyStr);
-            ContextValue contextValue = new CommonContextValue();
-            contextValue.setValue(csResultData);
-            contextClient.update(contextID, contextKey, contextValue);
-        } catch (ErrorException e) {
-            logger.error("Deserialize error. e ", e);
-            throw new CSErrorException(ErrorCode.DESERIALIZE_ERROR, "Deserialize error. e : " + e.getDesc());
-        }
-    }
-
-    @Override
-    public List<CSResultData> getUpstreamCSResultData(String contextIDStr, String nodeName) throws CSErrorException {
-        List<CSResultData> rsList = new ArrayList<>();
-        if (StringUtils.isBlank(contextIDStr) || StringUtils.isBlank(nodeName)) {
-            return rsList;
-        }
-        try {
-            ContextID contextID = SerializeHelper.deserializeContextID(contextIDStr);
-            if (null != contextID) {
-                rsList = searchService.searchUpstreamContext(contextID, nodeName, Integer.MAX_VALUE, CSResultData.class);
-            }
-            return rsList;
-        } catch (ErrorException e) {
-            logger.error("Deserialize contextID error. contextIDStr : " + contextIDStr, e);
-            throw new CSErrorException(ErrorCode.DESERIALIZE_ERROR, "Deserialize contextID error. contextIDStr : " + contextIDStr + "e : " + e.getDesc());
-        }
-    }
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSTableService.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSTableService.java
deleted file mode 100644
index ddbce74..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSTableService.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.service;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.cs.client.ContextClient;
-import com.webank.wedatasphere.linkis.cs.client.builder.ContextClientFactory;
-import com.webank.wedatasphere.linkis.cs.client.utils.SerializeHelper;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.metadata.CSTable;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.*;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.exception.ErrorCode;
-import com.webank.wedatasphere.linkis.cs.common.utils.CSCommonUtils;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @Author alexyang
- * @Date 2020/3/9
- */
-public class CSTableService implements TableService {
-
-    private final static Logger logger = LoggerFactory.getLogger(CSTableService.class);
-
-    private SearchService searchService = DefaultSearchService.getInstance();
-
-    private static CSTableService csTableService;
-
-    private CSTableService() {
-
-    }
-
-    public static CSTableService getInstance() {
-        if (null == csTableService) {
-            synchronized (CSTableService.class) {
-                if (null == csTableService) {
-                    csTableService = new CSTableService();
-                }
-            }
-        }
-        return csTableService;
-    }
-
-    @Override
-    public CSTable getCSTable(ContextID contextID, ContextKey contextKey) throws CSErrorException {
-        if (null == contextID || null == contextKey) {
-            return null;
-        }
-        if (contextID instanceof CombinedNodeIDContextID) {
-            contextID = ((CombinedNodeIDContextID) contextID).getLinkisHaWorkFlowContextID();
-        }
-        CSTable csTable = searchService.getContextValue(contextID, contextKey, CSTable.class);
-        return csTable;
-    }
-
-    @Override
-    public List<CSTable> getUpstreamTables(String contextIDStr, String nodeName) throws CSErrorException {
-        List<CSTable> rsList = new ArrayList<>();
-        if (StringUtils.isBlank(contextIDStr) || StringUtils.isBlank(nodeName)) {
-            return rsList;
-        }
-        try {
-            ContextID contextID = SerializeHelper.deserializeContextID(contextIDStr);
-            if (null != contextID) {
-                if (contextID instanceof CombinedNodeIDContextID) {
-                    contextID = ((CombinedNodeIDContextID) contextID).getLinkisHaWorkFlowContextID();
-                }
-                rsList = searchService.searchUpstreamContext(contextID, nodeName, Integer.MAX_VALUE, CSTable.class);
-            }
-            return rsList;
-        } catch (ErrorException e) {
-            logger.error("Deserialize contextID error. contextIDStr : " + contextIDStr);
-            throw new CSErrorException(ErrorCode.DESERIALIZE_ERROR, "getUpstreamTables error ", e);
-        }
-    }
-
-    @Override
-    public CSTable getUpstreamSuitableTable(String contextIDStr, String nodeName, String keyword) throws CSErrorException {
-        CSTable csTable = null;
-        if (StringUtils.isBlank(contextIDStr) || StringUtils.isBlank(nodeName)) {
-            return csTable;
-        }
-        try {
-            ContextID contextID = SerializeHelper.deserializeContextID(contextIDStr);
-            if (null != contextID) {
-                if (contextID instanceof CombinedNodeIDContextID) {
-                    contextID = ((CombinedNodeIDContextID) contextID).getLinkisHaWorkFlowContextID();
-                }
-                csTable = searchService.searchContext(contextID, keyword, nodeName, CSTable.class);
-            }
-        } catch (ErrorException e) {
-            throw new CSErrorException(ErrorCode.DESERIALIZE_ERROR, "getUpstreamSuitableTable error ", e);
-        }
-        return csTable;
-    }
-
-    @Override
-    public List<ContextKeyValue> searchUpstreamTableKeyValue(String contextIDStr, String nodeName) throws CSErrorException {
-        try {
-            ContextID contextID = SerializeHelper.deserializeContextID(contextIDStr);
-            if (contextID instanceof CombinedNodeIDContextID) {
-                contextID = ((CombinedNodeIDContextID) contextID).getLinkisHaWorkFlowContextID();
-            }
-            return searchService.searchUpstreamKeyValue(contextID, nodeName, Integer.MAX_VALUE, CSTable.class);
-        } catch (ErrorException e) {
-            throw new CSErrorException(ErrorCode.DESERIALIZE_ERROR, "Failed to searchUpstreamTableKeyValue ", e);
-        }
-    }
-
-
-    @Override
-    public void putCSTable(String contextIDStr, String contextKeyStr, CSTable csTable) throws CSErrorException {
-        ContextClient contextClient = ContextClientFactory.getOrCreateContextClient();
-        try {
-            ContextID contextID = SerializeHelper.deserializeContextID(contextIDStr);
-            ContextKey contextKey = SerializeHelper.deserializeContextKey(contextKeyStr);
-            ContextValue contextValue = new CommonContextValue();
-            // todo check keywords
-            contextValue.setKeywords("");
-            contextValue.setValue(csTable);
-            if (contextID instanceof CombinedNodeIDContextID) {
-                contextID = ((CombinedNodeIDContextID) contextID).getLinkisHaWorkFlowContextID();
-            }
-            contextClient.update(contextID, contextKey, contextValue);
-        } catch (ErrorException e) {
-            throw new CSErrorException(ErrorCode.DESERIALIZE_ERROR, "putCSTable error ", e);
-        }
-    }
-
-    @Override
-    public CSTable getCSTable(String contextIDStr, String contextKeyStr) throws CSErrorException {
-        if (StringUtils.isBlank(contextIDStr) || StringUtils.isBlank(contextKeyStr)) {
-            return null;
-        }
-        try {
-            ContextID contextID = SerializeHelper.deserializeContextID(contextIDStr);
-            ContextKey contextKey = SerializeHelper.deserializeContextKey(contextKeyStr);
-            if (contextID instanceof CombinedNodeIDContextID) {
-                contextID = ((CombinedNodeIDContextID) contextID).getLinkisHaWorkFlowContextID();
-            }
-            return getCSTable(contextID, contextKey);
-        } catch (ErrorException e) {
-            throw new CSErrorException(ErrorCode.DESERIALIZE_ERROR, "getCSTable error ", e);
-        }
-    }
-
-
-    @Override
-    public void registerCSTable(String contextIDStr, String nodeName, String alias, CSTable csTable) throws CSErrorException {
-
-        if (StringUtils.isBlank(contextIDStr) || StringUtils.isBlank(nodeName)) {
-            return;
-        }
-        String tableName = "";
-        if (StringUtils.isNotBlank(alias)) {
-            tableName = CSCommonUtils.CS_TMP_TABLE_PREFIX + nodeName + "_" + alias;
-        } else {
-            for (int i = 1; i < 10; i++) {
-                String tmpTable = CSCommonUtils.CS_TMP_TABLE_PREFIX + nodeName + "_rs" + i;
-                try {
-                    ContextKey contextKey = new CommonContextKey();
-                    contextKey.setContextScope(ContextScope.PUBLIC);
-                    contextKey.setContextType(ContextType.METADATA);
-                    contextKey.setKey(CSCommonUtils.getTableKey(nodeName, tmpTable));
-                    CSTable oldCsTable = getCSTable(contextIDStr, SerializeHelper.serializeContextKey(contextKey));
-                    if (null == oldCsTable) {
-                        tableName = tmpTable;
-                        break;
-                    }
-                } catch (Exception e) {
-                    tableName = tmpTable;
-                    logger.warn("Failed to build tmp tableName", e);
-                    break;
-                }
-            }
-        }
-        try {
-            csTable.setName(tableName);
-            ContextKey contextKey = new CommonContextKey();
-            contextKey.setContextScope(ContextScope.PUBLIC);
-            contextKey.setContextType(ContextType.METADATA);
-            contextKey.setKey(CSCommonUtils.getTableKey(nodeName, tableName));
-            putCSTable(contextIDStr, SerializeHelper.serializeContextKey(contextKey), csTable);
-        } catch (ErrorException e) {
-            throw new CSErrorException(ErrorCode.DESERIALIZE_ERROR, "Failed to register cs tmp table ", e);
-        }
-    }
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSVariableService.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSVariableService.java
deleted file mode 100644
index 479f836..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSVariableService.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.service;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.cs.client.ContextClient;
-import com.webank.wedatasphere.linkis.cs.client.builder.ContextClientFactory;
-import com.webank.wedatasphere.linkis.cs.client.utils.SerializeHelper;
-import com.webank.wedatasphere.linkis.cs.common.entity.object.LinkisVariable;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.CommonContextValue;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextValue;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.exception.ErrorCode;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author peacewong
- * @date 2020/3/12 20:29
- */
-public class CSVariableService  implements VariableService{
-
-    private final static Logger logger = LoggerFactory.getLogger(CSVariableService.class);
-
-    private SearchService searchService = DefaultSearchService.getInstance();
-
-    private static CSVariableService csVariableService;
-
-    private CSVariableService(){
-
-    }
-
-    @Override
-    public List<LinkisVariable> getUpstreamVariables(String contextIDStr, String nodeName) throws CSErrorException{
-        List<LinkisVariable> rsList = new ArrayList<>();
-        if (StringUtils.isBlank(contextIDStr) || StringUtils.isBlank(nodeName)) {
-            return rsList;
-        }
-        try {
-            ContextID contextID = SerializeHelper.deserializeContextID(contextIDStr);
-            if (null != contextID) {
-                rsList = searchService.searchUpstreamContext(contextID, nodeName, Integer.MAX_VALUE, LinkisVariable.class);
-            }
-            return rsList;
-        } catch (Throwable e) {
-            logger.error("Failed to get variable : " + contextIDStr, e);
-           // throw new CSErrorException(ErrorCode.DESERIALIZE_ERROR, "Failed to get variable : " + contextIDStr + "e : " + e.getMessage());
-        }
-        return rsList;
-    }
-
-    @Override
-    public void putVariable(String contextIDStr, String contextKeyStr, LinkisVariable linkisVariable) throws CSErrorException {
-        ContextClient contextClient = ContextClientFactory.getOrCreateContextClient();
-        try {
-            ContextID contextID = SerializeHelper.deserializeContextID(contextIDStr);
-            ContextKey contextKey = SerializeHelper.deserializeContextKey(contextKeyStr);
-            ContextValue contextValue = new CommonContextValue();
-            contextValue.setValue(linkisVariable);
-            contextClient.update(contextID, contextKey, contextValue);
-        } catch (ErrorException e) {
-            logger.error("Deserialize error. e ");
-            throw new CSErrorException(ErrorCode.DESERIALIZE_ERROR, "Deserialize error. e : ", e);
-        }
-    }
-
-    public static CSVariableService getInstance() {
-        if (null == csVariableService) {
-            synchronized (CSVariableService.class) {
-                if (null == csVariableService) {
-                    csVariableService = new CSVariableService();
-                }
-            }
-        }
-        return csVariableService;
-    }
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSWorkService.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSWorkService.java
deleted file mode 100644
index f70db7e..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSWorkService.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.service;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.WorkType;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-
-import java.util.List;
-
-/**
- * @Author alexyang
- * @Date 2020/3/21
- */
-public interface CSWorkService {
-
-    void initContextServiceInfo(String contextIDStr, WorkType workType) throws CSErrorException;
-
-    void initContextServiceInfo(String contextIDStr, List<WorkType> workTypes) throws CSErrorException;
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSWorkServiceImpl.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSWorkServiceImpl.java
deleted file mode 100644
index 7c16dfe..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/CSWorkServiceImpl.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.service;
-
-import com.webank.wedatasphere.linkis.cs.client.ContextClient;
-import com.webank.wedatasphere.linkis.cs.client.builder.ContextClientFactory;
-import com.webank.wedatasphere.linkis.cs.client.utils.SerializeHelper;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.WorkType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.exception.ErrorCode;
-import com.webank.wedatasphere.linkis.cs.common.utils.CSCommonUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @Author alexyang
- * @Date 2020/3/21
- */
-public class CSWorkServiceImpl implements CSWorkService {
-
-    private static final Logger logger = LoggerFactory.getLogger(CSWorkServiceImpl.class);
-    private CSWorkServiceImpl() {}
-    private static CSWorkService csWorkService = null;
-
-    public static CSWorkService getInstance() {
-        if (null == csWorkService) {
-            synchronized (CSWorkServiceImpl.class) {
-                if (null == csWorkService) {
-                    csWorkService = new CSWorkServiceImpl();
-                }
-            }
-        }
-        return csWorkService;
-    }
-
-
-    @Override
-    public void initContextServiceInfo(String contextIDStr, WorkType workType) throws CSErrorException {
-        List<WorkType> typeList = new ArrayList<>();
-        typeList.add(workType);
-        initContextServiceInfo(contextIDStr, typeList);
-    }
-
-    @Override
-    public void initContextServiceInfo(String contextIDStr, List<WorkType> workTypes) throws CSErrorException {
-        try {
-            ContextClient contextClient = ContextClientFactory.getOrCreateContextClient();
-            ContextID contextID = SerializeHelper.deserializeContextID(contextIDStr);
-            for (WorkType type : workTypes) {
-                contextClient.removeAllValueByKeyPrefix(contextID, getWorkTypePrefix(type));
-            }
-        } catch (Exception e) {
-            logger.error("InitContextInfo error. contextIDStr : {}, workTypes : {}" + contextIDStr, CSCommonUtils.gson.toJson(workTypes));
-            throw new CSErrorException(ErrorCode.DESERIALIZE_ERROR, "InitContextInfo error. contextIDStr : " + contextIDStr + ", workTypes : " + CSCommonUtils.gson.toJson(workTypes), e);
-        }
-    }
-
-    private String getWorkTypePrefix(WorkType workType) {
-        String prefix = null;
-        switch (workType) {
-            case WORKSPACE:
-                prefix = CSCommonUtils.WORKSPACE_PREFIX;
-                break;
-            case PROJECT:
-                prefix = CSCommonUtils.PROJECT_PREFIX;
-                break;
-            case FLOW:
-                prefix = CSCommonUtils.FLOW_PREFIX;
-                break;
-            case NODE:
-                prefix = CSCommonUtils.NODE_PREFIX;
-                break;
-            default:
-                logger.error("Invalid workType : {}", workType);
-        }
-        return prefix;
-    }
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/DefaultSearchService.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/DefaultSearchService.java
deleted file mode 100644
index 3e60f53..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/DefaultSearchService.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.service;
-
-import com.google.gson.Gson;
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.cs.client.ContextClient;
-import com.webank.wedatasphere.linkis.cs.client.builder.ContextClientFactory;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextValue;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.exception.ErrorCode;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Author alexyang
- * @Date 2020/3/6
- */
-public class DefaultSearchService implements SearchService {
-    private static final Logger logger = LoggerFactory.getLogger(DefaultSearchService.class);
-    private static final Gson gson = new Gson();
-    private static SearchService searchService = null;
-
-    private DefaultSearchService() {
-    }
-
-    @Override
-    public <T> T getContextValue(ContextID contextID, ContextKey contextKey, Class<T> contextValueType) throws CSErrorException {
-        ContextClient contextClient = ContextClientFactory.getOrCreateContextClient();
-        ContextValue contextValue = null;
-        ContextType contextType = contextKey.getContextType();
-        try {
-            contextValue = contextClient.getContextValue(contextID, contextKey);
-        } catch (Exception e) {
-            logger.error("Failed to get ContextValue: " + e.getMessage());
-            throw new CSErrorException(ErrorCode.GET_CONTEXT_VALUE_ERROR, "Failed to get ContextValue: ", e);
-        }
-
-        if (null == contextValue || null == contextValue.getValue()) {
-            return null;
-        } else if (contextValueType.isInstance(contextValue.getValue())) {
-            return (T) contextValue.getValue();
-        } else {
-            throw new CSErrorException(ErrorCode.INVALID_CONTEXT_VALUE_TYPE, "Invalid Context Type : " + contextType);
-        }
-    }
-
-    @Override
-    public <T> T searchContext(ContextID contextId, String keyword, String nodeName, Class<T> contextValueType) throws CSErrorException {
-        if (null == contextId || StringUtils.isBlank(contextId.getContextId()) || StringUtils.isBlank(nodeName) || null == contextValueType) {
-            logger.error("ContextID or nodeName or contextValueType cannot be null.");
-            throw new CSErrorException(ErrorCode.INVALID_NULL_STRING, "ContextID or nodeName or contextValueType cannot be null.");
-        }
-        ContextClient contextClient = ContextClientFactory.getOrCreateContextClient();
-        List<String> contains = new ArrayList<>();
-        contains.add(keyword);
-        List<Class> contextValueTypes = new ArrayList<>();
-        contextValueTypes.add(contextValueType);
-        List<ContextKeyValue> contextKeyValues = null;
-        try {
-            contextKeyValues = contextClient.search(contextId, null, null, contains, null, false, nodeName, 1, contextValueTypes);
-        } catch (ErrorException e) {
-            logger.error("Search context value error.");
-            throw new CSErrorException(ErrorCode.GET_CONTEXT_VALUE_ERROR, "Search context value error: ", e);
-        }
-        if (CollectionUtils.isEmpty(contextKeyValues) || null == contextKeyValues.get(0).getContextValue()) {
-            return null;
-        }
-        if (contextValueType.isInstance(contextKeyValues.get(0).getContextValue().getValue())) {
-            return (T) contextKeyValues.get(0).getContextValue().getValue();
-        } else {
-            throw new CSErrorException(ErrorCode.SEARCH_CONTEXT_VALUE_ERROR, "Search value : " + gson.toJson(contextKeyValues.get(0)
-                    + " is not instance of class : " + contextValueType.getName()));
-        }
-    }
-
-    @Override
-    public <T> List<T> searchUpstreamContext(ContextID contextID, String nodeName, int num, Class<T> contextValueType) throws CSErrorException {
-        Map<ContextKey, T> contextMap = searchUpstreamContextMap(contextID, nodeName, num, contextValueType);
-        if (null == contextMap || contextMap.size() < 1) {
-            return null;
-        }
-        List<T> retValues = new ArrayList<>(contextMap.size());
-        contextMap.entrySet().stream().filter(kv -> null != kv && null != kv.getValue()).map(kv -> kv.getValue()).forEach(retValues::add);
-        return retValues;
-    }
-
-    @Override
-    public <T> Map<ContextKey, T> searchUpstreamContextMap(ContextID contextID, String nodeName, int num, Class<T> contextValueType) throws CSErrorException {
-        ContextClient contextClient = ContextClientFactory.getOrCreateContextClient();
-        if (null == contextID || StringUtils.isBlank(contextID.getContextId())) {
-            return null;
-        }
-        List<Class> contextValueTypes = new ArrayList<>();
-        contextValueTypes.add(contextValueType);
-        List<ContextKeyValue> contextKeyValueList = null;
-        try {
-            contextKeyValueList = contextClient.search(contextID, null, null, null, null, true, nodeName, num, contextValueTypes);
-        } catch (ErrorException e) {
-            throw new CSErrorException(ErrorCode.GET_CONTEXT_VALUE_ERROR, "searchUpstreamContextMap error ", e);
-        }
-        if (CollectionUtils.isEmpty(contextKeyValueList)) {
-            return null;
-        }
-        Map<ContextKey, T> retValues = new HashMap<>(contextKeyValueList.size());
-        contextKeyValueList.stream().filter(kv -> null != kv && null != kv.getContextValue()).forEach(kv -> retValues.put(kv.getContextKey(), (T) (kv.getContextValue().getValue())));
-        return retValues;
-    }
-
-    @Override
-    public <T> List<ContextKeyValue> searchUpstreamKeyValue(ContextID contextID, String nodeName, int num, Class<T> contextValueType) throws CSErrorException {
-        ContextClient contextClient = ContextClientFactory.getOrCreateContextClient();
-        if (null == contextID || StringUtils.isBlank(contextID.getContextId())) {
-            return null;
-        }
-        List<Class> contextValueTypes = new ArrayList<>();
-        contextValueTypes.add(contextValueType);
-        List<ContextKeyValue> contextKeyValueList = null;
-        try {
-            contextKeyValueList = contextClient.search(contextID, null, null, null, null, true, nodeName, num, contextValueTypes);
-        } catch (ErrorException e) {
-            throw new CSErrorException(ErrorCode.GET_CONTEXT_VALUE_ERROR, "searchUpstreamKeyValue error ", e);
-        }
-        return contextKeyValueList;
-    }
-
-    public static SearchService getInstance() {
-        if (null == searchService) {
-            synchronized (DefaultSearchService.class) {
-                if (null == searchService) {
-                    searchService = new DefaultSearchService();
-                }
-            }
-        }
-        return searchService;
-    }
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/LinkisJobDataService.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/LinkisJobDataService.java
deleted file mode 100644
index b746fda..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/LinkisJobDataService.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.service;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.data.LinkisJobData;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-
-/**
- * @author peacewong
- * @date 2020/3/13 22:11
- */
-public interface LinkisJobDataService {
-
-    LinkisJobData getLinkisJobData(String contextIDStr, String contextKey)throws CSErrorException;
-
-    void putLinkisJobData(String contextIDStr, String contextKeyStr, LinkisJobData linkisJobData) throws CSErrorException;
-
-
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/LinkisJobDataServiceImpl.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/LinkisJobDataServiceImpl.java
deleted file mode 100644
index 57421fb..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/LinkisJobDataServiceImpl.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.service;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.cs.client.ContextClient;
-import com.webank.wedatasphere.linkis.cs.client.builder.ContextClientFactory;
-import com.webank.wedatasphere.linkis.cs.client.utils.SerializeHelper;
-import com.webank.wedatasphere.linkis.cs.common.entity.data.LinkisJobData;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.CommonContextValue;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextValue;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.exception.ErrorCode;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author peacewong
- * @date 2020/3/13 22:12
- */
-public class LinkisJobDataServiceImpl implements LinkisJobDataService {
-
-    private final static Logger logger = LoggerFactory.getLogger(LinkisJobDataServiceImpl.class);
-
-    private SearchService searchService = DefaultSearchService.getInstance();
-
-    private static LinkisJobDataService linkisJobDataService;
-
-    private LinkisJobDataServiceImpl() {
-
-    }
-
-    public static LinkisJobDataService getInstance() {
-        if (null == linkisJobDataService) {
-            synchronized (LinkisJobDataServiceImpl.class) {
-                if (null == linkisJobDataService) {
-                    linkisJobDataService = new LinkisJobDataServiceImpl();
-                }
-            }
-        }
-        return linkisJobDataService;
-    }
-
-    @Override
-    public LinkisJobData getLinkisJobData(String contextIDStr, String contextKeyStr) throws CSErrorException {
-        if (StringUtils.isBlank(contextIDStr) || StringUtils.isBlank(contextKeyStr)) {
-            return null;
-        }
-        try {
-            ContextID contextID = SerializeHelper.deserializeContextID(contextIDStr);
-            ContextKey contextKey = SerializeHelper.deserializeContextKey(contextKeyStr);
-            return searchService.getContextValue(contextID, contextKey, LinkisJobData.class);
-        } catch (ErrorException e) {
-            logger.error("Deserialize failed, invalid contextId : " + contextIDStr + ", or contextKey : " + contextKeyStr + ", e : " + e.getMessage());
-            logger.error("exception ", e);
-            throw new CSErrorException(ErrorCode.DESERIALIZE_ERROR, "Deserialize failed, invalid contextId : " + contextIDStr + ", or contextKey : " + contextKeyStr + ", e : " + e.getMessage());
-        }
-    }
-
-    @Override
-    public void putLinkisJobData(String contextIDStr, String contextKeyStr, LinkisJobData linkisJobData) throws CSErrorException {
-        ContextClient contextClient = ContextClientFactory.getOrCreateContextClient();
-        try {
-            ContextID contextID = SerializeHelper.deserializeContextID(contextIDStr);
-            ContextKey contextKey = SerializeHelper.deserializeContextKey(contextKeyStr);
-            ContextValue contextValue = new CommonContextValue();
-            contextValue.setValue(linkisJobData);
-            contextClient.update(contextID, contextKey, contextValue);
-        } catch (ErrorException e) {
-            logger.error("Deserialize error. e ", e);
-            throw new CSErrorException(ErrorCode.DESERIALIZE_ERROR, "Deserialize error. e : " + e.getDesc());
-        }
-    }
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/MetaDataService.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/MetaDataService.java
deleted file mode 100644
index babe9b2..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/MetaDataService.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.service;
-
-import com.webank.wedatasphere.linkis.common.io.MetaData;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-
-import java.util.Map;
-
-/**
- * @Author alexyang
- * @Date 2020/3/9
- */
-public interface MetaDataService {
-
-    /**
-     * 通过ContextID和NodeName,获取上游的所有Metadata数据
-     * @param contextIDStr
-     * @param nodeName
-     * @return
-     * @throws CSErrorException
-     */
-    Map<ContextKey, MetaData> getAllUpstreamMetaData(String contextIDStr, String nodeName) throws CSErrorException;
-
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/ResourceService.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/ResourceService.java
deleted file mode 100644
index 01b4c98..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/ResourceService.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.service;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.resource.BMLResource;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Author alexyang
- * @Date 2020/3/9
- */
-public interface ResourceService {
-
-    /**
-     * 通过ContextID和NodeName,获取上游的所有Resource数据
-     * @param contextIDStr
-     * @param nodeName
-     * @return
-     */
-    Map<ContextKey, BMLResource> getAllUpstreamBMLResource(String contextIDStr, String nodeName) throws CSErrorException;
-
-    List<BMLResource> getUpstreamBMLResource(String contextIDStr, String nodeName) throws CSErrorException;
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/SearchService.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/SearchService.java
deleted file mode 100644
index d734e41..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/SearchService.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.service;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Author alexyang
- * @Date 2020/3/6
- */
-public interface SearchService {
-
-    <T> T getContextValue(ContextID contextId, ContextKey contextKey, Class<T> contextValueType) throws CSErrorException;
-
-    /**
-     *
-     * 返回匹配条件中最合适的一个
-     * @param contetID LinkisHAFlowContextID实例
-     * @param keyword 包含的关键字
-     * @param contextValueType 返回的contextValue必须是该类型的实例
-     * @param nodeName 如果nodeName是null,搜寻全部的,如果不为空搜寻上游的
-     * @param <T>
-     * @return
-     * @throws CSErrorException
-     */
-    <T> T searchContext(ContextID contetID, String keyword, String nodeName, Class<T> contextValueType) throws CSErrorException;
-
-    <T> List<T> searchUpstreamContext(ContextID contextID, String nodeName, int num, Class<T> contextValueType) throws CSErrorException;
-
-    <T> Map<ContextKey, T> searchUpstreamContextMap(ContextID contextID, String nodeName, int num, Class<T> contextValueType) throws CSErrorException;
-
-    <T> List<ContextKeyValue> searchUpstreamKeyValue(ContextID contextID, String nodeName, int num, Class<T> contextValueType) throws CSErrorException;
-
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/TableService.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/TableService.java
deleted file mode 100644
index db66d08..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/TableService.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.service;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.metadata.CSTable;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-
-import java.util.List;
-
-/**
- * @Author alexyang
- * @Date 2020/3/9
- */
-public interface TableService {
-
-    /**
-     * 通过ContextKey获取一个确定的CSTable
-     *
-     * @param contextID
-     * @param contextKey
-     * @return
-     * @throws CSErrorException
-     */
-    CSTable getCSTable(ContextID contextID, ContextKey contextKey) throws CSErrorException;
-
-    /**
-     * 获取上游节点的所有表
-     *
-     * @param contextIDStr
-     * @param nodeName
-     * @return
-     * @throws CSErrorException
-     */
-    List<CSTable> getUpstreamTables(String contextIDStr, String nodeName) throws CSErrorException;
-
-    void putCSTable(String contextIDStr, String ContextKey, CSTable csTable) throws CSErrorException;
-
-    CSTable getCSTable(String contextIDStr, String contextKey) throws CSErrorException;
-
-    CSTable getUpstreamSuitableTable(String contextIDStr, String nodeName, String keyword) throws CSErrorException;
-
-    List<ContextKeyValue> searchUpstreamTableKeyValue(String contextIDStr, String nodeName) throws CSErrorException;
-
-    void registerCSTable(String contextIDStr, String nodeName, String alias, CSTable csTable) throws CSErrorException;
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/VariableService.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/VariableService.java
deleted file mode 100644
index 168b4f3..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/service/VariableService.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.service;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.object.LinkisVariable;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-
-import java.util.List;
-
-/**
- * @author peacewong
- * @date 2020/3/12 20:28
- */
-public interface VariableService {
-
-    List<LinkisVariable> getUpstreamVariables(String contextIDStr, String nodeName) throws CSErrorException;
-
-    void putVariable(String contextIDStr, String contextKey, LinkisVariable linkisVariable) throws CSErrorException;
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/utils/ContextServiceUtils.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/utils/ContextServiceUtils.java
deleted file mode 100644
index c106aea..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/utils/ContextServiceUtils.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.utils;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.cs.client.service.DefaultSearchService;
-import com.webank.wedatasphere.linkis.cs.client.service.SearchService;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.object.CSFlowInfos;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.CombinedNodeIDContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.CommonContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.utils.CSCommonUtils;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * @author peacewong
- * @date 2020/3/7 22:04
- */
-public class ContextServiceUtils {
-
-    private static final Logger logger = LoggerFactory.getLogger(ContextServiceUtils.class);
-
-    /**
-     * TODO get instances
-     */
-    private static SearchService commonSearchService = DefaultSearchService.getInstance();
-    
-    public static String getContextIDStrByMap(Map<String, Object> map){
-        String contextIDStr = null;
-        if (null != map){
-            Object value = map.get(CSCommonUtils.CONTEXT_ID_STR);
-            if (null != value){
-                contextIDStr = value.toString();
-                try {
-                    ContextID contextID = SerializeHelper.deserializeContextID(contextIDStr);
-                    //commonSearchService.getContextValue()
-                    if (contextID instanceof CombinedNodeIDContextID) {
-                        contextIDStr = SerializeHelper.serializeContextID(((CombinedNodeIDContextID) contextID).getLinkisHaWorkFlowContextID());
-                    }
-                } catch (ErrorException e) {
-                    logger.info("Failed to deserializeContextID", e);
-                }
-            }
-        }
-        return contextIDStr;
-    }
-
-
-    public static String getNodeNameStrByMap(Map<String, Object> map){
-        Object contextIDValue = map.get(CSCommonUtils.CONTEXT_ID_STR);
-        if (null == contextIDValue) {
-            return null;
-        }
-
-        String nodeName = null;
-        try {
-            if (null != map) {
-                Object value = map.get(CSCommonUtils.NODE_NAME_STR);
-                if (null != value) {
-                    nodeName = value.toString();
-
-                }
-            }
-            if (StringUtils.isBlank(nodeName)) {
-                nodeName = getNodeNameByCombinedNodeIDContextID(contextIDValue.toString());
-            }
-        } catch (Exception e) {
-            logger.info("Failed to get nodeName", e);
-        }
-        map.put(CSCommonUtils.NODE_NAME_STR, nodeName);
-        return nodeName;
-    }
-
-
-
-    public static String getContextIDStrByProperties(Properties properties){
-        String contextIDStr = null;
-        if (null != properties){
-            Object value = properties.get(CSCommonUtils.CONTEXT_ID_STR);
-            if (null != value) {
-                contextIDStr = value.toString();
-                try {
-                    ContextID contextID = SerializeHelper.deserializeContextID(contextIDStr);
-                    //commonSearchService.getContextValue()
-                    if (contextID instanceof CombinedNodeIDContextID) {
-                        contextIDStr = SerializeHelper.serializeContextID(((CombinedNodeIDContextID) contextID).getLinkisHaWorkFlowContextID());
-                    }
-                } catch (ErrorException e) {
-                    logger.info("Failed to deserializeContextID", e);
-                }
-            }
-        }
-        return contextIDStr;
-    }
-
-    public static String getNodeNameStrByProperties(Properties properties) {
-        Object contextIDValue = properties.get(CSCommonUtils.CONTEXT_ID_STR);
-        if (null == contextIDValue) {
-            return null;
-        }
-        String nodeName = null;
-
-        if (null != properties) {
-            Object value = properties.get(CSCommonUtils.NODE_NAME_STR);
-            if (null != value) {
-                nodeName = value.toString();
-            }
-        }
-        if (StringUtils.isBlank(nodeName)) {
-            nodeName = getNodeNameByCombinedNodeIDContextID(contextIDValue.toString());
-        }
-        properties.put(CSCommonUtils.NODE_NAME_STR, nodeName);
-        return nodeName;
-    }
-
-
-    public static String getNodeNameByCombinedNodeIDContextID(String contextIDStr){
-        String nodeName = null;
-        try {
-            ContextID contextID = SerializeHelper.deserializeContextID(contextIDStr);
-            //commonSearchService.getContextValue()
-            if (contextID instanceof CombinedNodeIDContextID){
-                logger.info("contextID{} is combinedNodeIDContextID", contextID.getContextId());
-                String nodeID = ((CombinedNodeIDContextID) contextID).getNodeID();
-                return getNodeNameByNodeID(SerializeHelper.serializeContextID(((CombinedNodeIDContextID) contextID).getLinkisHaWorkFlowContextID()), nodeID);
-            }
-        } catch (Exception e) {
-            logger.info("Failed to get nodeName", e);
-        }
-        return nodeName;
-    }
-
-    public static String getNodeNameByNodeID(String contextIDStr, String nodeID) {
-        if (StringUtils.isBlank(contextIDStr) || StringUtils.isBlank(nodeID)){
-            return null;
-        }
-        try {
-            ContextID contextID = SerializeHelper.deserializeContextID(contextIDStr);
-            ContextKey contextKey = new CommonContextKey();
-            contextKey.setContextType(ContextType.OBJECT);
-            contextKey.setContextScope(ContextScope.PUBLIC);
-            contextKey.setKey(CSCommonUtils.FLOW_INFOS);
-            CSFlowInfos csFlowInfos = commonSearchService.getContextValue(contextID, contextKey, CSFlowInfos.class);
-            if (null != csFlowInfos && null != csFlowInfos.getInfos()) {
-                Object idName = csFlowInfos.getInfos().get(CSCommonUtils.ID_NODE_NAME);
-                if (null != idName) {
-                    return ((Map<String, String>) idName).get(nodeID);
-                }
-            }
-        } catch (ErrorException e) {
-            logger.info("Failed to get nodeName ", e);
-        }
-        return null;
-    }
-
-    public static String createCombinedNodeIDContextID(String contextIDStr, String nodeID) throws ErrorException {
-        if (StringUtils.isNotBlank(contextIDStr) && StringUtils.isNotBlank(nodeID)){
-            ContextID contextID = SerializeHelper.deserializeContextID(contextIDStr);
-            if (null != contextID){
-                return SerializeHelper.serializeContextID(new CombinedNodeIDContextID(contextID, nodeID));
-            }
-        }
-        return null;
-    }
-
-   /* public static String[] getContextIDAndNodeName(Map<String, Object> map){
-        String contextIDStr = getContextIDStrByMap(map);
-        if (StringUtils.isBlank(contextIDStr)) {
-            return  null;
-        }
-
-    }*/
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/utils/ExceptionHelper.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/utils/ExceptionHelper.java
deleted file mode 100644
index 211469f..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/utils/ExceptionHelper.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.utils;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-
-/**
- * created by cooperyang on 2020/2/19
- * Description:
- */
-public class ExceptionHelper {
-    public static void throwErrorException(int errCode, String errMsg, Throwable t)throws ErrorException {
-        ErrorException errorException = new ErrorException(errCode, errMsg);
-        errorException.initCause(t);
-        throw errorException;
-    }
-}
diff --git a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/utils/SerializeHelper.java b/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/utils/SerializeHelper.java
deleted file mode 100644
index 51a100c..0000000
--- a/contextservice/cs-client/src/main/java/com/webank/wedatasphere/linkis/cs/client/utils/SerializeHelper.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.utils;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextValue;
-import com.webank.wedatasphere.linkis.cs.common.serialize.helper.ContextSerializationHelper;
-import com.webank.wedatasphere.linkis.cs.common.serialize.helper.SerializationHelper;
-import com.webank.wedatasphere.linkis.cs.listener.callback.imp.ContextKeyValueBean;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * created by cooperyang on 2020/2/23
- * Description:
- */
-public class SerializeHelper {
-
-
-    private static final Logger LOGGER = LoggerFactory.getLogger(SerializeHelper.class);
-
-    public static final SerializationHelper SERIALIZE_HELPER = ContextSerializationHelper.getInstance();
-
-    public static String serializeContextID(ContextID contextID) throws ErrorException{
-        return SERIALIZE_HELPER.serialize(contextID);
-    }
-
-    public static ContextID deserializeContextID(String contextIDStr) throws ErrorException{
-        return (ContextID) SERIALIZE_HELPER.deserialize(contextIDStr);
-    }
-
-
-
-    public static String serializeContextKey(ContextKey contextKey) throws ErrorException {
-        return SERIALIZE_HELPER.serialize(contextKey);
-    }
-
-
-
-    public static ContextKey deserializeContextKey(String contextKeyStr) throws ErrorException{
-        return (ContextKey)SERIALIZE_HELPER.deserialize(contextKeyStr);
-    }
-
-    public static String serializeContextValue(ContextValue contextValue) throws ErrorException{
-        return SERIALIZE_HELPER.serialize(contextValue);
-    }
-
-    public static ContextValue deserializeContextValue(String contextValueStr) throws ErrorException{
-        return (ContextValue)SERIALIZE_HELPER.deserialize(contextValueStr);
-    }
-
-    public static ContextKeyValueBean deserializeContextKVBean(String contextKVBeanStr) throws ErrorException{
-        return (ContextKeyValueBean)SERIALIZE_HELPER.deserialize(contextKVBeanStr);
-    }
-
-    public static ContextKeyValue deserializeContextKeyValue(String contextKVStr) throws ErrorException{
-        return (ContextKeyValue)SERIALIZE_HELPER.deserialize(contextKVStr);
-    }
-
-
-
-}
diff --git a/contextservice/cs-client/src/main/scala/com/webank/wedatasphere/linkis/cs/client/exception/ProtocolNotMatchException.scala b/contextservice/cs-client/src/main/scala/com/webank/wedatasphere/linkis/cs/client/exception/ProtocolNotMatchException.scala
deleted file mode 100644
index 684822b..0000000
--- a/contextservice/cs-client/src/main/scala/com/webank/wedatasphere/linkis/cs/client/exception/ProtocolNotMatchException.scala
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.exception
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException
-
-/**
- * created by cooperyang on 2020/2/18
- * Description:
- */
-case class ProtocolNotMatchException(errMsg:String) extends ErrorException(70059, errMsg)
diff --git a/contextservice/cs-client/src/main/scala/com/webank/wedatasphere/linkis/cs/client/http/ContextAction.scala b/contextservice/cs-client/src/main/scala/com/webank/wedatasphere/linkis/cs/client/http/ContextAction.scala
deleted file mode 100644
index d04dd12..0000000
--- a/contextservice/cs-client/src/main/scala/com/webank/wedatasphere/linkis/cs/client/http/ContextAction.scala
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.http
-
-import com.webank.wedatasphere.linkis
-import com.webank.wedatasphere.linkis.cs.client.utils.{ContextClientConf, ContextClientUtils, ContextServerHttpConf}
-import com.webank.wedatasphere.linkis.httpclient.request.{GetAction, POSTAction, UserAction}
-import org.apache.commons.text.StringEscapeUtils
-/**
- * created by cooperyang on 2020/2/11
- * Description:
- */
-trait ContextAction extends UserAction{
-
-  private var user:String = "hadoop"
-
-  override def setUser(user: String): Unit = this.user = user
-
-  override def getUser: String = this.user
-}
-
-abstract class ContextGETAction extends GetAction with ContextAction
-
-abstract class ContextPostAction extends POSTAction with ContextAction {
-  override def getRequestPayload: String = ContextClientUtils.gson.toJson(getRequestPayloads)
-}
-
-case class ContextCreateAction() extends ContextPostAction{
-
-  override def getURL: String = ContextServerHttpConf.createContextURL
-
-}
-
-case class ContextGetValueAction() extends ContextPostAction{
-  override def getURL: String = ContextServerHttpConf.getContextValueURL
-}
-
-
-case class ContextUpdateAction() extends ContextPostAction{
-
-  override def getURL: String = ContextServerHttpConf.updateContextURL
-
-}
-
-case class ContextSetKeyValueAction() extends ContextPostAction{
-
-  override def getURL: String = ContextServerHttpConf.setKeyValueURL
-
-}
-
-
-case class ContextResetValueAction() extends ContextPostAction{
-
-  override def getURL: String = ContextServerHttpConf.resetKeyValueURL
-
-}
-
-
-case class ContextResetIDAction() extends ContextPostAction{
-  override def getURL: String = ContextServerHttpConf.resetContextIdURL
-}
-
-
-case class ContextRemoveAction(contextId:String,
-                               contextKey:String) extends ContextPostAction with UserAction {
-
-  override def getURL: String = ContextServerHttpConf.removeValueURL
-
-}
-
-
-case class ContextBindIDAction() extends ContextPostAction{
-  override def getURL: String = ContextServerHttpConf.onBindIDURL
-}
-
-case class ContextBindKeyAction() extends ContextPostAction{
-  override def getURL: String = ContextServerHttpConf.onBindKeyURL
-}
-
-
-
-
-case class ContextFetchAction(contextId:String) extends ContextGETAction{
-  override def getURL: String = ContextServerHttpConf.getContextIDURL
-}
-
-case class ContextHeartBeatAction(client:String) extends ContextPostAction {
-  override def getURL: String = ContextServerHttpConf.heartBeatURL
-}
-
-
-case class ContextSearchContextAction() extends ContextPostAction{
-  override def getURL: String = ContextServerHttpConf.searchURL
-}
-
-case class DefaultContextPostAction(url:String) extends ContextPostAction{
-  // TODO:  类太多了,放一个default
-  override def getURL: String = url
-}
\ No newline at end of file
diff --git a/contextservice/cs-client/src/main/scala/com/webank/wedatasphere/linkis/cs/client/http/ContextResult.scala b/contextservice/cs-client/src/main/scala/com/webank/wedatasphere/linkis/cs/client/http/ContextResult.scala
deleted file mode 100644
index 09216ab..0000000
--- a/contextservice/cs-client/src/main/scala/com/webank/wedatasphere/linkis/cs/client/http/ContextResult.scala
+++ /dev/null
@@ -1,128 +0,0 @@
-/**
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.http
-
-import com.webank.wedatasphere.linkis.cs.listener.callback.imp.ContextKeyValueBean
-import com.webank.wedatasphere.linkis.httpclient.dws.annotation.DWSHttpMessageResult
-import com.webank.wedatasphere.linkis.httpclient.dws.response.DWSResult
-
-/**
- * created by cooperyang on 2020/2/11
- * Description:
- */
-abstract class ContextResult extends DWSResult
-
-
-@DWSHttpMessageResult("/api/rest_j/v\\d+/contextservice/createContextID")
-class ContextCreateResult extends ContextResult {
-  var contextId:String = _
-  def setContextId(contextId:String):Unit = this.contextId = contextId
-  def getContextId:String = this.contextId
-}
-
-@DWSHttpMessageResult("/api/rest_j/v\\d+/contextservice/resetValue")
-class ContextResetResult extends ContextResult {
-
-}
-
-@DWSHttpMessageResult("/api/rest_j/v\\d+/contextservice/setValueByKey")
-class ContextUpdateResult extends ContextResult {
-
-}
-@DWSHttpMessageResult("/api/rest_j/v\\d+/contextservice/getContext")
-class ContextGetResult extends ContextResult {
-  var contextId:String = _
-  var contextKeyValues:java.util.Map[String, String] = _
-
-  def setContextId(contextId:String):Unit = this.contextId = contextId
-  def getContextId:String = this.contextId
-
-  def setContextKeyValues(kvs:java.util.Map[String,String]):Unit = this.contextKeyValues = kvs
-  def getContextKeyValues:java.util.Map[String, String] = this.contextKeyValues
-
-}
-
-
-@DWSHttpMessageResult("/api/rest_j/v\\d+/contextservice/removeValue")
-class ContextRemoveResult extends ContextResult {
-
-}
-
-
-
-@DWSHttpMessageResult("/api/rest_j/v\\d+/contextservice/heartbeat")
-class ContextHeartBeatResult extends ContextResult {
-  import java.util
-  var contextKeyValueBeans:util.List[ContextKeyValueBean] = _
-  def setContextKeyValueBeans(kvs:util.List[ContextKeyValueBean]):Unit = this.contextKeyValueBeans= kvs
-  def getContextKeyValueBeans:util.List[ContextKeyValueBean] = this.contextKeyValueBeans;
-}
-
-
-
-
-@DWSHttpMessageResult("/api/rest_j/v\\d+/contextservice/setValue")
-class ContextSetKeyValueResult extends ContextResult {
-}
-
-
-@DWSHttpMessageResult("/api/rest_j/v\\d+/contextservice/removeAllValue")
-class ContextResetIDResult extends ContextResult {
-}
-
-
-@DWSHttpMessageResult("/api/rest_j/v\\d+/contextservice/removeValue")
-class ContextRemoveValueResult extends ContextResult {
-}
-
-@DWSHttpMessageResult("/api/rest_j/v\\d+/contextservice/onBindIDListener")
-class ContextBindIDResult extends ContextResult {
-}
-
-
-@DWSHttpMessageResult("/api/rest_j/v\\d+/contextservice/onBindKeyListener")
-class ContextBindKeyResult extends ContextResult {
-}
-
-@DWSHttpMessageResult("/api/rest_j/v\\d+/contextservice/searchContextValue")
-class ContextSearchResult extends ContextResult {
-}
-
-
-@DWSHttpMessageResult("/api/rest_j/v\\d+/contextservice/getContextValue")
-class ContextGetValueResult extends ContextResult {
-}
-
-// TODO: 用来匹配所有的void 不需要处理返回值的result
-@DWSHttpMessageResult("/api/rest_j/v\\d+/contextservice/(createHistory|removeHistory|removeAllValueByKeyPrefix|removeAllValueByKeyPrefixAndContextType)")
-class VoidResult extends ContextResult {
-}
-
-@DWSHttpMessageResult("/api/rest_j/v\\d+/contextservice/(getHistories|searchHistory)")
-class ContextHistoriesGetResult extends ContextResult {
-  var contextHistory:java.util.List[String] = _
-  def getContextHistory:java.util.List[String] = this.contextHistory
-  def setContextHistory(contextHistory:java.util.List[String])= this.contextHistory = contextHistory
-}
-
-@DWSHttpMessageResult("/api/rest_j/v\\d+/contextservice/getHistory")
-class ContextHistoryGetResult extends ContextResult {
-  var contextHistory:String = _
-  def getContextHistory:String = this.contextHistory
-  def setContextHistory(contextHistory:String)= this.contextHistory = contextHistory
-}
-
-
diff --git a/contextservice/cs-client/src/main/scala/com/webank/wedatasphere/linkis/cs/client/utils/ContextClientConf.scala b/contextservice/cs-client/src/main/scala/com/webank/wedatasphere/linkis/cs/client/utils/ContextClientConf.scala
deleted file mode 100644
index 2fc00ae..0000000
--- a/contextservice/cs-client/src/main/scala/com/webank/wedatasphere/linkis/cs/client/utils/ContextClientConf.scala
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.utils
-
-import com.webank.wedatasphere.linkis.common.conf.CommonVars
-
-/**
- * created by cooperyang on 2020/2/18
- * Description:
- */
-object ContextClientConf {
-  val LINKIS_WEB_VERSION:CommonVars[String] = CommonVars[String]("wds.linkis.web.version", "v1")
-
-
-  val CONTEXT_CLIENT_AUTH_KEY:CommonVars[String] = CommonVars[String]("wds.linkis.context.client.auth.key", "Token-Code")
-
-  val CONTEXT_CLIENT_AUTH_VALUE:CommonVars[String] = CommonVars[String]("wds.linkis.context.client.auth.value", "BML-AUTH")
-
-
-  val URL_PREFIX:CommonVars[String] = CommonVars[String]("wds.linkis.cs.url.prefix", "/api/rest_j/v1/contextservice", "cs服务的url前缀")
-
-  val CREATE_CONTEXT_URL:CommonVars[String] = CommonVars[String]("wds.linkis.cs.createcontext.url", "createContextID")
-
-  val SET_VALUE_BY_KEY_URL:CommonVars[String] = CommonVars[String]("wds.linkis.cs.setvaluebykey.url", "setValueByKey")
-
-  val SET_KEYVALUE_URL:CommonVars[String] = CommonVars[String]("wds.linkis.cs.setkeyvalue.url", "setValue")
-
-  val RESET_KEYVALUE_URL:CommonVars[String] = CommonVars[String]("wds.linkis.cs.resetkeyvalue.url", "resetValue")
-
-  val REMOVE_VALUE_URL:CommonVars[String] = CommonVars[String]("wds.linkis.cs.removeValue.url", "removeValue")
-
-  val RESET_CONTEXT_ID_URL:CommonVars[String] = CommonVars[String]("wds.linkis.cs.reset.contextid.url", "removeAllValue")
-
-  val HEART_BEAT_ENABLED:CommonVars[String] = CommonVars[String]("wds.linkis.cs.heartbeat.enabled", "true")
-
-}
diff --git a/contextservice/cs-client/src/main/scala/com/webank/wedatasphere/linkis/cs/client/utils/ContextClientUtils.scala b/contextservice/cs-client/src/main/scala/com/webank/wedatasphere/linkis/cs/client/utils/ContextClientUtils.scala
deleted file mode 100644
index f0b8953..0000000
--- a/contextservice/cs-client/src/main/scala/com/webank/wedatasphere/linkis/cs/client/utils/ContextClientUtils.scala
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.utils
-
-import java.lang
-import java.lang.reflect.Type
-
-import com.google.gson.{GsonBuilder, JsonElement, JsonPrimitive, JsonSerializationContext, JsonSerializer}
-
-/**
- * created by cooperyang on 2020/2/23
- * Description:
- */
-object ContextClientUtils {
-  implicit val gson = new GsonBuilder().setPrettyPrinting().setDateFormat("yyyy-MM-dd'T'HH:mm:ssZ").serializeNulls
-    .registerTypeAdapter(classOf[java.lang.Double], new JsonSerializer[java.lang.Double] {
-      override def serialize(t: lang.Double, `type`: Type, jsonSerializationContext: JsonSerializationContext): JsonElement =
-        if(t == t.longValue()) new JsonPrimitive(t.longValue()) else new JsonPrimitive(t)
-    }).create
-}
diff --git a/contextservice/cs-client/src/main/scala/com/webank/wedatasphere/linkis/cs/client/utils/ContextServerHttpConf.scala b/contextservice/cs-client/src/main/scala/com/webank/wedatasphere/linkis/cs/client/utils/ContextServerHttpConf.scala
deleted file mode 100644
index 474405d..0000000
--- a/contextservice/cs-client/src/main/scala/com/webank/wedatasphere/linkis/cs/client/utils/ContextServerHttpConf.scala
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.client.utils
-
-import com.webank.wedatasphere.linkis.common.conf.Configuration
-
-/**
-  * created by cooperyang on 2020/2/19
-  * Description:
-  */
-object ContextServerHttpConf {
-  val gatewayInstance: String = Configuration.getGateWayURL()
-  val urlPrefix: String = if (ContextClientConf.URL_PREFIX.getValue.endsWith("/")) {
-    ContextClientConf.URL_PREFIX.getValue.substring(0, ContextClientConf.URL_PREFIX.getValue.length - 1)
-  } else ContextClientConf.URL_PREFIX.getValue
-
-  val createContextURL:String = urlPrefix + "/" + ContextClientConf.CREATE_CONTEXT_URL.getValue
-
-  val updateContextURL:String = urlPrefix + "/" + ContextClientConf.SET_VALUE_BY_KEY_URL.getValue;
-
-  val setKeyValueURL:String = urlPrefix + "/" + ContextClientConf.SET_KEYVALUE_URL.getValue
-
-  val resetKeyValueURL:String = urlPrefix + "/" + ContextClientConf.RESET_KEYVALUE_URL.getValue
-
-  val removeValueURL:String = urlPrefix + "/" + ContextClientConf.REMOVE_VALUE_URL.getValue
-
-  val resetContextIdURL:String = urlPrefix + "/" +  ContextClientConf.RESET_CONTEXT_ID_URL.getValue
-
-  val onBindKeyURL:String = urlPrefix + "/" + "onBindKeyListener"
-
-  val onBindIDURL:String = urlPrefix + "/" + "onBindIDListener"
-
-  val getContextIDURL:String = urlPrefix + "/" + "getContextID"
-
-  val heartBeatURL:String = urlPrefix + "/" + "heartbeat"
-
-  val searchURL:String = urlPrefix + "/" + "searchContextValue"
-
-  val getContextValueURL:String = urlPrefix + "/" + "getContextValue"
-
-  val createContextHistory:String = urlPrefix + "/" + "createHistory"
-
-  val removeContextHistory:String = urlPrefix + "/" + "removeHistory"
-
-  val getContextHistories:String = urlPrefix + "/" + "getHistories"
-
-  val getContextHistory:String = urlPrefix + "/" + "getHistory"
-
-  val searchContextHistory:String = urlPrefix + "/" + "searchHistory"
-
-  val removeAllValueByKeyPrefixAndContextTypeURL: String = urlPrefix + "/" + "removeAllValueByKeyPrefixAndContextType"
-
-  val removeAllValueByKeyPrefixURL: String = urlPrefix + "/" + "removeAllValueByKeyPrefix"
-}
diff --git a/contextservice/cs-common/pom.xml b/contextservice/cs-common/pom.xml
deleted file mode 100644
index ea1ff39..0000000
--- a/contextservice/cs-common/pom.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>linkis-cs-common</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-common</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.commons</groupId>
-            <artifactId>commons-text</artifactId>
-            <version>1.6</version>
-        </dependency>
-        <dependency>
-            <groupId>org.reflections</groupId>
-            <artifactId>reflections</artifactId>
-            <version>0.9.10</version>
-        </dependency>
-
-        <dependency>
-            <groupId>com.google.code.gson</groupId>
-            <artifactId>gson</artifactId>
-        </dependency>
-
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>${basedir}/src/main/resources</directory>
-            </resource>
-        </resources>
-        <finalName>${project.artifactId}-${project.version}</finalName>
-    </build>
-</project>
\ No newline at end of file
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/annotation/KeywordMethod.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/annotation/KeywordMethod.java
deleted file mode 100644
index dcf96b7..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/annotation/KeywordMethod.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.annotation;
-
-import java.lang.annotation.*;
-
-
-/**
- * @author peacewong
- * @date 2020/2/9 16:15
- */
-@Target({ElementType.METHOD})
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-public @interface KeywordMethod {
-
-    String splitter() default "";
-
-    String regex() default "";
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/data/CSResultData.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/data/CSResultData.java
deleted file mode 100644
index bba746e..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/data/CSResultData.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.data;
-
-import com.webank.wedatasphere.linkis.common.io.FsPath;
-
-/**
- * @author peacewong
- * @date 2020/3/13 19:20
- */
-public class CSResultData implements Data {
-
-    private FsPath fsPath;
-
-    @Override
-    public FsPath getLocation() {
-        return null;
-    }
-
-    @Override
-    public void setLocation(FsPath fsPath) {
-
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/data/Data.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/data/Data.java
deleted file mode 100644
index 0b5dd0d..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/data/Data.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.data;
-
-import com.webank.wedatasphere.linkis.common.io.FsPath;
-
-/**
- * Created by patinousward on 2020/3/3.
- */
-public interface Data {
-
-    FsPath getLocation();
-
-    void setLocation(FsPath fsPath);
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/data/JobData.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/data/JobData.java
deleted file mode 100644
index 5ffa406..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/data/JobData.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.data;
-
-/**
- * @author peacewong
- * @date 2020/3/13 22:07
- */
-public interface JobData {
-
-    long getJobID();
-
-    void setJobID(long jobID);
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/data/LinkisJobData.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/data/LinkisJobData.java
deleted file mode 100644
index fe430d3..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/data/LinkisJobData.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.data;
-
-/**
- * @author peacewong
- * @date 2020/3/13 22:08
- */
-public class LinkisJobData implements JobData  {
-
-    private long jobID;
-
-    @Override
-    public long getJobID() {
-        return this.jobID;
-    }
-
-    @Override
-    public void setJobID(long jobID) {
-        this.jobID = jobID;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/enumeration/ContextScope.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/enumeration/ContextScope.java
deleted file mode 100644
index 135a9e0..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/enumeration/ContextScope.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.enumeration;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public enum ContextScope {
-    /**
-     *
-     */
-    PRIVATE,PUBLIC,PROTECTED,FRIENDLY
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/enumeration/ContextType.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/enumeration/ContextType.java
deleted file mode 100644
index fd65946..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/enumeration/ContextType.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.enumeration;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public enum ContextType {
-    /**
-     *
-     */
-    METADATA,DATA,RESOURCE,OBJECT,ENV,COST,UDF,Variable
-}
-
-
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/enumeration/DBType.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/enumeration/DBType.java
deleted file mode 100644
index f64aed5..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/enumeration/DBType.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.enumeration;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public enum DBType {
-    /**
-     *
-     */
-    CS,HIVE,MIDE,ES,HABSE
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/enumeration/ExpireType.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/enumeration/ExpireType.java
deleted file mode 100644
index 94dc29f..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/enumeration/ExpireType.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.enumeration;
-
-/**
- * Created by patinousward on 2020/2/12.
- */
-public enum ExpireType {
-    /**
-     *
-     */
-    TODAY(0), MAX_EXISTS_TIME(1), NEVER(2);
-
-    private Integer id;
-
-    ExpireType(Integer id) {
-        this.id = id;
-    }
-
-    public Integer getId() {
-        return this.id;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/enumeration/WorkType.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/enumeration/WorkType.java
deleted file mode 100644
index f8e4c23..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/enumeration/WorkType.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.enumeration;
-
-/**
- * @Author alexyang
- * @Date 2020/3/21
- */
-public enum WorkType {
-    WORKSPACE,
-    PROJECT,
-    FLOW,
-    NODE
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/env/Env.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/env/Env.java
deleted file mode 100644
index a4ff7cb..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/env/Env.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.env;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface Env {
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/env/OSEnv.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/env/OSEnv.java
deleted file mode 100644
index a5c86bd..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/env/OSEnv.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.env;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface OSEnv extends Env {
-
-    String getOs();
-
-    void setOs(String os);
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/env/SoftWareEnv.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/env/SoftWareEnv.java
deleted file mode 100644
index b06de4e..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/env/SoftWareEnv.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.env;
-
-/**
- * Created by patinousward on 2020/3/3.
- */
-public interface SoftWareEnv {
-
-    String getSoftware();
-
-    void setSoftware(String software);
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/env/SoftwareLibEnv.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/env/SoftwareLibEnv.java
deleted file mode 100644
index 5f66cf6..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/env/SoftwareLibEnv.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.env;
-
-/**
- * Created by patinousward on 2020/3/3.
- */
-public interface SoftwareLibEnv extends Env {
-
-    String getLib();
-
-    void setLib(String lib);
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/listener/CommonContextIDListenerDomain.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/listener/CommonContextIDListenerDomain.java
deleted file mode 100644
index ec73fa4..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/listener/CommonContextIDListenerDomain.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.listener;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-
-/**
- * Created by patinousward on 2020/2/28.
- */
-public class CommonContextIDListenerDomain implements ContextIDListenerDomain {
-    
-    private String source;
-
-    private ContextID contextID;
-
-    @Override
-    public String getSource() {
-        return this.source;
-    }
-
-    @Override
-    public void setSource(String source) {
-        this.source = source;
-    }
-
-    @Override
-    public ContextID getContextID() {
-        return this.contextID;
-    }
-
-    @Override
-    public void setContextID(ContextID contextID) {
-        this.contextID = contextID;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/listener/CommonContextKeyListenerDomain.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/listener/CommonContextKeyListenerDomain.java
deleted file mode 100644
index 4cc2ad4..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/listener/CommonContextKeyListenerDomain.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.listener;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-
-/**
- * Created by patinousward on 2020/2/28.
- */
-public class CommonContextKeyListenerDomain implements ContextKeyListenerDomain {
-    
-    private String source;
-
-    private ContextKey contextKey;
-
-    private ContextID contextID;
-
-    public ContextID getContextID() {
-        return contextID;
-    }
-
-    public void setContextID(ContextID contextID) {
-        this.contextID = contextID;
-    }
-
-
-
-    @Override
-    public String getSource() {
-        return this.source;
-    }
-
-    @Override
-    public void setSource(String source) {
-        this.source = source;
-    }
-
-    @Override
-    public ContextKey getContextKey() {
-        return this.contextKey;
-    }
-
-    @Override
-    public void setContextKey(ContextKey contextKey) {
-        this.contextKey = contextKey;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/listener/ContextIDListenerDomain.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/listener/ContextIDListenerDomain.java
deleted file mode 100644
index 5c9c761..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/listener/ContextIDListenerDomain.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.listener;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface ContextIDListenerDomain extends ListenerDomain {
-
-    ContextID getContextID();
-
-    void setContextID(ContextID contextID);
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/listener/ContextKeyListenerDomain.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/listener/ContextKeyListenerDomain.java
deleted file mode 100644
index e87ba82..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/listener/ContextKeyListenerDomain.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.listener;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface ContextKeyListenerDomain extends ListenerDomain {
-
-    ContextKey getContextKey();
-
-    void setContextKey(ContextKey contextKey);
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/listener/ListenerDomain.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/listener/ListenerDomain.java
deleted file mode 100644
index 054b09c..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/listener/ListenerDomain.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.listener;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface ListenerDomain {
-
-    String getSource();
-
-    void setSource(String source);
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/metadata/CSColumn.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/metadata/CSColumn.java
deleted file mode 100644
index 469a17f..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/metadata/CSColumn.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.metadata;
-
-import com.webank.wedatasphere.linkis.cs.common.annotation.KeywordMethod;
-
-/**
- * Created by patinousward on 2020/3/3.
- */
-public class CSColumn implements Column {
-
-    private String name;
-    private String alias;
-    private String type;
-    private String comment;
-    private String express;
-    private String rule;
-    private Boolean isPrimary;
-    private Integer length;
-
-    @Override
-    public Integer getLength() {
-        return length;
-    }
-
-    @Override
-    public void setLength(Integer length) {
-        this.length = length;
-    }
-
-    @Override
-    @KeywordMethod
-    public String getName() {
-        return name;
-    }
-
-    @Override
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    @Override
-    public String getAlias() {
-        return alias;
-    }
-
-    @Override
-    public void setAlias(String alias) {
-        this.alias = alias;
-    }
-
-    @Override
-    public String getType() {
-        return type;
-    }
-
-    @Override
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    @Override
-    public String getComment() {
-        return comment;
-    }
-
-    @Override
-    public void setComment(String comment) {
-        this.comment = comment;
-    }
-
-    @Override
-    public String getExpress() {
-        return express;
-    }
-
-    @Override
-    public void setExpress(String express) {
-        this.express = express;
-    }
-
-    @Override
-    public String getRule() {
-        return rule;
-    }
-
-    @Override
-    public void setRule(String rule) {
-        this.rule = rule;
-    }
-
-    @Override
-    public Boolean getPrimary() {
-        return isPrimary;
-    }
-
-    @Override
-    public void setPrimary(Boolean primary) {
-        isPrimary = primary;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/metadata/CSDB.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/metadata/CSDB.java
deleted file mode 100644
index d79b063..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/metadata/CSDB.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.metadata;
-
-import com.webank.wedatasphere.linkis.cs.common.annotation.KeywordMethod;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.DBType;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public class CSDB implements DB {
-
-    private String name;
-
-    private DBType dbType;
-
-    private String[] lables;
-
-    private String comment;
-
-    private String owners;
-
-    public static DB build() {
-        return null;
-    }
-
-    ;
-
-    @Override
-    @KeywordMethod
-    public String getName() {
-        return this.name;
-    }
-
-    @Override
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    @Override
-    public DBType getDbType() {
-        return this.dbType;
-    }
-
-    @Override
-    public void setDbType(DBType dbType) {
-        this.dbType = dbType;
-    }
-
-    @Override
-    @KeywordMethod
-    public String getOwners() {
-        return this.owners;
-    }
-
-    @Override
-    public void setOwners(String owners) {
-        this.owners = owners;
-    }
-
-    @Override
-    public String getComment() {
-        return this.comment;
-    }
-
-    @Override
-    public void setComment(String comment) {
-        this.comment = comment;
-    }
-
-    @Override
-    public String[] getLables() {
-        return this.lables;
-    }
-
-    @Override
-    public void setLables(String[] lables) {
-        this.lables = lables;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/metadata/CSPartition.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/metadata/CSPartition.java
deleted file mode 100644
index 6bc0cfc..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/metadata/CSPartition.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.metadata;
-
-import com.webank.wedatasphere.linkis.cs.common.annotation.KeywordMethod;
-
-import java.util.List;
-
-/**
- * Created by patinousward on 2020/3/4.
- */
-public class CSPartition implements Partition {
-
-    private String name;
-    private String alias;
-    private String type;
-    private String comment;
-    private String express;
-    private String rule;
-    private Boolean isPrimary;
-    private Integer length;
-    private List<String> value;
-
-
-    @Override
-    public Integer getLength() {
-        return length;
-    }
-
-    @Override
-    public void setLength(Integer length) {
-        this.length = length;
-    }
-
-    @Override
-    @KeywordMethod
-    public String getName() {
-        return name;
-    }
-
-    @Override
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    @Override
-    public String getAlias() {
-        return alias;
-    }
-
-    @Override
-    public void setAlias(String alias) {
-        this.alias = alias;
-    }
-
-    @Override
-    public String getType() {
-        return type;
-    }
-
-    @Override
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    @Override
-    public String getComment() {
-        return comment;
-    }
-
-    @Override
-    public void setComment(String comment) {
-        this.comment = comment;
-    }
-
-    @Override
-    public String getExpress() {
-        return express;
-    }
-
-    @Override
-    public void setExpress(String express) {
-        this.express = express;
-    }
-
-    @Override
-    public String getRule() {
-        return rule;
-    }
-
-    @Override
-    public void setRule(String rule) {
-        this.rule = rule;
-    }
-
-    @Override
-    public Boolean getPrimary() {
-        return isPrimary;
-    }
-
-    @Override
-    public void setPrimary(Boolean primary) {
-        isPrimary = primary;
-    }
-
-    public List<String> getValue() {
-        return value;
-    }
-
-    public void setValue(List<String> value) {
-        this.value = value;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/metadata/CSTable.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/metadata/CSTable.java
deleted file mode 100644
index 876e163..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/metadata/CSTable.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.metadata;
-
-import com.webank.wedatasphere.linkis.cs.common.annotation.KeywordMethod;
-
-import java.util.Date;
-import java.util.List;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public class CSTable implements Table {
-
-    private String name;
-    private String alias;
-    private String creator;
-    private String comment;
-    private Date createTime;
-    private String productName;
-    private String projectName;
-    private String usage;
-    private Integer lifecycle;
-    private Integer useWay;
-    private Boolean isImport;
-    private Integer modelLevel;
-    private Boolean isExternalUse;
-    private Boolean isPartitionTable;
-    private Boolean isAvailable;
-    private Boolean isView;
-    private String location;
-    private CSColumn[] columns;
-    private List<CSPartition> partitions;
-    private CSDB db;
-
-    @Override
-    @KeywordMethod
-    public String getName() {
-        return name;
-    }
-
-    @Override
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    @Override
-    public String getAlias() {
-        return alias;
-    }
-
-    @KeywordMethod
-    public String getLocation() {
-        return location;
-    }
-
-    public void setLocation(String location) {
-        this.location = location;
-    }
-
-    @Override
-    public void setAlias(String alias) {
-        this.alias = alias;
-    }
-
-    @Override
-    public String getCreator() {
-        return creator;
-    }
-
-    @Override
-    public void setCreator(String creator) {
-        this.creator = creator;
-    }
-
-    @Override
-    public String getComment() {
-        return comment;
-    }
-
-    @Override
-    public void setComment(String comment) {
-        this.comment = comment;
-    }
-
-    @Override
-    public Date getCreateTime() {
-        return createTime;
-    }
-
-    @Override
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
-
-    @Override
-    public String getProductName() {
-        return productName;
-    }
-
-    @Override
-    public void setProductName(String productName) {
-        this.productName = productName;
-    }
-
-    @Override
-    public String getProjectName() {
-        return projectName;
-    }
-
-    @Override
-    public void setProjectName(String projectName) {
-        this.projectName = projectName;
-    }
-
-    @Override
-    public String getUsage() {
-        return usage;
-    }
-
-    @Override
-    public void setUsage(String usage) {
-        this.usage = usage;
-    }
-
-    @Override
-    public Integer getLifecycle() {
-        return lifecycle;
-    }
-
-    @Override
-    public void setLifecycle(Integer lifecycle) {
-        this.lifecycle = lifecycle;
-    }
-
-    @Override
-    public Integer getUseWay() {
-        return useWay;
-    }
-
-    @Override
-    public void setUseWay(Integer useWay) {
-        this.useWay = useWay;
-    }
-
-    @Override
-    public Boolean getImport() {
-        return isImport;
-    }
-
-    @Override
-    public void setImport(Boolean anImport) {
-        isImport = anImport;
-    }
-
-    @Override
-    public Integer getModelLevel() {
-        return modelLevel;
-    }
-
-    @Override
-    public void setModelLevel(Integer modelLevel) {
-        this.modelLevel = modelLevel;
-    }
-
-    @Override
-    public Boolean getExternalUse() {
-        return isExternalUse;
-    }
-
-    @Override
-    public void setExternalUse(Boolean externalUse) {
-        isExternalUse = externalUse;
-    }
-
-    @Override
-    public Boolean getPartitionTable() {
-        return isPartitionTable;
-    }
-
-    @Override
-    public void setPartitionTable(Boolean partitionTable) {
-        isPartitionTable = partitionTable;
-    }
-
-    @Override
-    public Boolean getAvailable() {
-        return isAvailable;
-    }
-
-    @Override
-    public void setAvailable(Boolean available) {
-        isAvailable = available;
-    }
-
-    public Boolean isView() {
-        return this.isView;
-    }
-
-    @Override
-    public Boolean getView() {
-        return isView;
-    }
-
-    @Override
-    public void setView(Boolean view) {
-        isView = view;
-    }
-
-    @Override
-    public CSColumn[] getColumns() {
-        return this.columns;
-    }
-
-    @Override
-    public void setColumns(CSColumn[] columns) {
-        this.columns = columns;
-    }
-
-
-    @Override
-    public List<CSPartition> getPartitions() {
-        return partitions;
-    }
-
-    @Override
-    public void setPartitions(List<CSPartition> partitions) {
-        this.partitions = partitions;
-    }
-
-    @Override
-    public CSDB getDb() {
-        return db;
-    }
-
-    @Override
-    public void setDb(CSDB db) {
-        this.db = db;
-    }
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/metadata/Column.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/metadata/Column.java
deleted file mode 100644
index 902ef0c..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/metadata/Column.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.metadata;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface Column {
-
-    Integer getLength();
-
-    void setLength(Integer length);
-
-    String getName();
-
-    void setName(String name);
-
-    String getAlias();
-
-    void setAlias(String alias);
-
-    String getType();
-
-    void setType(String type);
-
-    String getComment();
-
-    void setComment(String comment);
-
-    String getExpress();
-
-    void setExpress(String express);
-
-    String getRule();
-
-    void setRule(String rule);
-
-    Boolean getPrimary();
-
-    void setPrimary(Boolean primary);
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/metadata/DB.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/metadata/DB.java
deleted file mode 100644
index 3e468f2..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/metadata/DB.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.metadata;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.DBType;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface DB {
-
-    String getName();
-
-    void setName(String name);
-
-    DBType getDbType();
-
-    void setDbType(DBType dbType);
-
-    String getOwners();
-
-    void setOwners(String owners);
-
-    String getComment();
-
-    void setComment(String comment);
-
-    String[] getLables();
-
-    void setLables(String[] lables);
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/metadata/Partition.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/metadata/Partition.java
deleted file mode 100644
index 4790595..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/metadata/Partition.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.metadata;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface Partition {
-
-    Integer getLength();
-
-    void setLength(Integer length);
-
-    String getName();
-
-    void setName(String name);
-
-    String getAlias();
-
-    void setAlias(String alias);
-
-    String getType();
-
-    void setType(String type);
-
-    String getComment();
-
-    void setComment(String comment);
-
-    String getExpress();
-
-    void setExpress(String express);
-
-    String getRule();
-
-    void setRule(String rule);
-
-    Boolean getPrimary();
-
-    void setPrimary(Boolean primary);
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/metadata/Table.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/metadata/Table.java
deleted file mode 100644
index 69e1efb..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/metadata/Table.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.metadata;
-
-import java.util.Date;
-import java.util.List;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface Table {
-
-    String getName();
-
-    void setName(String name);
-
-    String getAlias();
-
-    void setAlias(String alias);
-
-    String getCreator();
-
-    void setCreator(String creator);
-
-    String getComment();
-
-    void setComment(String comment);
-
-    Date getCreateTime();
-
-    void setCreateTime(Date createTime);
-
-    String getProductName();
-
-    void setProductName(String productName);
-
-    String getProjectName();
-
-    void setProjectName(String projectName);
-
-    String getUsage();
-
-    void setUsage(String usage);
-
-    Integer getLifecycle();
-
-    void setLifecycle(Integer lifecycle);
-
-    Integer getUseWay();
-
-    void setUseWay(Integer useWay);
-
-    Boolean getImport();
-
-    void setImport(Boolean anImport);
-
-    Integer getModelLevel();
-
-    void setModelLevel(Integer modelLevel);
-
-    Boolean getExternalUse();
-
-    void setExternalUse(Boolean externalUse);
-
-    Boolean getPartitionTable();
-
-    void setPartitionTable(Boolean partitionTable);
-
-    Boolean getAvailable();
-
-    void setAvailable(Boolean available);
-
-    Boolean getView();
-
-    CSDB getDb();
-
-    void setDb(CSDB db);
-
-    void setView(Boolean view);
-
-    CSColumn[] getColumns();
-
-    void setColumns(CSColumn[] columns);
-
-    List<CSPartition> getPartitions();
-
-    void setPartitions(List<CSPartition> partitions);
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/object/CSFlowInfos.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/object/CSFlowInfos.java
deleted file mode 100644
index 4471c7a..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/object/CSFlowInfos.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.object;
-
-import java.util.Map;
-
-/**
- * @author peacewong
- * @date 2020/3/10 11:36
- */
-public class CSFlowInfos implements CSInfos {
-
-    private Map<String, Object> infos;
-
-
-    @Override
-    public Map<String, Object> getInfos() {
-        return this.infos;
-    }
-
-    @Override
-    public void setInfos(Map<String, Object> infos) {
-        this.infos = infos;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/object/CSInfos.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/object/CSInfos.java
deleted file mode 100644
index a3afdbc..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/object/CSInfos.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.object;
-
-import java.util.Map;
-
-/**
- * @author peacewong
- * @date 2020/3/10 11:35
- */
-public interface CSInfos {
-
-    Map<String, Object> getInfos();
-
-    void setInfos(Map<String, Object> infos);
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/object/CSProperty.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/object/CSProperty.java
deleted file mode 100644
index 80bef85..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/object/CSProperty.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.object;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface CSProperty {
-
-    String getKey();
-
-    void setKey(String key);
-
-    String getValue();
-
-    void setValue(String value);
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/object/CommonGlobalConfiguration.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/object/CommonGlobalConfiguration.java
deleted file mode 100644
index b37f6ae..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/object/CommonGlobalConfiguration.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.object;
-
-/**
- * Created by patinousward on 2020/3/3.
- */
-public class CommonGlobalConfiguration extends CommonProperty {
-
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/object/CommonProperty.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/object/CommonProperty.java
deleted file mode 100644
index 635dabd..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/object/CommonProperty.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.object;
-
-import com.webank.wedatasphere.linkis.cs.common.annotation.KeywordMethod;
-
-/**
- * Created by patinousward on 2020/3/3.
- */
-public class CommonProperty implements CSProperty {
-
-    private String key;
-
-    private String value;
-
-
-    @Override
-    @KeywordMethod
-    public String getKey() {
-        return this.key;
-    }
-
-    @Override
-    public void setKey(String key) {
-        this.key = key;
-    }
-
-    @Override
-    public String getValue() {
-        return this.value;
-    }
-
-    @Override
-    public void setValue(String value) {
-        this.value = value;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/object/LinkisVariable.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/object/LinkisVariable.java
deleted file mode 100644
index 793af76..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/object/LinkisVariable.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.object;
-
-/**
- * @author peacewong
- * @date 2020/3/4 20:02
- */
-public class LinkisVariable extends CommonProperty {
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/resource/BMLResource.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/resource/BMLResource.java
deleted file mode 100644
index 9626c5e..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/resource/BMLResource.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.resource;
-
-import com.webank.wedatasphere.linkis.cs.common.annotation.KeywordMethod;
-
-import java.util.Date;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface BMLResource extends Resource {
-
-    @KeywordMethod
-    String getResourceId();
-
-    String getVersion();
-
-    String getUser();
-
-    void setUser(String user);
-
-    String getSystem();
-
-    void setSystem(String system);
-
-    Boolean getEnableFlag();
-
-    void setEnableFlag(Boolean enableFlag);
-
-    Boolean getPrivate();
-
-    void setPrivate(Boolean aPrivate);
-
-    String getResourceHeader();
-
-    void setResourceHeader(String resourceHeader);
-
-    @KeywordMethod
-    String getDownloadedFileName();
-
-    void setDownloadedFileName(String downloadedFileName);
-
-    String getSys();
-
-    void setSys(String sys);
-
-    Date getCreateTime();
-
-    void setCreateTime(Date createTime);
-
-    Boolean getExpire();
-
-    void setExpire(Boolean expire);
-
-    String getExpireType();
-
-    void setExpireType(String expireType);
-
-    String getExpireTime();
-
-    void setExpireTime(String expireTime);
-
-    Date getUpdateTime();
-
-    void setUpdateTime(Date updateTime);
-
-    String getUpdator();
-
-    void setUpdator(String updator);
-
-    Integer getMaxVersion();
-
-    void setMaxVersion(Integer maxVersion);
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/resource/CommonFxResource.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/resource/CommonFxResource.java
deleted file mode 100644
index b3545f1..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/resource/CommonFxResource.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.resource;
-
-import com.webank.wedatasphere.linkis.cs.common.annotation.KeywordMethod;
-
-import java.util.Date;
-
-/**
- * Created by patinousward on 2020/3/3.
- */
-public class CommonFxResource implements FxResource {
-
-    private String createUser;
-    private String udfName;
-    private Integer udfType;
-    private String path;
-    private String registerFormat;
-    private String useFormat;
-    private String description;
-    private Boolean isExpire;
-    private Boolean isShared;
-    private Long treeId;
-    private Date createTime;
-    private Date updateTime;
-    private Boolean isLoad;
-
-    @Override
-    @KeywordMethod
-    public String getCreateUser() {
-        return createUser;
-    }
-
-    @Override
-    public void setCreateUser(String createUser) {
-        this.createUser = createUser;
-    }
-
-    @Override
-    @KeywordMethod
-    public String getUdfName() {
-        return udfName;
-    }
-
-    @Override
-    public void setUdfName(String udfName) {
-        this.udfName = udfName;
-    }
-
-    @Override
-    @KeywordMethod
-    public Integer getUdfType() {
-        return udfType;
-    }
-
-    @Override
-    public void setUdfType(Integer udfType) {
-        this.udfType = udfType;
-    }
-
-    @Override
-    public String getPath() {
-        return path;
-    }
-
-    @Override
-    public void setPath(String path) {
-        this.path = path;
-    }
-
-    @Override
-    public String getRegisterFormat() {
-        return registerFormat;
-    }
-
-    @Override
-    public void setRegisterFormat(String registerFormat) {
-        this.registerFormat = registerFormat;
-    }
-
-    @Override
-    public String getUseFormat() {
-        return useFormat;
-    }
-
-    @Override
-    public void setUseFormat(String useFormat) {
-        this.useFormat = useFormat;
-    }
-
-    @Override
-    public String getDescription() {
-        return description;
-    }
-
-    @Override
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    @Override
-    public Boolean getExpire() {
-        return isExpire;
-    }
-
-    @Override
-    public void setExpire(Boolean expire) {
-        isExpire = expire;
-    }
-
-    @Override
-    public Boolean getShared() {
-        return isShared;
-    }
-
-    @Override
-    public void setShared(Boolean shared) {
-        isShared = shared;
-    }
-
-    @Override
-    public Long getTreeId() {
-        return treeId;
-    }
-
-    @Override
-    public void setTreeId(Long treeId) {
-        this.treeId = treeId;
-    }
-
-    @Override
-    public Date getCreateTime() {
-        return createTime;
-    }
-
-    @Override
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
-
-    @Override
-    public Date getUpdateTime() {
-        return updateTime;
-    }
-
-    @Override
-    public void setUpdateTime(Date updateTime) {
-        this.updateTime = updateTime;
-    }
-
-    @Override
-    public Boolean getLoad() {
-        return isLoad;
-    }
-
-    @Override
-    public void setLoad(Boolean load) {
-        isLoad = load;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/resource/CommonUDFResource.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/resource/CommonUDFResource.java
deleted file mode 100644
index bc4394a..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/resource/CommonUDFResource.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.resource;
-
-import com.webank.wedatasphere.linkis.cs.common.annotation.KeywordMethod;
-
-import java.util.Date;
-
-/**
- * Created by patinousward on 2020/3/3.
- */
-public class CommonUDFResource implements FxResource {
-
-    private String createUser;
-    private String udfName;
-    private Integer udfType;
-    private String path;
-    private String registerFormat;
-    private String useFormat;
-    private String description;
-    private Boolean isExpire;
-    private Boolean isShared;
-    private Long treeId;
-    private Date createTime;
-    private Date updateTime;
-    private Boolean isLoad;
-
-    @Override
-    @KeywordMethod
-    public String getCreateUser() {
-        return createUser;
-    }
-
-    @Override
-    public void setCreateUser(String createUser) {
-        this.createUser = createUser;
-    }
-
-    @Override
-    @KeywordMethod
-    public String getUdfName() {
-        return udfName;
-    }
-
-    @Override
-    public void setUdfName(String udfName) {
-        this.udfName = udfName;
-    }
-
-    @Override
-    @KeywordMethod
-    public Integer getUdfType() {
-        return udfType;
-    }
-
-    @Override
-    public void setUdfType(Integer udfType) {
-        this.udfType = udfType;
-    }
-
-    @Override
-    public String getPath() {
-        return path;
-    }
-
-    @Override
-    public void setPath(String path) {
-        this.path = path;
-    }
-
-    @Override
-    public String getRegisterFormat() {
-        return registerFormat;
-    }
-
-    @Override
-    public void setRegisterFormat(String registerFormat) {
-        this.registerFormat = registerFormat;
-    }
-
-    @Override
-    public String getUseFormat() {
-        return useFormat;
-    }
-
-    @Override
-    public void setUseFormat(String useFormat) {
-        this.useFormat = useFormat;
-    }
-
-    @Override
-    public String getDescription() {
-        return description;
-    }
-
-    @Override
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    @Override
-    public Boolean getExpire() {
-        return isExpire;
-    }
-
-    @Override
-    public void setExpire(Boolean expire) {
-        isExpire = expire;
-    }
-
-    @Override
-    public Boolean getShared() {
-        return isShared;
-    }
-
-    @Override
-    public void setShared(Boolean shared) {
-        isShared = shared;
-    }
-
-    @Override
-    public Long getTreeId() {
-        return treeId;
-    }
-
-    @Override
-    public void setTreeId(Long treeId) {
-        this.treeId = treeId;
-    }
-
-    @Override
-    public Date getCreateTime() {
-        return createTime;
-    }
-
-    @Override
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
-
-    @Override
-    public Date getUpdateTime() {
-        return updateTime;
-    }
-
-    @Override
-    public void setUpdateTime(Date updateTime) {
-        this.updateTime = updateTime;
-    }
-
-    @Override
-    public Boolean getLoad() {
-        return isLoad;
-    }
-
-    @Override
-    public void setLoad(Boolean load) {
-        isLoad = load;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/resource/FxResource.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/resource/FxResource.java
deleted file mode 100644
index 0c26f7f..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/resource/FxResource.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.resource;
-
-import java.util.Date;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface FxResource extends Resource {
-
-    String getCreateUser();
-
-    void setCreateUser(String createUser);
-
-    String getUdfName();
-
-    void setUdfName(String udfName);
-
-    Integer getUdfType();
-
-    void setUdfType(Integer udfType);
-
-    String getPath();
-
-    void setPath(String path);
-
-    String getRegisterFormat();
-
-    void setRegisterFormat(String registerFormat);
-
-    String getUseFormat();
-
-    void setUseFormat(String useFormat);
-
-    String getDescription();
-
-    void setDescription(String description);
-
-    Boolean getExpire();
-
-    void setExpire(Boolean expire);
-
-    Boolean getShared();
-
-    void setShared(Boolean shared);
-
-    Long getTreeId();
-
-    void setTreeId(Long treeId);
-
-    Date getCreateTime();
-
-    void setCreateTime(Date createTime);
-
-    Date getUpdateTime();
-
-    void setUpdateTime(Date updateTime);
-
-    Boolean getLoad();
-
-    void setLoad(Boolean load);
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/resource/LinkisBMLResource.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/resource/LinkisBMLResource.java
deleted file mode 100644
index 7431c65..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/resource/LinkisBMLResource.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.resource;
-
-import com.webank.wedatasphere.linkis.cs.common.annotation.KeywordMethod;
-
-import java.util.Date;
-
-/**
- * created by cooperyang on 2020/2/27
- * Description:
- */
-public class LinkisBMLResource implements BMLResource {
-
-
-    private String resourceId;
-
-    private String version;
-
-    private Boolean isPrivate;
-
-    private String resourceHeader;
-
-    private String downloadedFileName;
-
-    private String sys;
-
-    private Date createTime;
-
-    private Boolean isExpire;
-
-    private String expireType;
-
-    private String expireTime;
-
-    private Date updateTime;
-
-    private String updator;
-
-    private Integer maxVersion;
-
-    private String user;
-
-    private String system;
-
-    private Boolean enableFlag;
-
-    @Override
-    public Boolean getPrivate() {
-        return isPrivate;
-    }
-
-    @Override
-    public void setPrivate(Boolean aPrivate) {
-        isPrivate = aPrivate;
-    }
-
-    @Override
-    public String getResourceHeader() {
-        return resourceHeader;
-    }
-
-    @Override
-    public void setResourceHeader(String resourceHeader) {
-        this.resourceHeader = resourceHeader;
-    }
-
-    @Override
-    public String getDownloadedFileName() {
-        return downloadedFileName;
-    }
-
-    @Override
-    public void setDownloadedFileName(String downloadedFileName) {
-        this.downloadedFileName = downloadedFileName;
-    }
-
-    @Override
-    public String getSys() {
-        return sys;
-    }
-
-    @Override
-    public void setSys(String sys) {
-        this.sys = sys;
-    }
-
-    @Override
-    public Date getCreateTime() {
-        return createTime;
-    }
-
-    @Override
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
-
-    @Override
-    public Boolean getExpire() {
-        return isExpire;
-    }
-
-    @Override
-    public void setExpire(Boolean expire) {
-        isExpire = expire;
-    }
-
-    @Override
-    public String getExpireType() {
-        return expireType;
-    }
-
-    @Override
-    public void setExpireType(String expireType) {
-        this.expireType = expireType;
-    }
-
-    @Override
-    public String getExpireTime() {
-        return expireTime;
-    }
-
-    @Override
-    public void setExpireTime(String expireTime) {
-        this.expireTime = expireTime;
-    }
-
-    @Override
-    public Date getUpdateTime() {
-        return updateTime;
-    }
-
-    @Override
-    public void setUpdateTime(Date updateTime) {
-        this.updateTime = updateTime;
-    }
-
-    @Override
-    public String getUpdator() {
-        return updator;
-    }
-
-    @Override
-    public void setUpdator(String updator) {
-        this.updator = updator;
-    }
-
-    @Override
-    public Integer getMaxVersion() {
-        return maxVersion;
-    }
-
-    @Override
-    public void setMaxVersion(Integer maxVersion) {
-        this.maxVersion = maxVersion;
-    }
-
-    @Override
-    public String getUser() {
-        return user;
-    }
-
-    @Override
-    public void setUser(String user) {
-        this.user = user;
-    }
-
-    @Override
-    public String getSystem() {
-        return system;
-    }
-
-    @Override
-    public void setSystem(String system) {
-        this.system = system;
-    }
-
-    @Override
-    public Boolean getEnableFlag() {
-        return enableFlag;
-    }
-
-    @Override
-    public void setEnableFlag(Boolean enableFlag) {
-        this.enableFlag = enableFlag;
-    }
-
-    @Override
-    @KeywordMethod
-    public String getResourceId() {
-        return this.resourceId;
-    }
-
-    @Override
-    @KeywordMethod
-    public String getVersion() {
-        return this.version;
-    }
-
-    public void setResourceId(String resourceId) {
-        this.resourceId = resourceId;
-    }
-
-    public void setVersion(String version) {
-        this.version = version;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/resource/Resource.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/resource/Resource.java
deleted file mode 100644
index 4259d62..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/resource/Resource.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.resource;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ValueBean;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface Resource {
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/resource/UDFResource.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/resource/UDFResource.java
deleted file mode 100644
index e8e89bd..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/resource/UDFResource.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.resource;
-
-import java.util.Date;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface UDFResource extends Resource {
-
-    String getCreateUser();
-
-    void setCreateUser(String createUser);
-
-    String getUdfName();
-
-    void setUdfName(String udfName);
-
-    Integer getUdfType();
-
-    void setUdfType(Integer udfType);
-
-    String getPath();
-
-    void setPath(String path);
-
-    String getRegisterFormat();
-
-    void setRegisterFormat(String registerFormat);
-
-    String getUseFormat();
-
-    void setUseFormat(String useFormat);
-
-    String getDescription();
-
-    void setDescription(String description);
-
-    Boolean getExpire();
-
-    void setExpire(Boolean expire);
-
-    Boolean getShared();
-
-    void setShared(Boolean shared);
-
-    Long getTreeId();
-
-    void setTreeId(Long treeId);
-
-    Date getCreateTime();
-
-    void setCreateTime(Date createTime);
-
-    Date getUpdateTime();
-
-    void setUpdateTime(Date updateTime);
-
-    Boolean getLoad();
-
-    void setLoad(Boolean load);
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/CombinedNodeIDContextID.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/CombinedNodeIDContextID.java
deleted file mode 100644
index 69a5810..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/CombinedNodeIDContextID.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.source;
-
-/**
- * @author peacewong
- * @date 2020/3/10 23:18
- */
-public class CombinedNodeIDContextID extends LinkisHAWorkFlowContextID {
-
-    public CombinedNodeIDContextID() {
-
-    }
-
-    public CombinedNodeIDContextID(ContextID contextID, String nodeID) {
-
-        this.setContextId(contextID.getContextId());
-        this.nodeID = nodeID;
-        if (contextID instanceof LinkisHAWorkFlowContextID) {
-            LinkisHAWorkFlowContextID haWorkFlowContextID = (LinkisHAWorkFlowContextID) contextID;
-            setBackupInstance(haWorkFlowContextID.getBackupInstance());
-            setInstance(haWorkFlowContextID.getInstance());
-            setEnv(haWorkFlowContextID.getEnv());
-            setFlow(haWorkFlowContextID.getFlow());
-            setProject(haWorkFlowContextID.getProject());
-            setVersion(haWorkFlowContextID.getVersion());
-            setWorkSpace(haWorkFlowContextID.getWorkSpace());
-            setUser(haWorkFlowContextID.getUser());
-        }
-    }
-
-    private String nodeID;
-
-    public String getNodeID() {
-        return nodeID;
-    }
-
-    public void setNodeID(String nodeID) {
-        this.nodeID = nodeID;
-    }
-
-    public LinkisHAWorkFlowContextID getLinkisHaWorkFlowContextID() {
-        LinkisHAWorkFlowContextID linkisHAWorkFlowContextID = new LinkisHAWorkFlowContextID();
-        linkisHAWorkFlowContextID.setBackupInstance(getBackupInstance());
-        linkisHAWorkFlowContextID.setInstance(getInstance());
-        linkisHAWorkFlowContextID.setEnv(getEnv());
-        linkisHAWorkFlowContextID.setFlow(getFlow());
-        linkisHAWorkFlowContextID.setProject(getProject());
-        linkisHAWorkFlowContextID.setVersion(getVersion());
-        linkisHAWorkFlowContextID.setWorkSpace(getWorkSpace());
-        linkisHAWorkFlowContextID.setUser(getUser());
-        linkisHAWorkFlowContextID.setContextId(getContextId());
-        return linkisHAWorkFlowContextID;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/CommonContextID.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/CommonContextID.java
deleted file mode 100644
index a0cba39..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/CommonContextID.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.source;
-
-/**
- * created by cooperyang on 2020/2/25
- * Description:
- */
-public class CommonContextID implements ContextID{
-
-    private String contextId;
-
-    private int contextIDType;
-
-    public CommonContextID(){
-        this.contextId = "helloworld";
-    }
-
-    @Override
-    public String getContextId() {
-        return this.contextId;
-    }
-
-    @Override
-    public void setContextId(String contextId) {
-        this.contextId = contextId;
-    }
-
-    @Override
-    public int getContextIDType() {
-        return this.contextIDType;
-    }
-
-    @Override
-    public void setContextIDType(int contextIDType) {
-        this.contextIDType = contextIDType;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/CommonContextKey.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/CommonContextKey.java
deleted file mode 100644
index 844938b..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/CommonContextKey.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.source;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-
-/**
- * created by cooperyang on 2020/2/26
- * Description:
- */
-public class CommonContextKey implements ContextKey{
-
-    private String key;
-
-    private ContextType  contextType;
-
-    private ContextScope contextScope;
-
-    private String keywords;
-
-
-    @Override
-    public String getKey() {
-        return this.key;
-    }
-
-    @Override
-    public void setKey(String key) {
-        this.key = key;
-    }
-
-    @Override
-    public int getType() {
-        return 0;
-    }
-
-    @Override
-    public void setType(int type) {
-
-    }
-
-    @Override
-    public ContextType getContextType() {
-        return this.contextType;
-    }
-
-    @Override
-    public void setContextType(ContextType contextType) {
-        this.contextType = contextType;
-    }
-
-    @Override
-    public ContextScope getContextScope() {
-        return this.contextScope;
-    }
-
-    @Override
-    public void setContextScope(ContextScope contextScope) {
-        this.contextScope = contextScope;
-    }
-
-    @Override
-    public String getKeywords() {
-        return this.keywords;
-    }
-
-    @Override
-    public void setKeywords(String keywords) {
-        this.keywords = keywords;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/CommonContextKeyValue.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/CommonContextKeyValue.java
deleted file mode 100644
index c2a5d52..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/CommonContextKeyValue.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.source;
-
-/**
- * created by cooperyang on 2020/2/23
- * Description:
- */
-public class CommonContextKeyValue implements ContextKeyValue{
-
-    private ContextKey contextKey;
-
-    private ContextValue contextValue;
-
-    public CommonContextKeyValue() {}
-
-    public CommonContextKeyValue(ContextKey contextKey, ContextValue contextValue) {
-        this.contextKey = contextKey;
-        this.contextValue = contextValue;
-    }
-
-    @Override
-    public ContextKey getContextKey() {
-        return this.contextKey;
-    }
-
-    @Override
-    public void setContextKey(ContextKey contextKey) {
-        this.contextKey = contextKey;
-    }
-
-    @Override
-    public ContextValue getContextValue() {
-        return this.contextValue;
-    }
-
-    @Override
-    public void setContextValue(ContextValue contextValue) {
-        this.contextValue = contextValue;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/CommonContextValue.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/CommonContextValue.java
deleted file mode 100644
index 1408984..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/CommonContextValue.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.source;
-
-import com.webank.wedatasphere.linkis.cs.common.protocol.ContextValueType;
-
-/**
- * created by cooperyang on 2020/2/23
- * Description:
- */
-public class CommonContextValue implements ContextValue{
-
-
-
-
-    private Object value;
-
-    private String keywords;
-
-
-
-    @Override
-    public String getKeywords() {
-        return this.keywords;
-    }
-
-    @Override
-    public void setKeywords(String keywords) {
-        this.keywords = keywords;
-    }
-
-    @Override
-    public Object getValue() {
-        return this.value;
-    }
-
-    @Override
-    public void setValue(Object value) {
-        this.value = value;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/CommonHAContextID.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/CommonHAContextID.java
deleted file mode 100644
index ab478e9..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/CommonHAContextID.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.source;
-
-
-public class CommonHAContextID implements HAContextID {
-
-    private String mainInstance;
-    private String backupInstance;
-    private String contextID;
-
-    public CommonHAContextID() {}
-
-    public CommonHAContextID(String mainInstance, String backupInstance, String contextID) {
-        this.mainInstance = mainInstance;
-        this.backupInstance = backupInstance;
-        this.contextID = contextID;
-    }
-
-    @Override
-    public String getInstance() {
-        return mainInstance;
-    }
-
-    @Override
-    public void setInstance(String instance) {
-        this.mainInstance = instance;
-    }
-
-    @Override
-    public String getBackupInstance() {
-        return backupInstance;
-    }
-
-    @Override
-    public void setBackupInstance(String backupInstance) {
-        this.backupInstance = backupInstance;
-    }
-
-    @Override
-    public String getContextId() {
-        return contextID;
-    }
-
-    @Override
-    public void setContextId(String contextId) {
-        this.contextID = contextId;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/ContextID.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/ContextID.java
deleted file mode 100644
index f9dedd7..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/ContextID.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.source;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface ContextID extends Source {
-
-    String getContextId();
-
-    void setContextId(String contextId);
-
-    default int getContextIDType(){
-        return 0;
-    }
-
-    default void setContextIDType(int contextIDType){
-
-    }
-
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/ContextIDParser.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/ContextIDParser.java
deleted file mode 100644
index f19c067..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/ContextIDParser.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.source;
-
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-
-import java.util.List;
-
-/**
- * @Author alexyang
- * @Date 2020/2/26
- */
-public interface ContextIDParser {
-
-    List<String> parse(String contextId) throws CSErrorException;
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/ContextKey.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/ContextKey.java
deleted file mode 100644
index b72d8a0..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/ContextKey.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.source;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.protocol.ContextKeyType;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface ContextKey {
-
-    String getKey();
-
-    void setKey(String key);
-
-
-    /**
-     * 每一个ContextKey都会有一个type,比如是一个ymlContextKey的类型,这个是在ContextKeyEnum中进行枚举
-     * 这里设置这样的enum,是为了方便client和server进行交互的时候,client只需要出传一个int 就可以
-     * @return
-     */
-    int getType();
-
-    void setType(int type);
-
-
-    ContextType getContextType();
-
-    void setContextType(ContextType contextType);
-
-    ContextScope getContextScope();
-
-    void setContextScope(ContextScope contextScope);
-
-    String getKeywords();
-
-    void setKeywords(String keywords);
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/ContextKeyValue.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/ContextKeyValue.java
deleted file mode 100644
index 47eb750..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/ContextKeyValue.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.source;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface ContextKeyValue {
-
-    ContextKey getContextKey();
-
-    void setContextKey(ContextKey contextKey);
-
-    ContextValue getContextValue();
-
-    void setContextValue(ContextValue contextValue);
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/ContextValue.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/ContextValue.java
deleted file mode 100644
index 17ef71a..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/ContextValue.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.source;
-
-import com.webank.wedatasphere.linkis.cs.common.protocol.ContextValueType;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface ContextValue {
-
-    String getKeywords();
-
-    void setKeywords(String keywords);
-
-    Object getValue();
-
-    void setValue(Object value);
-
-
-
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/CreatorContextKey.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/CreatorContextKey.java
deleted file mode 100644
index 3febdd4..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/CreatorContextKey.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.source;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface CreatorContextKey extends ContextKey {
-
-    String getCreator();
-
-    void setCreator(String creator);
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/HAContextID.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/HAContextID.java
deleted file mode 100644
index 0c75e5c..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/HAContextID.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.source;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface HAContextID extends ContextID {
-
-    String getInstance();
-
-    void setInstance(String instance);
-
-    // todo remain to return list
-    String getBackupInstance();
-
-    void setBackupInstance(String backupInstance);
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/LinkisHAWorkFlowContextID.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/LinkisHAWorkFlowContextID.java
deleted file mode 100644
index b2f169c..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/LinkisHAWorkFlowContextID.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.source;
-
-/**
- * created by cooperyang on 2020/2/27
- * Description:
- */
-public class LinkisHAWorkFlowContextID extends LinkisWorkflowContextID implements HAContextID, UserContextID {
-
-    private String instance;
-
-    private String backupInstance;
-
-    private String user;
-
-    @Override
-    public String getInstance() {
-        return this.instance;
-    }
-
-    @Override
-    public void setInstance(String instance) {
-        this.instance = instance;
-    }
-
-    @Override
-    public String getBackupInstance() {
-        return this.backupInstance;
-    }
-
-    @Override
-    public void setBackupInstance(String backupInstance) {
-        this.backupInstance = backupInstance;
-    }
-
-    @Override
-    public void setUser(String user) {
-        this.user = user;
-    }
-
-    @Override
-    public String getUser() {
-        return this.user;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/LinkisWorkflowContextID.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/LinkisWorkflowContextID.java
deleted file mode 100644
index 77b3740..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/LinkisWorkflowContextID.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.source;
-
-import com.webank.wedatasphere.linkis.cs.common.protocol.ContextIDType;
-
-/**
- * created by cooperyang on 2020/2/27
- * Description:
- */
-public class LinkisWorkflowContextID implements WorkflowContextID{
-
-    private String workspace;
-
-    private String project;
-
-    private String flow;
-
-    private String contextId;
-
-    private String version;
-
-    private String env;
-
-    @Override
-    public String getWorkSpace() {
-        return this.workspace;
-    }
-
-    @Override
-    public void setWorkSpace(String workSpace) {
-        this.workspace = workSpace;
-    }
-
-    @Override
-    public String getProject() {
-        return this.project;
-    }
-
-    @Override
-    public void setProject(String project) {
-        this.project = project;
-    }
-
-    @Override
-    public String getFlow() {
-        return this.flow;
-    }
-
-    @Override
-    public void setFlow(String flow) {
-        this.flow = flow;
-    }
-
-    @Override
-    public String getVersion() {
-        return this.version;
-    }
-
-    @Override
-    public void setVersion(String version) {
-        this.version = version;
-    }
-
-    @Override
-    public String getEnv() {
-        return this.env;
-    }
-
-    @Override
-    public void setEnv(String env) {
-        this.env = env;
-    }
-
-    @Override
-    public String getContextId() {
-        return this.contextId;
-    }
-
-    @Override
-    public void setContextId(String contextId) {
-        this.contextId = contextId;
-    }
-
-    @Override
-    public int getContextIDType() {
-        return ContextIDType.LINKIS_WORKFLOW_CONTEXT_ID_TYPE.getIndex();
-    }
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/OrderContextKey.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/OrderContextKey.java
deleted file mode 100644
index 780312a..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/OrderContextKey.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.source;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface OrderContextKey extends ContextKey {
-
-    Integer getOrder();
-
-    void setOrder(Integer order);
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/Source.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/Source.java
deleted file mode 100644
index 5c42552..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/Source.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.source;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface Source {
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/UserContextID.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/UserContextID.java
deleted file mode 100644
index c5d6159..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/UserContextID.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.source;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface UserContextID extends ContextID{
-
-    void setUser(String user);
-
-    String getUser();
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/ValueBean.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/ValueBean.java
deleted file mode 100644
index b710497..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/ValueBean.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.source;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-
-/**
- * created by cooperyang on 2020/2/23
- * Description:
- */
-public interface ValueBean {
-    public ContextType getContextType();
-    public void setContextType(ContextType contextType);
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/VersionContextKey.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/VersionContextKey.java
deleted file mode 100644
index fd5bfe5..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/VersionContextKey.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.source;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface VersionContextKey extends ContextKey {
-
-    String getVersion();
-
-    void setVersion(String version);
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/WorkflowContextID.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/WorkflowContextID.java
deleted file mode 100644
index 5aa2b4d..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/WorkflowContextID.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.source;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface WorkflowContextID extends ContextID{
-
-    String getWorkSpace();
-
-    void setWorkSpace(String workSpace);
-
-    String getProject();
-
-    void setProject(String project);
-
-    String getFlow();
-
-    void setFlow(String flow);
-
-    String getVersion();
-
-    void setVersion(String version);
-
-    String getEnv();
-
-    void setEnv(String env);
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/YMLContextKey.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/YMLContextKey.java
deleted file mode 100644
index a541d27..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/entity/source/YMLContextKey.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.entity.source;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface YMLContextKey extends ContextKey {
-
-    void setKey(String[] key);
-
-    void setSuffix(String suffix);
-
-    void setPrefix(String[] prefix);
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/exception/CSErrorException.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/exception/CSErrorException.java
deleted file mode 100644
index c0ba387..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/exception/CSErrorException.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.exception;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public class CSErrorException extends ErrorException {
-
-    public CSErrorException(int errCode, String desc) {
-        super(errCode, desc);
-    }
-    public CSErrorException(int errCode, String desc, Throwable e){
-        super(errCode,desc);
-        this.initCause(e);
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/exception/CSWarnException.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/exception/CSWarnException.java
deleted file mode 100644
index 664d882..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/exception/CSWarnException.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.exception;
-
-import com.webank.wedatasphere.linkis.common.exception.WarnException;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public class CSWarnException extends WarnException {
-
-    public CSWarnException(int errCode, String desc) {
-        super(errCode, desc);
-    }
-
-    public CSWarnException(int errCode, String desc, Throwable e) {
-        super(errCode, desc);
-        this.initCause(e);
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/exception/ErrorCode.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/exception/ErrorCode.java
deleted file mode 100644
index 3bd8513..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/exception/ErrorCode.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.exception;
-
-/**
- * @Author alexyang
- * @Date 2020/2/21
- */
-public class ErrorCode {
-
-    public static final int INVALID_NULL_OBJECT = 70100;
-
-    public static final int SERIALIZER_TO_JSON_ERROR = 70101;
-
-    public static final int INVALID_NULL_STRING = 70102;
-
-    public static final int INVALID_DESERIALIZE_STRING = 70103;
-
-    public static final int INVALID_DESERIALIZE_OBJECT = 70104;
-
-    public static final int DESERIALIZER_FROM_JSON_ERROR = 70105;
-
-    public static final int METHOD_NOT_OVERRIDE = 70106;
-
-    public static final int INVALID_HAID_ENCODE_PARAMS = 70107;
-
-    public static final int INVALID_HAID_STRING = 70108;
-
-    public static final int INVALID_CONTEXT_TYPE = 70109;
-
-    public static final int GET_CONTEXT_VALUE_ERROR = 70110;
-
-    public static final int SEARCH_CONTEXT_VALUE_ERROR = 70111;
-
-    public static final int INVALID_CONTEXT_VALUE_TYPE = 70109;
-
-
-    public static final int DESERIALIZE_ERROR = 70112;
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/listener/ContextIDListener.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/listener/ContextIDListener.java
deleted file mode 100644
index 045ee18..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/listener/ContextIDListener.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.listener;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface ContextIDListener {
-
-    void onRemoved(ContextID contextID);
-
-    void onReset(ContextID contextID);
-
-    void onUPdated(ContextID contextID);
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/listener/ContextKeyListener.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/listener/ContextKeyListener.java
deleted file mode 100644
index c553cc8..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/listener/ContextKeyListener.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.listener;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface ContextKeyListener {
-
-    void onUpdated(ContextID contextID, ContextKeyValue contextKeyValue);
-
-    void onRemoved(ContextID contextID, ContextKeyValue contextKeyValue);
-
-    void onReset(ContextID contextID, ContextKeyValue contextKeyValue);
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/protocol/ContextHTTPConstant.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/protocol/ContextHTTPConstant.java
deleted file mode 100644
index 831c6bc..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/protocol/ContextHTTPConstant.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.protocol;
-
-/**
- * created by cooperyang on 2020/2/23
- * Description:
- */
-public interface ContextHTTPConstant {
-
-    String CONTEXT_KEY_STR = "contextKey";
-
-    String CONTEXT_VALUE_STR = "contextValue";
-
-    String CONTEXT_ID_STR = "contextID";
-
-    String CONTEXT_KEY_TYPE_STR = "contextKeyType";
-
-    String CONTEXT_VALUE_CLASS_NAME = "__CLASS_NAME__";
-
-    String VALUE_STR = "value";
-
-    String PROJECT_NAME_STR = "projectName";
-
-    String FLOW_NAME_STR = "flowName";
-
-    String VALUE_BEAN_STR = "valueBean";
-
-    String CONTEXT_HISTORY_KEY = "contextHistory";
-
-    String CONTEXT_KEY_PREFIX_STR = "keyPrefix";
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/protocol/ContextHistoryType.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/protocol/ContextHistoryType.java
deleted file mode 100644
index 1cac740..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/protocol/ContextHistoryType.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.protocol;
-
-/**
- * Created by patinousward on 2020/2/27.
- */
-public enum  ContextHistoryType {
-    /**
-     *
-     */
-    COMMON_CONTEXT_HISTORY_TYPE(0, "com.webank.wedatasphere.linkis.cs.common.entity.source.CommonContextID");
-
-    private int index;
-    private String typeName;
-
-    private ContextHistoryType(int index, String typeName) {
-        this.index = index;
-        this.typeName = typeName;
-    }
-
-    public int getIndex() {
-        return index;
-    }
-
-    public void setIndex(int index) {
-        this.index = index;
-    }
-
-    public String getTypeName() {
-        return typeName;
-    }
-
-    public void setTypeName(String typeName) {
-        this.typeName = typeName;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/protocol/ContextIDType.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/protocol/ContextIDType.java
deleted file mode 100644
index a898254..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/protocol/ContextIDType.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.protocol;
-
-/**
- * created by cooperyang on 2020/2/27
- * Description:
- */
-public enum ContextIDType {
-    /**
-     * index表示contextValueType的int
-     * typeName 表示全路径类名
-     */
-    COMMON_CONTEXT_ID_TYPE(0, "com.webank.wedatasphere.linkis.cs.common.entity.source.CommonContextID"),
-    LINKIS_WORKFLOW_CONTEXT_ID_TYPE(1, "com.webank.wedatasphere.linkis.cs.common.entity.source.LinkisWorkflowContextID")
-    ;
-
-    private int index;
-    private String typeName;
-
-    private ContextIDType(int index, String typeName){
-        this.index = index;
-        this.typeName = typeName;
-    }
-
-    public int getIndex() {
-        return index;
-    }
-
-    public void setIndex(int index) {
-        this.index = index;
-    }
-
-    public String getTypeName() {
-        return typeName;
-    }
-
-    public void setTypeName(String typeName) {
-        this.typeName = typeName;
-    }
-
-    public static String getTypeName(int index){
-        for (ContextIDType type: ContextIDType.values()){
-            if (type.index == index){
-                return type.typeName;
-            }
-        }
-        return LINKIS_WORKFLOW_CONTEXT_ID_TYPE.typeName;
-    }
-
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/protocol/ContextKeyType.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/protocol/ContextKeyType.java
deleted file mode 100644
index 97c51c5..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/protocol/ContextKeyType.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.protocol;
-
-/**
- * created by cooperyang on 2020/2/23
- * Description:
- */
-public enum ContextKeyType {
-
-    /**
-     * index表示type的int
-     * typeName 表示全路径类名
-     */
-    YML_CONTEXT_KEY(1, "com.webank.wedatasphere.linkis.cs.common.entity.source.CommonContextKey")
-    ;
-
-    private int index;
-    private String typeName;
-
-    private ContextKeyType(int index, String typeName){
-        this.index = index;
-        this.typeName = typeName;
-    }
-
-    public int getIndex() {
-        return index;
-    }
-
-    public void setIndex(int index) {
-        this.index = index;
-    }
-
-    public String getTypeName() {
-        return typeName;
-    }
-
-    public void setTypeName(String typeName) {
-        this.typeName = typeName;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/protocol/ContextKeyValueType.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/protocol/ContextKeyValueType.java
deleted file mode 100644
index 569c60f..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/protocol/ContextKeyValueType.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.protocol;
-
-/**
- * Created by patinousward on 2020/2/27.
- */
-public enum ContextKeyValueType {
-
-    /**
-     *
-     */
-    COMMON_CONTEXT_KV_TYPE(0, "com.webank.wedatasphere.linkis.cs.common.entity.source.CommonContextID");
-
-    private int index;
-    private String typeName;
-
-    private ContextKeyValueType(int index, String typeName) {
-        this.index = index;
-        this.typeName = typeName;
-    }
-
-    public int getIndex() {
-        return index;
-    }
-
-    public void setIndex(int index) {
-        this.index = index;
-    }
-
-    public String getTypeName() {
-        return typeName;
-    }
-
-    public void setTypeName(String typeName) {
-        this.typeName = typeName;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/protocol/ContextValueType.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/protocol/ContextValueType.java
deleted file mode 100644
index ec3a61d..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/protocol/ContextValueType.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.protocol;
-
-/**
- * created by cooperyang on 2020/2/27
- * Description:
- */
-public enum ContextValueType {
-    /**
-     * index表示contextValueType的int
-     * typeName 表示全路径类名
-     */
-    COMMON_CONTEXT_VALUE_TYPE(1, "com.webank.wedatasphere.linkis.cs.common.entity.source.CommonContextValue")
-    ;
-
-    private int index;
-    private String typeName;
-
-    private ContextValueType(int index, String typeName){
-        this.index = index;
-        this.typeName = typeName;
-    }
-
-    public int getIndex() {
-        return index;
-    }
-
-    public void setIndex(int index) {
-        this.index = index;
-    }
-
-    public String getTypeName() {
-        return typeName;
-    }
-
-    public void setTypeName(String typeName) {
-        this.typeName = typeName;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/search/ContextSearchConditionMapBuilder.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/search/ContextSearchConditionMapBuilder.java
deleted file mode 100644
index cbd4b26..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/search/ContextSearchConditionMapBuilder.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.search;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-
-import java.util.List;
-import java.util.Map;
-
-public class ContextSearchConditionMapBuilder {
-
-    Map<Object, Object> contextTypeMap;
-    Map<Object, Object> contextValueTypeMap;
-    Map<Object, Object> contextScopeMap;
-    Map<Object, Object> regexMap;
-    Map<Object, Object> containsValueMap;
-    boolean nearest = false;
-    String nearestNode = "";
-    Integer nearestNumber = 1;
-    Boolean nearestUpstreamOnly = false;
-
-
-    public static ContextSearchConditionMapBuilder newBuilder(){
-        return new ContextSearchConditionMapBuilder();
-    }
-
-    public Map<Object, Object> build(){
-        Map<Object, Object> conditionMap = null;
-        if(contextTypeMap != null){
-            conditionMap = contextTypeMap;
-        }
-        if(contextValueTypeMap != null){
-            conditionMap = conditionMap == null? contextValueTypeMap : and(conditionMap, contextValueTypeMap);
-        }
-        if(contextScopeMap != null){
-            conditionMap = conditionMap == null? contextScopeMap : and(conditionMap, contextScopeMap);
-        }
-        if(regexMap != null){
-            conditionMap = conditionMap == null? regexMap : and(conditionMap, regexMap);
-        }
-        if(containsValueMap != null){
-            conditionMap = conditionMap == null? containsValueMap : and(conditionMap, containsValueMap);
-        }
-        if(nearest){
-            conditionMap = nearest(conditionMap, nearestNode, nearestNumber, nearestUpstreamOnly);
-        }
-        return conditionMap;
-    }
-
-    public ContextSearchConditionMapBuilder contextTypes(ContextType... contextTypes){
-        for(ContextType contextType :contextTypes){
-            if(contextTypeMap == null){
-                contextTypeMap = getByContextType(contextType);
-            } else {
-                contextTypeMap = or(contextTypeMap, getByContextType(contextType));
-            }
-        }
-        return this;
-    }
-
-    public ContextSearchConditionMapBuilder contextValueTypes(Class... contextValueTypes){
-        for(Class contextValueType :contextValueTypes){
-            if(contextValueTypeMap == null){
-                contextValueTypeMap = getByContextValueType(contextValueType);
-            } else {
-                contextValueTypeMap = or(contextValueTypeMap, getByContextValueType(contextValueType));
-            }
-        }
-        return this;
-    }
-
-    public ContextSearchConditionMapBuilder contextScopes(ContextScope... contextScopes){
-        for(ContextScope contextScope :contextScopes){
-            if(contextScopeMap == null){
-                contextScopeMap = getByContextScope(contextScope);
-            } else {
-                contextScopeMap = or(contextScopeMap, getByContextScope(contextScope));
-            }
-        }
-        return this;
-    }
-
-    public ContextSearchConditionMapBuilder regex(String regex){
-        regexMap = getByRegex(regex);
-        return this;
-    }
-
-    public ContextSearchConditionMapBuilder contains(String containsValue){
-        containsValueMap = getByContainsValue(containsValue);
-        return this;
-    }
-
-    public ContextSearchConditionMapBuilder nearest(String currentNode, Integer number, Boolean upstreamOnly){
-        this.nearest = true;
-        this.nearestNode = currentNode;
-        this.nearestNumber = number;
-        this.nearestUpstreamOnly = upstreamOnly;
-        return this;
-    }
-
-    private Map<Object, Object> getByContextType(ContextType contextType){
-        Map<Object, Object> conditionMap = Maps.newHashMap();
-        conditionMap.put("type", "ContextType");
-        conditionMap.put("contextType", contextType.toString());
-        return conditionMap;
-    }
-
-    private Map<Object, Object> getByContextValueType(Class contextValueType){
-        Map<Object, Object> conditionMap = Maps.newHashMap();
-        conditionMap.put("type", "ContextValueType");
-        conditionMap.put("contextValueType", contextValueType.getName());
-        return conditionMap;
-    }
-
-    private Map<Object, Object> getByContextScope(ContextScope contextScope){
-        Map<Object, Object> conditionMap = Maps.newHashMap();
-        conditionMap.put("type", "ContextScope");
-        conditionMap.put("contextScope", contextScope.toString());
-        return conditionMap;
-    }
-
-    private Map<Object, Object> getByRegex(String regex){
-        Map<Object, Object> conditionMap = Maps.newHashMap();
-        conditionMap.put("type", "Regex");
-        conditionMap.put("regex", regex);
-        return conditionMap;
-    }
-
-    private Map<Object, Object> getByContainsValue(String value){
-        Map<Object, Object> conditionMap = Maps.newHashMap();
-        conditionMap.put("type", "Contains");
-        conditionMap.put("value", value);
-        return conditionMap;
-    }
-
-    public static Map<Object, Object> nearest(Map<Object, Object> origin, String currentNode, Integer number, Boolean upstreamOnly){
-        Map<Object, Object> conditionMap = Maps.newHashMap();
-        conditionMap.put("type", "Nearest");
-        conditionMap.put("origin", origin);
-        conditionMap.put("currentNode", currentNode);
-        conditionMap.put("number", number);
-        conditionMap.put("upstreamOnly", upstreamOnly);
-        return conditionMap;
-    }
-
-    public static Map<Object, Object> not(Map<Object, Object> origin){
-        Map<Object, Object> conditionMap = Maps.newHashMap();
-        conditionMap.put("type", "Not");
-        conditionMap.put("origin", origin);
-        return conditionMap;
-    }
-
-    public static Map<Object, Object> and(Map<Object, Object> left, Map<Object, Object> right){
-        Map<Object, Object> conditionMap = Maps.newHashMap();
-        conditionMap.put("type", "And");
-        conditionMap.put("left", left);
-        conditionMap.put("right", right);
-        return conditionMap;
-    }
-
-    public static Map<Object, Object> or(Map<Object, Object> left, Map<Object, Object> right){
-        Map<Object, Object> conditionMap = Maps.newHashMap();
-        conditionMap.put("type", "Or");
-        conditionMap.put("left", left);
-        conditionMap.put("right", right);
-        return conditionMap;
-    }
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/AbstractSerializer.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/AbstractSerializer.java
deleted file mode 100644
index d2905b9..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/AbstractSerializer.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.serialize;
-
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.utils.CSCommonUtils;
-import org.apache.commons.lang.StringUtils;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @Author alexyang
- * @Date 2020/2/19
- */
-public abstract class AbstractSerializer<T> implements ContextSerializer<T> {
-
-
-
-
-
-    public String getJsonValue(T t) throws CSErrorException {
-        if (null != t) {
-            return CSCommonUtils.gson.toJson(t);
-        }
-        return null;
-    }
-
-    public abstract T fromJson(String json)  throws CSErrorException;
-
-
-    @Override
-    public boolean accepts(String json) {
-        if (StringUtils.isNotBlank(json)) {
-            Map<String, String> value = CSCommonUtils.gson.fromJson(json, new HashMap<String, String>().getClass());
-            if (getType().equals(value.get("type"))) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-
-
-    @Override
-    public String serialize(T t) throws CSErrorException {
-
-        if (accepts(t)) {
-            Map<String, String> map = new HashMap<>();
-            map.put("type", getType());
-            map.put("value", getJsonValue(t));
-            return  CSCommonUtils.gson.toJson(map);
-        }
-        return null;
-    }
-
-    @Override
-    public T deserialize(String json) throws CSErrorException {
-        if (accepts(json)) {
-            Map<String, String> jsonObj = CSCommonUtils.gson.fromJson(json, new HashMap<String, String>().getClass());
-            String value = jsonObj.get("value");
-            return fromJson(value);
-        }
-        return null;
-    }
-
-    @Override
-    public boolean isType(String type) {
-        return getType().equals(type);
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/ContextSerializer.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/ContextSerializer.java
deleted file mode 100644
index fca7adb..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/ContextSerializer.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.serialize;
-
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-
-/**
- * @Author alexyang
- * @Date 2020/2/19
- */
-public interface ContextSerializer<T> {
-
-    String getType();
-
-    boolean accepts(String json);
-
-    boolean accepts(Object obj);
-
-    boolean isType(String type);
-
-    String serialize(T t) throws CSErrorException;
-
-    T deserialize(String json) throws CSErrorException;
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/helper/AbstractSerializationHelper.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/helper/AbstractSerializationHelper.java
deleted file mode 100644
index 500eb19..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/helper/AbstractSerializationHelper.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.serialize.helper;
-
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.serialize.ContextSerializer;
-import com.webank.wedatasphere.linkis.cs.common.utils.CSCommonUtils;
-import org.apache.commons.lang.StringUtils;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Optional;
-import java.util.stream.Stream;
-
-/**
- * @author peacewong
- * @date 2020/2/27 19:15
- */
-public abstract class AbstractSerializationHelper implements SerializationHelper {
-
-    protected abstract Map<String, ContextSerializer> getContextSerializerMap();
-
-    @Override
-    public boolean accepts(String json) {
-        return null != getContextSerializer(json);
-    }
-
-    @Override
-    public boolean accepts(Object obj) {
-        return null != getContextSerializer(obj);
-    }
-
-    @Override
-    public String serialize(Object obj) throws CSErrorException {
-        ContextSerializer contextSerializer = getContextSerializer(obj);
-        if (null != contextSerializer) {
-            return contextSerializer.serialize(obj);
-        }
-
-        if (null != obj){
-            throw new CSErrorException(97001, "Failed to find Serializer of " + obj.getClass().getName());
-        }
-        throw new CSErrorException(97001, "The obj not null");
-    }
-
-    @Override
-    public Object deserialize(String json) throws CSErrorException {
-
-        ContextSerializer contextSerializer = getContextSerializer(json);
-
-        if (contextSerializer != null) {
-            return contextSerializer.deserialize(json);
-        }
-        if (StringUtils.isNotBlank(json)){
-            throw new CSErrorException(97001, "Failed to find deserialize of " + json);
-        }
-        throw new CSErrorException(97001, "The json not null");
-    }
-
-    @Override
-    public <T> T deserialize(String s, Class<T> interfaceClass) throws CSErrorException {
-        return null;
-    }
-
-    private ContextSerializer getContextSerializer(String json) {
-
-        if (StringUtils.isNotBlank(json)) {
-            Map<String, String> value = CSCommonUtils.gson.fromJson(json, new HashMap<String, String>().getClass());
-            String type = value.get("type");
-           return getContextSerializerMap().get(type);
-
-        }
-        return null;
-    }
-
-    private ContextSerializer getContextSerializer(Object obj) {
-
-        if (null != obj ) {
-            Stream<ContextSerializer> contextSerializerStream = getContextSerializerMap().values().stream().filter(contextSerializer -> contextSerializer.accepts(obj));
-            if (null != contextSerializerStream ) {
-                Optional<ContextSerializer> first = contextSerializerStream.findFirst();
-                if (first.isPresent()){
-                    return first.get();
-                }
-            }
-        }
-        return null;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/helper/ContextSerializationHelper.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/helper/ContextSerializationHelper.java
deleted file mode 100644
index 16f613b..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/helper/ContextSerializationHelper.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.serialize.helper;
-
-import com.webank.wedatasphere.linkis.cs.common.serialize.ContextSerializer;
-import org.reflections.Reflections;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * @author peacewong
- * @date 2020/2/27 19:14
- */
-public class ContextSerializationHelper extends AbstractSerializationHelper {
-
-
-    private static final Logger logger = LoggerFactory.getLogger(ContextSerializationHelper.class);
-
-    private Map<String, ContextSerializer> contextSerializerMap = new HashMap<>(16);
-
-
-    private void init()  {
-        Reflections reflections = new Reflections("com.webank.wedatasphere.linkis", ContextSerializationHelper.class.getClassLoader());
-        Set<Class<? extends ContextSerializer>> allSubClass = reflections.getSubTypesOf(ContextSerializer.class);
-
-        if ( null != allSubClass){
-            Iterator<Class<? extends ContextSerializer>> iterator = allSubClass.iterator();
-            while (iterator.hasNext()){
-                Class<? extends ContextSerializer> next = iterator.next();
-                ContextSerializer contextSerializer = null;
-                try {
-                    contextSerializer = next.newInstance();
-                } catch (InstantiationException e) {
-                    logger.info("Failed to Instantiation  " + next.getName());
-                    continue;
-                } catch (IllegalAccessException e) {
-                    throw new RuntimeException("Failed to construct contextSerializer", e);
-                }
-
-                if (contextSerializerMap.containsKey(contextSerializer.getType())){
-                    throw new RuntimeException("contextSerializer Type cannot be duplicated ");
-                }
-                contextSerializerMap.put(contextSerializer.getType(), contextSerializer);
-            }
-        }
-    }
-
-
-
-    private static ContextSerializationHelper contextSerializationHelper = null;
-
-    public static ContextSerializationHelper getInstance() {
-        if (contextSerializationHelper == null) {
-            synchronized (ContextSerializationHelper.class) {
-                if (contextSerializationHelper == null) {
-                    contextSerializationHelper = new ContextSerializationHelper();
-                    contextSerializationHelper.init();
-                }
-            }
-        }
-        return contextSerializationHelper;
-    }
-
-    @Override
-    protected Map<String, ContextSerializer> getContextSerializerMap() {
-        return this.contextSerializerMap;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/helper/SerializationHelper.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/helper/SerializationHelper.java
deleted file mode 100644
index a93faa2..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/helper/SerializationHelper.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.serialize.helper;
-
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-
-/**
- * @author peacewong
- * @date 2020/2/27 19:03
- */
-public interface SerializationHelper {
-
-    boolean accepts(String json);
-
-    boolean accepts(Object obj);
-
-    String serialize(Object obj) throws CSErrorException;
-
-    Object deserialize(String json) throws CSErrorException;
-
-    <T> T deserialize(String s, Class<T> interfaceClass) throws CSErrorException;
-
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/context/CombinedNodeIDContextIDSerializer.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/context/CombinedNodeIDContextIDSerializer.java
deleted file mode 100644
index 374ed69..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/context/CombinedNodeIDContextIDSerializer.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.serialize.impl.context;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.CombinedNodeIDContextID;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.serialize.AbstractSerializer;
-import com.webank.wedatasphere.linkis.cs.common.utils.CSCommonUtils;
-
-/**
- * @author peacewong
- * @date 2020/3/10 23:30
- */
-public class CombinedNodeIDContextIDSerializer extends AbstractSerializer<CombinedNodeIDContextID> {
-
-
-    @Override
-    public String getType() {
-        return "CombinedNodeIDContextID";
-    }
-
-
-
-
-    @Override
-    public CombinedNodeIDContextID fromJson(String json) throws CSErrorException {
-        return CSCommonUtils.gson.fromJson(json, CombinedNodeIDContextID.class);
-    }
-
-    @Override
-    public boolean accepts(Object obj) {
-
-        if (null != obj && obj instanceof CombinedNodeIDContextID){
-            return true;
-        }
-        return false;
-    }
-
-
-}
-
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/context/CommonContextKeySerializer.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/context/CommonContextKeySerializer.java
deleted file mode 100644
index 68b10a4..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/context/CommonContextKeySerializer.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.serialize.impl.context;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.CommonContextKey;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.serialize.AbstractSerializer;
-import com.webank.wedatasphere.linkis.cs.common.utils.CSCommonUtils;
-
-/**
- * @author peacewong
- * @date 2020/2/27 23:26
- */
-public class CommonContextKeySerializer extends AbstractSerializer<CommonContextKey> {
-
-
-    @Override
-    public CommonContextKey fromJson(String json) throws CSErrorException {
-        return CSCommonUtils.gson.fromJson(json, CommonContextKey.class);
-    }
-
-    @Override
-    public String getType() {
-        return "commonContextKey";
-    }
-
-    @Override
-    public boolean accepts(Object obj) {
-        if (null != obj && obj instanceof CommonContextKey){
-            return true;
-        }
-        return false;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/context/ContextKeyValueSerializer.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/context/ContextKeyValueSerializer.java
deleted file mode 100644
index 7b72784..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/context/ContextKeyValueSerializer.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.serialize.impl.context;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.CommonContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextValue;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.serialize.AbstractSerializer;
-import com.webank.wedatasphere.linkis.cs.common.serialize.helper.ContextSerializationHelper;
-import com.webank.wedatasphere.linkis.cs.common.utils.CSCommonUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author peacewong
- * @date 2020/2/27 23:16
- */
-public class ContextKeyValueSerializer extends AbstractSerializer<CommonContextKeyValue> {
-
-    private static final Logger logger = LoggerFactory.getLogger(ContextKeyValueSerializer.class);
-
-    @Override
-    public String getJsonValue(CommonContextKeyValue contextKeyValue) throws CSErrorException {
-        try {
-            Map<String, String> map = new HashMap<>();
-            ContextKey contextKey = contextKeyValue.getContextKey();
-            ContextValue contextValue = contextKeyValue.getContextValue();
-            map.put("key", ContextSerializationHelper.getInstance().serialize(contextKey));
-            map.put("value", ContextSerializationHelper.getInstance().serialize(contextValue));
-            return CSCommonUtils.gson.toJson(map);
-        } catch (Exception e) {
-            logger.error("Failed to serialize contextKeyValue: ", e);
-            throw new CSErrorException(97000, "Failed to serialize contextKeyValue");
-        }
-    }
-
-    @Override
-    public CommonContextKeyValue fromJson(String json) throws CSErrorException {
-        try {
-            Map<String, String> jsonObj = CSCommonUtils.gson.fromJson(json, new HashMap<String, String>().getClass());
-            String key = jsonObj.get("key");
-            String value = jsonObj.get("value");
-            Object contextKey = ContextSerializationHelper.getInstance().deserialize(key);
-            Object contextValue = ContextSerializationHelper.getInstance().deserialize(value);
-            CommonContextKeyValue contextKeyValue = new CommonContextKeyValue();
-            contextKeyValue.setContextKey((ContextKey) contextKey);
-            contextKeyValue.setContextValue((ContextValue) contextValue);
-            return contextKeyValue;
-        } catch (Exception e) {
-            logger.error("Failed to deserialize contextKeyValue: ", e);
-            throw new CSErrorException(97000, "Failed to serialize contextKeyValue");
-        }
-    }
-
-    @Override
-    public String getType() {
-        return "commonContextKeyValue";
-    }
-
-    @Override
-    public boolean accepts(Object obj) {
-        if (null != obj && obj instanceof CommonContextKeyValue){
-            return true;
-        }
-        return false;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/context/ContextValueSerializer.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/context/ContextValueSerializer.java
deleted file mode 100644
index 9e6198d..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/context/ContextValueSerializer.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.serialize.impl.context;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.CommonContextValue;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.serialize.AbstractSerializer;
-import com.webank.wedatasphere.linkis.cs.common.serialize.helper.ContextSerializationHelper;
-import com.webank.wedatasphere.linkis.cs.common.utils.CSCommonUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author peacewong
- * @date 2020/2/27 21:48
- */
-public class ContextValueSerializer extends AbstractSerializer<CommonContextValue> {
-
-    private static final Logger logger = LoggerFactory.getLogger(ContextValueSerializer.class);
-
-
-    @Override
-    public String getType() {
-        return "contextValue";
-    }
-
-    @Override
-    public String getJsonValue(CommonContextValue commonContextValue) throws CSErrorException {
-        Object value = commonContextValue.getValue();
-        try {
-            Map<String, String> map = new HashMap<>();
-            String keywords = commonContextValue.getKeywords();
-            String json = ContextSerializationHelper.getInstance().serialize(value);
-            map.put("keywords", keywords);
-            map.put("value", json);
-            return CSCommonUtils.gson.toJson(map);
-        } catch (Exception e) {
-            logger.error("Failed to serialize contextValue: ", e);
-            throw new CSErrorException(97000, "Failed to serialize contextValue");
-        }
-    }
-
-    @Override
-    public CommonContextValue fromJson(String json)  throws CSErrorException {
-        try {
-            Map<String, String> jsonObj = CSCommonUtils.gson.fromJson(json, new HashMap<String, String>().getClass());
-            String value = jsonObj.get("value");
-            String keywords = jsonObj.get("keywords");
-            Object valueObj = ContextSerializationHelper.getInstance().deserialize(value);
-            CommonContextValue commonContextValue = new CommonContextValue();
-            commonContextValue.setKeywords(keywords);
-            commonContextValue.setValue(valueObj);
-            return commonContextValue;
-        } catch (Exception e) {
-            logger.error("Failed to deserialize contextValue: ", e);
-            throw new CSErrorException(97000, "Failed to serialize contextValue");
-        }
-
-    }
-
-    @Override
-    public boolean accepts(Object obj) {
-        if (null != obj && obj instanceof CommonContextValue){
-            return true;
-        }
-        return false;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/context/LinkisHAWorkFlowContextIDSerializer.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/context/LinkisHAWorkFlowContextIDSerializer.java
deleted file mode 100644
index 8fe72fd..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/context/LinkisHAWorkFlowContextIDSerializer.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.serialize.impl.context;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.LinkisHAWorkFlowContextID;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.serialize.AbstractSerializer;
-import com.webank.wedatasphere.linkis.cs.common.utils.CSCommonUtils;
-
-/**
- * @author peacewong
- * @date 2020/2/27 19:39
- */
-public class LinkisHAWorkFlowContextIDSerializer extends AbstractSerializer<LinkisHAWorkFlowContextID> {
-
-
-    @Override
-    public String getType() {
-        return "HAWorkFlowContextID";
-    }
-
-
-
-
-    @Override
-    public LinkisHAWorkFlowContextID fromJson(String json) throws CSErrorException {
-        return CSCommonUtils.gson.fromJson(json, LinkisHAWorkFlowContextID.class);
-    }
-
-    @Override
-    public boolean accepts(Object obj) {
-        if (null != obj && obj.getClass().getName().equals(LinkisHAWorkFlowContextID.class.getName())){
-            return true;
-        }
-        return false;
-    }
-
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/value/LinkisBMLResourceSerializer.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/value/LinkisBMLResourceSerializer.java
deleted file mode 100644
index 33e1ba3..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/value/LinkisBMLResourceSerializer.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.serialize.impl.value;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.resource.LinkisBMLResource;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.serialize.AbstractSerializer;
-import com.webank.wedatasphere.linkis.cs.common.utils.CSCommonUtils;
-
-/**
- * @author peacewong
- * @date 2020/2/27 22:21
- */
-public class LinkisBMLResourceSerializer extends AbstractSerializer<LinkisBMLResource> {
-    @Override
-    public String getType() {
-        return "linkisBMLResource";
-    }
-
-
-    @Override
-    public LinkisBMLResource fromJson(String json) throws CSErrorException {
-        return  CSCommonUtils.gson.fromJson(json, LinkisBMLResource.class);
-    }
-
-    @Override
-    public boolean accepts(Object obj) {
-        if (null != obj && obj instanceof LinkisBMLResource){
-            return true;
-        }
-        return false;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/value/data/CSResultDataSerializer.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/value/data/CSResultDataSerializer.java
deleted file mode 100644
index 0066b0a..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/value/data/CSResultDataSerializer.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.serialize.impl.value.data;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.data.CSResultData;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.serialize.AbstractSerializer;
-import com.webank.wedatasphere.linkis.cs.common.utils.CSCommonUtils;
-
-/**
- * @author peacewong
- * @date 2020/3/13 19:35
- */
-public class CSResultDataSerializer extends AbstractSerializer<CSResultData> {
-    @Override
-    public CSResultData fromJson(String json) throws CSErrorException {
-        return CSCommonUtils.gson.fromJson(json, CSResultData.class);
-    }
-
-    @Override
-    public String getType() {
-        return "CSResultData";
-    }
-
-    @Override
-    public boolean accepts(Object obj) {
-        if (null != obj && obj.getClass().getName().equals(CSResultData.class.getName())){
-            return true;
-        }
-        return false;
-    }
-}
\ No newline at end of file
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/value/data/LinkisJobDataSerializer.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/value/data/LinkisJobDataSerializer.java
deleted file mode 100644
index bb01f93..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/value/data/LinkisJobDataSerializer.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.serialize.impl.value.data;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.data.LinkisJobData;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.serialize.AbstractSerializer;
-import com.webank.wedatasphere.linkis.cs.common.utils.CSCommonUtils;
-
-/**
- * @author peacewong
- * @date 2020/3/13 22:10
- */
-public class LinkisJobDataSerializer extends AbstractSerializer<LinkisJobData> {
-
-    @Override
-    public LinkisJobData fromJson(String json) throws CSErrorException {
-        return CSCommonUtils.gson.fromJson(json, LinkisJobData.class);
-    }
-
-    @Override
-    public String getType() {
-        return "LinkisJobData";
-    }
-
-    @Override
-    public boolean accepts(Object obj) {
-        if (null != obj && obj.getClass().getName().equals(LinkisJobData.class.getName())) {
-            return true;
-        }
-        return false;
-    }
-}
\ No newline at end of file
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/value/metadata/CSTableSerializer.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/value/metadata/CSTableSerializer.java
deleted file mode 100644
index 6d8d468..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/value/metadata/CSTableSerializer.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.serialize.impl.value.metadata;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.metadata.CSTable;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.serialize.AbstractSerializer;
-import com.webank.wedatasphere.linkis.cs.common.utils.CSCommonUtils;
-
-/**
- * @author peacewong
- * @date 2020/3/17 19:33
- */
-public class CSTableSerializer extends AbstractSerializer<CSTable> {
-
-    @Override
-    public CSTable fromJson(String json) throws CSErrorException {
-        return CSCommonUtils.gson.fromJson(json, CSTable.class);
-    }
-
-    @Override
-    public String getType() {
-        return "CSTable";
-    }
-
-    @Override
-    public boolean accepts(Object obj) {
-        if (null != obj && obj.getClass().getName().equals(CSTable.class.getName())) {
-            return true;
-        }
-        return false;
-    }
-}
\ No newline at end of file
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/value/object/CSFlowInfosSerializer.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/value/object/CSFlowInfosSerializer.java
deleted file mode 100644
index 9c55ef9..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/value/object/CSFlowInfosSerializer.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.serialize.impl.value.object;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.object.CSFlowInfos;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.serialize.AbstractSerializer;
-import com.webank.wedatasphere.linkis.cs.common.utils.CSCommonUtils;
-
-/**
- * @author peacewong
- * @date 2020/3/11 17:40
- */
-public class CSFlowInfosSerializer extends AbstractSerializer<CSFlowInfos> {
-    @Override
-    public CSFlowInfos fromJson(String json) throws CSErrorException {
-        return CSCommonUtils.gson.fromJson(json, CSFlowInfos.class);
-    }
-
-    @Override
-    public String getType() {
-        return "CSFlowInfos";
-    }
-
-    @Override
-    public boolean accepts(Object obj) {
-        if (null != obj && obj.getClass().getName().equals(CSFlowInfos.class.getName())){
-            return true;
-        }
-        return false;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/value/object/LinkisVariableSerializer.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/value/object/LinkisVariableSerializer.java
deleted file mode 100644
index cfa03e9..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/serialize/impl/value/object/LinkisVariableSerializer.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.serialize.impl.value.object;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.object.LinkisVariable;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.serialize.AbstractSerializer;
-import com.webank.wedatasphere.linkis.cs.common.utils.CSCommonUtils;
-
-/**
- * @author peacewong
- * @date 2020/3/17 19:35
- */
-public class LinkisVariableSerializer extends AbstractSerializer<LinkisVariable> {
-    @Override
-    public LinkisVariable fromJson(String json) throws CSErrorException {
-        return CSCommonUtils.gson.fromJson(json, LinkisVariable.class);
-    }
-
-    @Override
-    public String getType() {
-        return "LinkisVariable";
-    }
-
-    @Override
-    public boolean accepts(Object obj) {
-        if (null != obj && obj.getClass().getName().equals(LinkisVariable.class.getName())){
-            return true;
-        }
-        return false;
-    }
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/utils/CSCommonUtils.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/utils/CSCommonUtils.java
deleted file mode 100644
index c6fc4ad..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/utils/CSCommonUtils.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.utils;
-
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-import com.webank.wedatasphere.linkis.common.conf.CommonVars;
-
-/**
- * @author peacewong
- * @date 2020/2/27 20:56
- */
-public class CSCommonUtils {
-
-    public final static String  CONTEXT_ID_STR = "contextID";
-
-    public final static String NODE_NAME_STR = "nodeName";
-
-    public final static String NODE_ID = "nodeID";
-
-    public final static String ID_NODE_NAME = "id_nodeName";
-
-    public final static String FLOW_INFOS = "flow.infos";
-
-
-    public final static String CONTEXT_ENV_DEV = CommonVars.apply("wds.linkis.dev.contextID.env", "BDP_DEV").getValue();
-
-    public final static String CONTEXT_ENV_PROD = CommonVars.apply("wds.linkis.production.contextID.env", "BDP_PRODUCTION").getValue();
-
-    public final static String CS_TMP_TABLE_PREFIX = "cs_tmp_";
-
-    public static Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ssZ").serializeNulls().create();
-
-
-    public static final String NODE_PREFIX = "node.";
-
-    public static final String FLOW_PREFIX = "flow.";
-
-    public static final String PROJECT_PREFIX = "project.";
-
-    public static final String WORKSPACE_PREFIX = "workspace.";
-
-    public static final String RESOURCE_PREFIX = "resource.";
-
-    public static final String TABLE_PREFIX = "table.";
-
-    public static final String DB_PREFIX = "db.";
-
-    public static final String VARIABLE_PREFIX = "variable.";
-
-    public static final String JOB_ID = ".jobID";
-
-    public static final String FLOW_RESOURCE_PREFIX = FLOW_PREFIX + RESOURCE_PREFIX;
-
-    public static final String PROJECT_RESOURCE_PREFIX = PROJECT_PREFIX + RESOURCE_PREFIX;
-
-    public static final String WORKSPACE_RESOURCE_PREFIX = WORKSPACE_PREFIX + RESOURCE_PREFIX;
-
-    public static final String FLOW_VARIABLE_PREFIX = FLOW_PREFIX + VARIABLE_PREFIX;
-
-    public static final String WORKSPACE_VARIABLE_PREFIX = WORKSPACE_PREFIX + VARIABLE_PREFIX;
-
-    public static final String PROJECT_VARIABLE_PREFIX = PROJECT_PREFIX + VARIABLE_PREFIX;
-
-    public static String getVariableKey(String nodeName, String varName) {
-
-        return CSCommonUtils.NODE_PREFIX + nodeName + "." + CSCommonUtils.VARIABLE_PREFIX + varName;
-
-    }
-
-
-    public static String getTableKey(String nodeName, String tableName) {
-
-        return CSCommonUtils.NODE_PREFIX + nodeName + "." +  CSCommonUtils.TABLE_PREFIX + tableName;
-
-    }
-
-}
diff --git a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/utils/CSHighAvailableUtils.java b/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/utils/CSHighAvailableUtils.java
deleted file mode 100644
index ba83e40..0000000
--- a/contextservice/cs-common/src/main/java/com/webank/wedatasphere/linkis/cs/common/utils/CSHighAvailableUtils.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.common.utils;
-
-import com.google.gson.Gson;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.CommonHAContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.HAContextID;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.exception.ErrorCode;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @Author alexyang
- * @Date 2020/3/3
- */
-public class CSHighAvailableUtils {
-
-    private static final Logger logger = LoggerFactory.getLogger(CSHighAvailableUtils.class);
-    private final static String HAID_PART_DELEMETER = "--";
-    private final static String HAID_INS_LEN_DELEMETER = "-";
-    private final static int HAID_PARTS_NUM = 2;
-    private final static Gson gson = new Gson();
-
-    public static boolean checkHAIDBasicFormat(String haid) {
-        if (StringUtils.isBlank(haid)) {
-            return false;
-        }
-        String [] arr = haid.split(HAID_PART_DELEMETER);
-        if (null != arr && arr.length == HAID_PARTS_NUM) {
-            int insLen = 0;
-            String [] lenArr = arr[0].split(HAID_INS_LEN_DELEMETER);
-            if (null == lenArr || lenArr.length < 2) {
-                return false;
-            }
-            try {
-                for (String len : lenArr) {
-                    insLen += Integer.parseInt(len);
-                }
-            } catch (NumberFormatException e) {
-                return false;
-            }
-            if (insLen < arr[1].length()) {
-                String id = arr[1].substring(insLen);
-                if (StringUtils.isNumeric(id)) {
-                    return true;
-                }
-            }
-        }
-        return false;
-    }
-
-    public static String encodeHAIDKey(String contextID, String instance, List<String> backupInstanceList) throws CSErrorException {
-        if (!StringUtils.isNumeric(contextID) || StringUtils.isBlank(instance) || null == backupInstanceList || backupInstanceList.isEmpty()) {
-            logger.error("Cannot encodeHAIDKey, contextID : " + contextID
-                    + ", instance : " + instance + ", backupInstanceList : " + gson.toJson(backupInstanceList));
-            throw new CSErrorException(ErrorCode.INVALID_HAID_ENCODE_PARAMS, "Cannot encodeHAIDKey, contextID : " + contextID
-                    + ", instance : " + instance + ", backupInstanceList : " + gson.toJson(backupInstanceList));
-        }
-        StringBuilder idBuilder = new StringBuilder("");
-        StringBuilder instBuilder = new StringBuilder("");
-        idBuilder.append(instance.length());
-        instBuilder.append(instance);
-        for (String ins : backupInstanceList) {
-            idBuilder.append(HAID_INS_LEN_DELEMETER).append(ins.length());
-            instBuilder.append(ins);
-        }
-        idBuilder.append(HAID_PART_DELEMETER)
-                .append(instBuilder)
-                .append(contextID);
-        return idBuilder.toString();
-    }
-
-    public static HAContextID decodeHAID(String haid) throws CSErrorException {
-        if (StringUtils.isBlank(haid)) {
-            throw new CSErrorException(ErrorCode.INVALID_NULL_STRING, "HAIDKey cannot be empty.");
-        }
-        if (!checkHAIDBasicFormat(haid)) {
-            logger.error("Invalid haid : " + haid);
-            throw new CSErrorException(ErrorCode.INVALID_HAID_STRING, "Invalid haid : " + haid);
-        }
-        String [] partArr = haid.split(HAID_PART_DELEMETER);
-        String [] insArr = partArr[0].split(HAID_INS_LEN_DELEMETER);
-        String contextID = null;
-        List<String> instanceList = new ArrayList<>();
-        String insStr = partArr[1];
-        try {
-            int index = 0, tmp = 0;
-            for (String len : insArr) {
-                tmp = Integer.parseInt(len);
-                instanceList.add(insStr.substring(index, index + tmp));
-                index += tmp;
-            }
-            contextID = insStr.substring(index);
-        } catch (NumberFormatException e) {
-            logger.error("Invalid haid : " + haid + ", " + e.getMessage());
-            throw new CSErrorException(ErrorCode.INVALID_HAID_STRING, "Invalid haid : " + haid + ", " + e.getMessage());
-        }
-        String instance = instanceList.remove(0);
-        return new CommonHAContextID(instance, instanceList.get(0), contextID);
-    }
-
-    public static void main(String [] args) throws Exception {
-        String haid1 = "24--24--YmRwaGRwMTFpZGUwMTo5MTE2YmRwaGRwMTFpZGUwMTo5MTE084835";
-        System.out.println(checkHAIDBasicFormat(haid1));
-        String id = "8798";
-        String instance = "jslfjslfjlsdjfljsdf==+";
-        String backupInstance = "sjljsljflsdjflsjd";
-        List<String> list = new ArrayList<>();
-        list.add(backupInstance);
-        list.add(instance);
-        String haid2 = encodeHAIDKey(id, instance, list);
-        System.out.println(haid2);
-        System.out.println(checkHAIDBasicFormat(haid2));
-        if (checkHAIDBasicFormat(haid2)) {
-            System.out.println(gson.toJson(decodeHAID(haid2)));
-        }
-        String haid3 = "24-24--YmRwaGRwMTFpZGUwMTo5MTE0YmRwaGRwMTFpZGUwMTo5MTE084855";
-        if (checkHAIDBasicFormat(haid3)) {
-            System.out.println(gson.toJson(decodeHAID(haid3)));
-        } else {
-            System.out.println("Invalid haid3 : " + haid3);
-        }
-    }
-}
diff --git a/contextservice/cs-highavailable/pom.xml b/contextservice/cs-highavailable/pom.xml
deleted file mode 100644
index de17876..0000000
--- a/contextservice/cs-highavailable/pom.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>linkis-cs-highavailable</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cs-common</artifactId>
-            </dependency>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cloudRPC</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cs-persistence</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.commons</groupId>
-            <artifactId>commons-math3</artifactId>
-            <version>3.1.1</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>${basedir}/src/main/resources</directory>
-            </resource>
-        </resources>
-        <finalName>${project.artifactId}-${project.version}</finalName>
-    </build>
-</project>
\ No newline at end of file
diff --git a/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/AbstractContextHAManager.java b/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/AbstractContextHAManager.java
deleted file mode 100644
index a409a76..0000000
--- a/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/AbstractContextHAManager.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.highavailable;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.HAContextID;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.highavailable.ha.BackupInstanceGenerator;
-import com.webank.wedatasphere.linkis.cs.highavailable.ha.ContextHAChecker;
-import com.webank.wedatasphere.linkis.cs.highavailable.ha.ContextHAIDGenerator;
-
-/**
- *
- * @Author alexyang
- * @Date 2020/2/16
- */
-public abstract class AbstractContextHAManager implements ContextHAManager {
-
-    public abstract ContextHAIDGenerator getContextHAIDGenerator();
-
-    public abstract ContextHAChecker getContextHAChecker();
-
-    public abstract BackupInstanceGenerator getBackupInstanceGenerator();
-
-    public abstract HAContextID convertProxyHAID(HAContextID contextID) throws CSErrorException;
-}
diff --git a/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/ContextHAManager.java b/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/ContextHAManager.java
deleted file mode 100644
index 761815f..0000000
--- a/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/ContextHAManager.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.highavailable;
-
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-
-/**
- * 动态代理实现持久层HAIDKey和contextID的动态转换
- *
- * @Author alexyang
- * @Date 2020/2/16
- */
-public interface ContextHAManager {
-
-    <T> T getContextHAProxy(T persistence) throws CSErrorException;
-
-}
diff --git a/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/DefaultContextHAManager.java b/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/DefaultContextHAManager.java
deleted file mode 100644
index 22f7c5a..0000000
--- a/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/DefaultContextHAManager.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.highavailable;
-
-import com.google.gson.Gson;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.HAContextID;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.highavailable.exception.ErrorCode;
-import com.webank.wedatasphere.linkis.cs.highavailable.ha.BackupInstanceGenerator;
-import com.webank.wedatasphere.linkis.cs.highavailable.ha.ContextHAChecker;
-import com.webank.wedatasphere.linkis.cs.highavailable.ha.ContextHAIDGenerator;
-import com.webank.wedatasphere.linkis.cs.highavailable.proxy.MethodInterceptorImpl;
-import net.sf.cglib.proxy.Callback;
-import net.sf.cglib.proxy.Enhancer;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-/**
- * ContextService高可用管理器默认实现
- * 采用CGLib动态代理,一般用于CS持久层存储转换,将HAContextID实例进行转换
- * @Author alexyang
- * @Date 2020/2/19
- */
-@Component
-public class DefaultContextHAManager extends AbstractContextHAManager {
-
-    private static final Logger logger = LoggerFactory.getLogger(DefaultContextHAManager.class);
-    private static final Gson gson = new Gson();
-
-    @Autowired
-    private ContextHAIDGenerator contextHAIDGenerator;
-    @Autowired
-    private ContextHAChecker contextHAChecker;
-    @Autowired
-    private BackupInstanceGenerator backupInstanceGenerator;
-
-    public DefaultContextHAManager() {}
-
-
-    @Override
-    public <T> T  getContextHAProxy(T persistence) throws CSErrorException {
-        Callback callback = new MethodInterceptorImpl(this, persistence);
-        Enhancer enhancer = new Enhancer();
-        enhancer.setSuperclass(persistence.getClass());
-        Callback [] callbacks = new Callback[] {callback};
-        enhancer.setCallbacks(callbacks);
-        return (T)enhancer.create();
-    }
-
-    @Override
-    public HAContextID convertProxyHAID(HAContextID haContextID) throws CSErrorException {
-
-        if (null == haContextID) {
-            logger.error("HaContextID cannot be null.");
-            throw new CSErrorException(ErrorCode.INVALID_HAID, "HaContextID cannot be null.");
-        }
-        if (StringUtils.isBlank(haContextID.getContextId())) {
-            // generate new haid
-            HAContextID tmpHAID = contextHAIDGenerator.generateHAContextID(null);
-            haContextID.setContextId(tmpHAID.getContextId());
-            haContextID.setInstance(tmpHAID.getInstance());
-            haContextID.setBackupInstance(tmpHAID.getBackupInstance());
-            return haContextID;
-        } else if (StringUtils.isNotBlank(haContextID.getInstance()) && StringUtils.isNotBlank(haContextID.getBackupInstance())) {
-            if (StringUtils.isNumeric(haContextID.getContextId())) {
-                // convert contextID to haID
-                String haIdKey = contextHAChecker.convertHAIDToHAKey(haContextID);
-                haContextID.setContextId(haIdKey);
-            } else if (contextHAChecker.isHAIDValid(haContextID.getContextId())) {
-                String contextID = contextHAChecker.parseHAIDFromKey(haContextID.getContextId()).getContextId();
-                haContextID.setContextId(contextID);
-            } else {
-                throw new CSErrorException(ErrorCode.INVALID_HAID, "Invalid contextID in haContextID : " + gson.toJson(haContextID));
-            }
-            return haContextID;
-        } else {
-            // complete ha property
-            if (StringUtils.isNumeric(haContextID.getContextId())) {
-                HAContextID tmpHAID = contextHAIDGenerator.generateHAContextID(haContextID);
-                haContextID.setInstance(tmpHAID.getInstance());
-                haContextID.setBackupInstance(tmpHAID.getBackupInstance());
-            } else if (contextHAChecker.isHAIDValid(haContextID.getContextId())) {
-                HAContextID tmpHAID = contextHAChecker.parseHAIDFromKey(haContextID.getContextId());
-                haContextID.setContextId(tmpHAID.getContextId());
-                haContextID.setInstance(tmpHAID.getInstance());
-                haContextID.setBackupInstance(tmpHAID.getBackupInstance());
-            } else {
-                throw new CSErrorException(ErrorCode.INVALID_HAID, "Invalid contextID in haContextID : " + gson.toJson(haContextID));
-            }
-            // todo debug
-            if (contextHAChecker.isHAContextIDValid(haContextID)) {
-                logger.info("HAID : " + contextHAChecker.convertHAIDToHAKey(haContextID));
-            }
-            return haContextID;
-        }
-    }
-
-    @Override
-    public ContextHAIDGenerator getContextHAIDGenerator() {
-        return contextHAIDGenerator;
-    }
-
-    @Override
-    public ContextHAChecker getContextHAChecker() {
-        return contextHAChecker;
-    }
-
-    @Override
-    public BackupInstanceGenerator getBackupInstanceGenerator() {
-        return backupInstanceGenerator;
-    }
-
-}
diff --git a/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/conf/ContextHighAvailableConf.java b/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/conf/ContextHighAvailableConf.java
deleted file mode 100644
index a56e62b..0000000
--- a/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/conf/ContextHighAvailableConf.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.highavailable.conf;
-
-public class ContextHighAvailableConf {
-
-
-}
diff --git a/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/exception/ErrorCode.java b/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/exception/ErrorCode.java
deleted file mode 100644
index 53d43bf..0000000
--- a/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/exception/ErrorCode.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.highavailable.exception;
-
-/**
- * @Author alexyang
- * @Date 2020/2/18
- */
-public class ErrorCode {
-
-    public static int INVALID_INSTANCE_ALIAS = 70010;
-
-    public static int INVALID_HAID = 70011;
-
-    public static int GENERATE_HAID_ERROR = 70012;
-
-    public static int INVALID_CONTEXTID = 70013;
-
-    public static int GENERATE_BACKUP_INSTANCE_ERROR = 70014;
-
-    public static int INVALID_INSTANCE = 70015;
-
-    public static int INVAID_HA_CONTEXTID = 70016;
-}
diff --git a/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/ha/BackupInstanceGenerator.java b/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/ha/BackupInstanceGenerator.java
deleted file mode 100644
index 98ffa13..0000000
--- a/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/ha/BackupInstanceGenerator.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.highavailable.ha;
-
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-
-public interface BackupInstanceGenerator {
-
-    String getBackupInstance(String haID) throws CSErrorException;
-
-    String chooseBackupInstance(String mainInstance) throws CSErrorException;
-
-}
diff --git a/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/ha/ContextHAChecker.java b/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/ha/ContextHAChecker.java
deleted file mode 100644
index 547ee9d..0000000
--- a/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/ha/ContextHAChecker.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.highavailable.ha;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.HAContextID;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-
-public interface ContextHAChecker {
-
-    boolean isHAIDValid(String haIDKey);
-
-    boolean isHAContextIDValid(HAContextID haContextID) throws CSErrorException;
-
-    String convertHAIDToHAKey(HAContextID haContextID) throws CSErrorException;
-
-    HAContextID parseHAIDFromKey(String haIDKey) throws CSErrorException;
-}
diff --git a/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/ha/ContextHAIDGenerator.java b/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/ha/ContextHAIDGenerator.java
deleted file mode 100644
index 294efd8..0000000
--- a/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/ha/ContextHAIDGenerator.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.highavailable.ha;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.HAContextID;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-
-public interface ContextHAIDGenerator {
-
-    HAContextID generateHAContextID(ContextID contextID) throws CSErrorException;
-
-}
diff --git a/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/ha/impl/BackupInstanceGeneratorImpl.java b/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/ha/impl/BackupInstanceGeneratorImpl.java
deleted file mode 100644
index 61b08e9..0000000
--- a/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/ha/impl/BackupInstanceGeneratorImpl.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.highavailable.ha.impl;
-
-import com.webank.wedatasphere.linkis.common.ServiceInstance;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.highavailable.exception.ErrorCode;
-import com.webank.wedatasphere.linkis.cs.highavailable.ha.BackupInstanceGenerator;
-import com.webank.wedatasphere.linkis.cs.highavailable.ha.ContextHAChecker;
-import com.webank.wedatasphere.linkis.rpc.instancealias.InstanceAliasManager;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
-@Component
-public class BackupInstanceGeneratorImpl implements BackupInstanceGenerator {
-    private final static Logger logger = LoggerFactory.getLogger(BackupInstanceGeneratorImpl.class);
-
-    @Autowired
-    private InstanceAliasManager instanceAliasManager;
-
-    @Autowired
-    private ContextHAChecker contextHAChecker;
-
-    @Override
-    public String getBackupInstance(String haIDKey) throws CSErrorException {
-
-        String alias = null;
-        if (StringUtils.isNotBlank(haIDKey) && contextHAChecker.isHAIDValid(haIDKey)) {
-            alias = contextHAChecker.parseHAIDFromKey(haIDKey).getBackupInstance();
-        } else {
-            throw new CSErrorException(ErrorCode.INVALID_HAID, "Invalid HAID :" + haIDKey);
-        }
-        return alias;
-    }
-
-    @Override
-    public String chooseBackupInstance(String mainInstanceAlias) throws CSErrorException {
-        ServiceInstance mainInstance = null;
-        try {
-            mainInstance = instanceAliasManager.getInstanceByAlias(mainInstanceAlias);
-        } catch (Exception e) {
-            logger.error("Get Instance error, alias : {}, message : {}", mainInstanceAlias, e.getMessage());
-            throw new CSErrorException(ErrorCode.INVALID_INSTANCE_ALIAS, e.getMessage() + ", alias : " + mainInstanceAlias);
-        }
-        List<ServiceInstance> allInstanceList = instanceAliasManager.getAllInstanceList();
-        List<ServiceInstance> remainInstanceList = new ArrayList<>();
-        for (ServiceInstance instance : allInstanceList) {
-            if (instance.equals(mainInstance)) {
-                continue;
-            }
-            remainInstanceList.add(instance);
-        }
-        if (remainInstanceList.size() > 0) {
-            int index = getBackupInstanceIndex(remainInstanceList);
-            return instanceAliasManager.getAliasByServiceInstance(remainInstanceList.get(index));
-        } else {
-            // only one service instance
-            logger.error("Only one instance, no remains.");
-            return instanceAliasManager.getAliasByServiceInstance(mainInstance);
-        }
-    }
-
-    private int getBackupInstanceIndex(List<ServiceInstance> instanceList) {
-
-        // todo refactor according to load-balance
-        return new Random().nextInt(instanceList.size());
-    }
-
-}
diff --git a/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/ha/impl/ContextHACheckerImpl.java b/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/ha/impl/ContextHACheckerImpl.java
deleted file mode 100644
index 480a2b1..0000000
--- a/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/ha/impl/ContextHACheckerImpl.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.highavailable.ha.impl;
-
-import com.webank.wedatasphere.linkis.DataWorkCloudApplication;
-import com.webank.wedatasphere.linkis.common.ServiceInstance;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.HAContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.CommonHAContextID;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.utils.CSHighAvailableUtils;
-import com.webank.wedatasphere.linkis.cs.highavailable.exception.ErrorCode;
-import com.webank.wedatasphere.linkis.cs.highavailable.ha.ContextHAChecker;
-import com.webank.wedatasphere.linkis.rpc.instancealias.impl.InstanceAliasManagerImpl;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @Author alexyang
- * @Date 2020/2/19
- */
-@Component
-public class ContextHACheckerImpl implements ContextHAChecker {
-
-    private final static Logger logger = LoggerFactory.getLogger(ContextHACheckerImpl.class);
-
-    @Autowired
-    private InstanceAliasManagerImpl instanceAliasManager;
-    /**
-     * ${第一个instance长度}${第二个instance长度}{instance别名1}{instance别名2}{实际ID}
-     *
-     * @param haIDKey
-     * @return
-     */
-    @Override
-    public boolean isHAIDValid(String haIDKey) {
-        if (CSHighAvailableUtils.checkHAIDBasicFormat(haIDKey)) {
-            try {
-                return checkHAIDInstance(CSHighAvailableUtils.decodeHAID(haIDKey));
-            } catch (CSErrorException e) {
-                return false;
-            }
-        } else {
-            return false;
-        }
-    }
-
-    /**
-     * 主备实例同时有效,且id为有效的HAID或数字时才有效
-     * @param haContextID
-     * @return
-     * @throws CSErrorException
-     */
-    @Override
-    public boolean isHAContextIDValid(HAContextID haContextID) throws CSErrorException {
-        boolean valid = false;
-        if (null != haContextID && StringUtils.isNotBlank(haContextID.getInstance())
-                && StringUtils.isNotBlank(haContextID.getBackupInstance())) {
-            if (StringUtils.isNotBlank(haContextID.getContextId())) {
-                if (StringUtils.isNumeric(haContextID.getContextId())) {
-                    valid = checkHAIDInstance(haContextID);
-                } else {
-                    valid = isHAIDValid(haContextID.getContextId());
-                }
-            } else {
-                valid = false;
-            }
-        } else {
-            valid = false;
-        }
-        return valid;
-    }
-
-    @Override
-    public String convertHAIDToHAKey(HAContextID haContextID) throws CSErrorException {
-        if (null == haContextID || StringUtils.isBlank(haContextID.getInstance())
-                || StringUtils.isBlank(haContextID.getBackupInstance())
-                || StringUtils.isBlank(haContextID.getContextId())) {
-            throw new CSErrorException(ErrorCode.INVALID_HAID, "Incomplete HAID Object cannot be encoded. mainInstance : "
-                    + haContextID.getInstance() + ", backupInstance : " + haContextID.getBackupInstance() + ", contextID : " + haContextID.getContextId());
-        }
-        if (StringUtils.isNumeric(haContextID.getContextId())) {
-            return encode(haContextID);
-        } else if (isHAIDValid(haContextID.getContextId())) {
-            return haContextID.getContextId();
-        } else {
-            logger.error("ConvertHAIDToHAKey error, invald HAID : " + haContextID.getContextId());
-            throw new CSErrorException(ErrorCode.INVALID_HAID, "ConvertHAIDToHAKey error, invald HAID : " + haContextID.getContextId());
-        }
-    }
-
-    /**
-     * Encode HAContextID to HAKey String.
-     * ${第一个instance长度}${第二个instance长度}{instance别名0}{instance别名2}{实际ID}
-     * @return
-     */
-    private String encode(HAContextID haContextID) throws CSErrorException {
-        List<String> backupInstanceList = new ArrayList<>();
-        if (StringUtils.isNotBlank(haContextID.getBackupInstance())) {
-            backupInstanceList.add(haContextID.getBackupInstance());
-        } else {
-            backupInstanceList.add(haContextID.getInstance());
-        }
-        return CSHighAvailableUtils.encodeHAIDKey(haContextID.getContextId(), haContextID.getInstance(), backupInstanceList);
-    }
-
-    private boolean checkHAIDInstance(HAContextID haContextID) {
-        ServiceInstance serverMainInstance = DataWorkCloudApplication.getServiceInstance();
-        String mainInstanceAlias = haContextID.getInstance();
-        String backupInstanceAlias = haContextID.getBackupInstance();
-        if (!instanceAliasManager.isInstanceAliasValid(mainInstanceAlias) && !instanceAliasManager.isInstanceAliasValid(backupInstanceAlias)) {
-            return false;
-        }
-        ServiceInstance mainInstance = instanceAliasManager.getInstanceByAlias(mainInstanceAlias);
-        ServiceInstance backupInstance = instanceAliasManager.getInstanceByAlias(backupInstanceAlias);
-        if (serverMainInstance.equals(mainInstance) || serverMainInstance.equals(backupInstance)) {
-            return true;
-        } else {
-            return false;
-        }
-    }
-
-    @Override
-    public HAContextID parseHAIDFromKey(String haIDKey) throws CSErrorException {
-        HAContextID haContextID = null;
-        if (StringUtils.isBlank(haIDKey) || !CSHighAvailableUtils.checkHAIDBasicFormat(haIDKey)) {
-            logger.error("Invalid haIDKey : " + haIDKey);
-            throw new CSErrorException(ErrorCode.INVALID_HAID, "Invalid haIDKey : " + haIDKey);
-        }
-        return CSHighAvailableUtils.decodeHAID(haIDKey);
-    }
-}
diff --git a/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/ha/impl/ContextHAIDGeneratorImpl.java b/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/ha/impl/ContextHAIDGeneratorImpl.java
deleted file mode 100644
index a843044..0000000
--- a/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/ha/impl/ContextHAIDGeneratorImpl.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.highavailable.ha.impl;
-
-import com.google.gson.Gson;
-import com.webank.wedatasphere.linkis.DataWorkCloudApplication;
-import com.webank.wedatasphere.linkis.common.ServiceInstance;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.HAContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.CommonHAContextID;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.highavailable.exception.ErrorCode;
-import com.webank.wedatasphere.linkis.cs.highavailable.ha.BackupInstanceGenerator;
-import com.webank.wedatasphere.linkis.cs.highavailable.ha.ContextHAIDGenerator;
-import com.webank.wedatasphere.linkis.rpc.instancealias.InstanceAliasConverter;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-@Component
-public class ContextHAIDGeneratorImpl implements ContextHAIDGenerator {
-
-    private static final Logger logger = LoggerFactory.getLogger(ContextHAIDGeneratorImpl.class);
-
-    @Autowired
-    private BackupInstanceGenerator backupInstanceGenerator;
-
-    @Autowired
-    private InstanceAliasConverter instanceAliasConverter;
-
-    @Override
-    public HAContextID generateHAContextID(ContextID contextID) throws CSErrorException {
-        String contextIDKey = null;
-        if (null != contextID && StringUtils.isNotBlank(contextID.getContextId())) {
-            contextIDKey = contextID.getContextId();
-        }
-
-        ServiceInstance mainInstance = DataWorkCloudApplication.getServiceInstance();
-        if (null == mainInstance || StringUtils.isBlank(mainInstance.getInstance())) {
-            logger.error("MainInstance cannot be null.");
-            throw new CSErrorException(ErrorCode.INVALID_INSTANCE, "MainInstance backupInstance cannot be null.");
-        }
-        String mainInstanceAlias = instanceAliasConverter.instanceToAlias(mainInstance.getInstance());
-        String backupInstance = backupInstanceGenerator.chooseBackupInstance(mainInstanceAlias);
-        if (StringUtils.isBlank(backupInstance)) {
-            logger.error("Generate backupInstance cannot be null.");
-            throw new CSErrorException(ErrorCode.GENERATE_BACKUP_INSTANCE_ERROR, "Generate backupInstance cannot be null.");
-        }
-        HAContextID haContextID = new CommonHAContextID(mainInstanceAlias, backupInstance, contextIDKey);
-        logger.info("Generate a haContextID : {}" + new Gson().toJson(haContextID));
-        return haContextID;
-    }
-
-}
diff --git a/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/pluggable/HAContextPersistenceManagerImpl.java b/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/pluggable/HAContextPersistenceManagerImpl.java
deleted file mode 100644
index 1e5f0fa..0000000
--- a/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/pluggable/HAContextPersistenceManagerImpl.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.highavailable.pluggable;
-
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.highavailable.AbstractContextHAManager;
-import com.webank.wedatasphere.linkis.cs.persistence.ContextPersistenceManager;
-import com.webank.wedatasphere.linkis.cs.persistence.persistence.*;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.PostConstruct;
-
-/**
- * @Author alexyang
- * @Date 2020/2/22
- */
-@Component
-public class HAContextPersistenceManagerImpl implements ContextPersistenceManager {
-
-    @Autowired
-    private ContextIDPersistence contextIDPersistence;
-    @Autowired
-    private ContextMapPersistence contextMapPersistence;
-
-    @Autowired
-    private ContextMetricsPersistence contextMetricsPersistence;
-    @Autowired
-    private ContextIDListenerPersistence contextIDListenerPersistence;
-    @Autowired
-    private ContextKeyListenerPersistence contextKeyListenerPersistence;
-    @Autowired
-    private TransactionManager transactionManager;
-
-
-    @Autowired
-    private AbstractContextHAManager contextHAManager;
-
-    @PostConstruct
-    void init() throws CSErrorException {
-        contextIDPersistence = contextHAManager.getContextHAProxy(contextIDPersistence);
-        contextMapPersistence = contextHAManager.getContextHAProxy(contextMapPersistence);
-        contextMetricsPersistence = contextHAManager.getContextHAProxy(contextMetricsPersistence);
-        contextIDListenerPersistence = contextHAManager.getContextHAProxy(contextIDListenerPersistence);
-        contextKeyListenerPersistence = contextHAManager.getContextHAProxy(contextKeyListenerPersistence);
-    }
-
-    @Override
-    public ContextIDPersistence getContextIDPersistence() {
-        return this.contextIDPersistence;
-    }
-
-    @Override
-    public ContextMapPersistence getContextMapPersistence() {
-        return this.contextMapPersistence;
-    }
-
-
-
-
-
-    @Override
-    public ContextMetricsPersistence getContextMetricsPersistence() {
-        return this.contextMetricsPersistence;
-    }
-
-    @Override
-    public ContextIDListenerPersistence getContextIDListenerPersistence() {
-        return this.contextIDListenerPersistence;
-    }
-
-    @Override
-    public ContextKeyListenerPersistence getContextKeyListenerPersistence() {
-        return this.contextKeyListenerPersistence;
-    }
-
-    @Override
-    public TransactionManager getTransactionManager() {
-        return this.transactionManager;
-    }
-
-}
diff --git a/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/proxy/MethodInterceptorImpl.java b/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/proxy/MethodInterceptorImpl.java
deleted file mode 100644
index 03e0a7f..0000000
--- a/contextservice/cs-highavailable/src/main/java/com/webank/wedatasphere/linkis/cs/highavailable/proxy/MethodInterceptorImpl.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.highavailable.proxy;
-
-import com.google.gson.Gson;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.HAContextID;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.highavailable.AbstractContextHAManager;
-import com.webank.wedatasphere.linkis.cs.highavailable.exception.ErrorCode;
-import net.sf.cglib.proxy.MethodInterceptor;
-import net.sf.cglib.proxy.MethodProxy;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 基于CGLib库实现的动态代理拦截器,拦截被代理方法的参数,在被代理方法之前和之后进行增强
- * 被代理方法调用前增强场景较多,一般对参数为HAContextID实例、参数名包含contextid的方法参数进行转换
- * 被代理方法调用后,目前只用于将HAContextID的数字型contextID转换为HAIDKey
- * @Author alexyang
- * @Date 2020/2/25
- */
-public class MethodInterceptorImpl implements MethodInterceptor {
-
-    private final static Logger logger = LoggerFactory.getLogger(MethodInterceptorImpl.class);
-    private final static Gson gson = new Gson();
-    private AbstractContextHAManager contextHAManager;
-    private Object object;
-    private final Map<Integer, String> contextIDCacheMap = new HashMap<Integer, String>();
-
-    public MethodInterceptorImpl(AbstractContextHAManager contextHAManager, Object object) {
-        this.contextHAManager = contextHAManager;
-        this.object = object;
-    }
-
-    @Override
-    public Object intercept(Object o, Method method, Object[] args, MethodProxy methodProxy) throws Throwable {
-
-        this.contextIDCacheMap.clear();
-        // 1,执行方法前转换
-        for (int i = 0; i < args.length; i++) {
-
-            // ①参数含有ContextID实例
-            if (ContextID.class.isInstance(args[i])) {
-                ContextID contextID = (ContextID)args[i];
-                convertContextIDBeforeInvoke(contextID, i);
-            }
-
-            // ②参数含有getContextID方法的
-            convertGetContextIDBeforeInvoke(args[i]);
-        }
-
-        // ③方法名含有ContextID,并且有String类型参数,取第一个转换
-        if (method.getName().toLowerCase().contains("contextid")) {
-            for (int j = 0; j < args.length; j++) {
-                if (String.class.isInstance(args[j])) {
-                    String pStr = (String)args[j];
-                    if (StringUtils.isNotBlank(pStr) && !StringUtils.isNumeric(pStr)) {
-                        if (this.contextHAManager.getContextHAChecker().isHAIDValid(pStr)) {
-                            String contextID = this.contextHAManager.getContextHAChecker().parseHAIDFromKey(pStr).getContextId();
-                            args[j] = contextID;
-                        } else {
-                            logger.error("Invalid HAID : " + pStr + " in method : " + method.getName());
-                            throw new CSErrorException(ErrorCode.INVALID_HAID, "Invalid HAID : " + pStr + " in method : " + method.getName());
-                        }
-                    }
-                    break;
-                }
-            }
-        }
-
-        // 2,执行原方法
-        Object oriResult = method.invoke(this.object, args);
-
-        // 3,执行方法后处理
-        // (1)返回值处理
-        if (null != oriResult) {
-            // ①判断集合中元素是否有getContextID方法
-            if (List.class.isInstance(oriResult)) {
-                List objList = (List)oriResult;
-                for (Object oneParameter : objList) {
-                    convertGetContextIDAfterInvoke(oneParameter);
-                }
-                // ②判断ContextID
-            } else if (HAContextID.class.isInstance(oriResult)) {
-                HAContextID haContextID = (HAContextID)oriResult;
-                if (StringUtils.isNumeric(haContextID.getContextId())) {
-                    String haId = this.contextHAManager.getContextHAChecker().convertHAIDToHAKey(haContextID);
-                    haContextID.setContextId(haId);
-                }
-            } else {
-                // ③ 返回值方法含有getContextID
-                convertGetContextIDAfterInvoke(oriResult);
-            }
-        }
-
-        // (2)请求参数还原
-        // ①参数有ContextID实例
-        for (int k = 0; k < args.length; k++) {
-            if (ContextID.class.isInstance(args[k])) {
-                if (this.contextIDCacheMap.containsKey(k)) {
-                    ContextID contextID = (ContextID)args[k];
-                    contextID.setContextId(this.contextIDCacheMap.get(k));
-                } else {
-                    if (HAContextID.class.isInstance(args[k])) {
-                        HAContextID haContextID = (HAContextID)args[k];
-                        if (StringUtils.isNumeric(haContextID.getContextId())) {
-                            if (StringUtils.isNotBlank(haContextID.getInstance()) && StringUtils.isNotBlank(haContextID.getBackupInstance())) {
-                                String haId = this.contextHAManager.getContextHAChecker().convertHAIDToHAKey(haContextID);
-                                haContextID.setContextId(haId);
-                            } else {
-                                logger.error("Invalid HAContextID : " + gson.toJson(haContextID));
-                                throw new CSErrorException(ErrorCode.INVAID_HA_CONTEXTID, "Invalid HAContextID : " + gson.toJson(haContextID));
-                            }
-                        }
-                    }
-                }
-            } else {
-                // ②参数含有getContextID方法
-                convertGetContextIDAfterInvoke(args[k]);
-            }
-        }
-        // ③方法名含有ContextID,并且有String类型参数 引用不需要作处理
-
-        return oriResult;
-    }
-
-
-    private void convertContextIDBeforeInvoke(ContextID contextID, int index) throws CSErrorException {
-        if (null == contextID) {
-            return;
-        }
-        if (StringUtils.isNumeric(contextID.getContextId())) {
-            if (HAContextID.class.isInstance(contextID)) {
-                logger.error("ContextId of HAContextID instance cannot be numberic. contextId : " + gson.toJson(contextID));
-                throw new CSErrorException(ErrorCode.INVALID_CONTEXTID, "ContextId of HAContextID instance cannot be numberic. contextId : " + gson.toJson(contextID));
-            }
-        } else {
-            if (HAContextID.class.isInstance(contextID)) {
-                if (null == contextID.getContextId()) {
-                    this.contextHAManager.convertProxyHAID((HAContextID) contextID);
-                } else if (this.contextHAManager.getContextHAChecker().isHAIDValid(contextID.getContextId())) {
-                    if (index > 0) {
-                        this.contextIDCacheMap.put(index, contextID.getContextId());
-                    }
-                    this.contextHAManager.convertProxyHAID((HAContextID) contextID);
-                } else {
-                    logger.error("Invalid haContextId. contextId : " + gson.toJson(contextID));
-                    throw new CSErrorException(ErrorCode.INVALID_HAID, "Invalid haContextId. contextId : " + gson.toJson(contextID));
-                }
-            }
-        }
-    }
-
-    private void convertGetContextIDBeforeInvoke(Object object) throws CSErrorException {
-        for (Method innerMethod : object.getClass().getMethods()) {
-            if (innerMethod.getName().toLowerCase().contains("getcontextid")) {
-                try {
-                    Object result = innerMethod.invoke(object);
-                    if (null != object && ContextID.class.isInstance(result)) {
-                        convertContextIDBeforeInvoke((ContextID)result, -1);
-                    } else {
-                        logger.warn("Method {} returns non-contextid object : {}", innerMethod.getName(), gson.toJson(object));
-                    }
-                } catch (Exception e) {
-                    logger.error("call method : {} error, ", innerMethod.getName(), e);
-                }
-            }
-        }
-    }
-
-    private void convertGetContextIDAfterInvoke(Object object) throws CSErrorException {
-        for (Method innerMethod : object.getClass().getMethods()) {
-            convertGetContextIDAfterInvokeMethod(innerMethod);
-        }
-    }
-
-    private void convertGetContextIDAfterInvokeMethod(Method method) throws CSErrorException {
-        if (method.getName().toLowerCase().contains("getcontextid")) {
-            Object result = null;
-            try {
-                result = method.invoke(object);
-            } catch (Exception e) {
-                logger.warn("Invoke method : {} error. ", method.getName(), e);
-            }
-            if (null != result && HAContextID.class.isInstance(result)) {
-                HAContextID haContextID = (HAContextID)result;
-                if (StringUtils.isNumeric(haContextID.getContextId())
-                        && StringUtils.isNotBlank(haContextID.getInstance())
-                        && StringUtils.isNotBlank(haContextID.getBackupInstance())) {
-                    String haid = this.contextHAManager.getContextHAChecker().convertHAIDToHAKey(haContextID);
-                    haContextID.setContextId(haid);
-                } else {
-                    logger.error("GetContextID method : " + method.getName() + " returns invalid haContextID : " + gson.toJson(result));
-                    throw new CSErrorException(ErrorCode.INVALID_HAID, "GetContextID method : " + method.getName() + " returns invalid haContextID : " + gson.toJson(result));
-                }
-            }
-        }
-    }
-}
diff --git a/contextservice/cs-highavailable/src/test/java/com/webank/wedatasphere/linkis/cs/highavailable/test/TestContextHAManager.java b/contextservice/cs-highavailable/src/test/java/com/webank/wedatasphere/linkis/cs/highavailable/test/TestContextHAManager.java
deleted file mode 100644
index e0ae1eb..0000000
--- a/contextservice/cs-highavailable/src/test/java/com/webank/wedatasphere/linkis/cs/highavailable/test/TestContextHAManager.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.highavailable.test;
-
-import com.google.gson.Gson;
-import com.webank.wedatasphere.linkis.DataWorkCloudApplication;
-import com.webank.wedatasphere.linkis.common.ServiceInstance;
-import com.webank.wedatasphere.linkis.common.conf.BDPConfiguration;
-import com.webank.wedatasphere.linkis.common.conf.Configuration;
-import com.webank.wedatasphere.linkis.common.exception.DWCException;
-import com.webank.wedatasphere.linkis.common.utils.Utils;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.HAContextID;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.highavailable.AbstractContextHAManager;
-import com.webank.wedatasphere.linkis.cs.highavailable.test.haid.TestHAID;
-import com.webank.wedatasphere.linkis.cs.highavailable.test.persist.TestPersistence;
-import com.webank.wedatasphere.linkis.server.BDPJettyServerHelper;
-import com.webank.wedatasphere.linkis.server.conf.ServerConfiguration;
-import org.apache.commons.lang.StringUtils;
-import org.eclipse.jetty.server.Handler;
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.servlet.FilterHolder;
-import org.eclipse.jetty.webapp.WebAppContext;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.builder.SpringApplicationBuilder;
-import org.springframework.boot.context.event.ApplicationPreparedEvent;
-import org.springframework.boot.web.embedded.jetty.JettyServerCustomizer;
-import org.springframework.boot.web.embedded.jetty.JettyServletWebServerFactory;
-import org.springframework.boot.web.server.WebServerFactoryCustomizer;
-import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.cloud.context.scope.refresh.RefreshScopeRefreshedEvent;
-import org.springframework.context.ApplicationListener;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ComponentScan;
-import org.springframework.core.env.CompositePropertySource;
-import org.springframework.core.env.Environment;
-import org.springframework.core.env.PropertySource;
-import org.springframework.core.env.StandardEnvironment;
-import org.springframework.web.filter.CharacterEncodingFilter;
-
-import javax.servlet.DispatcherType;
-import java.util.EnumSet;
-
-/**
- * @Author alexyang
- * @Date 2020/2/22
- */
-@SpringBootApplication
-@EnableDiscoveryClient
-@ComponentScan(basePackages = "com.webank.wedatasphere.linkis")
-public class TestContextHAManager extends SpringBootServletInitializer {
-
-    private static ConfigurableApplicationContext applicationContext;
-    private static ServiceInstance serviceInstance;
-    private static final Gson gson = new Gson();
-
-    public static void main(String [] args) throws ReflectiveOperationException {
-
-        final SpringApplication application = new SpringApplication(TestContextHAManager.class);
-        application.addListeners(new ApplicationListener<ApplicationPreparedEvent>(){
-            public void onApplicationEvent(ApplicationPreparedEvent applicationPreparedEvent) {
-                System.out.println("add config from config server...");
-                if(applicationContext == null) {
-                    applicationContext = applicationPreparedEvent.getApplicationContext();
-                }
-                System.out.println("initialize DataWorkCloud spring application...");
-                initDWCApplication();
-
-            }
-        });
-        application.addListeners(new ApplicationListener<RefreshScopeRefreshedEvent>() {
-            public void onApplicationEvent(RefreshScopeRefreshedEvent applicationEvent) {
-                System.out.println("refresh config from config server...");
-                updateRemoteConfig();
-            }
-        });
-        String listeners = ServerConfiguration.BDP_SERVER_SPRING_APPLICATION_LISTENERS().getValue();
-        if(StringUtils.isNotBlank(listeners)) {
-            for (String listener : listeners.split(",")) {
-                application.addListeners((ApplicationListener<?>) Class.forName(listener).newInstance());
-            }
-        }
-        applicationContext = application.run(args);
-
-        try {
-//            Thread.sleep(3000l);
-            AbstractContextHAManager haManager = (AbstractContextHAManager) applicationContext.getBean(AbstractContextHAManager.class);
-            if (null == haManager) {
-                System.err.println("Null haManager!");
-                return ;
-            }
-            testHAManager(haManager);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-
-    }
-
-    private static void initDWCApplication() {
-        serviceInstance = new ServiceInstance();
-        serviceInstance.setApplicationName(applicationContext.getEnvironment().getProperty("spring.application.name"));
-        serviceInstance.setInstance(Utils.getComputerName() + ":" + applicationContext.getEnvironment().getProperty("server.port"));
-        DWCException.setApplicationName(serviceInstance.getApplicationName());
-        DWCException.setHostname(Utils.getComputerName());
-        DWCException.setHostPort(Integer.parseInt(applicationContext.getEnvironment().getProperty("server.port")));
-    }
-
-    public static void updateRemoteConfig() {
-        addOrUpdateRemoteConfig(applicationContext.getEnvironment(), true);
-    }
-
-    public static void addRemoteConfig() {
-        addOrUpdateRemoteConfig(applicationContext.getEnvironment(), false);
-    }
-
-    private static void addOrUpdateRemoteConfig(Environment env, boolean isUpdateOrNot) {
-        StandardEnvironment environment = (StandardEnvironment) env;
-        PropertySource propertySource = environment.getPropertySources().get("bootstrapProperties");
-        if(propertySource == null) {
-            return;
-        }
-        CompositePropertySource source = (CompositePropertySource) propertySource;
-        for (String key: source.getPropertyNames()) {
-            Object val = source.getProperty(key);
-            if(val == null) {
-                continue;
-            }
-            if(isUpdateOrNot) {
-                System.out.println("update remote config => " + key + " = " + source.getProperty(key));
-                BDPConfiguration.set(key, val.toString());
-            } else {
-                System.out.println("add remote config => " + key + " = " + source.getProperty(key));
-                BDPConfiguration.setIfNotExists(key, val.toString());
-            }
-        }
-    }
-
-    @Override
-    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
-        return builder.sources(DataWorkCloudApplication.class);
-    }
-
-    @Bean
-    public WebServerFactoryCustomizer<JettyServletWebServerFactory> jettyFactoryCustomizer() {
-        return new WebServerFactoryCustomizer<JettyServletWebServerFactory>() {
-            public void customize(JettyServletWebServerFactory jettyServletWebServerFactory) {
-                jettyServletWebServerFactory.addServerCustomizers(new JettyServerCustomizer() {
-                    public void customize(Server server) {
-                        Handler[] childHandlersByClass = server.getChildHandlersByClass(WebAppContext.class);
-                        final WebAppContext webApp = (WebAppContext) childHandlersByClass[0];
-                        FilterHolder filterHolder = new FilterHolder(CharacterEncodingFilter.class);
-                        filterHolder.setInitParameter("encoding", Configuration.BDP_ENCODING().getValue());
-                        filterHolder.setInitParameter("forceEncoding", "true");
-                        webApp.addFilter(filterHolder, "/*", EnumSet.allOf(DispatcherType.class));
-                        BDPJettyServerHelper.setupRestApiContextHandler(webApp);
-                        if(ServerConfiguration.BDP_SERVER_SOCKET_MODE().getValue()) {
-                            BDPJettyServerHelper.setupControllerServer(webApp);
-                        }
-                        if(!ServerConfiguration.BDP_SERVER_DISTINCT_MODE().getValue()) {
-                            BDPJettyServerHelper.setupWebAppContext(webApp);
-                        }
-                    }
-                });
-            }
-        };
-    }
-
-
-
-    // test
-    private static void testHAManager(AbstractContextHAManager contextHAManager) {
-        // 1 test create
-        TestHAID haid = new TestHAID();
-        try {
-            TestPersistence testPersistence = contextHAManager.getContextHAProxy(new TestPersistence());
-            HAContextID  haContextID = testPersistence.createHAID(haid);
-            testPersistence.passHAID(haContextID);
-            testPersistence.setContextId(haContextID.getContextId());
-        } catch (CSErrorException e) {
-            e.printStackTrace();
-        }
-        System.out.println("Test HaManager End.");
-    }
-
-    public static ServiceInstance getServiceInstance() {
-        return serviceInstance;
-    }
-
-}
diff --git a/contextservice/cs-highavailable/src/test/java/com/webank/wedatasphere/linkis/cs/highavailable/test/haid/TestHAID.java b/contextservice/cs-highavailable/src/test/java/com/webank/wedatasphere/linkis/cs/highavailable/test/haid/TestHAID.java
deleted file mode 100644
index 46cdf78..0000000
--- a/contextservice/cs-highavailable/src/test/java/com/webank/wedatasphere/linkis/cs/highavailable/test/haid/TestHAID.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.highavailable.test.haid;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.HAContextID;
-
-public class TestHAID implements HAContextID {
-
-    private String contextId;
-    private String instance;
-    private String backupInstance;
-
-    @Override
-    public String getContextId() {
-        return contextId;
-    }
-
-    @Override
-    public void setContextId(String contextId) {
-        this.contextId = contextId;
-    }
-
-    @Override
-    public String getInstance() {
-        return instance;
-    }
-
-    @Override
-    public void setInstance(String instance) {
-        this.instance = instance;
-    }
-
-    @Override
-    public String getBackupInstance() {
-        return backupInstance;
-    }
-
-    @Override
-    public void setBackupInstance(String backupInstance) {
-        this.backupInstance = backupInstance;
-    }
-}
diff --git a/contextservice/cs-highavailable/src/test/java/com/webank/wedatasphere/linkis/cs/highavailable/test/persist/TestPersistence.java b/contextservice/cs-highavailable/src/test/java/com/webank/wedatasphere/linkis/cs/highavailable/test/persist/TestPersistence.java
deleted file mode 100644
index a0c04ed..0000000
--- a/contextservice/cs-highavailable/src/test/java/com/webank/wedatasphere/linkis/cs/highavailable/test/persist/TestPersistence.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.highavailable.test.persist;
-
-import com.google.gson.Gson;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.HAContextID;
-
-public class TestPersistence {
-
-    private Gson gson = new Gson();
-
-    public void testPrint() {
-        System.out.println("TestPersistence: testPrint()");
-    }
-
-    public HAContextID createHAID(HAContextID haContextID) {
-        System.out.println("TestPersistence: createHAID(), params: haContextID : " + gson.toJson(haContextID));
-        haContextID.setContextId("1");
-        return haContextID;
-    }
-
-    public HAContextID passHAID(HAContextID haContextID) {
-        System.out.println("TestPersistence: passHAID(), params: haContextID : " + gson.toJson(haContextID));
-        return haContextID;
-    }
-
-    public void setContextId(String haid) {
-        System.out.println("TestPersistence: setContextId(), : " + gson.toJson(haid));
-    }
-
-
-}
diff --git a/contextservice/cs-highavailable/src/test/resources/application.yml b/contextservice/cs-highavailable/src/test/resources/application.yml
deleted file mode 100644
index d6b3e8f..0000000
--- a/contextservice/cs-highavailable/src/test/resources/application.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-server:
-  port: 9010
-spring:
-  application:
-    name: CLOUD-CONTEXTSERVICE
-
-eureka:
-  client:
-    serviceUrl:
-      defaultZone: http://127.0.0.1:20303/eureka/
-    registry-fetch-interval-seconds: 5
-  instance:
-    metadata-map:
-      test: wedatasphere
-
-management:
-  endpoints:
-    web:
-      exposure:
-        include: refresh,info
diff --git a/contextservice/cs-listener/pom.xml b/contextservice/cs-listener/pom.xml
deleted file mode 100644
index 1c5413d..0000000
--- a/contextservice/cs-listener/pom.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>linkis-cs-listener</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-common</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cs-common</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.12</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>${basedir}/src/main/resources</directory>
-            </resource>
-        </resources>
-        <finalName>${project.artifactId}-${project.version}</finalName>
-    </build>
-</project>
\ No newline at end of file
diff --git a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/CSIDListener.java b/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/CSIDListener.java
deleted file mode 100644
index 7f893ba..0000000
--- a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/CSIDListener.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.listener;
-
-import com.webank.wedatasphere.linkis.cs.listener.event.ContextIDEvent;
-
-/**
- * @author peacewong
- * @date 2020/2/15 11:24
- */
-public interface CSIDListener extends ContextAsyncEventListener {
-
-
-
-    void onCSIDAccess(ContextIDEvent contextIDEvent);
-
-    void onCSIDADD(ContextIDEvent contextIDEvent);
-
-    void onCSIDRemoved(ContextIDEvent contextIDEvent);
-
-}
diff --git a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/CSKeyListener.java b/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/CSKeyListener.java
deleted file mode 100644
index f380528..0000000
--- a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/CSKeyListener.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.listener;
-
-import com.webank.wedatasphere.linkis.common.listener.Event;
-import com.webank.wedatasphere.linkis.cs.listener.event.ContextKeyEvent;
-
-/**
- * @author peacewong
- * @date 2020/2/15 11:24
- */
-public interface CSKeyListener extends ContextAsyncEventListener {
-    @Override
-    void onEvent(Event event);
-    void onCSKeyUpdate(ContextKeyEvent contextKeyEvent);
-    void onCSKeyAccess(ContextKeyEvent contextKeyEvent);
-
-}
diff --git a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/ContextAsyncEventListener.java b/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/ContextAsyncEventListener.java
deleted file mode 100644
index 610d9b7..0000000
--- a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/ContextAsyncEventListener.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.listener;
-
-import com.webank.wedatasphere.linkis.common.listener.Event;
-import com.webank.wedatasphere.linkis.common.listener.EventListener;
-
-/**
- * @author peacewong
- * @date 2020/2/22 21:45
- */
-public interface ContextAsyncEventListener extends EventListener {
-    void onEvent(Event event);
-}
diff --git a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/ListenerBus/ContextAsyncListenerBus.java b/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/ListenerBus/ContextAsyncListenerBus.java
deleted file mode 100644
index 0054eeb..0000000
--- a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/ListenerBus/ContextAsyncListenerBus.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.listener.ListenerBus;
-
-import com.webank.wedatasphere.linkis.common.listener.Event;
-import com.webank.wedatasphere.linkis.common.listener.ListenerEventBus;
-import com.webank.wedatasphere.linkis.cs.listener.ContextAsyncEventListener;
-import com.webank.wedatasphere.linkis.cs.listener.conf.ContextListenerConf;
-
-/**
- * @Author: chaogefeng
- * @Date: 2020/2/21
- */
-public class ContextAsyncListenerBus<L extends ContextAsyncEventListener, E extends Event> extends ListenerEventBus<L, E> {
-
-
-    private static final String NAME = "ContextAsyncListenerBus";
-
-    public ContextAsyncListenerBus() {
-        super(ContextListenerConf.WDS_CS_LISTENER_ASYN_QUEUE_CAPACITY, NAME, ContextListenerConf.WDS_CS_LISTENER_ASYN_CONSUMER_THREAD_MAX, ContextListenerConf.WDS_CS_LISTENER_ASYN_CONSUMER_THREAD_FREE_TIME_MAX);
-    }
-
-    @Override
-    public void doPostEvent(L listener, E event) {
-        listener.onEvent(event);
-    }
-
-
-    private static ContextAsyncListenerBus contextAsyncListenerBus = null;
-
-    public static ContextAsyncListenerBus getInstance() {
-        if (contextAsyncListenerBus == null) {
-            synchronized (ContextAsyncListenerBus.class) {
-                if (contextAsyncListenerBus == null) {
-                    contextAsyncListenerBus = new ContextAsyncListenerBus();
-                    contextAsyncListenerBus.start();
-                }
-            }
-        }
-        return contextAsyncListenerBus;
-    }
-}
diff --git a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/callback/AbstractCallbackEngine.java b/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/callback/AbstractCallbackEngine.java
deleted file mode 100644
index d39b7a6..0000000
--- a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/callback/AbstractCallbackEngine.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.listener.callback;
-
-/**
- * @Author: chaogefeng
- * @Date: 2020/2/20
- */
-public interface AbstractCallbackEngine extends CallbackEngine {
-    //todo
-    //实现事件的存储和按需消费:存储这些变化的事件,并且按需消费
-    //事件超过一定时间还没被消费,自动移除
-    //cskey被五个client注册了listener,如果有挂掉,那么必须要一个最大消费时间的机制
-}
diff --git a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/callback/CallbackEngine.java b/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/callback/CallbackEngine.java
deleted file mode 100644
index 6bbaff3..0000000
--- a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/callback/CallbackEngine.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.listener.callback;
-
-import com.webank.wedatasphere.linkis.cs.listener.callback.imp.ContextKeyValueBean;
-
-import java.util.ArrayList;
-import java.util.Set;
-
-/**
- * @Author: chaogefeng
- * @Date: 2020/2/20
- */
-public interface CallbackEngine {
-
-    ArrayList<ContextKeyValueBean> getListenerCallback(String source);
-
-}
diff --git a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/callback/ContextIDCallbackEngine.java b/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/callback/ContextIDCallbackEngine.java
deleted file mode 100644
index 32b2361..0000000
--- a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/callback/ContextIDCallbackEngine.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.listener.callback;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.ListenerDomain;
-
-/**
- * @Author: chaogefeng
- * @Date: 2020/2/20
- *
- */
-public interface ContextIDCallbackEngine extends CallbackEngine {
-    void registerClient(ListenerDomain listenerDomain);
-}
diff --git a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/callback/ContextKeyCallbackEngine.java b/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/callback/ContextKeyCallbackEngine.java
deleted file mode 100644
index c5e8294..0000000
--- a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/callback/ContextKeyCallbackEngine.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.listener.callback;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.ListenerDomain;
-
-/**
- * @Author: chaogefeng
- * @Date: 2020/2/20
- */
-public interface ContextKeyCallbackEngine extends CallbackEngine {
-    void registerClient(ListenerDomain listenerDomain);
-}
diff --git a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/callback/imp/ContextKeyValueBean.java b/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/callback/imp/ContextKeyValueBean.java
deleted file mode 100644
index 9ded237..0000000
--- a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/callback/imp/ContextKeyValueBean.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.listener.callback.imp;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextValue;
-
-import java.util.Objects;
-
-public class ContextKeyValueBean {
-
-    private ContextKey csKey;
-    private ContextValue csValue;
-    private ContextID csID;
-
-    public ContextID getCsID() {
-        return csID;
-    }
-
-    public void setCsID(ContextID csID) {
-        this.csID = csID;
-    }
-
-    public ContextKey getCsKey() {
-        return csKey;
-    }
-
-    public void setCsKey(ContextKey csKey) {
-        this.csKey = csKey;
-    }
-
-    public ContextValue getCsValue() {
-        return csValue;
-    }
-
-    public void setCsValue(ContextValue csValue) {
-        this.csValue = csValue;
-    }
-
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(csKey, csValue);
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-        if (o == null || getClass() != o.getClass()) {
-            return false;
-        }
-        ContextKeyValueBean csmapKey = (ContextKeyValueBean) o;
-        return Objects.equals(csKey, csmapKey.csKey) &&
-                Objects.equals(csValue, csmapKey.csValue);
-    }
-}
diff --git a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/callback/imp/DefaultContextIDCallbackEngine.java b/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/callback/imp/DefaultContextIDCallbackEngine.java
deleted file mode 100644
index 3e5d3b2..0000000
--- a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/callback/imp/DefaultContextIDCallbackEngine.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.listener.callback.imp;
-
-import com.google.common.collect.HashMultimap;
-import com.webank.wedatasphere.linkis.common.listener.Event;
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.CommonContextIDListenerDomain;
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.ListenerDomain;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.listener.ContextIDListener;
-import com.webank.wedatasphere.linkis.cs.listener.CSIDListener;
-import com.webank.wedatasphere.linkis.cs.listener.callback.ContextIDCallbackEngine;
-import com.webank.wedatasphere.linkis.cs.listener.event.ContextIDEvent;
-import com.webank.wedatasphere.linkis.cs.listener.event.impl.DefaultContextIDEvent;
-import com.webank.wedatasphere.linkis.cs.listener.event.impl.DefaultContextKeyEvent;
-import com.webank.wedatasphere.linkis.cs.listener.manager.imp.DefaultContextListenerManager;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import static com.webank.wedatasphere.linkis.cs.listener.event.enumeration.OperateType.ADD;
-
-/**
- * @Author: chaogefeng
- * @Date: 2020/2/20
- */
-public class DefaultContextIDCallbackEngine implements CSIDListener, ContextIDCallbackEngine {
-
-    private static final Logger logger = LoggerFactory.getLogger(DefaultContextIDCallbackEngine.class);
-    private HashMultimap<String, ContextID> registerCSIDcsClients = HashMultimap.create();//key为clientSource的instance值
-
-    private List<ContextID> removedContextIDS = new ArrayList<>();
-
-
-    @Override
-    public ArrayList<ContextKeyValueBean> getListenerCallback(String source) {
-        Set<ContextID> ContextIDSets = registerCSIDcsClients.get(source);
-        ArrayList<ContextKeyValueBean> contextKeyValueBeans = new ArrayList<>();
-        for (ContextID contextID : removedContextIDS) {
-            if (ContextIDSets.contains(contextID)) {
-                ContextKeyValueBean contextKeyValueBean = new ContextKeyValueBean();
-                contextKeyValueBean.setCsID(contextID);
-                contextKeyValueBeans.add(contextKeyValueBean);
-            }
-        }
-        return contextKeyValueBeans;
-    }
-
-
-    @Override
-    public void registerClient(ListenerDomain listenerDomain) {
-        if (listenerDomain != null && listenerDomain instanceof CommonContextIDListenerDomain) {
-            CommonContextIDListenerDomain commonContextIDListenerDomain = (CommonContextIDListenerDomain) listenerDomain;
-            String source = commonContextIDListenerDomain.getSource();
-            ContextID contextID = commonContextIDListenerDomain.getContextID();
-            if (source != null && contextID != null) {
-                synchronized (registerCSIDcsClients) {
-                    registerCSIDcsClients.put(source, contextID);
-                }
-            }
-        }
-    }
-
-        @Override
-        public void onEvent (Event event){
-            DefaultContextIDEvent defaultContextIDEvent = null;
-            if (event != null && event instanceof DefaultContextIDEvent) {
-                defaultContextIDEvent = (DefaultContextIDEvent) event;
-            }
-            if (null == defaultContextIDEvent) {
-                logger.warn("defaultContextIDEvent event 为空");
-                return;
-            }
-            switch (defaultContextIDEvent.getOperateType()) {
-                //ADD, UPDATE, DELETE, REMOVEALL, ACCESS
-                case REMOVEALL:
-                    onCSIDRemoved(defaultContextIDEvent);
-                    break;
-                case ADD:
-                    onCSIDADD(defaultContextIDEvent);
-                    break;
-                case ACCESS:
-                    onCSIDAccess(defaultContextIDEvent);
-                    break;
-                case UPDATE:
-                    break;
-                case DELETE:
-                    break;
-                default:
-                    logger.info("检查defaultContextIDEvent event操作类型");
-            }
-
-        }
-
-        @Override
-        public void onCSIDAccess (ContextIDEvent contextIDEvent){
-
-        }
-
-        @Override
-        public void onCSIDADD (ContextIDEvent contextIDEvent){
-
-        }
-
-        @Override
-        public void onCSIDRemoved (ContextIDEvent contextIDEvent){
-
-            DefaultContextIDEvent defaultContextIDEvent = null;
-            if (contextIDEvent != null && contextIDEvent instanceof DefaultContextIDEvent) {
-                defaultContextIDEvent = (DefaultContextIDEvent) contextIDEvent;
-            }
-            if (null == defaultContextIDEvent) {
-                return;
-            }
-            synchronized (removedContextIDS) {
-                removedContextIDS.add(defaultContextIDEvent.getContextID());
-            }
-        }
-
-        @Override
-        public void onEventError (Event event, Throwable t){
-
-        }
-
-
-        private static DefaultContextIDCallbackEngine singleDefaultContextIDCallbackEngine = null;
-
-        private DefaultContextIDCallbackEngine() {
-
-        }
-
-        public static DefaultContextIDCallbackEngine getInstance () {
-            if (singleDefaultContextIDCallbackEngine == null) {
-                synchronized (DefaultContextIDCallbackEngine.class) {
-                    if (singleDefaultContextIDCallbackEngine == null) {
-                        singleDefaultContextIDCallbackEngine = new DefaultContextIDCallbackEngine();
-                        DefaultContextListenerManager instanceContextListenerManager = DefaultContextListenerManager.getInstance();
-                        instanceContextListenerManager.getContextAsyncListenerBus().addListener(singleDefaultContextIDCallbackEngine);
-                        logger.info("add listerner singleDefaultContextIDCallbackEngine success");
-                    }
-                }
-            }
-            return singleDefaultContextIDCallbackEngine;
-        }
-    }
diff --git a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/callback/imp/DefaultContextKeyCallbackEngine.java b/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/callback/imp/DefaultContextKeyCallbackEngine.java
deleted file mode 100644
index ab8358b..0000000
--- a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/callback/imp/DefaultContextKeyCallbackEngine.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.listener.callback.imp;
-
-import com.google.common.collect.HashMultimap;
-import com.google.common.collect.Multiset;
-import com.webank.wedatasphere.linkis.common.listener.Event;
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.CommonContextIDListenerDomain;
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.CommonContextKeyListenerDomain;
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.ListenerDomain;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.listener.CSKeyListener;
-import com.webank.wedatasphere.linkis.cs.listener.callback.ContextKeyCallbackEngine;
-import com.webank.wedatasphere.linkis.cs.listener.event.ContextKeyEvent;
-import com.webank.wedatasphere.linkis.cs.listener.event.impl.DefaultContextIDEvent;
-import com.webank.wedatasphere.linkis.cs.listener.event.impl.DefaultContextKeyEvent;
-import com.webank.wedatasphere.linkis.cs.listener.manager.imp.DefaultContextListenerManager;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.*;
-
-/**
- * @Author: chaogefeng
- * @Date: 2020/2/20
- */
-public class DefaultContextKeyCallbackEngine implements CSKeyListener, ContextKeyCallbackEngine {
-    private static final Logger logger = LoggerFactory.getLogger(DefaultContextKeyCallbackEngine.class);
-
-    private HashMultimap<String, ContextID> registerCSIDcsClients = HashMultimap.create();//key为clientSource的instance值
-
-    private HashMultimap<String, ContextKeyValueBean> registerCSIDcsKeyValues = HashMultimap.create();//key为 contextId 的ID值
-
-    //注册csClient及其监听的csKeys
-    @Override
-    public void registerClient(ListenerDomain listenerDomain) {
-        if (listenerDomain != null && listenerDomain instanceof CommonContextKeyListenerDomain) {
-            CommonContextKeyListenerDomain commonContextKeyListenerDomain = (CommonContextKeyListenerDomain) listenerDomain;
-            String source = commonContextKeyListenerDomain.getSource();
-            ContextID contextID = commonContextKeyListenerDomain.getContextID();
-            ContextKey contextKey = commonContextKeyListenerDomain.getContextKey();
-            if (source != null && contextID != null) {
-                synchronized (registerCSIDcsClients) {
-                    logger.info("要注册的csClient和contextId: " + source + ":" + contextID);
-                    registerCSIDcsClients.put(source, contextID);
-                }
-            }
-            //针对cskey生成一个bean,cskey对应的value值目前为空
-            if (contextKey != null) {
-                ContextKeyValueBean contextKeyValueBean = new ContextKeyValueBean();
-                contextKeyValueBean.setCsKey(contextKey);
-                contextKeyValueBean.setCsID(contextID);
-                synchronized (registerCSIDcsKeyValues) {
-                    logger.info("要注册的contextId: " + contextID.getContextId());
-                    registerCSIDcsKeyValues.put(contextID.getContextId(), contextKeyValueBean);
-                }
-            }
-        }
-    }
-
-    //通过 source 拿到 ContextID,遍历 ContextID,返回监听的 beans
-    @Override
-    public ArrayList<ContextKeyValueBean> getListenerCallback(String source) {
-        ArrayList<ContextKeyValueBean> arrayContextKeyValueBeans = new ArrayList<>();
-        Set<ContextID> contextIDS = registerCSIDcsClients.get(source);
-        //返回所有的 ContextKeyValueBean
-        if (contextIDS.size() > 0) {
-            for (ContextID csId : contextIDS) {
-                arrayContextKeyValueBeans.addAll(registerCSIDcsKeyValues.get(csId.getContextId()));
-            }
-        }
-        return arrayContextKeyValueBeans;
-    }
-
-    @Override
-    public void onEvent(Event event) {
-        DefaultContextKeyEvent defaultContextKeyEvent = null;
-        if (event != null && event instanceof DefaultContextKeyEvent) {
-            defaultContextKeyEvent = (DefaultContextKeyEvent) event;
-        }
-        if (null == defaultContextKeyEvent) {
-            logger.info("defaultContextKeyEvent event 为空");
-            return;
-        }
-        logger.info("defaultContextKeyEvent 要更新事件的ID: " + defaultContextKeyEvent.getContextID().getContextId());
-        logger.info("defaultContextKeyEvent 要更新事件的key: " + defaultContextKeyEvent.getContextKeyValue().getContextKey().getKey());
-        logger.info("defaultContextKeyEvent 要更新的value" + defaultContextKeyEvent.getContextKeyValue().getContextValue().getValue());
-        switch (defaultContextKeyEvent.getOperateType()) {
-            case UPDATE:
-                onCSKeyUpdate(defaultContextKeyEvent);
-                break;
-            case ACCESS:
-                onCSKeyAccess(defaultContextKeyEvent);
-                break;
-            default:
-                logger.info("检查defaultContextKeyEvent event操作类型");
-        }
-    }
-
-    //更新 cskey 对应的 value 值
-    @Override
-    public void onCSKeyUpdate(ContextKeyEvent cskeyEvent) {
-        DefaultContextKeyEvent defaultContextKeyEvent = null;
-        if (cskeyEvent != null && cskeyEvent instanceof DefaultContextKeyEvent) {
-            defaultContextKeyEvent = (DefaultContextKeyEvent) cskeyEvent;
-        }
-        if (null == defaultContextKeyEvent) {
-            return;
-        }
-
-        synchronized (registerCSIDcsKeyValues) {
-            //遍历所有csid,如果csid跟事件中的相同,则取出该csid所有的bean,更新所有bean中的csvalue.
-            Set<ContextKeyValueBean> contextKeyValueBeans = registerCSIDcsKeyValues.get(defaultContextKeyEvent.getContextID().getContextId());
-            for (ContextKeyValueBean contextKeyValueBean : contextKeyValueBeans) {
-                if (contextKeyValueBean.getCsKey().getKey().equals(defaultContextKeyEvent.getContextKeyValue().getContextKey().getKey())) {
-                    contextKeyValueBean.setCsValue(defaultContextKeyEvent.getContextKeyValue().getContextValue());
-                }
-            }
-        }
-    }
-
-
-    //todo
-    @Override
-    public void onCSKeyAccess(ContextKeyEvent cskeyEvent) {
-
-    }
-
-    //todo
-    @Override
-    public void onEventError(Event event, Throwable t) {
-
-    }
-
-    private static DefaultContextKeyCallbackEngine singleDefaultContextKeyCallbackEngine = null;
-
-    private DefaultContextKeyCallbackEngine() {
-    }
-
-    public static DefaultContextKeyCallbackEngine getInstance() {
-        if (singleDefaultContextKeyCallbackEngine == null) {
-            synchronized (DefaultContextKeyCallbackEngine.class) {
-                if (singleDefaultContextKeyCallbackEngine == null) {
-                    singleDefaultContextKeyCallbackEngine = new DefaultContextKeyCallbackEngine();
-                    DefaultContextListenerManager instanceContextListenerManager = DefaultContextListenerManager.getInstance();
-                    instanceContextListenerManager.getContextAsyncListenerBus().addListener(singleDefaultContextKeyCallbackEngine);
-                    logger.info("add listerner singleDefaultContextKeyCallbackEngine success");
-                }
-            }
-        }
-        return singleDefaultContextKeyCallbackEngine;
-    }
-
-}
diff --git a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/conf/ContextListenerConf.java b/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/conf/ContextListenerConf.java
deleted file mode 100644
index b6a827c..0000000
--- a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/conf/ContextListenerConf.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.listener.conf;
-
-import com.webank.wedatasphere.linkis.common.conf.CommonVars;
-
-/**
- * @Author: chaogefeng
- * @Date: 2020/2/25
- */
-public class ContextListenerConf {
-    public final static Integer WDS_CS_LISTENER_ASYN_CONSUMER_THREAD_MAX = Integer.parseInt(CommonVars.apply("wds.linkis.cs.listener.asyn.consumer.thread.max","5").getValue());
-    public final static Long WDS_CS_LISTENER_ASYN_CONSUMER_THREAD_FREE_TIME_MAX = Long.parseLong(CommonVars.apply("wds.linkis.cs.listener.asyn.consumer.freeTime.max","5000").getValue());
-    public final static Integer WDS_CS_LISTENER_ASYN_QUEUE_CAPACITY =Integer.parseInt(CommonVars.apply("wds.linkis.cs.listener.asyn.queue.size.max","300").getValue()) ;
-}
diff --git a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/event/ContextIDEvent.java b/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/event/ContextIDEvent.java
deleted file mode 100644
index 9ac95fd..0000000
--- a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/event/ContextIDEvent.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.listener.event;
-
-import com.webank.wedatasphere.linkis.common.listener.Event;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-
-/**
- * @author peacewong
- * @date 2020/2/20 15:03
- */
-public interface ContextIDEvent extends Event {
-
-    ContextID getContextID();
-}
diff --git a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/event/ContextKeyEvent.java b/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/event/ContextKeyEvent.java
deleted file mode 100644
index 35119e4..0000000
--- a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/event/ContextKeyEvent.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.listener.event;
-
-import com.webank.wedatasphere.linkis.common.listener.Event;
-
-/**
- * @author peacewong
- * @date 2020/2/20 15:01
- */
-public interface ContextKeyEvent extends Event {
-}
diff --git a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/event/enumeration/OperateType.java b/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/event/enumeration/OperateType.java
deleted file mode 100644
index 30f31cf..0000000
--- a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/event/enumeration/OperateType.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.listener.event.enumeration;
-
-/**
- * @author peacewong
- * @date 2020/2/15 21:33
- */
-public enum OperateType {
-
-    /**
-     * 对contextKey和contextId的一些操作
-     */
-    ADD, UPDATE, DELETE, REMOVEALL, ACCESS, CREATE,REMOVE
-}
diff --git a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/event/impl/DefaultContextIDEvent.java b/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/event/impl/DefaultContextIDEvent.java
deleted file mode 100644
index dbae9bc..0000000
--- a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/event/impl/DefaultContextIDEvent.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.listener.event.impl;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.listener.event.ContextIDEvent;
-import com.webank.wedatasphere.linkis.cs.listener.event.enumeration.OperateType;
-
-/**
- * @author peacewong
- * @date 2020/2/20 15:03
- */
-public class DefaultContextIDEvent implements ContextIDEvent {
-
-    private ContextID contextID;
-
-    public OperateType getOperateType() {
-        return operateType;
-    }
-
-    public void setOperateType(OperateType operateType) {
-        this.operateType = operateType;
-    }
-
-    //TODO
-    private OperateType operateType;
-
-    @Override
-    public ContextID getContextID() {
-        return contextID;
-    }
-
-    public void setContextID(ContextID contextID) {
-        this.contextID = contextID;
-    }
-}
diff --git a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/event/impl/DefaultContextKeyEvent.java b/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/event/impl/DefaultContextKeyEvent.java
deleted file mode 100644
index d770e5d..0000000
--- a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/event/impl/DefaultContextKeyEvent.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.listener.event.impl;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.listener.event.ContextKeyEvent;
-import com.webank.wedatasphere.linkis.cs.listener.event.enumeration.OperateType;
-
-/**
- * @author peacewong
- * @date 2020/2/15 21:30
- */
-public class DefaultContextKeyEvent implements ContextKeyEvent {
-
-    private ContextID contextID;
-
-    private ContextKeyValue contextKeyValue;
-
-    private ContextKeyValue oldValue;
-
-
-    private OperateType operateType;
-
-    public ContextID getContextID() {
-        return contextID;
-    }
-
-    public void setContextID(ContextID contextID) {
-        this.contextID = contextID;
-    }
-
-    public ContextKeyValue getContextKeyValue() {
-        return contextKeyValue;
-    }
-
-    public void setContextKeyValue(ContextKeyValue contextKeyValue) {
-        this.contextKeyValue = contextKeyValue;
-    }
-
-    public OperateType getOperateType() {
-        return operateType;
-    }
-
-    public void setOperateType(OperateType operateType) {
-        this.operateType = operateType;
-    }
-
-    public ContextKeyValue getOldValue() {
-        return oldValue;
-    }
-
-    public void setOldValue(ContextKeyValue oldValue) {
-        this.oldValue = oldValue;
-    }
-
-}
diff --git a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/manager/ListenerManager.java b/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/manager/ListenerManager.java
deleted file mode 100644
index 8836e5a..0000000
--- a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/manager/ListenerManager.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.listener.manager;
-
-import com.webank.wedatasphere.linkis.cs.listener.ListenerBus.ContextAsyncListenerBus;
-import com.webank.wedatasphere.linkis.cs.listener.callback.imp.DefaultContextIDCallbackEngine;
-import com.webank.wedatasphere.linkis.cs.listener.callback.imp.DefaultContextKeyCallbackEngine;
-
-/**
- * @Author: chaogefeng
- * @Date: 2020/2/21
- */
-public interface ListenerManager {
-     public ContextAsyncListenerBus getContextAsyncListenerBus(); //单例
-     public DefaultContextIDCallbackEngine getContextIDCallbackEngine(); //单例
-     public DefaultContextKeyCallbackEngine getContextKeyCallbackEngine(); //单例
-}
diff --git a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/manager/imp/DefaultContextListenerManager.java b/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/manager/imp/DefaultContextListenerManager.java
deleted file mode 100644
index c9102da..0000000
--- a/contextservice/cs-listener/src/main/java/com/webank/wedatasphere/linkis/cs/listener/manager/imp/DefaultContextListenerManager.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.listener.manager.imp;
-
-import com.webank.wedatasphere.linkis.cs.listener.ListenerBus.ContextAsyncListenerBus;
-import com.webank.wedatasphere.linkis.cs.listener.callback.imp.DefaultContextIDCallbackEngine;
-import com.webank.wedatasphere.linkis.cs.listener.callback.imp.DefaultContextKeyCallbackEngine;
-import com.webank.wedatasphere.linkis.cs.listener.manager.ListenerManager;
-
-/**
- * @Author: chaogefeng
- * @Date: 2020/2/21
- */
-public class DefaultContextListenerManager implements ListenerManager {
-    @Override
-    public ContextAsyncListenerBus getContextAsyncListenerBus() {
-        ContextAsyncListenerBus contextAsyncListenerBus = ContextAsyncListenerBus.getInstance();
-        return contextAsyncListenerBus;
-    }
-
-    @Override
-    public DefaultContextIDCallbackEngine getContextIDCallbackEngine() {
-        DefaultContextIDCallbackEngine instanceIdCallbackEngine = DefaultContextIDCallbackEngine.getInstance();
-        return instanceIdCallbackEngine;
-    }
-
-    @Override
-    public DefaultContextKeyCallbackEngine getContextKeyCallbackEngine() {
-        DefaultContextKeyCallbackEngine instanceKeyCallbackEngine = DefaultContextKeyCallbackEngine.getInstance();
-        return instanceKeyCallbackEngine;
-    }
-
-    private static DefaultContextListenerManager singleDefaultContextListenerManager = null;
-
-    private DefaultContextListenerManager() {
-    }
-
-    public static DefaultContextListenerManager getInstance() {
-        if (singleDefaultContextListenerManager == null) {
-            synchronized (DefaultContextListenerManager.class) {
-                if (singleDefaultContextListenerManager == null) {
-                    singleDefaultContextListenerManager = new DefaultContextListenerManager();
-                }
-            }
-        }
-        return singleDefaultContextListenerManager;
-    }
-}
diff --git a/contextservice/cs-listener/src/test/java/com/webank/wedatasphere/linkis/cs/listener/test/TestContextID.java b/contextservice/cs-listener/src/test/java/com/webank/wedatasphere/linkis/cs/listener/test/TestContextID.java
deleted file mode 100644
index 3d81b45..0000000
--- a/contextservice/cs-listener/src/test/java/com/webank/wedatasphere/linkis/cs/listener/test/TestContextID.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.listener.test;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-
-/**
- * @author peacewong
- * @date 2020/2/13 20:41
- */
-public class TestContextID implements ContextID {
-
-    String contextID;
-
-    @Override
-    public String getContextId() {
-        return contextID;
-    }
-
-    @Override
-    public void setContextId(String contextId) {
-        this.contextID = contextId;
-    }
-}
diff --git a/contextservice/cs-listener/src/test/java/com/webank/wedatasphere/linkis/cs/listener/test/TestContextKey.java b/contextservice/cs-listener/src/test/java/com/webank/wedatasphere/linkis/cs/listener/test/TestContextKey.java
deleted file mode 100644
index 6bd442e..0000000
--- a/contextservice/cs-listener/src/test/java/com/webank/wedatasphere/linkis/cs/listener/test/TestContextKey.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.listener.test;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-
-/**
- * @Author: chaogefeng
- * @Date: 2020/2/22
- */
-public class TestContextKey implements ContextKey {
-    private  String key;
-    private ContextType contextType;
-    @Override
-    public String getKey() {
-        return this.key;
-    }
-
-    @Override
-    public void setKey(String key) {
-        this.key=key;
-    }
-
-    @Override
-    public ContextType getContextType() {
-        return this.contextType;
-    }
-
-    @Override
-    public void setContextType(ContextType contextType) {
-        this.contextType=contextType;
-    }
-
-    @Override
-    public ContextScope getContextScope() {
-        return null;
-    }
-
-    @Override
-    public void setContextScope(ContextScope contextScope) {
-
-    }
-
-    @Override
-    public String getKeywords() {
-        return null;
-    }
-
-    @Override
-    public void setKeywords(String keywords) {
-
-    }
-
-    @Override
-    public int getType() {
-        return 0;
-    }
-
-    @Override
-    public void setType(int type) {
-
-    }
-}
diff --git a/contextservice/cs-listener/src/test/java/com/webank/wedatasphere/linkis/cs/listener/test/TestContextKeyValue.java b/contextservice/cs-listener/src/test/java/com/webank/wedatasphere/linkis/cs/listener/test/TestContextKeyValue.java
deleted file mode 100644
index df44a38..0000000
--- a/contextservice/cs-listener/src/test/java/com/webank/wedatasphere/linkis/cs/listener/test/TestContextKeyValue.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.listener.test;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextValue;
-
-/**
- * @author chaogefeng
- * @date 2020/2/22 16:46
- */
-public class TestContextKeyValue implements ContextKeyValue {
-
-    private ContextKey contextKey;
-
-    private ContextValue contextValue;
-
-    @Override
-    public ContextKey getContextKey() {
-        return this.contextKey;
-    }
-
-    @Override
-    public void setContextKey(ContextKey contextKey) {
-        this.contextKey = contextKey;
-    }
-
-    @Override
-    public ContextValue getContextValue() {
-        return this.contextValue;
-    }
-
-    @Override
-    public void setContextValue(ContextValue contextValue) {
-        this.contextValue = contextValue;
-    }
-}
diff --git a/contextservice/cs-listener/src/test/java/com/webank/wedatasphere/linkis/cs/listener/test/TestContextValue.java b/contextservice/cs-listener/src/test/java/com/webank/wedatasphere/linkis/cs/listener/test/TestContextValue.java
deleted file mode 100644
index db01d50..0000000
--- a/contextservice/cs-listener/src/test/java/com/webank/wedatasphere/linkis/cs/listener/test/TestContextValue.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.listener.test;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextValue;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ValueBean;
-
-/**
- * @Author: chaogefeng
- * @Date: 2020/2/22
- */
-public class TestContextValue implements ContextValue {
-    private  Object value;
-
-    private String keywords;
-
-
-    @Override
-    public String getKeywords() {
-        return null;
-    }
-
-    @Override
-    public void setKeywords(String keywords) {
-
-    }
-
-    @Override
-    public Object getValue() {
-        return this.value;
-    }
-
-    @Override
-    public void setValue(Object value) {
-        this.value=value;
-    }
-
-
-}
diff --git a/contextservice/cs-listener/src/test/java/com/webank/wedatasphere/linkis/cs/listener/test/TestListenerManager.java b/contextservice/cs-listener/src/test/java/com/webank/wedatasphere/linkis/cs/listener/test/TestListenerManager.java
deleted file mode 100644
index 37c1740..0000000
--- a/contextservice/cs-listener/src/test/java/com/webank/wedatasphere/linkis/cs/listener/test/TestListenerManager.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.listener.test;
-
-import com.webank.wedatasphere.linkis.common.listener.Event;
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.ListenerDomain;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextValue;
-import com.webank.wedatasphere.linkis.cs.listener.ListenerBus.ContextAsyncListenerBus;
-import com.webank.wedatasphere.linkis.cs.listener.callback.imp.ContextKeyValueBean;
-import com.webank.wedatasphere.linkis.cs.listener.callback.imp.DefaultContextIDCallbackEngine;
-import com.webank.wedatasphere.linkis.cs.listener.callback.imp.DefaultContextKeyCallbackEngine;
-import com.webank.wedatasphere.linkis.cs.listener.event.enumeration.OperateType;
-import com.webank.wedatasphere.linkis.cs.listener.event.impl.DefaultContextIDEvent;
-import com.webank.wedatasphere.linkis.cs.listener.event.impl.DefaultContextKeyEvent;
-import com.webank.wedatasphere.linkis.cs.listener.manager.ListenerManager;
-import com.webank.wedatasphere.linkis.cs.listener.manager.imp.DefaultContextListenerManager;
-import org.junit.Test;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @Author: chaogefeng
- * @Date: 2020/2/22
- */
-public class TestListenerManager {
-    @Test
-    public void testGetContextAsyncListenerBus() {
-        DefaultContextListenerManager defaultContextListenerManager = DefaultContextListenerManager.getInstance();
-
-        ContextAsyncListenerBus contextAsyncListenerBus = defaultContextListenerManager.getContextAsyncListenerBus();
-
-        DefaultContextIDCallbackEngine contextIDCallbackEngine = defaultContextListenerManager.getContextIDCallbackEngine();
-
-        DefaultContextKeyCallbackEngine contextKeyCallbackEngine = defaultContextListenerManager.getContextKeyCallbackEngine();
-        //client1的contextID
-        TestContextID testContextID1 = new TestContextID();
-        testContextID1.setContextId("18392881376");
-
-        //client2的contextID
-        TestContextID testContextID2 = new TestContextID();
-        testContextID2.setContextId("13431335441");
-
-        List<ContextKey> csKeys1 = new ArrayList<>();
-        TestContextKey testContextKey1 = new TestContextKey();
-        testContextKey1.setKey("key1");
-        TestContextKey testContextKey2 = new TestContextKey();
-        testContextKey2.setKey("key2");
-        csKeys1.add(testContextKey1);
-        csKeys1.add(testContextKey2);
-
-        List<ContextKey> csKeys2 = new ArrayList<>();
-        TestContextKey testContextKey3 = new TestContextKey();
-        testContextKey3.setKey("key3");
-        TestContextKey testContextKey4 = new TestContextKey();
-        testContextKey4.setKey("key4");
-        csKeys2.add(testContextKey3);
-        csKeys2.add(testContextKey4);
-
-
-        ListenerDomain ListenerDomain1;
-
-        ListenerDomain ListenerDomain2;
-
-        ListenerDomain ListenerDomain3;
-
-
-
-
-        DefaultContextKeyEvent defaultContextKeyEvent = new DefaultContextKeyEvent();
-        defaultContextKeyEvent.setContextID(testContextID1);
-        defaultContextKeyEvent.setOperateType(OperateType.UPDATE);
-        TestContextKeyValue testContextKeyValue = new TestContextKeyValue();
-        testContextKeyValue.setContextKey(testContextKey1);
-        TestContextValue testContextValue = new TestContextValue();
-        testContextValue.setValue("chaogefeng");
-        testContextKeyValue.setContextValue(testContextValue);
-        defaultContextKeyEvent.setContextKeyValue(testContextKeyValue);
-        contextAsyncListenerBus.doPostEvent(contextKeyCallbackEngine, defaultContextKeyEvent);
-        ArrayList<ContextKeyValueBean> clientSource2ListenerCallback = contextKeyCallbackEngine.getListenerCallback("127.0.0.1:8888");
-        System.out.println("----------------------------------------------------------------------");
-        for (ContextKeyValueBean contextKeyValueBean : clientSource2ListenerCallback) {
-            System.out.println("返回的bean里面对应的contexID: " + contextKeyValueBean.getCsID().getContextId());
-            System.out.println("返回的bean里面对应的cskeys: " + contextKeyValueBean.getCsKey().getKey());
-            if (contextKeyValueBean.getCsValue() != null) {
-                System.out.println("返回的bean里面对应的value: " + contextKeyValueBean.getCsValue().getValue());
-            }
-        }
-    }
-
-}
diff --git a/contextservice/cs-persistence/pom.xml b/contextservice/cs-persistence/pom.xml
deleted file mode 100644
index b3a980d..0000000
--- a/contextservice/cs-persistence/pom.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>linkis-cs-persistence</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cs-common</artifactId>
-            </dependency>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-mybatis</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-module</artifactId>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.commons</groupId>
-            <artifactId>commons-math3</artifactId>
-            <version>3.1.1</version>
-        </dependency>
-
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.12</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>src/main/java</directory>
-                <includes>
-                    <include>**/*.xml</include>
-                </includes>
-            </resource>
-        </resources>
-        <finalName>${project.artifactId}-${project.version}</finalName>
-    </build>
-</project>
\ No newline at end of file
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/ContextPersistenceBeans.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/ContextPersistenceBeans.java
deleted file mode 100644
index db9834b..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/ContextPersistenceBeans.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence;
-
-import com.webank.wedatasphere.linkis.cs.persistence.persistence.*;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-/**
- * Created by patinousward on 2020/2/23.
- */
-@Configuration
-public class ContextPersistenceBeans {
-
-    @Bean
-    @ConditionalOnMissingBean(ContextPersistenceManager.class)
-    public ContextPersistenceManager getContextPersistenceManager(
-            ContextIDPersistence contextIDPersistence,
-            ContextMapPersistence contextMapPersistence,
-            ContextMetricsPersistence contextMetricsPersistence,
-            ContextIDListenerPersistence contextIDListenerPersistence,
-            ContextKeyListenerPersistence contextKeyListenerPersistence,
-            TransactionManager transactionManager
-    ) {
-        ContextPersistenceManagerImpl manager = new ContextPersistenceManagerImpl();
-        manager.setContextIDPersistence(contextIDPersistence);
-        manager.setContextMapPersistence(contextMapPersistence);
-        manager.setContextMetricsPersistence(contextMetricsPersistence);
-        manager.setContextKeyListenerPersistence(contextKeyListenerPersistence);
-        manager.setContextIDListenerPersistence(contextIDListenerPersistence);
-        manager.setTransactionManager(transactionManager);
-        return manager;
-    }
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/ContextPersistenceManager.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/ContextPersistenceManager.java
deleted file mode 100644
index 90bf6d7..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/ContextPersistenceManager.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence;
-
-import com.webank.wedatasphere.linkis.cs.persistence.persistence.*;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface ContextPersistenceManager {
-
-    ContextIDPersistence getContextIDPersistence();
-
-    ContextMapPersistence getContextMapPersistence();
-
-
-
-    ContextMetricsPersistence getContextMetricsPersistence();
-
-    ContextIDListenerPersistence getContextIDListenerPersistence();
-
-    ContextKeyListenerPersistence getContextKeyListenerPersistence();
-
-    TransactionManager getTransactionManager();
-
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/ContextPersistenceManagerImpl.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/ContextPersistenceManagerImpl.java
deleted file mode 100644
index a0fdfbf..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/ContextPersistenceManagerImpl.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence;
-
-import com.webank.wedatasphere.linkis.cs.persistence.annotation.Tuning;
-import com.webank.wedatasphere.linkis.cs.persistence.persistence.*;
-
-/**
- * Created by patinousward on 2020/2/17.
- */
-public class ContextPersistenceManagerImpl implements ContextPersistenceManager {
-
-
-    private ContextIDPersistence contextIDPersistence;
-
-    private ContextMapPersistence contextMapPersistence;
-
-
-
-    private ContextMetricsPersistence contextMetricsPersistence;
-
-    private ContextIDListenerPersistence contextIDListenerPersistence;
-
-    private ContextKeyListenerPersistence contextKeyListenerPersistence;
-
-    private TransactionManager transactionManager;
-
-    @Override
-    @Tuning
-    public ContextIDPersistence getContextIDPersistence() {
-        return this.contextIDPersistence;
-    }
-
-    @Override
-    @Tuning
-    public ContextMapPersistence getContextMapPersistence() {
-        return this.contextMapPersistence;
-    }
-
-
-
-    @Override
-    @Tuning
-    public ContextMetricsPersistence getContextMetricsPersistence() {
-        return this.contextMetricsPersistence;
-    }
-
-    @Override
-    @Tuning
-    public ContextIDListenerPersistence getContextIDListenerPersistence() {
-        return this.contextIDListenerPersistence;
-    }
-
-    @Override
-    @Tuning
-    public ContextKeyListenerPersistence getContextKeyListenerPersistence() {
-        return this.contextKeyListenerPersistence;
-    }
-
-    @Override
-    public TransactionManager getTransactionManager() {
-        return this.transactionManager;
-    }
-
-    public void setContextIDPersistence(ContextIDPersistence contextIDPersistence) {
-        this.contextIDPersistence = contextIDPersistence;
-    }
-
-    public void setContextMapPersistence(ContextMapPersistence contextMapPersistence) {
-        this.contextMapPersistence = contextMapPersistence;
-    }
-
-
-    public void setContextMetricsPersistence(ContextMetricsPersistence contextMetricsPersistence) {
-        this.contextMetricsPersistence = contextMetricsPersistence;
-    }
-
-    public void setContextIDListenerPersistence(ContextIDListenerPersistence contextIDListenerPersistence) {
-        this.contextIDListenerPersistence = contextIDListenerPersistence;
-    }
-
-    public void setContextKeyListenerPersistence(ContextKeyListenerPersistence contextKeyListenerPersistence) {
-        this.contextKeyListenerPersistence = contextKeyListenerPersistence;
-    }
-
-    public void setTransactionManager(TransactionManager transactionManager) {
-        this.transactionManager = transactionManager;
-    }
-
-
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/annotation/Ignore.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/annotation/Ignore.java
deleted file mode 100644
index b92ec0c..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/annotation/Ignore.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Created by patinousward on 2020/2/14.
- */
-@Target({ElementType.TYPE, ElementType.FIELD})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Ignore {
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/annotation/Tuning.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/annotation/Tuning.java
deleted file mode 100644
index d680b91..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/annotation/Tuning.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Created by patinousward on 2020/2/23.
- */
-@Target({ElementType.METHOD})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Tuning {
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/aop/PersistenceTuningAspect.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/aop/PersistenceTuningAspect.java
deleted file mode 100644
index 82edc2f..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/aop/PersistenceTuningAspect.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.aop;
-
-import com.webank.wedatasphere.linkis.DataWorkCloudApplication;
-import com.webank.wedatasphere.linkis.cs.persistence.conf.PersistenceConf;
-import org.aspectj.lang.ProceedingJoinPoint;
-import org.aspectj.lang.Signature;
-import org.aspectj.lang.annotation.Around;
-import org.aspectj.lang.annotation.Aspect;
-import org.aspectj.lang.annotation.Pointcut;
-import org.aspectj.lang.reflect.MethodSignature;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.NoSuchBeanDefinitionException;
-import org.springframework.context.ApplicationContext;
-import org.springframework.stereotype.Component;
-
-import java.lang.reflect.Method;
-
-/**
- * Created by patinousward on 2020/2/23.
- */
-@Aspect
-@Component
-public class PersistenceTuningAspect {
-
-    private Logger logger = LoggerFactory.getLogger(this.getClass());
-
-    private boolean tuningIsOpen = false;
-
-    private Object tuningObject = null;
-
-    private Method tuningMethod = null;
-
-    private boolean isInited = false;
-
-    public void init() {
-        synchronized (this) {
-            if (!isInited) {
-                try {
-                    Class<?> tuningClass = this.getClass().getClassLoader().
-                            loadClass(PersistenceConf.TUNING_CLASS.getValue());
-                    ApplicationContext context = DataWorkCloudApplication.getApplicationContext();
-                    if (context != null) {
-                        try {
-                            tuningObject = context.getBean(tuningClass);
-                            logger.info("find singleton tuning Object from IOC");
-                        } catch (NoSuchBeanDefinitionException e) {
-                            logger.info("can not find singleton  tuning Object from IOC");
-                        }
-                    }
-                    if (tuningObject == null) {
-                        tuningObject = tuningClass.newInstance();
-                    }
-                    tuningMethod = tuningClass.getMethod(PersistenceConf.TUNING_METHOD.getValue(), Object.class);
-                    tuningIsOpen = true;
-                } catch (ClassNotFoundException | InstantiationException |
-                        IllegalAccessException | NoSuchMethodException e) {
-                    logger.warn("can not load tuning class,tuning is close", e);
-                } finally {
-                    isInited = true;
-                }
-            }
-        }
-    }
-
-    @Pointcut(value = "@annotation(com.webank.wedatasphere.linkis.cs.persistence.annotation.Tuning)")
-    private void cut() {
-    }
-
-    @Around("cut()")
-    public Object around(ProceedingJoinPoint point) throws Throwable {
-        if (!isInited) {
-            init();
-        }
-        if (!tuningIsOpen) {
-            logger.info("tuning is close..return the real");
-            return point.proceed();
-        }
-        Signature signature = point.getSignature();
-        if (!(signature instanceof MethodSignature)) {
-            throw new IllegalArgumentException("该注解只能用于方法");
-        }
-        MethodSignature methodSignature = (MethodSignature) signature;
-        Object target = point.getTarget();
-        Method currentMethod = target.getClass().getMethod(methodSignature.getName(), methodSignature.getParameterTypes());
-        logger.info("调用方法:" + currentMethod.getName());
-        return tuningMethod.invoke(tuningObject, point.proceed());
-    }
-
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/conf/PersistenceConf.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/conf/PersistenceConf.java
deleted file mode 100644
index 5df07a4..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/conf/PersistenceConf.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.conf;
-
-import com.webank.wedatasphere.linkis.common.conf.CommonVars;
-
-/**
- * Created by patinousward on 2020/2/13.
- */
-public class PersistenceConf {
-
-    public static final CommonVars<String> TUNING_CLASS = CommonVars.apply("wds.linkis.cs.ha.class", "com.webank.wedatasphere.linkis.cs.highavailable.DefaultContextHAManager");
-    //public static final CommonVars<String> TUNING_CLASS = CommonVars.apply("wds.linkis.cs.ha.class","com.webank.wedatasphere.linkis.cs.persistence.ProxyMethodA");
-
-    public static final CommonVars<String> TUNING_METHOD = CommonVars.apply("wds.linkis.cs.ha.proxymethod", "getContextHAProxy");
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/dao/ContextIDListenerMapper.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/dao/ContextIDListenerMapper.java
deleted file mode 100644
index 0492a5a..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/dao/ContextIDListenerMapper.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.dao;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.persistence.entity.PersistenceContextIDListener;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * Created by patinousward on 2020/2/17.
- */
-public interface ContextIDListenerMapper {
-
-    void createIDListener(@Param("listener") PersistenceContextIDListener listener);
-
-    void remove(@Param("listener") PersistenceContextIDListener listener);
-
-    void removeAll(@Param("contextID") ContextID contextID);
-
-    List<PersistenceContextIDListener> getAll(@Param("contextID") ContextID contextID);
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/dao/ContextIDMapper.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/dao/ContextIDMapper.java
deleted file mode 100644
index 7178641..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/dao/ContextIDMapper.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.dao;
-
-import com.webank.wedatasphere.linkis.cs.persistence.entity.PersistenceContextID;
-
-/**
- * Created by patinousward on 2020/2/13.
- */
-public interface ContextIDMapper {
-    void createContextID(PersistenceContextID persistenceContextID);
-
-    void deleteContextID(String contextId);
-
-    PersistenceContextID getContextID(String contextId);
-
-    void updateContextID(PersistenceContextID persistenceContextID);
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/dao/ContextKeyListenerMapper.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/dao/ContextKeyListenerMapper.java
deleted file mode 100644
index 979e524..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/dao/ContextKeyListenerMapper.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.dao;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.ContextKeyListenerDomain;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.persistence.entity.PersistenceContextKeyListener;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * Created by patinousward on 2020/2/17.
- */
-public interface ContextKeyListenerMapper {
-
-    void createKeyListener(@Param("listener") PersistenceContextKeyListener listener);
-
-    void remove(@Param("listener") ContextKeyListenerDomain contextKeyListenerDomain, @Param("keyId") Integer keyId);
-
-    void removeAll(@Param("keyIds") List<Integer> keyIds);
-
-    List<PersistenceContextKeyListener> getAll(@Param("keyIds") List<Integer> keyIds);
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/dao/ContextMapMapper.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/dao/ContextMapMapper.java
deleted file mode 100644
index 422b2ce..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/dao/ContextMapMapper.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.dao;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.persistence.entity.PersistenceContextKeyValue;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * Created by patinousward on 2020/2/13.
- */
-public interface ContextMapMapper {
-    void createMap(PersistenceContextKeyValue pKV);
-
-    void updateMap(PersistenceContextKeyValue pKV);
-
-    PersistenceContextKeyValue getContextMap(@Param("contextID") ContextID contextID, @Param("contextKey") ContextKey contextKey);
-
-    List<PersistenceContextKeyValue> getAllContextMapByKey(@Param("contextID") ContextID contextID, @Param("key") String key);
-
-    List<PersistenceContextKeyValue> getAllContextMapByContextID(@Param("contextID") ContextID contextID);
-
-    List<PersistenceContextKeyValue> getAllContextMapByScope(@Param("contextID") ContextID contextID, @Param("contextScope") ContextScope contextScope);
-
-    List<PersistenceContextKeyValue> getAllContextMapByType(@Param("contextID") ContextID contextID, @Param("contextType") ContextType contextType);
-
-    void removeContextMap(@Param("contextID") ContextID contextID, @Param("contextKey") ContextKey contextKey);
-
-    void removeAllContextMapByContextID(@Param("contextID") ContextID contextID);
-
-    void removeAllContextMapByType(@Param("contextID") ContextID contextID, @Param("contextType") ContextType contextType);
-
-    void removeAllContextMapByScope(@Param("contextID") ContextID contextID, @Param("contextScope") ContextScope contextScope);
-
-    void removeByKeyPrefixAndContextType(@Param("contextID") ContextID contextID, @Param("contextType") ContextType contextType, @Param("keyPrefix") String keyPrefix);
-
-    void removeByKeyPrefix(@Param("contextID") ContextID contextID, @Param("keyPrefix") String keyPrefix);
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/entity/ExtraFieldClass.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/entity/ExtraFieldClass.java
deleted file mode 100644
index 82d1223..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/entity/ExtraFieldClass.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.entity;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Created by patinousward on 2020/2/14.
- */
-public class ExtraFieldClass {
-
-    private String className;
-
-    private List<ExtraFieldClass> subs = new ArrayList<>();
-
-    private List<String> fieldNames = new ArrayList<>();
-
-    private List<Object> fieldValues = new ArrayList<>();
-
-    private List<String> fieldTypes = new ArrayList<>();
-
-    public void addSub(ExtraFieldClass sub) {
-        subs.add(sub);
-    }
-
-    public void addFieldName(String fieldName) {
-        fieldNames.add(fieldName);
-    }
-
-    public void addFieldValue(Object fieldValue) {
-        fieldValues.add(fieldValue);
-    }
-
-    public void addFieldType(String fieldtype) {
-        fieldTypes.add(fieldtype);
-    }
-
-    public ExtraFieldClass getOneSub(int index) {
-        return subs.get(index);
-    }
-
-    public String getOneFieldName(int index) {
-        return fieldNames.get(index);
-    }
-
-    public String getOneFieldType(int index) {
-        return fieldTypes.get(index);
-    }
-
-    public Object getOneFieldValue(int index) {
-        return fieldValues.get(index);
-    }
-
-    public String getClassName() {
-        return className;
-    }
-
-    public void setClassName(String className) {
-        this.className = className;
-    }
-
-    public List<ExtraFieldClass> getSubs() {
-        return subs;
-    }
-
-    public void setSubs(List<ExtraFieldClass> subs) {
-        this.subs = subs;
-    }
-
-    public List<String> getFieldNames() {
-        return fieldNames;
-    }
-
-    public void setFieldNames(List<String> fieldNames) {
-        this.fieldNames = fieldNames;
-    }
-
-    public List<Object> getFieldValues() {
-        return fieldValues;
-    }
-
-    public void setFieldValues(List<Object> fieldValues) {
-        this.fieldValues = fieldValues;
-    }
-
-    public List<String> getFieldTypes() {
-        return fieldTypes;
-    }
-
-    public void setFieldTypes(List<String> fieldTypes) {
-        this.fieldTypes = fieldTypes;
-    }
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/entity/PersistenceContextID.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/entity/PersistenceContextID.java
deleted file mode 100644
index cd9fb37..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/entity/PersistenceContextID.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.entity;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ExpireType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.HAContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.UserContextID;
-import com.webank.wedatasphere.linkis.cs.persistence.annotation.Ignore;
-
-import java.util.Date;
-
-/**
- * Created by patinousward on 2020/2/12.
- */
-@Ignore
-public class PersistenceContextID implements UserContextID, HAContextID {
-
-    private String contextId;
-
-    private String user;
-
-    private String instance;
-
-    private String backupInstance;
-
-    private String application;
-
-    private ExpireType expireType;
-
-    private Date expireTime;
-
-    private String source;
-
-    public String getSource() {
-        return source;
-    }
-
-    public void setSource(String source) {
-        this.source = source;
-    }
-
-    @Override
-    public String getContextId() {
-        return this.contextId;
-    }
-
-    @Override
-    public void setContextId(String contextId) {
-        this.contextId = contextId;
-    }
-
-    @Override
-    public void setUser(String user) {
-        this.user = user;
-    }
-
-    @Override
-    public String getUser() {
-        return this.user;
-    }
-
-    @Override
-    public String getInstance() {
-        return this.instance;
-    }
-
-    @Override
-    public void setInstance(String instance) {
-        this.instance = instance;
-    }
-
-    @Override
-    public String getBackupInstance() {
-        return this.backupInstance;
-    }
-
-    @Override
-    public void setBackupInstance(String backupInstance) {
-        this.backupInstance = backupInstance;
-    }
-
-    public String getApplication() {
-        return application;
-    }
-
-    public void setApplication(String application) {
-        this.application = application;
-    }
-
-    public ExpireType getExpireType() {
-        return expireType;
-    }
-
-    public void setExpireType(ExpireType expireType) {
-        this.expireType = expireType;
-    }
-
-    public Date getExpireTime() {
-        return expireTime;
-    }
-
-    public void setExpireTime(Date expireTime) {
-        this.expireTime = expireTime;
-    }
-
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/entity/PersistenceContextIDListener.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/entity/PersistenceContextIDListener.java
deleted file mode 100644
index 1dc0894..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/entity/PersistenceContextIDListener.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.entity;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.ListenerDomain;
-
-/**
- * Created by patinousward on 2020/2/17.
- */
-public class PersistenceContextIDListener implements ListenerDomain {
-
-    private Integer id;
-
-    private String source;
-
-    private String contextId;
-
-    public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    public String getContextId() {
-        return contextId;
-    }
-
-    public void setContextId(String contextId) {
-        this.contextId = contextId;
-    }
-
-    @Override
-    public String getSource() {
-        return this.source;
-    }
-
-    @Override
-    public void setSource(String source) {
-        this.source = source;
-    }
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/entity/PersistenceContextKey.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/entity/PersistenceContextKey.java
deleted file mode 100644
index eb5d77c..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/entity/PersistenceContextKey.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.entity;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.persistence.annotation.Ignore;
-
-/**
- * Created by patinousward on 2020/2/12.
- */
-@Ignore
-public class PersistenceContextKey implements ContextKey {
-
-    private String key;
-
-    private String keywords;
-
-    private ContextScope contextScope;
-
-    private ContextType contextType;
-
-    @Override
-    public String getKey() {
-        return this.key;
-    }
-
-    @Override
-    public void setKey(String key) {
-        this.key = key;
-    }
-
-    @Override
-    public ContextType getContextType() {
-        return this.contextType;
-    }
-
-    @Override
-    public void setContextType(ContextType contextType) {
-        this.contextType = contextType;
-    }
-
-    @Override
-    public ContextScope getContextScope() {
-        return this.contextScope;
-    }
-
-    @Override
-    public void setContextScope(ContextScope contextScope) {
-        this.contextScope = contextScope;
-    }
-
-    @Override
-    public String getKeywords() {
-        return this.keywords;
-    }
-
-    @Override
-    public void setKeywords(String keywords) {
-        this.keywords = keywords;
-    }
-
-    @Override
-    public int getType() {
-        return 0;
-    }
-
-    @Override
-    public void setType(int type) {
-
-    }
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/entity/PersistenceContextKeyListener.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/entity/PersistenceContextKeyListener.java
deleted file mode 100644
index 9f6278d..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/entity/PersistenceContextKeyListener.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.entity;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.ListenerDomain;
-
-/**
- * Created by patinousward on 2020/2/17.
- */
-public class PersistenceContextKeyListener implements ListenerDomain {
-
-    private Integer id;
-
-    private String source;
-
-    private Integer keyId;
-
-    public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    public Integer getKeyId() {
-        return keyId;
-    }
-
-    public void setKeyId(Integer keyId) {
-        this.keyId = keyId;
-    }
-
-    @Override
-    public String getSource() {
-        return this.source;
-    }
-
-    @Override
-    public void setSource(String source) {
-        this.source = source;
-    }
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/entity/PersistenceContextKeyValue.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/entity/PersistenceContextKeyValue.java
deleted file mode 100644
index 713cc87..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/entity/PersistenceContextKeyValue.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.entity;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextValue;
-import com.webank.wedatasphere.linkis.cs.persistence.annotation.Ignore;
-
-/**
- * Created by patinousward on 2020/2/12.
- */
-@Ignore
-public class PersistenceContextKeyValue implements ContextKeyValue {
-
-    private Integer id;
-
-    private String contextId;
-
-    private ContextKey contextKey;
-
-    private ContextValue contextValue;
-
-    private String props;
-
-    public String getProps() {
-        return props;
-    }
-
-    public void setProps(String props) {
-        this.props = props;
-    }
-
-    public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    @Override
-    public void setContextKey(ContextKey contextKey) {
-        this.contextKey = contextKey;
-    }
-
-    @Override
-    public ContextKey getContextKey() {
-        return this.contextKey;
-    }
-
-    @Override
-    public ContextValue getContextValue() {
-        return this.contextValue;
-    }
-
-    @Override
-    public void setContextValue(ContextValue contextValue) {
-        this.contextValue = contextValue;
-    }
-
-    public String getContextId() {
-        return contextId;
-    }
-
-    public void setContextId(String contextId) {
-        this.contextId = contextId;
-    }
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/entity/PersistenceContextValue.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/entity/PersistenceContextValue.java
deleted file mode 100644
index 0c18ab6..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/entity/PersistenceContextValue.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.entity;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextValue;
-import com.webank.wedatasphere.linkis.cs.persistence.annotation.Ignore;
-
-/**
- * Created by patinousward on 2020/2/12.
- */
-@Ignore
-public class PersistenceContextValue implements ContextValue {
-
-    private String keywords;
-    /**
-     * 序列化后的value
-     */
-    private Object value;
-
-    private String valueStr;
-
-    public String getValueStr() {
-        return valueStr;
-    }
-
-    public void setValueStr(String valueStr) {
-        this.valueStr = valueStr;
-    }
-
-    @Override
-    public String getKeywords() {
-        return this.keywords;
-    }
-
-    @Override
-    public void setKeywords(String keywords) {
-        this.keywords = keywords;
-    }
-
-    @Override
-    public Object getValue() {
-        return this.value;
-    }
-
-    @Override
-    public void setValue(Object value) {
-        this.value = value;
-    }
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/exception/ThrowingFunction.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/exception/ThrowingFunction.java
deleted file mode 100644
index 7fdac51..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/exception/ThrowingFunction.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.exception;
-
-/**
- * Created by patinousward on 2019/11/13.
- */
-@FunctionalInterface
-public interface ThrowingFunction<T, R, E extends Exception> {
-    R accept(T t) throws E;
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/ContextIDListenerPersistence.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/ContextIDListenerPersistence.java
deleted file mode 100644
index c42b279..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/ContextIDListenerPersistence.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.persistence;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.ContextIDListenerDomain;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-
-import java.util.List;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface ContextIDListenerPersistence {
-
-    void create(ContextID contextID, ContextIDListenerDomain contextIDListenerDomain) throws CSErrorException;
-
-    void remove(ContextIDListenerDomain contextIDListenerDomain) throws CSErrorException;
-
-    void removeAll(ContextID contextID) throws CSErrorException;
-
-    List<ContextIDListenerDomain> getAll(ContextID contextID) throws CSErrorException;
-
-    ContextIDListenerDomain getBy(ContextIDListenerDomain contextIDListenerDomain) throws CSErrorException;
-
-
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/ContextIDPersistence.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/ContextIDPersistence.java
deleted file mode 100644
index 1140d36..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/ContextIDPersistence.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.persistence;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.listener.ContextIDListener;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface ContextIDPersistence {
-
-    ContextID createContextID(ContextID contextID) throws CSErrorException;
-
-    void deleteContextID(String contextId) throws CSErrorException;
-
-    void updateContextID(ContextID contextID) throws CSErrorException;
-
-    ContextID getContextID(String contextId) throws CSErrorException;
-
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/ContextKeyListenerPersistence.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/ContextKeyListenerPersistence.java
deleted file mode 100644
index 7febd96..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/ContextKeyListenerPersistence.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.persistence;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.ContextKeyListenerDomain;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.listener.ContextKeyListener;
-
-import java.util.List;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface ContextKeyListenerPersistence {
-
-    void create(ContextID contextID, ContextKeyListenerDomain contextKeyListenerDomain) throws CSErrorException;
-
-    void remove(ContextID contextID, ContextKeyListenerDomain contextKeyListenerDomain) throws CSErrorException;
-
-    void removeAll(ContextID contextID) throws CSErrorException;
-
-    List<ContextKeyListenerDomain> getAll(ContextID contextID) throws CSErrorException;
-
-    ContextKeyListenerDomain getBy(ContextKeyListenerDomain contextKeyListenerDomain) throws CSErrorException;
-
-
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/ContextMapPersistence.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/ContextMapPersistence.java
deleted file mode 100644
index 1364e3f..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/ContextMapPersistence.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.persistence;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.listener.ContextKeyListener;
-
-import java.util.List;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface ContextMapPersistence {
-
-    void create(ContextID contextID, ContextKeyValue contextKeyValue) throws CSErrorException;
-
-    void update(ContextID contextID, ContextKeyValue contextKeyValue) throws CSErrorException;
-
-    ContextKeyValue get(ContextID contextID, ContextKey contextKey) throws CSErrorException;
-
-    List<ContextKeyValue> getAll(ContextID contextID, String key) throws CSErrorException;
-
-    List<ContextKeyValue> getAll(ContextID contextID) throws CSErrorException;
-
-    List<ContextKeyValue> getAll(ContextID contextID, ContextScope contextScope) throws CSErrorException;
-
-    List<ContextKeyValue> getAll(ContextID contextID, ContextType contextType) throws CSErrorException;
-
-    void reset(ContextID contextID, ContextKey contextKey) throws CSErrorException;
-
-    void remove(ContextID contextID, ContextKey contextKey) throws CSErrorException;
-
-    void removeAll(ContextID contextID) throws CSErrorException;
-
-    void removeAll(ContextID contextID, ContextType contextType) throws CSErrorException;
-
-    void removeAll(ContextID contextID, ContextScope contextScope) throws CSErrorException;
-
-    void removeByKeyPrefix(ContextID contextID, String keyPrefix);
-
-    void removeByKeyPrefix(ContextID contextID, ContextType contextType, String keyPrefix);
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/ContextMetricsPersistence.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/ContextMetricsPersistence.java
deleted file mode 100644
index ccf1375..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/ContextMetricsPersistence.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.persistence;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface ContextMetricsPersistence {
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/TransactionManager.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/TransactionManager.java
deleted file mode 100644
index 19fcafd..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/TransactionManager.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.persistence;
-
-/**
- * Created by patinousward on 2020/2/11.
- */
-public interface TransactionManager {
-
-    Object begin();
-
-    void rollback(Object object);
-
-    void commit(Object object);
-
-    void onTransaction();
-
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/impl/ContextIDListenerPersistenceImpl.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/impl/ContextIDListenerPersistenceImpl.java
deleted file mode 100644
index cdb1c3c..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/impl/ContextIDListenerPersistenceImpl.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.persistence.impl;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.CommonContextIDListenerDomain;
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.ContextIDListenerDomain;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.persistence.dao.ContextIDListenerMapper;
-import com.webank.wedatasphere.linkis.cs.persistence.entity.PersistenceContextIDListener;
-import com.webank.wedatasphere.linkis.cs.persistence.persistence.ContextIDListenerPersistence;
-import com.webank.wedatasphere.linkis.cs.persistence.persistence.ContextIDPersistence;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * Created by patinousward on 2020/2/17.
- */
-@Component
-public class ContextIDListenerPersistenceImpl implements ContextIDListenerPersistence {
-
-    @Autowired
-    private ContextIDListenerMapper contextIDListenerMapper;
-
-    @Autowired
-    private ContextIDPersistence contextIDPersistence;
-
-    @Override
-    public void create(ContextID contextID, ContextIDListenerDomain contextIDListenerDomain) throws CSErrorException {
-        PersistenceContextIDListener listener = new PersistenceContextIDListener();
-        listener.setContextId(contextID.getContextId());
-        listener.setSource(contextIDListenerDomain.getSource());
-        contextIDListenerMapper.createIDListener(listener);
-    }
-
-    @Override
-    public void remove(ContextIDListenerDomain contextIDListenerDomain) throws CSErrorException {
-        // TODO: 2020/2/17
-        PersistenceContextIDListener listener = new PersistenceContextIDListener();
-        listener.setContextId(contextIDListenerDomain.getContextID().getContextId());
-        listener.setSource(contextIDListenerDomain.getSource());
-        contextIDListenerMapper.remove(listener);
-    }
-
-    @Override
-    public void removeAll(ContextID contextID) throws CSErrorException {
-        contextIDListenerMapper.removeAll(contextID);
-    }
-
-    @Override
-    public List<ContextIDListenerDomain> getAll(ContextID contextID) throws CSErrorException {
-        // 根据id返回一堆的domain
-        ContextID complete = contextIDPersistence.getContextID(contextID.getContextId());
-        List<PersistenceContextIDListener> listeners = contextIDListenerMapper.getAll(contextID);
-        List<ContextIDListenerDomain> domains = listeners.stream().map(l -> pDomainToCommon(l, complete)).collect(Collectors.toList());
-        return domains;
-    }
-
-    public ContextIDListenerDomain pDomainToCommon(PersistenceContextIDListener listener, ContextID contextID) {
-        CommonContextIDListenerDomain domain = new CommonContextIDListenerDomain();
-        domain.setContextID(contextID);
-        domain.setSource(listener.getSource());
-        return domain;
-    }
-
-    @Override
-    public ContextIDListenerDomain getBy(ContextIDListenerDomain contextIDListenerDomain) throws CSErrorException {
-        //根据id 和source 返回响应的ContextIDListenerDomain
-        return contextIDListenerDomain;
-    }
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/impl/ContextIDPersistenceImpl.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/impl/ContextIDPersistenceImpl.java
deleted file mode 100644
index c7b26c3..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/impl/ContextIDPersistenceImpl.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.persistence.impl;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.listener.ContextIDListener;
-import com.webank.wedatasphere.linkis.cs.persistence.dao.ContextIDMapper;
-import com.webank.wedatasphere.linkis.cs.persistence.entity.ExtraFieldClass;
-import com.webank.wedatasphere.linkis.cs.persistence.entity.PersistenceContextID;
-import com.webank.wedatasphere.linkis.cs.persistence.persistence.ContextIDPersistence;
-import com.webank.wedatasphere.linkis.cs.persistence.util.PersistenceUtils;
-import com.webank.wedatasphere.linkis.server.BDPJettyServerHelper;
-import org.apache.commons.math3.util.Pair;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.io.IOException;
-
-/**
- * Created by patinousward on 2020/2/12.
- */
-@Component
-public class ContextIDPersistenceImpl implements ContextIDPersistence {
-
-    private final Logger logger = LoggerFactory.getLogger(this.getClass());
-
-    @Autowired
-    private ContextIDMapper contextIDMapper;
-
-    private Class<PersistenceContextID> pClass = PersistenceContextID.class;
-
-    private ObjectMapper json = BDPJettyServerHelper.jacksonJson();
-
-    @Override
-    public ContextID createContextID(ContextID contextID) throws CSErrorException {
-        try {
-            Pair<PersistenceContextID, ExtraFieldClass> pContextID = PersistenceUtils.transfer(contextID, pClass);
-            pContextID.getFirst().setSource(json.writeValueAsString(pContextID.getSecond()));
-            contextIDMapper.createContextID(pContextID.getFirst());
-            contextID.setContextId(pContextID.getFirst().getContextId());
-            return contextID;
-        } catch (JsonProcessingException e) {
-            logger.error("writeAsJson failed:", e);
-            throw new CSErrorException(97000, e.getMessage());
-        }
-    }
-
-    @Override
-    public void deleteContextID(String contextId) {
-        contextIDMapper.deleteContextID(contextId);
-    }
-
-    @Override
-    public void updateContextID(ContextID contextID) throws CSErrorException {
-        //contextId和source没有设置更新点
-        Pair<PersistenceContextID, ExtraFieldClass> pContextID = PersistenceUtils.transfer(contextID, pClass);
-        contextIDMapper.updateContextID(pContextID.getFirst());
-    }
-
-    @Override
-    public ContextID getContextID(String contextId) throws CSErrorException {
-        try {
-            PersistenceContextID pContextID = contextIDMapper.getContextID(contextId);
-            if(pContextID == null) return null;
-            ExtraFieldClass extraFieldClass = json.readValue(pContextID.getSource(), ExtraFieldClass.class);
-            ContextID contextID = PersistenceUtils.transfer(extraFieldClass, pContextID);
-            return contextID;
-        } catch (IOException e) {
-            logger.error("readJson failed:", e);
-            throw new CSErrorException(97000, e.getMessage());
-        }
-    }
-
-
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/impl/ContextKeyListenerPersistenceImpl.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/impl/ContextKeyListenerPersistenceImpl.java
deleted file mode 100644
index 184bd43..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/impl/ContextKeyListenerPersistenceImpl.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.persistence.impl;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.CommonContextKeyListenerDomain;
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.ContextKeyListenerDomain;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.persistence.dao.ContextKeyListenerMapper;
-import com.webank.wedatasphere.linkis.cs.persistence.dao.ContextMapMapper;
-import com.webank.wedatasphere.linkis.cs.persistence.entity.PersistenceContextKeyListener;
-import com.webank.wedatasphere.linkis.cs.persistence.entity.PersistenceContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.persistence.persistence.ContextKeyListenerPersistence;
-import com.webank.wedatasphere.linkis.cs.persistence.persistence.ContextMapPersistence;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Optional;
-import java.util.stream.Collectors;
-
-/**
- * Created by patinousward on 2020/2/17.
- */
-@Component
-public class ContextKeyListenerPersistenceImpl implements ContextKeyListenerPersistence {
-
-    @Autowired
-    private ContextKeyListenerMapper contextKeyListenerMapper;
-
-    @Autowired
-    private ContextMapMapper contextMapMapper;
-
-    @Autowired
-    private ContextMapPersistence contextMapPersistence;
-
-    private final Logger logger = LoggerFactory.getLogger(this.getClass());
-
-    @Override
-    public void create(ContextID contextID, ContextKeyListenerDomain contextKeyListenerDomain) throws CSErrorException {
-        PersistenceContextKeyListener listener = new PersistenceContextKeyListener();
-        listener.setSource(contextKeyListenerDomain.getSource());
-        // contextKey 去数据库中查出响应的id
-        PersistenceContextKeyValue contextMap = contextMapMapper.getContextMap(contextID, contextKeyListenerDomain.getContextKey());
-        listener.setKeyId(contextMap.getId());
-        contextKeyListenerMapper.createKeyListener(listener);
-    }
-
-    @Override
-    public void remove(ContextID contextID, ContextKeyListenerDomain contextKeyListenerDomain) throws CSErrorException {
-        PersistenceContextKeyValue contextMap = contextMapMapper.getContextMap(contextID, contextKeyListenerDomain.getContextKey());
-        Integer keyId = contextMap.getId();
-        contextKeyListenerMapper.remove(contextKeyListenerDomain, keyId);
-    }
-
-    @Override
-    public void removeAll(ContextID contextID) throws CSErrorException {
-        //找到contextID 对应的所有map id
-        List<Integer> keyIds = contextMapMapper.getAllContextMapByContextID(contextID).stream()
-                .map(PersistenceContextKeyValue::getId).collect(Collectors.toList());
-        contextKeyListenerMapper.removeAll(keyIds);
-    }
-
-    @Override
-    public List<ContextKeyListenerDomain> getAll(ContextID contextID) throws CSErrorException {
-        List<PersistenceContextKeyValue> pKVs = contextMapMapper.getAllContextMapByContextID(contextID);
-        List<Integer> keyIds = contextMapMapper.getAllContextMapByContextID(contextID).stream()
-                .map(PersistenceContextKeyValue::getId).collect(Collectors.toList());
-        ArrayList<ContextKeyListenerDomain> domains = new ArrayList<>();
-        if (!keyIds.isEmpty()) {
-            logger.info("fetch %s keyIds by contextId %s", keyIds.size(), contextID.getContextId());
-            List<PersistenceContextKeyListener> listeners = contextKeyListenerMapper.getAll(keyIds);
-            for (PersistenceContextKeyListener listener : listeners) {
-                domains.add(pDomainToCommon(listener, contextID, pKVs));
-            }
-        }
-        return domains;
-    }
-
-    public ContextKeyListenerDomain pDomainToCommon(PersistenceContextKeyListener listener, ContextID contextID, List<PersistenceContextKeyValue> pKVs) throws CSErrorException {
-        CommonContextKeyListenerDomain domain = new CommonContextKeyListenerDomain();
-        domain.setSource(listener.getSource());
-        Optional<PersistenceContextKeyValue> first = pKVs.stream().filter(kv -> kv.getId().equals(listener.getId())).findFirst();
-        if (first.isPresent()) {
-            ContextKeyValue contextKeyValue = contextMapPersistence.get(contextID, first.get().getContextKey());
-            domain.setContextKey(contextKeyValue.getContextKey());
-        }
-        return domain;
-    }
-
-    @Override
-    public ContextKeyListenerDomain getBy(ContextKeyListenerDomain contextKeyListenerDomain) throws CSErrorException {
-
-        return contextKeyListenerDomain;
-    }
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/impl/ContextMapPersistenceImpl.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/impl/ContextMapPersistenceImpl.java
deleted file mode 100644
index 1ee3966..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/impl/ContextMapPersistenceImpl.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.persistence.impl;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextValue;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.serialize.helper.ContextSerializationHelper;
-import com.webank.wedatasphere.linkis.cs.common.serialize.helper.SerializationHelper;
-import com.webank.wedatasphere.linkis.cs.persistence.dao.ContextMapMapper;
-import com.webank.wedatasphere.linkis.cs.persistence.entity.ExtraFieldClass;
-import com.webank.wedatasphere.linkis.cs.persistence.entity.PersistenceContextKey;
-import com.webank.wedatasphere.linkis.cs.persistence.entity.PersistenceContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.persistence.entity.PersistenceContextValue;
-import com.webank.wedatasphere.linkis.cs.persistence.persistence.ContextMapPersistence;
-import com.webank.wedatasphere.linkis.cs.persistence.util.PersistenceUtils;
-import com.webank.wedatasphere.linkis.server.BDPJettyServerHelper;
-import org.apache.commons.math3.util.Pair;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * Created by patinousward on 2020/2/13.
- */
-@Component
-public class ContextMapPersistenceImpl implements ContextMapPersistence {
-
-    @Autowired
-    private ContextMapMapper contextMapMapper;
-
-    private Class<PersistenceContextKey> pKClass = PersistenceContextKey.class;
-
-    private Class<PersistenceContextValue> pVClass = PersistenceContextValue.class;
-
-    private Class<PersistenceContextKeyValue> pKVClass = PersistenceContextKeyValue.class;
-
-    private final Logger logger = LoggerFactory.getLogger(this.getClass());
-
-    private ObjectMapper json = BDPJettyServerHelper.jacksonJson();
-
-    private final SerializationHelper serialHelper = ContextSerializationHelper.getInstance();
-
-    @Override
-    public void create(ContextID contextID, ContextKeyValue kV) throws CSErrorException {
-        // TODO: 2020/2/17 keywords 如何合并
-        try {
-            Pair<PersistenceContextKey, ExtraFieldClass> pK = PersistenceUtils.transfer(kV.getContextKey(), pKClass);
-            Pair<PersistenceContextValue, ExtraFieldClass> pV = PersistenceUtils.transfer(kV.getContextValue(), pVClass);
-            Pair<PersistenceContextKeyValue, ExtraFieldClass> pKV = PersistenceUtils.transfer(kV, pKVClass);
-            pV.getFirst().setValueStr(serialHelper.serialize(kV.getContextValue().getValue()));
-            pKV.getSecond().addSub(pK.getSecond());
-            pKV.getSecond().addSub(pV.getSecond());
-            pKV.getFirst().setProps(json.writeValueAsString(pKV.getSecond()));
-            pKV.getFirst().setContextId(contextID.getContextId());
-            pKV.getFirst().setContextKey(pK.getFirst());
-            pKV.getFirst().setContextValue(pV.getFirst());
-            contextMapMapper.createMap(pKV.getFirst());
-        } catch (JsonProcessingException e) {
-            logger.error("writeAsJson failed:", e);
-            throw new CSErrorException(97000, e.getMessage());
-        }
-    }
-
-    @Override
-    public void update(ContextID contextID, ContextKeyValue kV) throws CSErrorException {
-        //根据contextId和key 进行更新
-        Pair<PersistenceContextKey, ExtraFieldClass> pK = PersistenceUtils.transfer(kV.getContextKey(), pKClass);
-        Pair<PersistenceContextValue, ExtraFieldClass> pV = PersistenceUtils.transfer(kV.getContextValue(), pVClass);
-        Pair<PersistenceContextKeyValue, ExtraFieldClass> pKV = PersistenceUtils.transfer(kV, pKVClass);
-        Object value = kV.getContextValue().getValue();
-        if (value != null) {
-            pV.getFirst().setValueStr(serialHelper.serialize(value));
-        }
-        pKV.getFirst().setContextKey(pK.getFirst());
-        pKV.getFirst().setContextValue(pV.getFirst());
-        pKV.getFirst().setContextId(contextID.getContextId());
-        contextMapMapper.updateMap(pKV.getFirst());
-    }
-
-    @Override
-    public ContextKeyValue get(ContextID contextID, ContextKey contextKey) throws CSErrorException {
-        //根据contextId 和key,获取到一个ContextKeyValue
-        PersistenceContextKeyValue pKV = contextMapMapper.getContextMap(contextID, contextKey);
-        if (pKV == null) return null;
-        return transfer(pKV);
-    }
-
-    private ContextKeyValue transfer(PersistenceContextKeyValue pKV) throws CSErrorException {
-        try {
-            // TODO: 2020/2/14 null return
-            PersistenceContextKey pK = (PersistenceContextKey) pKV.getContextKey();
-            PersistenceContextValue pV = (PersistenceContextValue) pKV.getContextValue();
-            ExtraFieldClass extraFieldClass = json.readValue(pKV.getProps(), ExtraFieldClass.class);
-            ContextKey key = PersistenceUtils.transfer(extraFieldClass.getOneSub(0), pK);
-            ContextValue value = PersistenceUtils.transfer(extraFieldClass.getOneSub(1), pV);
-            if(value != null){
-                value.setValue(serialHelper.deserialize(pV.getValueStr()));
-            }
-            ContextKeyValue kv = PersistenceUtils.transfer(extraFieldClass, pKV);
-            kv.setContextKey(key);
-            kv.setContextValue(value);
-            return kv;
-        } catch (IOException e) {
-            logger.error("readJson failed:", e);
-            throw new CSErrorException(97000, e.getMessage());
-        }
-    }
-
-    @Override
-    public List<ContextKeyValue> getAll(ContextID contextID, String key) {
-        //模糊匹配key
-        List<PersistenceContextKeyValue> pKVs = contextMapMapper.getAllContextMapByKey(contextID, key);
-        return pKVs.stream().map(PersistenceUtils.map(this::transfer)).collect(Collectors.toList());
-    }
-
-    @Override
-    public List<ContextKeyValue> getAll(ContextID contextID) {
-        List<PersistenceContextKeyValue> pKVs = contextMapMapper.getAllContextMapByContextID(contextID);
-        return pKVs.stream().map(PersistenceUtils.map(this::transfer)).collect(Collectors.toList());
-    }
-
-    @Override
-    public List<ContextKeyValue> getAll(ContextID contextID, ContextScope contextScope) {
-        List<PersistenceContextKeyValue> pKVs = contextMapMapper.getAllContextMapByScope(contextID, contextScope);
-        return pKVs.stream().map(PersistenceUtils.map(this::transfer)).collect(Collectors.toList());
-    }
-
-    @Override
-    public List<ContextKeyValue> getAll(ContextID contextID, ContextType contextType) {
-        List<PersistenceContextKeyValue> pKVs = contextMapMapper.getAllContextMapByType(contextID, contextType);
-        return pKVs.stream().map(PersistenceUtils.map(this::transfer)).collect(Collectors.toList());
-    }
-
-    @Override
-    public void reset(ContextID contextID, ContextKey contextKey) {
-
-    }
-
-    @Override
-    public void remove(ContextID contextID, ContextKey contextKey) {
-        contextMapMapper.removeContextMap(contextID, contextKey);
-    }
-
-    @Override
-    public void removeAll(ContextID contextID) {
-        contextMapMapper.removeAllContextMapByContextID(contextID);
-    }
-
-    @Override
-    public void removeAll(ContextID contextID, ContextType contextType) {
-        contextMapMapper.removeAllContextMapByType(contextID, contextType);
-    }
-
-    @Override
-    public void removeAll(ContextID contextID, ContextScope contextScope) {
-        contextMapMapper.removeAllContextMapByScope(contextID, contextScope);
-    }
-
-    @Override
-    public void removeByKeyPrefix(ContextID contextID, String keyPrefix) {
-        contextMapMapper.removeByKeyPrefix(contextID,keyPrefix);
-    }
-
-    @Override
-    public void removeByKeyPrefix(ContextID contextID, ContextType contextType, String keyPrefix) {
-        contextMapMapper.removeByKeyPrefixAndContextType(contextID,contextType,keyPrefix);
-    }
-
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/impl/ContextMetricsPersistenceImpl.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/impl/ContextMetricsPersistenceImpl.java
deleted file mode 100644
index d4946bf..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/impl/ContextMetricsPersistenceImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.persistence.impl;
-
-import com.webank.wedatasphere.linkis.cs.persistence.persistence.ContextMetricsPersistence;
-import org.springframework.stereotype.Component;
-
-/**
- * Created by patinousward on 2020/2/23.
- */
-@Component
-public class ContextMetricsPersistenceImpl implements ContextMetricsPersistence {
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/impl/TransactionManagerImpl.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/impl/TransactionManagerImpl.java
deleted file mode 100644
index aee60de..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/persistence/impl/TransactionManagerImpl.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.persistence.impl;
-
-import com.webank.wedatasphere.linkis.cs.persistence.persistence.TransactionManager;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-import org.springframework.transaction.PlatformTransactionManager;
-import org.springframework.transaction.TransactionStatus;
-import org.springframework.transaction.support.DefaultTransactionDefinition;
-
-/**
- * Created by patinousward on 2020/2/17.
- */
-@Component
-public class TransactionManagerImpl implements TransactionManager {
-
-    @Autowired
-    private PlatformTransactionManager txManager;
-
-    @Override
-    public Object begin() {
-        return txManager.getTransaction(new DefaultTransactionDefinition());
-    }
-
-    @Override
-    public void rollback(Object object) {
-        TransactionStatus status = (TransactionStatus) object;
-        txManager.rollback(status);
-    }
-
-    @Override
-    public void commit(Object object) {
-        TransactionStatus status = (TransactionStatus) object;
-        txManager.commit(status);
-    }
-
-    @Override
-    public void onTransaction() {
-        // TODO: 2020/2/17  
-    }
-}
diff --git a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/util/PersistenceUtils.java b/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/util/PersistenceUtils.java
deleted file mode 100644
index 8e29dc2..0000000
--- a/contextservice/cs-persistence/src/main/java/com/webank/wedatasphere/linkis/cs/persistence/util/PersistenceUtils.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.persistence.util;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSWarnException;
-import com.webank.wedatasphere.linkis.cs.common.serialize.helper.ContextSerializationHelper;
-import com.webank.wedatasphere.linkis.cs.common.serialize.helper.SerializationHelper;
-import com.webank.wedatasphere.linkis.cs.persistence.annotation.Ignore;
-import com.webank.wedatasphere.linkis.cs.persistence.entity.ExtraFieldClass;
-import com.webank.wedatasphere.linkis.cs.persistence.exception.ThrowingFunction;
-import com.webank.wedatasphere.linkis.server.BDPJettyServerHelper;
-import org.apache.commons.math3.util.Pair;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.BeanUtils;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.Arrays;
-import java.util.List;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-
-/**
- * Created by patinousward on 2020/2/13.
- */
-public class PersistenceUtils {
-
-    private static ObjectMapper json = BDPJettyServerHelper.jacksonJson();
-
-    private static final Logger logger = LoggerFactory.getLogger(PersistenceUtils.class);
-
-    private static String generateGetMethod(Field field) {
-        String fieldName = field.getName();
-        return String.format("get%s%s", fieldName.substring(0, 1).toUpperCase(), fieldName.substring(1));
-    }
-
-    public static String generateSetMethod(String fieldName) {
-        return String.format("set%s%s", fieldName.substring(0, 1).toUpperCase(), fieldName.substring(1));
-    }
-
-    private static boolean canIgnore(Field field) {
-        return field.getAnnotation(Ignore.class) != null;
-    }
-
-    private static List<String> getIgnoreFieldName(Class<?> clazz) {
-        if (clazz.getAnnotation(Ignore.class) != null) {
-            return Arrays.stream(clazz.getDeclaredFields()).map(Field::getName).collect(Collectors.toList());
-        } else {
-            return Arrays.stream(clazz.getDeclaredFields())
-                    .filter(PersistenceUtils::canIgnore).map(Field::getName).collect(Collectors.toList());
-        }
-    }
-
-    public static <T, S> Pair<S, ExtraFieldClass> transfer(T t, Class<S> sClass) throws CSErrorException {
-        try {
-            ExtraFieldClass extraFieldClass = new ExtraFieldClass();
-            S s = sClass.newInstance();
-            BeanUtils.copyProperties(t, s);
-            Class<?> tClass = t.getClass();
-            extraFieldClass.setClassName(tClass.getName());
-            List<String> canIgnore = getIgnoreFieldName(sClass);
-            for (Field field : tClass.getDeclaredFields()) {
-                if (!canIgnore.contains(field.getName())) {
-                    Method method = tClass.getMethod(generateGetMethod(field));
-                    if (null != method.invoke(t)) {
-                        //field.getType().getName() 无法拿到子类的类型
-                        Object invoke = method.invoke(t);
-                        extraFieldClass.addFieldName(field.getName());
-                        if (invoke == null) {
-                            extraFieldClass.addFieldType(field.getType().getName());
-                        } else {
-                            extraFieldClass.addFieldType(invoke.getClass().getName());
-                        }
-                        extraFieldClass.addFieldValue(invoke);
-                    }
-                }
-            }
-            return new Pair<>(s, extraFieldClass);
-        } catch (Exception e) {
-            throw new CSErrorException(97000, "transfer bean failed:", e);
-        }
-    }
-
-    public static <T, S> T transfer(ExtraFieldClass extraFieldClass, S s) throws CSErrorException {
-        if (s == null) return null;
-        try {
-            Class<?> tClass = Class.forName(extraFieldClass.getClassName());
-            T t = (T) tClass.newInstance();
-            BeanUtils.copyProperties(s, t);
-            for (int i = 0; i < extraFieldClass.getFieldNames().size(); i++) {
-                Field field = tClass.getDeclaredField(extraFieldClass.getOneFieldName(i));
-                field.setAccessible(true);
-                if (LONG_TYP.equals(extraFieldClass.getOneFieldType(i))) {
-                    Long value = new Long(extraFieldClass.getOneFieldValue(i).toString());
-                    field.set(t, value);
-                } else if (Enum.class.isAssignableFrom(Class.forName(extraFieldClass.getOneFieldType(i)))) {
-                    //反序列化支持枚举类
-                    Class<?> enumClass = Class.forName(extraFieldClass.getOneFieldType(i));
-                    Method valueOf = enumClass.getMethod("valueOf", String.class);
-                    Object invoke = valueOf.invoke(null, extraFieldClass.getOneFieldValue(i));
-                    field.set(t, invoke);
-                } else if (!BeanUtils.isSimpleProperty(Class.forName(extraFieldClass.getOneFieldType(i)))) {
-                    //非基本类型的话,使用jackson进行反序列化  // TODO: 2020/3/5 这里属性的序列化and反序列化最好修改为utils的序列化器
-                    Object o = json.convertValue(extraFieldClass.getOneFieldValue(i), Class.forName(extraFieldClass.getOneFieldType(i)));
-                    field.set(t, o);
-                } else {
-                    field.set(t, extraFieldClass.getOneFieldValue(i));
-                }
-            }
-            return t;
-        } catch (Exception e) {
-            throw new CSErrorException(97000, "transfer bean failed:", e);
-        }
-    }
-
-    public static <T, R, E extends Exception> Function<T, R> map(
-            ThrowingFunction<T, R, E> throwingFunction) {
-        return i -> {
-            try {
-                return throwingFunction.accept(i);
-            } catch (Exception e) {
-                throw new CSWarnException(97000, "execute failed,reason:", e);
-            }
-        };
-    }
-
-    private static final String LONG_TYP = "java.lang.Long";
-
-    // TODO: 2020/5/15  去掉重复的
-    public static final SerializationHelper SERIALIZE = ContextSerializationHelper.getInstance();
-
-    public static String serialize(Object o) throws CSErrorException {
-        if (o instanceof String) {
-            return (String) o;
-        }
-        return SERIALIZE.serialize(o);
-    }
-
-    public static <T> T deserialize(String Str) throws CSErrorException {
-        return (T) SERIALIZE.deserialize(Str);
-    }
-
-}
diff --git a/contextservice/cs-persistence/src/main/resources/cs_ddl.sql b/contextservice/cs-persistence/src/main/resources/cs_ddl.sql
deleted file mode 100644
index 73f6cbb..0000000
--- a/contextservice/cs-persistence/src/main/resources/cs_ddl.sql
+++ /dev/null
@@ -1,90 +0,0 @@
---
--- Copyright 2019 WeBank
---
--- Licensed under the Apache License, Version 2.0 (the "License");
---  you may not use this file except in compliance with the License.
--- You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
-
-SET FOREIGN_KEY_CHECKS=0;
-
--- ----------------------------
--- Table structure for linkis_cs_context_history
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_cs_context_history`;
-CREATE TABLE `linkis_cs_context_history` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `context_id` int(11) DEFAULT NULL,
-  `source` text,
-  `context_type` varchar(32) DEFAULT NULL,
-  `history_json` text,
-  `keyword` varchar(255) DEFAULT NULL,
-  PRIMARY KEY (`id`),
-  KEY `keyword` (`keyword`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-
--- ----------------------------
--- Table structure for linkis_cs_context_id
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_cs_context_id`;
-CREATE TABLE `linkis_cs_context_id` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `user` varchar(32) DEFAULT NULL,
-  `application` varchar(32) DEFAULT NULL,
-  `source` varchar(255) DEFAULT NULL,
-  `expire_type` varchar(32) DEFAULT NULL,
-  `expire_time` datetime DEFAULT NULL,
-  `instance` varchar(32) DEFAULT NULL,
-  `backup_instance` varchar(255) DEFAULT NULL,
-  PRIMARY KEY (`id`),
-  KEY `instance` (`instance`),
-  KEY `backup_instance` (`backup_instance`),
-  KEY `instance_2` (`instance`,`backup_instance`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4;
-
--- ----------------------------
--- Table structure for linkis_cs_context_listener
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_cs_context_listener`;
-CREATE TABLE `linkis_cs_context_listener` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `listener_source` varchar(255) DEFAULT NULL,
-  `context_id` int(11) DEFAULT NULL,
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-
--- ----------------------------
--- Table structure for linkis_cs_context_map
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_cs_context_map`;
-CREATE TABLE `linkis_cs_context_map` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `key` varchar(255) DEFAULT NULL,
-  `context_scope` varchar(32) DEFAULT NULL,
-  `context_type` varchar(32) DEFAULT NULL,
-  `props` text,
-  `value` text,
-  `context_id` int(11) DEFAULT NULL,
-  `keywords` varchar(255) DEFAULT NULL,
-  PRIMARY KEY (`id`),
-  KEY `keywords` (`keywords`(191))
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-
--- ----------------------------
--- Table structure for linkis_cs_context_map_listener
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_cs_context_map_listener`;
-CREATE TABLE `linkis_cs_context_map_listener` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `listener_source` varchar(255) DEFAULT NULL,
-  `key_id` int(11) DEFAULT NULL,
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
\ No newline at end of file
diff --git a/contextservice/cs-search/pom.xml b/contextservice/cs-search/pom.xml
deleted file mode 100644
index a30d66c..0000000
--- a/contextservice/cs-search/pom.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>linkis-cs-search</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cs-common</artifactId>
-            </dependency>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cs-cache</artifactId>
-            </dependency>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cloudRPC</artifactId>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>RELEASE</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.mockito</groupId>
-            <artifactId>mockito-all</artifactId>
-            <version>2.0.2-beta</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>${basedir}/src/main/resources</directory>
-            </resource>
-        </resources>
-        <finalName>${project.artifactId}-${project.version}</finalName>
-    </build>
-</project>
\ No newline at end of file
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/ContextSearch.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/ContextSearch.java
deleted file mode 100644
index 02e2324..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/ContextSearch.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.contextcache.ContextCacheService;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.ContextCache;
-import com.webank.wedatasphere.linkis.cs.exception.ContextSearchFailedException;
-
-import java.util.List;
-import java.util.Map;
-
-public interface ContextSearch {
-
-    List<ContextKeyValue> search(ContextCacheService contextCacheService, ContextID contextID, Map<Object, Object> conditionMap) throws ContextSearchFailedException;
-    List<ContextKeyValue> search(ContextCacheService contextCacheService, ContextID contextID, Condition condition) throws ContextSearchFailedException;
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/DefaultContextSearch.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/DefaultContextSearch.java
deleted file mode 100644
index c43f6f6..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/DefaultContextSearch.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.construction.ConditionParser;
-import com.webank.wedatasphere.linkis.cs.condition.impl.*;
-import com.webank.wedatasphere.linkis.cs.contextcache.ContextCacheService;
-import com.webank.wedatasphere.linkis.cs.exception.ContextSearchFailedException;
-import com.webank.wedatasphere.linkis.cs.execution.ConditionExecution;
-import com.webank.wedatasphere.linkis.cs.execution.impl.*;
-import com.webank.wedatasphere.linkis.server.BDPJettyServerHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-import java.util.Map;
-
-public class DefaultContextSearch implements ContextSearch {
-
-    private static Logger logger = LoggerFactory.getLogger(DefaultContextSearch.class);
-
-    @Override
-    public List<ContextKeyValue> search(ContextCacheService contextCacheService, ContextID contextID, Map<Object, Object> conditionMap) throws ContextSearchFailedException {
-        logger.info("Got search condition: \n" + BDPJettyServerHelper.gson().toJson(conditionMap));
-        ConditionParser conditionParser = ConditionParser.parserMap.get(conditionMap.get("type"));
-        return search(contextCacheService, contextID, conditionParser.parse(conditionMap));
-    }
-
-    @Override
-    public List<ContextKeyValue> search(ContextCacheService contextCacheService, ContextID contextID, Condition condition) throws ContextSearchFailedException {
-        return getExecution(contextCacheService, contextID, condition).execute();
-    }
-
-    private ConditionExecution getExecution(ContextCacheService contextCacheService, ContextID contextID, Condition condition) throws ContextSearchFailedException {
-        if(condition instanceof ContextTypeCondition){
-            return new ContextTypeConditionExecution((ContextTypeCondition) condition, contextCacheService, contextID);
-        } else if(condition instanceof ContextScopeCondition){
-            return new ContextScopeConditionExecution((ContextScopeCondition) condition, contextCacheService, contextID);
-        } else if(condition instanceof RegexCondition){
-            return new RegexConditionExecution((RegexCondition) condition, contextCacheService, contextID);
-        } else if(condition instanceof ContainsCondition){
-            return new ContainsConditionExecution((ContainsCondition) condition, contextCacheService, contextID);
-        } else if(condition instanceof AndCondition){
-            return new AndConditionExecution((AndCondition) condition, contextCacheService, contextID);
-        } else if(condition instanceof OrCondition){
-            return new OrConditionExecution((OrCondition) condition, contextCacheService, contextID);
-        } else if(condition instanceof NotCondition){
-            return new NotConditionExecution((NotCondition) condition, contextCacheService, contextID);
-        } else if(condition instanceof NearestCondition){
-            return new NearestConditionExecution((NearestCondition) condition, contextCacheService, contextID);
-        } else if(condition instanceof ContextValueTypeCondition){
-            return new ContextValueTypeConditionExecution((ContextValueTypeCondition) condition, contextCacheService, contextID);
-        }
-        throw new ContextSearchFailedException(1200001, "Unknown Condition Type");
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/AbstractCommonCondition.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/AbstractCommonCondition.java
deleted file mode 100644
index af6277c..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/AbstractCommonCondition.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition;
-
-import com.webank.wedatasphere.linkis.cs.condition.impl.AndCondition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.NotCondition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.OrCondition;
-
-public abstract class AbstractCommonCondition implements Condition{
-
-    @Override
-    public Condition and(Condition right) {
-        return new AndCondition(this, right);
-    }
-
-    @Override
-    public Condition or(Condition right) {
-        return new OrCondition(this, right);
-    }
-
-    @Override
-    public Condition not() {
-        return new NotCondition(this);
-    }
-
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/AtomicCondition.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/AtomicCondition.java
deleted file mode 100644
index c0e1bb7..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/AtomicCondition.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition;
-
-public abstract class AtomicCondition extends AbstractCommonCondition {
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/BinaryLogicCondition.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/BinaryLogicCondition.java
deleted file mode 100644
index eae2d21..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/BinaryLogicCondition.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition;
-
-public abstract class BinaryLogicCondition extends AbstractCommonCondition{
-
-    Condition left;
-    Condition right;
-
-    public BinaryLogicCondition(Condition left, Condition right) {
-        this.left = left;
-        this.right = right;
-    }
-
-    public void shift(){
-        Condition tmp = this.left;
-        this.left = this.right;
-        this.right = tmp;
-    }
-
-    public Condition getLeft() {
-        return left;
-    }
-
-    public void setLeft(Condition left) {
-        this.left = left;
-    }
-
-    public Condition getRight() {
-        return right;
-    }
-
-    public void setRight(Condition right) {
-        right = right;
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/Condition.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/Condition.java
deleted file mode 100644
index a252644..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/Condition.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition;
-
-public interface Condition {
-
-    Condition and(Condition right);
-    Condition or(Condition right);
-    Condition not();
-    ConditionType getConditionType();
-
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/ConditionType.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/ConditionType.java
deleted file mode 100644
index 12ac221..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/ConditionType.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition;
-
-public enum ConditionType {
-    Regex,
-    Contains,
-    Equals,
-    Logic
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/UnaryLogicCondition.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/UnaryLogicCondition.java
deleted file mode 100644
index 2d33912..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/UnaryLogicCondition.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition;
-
-public abstract class UnaryLogicCondition extends AbstractCommonCondition{
-    Condition origin;
-
-    public UnaryLogicCondition(Condition origin) {
-        this.origin = origin;
-    }
-
-    public Condition getOrigin() {
-        return origin;
-    }
-
-    public void setOrigin(Condition origin) {
-        this.origin = origin;
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/AndConditionParser.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/AndConditionParser.java
deleted file mode 100644
index 8c48525..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/AndConditionParser.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition.construction;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.AndCondition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.ContextTypeCondition;
-
-import java.util.Map;
-
-public class AndConditionParser implements ConditionParser{
-    @Override
-    public Condition parse(Map<Object, Object> conditionMap) {
-        Map<Object, Object> left = (Map<Object, Object>) conditionMap.get("left");
-        Map<Object, Object> right = (Map<Object, Object>) conditionMap.get("right");
-        return new AndCondition(
-            parserMap.get(left.get("type")).parse(left),
-            parserMap.get(right.get("type")).parse(right)
-        );
-    }
-
-    @Override
-    public String getName() {
-        return "And";
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/ConditionBuilder.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/ConditionBuilder.java
deleted file mode 100644
index f0fb1a2..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/ConditionBuilder.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition.construction;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-
-import java.util.Collection;
-
-public interface ConditionBuilder {
-
-    public static ConditionBuilder newBuilder(){
-        return new ConditionBuilderImpl();
-    }
-
-    ConditionBuilder contextTypes(Collection<ContextType> contextTypes);
-    ConditionBuilder contextScopes(Collection<ContextScope> contextScopes);
-    ConditionBuilder regex(String regex);
-    ConditionBuilder contains(String value);
-    Condition build();
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/ConditionBuilderImpl.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/ConditionBuilderImpl.java
deleted file mode 100644
index daff5c7..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/ConditionBuilderImpl.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition.construction;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.ContainsCondition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.ContextScopeCondition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.ContextTypeCondition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.RegexCondition;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.lang.StringUtils;
-
-import java.util.Collection;
-
-public class ConditionBuilderImpl implements ConditionBuilder{
-
-    Collection<ContextType> contextTypes;
-    Collection<ContextScope> contextScopes;
-    String regex;
-    String containsValue;
-
-    @Override
-    public ConditionBuilder contextTypes(Collection<ContextType> contextTypes) {
-        this.contextTypes = contextTypes;
-        return this;
-    }
-
-    @Override
-    public ConditionBuilder contextScopes(Collection<ContextScope> contextScopes) {
-        this.contextScopes = contextScopes;
-        return this;
-    }
-
-    @Override
-    public ConditionBuilder regex(String regex) {
-        this.regex = regex;
-        return this;
-    }
-
-    @Override
-    public ConditionBuilder contains(String value) {
-        this.containsValue = value;
-        return this;
-    }
-
-    @Override
-    public Condition build() {
-        Condition condition = null;
-        if(CollectionUtils.isNotEmpty(contextTypes)){
-            for(ContextType contextType : contextTypes){
-                Condition subCondition = new ContextTypeCondition(contextType);
-                condition = combineCondition(condition, subCondition, true);
-            }
-        }
-        Condition conditionContextScope = null;
-        if(CollectionUtils.isNotEmpty(contextScopes)){
-            for(ContextScope contextScope : contextScopes){
-                Condition subCondition = new ContextScopeCondition(contextScope);
-                conditionContextScope = combineCondition(conditionContextScope, subCondition, true);
-            }
-            condition = combineCondition(condition, conditionContextScope, false);
-        }
-
-        if(StringUtils.isNotBlank(regex)){
-            Condition subCondition = new RegexCondition(regex);
-            condition = combineCondition(condition, subCondition, false);
-        }
-        if(StringUtils.isNotBlank(containsValue)){
-            Condition subCondition = new ContainsCondition(containsValue);
-            condition = combineCondition(condition, subCondition, false);
-        }
-        return condition;
-    }
-
-    private Condition combineCondition(Condition condition, Condition subCondition, boolean or) {
-        if(condition == null){
-            condition = subCondition;
-        } else if (or){
-            condition = condition.or(subCondition);
-        } else {
-            condition = condition.and(subCondition);
-        }
-        return condition;
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/ConditionParser.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/ConditionParser.java
deleted file mode 100644
index e277b84..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/ConditionParser.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition.construction;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public interface ConditionParser {
-
-    public static Map<String, ConditionParser> parserMap = new HashMap<String, ConditionParser>(){{
-        List<ConditionParser> conditionParsers = Lists.newArrayList(
-                new RegexConditionParser(),
-                new ContainsConditionParser(),
-                new ContextTypeConditionParser(),
-                new ContextScopeConditionParser(),
-                new AndConditionParser(),
-                new OrConditionParser(),
-                new NotConditionParser(),
-                new NearestConditionParser(),
-                new ContextValueTypeConditionParser()
-        );
-        for(ConditionParser conditionParser : conditionParsers){
-            put(conditionParser.getName(), conditionParser);
-        }
-    }};
-
-
-    Condition parse(Map<Object, Object> conditionMap);
-    String getName();
-
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/ContainsConditionParser.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/ContainsConditionParser.java
deleted file mode 100644
index 32374df..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/ContainsConditionParser.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition.construction;
-
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.ContainsCondition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.RegexCondition;
-
-import java.util.Map;
-
-public class ContainsConditionParser implements ConditionParser{
-    @Override
-    public Condition parse(Map<Object, Object> conditionMap) {
-        return new ContainsCondition((String) conditionMap.get("value"));
-    }
-
-    @Override
-    public String getName() {
-        return "Contains";
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/ContextScopeConditionParser.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/ContextScopeConditionParser.java
deleted file mode 100644
index 4a9ebe8..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/ContextScopeConditionParser.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition.construction;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.ContextScopeCondition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.ContextTypeCondition;
-
-import java.util.Map;
-
-public class ContextScopeConditionParser implements ConditionParser{
-    @Override
-    public Condition parse(Map<Object, Object> conditionMap) {
-        return new ContextScopeCondition(ContextScope.valueOf((String) conditionMap.get("contextScope")));
-    }
-
-    @Override
-    public String getName() {
-        return "ContextScope";
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/ContextTypeConditionParser.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/ContextTypeConditionParser.java
deleted file mode 100644
index 41acf2f..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/ContextTypeConditionParser.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition.construction;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.ContainsCondition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.ContextTypeCondition;
-
-import java.util.Map;
-
-public class ContextTypeConditionParser implements ConditionParser{
-    @Override
-    public Condition parse(Map<Object, Object> conditionMap) {
-        return new ContextTypeCondition(ContextType.valueOf((String) conditionMap.get("contextType")));
-    }
-
-    @Override
-    public String getName() {
-        return "ContextType";
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/ContextValueTypeConditionParser.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/ContextValueTypeConditionParser.java
deleted file mode 100644
index 6043316..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/ContextValueTypeConditionParser.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition.construction;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.ContextTypeCondition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.ContextValueTypeCondition;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Map;
-
-public class ContextValueTypeConditionParser implements ConditionParser{
-
-    private static final Logger logger = LoggerFactory.getLogger(ContextValueTypeConditionParser.class);
-
-
-    @Override
-    public Condition parse(Map<Object, Object> conditionMap) {
-
-        Class contextValueType = Object.class;
-        try {
-            contextValueType = Class.forName((String) conditionMap.get("contextValueType"));
-        } catch (ClassNotFoundException e) {
-            logger.error("Cannot find contextValueType:" + conditionMap.get("contextValueType"));
-        }
-        return new ContextValueTypeCondition(contextValueType);
-    }
-
-    @Override
-    public String getName() {
-        return "ContextValueType";
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/NearestConditionParser.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/NearestConditionParser.java
deleted file mode 100644
index d13fd1d..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/NearestConditionParser.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition.construction;
-
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.NearestCondition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.NotCondition;
-
-import java.util.Map;
-
-public class NearestConditionParser implements ConditionParser{
-    @Override
-    public Condition parse(Map<Object, Object> conditionMap) {
-        Map<Object, Object> origin = (Map<Object, Object>) conditionMap.get("origin");
-        return new NearestCondition(
-            parserMap.get(origin.get("type")).parse(origin),
-            conditionMap.get("currentNode").toString(),
-            Integer.parseInt(conditionMap.get("number").toString()),
-            Boolean.parseBoolean(conditionMap.get("upstreamOnly").toString())
-        );
-    }
-
-    @Override
-    public String getName() {
-        return "Nearest";
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/NotConditionParser.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/NotConditionParser.java
deleted file mode 100644
index 4626cb6..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/NotConditionParser.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition.construction;
-
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.NotCondition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.OrCondition;
-
-import java.util.Map;
-
-public class NotConditionParser implements ConditionParser{
-    @Override
-    public Condition parse(Map<Object, Object> conditionMap) {
-        Map<Object, Object> origin = (Map<Object, Object>) conditionMap.get("origin");
-        return new NotCondition(
-            parserMap.get(origin.get("type")).parse(origin)
-        );
-    }
-
-    @Override
-    public String getName() {
-        return "Not";
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/OrConditionParser.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/OrConditionParser.java
deleted file mode 100644
index ff916fb..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/OrConditionParser.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition.construction;
-
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.AndCondition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.OrCondition;
-
-import java.util.Map;
-
-public class OrConditionParser implements ConditionParser{
-    @Override
-    public Condition parse(Map<Object, Object> conditionMap) {
-        Map<Object, Object> left = (Map<Object, Object>) conditionMap.get("left");
-        Map<Object, Object> right = (Map<Object, Object>) conditionMap.get("right");
-        return new OrCondition(
-            parserMap.get(left.get("type")).parse(left),
-            parserMap.get(right.get("type")).parse(right)
-        );
-    }
-
-    @Override
-    public String getName() {
-        return "Or";
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/RegexConditionParser.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/RegexConditionParser.java
deleted file mode 100644
index 0258e8c..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/construction/RegexConditionParser.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition.construction;
-
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.RegexCondition;
-
-import java.util.Map;
-
-public class RegexConditionParser implements ConditionParser{
-    @Override
-    public Condition parse(Map<Object, Object> conditionMap) {
-        return new RegexCondition((String) conditionMap.get("regex"));
-    }
-
-    @Override
-    public String getName() {
-        return "Regex";
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/AndCondition.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/AndCondition.java
deleted file mode 100644
index 7455d4d..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/AndCondition.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition.impl;
-
-import com.webank.wedatasphere.linkis.cs.condition.BinaryLogicCondition;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.ConditionType;
-
-public class AndCondition extends BinaryLogicCondition {
-
-    public AndCondition(Condition left, Condition right) {
-        super(left, right);
-    }
-
-    @Override
-    public ConditionType getConditionType() {
-        return ConditionType.Logic;
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/ContainsCondition.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/ContainsCondition.java
deleted file mode 100644
index 5dca527..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/ContainsCondition.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition.impl;
-
-import com.webank.wedatasphere.linkis.cs.condition.AtomicCondition;
-import com.webank.wedatasphere.linkis.cs.condition.ConditionType;
-
-public class ContainsCondition extends AtomicCondition {
-   String value;
-
-    public ContainsCondition(String value) {
-        this.value = value;
-    }
-
-    public String getValue() {
-        return value;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
-
-    @Override
-    public ConditionType getConditionType() {
-        return ConditionType.Contains;
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/ContextScopeCondition.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/ContextScopeCondition.java
deleted file mode 100644
index a81de58..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/ContextScopeCondition.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition.impl;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.condition.AtomicCondition;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.ConditionType;
-
-public class ContextScopeCondition extends AtomicCondition {
-
-    ContextScope contextScop;
-
-    public ContextScopeCondition(ContextScope contextScop) {
-        this.contextScop = contextScop;
-    }
-
-    public ContextScope getContextScop() {
-        return contextScop;
-    }
-
-    public void setContextScop(ContextScope contextScop) {
-        this.contextScop = contextScop;
-    }
-
-    @Override
-    public ConditionType getConditionType() {
-        return ConditionType.Equals;
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/ContextTypeCondition.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/ContextTypeCondition.java
deleted file mode 100644
index dbd42f6..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/ContextTypeCondition.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition.impl;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.condition.AtomicCondition;
-import com.webank.wedatasphere.linkis.cs.condition.ConditionType;
-
-public class ContextTypeCondition extends AtomicCondition {
-
-    ContextType contextType;
-
-    public ContextTypeCondition(ContextType contextType) {
-        this.contextType = contextType;
-    }
-
-    public ContextType getContextType() {
-        return contextType;
-    }
-
-    public void setContextType(ContextType contextType) {
-        this.contextType = contextType;
-    }
-
-    @Override
-    public ConditionType getConditionType() {
-        return ConditionType.Equals;
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/ContextValueTypeCondition.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/ContextValueTypeCondition.java
deleted file mode 100644
index b6f330e..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/ContextValueTypeCondition.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition.impl;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.condition.AtomicCondition;
-import com.webank.wedatasphere.linkis.cs.condition.ConditionType;
-
-public class ContextValueTypeCondition extends AtomicCondition {
-
-    Class contextValueType;
-
-    public ContextValueTypeCondition(Class contextValueType) {
-        this.contextValueType = contextValueType;
-    }
-
-    public Class getContextValueType() {
-        return contextValueType;
-    }
-
-    public void setContextValueType(Class contextValueType) {
-        this.contextValueType = contextValueType;
-    }
-
-    @Override
-    public ConditionType getConditionType() {
-        return ConditionType.Equals;
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/NearestCondition.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/NearestCondition.java
deleted file mode 100644
index 43bd40d..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/NearestCondition.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition.impl;
-
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.ConditionType;
-import com.webank.wedatasphere.linkis.cs.condition.UnaryLogicCondition;
-
-public class NearestCondition extends UnaryLogicCondition {
-
-    String currentNode;
-    Integer number;
-    Boolean upstreamOnly;
-
-    public NearestCondition(Condition origin, String currentNode, Integer number, Boolean upstreamOnly) {
-        super(origin);
-        this.currentNode = currentNode;
-        this.number = number;
-        this.upstreamOnly = upstreamOnly;
-    }
-
-    public String getCurrentNode() {
-        return currentNode;
-    }
-
-    public void setCurrentNode(String currentNode) {
-        this.currentNode = currentNode;
-    }
-
-    public Integer getNumber() {
-        return number;
-    }
-
-    public void setNumber(Integer number) {
-        this.number = number;
-    }
-
-    public Boolean getUpstreamOnly() {
-        return upstreamOnly;
-    }
-
-    public void setUpstreamOnly(Boolean upstreamOnly) {
-        this.upstreamOnly = upstreamOnly;
-    }
-
-    @Override
-    public ConditionType getConditionType() {
-        return ConditionType.Logic;
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/NotCondition.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/NotCondition.java
deleted file mode 100644
index 6635f32..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/NotCondition.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition.impl;
-
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.ConditionType;
-import com.webank.wedatasphere.linkis.cs.condition.UnaryLogicCondition;
-
-public class NotCondition extends UnaryLogicCondition {
-    public NotCondition(Condition origin) {
-        super(origin);
-    }
-
-    @Override
-    public ConditionType getConditionType() {
-        return ConditionType.Logic;
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/OrCondition.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/OrCondition.java
deleted file mode 100644
index 0b0d4d8..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/OrCondition.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition.impl;
-
-import com.webank.wedatasphere.linkis.cs.condition.BinaryLogicCondition;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.ConditionType;
-
-public class OrCondition  extends BinaryLogicCondition {
-    public OrCondition(Condition left, Condition right) {
-        super(left, right);
-    }
-
-    @Override
-    public ConditionType getConditionType() {
-        return ConditionType.Logic;
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/RegexCondition.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/RegexCondition.java
deleted file mode 100644
index 758a2df..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/condition/impl/RegexCondition.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.condition.impl;
-
-import com.webank.wedatasphere.linkis.cs.condition.AtomicCondition;
-import com.webank.wedatasphere.linkis.cs.condition.ConditionType;
-
-public class RegexCondition extends AtomicCondition {
-
-    String regex;
-
-    public RegexCondition(String regex) {
-        this.regex = regex;
-    }
-
-    public String getRegex() {
-        return regex;
-    }
-
-    public void setRegex(String regex) {
-        this.regex = regex;
-    }
-
-    @Override
-    public ConditionType getConditionType() {
-        return ConditionType.Regex;
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/exception/ContextSearchFailedException.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/exception/ContextSearchFailedException.java
deleted file mode 100644
index 83c095a..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/exception/ContextSearchFailedException.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.exception;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-
-public class ContextSearchFailedException extends ErrorException {
-    public ContextSearchFailedException(int errCode, String desc) {
-        super(errCode, desc);
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/AbstractConditionExecution.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/AbstractConditionExecution.java
deleted file mode 100644
index 5edd172..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/AbstractConditionExecution.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.contextcache.ContextCacheService;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.ContextCache;
-import com.webank.wedatasphere.linkis.cs.execution.fetcher.ContextCacheFetcher;
-import com.webank.wedatasphere.linkis.cs.execution.matcher.ContextSearchMatcher;
-import com.webank.wedatasphere.linkis.cs.execution.ruler.ContextSearchRuler;
-import com.webank.wedatasphere.linkis.cs.optimize.ConditionOptimizer;
-import com.webank.wedatasphere.linkis.cs.optimize.OptimizedCondition;
-import com.webank.wedatasphere.linkis.cs.optimize.cost.ConditionCostCalculator;
-import com.webank.wedatasphere.linkis.cs.optimize.impl.CostBasedConditionOptimizer;
-
-import java.util.List;
-
-public abstract class AbstractConditionExecution implements ConditionExecution{
-
-    protected ContextSearchMatcher contextSearchMatcher;
-    protected ContextSearchRuler contextSearchRuler;
-    protected ContextCacheFetcher contextCacheFetcher;
-    protected ContextCacheService contextCacheService;
-    protected Condition condition;
-    protected ContextID contextID;
-
-    public AbstractConditionExecution(Condition condition, ContextCacheService contextCacheService, ContextID contextID) {
-        this.condition = condition;
-        this.contextCacheService = contextCacheService;
-        this.contextID = contextID;
-    }
-
-    @Override
-    public List<ContextKeyValue> execute() {
-        if(needOptimization()){
-            OptimizedCondition optimizedCondition = getConditionOptimizer().optimize(condition);
-        }
-        ContextCacheFetcher fastFetcher = getFastFetcher();
-        if(fastFetcher != null){
-            return getContextSearchRuler().rule(fastFetcher.fetch(contextID));
-        } else {
-            return getContextCacheFetcher().fetch(contextID);
-        }
-    }
-
-    abstract protected boolean needOptimization();
-
-    abstract protected ContextCacheFetcher getFastFetcher();
-
-    @Override
-    public ContextSearchMatcher getContextSearchMatcher() {
-        return this.contextSearchMatcher;
-    }
-
-    @Override
-    public ContextSearchRuler getContextSearchRuler() {
-        return this.contextSearchRuler;
-    }
-
-    @Override
-    public ContextCacheFetcher getContextCacheFetcher() {
-        return this.contextCacheFetcher;
-    }
-
-    public ContextCacheService getContextCacheService() {
-        return contextCacheService;
-    }
-
-    public void setContextCacheService(ContextCacheService contextCacheService) {
-        this.contextCacheService = contextCacheService;
-    }
-
-    public Condition getCondition() {
-        return condition;
-    }
-
-    public ConditionOptimizer getConditionOptimizer() {
-        return new CostBasedConditionOptimizer(getConditionCostCalculator());
-    }
-
-    public ConditionCostCalculator getConditionCostCalculator(){
-        return new ConditionCostCalculator();
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/ConditionExecution.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/ConditionExecution.java
deleted file mode 100644
index 781f0d2..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/ConditionExecution.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.contextcache.ContextCacheService;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.ContextCache;
-import com.webank.wedatasphere.linkis.cs.execution.fetcher.ContextCacheFetcher;
-import com.webank.wedatasphere.linkis.cs.execution.matcher.ContextSearchMatcher;
-import com.webank.wedatasphere.linkis.cs.execution.ruler.ContextSearchRuler;
-
-import java.util.List;
-
-public interface ConditionExecution {
-
-    ContextSearchMatcher getContextSearchMatcher();
-    ContextSearchRuler getContextSearchRuler();
-    ContextCacheFetcher getContextCacheFetcher();
-    List<ContextKeyValue> execute();
-    void setContextCacheService(ContextCacheService contextCacheService);
-    ContextCacheService getContextCacheService();
-    Condition getCondition();
-
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/fetcher/AbstractContextCacheFetcher.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/fetcher/AbstractContextCacheFetcher.java
deleted file mode 100644
index b2e8f41..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/fetcher/AbstractContextCacheFetcher.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.fetcher;
-
-import com.webank.wedatasphere.linkis.cs.contextcache.ContextCacheService;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.ContextCache;
-
-public abstract class AbstractContextCacheFetcher implements ContextCacheFetcher{
-
-    ContextCacheService contextCacheService;
-
-    public AbstractContextCacheFetcher(ContextCacheService contextCacheService) {
-        this.contextCacheService = contextCacheService;
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/fetcher/ContextCacheFetcher.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/fetcher/ContextCacheFetcher.java
deleted file mode 100644
index b2f3a3e..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/fetcher/ContextCacheFetcher.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.fetcher;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-
-import java.util.List;
-
-public interface ContextCacheFetcher {
-
-    List<ContextKeyValue> fetch(ContextID contextID);
-
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/fetcher/ContextTypeContextSearchFetcher.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/fetcher/ContextTypeContextSearchFetcher.java
deleted file mode 100644
index 6e92731..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/fetcher/ContextTypeContextSearchFetcher.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.fetcher;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.contextcache.ContextCacheService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-
-public class ContextTypeContextSearchFetcher extends AbstractContextCacheFetcher{
-
-    private static final Logger logger = LoggerFactory.getLogger(ContextTypeContextSearchFetcher.class);
-
-    ContextType contextType;
-
-    public ContextTypeContextSearchFetcher(ContextCacheService contextCacheService, ContextType contextType) {
-        super(contextCacheService);
-        this.contextType = contextType;
-    }
-
-    private ContextTypeContextSearchFetcher(ContextCacheService contextCacheService) {
-        super(contextCacheService);
-    }
-
-    @Override
-    public List<ContextKeyValue> fetch(ContextID contextID) {
-        return contextCacheService.getAllByType(contextID, contextType);
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/fetcher/IterateContextCacheFetcher.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/fetcher/IterateContextCacheFetcher.java
deleted file mode 100644
index 513ac0e..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/fetcher/IterateContextCacheFetcher.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.fetcher;
-
-import com.google.common.collect.Lists;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.contextcache.ContextCacheService;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.ContextCache;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.csid.ContextIDValue;
-import com.webank.wedatasphere.linkis.cs.execution.ruler.ContextSearchRuler;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-
-public class IterateContextCacheFetcher extends AbstractContextCacheFetcher{
-
-    private static final Logger logger = LoggerFactory.getLogger(IterateContextCacheFetcher.class);
-
-    ContextSearchRuler contextSearchRuler;
-
-    public IterateContextCacheFetcher(ContextCacheService contextCacheService, ContextSearchRuler contextSearchRuler) {
-        super(contextCacheService);
-        this.contextSearchRuler = contextSearchRuler;
-    }
-
-    private IterateContextCacheFetcher(ContextCacheService contextCacheService) {
-        super(contextCacheService);
-    }
-
-    @Override
-    public List<ContextKeyValue> fetch(ContextID contextID) {
-        return contextSearchRuler.rule(contextCacheService.getAll(contextID));
-    }
-
-
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/AndConditionExecution.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/AndConditionExecution.java
deleted file mode 100644
index 94154d4..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/AndConditionExecution.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.impl;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.condition.impl.AndCondition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.RegexCondition;
-import com.webank.wedatasphere.linkis.cs.contextcache.ContextCacheService;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.ContextCache;
-import com.webank.wedatasphere.linkis.cs.execution.AbstractConditionExecution;
-import com.webank.wedatasphere.linkis.cs.execution.fetcher.ContextCacheFetcher;
-import com.webank.wedatasphere.linkis.cs.execution.fetcher.IterateContextCacheFetcher;
-import com.webank.wedatasphere.linkis.cs.execution.matcher.AndLogicContextSearchMatcher;
-import com.webank.wedatasphere.linkis.cs.execution.matcher.RegexContextSearchMatcher;
-import com.webank.wedatasphere.linkis.cs.execution.ruler.CommonListContextSearchRuler;
-
-public class AndConditionExecution extends BinaryLogicConditionExecution {
-
-    public AndConditionExecution(AndCondition condition, ContextCacheService contextCacheService, ContextID contextID) {
-        super(condition, contextCacheService, contextID);
-        this.contextSearchMatcher = new AndLogicContextSearchMatcher(condition);
-        this.contextSearchRuler = new CommonListContextSearchRuler(contextSearchMatcher);
-        this.contextCacheFetcher = new IterateContextCacheFetcher(contextCacheService, contextSearchRuler);
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/BinaryLogicConditionExecution.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/BinaryLogicConditionExecution.java
deleted file mode 100644
index 069fcc9..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/BinaryLogicConditionExecution.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.impl;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.condition.BinaryLogicCondition;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.ContextTypeCondition;
-import com.webank.wedatasphere.linkis.cs.contextcache.ContextCacheService;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.ContextCache;
-import com.webank.wedatasphere.linkis.cs.execution.AbstractConditionExecution;
-import com.webank.wedatasphere.linkis.cs.execution.fetcher.ContextCacheFetcher;
-import com.webank.wedatasphere.linkis.cs.execution.fetcher.ContextTypeContextSearchFetcher;
-
-public abstract class BinaryLogicConditionExecution extends AbstractConditionExecution {
-
-    ContextCacheFetcher fastFetcher;
-
-    public BinaryLogicConditionExecution(BinaryLogicCondition condition, ContextCacheService contextCacheService, ContextID contextID) {
-        super(condition, contextCacheService, contextID);
-        ContextTypeCondition contextTypeCondition = findFastCondition(condition.getLeft(), condition);
-        if(contextTypeCondition != null){
-            fastFetcher = new ContextTypeContextSearchFetcher(contextCacheService, contextTypeCondition.getContextType());
-        }
-    }
-
-    protected ContextTypeCondition findFastCondition(Condition condition, BinaryLogicCondition parent){
-        if(condition instanceof BinaryLogicCondition){
-            BinaryLogicCondition binaryLogicCondition = (BinaryLogicCondition) condition;
-            return findFastCondition(binaryLogicCondition.getLeft(), binaryLogicCondition);
-        } else if(condition instanceof ContextTypeCondition){
-            parent.setLeft(null);
-            return (ContextTypeCondition) condition;
-        } else {
-            return null;
-        }
-    }
-
-    @Override
-    protected ContextCacheFetcher getFastFetcher() {
-        return fastFetcher;
-    }
-
-    @Override
-    protected boolean needOptimization() {
-        return true;
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/ContainsConditionExecution.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/ContainsConditionExecution.java
deleted file mode 100644
index 9961fd7..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/ContainsConditionExecution.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.impl;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.condition.impl.ContainsCondition;
-import com.webank.wedatasphere.linkis.cs.contextcache.ContextCacheService;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.ContextCache;
-import com.webank.wedatasphere.linkis.cs.execution.AbstractConditionExecution;
-import com.webank.wedatasphere.linkis.cs.execution.fetcher.ContextCacheFetcher;
-import com.webank.wedatasphere.linkis.cs.execution.fetcher.IterateContextCacheFetcher;
-import com.webank.wedatasphere.linkis.cs.execution.matcher.ContainsContextSearchMatcher;
-import com.webank.wedatasphere.linkis.cs.execution.ruler.CommonListContextSearchRuler;
-
-public class ContainsConditionExecution extends AbstractConditionExecution {
-
-    public ContainsConditionExecution(ContainsCondition condition, ContextCacheService contextCacheService, ContextID contextID) {
-        super(condition, contextCacheService, contextID);
-        this.contextSearchMatcher = new ContainsContextSearchMatcher(condition);
-        this.contextSearchRuler = new CommonListContextSearchRuler(contextSearchMatcher);
-        this.contextCacheFetcher = new IterateContextCacheFetcher(contextCacheService, contextSearchRuler);
-    }
-
-    @Override
-    protected boolean needOptimization() {
-        return false;
-    }
-
-    @Override
-    protected ContextCacheFetcher getFastFetcher() {
-        return null;
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/ContextScopeConditionExecution.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/ContextScopeConditionExecution.java
deleted file mode 100644
index cd31fa7..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/ContextScopeConditionExecution.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.impl;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.condition.impl.ContextScopeCondition;
-import com.webank.wedatasphere.linkis.cs.contextcache.ContextCacheService;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.ContextCache;
-import com.webank.wedatasphere.linkis.cs.execution.AbstractConditionExecution;
-import com.webank.wedatasphere.linkis.cs.execution.fetcher.ContextCacheFetcher;
-import com.webank.wedatasphere.linkis.cs.execution.fetcher.IterateContextCacheFetcher;
-import com.webank.wedatasphere.linkis.cs.execution.matcher.ContextScopeContextSearchMatcher;
-import com.webank.wedatasphere.linkis.cs.execution.ruler.CommonListContextSearchRuler;
-
-public class ContextScopeConditionExecution extends AbstractConditionExecution {
-
-    public ContextScopeConditionExecution(ContextScopeCondition condition, ContextCacheService contextCacheService, ContextID contextID) {
-        super(condition, contextCacheService, contextID);
-        this.contextSearchMatcher = new ContextScopeContextSearchMatcher(condition);
-        this.contextSearchRuler = new CommonListContextSearchRuler(contextSearchMatcher);
-        this.contextCacheFetcher = new IterateContextCacheFetcher(contextCacheService, contextSearchRuler);
-    }
-
-    @Override
-    protected boolean needOptimization() {
-        return false;
-    }
-
-    @Override
-    protected ContextCacheFetcher getFastFetcher() {
-        return null;
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/ContextTypeConditionExecution.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/ContextTypeConditionExecution.java
deleted file mode 100644
index f486362..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/ContextTypeConditionExecution.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.impl;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.condition.impl.ContextTypeCondition;
-import com.webank.wedatasphere.linkis.cs.contextcache.ContextCacheService;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.ContextCache;
-import com.webank.wedatasphere.linkis.cs.execution.AbstractConditionExecution;
-import com.webank.wedatasphere.linkis.cs.execution.fetcher.ContextCacheFetcher;
-import com.webank.wedatasphere.linkis.cs.execution.fetcher.ContextTypeContextSearchFetcher;
-import com.webank.wedatasphere.linkis.cs.execution.matcher.ContextTypeContextSearchMatcher;
-import com.webank.wedatasphere.linkis.cs.execution.ruler.CommonListContextSearchRuler;
-
-public class ContextTypeConditionExecution extends AbstractConditionExecution {
-
-    public ContextTypeConditionExecution(ContextTypeCondition condition, ContextCacheService contextCacheService, ContextID contextID) {
-        super(condition, contextCacheService, contextID);
-        this.contextSearchMatcher = new ContextTypeContextSearchMatcher(condition);
-        this.contextSearchRuler = new CommonListContextSearchRuler(contextSearchMatcher);
-        this.contextCacheFetcher = new ContextTypeContextSearchFetcher(contextCacheService, condition.getContextType());
-    }
-
-    @Override
-    protected boolean needOptimization() {
-        return false;
-    }
-
-    @Override
-    protected ContextCacheFetcher getFastFetcher() {
-        return null;
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/ContextValueTypeConditionExecution.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/ContextValueTypeConditionExecution.java
deleted file mode 100644
index 753fb99..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/ContextValueTypeConditionExecution.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.impl;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.condition.impl.ContextTypeCondition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.ContextValueTypeCondition;
-import com.webank.wedatasphere.linkis.cs.contextcache.ContextCacheService;
-import com.webank.wedatasphere.linkis.cs.execution.AbstractConditionExecution;
-import com.webank.wedatasphere.linkis.cs.execution.fetcher.ContextCacheFetcher;
-import com.webank.wedatasphere.linkis.cs.execution.fetcher.ContextTypeContextSearchFetcher;
-import com.webank.wedatasphere.linkis.cs.execution.fetcher.IterateContextCacheFetcher;
-import com.webank.wedatasphere.linkis.cs.execution.matcher.ContextTypeContextSearchMatcher;
-import com.webank.wedatasphere.linkis.cs.execution.matcher.ContextValueTypeContextSearchMatcher;
-import com.webank.wedatasphere.linkis.cs.execution.ruler.CommonListContextSearchRuler;
-
-public class ContextValueTypeConditionExecution extends AbstractConditionExecution {
-
-    public ContextValueTypeConditionExecution(ContextValueTypeCondition condition, ContextCacheService contextCacheService, ContextID contextID) {
-        super(condition, contextCacheService, contextID);
-        this.contextSearchMatcher = new ContextValueTypeContextSearchMatcher(condition);
-        this.contextSearchRuler = new CommonListContextSearchRuler(contextSearchMatcher);
-        this.contextCacheFetcher = new IterateContextCacheFetcher(contextCacheService, contextSearchRuler);
-    }
-
-    @Override
-    protected boolean needOptimization() {
-        return false;
-    }
-
-    @Override
-    protected ContextCacheFetcher getFastFetcher() {
-        return null;
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/NearestConditionExecution.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/NearestConditionExecution.java
deleted file mode 100644
index 4653849..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/NearestConditionExecution.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.impl;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.condition.impl.NearestCondition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.NotCondition;
-import com.webank.wedatasphere.linkis.cs.contextcache.ContextCacheService;
-import com.webank.wedatasphere.linkis.cs.execution.fetcher.IterateContextCacheFetcher;
-import com.webank.wedatasphere.linkis.cs.execution.matcher.NearestLogicContextSearchMatcher;
-import com.webank.wedatasphere.linkis.cs.execution.matcher.NotLogicContextSearchMatcher;
-import com.webank.wedatasphere.linkis.cs.execution.matcher.SkipContextSearchMather;
-import com.webank.wedatasphere.linkis.cs.execution.ruler.CommonListContextSearchRuler;
-import com.webank.wedatasphere.linkis.cs.execution.ruler.NearestContextSearchRuler;
-
-public class NearestConditionExecution extends UnaryLogicConditionExecution {
-
-    public NearestConditionExecution(NearestCondition condition, ContextCacheService contextCacheService, ContextID contextID) {
-        super(condition, contextCacheService, contextID);
-        this.contextSearchMatcher = new NearestLogicContextSearchMatcher(condition);
-        this.contextSearchRuler = new NearestContextSearchRuler(contextSearchMatcher, contextCacheService, contextID, condition);
-        this.contextCacheFetcher = new IterateContextCacheFetcher(contextCacheService, contextSearchRuler);
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/NotConditionExecution.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/NotConditionExecution.java
deleted file mode 100644
index 17a979a..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/NotConditionExecution.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.impl;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.condition.impl.NotCondition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.OrCondition;
-import com.webank.wedatasphere.linkis.cs.contextcache.ContextCacheService;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.ContextCache;
-import com.webank.wedatasphere.linkis.cs.execution.fetcher.IterateContextCacheFetcher;
-import com.webank.wedatasphere.linkis.cs.execution.matcher.NotLogicContextSearchMatcher;
-import com.webank.wedatasphere.linkis.cs.execution.matcher.OrLogicContextSearchMatcher;
-import com.webank.wedatasphere.linkis.cs.execution.ruler.CommonListContextSearchRuler;
-
-public class NotConditionExecution extends UnaryLogicConditionExecution {
-
-    public NotConditionExecution(NotCondition condition, ContextCacheService contextCacheService, ContextID contextID) {
-        super(condition, contextCacheService, contextID);
-        this.contextSearchMatcher = new NotLogicContextSearchMatcher(condition);
-        this.contextSearchRuler = new CommonListContextSearchRuler(contextSearchMatcher);
-        this.contextCacheFetcher = new IterateContextCacheFetcher(contextCacheService, contextSearchRuler);
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/OrConditionExecution.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/OrConditionExecution.java
deleted file mode 100644
index 79afd87..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/OrConditionExecution.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.impl;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.condition.impl.AndCondition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.OrCondition;
-import com.webank.wedatasphere.linkis.cs.contextcache.ContextCacheService;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.ContextCache;
-import com.webank.wedatasphere.linkis.cs.execution.fetcher.IterateContextCacheFetcher;
-import com.webank.wedatasphere.linkis.cs.execution.matcher.AndLogicContextSearchMatcher;
-import com.webank.wedatasphere.linkis.cs.execution.matcher.OrLogicContextSearchMatcher;
-import com.webank.wedatasphere.linkis.cs.execution.ruler.CommonListContextSearchRuler;
-
-public class OrConditionExecution extends BinaryLogicConditionExecution {
-
-    public OrConditionExecution(OrCondition condition, ContextCacheService contextCacheService, ContextID contextID) {
-        super(condition, contextCacheService, contextID);
-        this.contextSearchMatcher = new OrLogicContextSearchMatcher(condition);
-        this.contextSearchRuler = new CommonListContextSearchRuler(contextSearchMatcher);
-        this.contextCacheFetcher = new IterateContextCacheFetcher(contextCacheService, contextSearchRuler);
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/RegexConditionExecution.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/RegexConditionExecution.java
deleted file mode 100644
index 654f448..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/RegexConditionExecution.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.impl;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.condition.impl.RegexCondition;
-import com.webank.wedatasphere.linkis.cs.contextcache.ContextCacheService;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.ContextCache;
-import com.webank.wedatasphere.linkis.cs.execution.AbstractConditionExecution;
-import com.webank.wedatasphere.linkis.cs.execution.fetcher.ContextCacheFetcher;
-import com.webank.wedatasphere.linkis.cs.execution.fetcher.IterateContextCacheFetcher;
-import com.webank.wedatasphere.linkis.cs.execution.matcher.RegexContextSearchMatcher;
-import com.webank.wedatasphere.linkis.cs.execution.ruler.CommonListContextSearchRuler;
-
-public class RegexConditionExecution extends AbstractConditionExecution {
-
-    public RegexConditionExecution(RegexCondition condition, ContextCacheService contextCacheService, ContextID contextID) {
-        super(condition, contextCacheService, contextID);
-        this.contextSearchMatcher = new RegexContextSearchMatcher(condition);
-        this.contextSearchRuler = new CommonListContextSearchRuler(contextSearchMatcher);
-        this.contextCacheFetcher = new IterateContextCacheFetcher(contextCacheService, contextSearchRuler);
-    }
-
-    @Override
-    protected boolean needOptimization() {
-        return false;
-    }
-
-    @Override
-    protected ContextCacheFetcher getFastFetcher() {
-        return null;
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/UnaryLogicConditionExecution.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/UnaryLogicConditionExecution.java
deleted file mode 100644
index b52bafb..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/impl/UnaryLogicConditionExecution.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.impl;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.condition.UnaryLogicCondition;
-import com.webank.wedatasphere.linkis.cs.contextcache.ContextCacheService;
-import com.webank.wedatasphere.linkis.cs.contextcache.cache.ContextCache;
-import com.webank.wedatasphere.linkis.cs.execution.AbstractConditionExecution;
-import com.webank.wedatasphere.linkis.cs.execution.fetcher.ContextCacheFetcher;
-
-public abstract class UnaryLogicConditionExecution extends AbstractConditionExecution {
-
-    public UnaryLogicConditionExecution(UnaryLogicCondition condition, ContextCacheService contextCacheService, ContextID contextID) {
-        super(condition, contextCacheService, contextID);
-    }
-
-    @Override
-    protected ContextCacheFetcher getFastFetcher() {
-        return null;
-    }
-
-    @Override
-    protected boolean needOptimization() {
-        return true;
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/AbstractContextSearchMatcher.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/AbstractContextSearchMatcher.java
deleted file mode 100644
index 6b04176..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/AbstractContextSearchMatcher.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.matcher;
-
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-
-public abstract class AbstractContextSearchMatcher implements ContextSearchMatcher{
-
-    Condition condition;
-
-    public AbstractContextSearchMatcher(Condition condition) {
-        this.condition = condition;
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/AndLogicContextSearchMatcher.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/AndLogicContextSearchMatcher.java
deleted file mode 100644
index a94653d..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/AndLogicContextSearchMatcher.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.matcher;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.AndCondition;
-
-public class AndLogicContextSearchMatcher extends BinaryLogicContextSearchMatcher{
-
-    public AndLogicContextSearchMatcher(AndCondition condition) {
-        super(condition);
-    }
-
-    @Override
-    public Boolean match(ContextKeyValue contextKeyValue) {
-        return leftMatcher.match(contextKeyValue)
-                && rightMatcher.match(contextKeyValue);
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/BinaryLogicContextSearchMatcher.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/BinaryLogicContextSearchMatcher.java
deleted file mode 100644
index 45df78b..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/BinaryLogicContextSearchMatcher.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.matcher;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.condition.BinaryLogicCondition;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-
-public abstract class BinaryLogicContextSearchMatcher extends AbstractContextSearchMatcher{
-
-    ContextSearchMatcher leftMatcher;
-    ContextSearchMatcher rightMatcher;
-
-    public BinaryLogicContextSearchMatcher(BinaryLogicCondition condition) {
-        super(condition);
-        this.leftMatcher = ConditionMatcherResolver.getMatcher(condition.getLeft());
-        this.rightMatcher = ConditionMatcherResolver.getMatcher(condition.getRight());
-    }
-
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/ConditionMatcherResolver.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/ConditionMatcherResolver.java
deleted file mode 100644
index 1610daa..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/ConditionMatcherResolver.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.matcher;
-
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.*;
-
-public class ConditionMatcherResolver {
-
-    public static ContextSearchMatcher getMatcher(Condition condition){
-        if(condition == null){
-            return new SkipContextSearchMather(condition);
-        }
-        if(condition instanceof ContextTypeCondition){
-            return new ContextTypeContextSearchMatcher((ContextTypeCondition) condition);
-        } else if(condition instanceof ContextScopeCondition){
-            return new ContextScopeContextSearchMatcher((ContextScopeCondition) condition);
-        } else if(condition instanceof RegexCondition){
-            return new RegexContextSearchMatcher((RegexCondition) condition);
-        } else if(condition instanceof ContainsCondition){
-            return new ContainsContextSearchMatcher((ContainsCondition) condition);
-        } else if(condition instanceof AndCondition){
-            return new AndLogicContextSearchMatcher((AndCondition) condition);
-        } else if(condition instanceof OrCondition){
-            return new OrLogicContextSearchMatcher((OrCondition) condition);
-        }else if(condition instanceof NearestCondition){
-            return new NearestLogicContextSearchMatcher((NearestCondition) condition);
-        }else if(condition instanceof ContextValueTypeCondition){
-            return new ContextValueTypeContextSearchMatcher((ContextValueTypeCondition) condition);
-        }
-        return new SkipContextSearchMather(condition);
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/ContainsContextSearchMatcher.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/ContainsContextSearchMatcher.java
deleted file mode 100644
index 838a6db..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/ContainsContextSearchMatcher.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.matcher;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.condition.impl.ContainsCondition;
-
-public class ContainsContextSearchMatcher extends AbstractContextSearchMatcher {
-
-    String value;
-
-    public ContainsContextSearchMatcher(ContainsCondition condition) {
-        super(condition);
-        this.value = condition.getValue();
-    }
-
-    @Override
-    public Boolean match(ContextKeyValue contextKeyValue) {
-        if(contextKeyValue.getContextKey().getKeywords() == null){
-            return contextKeyValue.getContextKey().getKey().contains(value);
-        } else {
-            return contextKeyValue.getContextKey().getKey().contains(value)
-                    || contextKeyValue.getContextKey().getKeywords().contains(value);
-        }
-
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/ContextScopeContextSearchMatcher.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/ContextScopeContextSearchMatcher.java
deleted file mode 100644
index 0af1291..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/ContextScopeContextSearchMatcher.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.matcher;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.condition.impl.ContextScopeCondition;
-
-public class ContextScopeContextSearchMatcher extends AbstractContextSearchMatcher {
-
-    ContextScope contextScope;
-
-    public ContextScopeContextSearchMatcher(ContextScopeCondition condition) {
-        super(condition);
-        this.contextScope = condition.getContextScop();
-    }
-
-    @Override
-    public Boolean match(ContextKeyValue contextKeyValue) {
-        return contextScope.equals(contextKeyValue.getContextKey().getContextScope());
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/ContextSearchMatcher.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/ContextSearchMatcher.java
deleted file mode 100644
index a6b1e76..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/ContextSearchMatcher.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.matcher;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-
-public interface ContextSearchMatcher {
-
-    Boolean match(ContextKeyValue contextKeyValue);
-
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/ContextTypeContextSearchMatcher.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/ContextTypeContextSearchMatcher.java
deleted file mode 100644
index 03f21c5..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/ContextTypeContextSearchMatcher.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.matcher;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.ContextTypeCondition;
-
-public class ContextTypeContextSearchMatcher extends AbstractContextSearchMatcher{
-
-    ContextType contextType;
-
-    public ContextTypeContextSearchMatcher(ContextTypeCondition condition) {
-        super(condition);
-        contextType = condition.getContextType();
-    }
-
-    @Override
-    public Boolean match(ContextKeyValue contextKeyValue) {
-        return contextType.equals(contextKeyValue.getContextKey().getContextType());
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/ContextValueTypeContextSearchMatcher.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/ContextValueTypeContextSearchMatcher.java
deleted file mode 100644
index 0713f59..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/ContextValueTypeContextSearchMatcher.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.matcher;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.condition.impl.ContextTypeCondition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.ContextValueTypeCondition;
-import org.reflections.ReflectionUtils;
-
-public class ContextValueTypeContextSearchMatcher extends AbstractContextSearchMatcher{
-
-    Class contextValueType;
-
-    public ContextValueTypeContextSearchMatcher(ContextValueTypeCondition condition) {
-        super(condition);
-        contextValueType = condition.getContextValueType();
-    }
-
-    @Override
-    public Boolean match(ContextKeyValue contextKeyValue) {
-        return contextValueType.isInstance(contextKeyValue.getContextValue().getValue());
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/NearestLogicContextSearchMatcher.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/NearestLogicContextSearchMatcher.java
deleted file mode 100644
index 095ed12..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/NearestLogicContextSearchMatcher.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.matcher;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.condition.impl.NearestCondition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.NotCondition;
-
-public class NearestLogicContextSearchMatcher extends UnaryLogicContextSearchMatcher{
-
-    public NearestLogicContextSearchMatcher(NearestCondition condition) {
-        super(condition);
-    }
-
-    @Override
-    public Boolean match(ContextKeyValue contextKeyValue) {
-        return originalMatcher.match(contextKeyValue);
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/NotLogicContextSearchMatcher.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/NotLogicContextSearchMatcher.java
deleted file mode 100644
index 87ac134..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/NotLogicContextSearchMatcher.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.matcher;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.condition.BinaryLogicCondition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.NotCondition;
-
-public class NotLogicContextSearchMatcher extends UnaryLogicContextSearchMatcher{
-
-    public NotLogicContextSearchMatcher(NotCondition condition) {
-        super(condition);
-    }
-
-    @Override
-    public Boolean match(ContextKeyValue contextKeyValue) {
-        return !originalMatcher.match(contextKeyValue);
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/OrLogicContextSearchMatcher.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/OrLogicContextSearchMatcher.java
deleted file mode 100644
index 3c05931..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/OrLogicContextSearchMatcher.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.matcher;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.condition.BinaryLogicCondition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.OrCondition;
-
-public class OrLogicContextSearchMatcher extends BinaryLogicContextSearchMatcher{
-
-    public OrLogicContextSearchMatcher(OrCondition condition) {
-        super(condition);
-    }
-
-    @Override
-    public Boolean match(ContextKeyValue contextKeyValue) {
-        return leftMatcher.match(contextKeyValue)
-                || rightMatcher.match(contextKeyValue);
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/RegexContextSearchMatcher.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/RegexContextSearchMatcher.java
deleted file mode 100644
index 0f27d7b..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/RegexContextSearchMatcher.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.matcher;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.RegexCondition;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class RegexContextSearchMatcher extends AbstractContextSearchMatcher{
-
-    Pattern pattern;
-
-    public RegexContextSearchMatcher(RegexCondition condition) {
-        super(condition);
-        pattern = Pattern.compile(condition.getRegex());
-    }
-
-    @Override
-    public Boolean match(ContextKeyValue contextKeyValue) {
-        Matcher keyMatcher = pattern.matcher(contextKeyValue.getContextKey().getKey());
-        if(contextKeyValue.getContextKey().getKeywords() == null){
-            return keyMatcher.find();
-        } else {
-            Matcher keywordsMatcher = pattern.matcher(contextKeyValue.getContextKey().getKeywords());
-            return keyMatcher.find() || keywordsMatcher.find();
-        }
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/SkipContextSearchMather.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/SkipContextSearchMather.java
deleted file mode 100644
index d9eb9f0..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/SkipContextSearchMather.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.matcher;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-
-public class SkipContextSearchMather extends AbstractContextSearchMatcher{
-
-    public SkipContextSearchMather(Condition condition) {
-        super(condition);
-    }
-
-    @Override
-    public Boolean match(ContextKeyValue contextKeyValue) {
-        return true;
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/UnaryLogicContextSearchMatcher.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/UnaryLogicContextSearchMatcher.java
deleted file mode 100644
index 9ddf5a7..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/matcher/UnaryLogicContextSearchMatcher.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.matcher;
-
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.UnaryLogicCondition;
-
-public abstract class UnaryLogicContextSearchMatcher extends AbstractContextSearchMatcher{
-
-    ContextSearchMatcher originalMatcher;
-
-    public UnaryLogicContextSearchMatcher(UnaryLogicCondition condition) {
-        super(condition);
-        originalMatcher = ConditionMatcherResolver.getMatcher(condition.getOrigin());
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/ruler/AbstractContextSearchRuler.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/ruler/AbstractContextSearchRuler.java
deleted file mode 100644
index f67ceb2..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/ruler/AbstractContextSearchRuler.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.ruler;
-
-import com.webank.wedatasphere.linkis.cs.execution.matcher.ContextSearchMatcher;
-
-public abstract class AbstractContextSearchRuler implements ContextSearchRuler{
-
-    ContextSearchMatcher matcher;
-
-    public AbstractContextSearchRuler(ContextSearchMatcher matcher) {
-        this.matcher = matcher;
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/ruler/CommonListContextSearchRuler.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/ruler/CommonListContextSearchRuler.java
deleted file mode 100644
index b5c7e66..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/ruler/CommonListContextSearchRuler.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.ruler;
-
-import com.google.common.collect.Lists;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.execution.matcher.ContextSearchMatcher;
-import org.apache.commons.collections.CollectionUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-
-public class CommonListContextSearchRuler extends AbstractContextSearchRuler{
-
-    private static Logger logger = LoggerFactory.getLogger(CommonListContextSearchRuler.class);
-
-    public CommonListContextSearchRuler(ContextSearchMatcher matcher) {
-        super(matcher);
-    }
-
-    @Override
-    public List<ContextKeyValue> rule(List<ContextKeyValue> contextKeyValues) {
-        List<ContextKeyValue> filtered = Lists.newArrayList();
-        if(CollectionUtils.isEmpty(contextKeyValues)){
-            logger.warn("Empty result fetched from cache.");
-            return filtered;
-        }
-        int size = contextKeyValues.size();
-        for(int i=0;i<size;i++){
-            ContextKeyValue contextKeyValue = contextKeyValues.get(i);
-            if(matcher.match(contextKeyValue)){
-                filtered.add(contextKeyValue);
-            }
-        }
-        return filtered;
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/ruler/ContextSearchRuler.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/ruler/ContextSearchRuler.java
deleted file mode 100644
index 614a30a..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/ruler/ContextSearchRuler.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.ruler;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-
-import java.util.List;
-
-public interface ContextSearchRuler {
-
-    List<ContextKeyValue> rule(List<ContextKeyValue> contextKeyValues);
-
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/ruler/NearestContextSearchRuler.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/ruler/NearestContextSearchRuler.java
deleted file mode 100644
index 4bd46d9..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/execution/ruler/NearestContextSearchRuler.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.execution.ruler;
-
-import com.google.common.collect.Lists;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.object.CSFlowInfos;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.CommonContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.utils.CSCommonUtils;
-import com.webank.wedatasphere.linkis.cs.condition.impl.NearestCondition;
-import com.webank.wedatasphere.linkis.cs.contextcache.ContextCacheService;
-import com.webank.wedatasphere.linkis.cs.execution.matcher.ContextSearchMatcher;
-import com.webank.wedatasphere.linkis.server.BDPJettyServerHelper;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Comparator;
-import java.util.List;
-import java.util.Map;
-
-public class NearestContextSearchRuler extends AbstractContextSearchRuler{
-
-    private static Logger logger = LoggerFactory.getLogger(NearestContextSearchRuler.class);
-
-    static int LARGE_INT = 100000;
-    static int SMALL_INT = -100000;
-    static String DOT = ".";
-
-    ContextCacheService contextCacheService;
-    ContextID contextID;
-    NearestCondition nearestCondition;
-    CommonListContextSearchRuler commonListContextSearchRuler;
-
-
-    public NearestContextSearchRuler(ContextSearchMatcher matcher, ContextCacheService contextCacheService, ContextID contextID, NearestCondition condition) {
-        super(matcher);
-        this.contextCacheService = contextCacheService;
-        this.contextID = contextID;
-        this.nearestCondition = condition;
-        this.commonListContextSearchRuler = new CommonListContextSearchRuler(matcher);
-    }
-
-    @Override
-    public List<ContextKeyValue> rule(List<ContextKeyValue> contextKeyValues) {
-        contextKeyValues = commonListContextSearchRuler.rule(contextKeyValues);
-        List<ContextKeyValue> filtered = Lists.newArrayList();
-        ContextKey flowInfosKey = new CommonContextKey();
-        flowInfosKey.setContextType(ContextType.OBJECT);
-        flowInfosKey.setKey(CSCommonUtils.FLOW_INFOS);
-        ContextKeyValue flowInfos = contextCacheService.get(contextID, flowInfosKey);
-
-        if(null != flowInfos  && flowInfos.getContextValue().getValue() instanceof CSFlowInfos){
-            CSFlowInfos csFlowInfos = (CSFlowInfos) flowInfos.getContextValue().getValue();
-            logger.info("Calculate nearest nodes based on flow info: \n" + BDPJettyServerHelper.gson().toJson(csFlowInfos));
-            List<Map<String, String>> edges = (List<Map<String, String>>) csFlowInfos.getInfos().get("edges");
-            Map<String, String> idNodeName = (Map<String, String>) csFlowInfos.getInfos().get(CSCommonUtils.ID_NODE_NAME);
-            String[] fullNodeName = StringUtils.split(nearestCondition.getCurrentNode(), DOT);
-            String currentNodeName = fullNodeName[fullNodeName.length - 1];
-            List<ContextKeyValue> notUpstream = Lists.newArrayList();
-
-            contextKeyValues.sort(new Comparator<ContextKeyValue>() {
-                @Override
-                public int compare(ContextKeyValue o1, ContextKeyValue o2) {
-                    return distance(o1) - distance(o2);
-                }
-
-                private int distance(ContextKeyValue contextKeyValue){
-                    String nodeNameToCalc = StringUtils.substringBetween(contextKeyValue.getContextKey().getKey(), CSCommonUtils.NODE_PREFIX, DOT);
-                    if(StringUtils.isBlank(nodeNameToCalc)){
-                        return LARGE_INT;
-                    }
-                    if(nodeNameToCalc.equals(currentNodeName)){
-                        return 0;
-                    }
-                    int upDistance = upstreamDistance(nodeNameToCalc);
-                    if(nearestCondition.getUpstreamOnly()){
-                        if(upDistance >= LARGE_INT){
-                            notUpstream.add(contextKeyValue);
-                        }
-                        return upDistance;
-                    } else {
-                        int downDistance = downstreamDistance(nodeNameToCalc);
-                        return Integer.min(upDistance, downDistance);
-                    }
-                }
-
-                private int upstreamDistance(String nodeNameToCalc){
-                    int minDistance = LARGE_INT;
-                    for(Map<String, String> edge : edges) {
-                        if(getNodeName(edge.get("source")).equals(nodeNameToCalc)){
-                            if(getNodeName(edge.get("target")).equals(currentNodeName)){
-                                return 1;
-                            } else {
-                                minDistance = Integer.min(minDistance,upstreamDistance(getNodeName(edge.get("target"))) + 1);
-                            }
-                        }
-                    }
-                    return minDistance;
-                }
-
-                private int downstreamDistance(String nodeNameToCalc){
-                    int minDistance = LARGE_INT;
-                    for(Map<String, String> edge : edges) {
-                        if(getNodeName(edge.get("target")).equals(nodeNameToCalc)){
-                            if(getNodeName(edge.get("source")).equals(currentNodeName)){
-                                return 1;
-                            } else {
-                                minDistance = downstreamDistance(getNodeName(edge.get("source"))) + 1;
-                            }
-                        }
-                    }
-                    return minDistance;
-                }
-
-                private String getNodeName(String nodeId){
-                    if(StringUtils.isBlank(nodeId) || null == idNodeName){
-                        return "";
-                    }
-                    return idNodeName.get(nodeId);
-                }
-            });
-            if(nearestCondition.getUpstreamOnly()){
-                contextKeyValues.removeAll(notUpstream);
-            }
-            int endIndex = nearestCondition.getNumber() < contextKeyValues.size() ? nearestCondition.getNumber() : contextKeyValues.size();
-            filtered = contextKeyValues.subList(0, endIndex);
-        }
-
-        return filtered;
-    }
-
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/optimize/ConditionOptimizer.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/optimize/ConditionOptimizer.java
deleted file mode 100644
index f594006..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/optimize/ConditionOptimizer.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.optimize;
-
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-
-public interface ConditionOptimizer {
-
-    public OptimizedCondition optimize(Condition condition);
-
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/optimize/OptimizedCondition.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/optimize/OptimizedCondition.java
deleted file mode 100644
index 54f4bf7..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/optimize/OptimizedCondition.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.optimize;
-
-import com.webank.wedatasphere.linkis.cs.condition.BinaryLogicCondition;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.UnaryLogicCondition;
-import com.webank.wedatasphere.linkis.cs.optimize.cost.ConditionCostCalculator;
-import com.webank.wedatasphere.linkis.cs.optimize.dfs.Node;
-
-public class OptimizedCondition implements Node {
-
-    static Double HIGH_PRIORITY = 1d;
-    static Double LOW_PRIORITY = 0.5d;
-
-    Condition condition;
-    Double cost;
-    Double priority;
-    boolean visited = false;
-    OptimizedCondition left;
-    OptimizedCondition right;
-
-    public OptimizedCondition(Condition condition, ConditionCostCalculator conditionCostCalculator) {
-        new OptimizedCondition(condition, HIGH_PRIORITY, conditionCostCalculator);
-    }
-
-    public OptimizedCondition(Condition condition, Double priority, ConditionCostCalculator conditionCostCalculator) {
-        this.condition = condition;
-        this.priority = priority;
-        this.cost = conditionCostCalculator.calculate(condition);
-        if(condition instanceof BinaryLogicCondition){
-            BinaryLogicCondition binaryLogicCondition = (BinaryLogicCondition) condition;
-            this.left = new OptimizedCondition(binaryLogicCondition.getLeft(), HIGH_PRIORITY, conditionCostCalculator);
-            this.right = new OptimizedCondition(binaryLogicCondition.getRight(), LOW_PRIORITY, conditionCostCalculator);
-        } else if(condition instanceof UnaryLogicCondition){
-            this.left = new OptimizedCondition(((UnaryLogicCondition) condition).getOrigin(), conditionCostCalculator);
-        }
-    }
-
-    public Condition getCondition() {
-        return condition;
-    }
-
-    public void setCondition(Condition condition) {
-        this.condition = condition;
-    }
-
-    @Override
-    public Double getCost() {
-        return this.cost;
-    }
-
-    @Override
-    public Double getPriority() {
-        return this.priority;
-    }
-
-    @Override
-    public Node getLeft() {
-        return this.left;
-    }
-
-    @Override
-    public Node getRight() {
-        return this.right;
-    }
-
-    @Override
-    public void shift() {
-        if(condition instanceof BinaryLogicCondition){
-            OptimizedCondition tmp = this.left;
-            this.left = this.right;
-            this.right = tmp;
-            this.right.priority = this.left.priority;
-            this.left.priority = tmp.priority;
-            ((BinaryLogicCondition) condition).shift();
-        }
-    }
-
-    @Override
-    public boolean visited() {
-        return visited;
-    }
-
-    @Override
-    public void visit() {
-        this.visited = true;
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/optimize/cost/ConditionCostCalculator.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/optimize/cost/ConditionCostCalculator.java
deleted file mode 100644
index 8c7f431..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/optimize/cost/ConditionCostCalculator.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.optimize.cost;
-
-import com.google.common.collect.Maps;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.condition.AtomicCondition;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.ContainsCondition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.ContextValueTypeCondition;
-import com.webank.wedatasphere.linkis.cs.condition.impl.RegexCondition;
-
-import java.util.Map;
-
-public class ConditionCostCalculator {
-
-    static Map<Class, Double> initialCost = Maps.newHashMap();
-
-    static{
-        initialCost.put(RegexCondition.class, 100d);
-        initialCost.put(ContainsCondition.class, 10d);
-        initialCost.put(ContextScope.class, 10d);
-        initialCost.put(ContextType.class, 1d);
-        initialCost.put(ContextValueTypeCondition.class, 1d);
-    }
-
-    public Double calculate(Condition condition){
-        if(condition instanceof AtomicCondition){
-            return initialCost.get(condition.getClass());
-        }
-        return 0d;
-    }
-
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/optimize/dfs/BinaryTree.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/optimize/dfs/BinaryTree.java
deleted file mode 100644
index ebae26e..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/optimize/dfs/BinaryTree.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.optimize.dfs;
-
-public interface BinaryTree {
-    BinaryTree getLeft();
-    BinaryTree getRight();
-    Node getRootNode();
-    Double getCost();
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/optimize/dfs/MinCostBinaryTree.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/optimize/dfs/MinCostBinaryTree.java
deleted file mode 100644
index 9d8cea1..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/optimize/dfs/MinCostBinaryTree.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.optimize.dfs;
-
-public class MinCostBinaryTree implements BinaryTree{
-
-    Node rootNode;
-    BinaryTree left;
-    BinaryTree right;
-    Double cost;
-
-    public MinCostBinaryTree(Node rootNode) {
-        this.rootNode = rootNode;
-        if(this.rootNode.visited()){
-            return;
-        }
-        if(rootNode.getLeft() == null){
-            this.cost = rootNode.getCost();
-            return;
-        }
-        if(rootNode.getRight() == null){
-            this.left = new MinCostBinaryTree(rootNode.getLeft());
-            this.cost = this.left.getCost();
-            return;
-        }
-
-        BinaryTree firstLeft = new MinCostBinaryTree(rootNode.getLeft());
-        BinaryTree firstRight = new MinCostBinaryTree(rootNode.getRight());
-        Double firstCost = firstLeft.getCost() * rootNode.getLeft().getPriority() + firstRight.getCost()*rootNode.getRight().getPriority();
-
-        rootNode.shift();
-
-        BinaryTree secondLeft = new MinCostBinaryTree(rootNode.getLeft());
-        BinaryTree secondRight = new MinCostBinaryTree(rootNode.getRight());
-        Double secondCost = secondLeft.getCost() * rootNode.getLeft().getPriority() + secondRight.getCost()*rootNode.getRight().getPriority();
-
-        if(firstCost > secondCost){
-            this.left = secondLeft;
-            this.right = secondRight;
-            this.cost = secondCost;
-        } else {
-            rootNode.shift();
-            this.left = firstLeft;
-            this.right = secondRight;
-            this.cost = firstCost;
-        }
-        this.rootNode.visit();
-    }
-
-    @Override
-    public BinaryTree getLeft() {
-        return this.left;
-    }
-
-    @Override
-    public BinaryTree getRight() {
-        return this.right;
-    }
-
-    @Override
-    public Node getRootNode() {
-        return this.rootNode;
-    }
-
-    @Override
-    public Double getCost() {
-        return this.cost;
-    }
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/optimize/dfs/Node.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/optimize/dfs/Node.java
deleted file mode 100644
index 85fb8ff..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/optimize/dfs/Node.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.optimize.dfs;
-
-public interface Node {
-    Double getCost();
-    Double getPriority();
-    Node getLeft();
-    Node getRight();
-    void shift();
-    boolean visited();
-    void visit();
-}
diff --git a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/optimize/impl/CostBasedConditionOptimizer.java b/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/optimize/impl/CostBasedConditionOptimizer.java
deleted file mode 100644
index ba8fb4a..0000000
--- a/contextservice/cs-search/src/main/java/com/webank/wedatasphere/linkis/cs/optimize/impl/CostBasedConditionOptimizer.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.optimize.impl;
-
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.optimize.ConditionOptimizer;
-import com.webank.wedatasphere.linkis.cs.optimize.OptimizedCondition;
-import com.webank.wedatasphere.linkis.cs.optimize.cost.ConditionCostCalculator;
-import com.webank.wedatasphere.linkis.cs.optimize.dfs.MinCostBinaryTree;
-
-public class CostBasedConditionOptimizer implements ConditionOptimizer {
-
-    ConditionCostCalculator conditionCostCalculator;
-
-    public CostBasedConditionOptimizer(ConditionCostCalculator conditionCostCalculator) {
-        this.conditionCostCalculator = conditionCostCalculator;
-    }
-
-    @Override
-    public OptimizedCondition optimize(Condition condition) {
-        OptimizedCondition dfsTreeNode = new OptimizedCondition(condition, conditionCostCalculator);
-        MinCostBinaryTree minCostBinaryTree = new MinCostBinaryTree(dfsTreeNode);
-        return dfsTreeNode;
-    }
-
-}
diff --git a/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/AndTest.java b/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/AndTest.java
deleted file mode 100644
index 8611ad0..0000000
--- a/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/AndTest.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs;
-
-public class AndTest {
-}
diff --git a/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/ContainsTest.java b/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/ContainsTest.java
deleted file mode 100644
index 98cebf4..0000000
--- a/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/ContainsTest.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs;
-
-import com.google.common.collect.Lists;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.construction.ConditionBuilder;
-import com.webank.wedatasphere.linkis.cs.contextcache.ContextCacheService;
-import com.webank.wedatasphere.linkis.cs.csid.TestContextID;
-import com.webank.wedatasphere.linkis.cs.exception.ContextSearchFailedException;
-import com.webank.wedatasphere.linkis.cs.keyword.TestContextKey;
-import com.webank.wedatasphere.linkis.cs.keyword.TestContextKeyValue;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-import java.util.List;
-
-public class ContainsTest {
-    List<ContextKeyValue> contextKeyValues = Lists.newArrayList();
-
-    @Before
-    public void setUp() throws Exception {
-
-        ContextID contextID = new TestContextID();
-        contextID.setContextId("id");
-        ContextKey contextKey1 = new TestContextKey();
-        contextKey1.setKey("abc345efgabcab");
-        contextKey1.setContextType(ContextType.DATA);
-        contextKey1.setContextScope(ContextScope.PRIVATE);
-        contextKey1.setKeywords("keyword1,keyword2,keyword3");
-        ContextKeyValue contextKeyValue1 = new TestContextKeyValue();
-        contextKeyValue1.setContextKey(contextKey1);
-        contextKeyValue1.setContextValue(null);
-        contextKeyValues.add(contextKeyValue1);
-
-        ContextID contextID2 = new TestContextID();
-        contextID2.setContextId("id");
-        ContextKey contextKey2 = new TestContextKey();
-        contextKey2.setKey("2342342342342");
-        contextKey2.setContextType(ContextType.METADATA);
-        contextKey2.setContextScope(ContextScope.PROTECTED);
-        contextKey2.setKeywords("keyword1,keyword2,keyword3");
-        ContextKeyValue contextKeyValue2 = new TestContextKeyValue();
-        contextKeyValue2.setContextKey(contextKey2);
-        contextKeyValue2.setContextValue(null);
-        contextKeyValues.add(contextKeyValue2);
-
-        ContextID contextID3 = new TestContextID();
-        contextID3.setContextId("id");
-        ContextKey contextKey3 = new TestContextKey();
-        contextKey3.setKey("34646456e");
-        contextKey3.setContextType(ContextType.COST);
-        contextKey3.setContextScope(ContextScope.PROTECTED);
-        contextKey3.setKeywords("keyword1,keyword2,keyword3");
-        ContextKeyValue contextKeyValue3 = new TestContextKeyValue();
-        contextKeyValue3.setContextKey(contextKey3);
-        contextKeyValue3.setContextValue(null);
-        contextKeyValues.add(contextKeyValue3);
-    }
-
-    @Test
-    public void testSearch() throws ContextSearchFailedException {
-
-        ContextSearch contextSearch = new DefaultContextSearch();
-        ContextCacheService contextCacheService = Mockito.mock(ContextCacheService.class);
-        Mockito.when(contextCacheService.getAll(Mockito.any(ContextID.class))).thenReturn(contextKeyValues);
-
-        ConditionBuilder conditionBuilder = ConditionBuilder.newBuilder();
-        conditionBuilder.contains("abc");
-        Condition condition = conditionBuilder.build();
-
-        ContextID contextID = new TestContextID();
-        contextID.setContextId("id");
-        List<ContextKeyValue> list = contextSearch.search(contextCacheService, contextID, condition);
-        Assert.assertEquals(1, list.size());
-    }
-
-    @Test
-    public void testSearchNegate() throws ContextSearchFailedException {
-
-        ContextSearch contextSearch = new DefaultContextSearch();
-        ContextCacheService contextCacheService = Mockito.mock(ContextCacheService.class);
-        Mockito.when(contextCacheService.getAll(Mockito.any(ContextID.class))).thenReturn(contextKeyValues);
-
-        ConditionBuilder conditionBuilder = ConditionBuilder.newBuilder();
-        conditionBuilder.contains("abc");
-        Condition condition = conditionBuilder.build().not();
-
-        ContextID contextID = new TestContextID();
-        contextID.setContextId("id");
-        List<ContextKeyValue> list = contextSearch.search(contextCacheService, contextID, condition);
-        Assert.assertEquals(2, list.size());
-    }
-}
diff --git a/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/ContextScopeTest.java b/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/ContextScopeTest.java
deleted file mode 100644
index d8c4f9c..0000000
--- a/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/ContextScopeTest.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs;
-
-import com.google.common.collect.Lists;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.construction.ConditionBuilder;
-import com.webank.wedatasphere.linkis.cs.contextcache.ContextCacheService;
-import com.webank.wedatasphere.linkis.cs.csid.TestContextID;
-import com.webank.wedatasphere.linkis.cs.exception.ContextSearchFailedException;
-import com.webank.wedatasphere.linkis.cs.keyword.TestContextKey;
-import com.webank.wedatasphere.linkis.cs.keyword.TestContextKeyValue;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-import java.util.List;
-
-public class ContextScopeTest {
-
-    List<ContextKeyValue> contextKeyValues = Lists.newArrayList();
-
-    @Before
-    public void setUp() throws Exception {
-
-        ContextID contextID = new TestContextID();
-        contextID.setContextId("id");
-        ContextKey contextKey1 = new TestContextKey();
-        contextKey1.setKey("key1");
-        contextKey1.setContextType(ContextType.DATA);
-        contextKey1.setContextScope(ContextScope.PRIVATE);
-        contextKey1.setKeywords("keyword1,keyword2,keyword3");
-        ContextKeyValue contextKeyValue1 = new TestContextKeyValue();
-        contextKeyValue1.setContextKey(contextKey1);
-        contextKeyValue1.setContextValue(null);
-        contextKeyValues.add(contextKeyValue1);
-
-        ContextID contextID2 = new TestContextID();
-        contextID2.setContextId("id");
-        ContextKey contextKey2 = new TestContextKey();
-        contextKey2.setKey("key2");
-        contextKey2.setContextType(ContextType.METADATA);
-        contextKey2.setContextScope(ContextScope.PROTECTED);
-        contextKey2.setKeywords("keyword1,keyword2,keyword3");
-        ContextKeyValue contextKeyValue2 = new TestContextKeyValue();
-        contextKeyValue2.setContextKey(contextKey2);
-        contextKeyValue2.setContextValue(null);
-        contextKeyValues.add(contextKeyValue2);
-
-        ContextID contextID3 = new TestContextID();
-        contextID3.setContextId("id");
-        ContextKey contextKey3 = new TestContextKey();
-        contextKey3.setKey("key3");
-        contextKey3.setContextType(ContextType.COST);
-        contextKey3.setContextScope(ContextScope.PROTECTED);
-        contextKey3.setKeywords("keyword1,keyword2,keyword3");
-        ContextKeyValue contextKeyValue3 = new TestContextKeyValue();
-        contextKeyValue3.setContextKey(contextKey3);
-        contextKeyValue3.setContextValue(null);
-        contextKeyValues.add(contextKeyValue3);
-    }
-
-    @Test
-    public void testSearch() throws ContextSearchFailedException {
-
-        ContextSearch contextSearch = new DefaultContextSearch();
-        ContextCacheService contextCacheService = Mockito.mock(ContextCacheService.class);
-        Mockito.when(contextCacheService.getAll(Mockito.any(ContextID.class))).thenReturn(contextKeyValues);
-
-        ConditionBuilder conditionBuilder = ConditionBuilder.newBuilder();
-        conditionBuilder
-                .contextScopes(Lists.newArrayList(ContextScope.PROTECTED));
-        Condition condition = conditionBuilder.build();
-
-        ContextID contextID = new TestContextID();
-        contextID.setContextId("id");
-        List<ContextKeyValue> list = contextSearch.search(contextCacheService, contextID, condition);
-        Assert.assertEquals(2, list.size());
-    }
-
-    @Test
-    public void testSearchNegate() throws ContextSearchFailedException {
-
-        ContextSearch contextSearch = new DefaultContextSearch();
-        ContextCacheService contextCacheService = Mockito.mock(ContextCacheService.class);
-        Mockito.when(contextCacheService.getAll(Mockito.any(ContextID.class))).thenReturn(contextKeyValues);
-
-        ConditionBuilder conditionBuilder = ConditionBuilder.newBuilder();
-        conditionBuilder
-                .contextScopes(Lists.newArrayList(ContextScope.PROTECTED));
-        Condition condition = conditionBuilder.build().not();
-
-        ContextID contextID = new TestContextID();
-        contextID.setContextId("id");
-        List<ContextKeyValue> list = contextSearch.search(contextCacheService, contextID, condition);
-        Assert.assertEquals(1, list.size());
-    }
-}
diff --git a/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/ContextSearchTest.java b/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/ContextSearchTest.java
deleted file mode 100644
index 334b3c2..0000000
--- a/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/ContextSearchTest.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs;
-
-import com.google.common.collect.Lists;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.construction.ConditionBuilder;
-import com.webank.wedatasphere.linkis.cs.contextcache.ContextCacheService;
-import com.webank.wedatasphere.linkis.cs.csid.TestContextID;
-import com.webank.wedatasphere.linkis.cs.exception.ContextSearchFailedException;
-import com.webank.wedatasphere.linkis.cs.keyword.TestContextKey;
-import com.webank.wedatasphere.linkis.cs.keyword.TestContextKeyValue;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-import java.util.List;
-
-public class ContextSearchTest {
-
-    List<ContextKeyValue> contextKeyValues = Lists.newArrayList();
-
-    @Before
-    public void setUp() throws Exception {
-
-        ContextID contextID = new TestContextID();
-        contextID.setContextId("id");
-        ContextKey contextKey1 = new TestContextKey();
-        contextKey1.setKey("key1");
-        contextKey1.setContextType(ContextType.DATA);
-        contextKey1.setContextScope(ContextScope.PRIVATE);
-        contextKey1.setKeywords("keyword1,keyword2,keyword3");
-        ContextKeyValue contextKeyValue1 = new TestContextKeyValue();
-        contextKeyValue1.setContextKey(contextKey1);
-        contextKeyValue1.setContextValue(null);
-        contextKeyValues.add(contextKeyValue1);
-
-        ContextID contextID2 = new TestContextID();
-        contextID2.setContextId("id");
-        ContextKey contextKey2 = new TestContextKey();
-        contextKey2.setKey("key2");
-        contextKey2.setContextType(ContextType.METADATA);
-        contextKey2.setContextScope(ContextScope.PROTECTED);
-        contextKey2.setKeywords("keyword1,keyword2,keyword3");
-        ContextKeyValue contextKeyValue2 = new TestContextKeyValue();
-        contextKeyValue2.setContextKey(contextKey2);
-        contextKeyValue2.setContextValue(null);
-        contextKeyValues.add(contextKeyValue2);
-    }
-
-    @Test
-    public void testSearch() throws ContextSearchFailedException {
-
-        ContextSearch contextSearch = new DefaultContextSearch();
-        ContextCacheService contextCacheService = Mockito.mock(ContextCacheService.class);
-        Mockito.when(contextCacheService.getAll(Mockito.any(ContextID.class))).thenReturn(contextKeyValues);
-
-        ConditionBuilder conditionBuilder = ConditionBuilder.newBuilder();
-        conditionBuilder
-                .contextScopes(Lists.newArrayList(ContextScope.PRIVATE))
-                .contains("key");
-        Condition condition = conditionBuilder.build();
-
-        ContextID contextID = new TestContextID();
-        contextID.setContextId("id");
-        List<ContextKeyValue> list = contextSearch.search(contextCacheService, contextID, condition);
-        Assert.assertEquals(1, list.size());
-    }
-}
diff --git a/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/ContextTypeTest.java b/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/ContextTypeTest.java
deleted file mode 100644
index de1d2e3..0000000
--- a/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/ContextTypeTest.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs;
-
-import com.google.common.collect.Lists;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.construction.ConditionBuilder;
-import com.webank.wedatasphere.linkis.cs.contextcache.ContextCacheService;
-import com.webank.wedatasphere.linkis.cs.csid.TestContextID;
-import com.webank.wedatasphere.linkis.cs.exception.ContextSearchFailedException;
-import com.webank.wedatasphere.linkis.cs.keyword.TestContextKey;
-import com.webank.wedatasphere.linkis.cs.keyword.TestContextKeyValue;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-import java.util.List;
-
-public class ContextTypeTest {
-
-    List<ContextKeyValue> contextKeyValues = Lists.newArrayList();
-
-    @Before
-    public void setUp() throws Exception {
-
-        ContextID contextID = new TestContextID();
-        contextID.setContextId("id");
-        ContextKey contextKey1 = new TestContextKey();
-        contextKey1.setKey("key1");
-        contextKey1.setContextType(ContextType.DATA);
-        contextKey1.setContextScope(ContextScope.PRIVATE);
-        contextKey1.setKeywords("keyword1,keyword2,keyword3");
-        ContextKeyValue contextKeyValue1 = new TestContextKeyValue();
-        contextKeyValue1.setContextKey(contextKey1);
-        contextKeyValue1.setContextValue(null);
-        contextKeyValues.add(contextKeyValue1);
-
-        ContextID contextID2 = new TestContextID();
-        contextID2.setContextId("id");
-        ContextKey contextKey2 = new TestContextKey();
-        contextKey2.setKey("key2");
-        contextKey2.setContextType(ContextType.METADATA);
-        contextKey2.setContextScope(ContextScope.PROTECTED);
-        contextKey2.setKeywords("keyword1,keyword2,keyword3");
-        ContextKeyValue contextKeyValue2 = new TestContextKeyValue();
-        contextKeyValue2.setContextKey(contextKey2);
-        contextKeyValue2.setContextValue(null);
-        //contextKeyValues.add(contextKeyValue2);
-    }
-
-    @Test
-    public void testSearch() throws ContextSearchFailedException {
-
-        ContextSearch contextSearch = new DefaultContextSearch();
-        ContextCacheService contextCacheService = Mockito.mock(ContextCacheService.class);
-        Mockito.when(contextCacheService.getAllByType(Mockito.any(ContextID.class), Mockito.any(ContextType.class))).thenReturn(contextKeyValues);
-
-        ConditionBuilder conditionBuilder = ConditionBuilder.newBuilder();
-        conditionBuilder.contextTypes(Lists.newArrayList(ContextType.DATA));
-        Condition condition = conditionBuilder.build();
-
-        ContextID contextID = new TestContextID();
-        contextID.setContextId("id");
-        List<ContextKeyValue> list = contextSearch.search(contextCacheService, contextID, condition);
-        Assert.assertEquals(1, list.size());
-    }
-}
diff --git a/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/RegexTest.java b/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/RegexTest.java
deleted file mode 100644
index 64aea84..0000000
--- a/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/RegexTest.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs;
-
-import com.google.common.collect.Lists;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.construction.ConditionBuilder;
-import com.webank.wedatasphere.linkis.cs.contextcache.ContextCacheService;
-import com.webank.wedatasphere.linkis.cs.csid.TestContextID;
-import com.webank.wedatasphere.linkis.cs.exception.ContextSearchFailedException;
-import com.webank.wedatasphere.linkis.cs.keyword.TestContextKey;
-import com.webank.wedatasphere.linkis.cs.keyword.TestContextKeyValue;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-import java.util.List;
-
-public class RegexTest {
-
-    List<ContextKeyValue> contextKeyValues = Lists.newArrayList();
-
-    @Before
-    public void setUp() throws Exception {
-
-        ContextID contextID = new TestContextID();
-        contextID.setContextId("id");
-        ContextKey contextKey1 = new TestContextKey();
-        contextKey1.setKey("abc345efgabcab");
-        contextKey1.setContextType(ContextType.DATA);
-        contextKey1.setContextScope(ContextScope.PRIVATE);
-        contextKey1.setKeywords("keyword1,keyword2,keyword3");
-        ContextKeyValue contextKeyValue1 = new TestContextKeyValue();
-        contextKeyValue1.setContextKey(contextKey1);
-        contextKeyValue1.setContextValue(null);
-        contextKeyValues.add(contextKeyValue1);
-
-        ContextID contextID2 = new TestContextID();
-        contextID2.setContextId("id");
-        ContextKey contextKey2 = new TestContextKey();
-        contextKey2.setKey("2342342342342");
-        contextKey2.setContextType(ContextType.METADATA);
-        contextKey2.setContextScope(ContextScope.PROTECTED);
-        contextKey2.setKeywords("keyword1,keyword2,keyword3");
-        ContextKeyValue contextKeyValue2 = new TestContextKeyValue();
-        contextKeyValue2.setContextKey(contextKey2);
-        contextKeyValue2.setContextValue(null);
-        contextKeyValues.add(contextKeyValue2);
-
-        ContextID contextID3 = new TestContextID();
-        contextID3.setContextId("id");
-        ContextKey contextKey3 = new TestContextKey();
-        contextKey3.setKey("34646456e");
-        contextKey3.setContextType(ContextType.COST);
-        contextKey3.setContextScope(ContextScope.PROTECTED);
-        contextKey3.setKeywords("keyword1,keyword2,keyword3");
-        ContextKeyValue contextKeyValue3 = new TestContextKeyValue();
-        contextKeyValue3.setContextKey(contextKey3);
-        contextKeyValue3.setContextValue(null);
-        contextKeyValues.add(contextKeyValue3);
-    }
-
-    @Test
-    public void testSearch() throws ContextSearchFailedException {
-
-        ContextSearch contextSearch = new DefaultContextSearch();
-        ContextCacheService contextCacheService = Mockito.mock(ContextCacheService.class);
-        Mockito.when(contextCacheService.getAll(Mockito.any(ContextID.class))).thenReturn(contextKeyValues);
-
-        ConditionBuilder conditionBuilder = ConditionBuilder.newBuilder();
-        conditionBuilder.regex("[abc]");
-        Condition condition = conditionBuilder.build();
-
-        ContextID contextID = new TestContextID();
-        contextID.setContextId("id");
-        List<ContextKeyValue> list = contextSearch.search(contextCacheService, contextID, condition);
-        Assert.assertEquals(1, list.size());
-    }
-
-    @Test
-    public void testSearchNegate() throws ContextSearchFailedException {
-
-        ContextSearch contextSearch = new DefaultContextSearch();
-        ContextCacheService contextCacheService = Mockito.mock(ContextCacheService.class);
-        Mockito.when(contextCacheService.getAll(Mockito.any(ContextID.class))).thenReturn(contextKeyValues);
-
-        ConditionBuilder conditionBuilder = ConditionBuilder.newBuilder();
-        conditionBuilder.regex("[abc]");
-        Condition condition = conditionBuilder.build().not();
-
-        ContextID contextID = new TestContextID();
-        contextID.setContextId("id");
-        List<ContextKeyValue> list = contextSearch.search(contextCacheService, contextID, condition);
-        Assert.assertEquals(2, list.size());
-    }
-}
diff --git a/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/csid/TestContextID.java b/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/csid/TestContextID.java
deleted file mode 100644
index 0fbdb6b..0000000
--- a/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/csid/TestContextID.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.csid;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-
-/**
- * @author peacewong
- * @date 2020/2/13 20:41
- */
-public class TestContextID implements ContextID {
-
-    String contextID;
-
-    @Override
-    public String getContextId() {
-        return contextID;
-    }
-
-    @Override
-    public void setContextId(String contextId) {
-        this.contextID = contextId;
-    }
-}
diff --git a/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/keyword/TestContextKey.java b/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/keyword/TestContextKey.java
deleted file mode 100644
index 74bd9c6..0000000
--- a/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/keyword/TestContextKey.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.keyword;
-
-import com.webank.wedatasphere.linkis.cs.common.annotation.KeywordMethod;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextScope;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-
-/**
- * @author peacewong
- * @date 2020/2/13 16:32
- */
-public class TestContextKey implements ContextKey {
-
-    private  String key;
-
-    private String keywords;
-
-    private ContextScope contextScope;
-
-    private ContextType contextType;
-
-    @KeywordMethod
-    @Override
-    public String getKey() {
-        return this.key;
-    }
-
-    @Override
-    public void setKey(String key) {
-        this.key = key;
-    }
-
-    @Override
-    public ContextType getContextType() {
-        return contextType;
-    }
-
-    @Override
-    public void setContextType(ContextType contextType) {
-        this.contextType = contextType;
-    }
-
-    @Override
-    public ContextScope getContextScope() {
-        return contextScope;
-    }
-
-    @Override
-    public void setContextScope(ContextScope contextScope) {
-        this.contextScope = contextScope;
-    }
-
-    @KeywordMethod(splitter = ",")
-    @Override
-    public String getKeywords() {
-        return this.keywords;
-    }
-
-    @Override
-    public void setKeywords(String keywords) {
-        this.keywords = keywords;
-    }
-
-
-    @Override
-    public int getType() {
-        return 0;
-    }
-
-    @Override
-    public void setType(int type) {
-
-    }
-}
diff --git a/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/keyword/TestContextKeyValue.java b/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/keyword/TestContextKeyValue.java
deleted file mode 100644
index 79d8a67..0000000
--- a/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/keyword/TestContextKeyValue.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.keyword;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextValue;
-
-/**
- * @author peacewong
- * @date 2020/2/13 16:46
- */
-public class TestContextKeyValue  implements ContextKeyValue {
-
-    private ContextKey contextKey;
-
-    private ContextValue contextValue;
-
-    @Override
-    public ContextKey getContextKey() {
-        return this.contextKey;
-    }
-
-    @Override
-    public void setContextKey(ContextKey contextKey) {
-        this.contextKey = contextKey;
-    }
-
-    @Override
-    public ContextValue getContextValue() {
-        return this.contextValue;
-    }
-
-    @Override
-    public void setContextValue(ContextValue contextValue) {
-        this.contextValue = contextValue;
-    }
-}
diff --git a/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/keyword/TestContextValue.java b/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/keyword/TestContextValue.java
deleted file mode 100644
index 0a34ed4..0000000
--- a/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/keyword/TestContextValue.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.keyword;
-
-import com.webank.wedatasphere.linkis.cs.common.annotation.KeywordMethod;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextValue;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ValueBean;
-
-/**
- * @author peacewong
- * @date 2020/2/13 16:44
- */
-public class TestContextValue  implements ContextValue {
-
-    private  Object value;
-
-    private String keywords;
-
-    @KeywordMethod(splitter = "-")
-    @Override
-    public String getKeywords() {
-        return this.keywords;
-    }
-
-    @Override
-    public void setKeywords(String keywords) {
-        this.keywords = keywords;
-    }
-
-    @KeywordMethod(regex = "hello")
-    @Override
-    public Object getValue() {
-        return this.value;
-    }
-
-    @Override
-    public void setValue(Object value) {
-        this.value = value;
-    }
-}
diff --git a/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/parser/ApiJsonTest.java b/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/parser/ApiJsonTest.java
deleted file mode 100644
index 7f3928b..0000000
--- a/contextservice/cs-search/src/test/java/com/webank/wedatasphere/linkis/cs/parser/ApiJsonTest.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.parser;
-
-import com.google.common.collect.Sets;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.condition.ConditionType;
-import com.webank.wedatasphere.linkis.cs.condition.construction.ConditionParser;
-import com.webank.wedatasphere.linkis.server.BDPJettyServerHelper;
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.type.TypeReference;
-import org.junit.Assert;
-import org.junit.Test;
-
-import java.io.IOException;
-import java.util.Map;
-import java.util.Set;
-
-public class ApiJsonTest {
-
-    @Test
-    public void test() throws IOException {
-        String apiString = "{\n" +
-                "\t\"type\":\"And\",\n" +
-                "\t\"left\":{\n" +
-                "\t\t\"type\":\"ContextType\",\n" +
-                "\t\t\"contextType\":\"DATA\"\n" +
-                "\t},\n" +
-                "\t\"right\":{\n" +
-                "\t\t\"type\":\"And\",\n" +
-                "\t\t\"left\":{\n" +
-                "\t\t\t\"type\":\"ContextScope\",\n" +
-                "\t\t\t\"contextScope\":\"PRIVATE\"\n" +
-                "\t\t},\n" +
-                "\t\t\"right\":{\n" +
-                "\t\t\t\"type\":\"Regex\",\n" +
-                "\t\t\t\"regex\":\"[abc]]\"\n" +
-                "\t\t}\n" +
-                "\t}\n" +
-                "}";
-
-        ObjectMapper objectMapper = new ObjectMapper();
-        JsonNode jsonNode = objectMapper.readTree(apiString);
-        Map<Object, Object> conditionMap = objectMapper.convertValue(jsonNode, new TypeReference<Map<Object, Object>>(){});
-        ConditionParser conditionParser = ConditionParser.parserMap.get(conditionMap.get("type"));
-        Condition condition = conditionParser.parse(conditionMap);
-        Assert.assertEquals(condition.getConditionType(), ConditionType.Logic);
-
-    }
-
-    @Test
-    public void temp() {
-        String test = "{\"cols\":[{\"name\":\"birthday\",\"visualType\":\"string\",\"type\":\"category\",\"config\":true,\"field\":{\"alias\":\"\",\"desc\":\"\",\"useExpression\":false},\"format\":{\"formatType\":\"default\"},\"from\":\"cols\"},{\"name\":\"name\",\"visualType\":\"string\",\"type\":\"category\",\"config\":true,\"field\":{\"alias\":\"\",\"desc\":\"\",\"useExpression\":false},\"format\":{\"formatType\":\"default\"},\"from\":\"cols\"}],\"rows\":[],\"metrics\":[{\"name\":\"score@Visualis@6F01974E\",\"visualType\":\"number\",\"type\":\"value\",\"agg\":\"sum\",\"config\":true,\"chart\":{\"id\":1,\"name\":\"table\",\"title\":\"表格\",\"icon\":\"icon-table\",\"coordinate\":\"other\",\"rules\":[{\"dimension\":[0,9999],\"metric\":[0,9999]}],\"data\":{\"cols\":{\"title\":\"列\",\"type\":\"category\"},\"rows\":{\"title\":\"行\",\"type\":\"category\"},\"metrics\":{\"title\":\"指标\",\"type\":\"value\"},\"filters\":{\"title\":\"筛选\",\"type\":\"all\"}},\"style\":{\"table\":{\"fontFamily\":\"PingFang SC\",\"fontSize\":\"12\",\"color\":\"#666\",\"lineStyle\":\"solid\",\"lineColor\":\"#D9D9D9\",\"headerBackgroundColor\":\"#f7f7f7\",\"headerConfig\":[],\"columnsConfig\":[],\"leftFixedColumns\":[],\"rightFixedColumns\":[],\"headerFixed\":true,\"autoMergeCell\":false,\"bordered\":true,\"size\":\"default\",\"withPaging\":true,\"pageSize\":\"20\",\"withNoAggregators\":false},\"spec\":{}}},\"field\":{\"alias\":\"\",\"desc\":\"\",\"useExpression\":false},\"format\":{\"formatType\":\"default\"},\"from\":\"metrics\"}],\"filters\":[],\"color\":{\"title\":\"颜色\",\"type\":\"category\",\"value\":{\"all\":\"#509af2\"},\"items\":[]},\"chartStyles\":{\"richText\":{\"content\":\"<p>〖@dv_name_dv@〗</p><p><strong style=\\\"color: rgb(230, 0, 0);\\\">〖@dv_birthday_dv@〗</strong></p>\"},\"spec\":{}},\"selectedChart\":15,\"data\":[],\"pagination\":{\"pageNo\":0,\"pageSize\":0,\"withPaging\":false,\"totalCount\":0},\"dimetionAxis\":\"col\",\"renderType\":\"rerender\",\"orders\":[],\"mode\":\"chart\",\"model\":{\"birthday\":{\"sqlType\":\"STRING\",\"visualType\":\"string\",\"modelType\":\"category\"},\"score\":{\"sqlType\":\"DOUBLE\",\"visualType\":\"number\",\"modelType\":\"value\"},\"teacher\":{\"sqlType\":\"STRING\",\"visualType\":\"string\",\"modelType\":\"category\"},\"city\":{\"sqlType\":\"STRING\",\"visualType\":\"string\",\"modelType\":\"category\"},\"sex\":{\"sqlType\":\"STRING\",\"visualType\":\"string\",\"modelType\":\"category\"},\"fee\":{\"sqlType\":\"DOUBLE\",\"visualType\":\"number\",\"modelType\":\"value\"},\"name\":{\"sqlType\":\"STRING\",\"visualType\":\"string\",\"modelType\":\"category\"},\"lesson\":{\"sqlType\":\"STRING\",\"visualType\":\"string\",\"modelType\":\"category\"},\"id\":{\"sqlType\":\"INT\",\"visualType\":\"number\",\"modelType\":\"value\"},\"class\":{\"sqlType\":\"STRING\",\"visualType\":\"string\",\"modelType\":\"category\"},\"exam_date\":{\"sqlType\":\"STRING\",\"visualType\":\"string\",\"modelType\":\"category\"},\"age\":{\"sqlType\":\"INT\",\"visualType\":\"number\",\"modelType\":\"value\"}},\"controls\":[],\"computed\":[],\"cache\":false,\"expired\":300,\"autoLoadData\":true,\"query\":{\"groups\":[\"birthday\",\"name\"],\"aggregators\":[{\"column\":\"score\",\"func\":\"sum\"}],\"filters\":[],\"orders\":[],\"pageNo\":0,\"pageSize\":0,\"nativeQuery\":false,\"cache\":false,\"expired\":0,\"flush\":false}}";
-        Set<String> columns = getWidgetUsedColumns(test);
-        columns.size();
-    }
-
-    private Set<String> getWidgetUsedColumns(String config){
-        Set<String> columns = Sets.newHashSet();
-        JsonObject configJson = BDPJettyServerHelper.gson().fromJson(config, JsonElement.class).getAsJsonObject();
-        configJson.getAsJsonArray("rows").forEach(e -> columns.add(getRealColumn(e.getAsJsonObject().get("name").getAsString())));
-        configJson.getAsJsonArray("cols").forEach(e -> columns.add(getRealColumn(e.getAsJsonObject().get("name").getAsString())));
-        configJson.getAsJsonArray("metrics").forEach(e -> columns.add(getRealColumn(e.getAsJsonObject().get("name").getAsString())));
-        return columns;
-    }
-
-    private String getRealColumn(String wrappedColumn){
-        return wrappedColumn.split("@")[0];
-    }
-}
diff --git a/contextservice/cs-server/Dockerfile b/contextservice/cs-server/Dockerfile
deleted file mode 100644
index 9c136f4..0000000
--- a/contextservice/cs-server/Dockerfile
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-#  Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM wedatasphere/linkis:emr-base-spark2.4.4
-
-MAINTAINER wedatasphere@webank.com
-
-RUN yum install -y unzip
-WORKDIR /opt/linkis
-
-COPY target/linkis-cs-server.zip /opt/linkis
-RUN unzip linkis-cs-server.zip
-
-WORKDIR /opt/linkis/linkis-cs-server/bin
-ENTRYPOINT ["/opt/linkis/linkis-cs-server/bin/startup.sh"]
diff --git a/contextservice/cs-server/bin/start-cs-server.sh b/contextservice/cs-server/bin/start-cs-server.sh
deleted file mode 100755
index 6278ff3..0000000
--- a/contextservice/cs-server/bin/start-cs-server.sh
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-
-cd `dirname $0`
-cd ..
-HOME=`pwd`
-
-export SERVER_PID=$HOME/bin/linkis.pid
-export SERVER_LOG_PATH=$HOME/logs
-export SERVER_CLASS=com.webank.wedatasphere.linkis.DataWorkCloudApplication
-
-if test -z "$SERVER_HEAP_SIZE"
-then
-  export SERVER_HEAP_SIZE="512M"
-fi
-
-if test -z "$SERVER_JAVA_OPTS"
-then
-  export SERVER_JAVA_OPTS=" -Xmx$SERVER_HEAP_SIZE -XX:+UseG1GC -Xloggc:$HOME/logs/linkis-gc.log"
-fi
-
-if [[ -f "${SERVER_PID}" ]]; then
-    pid=$(cat ${SERVER_PID})
-    if kill -0 ${pid} >/dev/null 2>&1; then
-      echo "Server is already running."
-      exit 1
-    fi
-fi
-
-nohup java $SERVER_JAVA_OPTS -cp ../module/lib/*:$HOME/conf:$HOME/lib/* $SERVER_CLASS 2>&1 > $SERVER_LOG_PATH/linkis.out &
-pid=$!
-if [[ -z "${pid}" ]]; then
-    echo "server $SERVER_NAME start failed!"
-    exit 1
-else
-    echo "server $SERVER_NAME start succeeded!"
-    echo $pid > $SERVER_PID
-    sleep 1
-fi
\ No newline at end of file
diff --git a/contextservice/cs-server/bin/startup.sh b/contextservice/cs-server/bin/startup.sh
deleted file mode 100755
index 7ed6a42..0000000
--- a/contextservice/cs-server/bin/startup.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/bash
-cd `dirname $0`
-cd ..
-HOME=`pwd`
-
-export SERVER_LOG_PATH=$HOME/logs
-export SERVER_CLASS=com.webank.wedatasphere.linkis.DataWorkCloudApplication
-
-
-if test -z "$SERVER_HEAP_SIZE"
-then
-  export SERVER_HEAP_SIZE="512M"
-fi
-
-if test -z "$SERVER_JAVA_OPTS"
-then
-  export SERVER_JAVA_OPTS=" -Xmx$SERVER_HEAP_SIZE -XX:+UseG1GC  -Xloggc:$HOME/logs/linkis-cs-server-gc.log"
-fi
-
-if test -z "$START_PORT"
-then
-  export START_PORT=22008
-fi
-
-export SERVER_PID=$HOME/bin/linkis.pid
-
-if [[ -f "${SERVER_PID}" ]]; then
-    pid=$(cat ${SERVER_PID})
-    if kill -0 ${pid} >/dev/null 2>&1; then
-      echo "Server is already running."
-      exit 1
-    fi
-fi
-
-cp -f /opt/linkis/conf/linkis.properties /opt/linkis/linkis-cs-server/conf
-
-nohup java $SERVER_JAVA_OPTS -Deurekaurl=$EUREKA_URL -Duser.timezone=Asia/Shanghai -cp $HOME/conf:$HOME/lib/* $SERVER_CLASS --server.port=$START_PORT 2>&1 > $SERVER_LOG_PATH/linkis-cs-server.log &
-
-pid=$!
-if [[ -z "${pid}" ]]; then
-    echo "server $SERVER_NAME start failed!"
-    exit 1
-else
-    echo "server $SERVER_NAME start succeeded!"
-    echo $pid > $SERVER_PID
-    sleep 1
-fi
-
-tail -f /dev/null
diff --git a/contextservice/cs-server/bin/stop-cs-server.sh b/contextservice/cs-server/bin/stop-cs-server.sh
deleted file mode 100755
index 9e84be4..0000000
--- a/contextservice/cs-server/bin/stop-cs-server.sh
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-
-cd `dirname $0`
-cd ..
-HOME=`pwd`
-
-export SERVER_PID=$HOME/bin/linkis.pid
-
-function wait_for_server_to_die() {
-  local pid
-  local count
-  pid=$1
-  timeout=$2
-  count=0
-  timeoutTime=$(date "+%s")
-  let "timeoutTime+=$timeout"
-  currentTime=$(date "+%s")
-  forceKill=1
-
-  while [[ $currentTime -lt $timeoutTime ]]; do
-    $(kill ${pid} > /dev/null 2> /dev/null)
-    if kill -0 ${pid} > /dev/null 2>&1; then
-      sleep 3
-    else
-      forceKill=0
-      break
-    fi
-    currentTime=$(date "+%s")
-  done
-
-  if [[ forceKill -ne 0 ]]; then
-    $(kill -9 ${pid} > /dev/null 2> /dev/null)
-  fi
-}
-
-if [[ ! -f "${SERVER_PID}" ]]; then
-    echo "server $SERVER_NAME is not running"
-else
-    pid=$(cat ${SERVER_PID})
-    if [[ -z "${pid}" ]]; then
-      echo "server $SERVER_NAME is not running"
-    else
-      wait_for_server_to_die $pid 40
-      $(rm -f ${SERVER_PID})
-      echo "server $SERVER_NAME is stopped."
-    fi
-fi
\ No newline at end of file
diff --git a/contextservice/cs-server/bin/stop.sh b/contextservice/cs-server/bin/stop.sh
deleted file mode 100755
index 9e84be4..0000000
--- a/contextservice/cs-server/bin/stop.sh
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-
-cd `dirname $0`
-cd ..
-HOME=`pwd`
-
-export SERVER_PID=$HOME/bin/linkis.pid
-
-function wait_for_server_to_die() {
-  local pid
-  local count
-  pid=$1
-  timeout=$2
-  count=0
-  timeoutTime=$(date "+%s")
-  let "timeoutTime+=$timeout"
-  currentTime=$(date "+%s")
-  forceKill=1
-
-  while [[ $currentTime -lt $timeoutTime ]]; do
-    $(kill ${pid} > /dev/null 2> /dev/null)
-    if kill -0 ${pid} > /dev/null 2>&1; then
-      sleep 3
-    else
-      forceKill=0
-      break
-    fi
-    currentTime=$(date "+%s")
-  done
-
-  if [[ forceKill -ne 0 ]]; then
-    $(kill -9 ${pid} > /dev/null 2> /dev/null)
-  fi
-}
-
-if [[ ! -f "${SERVER_PID}" ]]; then
-    echo "server $SERVER_NAME is not running"
-else
-    pid=$(cat ${SERVER_PID})
-    if [[ -z "${pid}" ]]; then
-      echo "server $SERVER_NAME is not running"
-    else
-      wait_for_server_to_die $pid 40
-      $(rm -f ${SERVER_PID})
-      echo "server $SERVER_NAME is stopped."
-    fi
-fi
\ No newline at end of file
diff --git a/contextservice/cs-server/conf/application.yml b/contextservice/cs-server/conf/application.yml
deleted file mode 100644
index 3cfdeae..0000000
--- a/contextservice/cs-server/conf/application.yml
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-server:
-  port: 9042
-spring:
-  application:
-    name: cloud-contextservice
-
-
-eureka:
-  client:
-    serviceUrl:
-      defaultZone: ${eurekaurl}
-  instance:
-    lease-renewal-interval-in-second: 5
-    lease-expiration-duration-in-second: 10
-    prefer-ip-address: true
-    instance-id: ${spring.cloud.client.ip-address}:${server.port}
-    metadata-map:
-      test: test-user
-
-management:
-  endpoints:
-    web:
-      exposure:
-        include: refresh,info
-logging:
-  config: classpath:log4j2.xml
-
-pagehelper:
-  helper-dialect: mysql
-  reasonable: true
-  support-methods-arguments: true
-  params: countSql
\ No newline at end of file
diff --git a/contextservice/cs-server/conf/linkis.properties b/contextservice/cs-server/conf/linkis.properties
deleted file mode 100644
index 78e8806..0000000
--- a/contextservice/cs-server/conf/linkis.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Copyright 2019 WeBank
-# Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-wds.linkis.server.mybatis.datasource.url=jdbc:mysql://127.0.0.1:3306/dss_dev_center?characterEncoding=UTF-8
-wds.linkis.server.mybatis.datasource.username=
-wds.linkis.server.mybatis.datasource.password=
-wds.linkis.server.version=v1
-##restful
-wds.linkis.server.restful.scan.packages=com.webank.wedatasphere.linkis.cs.server.restful
-##mybatis
-wds.linkis.server.mybatis.mapperLocations=classpath*:com/webank/wedatasphere/linkis/cs/persistence/dao/impl/*.xml
-wds.linkis.server.mybatis.typeAliasesPackage=com.webank.wedatasphere.linkis.cs.persistence.entity
-wds.linkis.server.mybatis.BasePackage=com.webank.wedatasphere.linkis.cs.persistence.dao
diff --git a/contextservice/cs-server/conf/log4j.properties b/contextservice/cs-server/conf/log4j.properties
deleted file mode 100644
index de6691a..0000000
--- a/contextservice/cs-server/conf/log4j.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright 2019 WeBank
-# Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-log4j.rootCategory=INFO,console
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.Threshold=INFO
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-#log4j.appender.console.layout.ConversionPattern= %d{ISO8601} %-5p (%t) [%F:%M(%L)] - %m%n
-log4j.appender.console.layout.ConversionPattern=%d{ISO8601} %-5p (%t) %p %c{1} - %m%n
-log4j.appender.com.webank.bdp.ide.core=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.com.webank.bdp.ide.core.Threshold=INFO
-log4j.additivity.com.webank.bdp.ide.core=false
-log4j.appender.com.webank.bdp.ide.core.layout=org.apache.log4j.PatternLayout
-log4j.appender.com.webank.bdp.ide.core.Append=true
-log4j.appender.com.webank.bdp.ide.core.File=logs/linkis.log
-log4j.appender.com.webank.bdp.ide.core.layout.ConversionPattern=%d{ISO8601} %-5p (%t) [%F:%M(%L)] - %m%n
-log4j.logger.org.springframework=INFO
\ No newline at end of file
diff --git a/contextservice/cs-server/conf/log4j2.xml b/contextservice/cs-server/conf/log4j2.xml
deleted file mode 100644
index 1c68190..0000000
--- a/contextservice/cs-server/conf/log4j2.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<configuration status="error" monitorInterval="30">
-    <appenders>
-        <Console name="Console" target="SYSTEM_OUT">
-            <ThresholdFilter level="INFO" onMatch="ACCEPT" onMismatch="DENY"/>
-            <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%t] %logger{36} %L %M - %msg%xEx%n"/>
-        </Console>
-        <RollingFile name="RollingFile" fileName="logs/linkis.log"
-                     filePattern="logs/$${date:yyyy-MM}/linkis-log-%d{yyyy-MM-dd}-%i.log">
-            <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5level] [%-40t] %c{1.} (%L) [%M] - %msg%xEx%n"/>
-            <SizeBasedTriggeringPolicy size="100MB"/>
-            <DefaultRolloverStrategy max="20"/>
-        </RollingFile>
-    </appenders>
-    <loggers>
-        <root level="INFO">
-            <appender-ref ref="RollingFile"/>
-            <appender-ref ref="Console"/>
-        </root>
-    </loggers>
-</configuration>
-
diff --git a/contextservice/cs-server/pom.xml b/contextservice/cs-server/pom.xml
deleted file mode 100644
index 3679595..0000000
--- a/contextservice/cs-server/pom.xml
+++ /dev/null
@@ -1,183 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>linkis-cs-server</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cs-common</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cs-cache</artifactId>
-            <version>${project.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>com.webank.wedatasphere.linkis</groupId>
-                    <artifactId>linkis-module</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cs-listener</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cs-persistence</artifactId>
-            <version>${project.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>com.webank.wedatasphere.linkis</groupId>
-                    <artifactId>linkis-module</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cs-highavailable</artifactId>
-            <version>${project.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>com.webank.wedatasphere.linkis</groupId>
-                    <artifactId>linkis-module</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cs-search</artifactId>
-            <version>${project.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>com.webank.wedatasphere.linkis</groupId>
-                    <artifactId>linkis-module</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cloudRPC</artifactId>
-            <version>${project.version}</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-scheduler</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.12</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>scala-compile-first</id>
-                        <phase>process-resources</phase>
-                        <goals>
-                            <goal>add-source</goal>
-                            <goal>compile</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>2.3</version>
-                <inherited>false</inherited>
-                <executions>
-                    <execution>
-                        <id>make-assembly</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                        <configuration>
-                            <descriptors>
-                                <descriptor>src/main/assembly/distribution.xml</descriptor>
-                            </descriptors>
-                        </configuration>
-                    </execution>
-                </executions>
-                <configuration>
-                    <skipAssembly>false</skipAssembly>
-                    <finalName>linkis-cs-server</finalName>
-                    <appendAssemblyId>false</appendAssemblyId>
-                    <attach>false</attach>
-                    <descriptors>
-                        <descriptor>src/main/assembly/distribution.xml</descriptor>
-                    </descriptors>
-                </configuration>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>src/main/java</directory>
-                <includes>
-                    <include>**/*.xml</include>
-                </includes>
-            </resource>
-            <resource>
-                <directory>src/main/resources</directory>
-                <excludes>
-                    <exclude>**/*.properties</exclude>
-                    <exclude>**/application.yml</exclude>
-                    <exclude>**/bootstrap.yml</exclude>
-                    <exclude>**/log4j2.xml</exclude>
-                </excludes>
-            </resource>
-        </resources>
-    </build>
-</project>
\ No newline at end of file
diff --git a/contextservice/cs-server/pom_k8s.xml b/contextservice/cs-server/pom_k8s.xml
deleted file mode 100644
index 65491d9..0000000
--- a/contextservice/cs-server/pom_k8s.xml
+++ /dev/null
@@ -1,204 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>linkis-cs-server</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cs-common</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cs-cache</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>com.webank.wedatasphere.linkis</groupId>
-                    <artifactId>linkis-module</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cs-listener</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cs-persistence</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>com.webank.wedatasphere.linkis</groupId>
-                    <artifactId>linkis-module</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cs-highavailable</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>com.webank.wedatasphere.linkis</groupId>
-                    <artifactId>linkis-module</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cs-search</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>com.webank.wedatasphere.linkis</groupId>
-                    <artifactId>linkis-module</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cloudRPC</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>tomcat</groupId>
-                    <artifactId>jasper-compiler</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>tomcat</groupId>
-                    <artifactId>jasper-runtime</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-scheduler</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.12</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>scala-compile-first</id>
-                        <phase>process-resources</phase>
-                        <goals>
-                            <goal>add-source</goal>
-                            <goal>compile</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>2.3</version>
-                <inherited>false</inherited>
-                <executions>
-                    <execution>
-                        <id>make-assembly</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                        <configuration>
-                            <descriptors>
-                                <descriptor>src/main/assembly/distribution.xml</descriptor>
-                            </descriptors>
-                        </configuration>
-                    </execution>
-                </executions>
-                <configuration>
-                    <skipAssembly>false</skipAssembly>
-                    <finalName>linkis-cs-server</finalName>
-                    <appendAssemblyId>false</appendAssemblyId>
-                    <attach>false</attach>
-                    <descriptors>
-                        <descriptor>src/main/assembly/distribution.xml</descriptor>
-                    </descriptors>
-                </configuration>
-            </plugin>
-<!--            <plugin>-->
-<!--                <groupId>com.spotify</groupId>-->
-<!--                <artifactId>dockerfile-maven-plugin</artifactId>-->
-<!--                <version>1.3.4</version>-->
-<!--                <executions>-->
-<!--                    <execution>-->
-<!--                        <id>default</id>-->
-<!--                        <phase>package</phase>-->
-<!--                        <goals>-->
-<!--                            <goal>build</goal>-->
-<!--                            <goal>tag</goal>-->
-<!--                        </goals>-->
-<!--                    </execution>-->
-<!--                </executions>-->
-<!--                <configuration>-->
-<!--                    <repository>${harbor.reposity}/linkis-cs-server</repository>-->
-<!--                    <tag>${linkis.version}</tag>-->
-<!--                    <dockerInfoDirectory>${basedir}/dockerinfo</dockerInfoDirectory>-->
-<!--                </configuration>-->
-<!--            </plugin>-->
-        </plugins>
-        <resources>
-            <resource>
-                <directory>src/main/java</directory>
-                <includes>
-                    <include>**/*.xml</include>
-                </includes>
-            </resource>
-            <resource>
-                <directory>src/main/resources</directory>
-                <excludes>
-                    <exclude>**/*.properties</exclude>
-                    <exclude>**/application.yml</exclude>
-                    <exclude>**/bootstrap.yml</exclude>
-                    <exclude>**/log4j2.xml</exclude>
-                </excludes>
-            </resource>
-        </resources>
-    </build>
-</project>
\ No newline at end of file
diff --git a/contextservice/cs-server/src/main/assembly/distribution.xml b/contextservice/cs-server/src/main/assembly/distribution.xml
deleted file mode 100644
index ac1d394..0000000
--- a/contextservice/cs-server/src/main/assembly/distribution.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<!--
-  ~ Copyright 2019 WeBank
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<assembly
-        xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/2.3"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/2.3 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-    <id>linkis-cs-server</id>
-    <formats>
-        <format>zip</format>
-    </formats>
-    <includeBaseDirectory>true</includeBaseDirectory>
-    <baseDirectory>linkis-cs-server</baseDirectory>
-
-    <dependencySets>
-        <dependencySet>
-            <!-- Enable access to all projects in the current multimodule build! <useAllReactorProjects>true</useAllReactorProjects> -->
-            <!-- Now, select which projects to include in this module-set. -->
-            <outputDirectory>lib</outputDirectory>
-            <useProjectArtifact>true</useProjectArtifact>
-            <useTransitiveDependencies>true</useTransitiveDependencies>
-            <unpack>false</unpack>
-            <useStrictFiltering>false</useStrictFiltering>
-            <useTransitiveFiltering>true</useTransitiveFiltering>
-
-        </dependencySet>
-    </dependencySets>
-
-    <fileSets>
-        <fileSet>
-            <directory>${basedir}/conf</directory>
-            <includes>
-                <include>*</include>
-            </includes>
-            <fileMode>0777</fileMode>
-            <outputDirectory>conf</outputDirectory>
-            <lineEnding>unix</lineEnding>
-        </fileSet>
-        <fileSet>
-            <directory>${basedir}/bin</directory>
-            <includes>
-                <include>*</include>
-            </includes>
-            <fileMode>0777</fileMode>
-            <outputDirectory>bin</outputDirectory>
-            <lineEnding>unix</lineEnding>
-        </fileSet>
-        <fileSet>
-            <directory>.</directory>
-            <excludes>
-                <exclude>*/**</exclude>
-            </excludes>
-            <outputDirectory>logs</outputDirectory>
-        </fileSet>
-    </fileSets>
-
-</assembly>
-
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/conf/ContextServerConf.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/conf/ContextServerConf.java
deleted file mode 100644
index b614d0e..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/conf/ContextServerConf.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.conf;
-
-import com.webank.wedatasphere.linkis.common.conf.CommonVars;
-
-/**
- * @author peacewong
- * @date 2020/2/9 17:04
- */
-public class ContextServerConf {
-
-    public final static String KEYWORD_SCAN_PACKAGE = CommonVars.apply("wds.linkis.cs.keyword.scan.package","com.webank.wedatasphere.linkis.cs").getValue();
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/enumeration/ServiceMethod.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/enumeration/ServiceMethod.java
deleted file mode 100644
index fbc241a..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/enumeration/ServiceMethod.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.enumeration;
-
-/**
- * Created by patinousward on 2020/2/22.
- */
-public enum ServiceMethod {
-    /**
-     *
-     */
-    CREATE, GET, SEARCH, REMOVE, REMOVEALL, UPDATE, RESET, SET, BIND, HEARTBEAT
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/enumeration/ServiceType.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/enumeration/ServiceType.java
deleted file mode 100644
index a0432ed..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/enumeration/ServiceType.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.enumeration;
-
-import com.webank.wedatasphere.linkis.cs.server.protocol.*;
-
-/**
- * Created by patinousward on 2020/2/19.
- */
-public enum ServiceType {
-    /**
-     *
-     */
-    CONTEXT_ID {
-        @Override
-        public HttpRequestProtocol getRequestProtocol() {
-            return new ContextIDProtocol();
-        }
-    },
-    CONTEXT {
-        @Override
-        public HttpRequestProtocol getRequestProtocol() {
-            return new ContextProtocol();
-        }
-    },
-
-    CONTEXT_LISTENER {
-        @Override
-        public HttpRequestProtocol getRequestProtocol() {
-            return new ContextListenerProtocol();
-        }
-    };
-
-    public HttpRequestProtocol getRequestProtocol() {
-        return null;
-    }
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/parser/DefaultKeywordParser.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/parser/DefaultKeywordParser.java
deleted file mode 100644
index 2fb9a3e..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/parser/DefaultKeywordParser.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.parser;
-
-import com.webank.wedatasphere.linkis.cs.common.annotation.KeywordMethod;
-import com.webank.wedatasphere.linkis.cs.server.conf.ContextServerConf;
-import org.apache.commons.lang.StringUtils;
-import org.reflections.ReflectionUtils;
-import org.reflections.Reflections;
-import org.reflections.scanners.MethodAnnotationsScanner;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.PostConstruct;
-import java.lang.reflect.Method;
-import java.util.*;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * @author peacewong
- * @date 2020/2/9 16:19
- */
-@Component
-public class DefaultKeywordParser implements KeywordParser {
-
-    private static final Logger logger = LoggerFactory.getLogger(DefaultKeywordParser.class);
-
-
-    Map<String, Set<KeywordMethodEntity>> keywordMethods = new HashMap<>();
-
-    Map<String, Set<Class<?>>> classRecord = new HashMap<>();
-
-
-    @PostConstruct
-    private void init() {
-        logger.info("init keyValueParser");
-        scanKeywordMethods();
-    }
-
-    private void scanKeywordMethods() {
-        Reflections reflections = new Reflections(ContextServerConf.KEYWORD_SCAN_PACKAGE, new MethodAnnotationsScanner());
-        Set<Method> methods = reflections.getMethodsAnnotatedWith(KeywordMethod.class);
-        Iterator<Method> iterator = methods.iterator();
-        while (iterator.hasNext()) {
-            Method method = iterator.next();
-            method.setAccessible(true);
-
-            KeywordMethod annotation = method.getAnnotation(KeywordMethod.class);
-            KeywordMethodEntity keywordMethodEntity = new KeywordMethodEntity();
-            keywordMethodEntity.setMethod(method);
-            keywordMethodEntity.setRegex(annotation.regex());
-            keywordMethodEntity.setSplitter(annotation.splitter());
-
-            String className = method.getDeclaringClass().getName();
-            if (!keywordMethods.containsKey(className)) {
-                keywordMethods.put(className, new HashSet<>());
-            }
-            keywordMethods.get(className).add(keywordMethodEntity);
-        }
-    }
-
-    /**
-     *
-     * @param obj
-     * @return
-     * @throws Exception
-     */
-    private Set<String> parseKeywords(Object obj) throws Exception {
-        Objects.requireNonNull(obj);
-        Set<String> keywords = new HashSet<>();
-        String className = obj.getClass().getName();
-        if (!classRecord.containsKey(className)) {
-            classRecord.put(className, ReflectionUtils.getAllSuperTypes(obj.getClass()));
-        }
-
-        Iterator<Class<?>> classIterator = classRecord.get(className).iterator();
-        while (classIterator.hasNext()) {
-            Class<?> clazz = classIterator.next();
-            if (! keywordMethods.containsKey(clazz.getName())) {
-                continue;
-            }
-            Iterator<KeywordMethodEntity> keywordMethodEntityIterator = keywordMethods.get(clazz.getName()).iterator();
-            while (keywordMethodEntityIterator.hasNext()) {
-                KeywordMethodEntity methodEntity = keywordMethodEntityIterator.next();
-                Object methodReturn = methodEntity.getMethod().invoke(obj);
-                if (null == methodReturn || StringUtils.isBlank(methodReturn.toString())) {
-                    continue;
-                }
-                if (StringUtils.isNotBlank(methodEntity.getSplitter())) {
-                    Collections.addAll(keywords, methodReturn.toString().split(methodEntity.getSplitter()));
-                } else if (StringUtils.isNotBlank(methodEntity.getRegex())) {
-                    keywords.addAll(getString(methodReturn.toString(), methodEntity.getRegex()));
-                } else {
-                    keywords.add(methodReturn.toString());
-                }
-            }
-        }
-        return keywords;
-    }
-
-    @Override
-    public Set<String> parse(Object obj) {
-        //先解析key
-        Set<String> keywords = new HashSet<>();
-        try {
-            keywords =  parseKeywords(obj);
-        } catch (Exception e){
-           logger.error("Failed to parse keywords ", e);
-        }
-        return keywords;
-    }
-
-    private  Set<String> getString(String s, String regex) {
-
-        Set<String> keywords = new HashSet<>();
-        Pattern p = Pattern.compile(regex);
-        Matcher m = p.matcher(s);
-        while(m.find()) {
-            keywords.add(m.group());
-
-        }
-        return keywords;
-    }
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/parser/KeywordMethodEntity.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/parser/KeywordMethodEntity.java
deleted file mode 100644
index b71e491..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/parser/KeywordMethodEntity.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.parser;
-
-import java.lang.reflect.Method;
-
-/**
- * @author peacewong
- * @date 2020/2/9 16:41
- */
-public class KeywordMethodEntity {
-
-    private Method method;
-
-    private String splitter;
-
-    private String regex;
-
-    public Method getMethod() {
-        return method;
-    }
-
-    public void setMethod(Method method) {
-        this.method = method;
-    }
-
-    public String getSplitter() {
-        return splitter;
-    }
-
-    public void setSplitter(String splitter) {
-        this.splitter = splitter;
-    }
-
-    public String getRegex() {
-        return regex;
-    }
-
-    public void setRegex(String regex) {
-        this.regex = regex;
-    }
-
-    @Override
-    public int hashCode() {
-        return method.hashCode();
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        return method.equals(obj);
-    }
-
-    @Override
-    public String toString() {
-        return super.toString();
-    }
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/parser/KeywordParser.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/parser/KeywordParser.java
deleted file mode 100644
index a719ce1..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/parser/KeywordParser.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.parser;
-
-import java.util.Set;
-
-/**
- * @author peacewong
- * @date 2020/2/18 19:01
- */
-public interface KeywordParser {
-     Set<String> parse(Object obj);
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/protocol/AbstractHttpRequestProtocol.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/protocol/AbstractHttpRequestProtocol.java
deleted file mode 100644
index 0ee18bd..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/protocol/AbstractHttpRequestProtocol.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.protocol;
-
-import com.webank.wedatasphere.linkis.cs.server.enumeration.ServiceMethod;
-
-/**
- * Created by patinousward on 2020/2/18.
- */
-public abstract class AbstractHttpRequestProtocol implements HttpRequestProtocol {
-
-    private Object[] requestObjects;
-
-    private String username;
-
-    private ServiceMethod serviceMethod;
-
-    @Override
-    public Object[] getRequestObjects() {
-        return requestObjects;
-    }
-
-    @Override
-    public void setRequestObjects(Object[] requestObjects) {
-        this.requestObjects = requestObjects;
-    }
-
-    @Override
-    public String getUsername() {
-        return username;
-    }
-
-    @Override
-    public ServiceMethod getServiceMethod() {
-        return serviceMethod;
-    }
-
-    @Override
-    public void setServiceMethod(ServiceMethod serviceMethod) {
-        this.serviceMethod = serviceMethod;
-    }
-
-    @Override
-    public void setUsername(String username) {
-        this.username = username;
-    }
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/protocol/ContextIDProtocol.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/protocol/ContextIDProtocol.java
deleted file mode 100644
index 8daedb9..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/protocol/ContextIDProtocol.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.protocol;
-
-import com.webank.wedatasphere.linkis.cs.server.enumeration.ServiceType;
-
-/**
- * Created by patinousward on 2020/2/18.
- */
-public class ContextIDProtocol extends AbstractHttpRequestProtocol {
-    @Override
-    public String getServiceName() {
-        return ServiceType.CONTEXT_ID.name();
-    }
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/protocol/ContextListenerProtocol.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/protocol/ContextListenerProtocol.java
deleted file mode 100644
index 277419b..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/protocol/ContextListenerProtocol.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.protocol;
-
-import com.webank.wedatasphere.linkis.cs.server.enumeration.ServiceType;
-
-/**
- * Created by patinousward on 2020/2/22.
- */
-public class ContextListenerProtocol extends AbstractHttpRequestProtocol {
-
-    @Override
-    public String getServiceName() {
-        return ServiceType.CONTEXT_LISTENER.name();
-    }
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/protocol/ContextProtocol.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/protocol/ContextProtocol.java
deleted file mode 100644
index 46027e8..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/protocol/ContextProtocol.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.protocol;
-
-import com.webank.wedatasphere.linkis.cs.server.enumeration.ServiceType;
-
-/**
- * Created by patinousward on 2020/2/22.
- */
-public class ContextProtocol extends AbstractHttpRequestProtocol {
-
-    @Override
-    public String getServiceName() {
-        return ServiceType.CONTEXT.name();
-    }
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/protocol/HttpProtocol.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/protocol/HttpProtocol.java
deleted file mode 100644
index 8b415cd..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/protocol/HttpProtocol.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.protocol;
-
-import com.webank.wedatasphere.linkis.protocol.Protocol;
-
-/**
- * Created by patinousward on 2020/2/18.
- */
-public interface HttpProtocol extends Protocol {
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/protocol/HttpRequestProtocol.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/protocol/HttpRequestProtocol.java
deleted file mode 100644
index f5d59fd..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/protocol/HttpRequestProtocol.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.protocol;
-
-import com.webank.wedatasphere.linkis.cs.server.enumeration.ServiceMethod;
-
-/**
- * Created by patinousward on 2020/2/18.
- */
-public interface HttpRequestProtocol extends HttpProtocol {
-
-    Object[] getRequestObjects();
-
-    void setRequestObjects(Object[] objs);
-
-    String getServiceName();
-
-    void setUsername(String username);
-
-    String getUsername();
-
-    ServiceMethod getServiceMethod();
-
-    void setServiceMethod(ServiceMethod method);
-
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/protocol/HttpResponseProtocol.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/protocol/HttpResponseProtocol.java
deleted file mode 100644
index c7cf3f6..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/protocol/HttpResponseProtocol.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.protocol;
-
-/**
- * Created by patinousward on 2020/2/18.
- */
-public interface HttpResponseProtocol<T> extends HttpProtocol {
-
-    void waitForComplete() throws InterruptedException;
-
-    void waitTimeEnd(long mills) throws InterruptedException;
-
-    void notifyJob();
-
-    T get();
-
-    void set(T t);
-
-    Object getResponseData();
-
-    void setResponseData(Object responseData);
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/protocol/RestResponseProtocol.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/protocol/RestResponseProtocol.java
deleted file mode 100644
index a36907e..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/protocol/RestResponseProtocol.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.protocol;
-
-import com.webank.wedatasphere.linkis.server.Message;
-import org.apache.commons.lang.exception.ExceptionUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.util.StringUtils;
-
-/**
- * Created by patinousward on 2020/2/18.
- */
-public class RestResponseProtocol implements HttpResponseProtocol<Message> {
-
-    private Logger logger = LoggerFactory.getLogger(getClass());
-
-    private final Object lock = new Object();
-
-    private Message message;
-
-    private Object responseData;
-
-    @Override
-    public void waitForComplete() throws InterruptedException {
-        synchronized (lock) {
-            lock.wait();
-        }
-    }
-
-    @Override
-    public void waitTimeEnd(long mills) throws InterruptedException {
-        logger.info(String.format("start to wait %smills until job complete", mills));
-        synchronized (lock) {
-            lock.wait(mills);
-        }
-    }
-
-    @Override
-    public void notifyJob() {
-        logger.info("notify the job");
-        synchronized (lock) {
-            lock.notify();
-        }
-    }
-
-    @Override
-    public Message get() {
-        return this.message;
-    }
-
-    @Override
-    public void set(Message message) {
-        this.message = message;
-    }
-
-    @Override
-    public Object getResponseData() {
-        return this.responseData;
-    }
-
-    @Override
-    public void setResponseData(Object responseData) {
-        this.responseData = responseData;
-    }
-
-    public void ok(String msg) {
-        if (message == null) {
-            message = new Message();
-        }
-        if (StringUtils.isEmpty(msg)) {
-            message.setMessage("OK");
-        } else {
-            message.setMessage(msg);
-        }
-    }
-
-    public void error(String msg, Throwable t) {
-        if (message == null) {
-            message = new Message();
-            message.setStatus(1);
-        }
-        message.setMessage(msg);
-        if (t != null) {
-            message.$less$less("stack", ExceptionUtils.getFullStackTrace(t));
-        }
-    }
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/restful/ContextIDRestfulApi.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/restful/ContextIDRestfulApi.java
deleted file mode 100644
index 2b33bcd..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/restful/ContextIDRestfulApi.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.restful;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.protocol.ContextHTTPConstant;
-import com.webank.wedatasphere.linkis.cs.common.utils.CSCommonUtils;
-import com.webank.wedatasphere.linkis.cs.server.enumeration.ServiceMethod;
-import com.webank.wedatasphere.linkis.cs.server.enumeration.ServiceType;
-import com.webank.wedatasphere.linkis.cs.server.scheduler.CsScheduler;
-import com.webank.wedatasphere.linkis.cs.server.scheduler.HttpAnswerJob;
-import com.webank.wedatasphere.linkis.server.Message;
-import org.codehaus.jackson.JsonNode;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-import org.springframework.util.StringUtils;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.*;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import java.io.IOException;
-
-/**
- * Created by patinousward on 2020/2/18.
- */
-@Component
-@Path("/contextservice")
-@Produces(MediaType.APPLICATION_JSON)
-@Consumes(MediaType.APPLICATION_JSON)
-public class ContextIDRestfulApi implements CsRestfulParent {
-
-    @Autowired
-    private CsScheduler csScheduler;
-
-    @POST
-    @Path("createContextID")
-    public Response createContextID(@Context HttpServletRequest req, JsonNode jsonNode) throws InterruptedException, ClassNotFoundException, IOException, CSErrorException {
-        ContextID contextID = getContextIDFromJsonNode(jsonNode);
-        HttpAnswerJob answerJob = submitRestJob(req, ServiceMethod.CREATE, contextID);
-        return Message.messageToResponse(generateResponse(answerJob, "contextId"));
-    }
-
-    @GET
-    @Path("getContextID")
-    public Response getContextID(@Context HttpServletRequest req, @QueryParam("contextId") String id) throws InterruptedException, CSErrorException {
-        if (StringUtils.isEmpty(id)) {
-            throw new CSErrorException(97000, "contxtId cannot be empty");
-        }
-        HttpAnswerJob answerJob = submitRestJob(req, ServiceMethod.GET, id);
-        Message message = generateResponse(answerJob, "contextID");
-        return Message.messageToResponse(message);
-    }
-
-    @POST
-    @Path("updateContextID")
-    public Response updateContextID(@Context HttpServletRequest req, JsonNode jsonNode) throws InterruptedException, CSErrorException, IOException, ClassNotFoundException {
-        ContextID contextID = getContextIDFromJsonNode(jsonNode);
-        if (StringUtils.isEmpty(contextID.getContextId())) {
-            throw new CSErrorException(97000, "contxtId cannot be empty");
-        }
-        HttpAnswerJob answerJob = submitRestJob(req, ServiceMethod.UPDATE, contextID);
-        return Message.messageToResponse(generateResponse(answerJob, ""));
-    }
-
-    @POST
-    @Path("resetContextID")
-    public Response resetContextID(@Context HttpServletRequest req, JsonNode jsonNode) throws InterruptedException, CSErrorException {
-        if (!jsonNode.has(ContextHTTPConstant.CONTEXT_ID_STR)) {
-            throw new CSErrorException(97000, ContextHTTPConstant.CONTEXT_ID_STR + " cannot be empty");
-        }
-        String id = jsonNode.get(ContextHTTPConstant.CONTEXT_ID_STR).getTextValue();
-        HttpAnswerJob answerJob = submitRestJob(req, ServiceMethod.RESET, id);
-        return Message.messageToResponse(generateResponse(answerJob, ""));
-    }
-
-
-    @POST
-    @Path("removeContextID")
-    public Response removeContextID(@Context HttpServletRequest req, JsonNode jsonNode) throws InterruptedException, CSErrorException {
-        String id = jsonNode.get("contextId").getTextValue();
-        if (StringUtils.isEmpty(id)) {
-            throw new CSErrorException(97000, "contxtId cannot be empty");
-        }
-        HttpAnswerJob answerJob = submitRestJob(req, ServiceMethod.REMOVE, id);
-        return Message.messageToResponse(generateResponse(answerJob, ""));
-    }
-
-    @Override
-    public ServiceType getServiceType() {
-        return ServiceType.CONTEXT_ID;
-    }
-
-    @Override
-    public CsScheduler getScheduler() {
-        return this.csScheduler;
-    }
-
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/restful/ContextListenerRestfulApi.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/restful/ContextListenerRestfulApi.java
deleted file mode 100644
index 5b9fa70..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/restful/ContextListenerRestfulApi.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.restful;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.CommonContextIDListenerDomain;
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.CommonContextKeyListenerDomain;
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.ContextIDListenerDomain;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.server.enumeration.ServiceMethod;
-import com.webank.wedatasphere.linkis.cs.server.enumeration.ServiceType;
-import com.webank.wedatasphere.linkis.cs.server.scheduler.CsScheduler;
-import com.webank.wedatasphere.linkis.cs.server.scheduler.HttpAnswerJob;
-import com.webank.wedatasphere.linkis.server.Message;
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import java.io.IOException;
-
-/**
- * Created by patinousward on 2020/2/18.
- */
-@Component
-@Path("/contextservice")
-@Produces(MediaType.APPLICATION_JSON)
-@Consumes(MediaType.APPLICATION_JSON)
-public class ContextListenerRestfulApi implements CsRestfulParent {
-
-    @Autowired
-    private CsScheduler csScheduler;
-
-    private ObjectMapper objectMapper = new ObjectMapper();
-
-    @POST
-    @Path("onBindIDListener")
-    public Response onBindIDListener(@Context HttpServletRequest req, JsonNode jsonNode) throws InterruptedException, CSErrorException, IOException, ClassNotFoundException {
-        String source = jsonNode.get("source").getTextValue();
-        ContextID contextID = getContextIDFromJsonNode(jsonNode);
-        ContextIDListenerDomain listener = new CommonContextIDListenerDomain();
-        listener.setSource(source);
-        HttpAnswerJob answerJob = submitRestJob(req, ServiceMethod.BIND, contextID, listener);
-        return Message.messageToResponse(generateResponse(answerJob, ""));
-    }
-
-    @POST
-    @Path("onBindKeyListener")
-    public Response onBindKeyListener(@Context HttpServletRequest req, JsonNode jsonNode) throws InterruptedException, CSErrorException, IOException, ClassNotFoundException {
-        String source = jsonNode.get("source").getTextValue();
-        ContextID contextID = getContextIDFromJsonNode(jsonNode);
-        ContextKey contextKey = getContextKeyFromJsonNode(jsonNode);
-        CommonContextKeyListenerDomain listener = new CommonContextKeyListenerDomain();
-        listener.setSource(source);
-        HttpAnswerJob answerJob = submitRestJob(req, ServiceMethod.BIND, contextID, contextKey, listener);
-        return Message.messageToResponse(generateResponse(answerJob, ""));
-    }
-
-    @POST
-    @Path("heartbeat")
-    public Response heartbeat(@Context HttpServletRequest req, JsonNode jsonNode) throws InterruptedException, IOException, CSErrorException {
-        String source = jsonNode.get("source").getTextValue();
-        HttpAnswerJob answerJob = submitRestJob(req, ServiceMethod.HEARTBEAT, source);
-        return Message.messageToResponse(generateResponse(answerJob, "ContextKeyValueBean"));
-    }
-
-    @Override
-    public ServiceType getServiceType() {
-        return ServiceType.CONTEXT_LISTENER;
-    }
-
-    @Override
-    public CsScheduler getScheduler() {
-        return this.csScheduler;
-    }
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/restful/ContextRestfulApi.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/restful/ContextRestfulApi.java
deleted file mode 100644
index ea2e1cf..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/restful/ContextRestfulApi.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.restful;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextValue;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.protocol.ContextHTTPConstant;
-import com.webank.wedatasphere.linkis.cs.server.enumeration.ServiceMethod;
-import com.webank.wedatasphere.linkis.cs.server.enumeration.ServiceType;
-import com.webank.wedatasphere.linkis.cs.server.scheduler.CsScheduler;
-import com.webank.wedatasphere.linkis.cs.server.scheduler.HttpAnswerJob;
-import com.webank.wedatasphere.linkis.server.Message;
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.type.TypeReference;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import java.io.IOException;
-import java.util.Map;
-
-
-/**
- * Created by patinousward on 2020/2/18.
- */
-@Component
-@Path("contextservice")
-@Produces(MediaType.APPLICATION_JSON)
-@Consumes(MediaType.APPLICATION_JSON)
-public class ContextRestfulApi implements CsRestfulParent {
-
-    private static final Logger LOGGER = LoggerFactory.getLogger(ContextRestfulApi.class);
-
-    @Autowired
-    private CsScheduler csScheduler;
-
-    private ObjectMapper objectMapper = new ObjectMapper();
-
-    @POST
-    @Path("getContextValue")
-    public Response getContextValue(@Context HttpServletRequest req, JsonNode jsonNode) throws InterruptedException, CSErrorException, IOException, ClassNotFoundException {
-        ContextID contextID = getContextIDFromJsonNode(jsonNode);
-        ContextKey contextKey = getContextKeyFromJsonNode(jsonNode);
-        HttpAnswerJob answerJob = submitRestJob(req, ServiceMethod.GET, contextID, contextKey);
-        Message message = generateResponse(answerJob, "contextValue");
-        return Message.messageToResponse(message);
-    }
-
-
-    @POST
-    @Path("searchContextValue")
-    public Response searchContextValue(@Context HttpServletRequest req, JsonNode jsonNode) throws InterruptedException, CSErrorException, IOException, ClassNotFoundException {
-        ContextID contextID = getContextIDFromJsonNode(jsonNode);
-        JsonNode condition = jsonNode.get("condition");
-        Map<Object, Object> conditionMap = objectMapper.convertValue(condition, new TypeReference<Map<Object, Object>>() {
-        });
-        HttpAnswerJob answerJob = submitRestJob(req, ServiceMethod.SEARCH, contextID, conditionMap);
-        Message message = generateResponse(answerJob, "contextKeyValue");
-        return Message.messageToResponse(message);
-    }
-
-/*    @GET
-    @Path("searchContextValueByCondition")
-    public Response searchContextValueByCondition(@Context HttpServletRequest req, JsonNode jsonNode) throws InterruptedException {
-        Condition condition = null;
-        HttpAnswerJob answerJob = submitRestJob(req, ServiceMethod.SEARCH, condition);
-        return generateResponse(answerJob,"");
-    }*/
-
-
-    @POST
-    @Path("setValueByKey")
-    public Response setValueByKey(@Context HttpServletRequest req, JsonNode jsonNode) throws CSErrorException, IOException, ClassNotFoundException, InterruptedException {
-        ContextID contextID = getContextIDFromJsonNode(jsonNode);
-        ContextKey contextKey = getContextKeyFromJsonNode(jsonNode);
-        ContextValue contextValue = getContextValueFromJsonNode(jsonNode);
-        HttpAnswerJob answerJob = submitRestJob(req, ServiceMethod.SET, contextID, contextKey, contextValue);
-        return Message.messageToResponse(generateResponse(answerJob, ""));
-    }
-
-    @POST
-    @Path("setValue")
-    public Response setValue(@Context HttpServletRequest req, JsonNode jsonNode) throws InterruptedException, CSErrorException, IOException, ClassNotFoundException {
-        ContextID contextID = getContextIDFromJsonNode(jsonNode);
-        ContextKeyValue contextKeyValue = getContextKeyValueFromJsonNode(jsonNode);
-        HttpAnswerJob answerJob = submitRestJob(req, ServiceMethod.SET, contextID, contextKeyValue);
-        return Message.messageToResponse(generateResponse(answerJob, ""));
-    }
-
-    @POST
-    @Path("resetValue")
-    public Response resetValue(@Context HttpServletRequest req, JsonNode jsonNode) throws InterruptedException, CSErrorException, IOException, ClassNotFoundException {
-        ContextID contextID = getContextIDFromJsonNode(jsonNode);
-        ContextKey contextKey = getContextKeyFromJsonNode(jsonNode);
-        HttpAnswerJob answerJob = submitRestJob(req, ServiceMethod.RESET, contextID, contextKey);
-        return Message.messageToResponse(generateResponse(answerJob, ""));
-    }
-
-    @POST
-    @Path("removeValue")
-    public Response removeValue(@Context HttpServletRequest req, JsonNode jsonNode) throws InterruptedException, CSErrorException, IOException, ClassNotFoundException {
-        ContextID contextID = getContextIDFromJsonNode(jsonNode);
-        ContextKey contextKey = getContextKeyFromJsonNode(jsonNode);
-        HttpAnswerJob answerJob = submitRestJob(req, ServiceMethod.REMOVE, contextID, contextKey);
-        return Message.messageToResponse(generateResponse(answerJob, ""));
-    }
-
-    @POST
-    @Path("removeAllValue")
-    public Response removeAllValue(@Context HttpServletRequest req, JsonNode jsonNode) throws InterruptedException, CSErrorException, IOException, ClassNotFoundException {
-        ContextID contextID = getContextIDFromJsonNode(jsonNode);
-        HttpAnswerJob answerJob = submitRestJob(req, ServiceMethod.REMOVEALL, contextID);
-        return Message.messageToResponse(generateResponse(answerJob, ""));
-    }
-
-    @POST
-    @Path("removeAllValueByKeyPrefixAndContextType")
-    public Response removeAllValueByKeyPrefixAndContextType(@Context HttpServletRequest req, JsonNode jsonNode) throws InterruptedException, CSErrorException, IOException, ClassNotFoundException {
-        ContextID contextID = getContextIDFromJsonNode(jsonNode);
-        String  contextType = jsonNode.get(ContextHTTPConstant.CONTEXT_KEY_TYPE_STR).getTextValue();
-        String keyPrefix = jsonNode.get(ContextHTTPConstant.CONTEXT_KEY_PREFIX_STR).getTextValue();
-        HttpAnswerJob answerJob = submitRestJob(req, ServiceMethod.REMOVEALL, contextID, ContextType.valueOf(contextType),keyPrefix);
-        return Message.messageToResponse(generateResponse(answerJob, ""));
-    }
-
-    @POST
-    @Path("removeAllValueByKeyPrefix")
-    public Response removeAllValueByKeyPrefix(@Context HttpServletRequest req, JsonNode jsonNode) throws InterruptedException, CSErrorException, IOException, ClassNotFoundException {
-        ContextID contextID = getContextIDFromJsonNode(jsonNode);
-        String keyPrefix = jsonNode.get(ContextHTTPConstant.CONTEXT_KEY_PREFIX_STR).getTextValue();
-        HttpAnswerJob answerJob = submitRestJob(req, ServiceMethod.REMOVEALL, contextID,keyPrefix);
-        return Message.messageToResponse(generateResponse(answerJob, ""));
-    }
-
-    @Override
-    public ServiceType getServiceType() {
-        return ServiceType.CONTEXT;
-    }
-
-    @Override
-    public CsScheduler getScheduler() {
-        return this.csScheduler;
-    }
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/restful/CsRestfulParent.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/restful/CsRestfulParent.java
deleted file mode 100644
index f34c482..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/restful/CsRestfulParent.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.restful;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextValue;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.server.enumeration.ServiceMethod;
-import com.webank.wedatasphere.linkis.cs.server.enumeration.ServiceType;
-import com.webank.wedatasphere.linkis.cs.server.protocol.HttpRequestProtocol;
-import com.webank.wedatasphere.linkis.cs.server.protocol.HttpResponseProtocol;
-import com.webank.wedatasphere.linkis.cs.server.protocol.RestResponseProtocol;
-import com.webank.wedatasphere.linkis.cs.server.scheduler.CsScheduler;
-import com.webank.wedatasphere.linkis.cs.server.scheduler.HttpAnswerJob;
-import com.webank.wedatasphere.linkis.cs.server.scheduler.RestJobBuilder;
-import com.webank.wedatasphere.linkis.cs.server.util.CsUtils;
-import com.webank.wedatasphere.linkis.server.Message;
-import com.webank.wedatasphere.linkis.server.security.SecurityFilter;
-import org.codehaus.jackson.JsonNode;
-
-import javax.servlet.http.HttpServletRequest;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Created by patinousward on 2020/2/22.
- */
-public interface CsRestfulParent {
-
-    default HttpAnswerJob submitRestJob(HttpServletRequest req,
-                                        ServiceMethod method,
-                                        Object... objects) throws InterruptedException {
-        // TODO: 2020/3/3 单例
-        HttpAnswerJob job = (HttpAnswerJob) new RestJobBuilder().build(getServiceType());
-        HttpRequestProtocol protocol = job.getRequestProtocol();
-        protocol.setUsername(SecurityFilter.getLoginUsername(req));
-        protocol.setServiceMethod(method);
-        protocol.setRequestObjects(objects);
-        getScheduler().sumbit(job);
-        return job;
-    }
-
-    default Message generateResponse(HttpAnswerJob job, String responseKey) throws CSErrorException {
-        HttpResponseProtocol responseProtocol = job.getResponseProtocol();
-        if (responseProtocol instanceof RestResponseProtocol) {
-            Message message = ((RestResponseProtocol) responseProtocol).get();
-            if (message == null) {
-                return Message.error("job execute timeout");
-            }
-            int status = ((RestResponseProtocol) responseProtocol).get().getStatus();
-            if (status == 1) {
-                //failed
-                return ((RestResponseProtocol) responseProtocol).get();
-            } else if (status == 0) {
-                Object data = job.getResponseProtocol().getResponseData();
-                if (data == null) {
-                    return Message.ok().data(responseKey, null);
-                } else if (data instanceof List && ((List) data).isEmpty()) {
-                    return Message.ok().data(responseKey, new String[]{});
-                } else if (data instanceof List) {
-                    ArrayList<String> strings = new ArrayList<>();
-                    for (Object d : (List) data) {
-                        strings.add(CsUtils.serialize(d));
-                    }
-                    return Message.ok().data(responseKey, strings);
-                } else {
-                    String dataStr = CsUtils.serialize(data);
-                    return Message.ok().data(responseKey, dataStr);
-                }
-            } else {
-
-            }
-        }
-        return Message.ok();
-    }
-
-    ServiceType getServiceType();
-
-    CsScheduler getScheduler();
-
-    default ContextID getContextIDFromJsonNode(JsonNode jsonNode) throws CSErrorException, IOException, ClassNotFoundException {
-        return deserialize(jsonNode, "contextID");
-    }
-
-    default <T> T deserialize(JsonNode jsonNode, String key) throws CSErrorException {
-        String str = jsonNode.get(key).getTextValue();
-        return (T) CsUtils.SERIALIZE.deserialize(str);
-    }
-
-    default ContextKey getContextKeyFromJsonNode(JsonNode jsonNode) throws CSErrorException, IOException, ClassNotFoundException {
-        return deserialize(jsonNode, "contextKey");
-    }
-
-    default ContextValue getContextValueFromJsonNode(JsonNode jsonNode) throws CSErrorException, IOException, ClassNotFoundException {
-        return deserialize(jsonNode, "contextValue");
-    }
-
-    default ContextKeyValue getContextKeyValueFromJsonNode(JsonNode jsonNode) throws CSErrorException, IOException, ClassNotFoundException {
-        return deserialize(jsonNode, "contextKeyValue");
-    }
-
-
-
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/CsScheduler.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/CsScheduler.java
deleted file mode 100644
index 7cbcb99..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/CsScheduler.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.scheduler;
-
-import com.webank.wedatasphere.linkis.cs.server.service.Service;
-
-/**
- * Created by patinousward on 2020/2/21.
- */
-public interface CsScheduler {
-
-    void addService(Service service);
-
-    Service[] getServices();
-
-    void sumbit(HttpJob job) throws InterruptedException;
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/DefaultCsScheduler.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/DefaultCsScheduler.java
deleted file mode 100644
index 1070444..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/DefaultCsScheduler.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.scheduler;
-
-import com.webank.wedatasphere.linkis.cs.server.scheduler.linkisImpl.CsJobListener;
-import com.webank.wedatasphere.linkis.cs.server.scheduler.linkisImpl.CsSchedulerJob;
-import com.webank.wedatasphere.linkis.cs.server.service.Service;
-import com.webank.wedatasphere.linkis.scheduler.Scheduler;
-import com.webank.wedatasphere.linkis.scheduler.queue.Group;
-import com.webank.wedatasphere.linkis.scheduler.queue.GroupFactory;
-import com.webank.wedatasphere.linkis.scheduler.queue.Job;
-import com.webank.wedatasphere.linkis.scheduler.queue.parallelqueue.ParallelGroup;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.Optional;
-
-/**
- * Created by patinousward on 2020/2/21.
- */
-@Component
-public class DefaultCsScheduler implements CsScheduler {
-
-    private final Logger logger = LoggerFactory.getLogger(this.getClass());
-
-    @Autowired
-    private Scheduler scheduler;
-
-    @Autowired
-    private List<Service> services;
-
-    @Override
-    public void addService(Service service) {
-        services.add(service);
-    }
-
-    @Override
-    public Service[] getServices() {
-        return this.services.toArray(new Service[]{});
-    }
-
-    @Override
-    public void sumbit(HttpJob job) throws InterruptedException {
-        // TODO: 2020/3/3 参数配置化 
-        GroupFactory groupFactory = scheduler.getSchedulerContext().getOrCreateGroupFactory();
-        Group group = groupFactory.getOrCreateGroup(job.getRequestProtocol().getUsername());
-        if (group instanceof ParallelGroup) {
-            ParallelGroup parallelGroup = (ParallelGroup) group;
-            if (parallelGroup.getMaxRunningJobs() == 0) {
-                parallelGroup.setMaxRunningJobs(100);
-            }
-            if (parallelGroup.getMaxAskExecutorTimes() == 0) {
-                parallelGroup.setMaxAskExecutorTimes(1000);
-            }
-        }
-        //create csJob
-        Job csJob = buildJob(job);
-        //注册listener
-        csJob.setJobListener(new CsJobListener());
-        scheduler.submit(csJob);
-        if (job instanceof HttpAnswerJob) {
-            HttpAnswerJob answerJob = (HttpAnswerJob) job;
-            answerJob.getResponseProtocol().waitTimeEnd(5000);
-        }
-    }
-
-    private Job buildJob(HttpJob job) {
-        CsSchedulerJob csJob = new CsSchedulerJob();
-        //暂时将groupName给jobid
-        csJob.setId(job.getRequestProtocol().getUsername());
-        csJob.set(job);
-        //从多个serveice中找出一个合适执行的service
-        Optional<Service> service = Arrays.stream(getServices()).filter(s -> s.ifAccept(job)).findFirst();
-        if (service.isPresent()) {
-            logger.info(String.format("find %s service to execute job",service.get().getName()));
-            csJob.setConsuemr(service.get()::accept);
-        }
-        return csJob;
-    }
-
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/HttpAnswerJob.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/HttpAnswerJob.java
deleted file mode 100644
index a6e64ab..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/HttpAnswerJob.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.scheduler;
-
-import com.webank.wedatasphere.linkis.cs.server.protocol.HttpResponseProtocol;
-
-/**
- * Created by patinousward on 2020/2/18.
- */
-public interface HttpAnswerJob extends HttpJob {
-
-    HttpResponseProtocol getResponseProtocol();
-
-    void setResponseProtocol(HttpResponseProtocol protocol);
-
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/HttpAnswerJobBuilder.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/HttpAnswerJobBuilder.java
deleted file mode 100644
index ff56931..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/HttpAnswerJobBuilder.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.scheduler;
-
-import com.webank.wedatasphere.linkis.cs.server.enumeration.ServiceType;
-import com.webank.wedatasphere.linkis.cs.server.protocol.HttpRequestProtocol;
-import com.webank.wedatasphere.linkis.cs.server.protocol.HttpResponseProtocol;
-
-/**
- * Created by patinousward on 2020/2/22.
- */
-public abstract class HttpAnswerJobBuilder extends HttpJobBuilder {
-
-    @Override
-    public final HttpJob build(ServiceType serviceType) {
-        return buildResponseProtocol(super.build(serviceType));
-    }
-
-    @Override
-    protected final HttpJob createHttpJob() {
-        return new DefaultHttpAnswerJob();
-    }
-
-    protected abstract HttpJob buildResponseProtocol(HttpJob job);
-
-    private static class DefaultHttpAnswerJob implements HttpAnswerJob {
-        private HttpRequestProtocol httpRequestProtocol;
-
-        private HttpResponseProtocol httpResponseProtocol;
-
-        @Override
-        public HttpRequestProtocol getRequestProtocol() {
-            return this.httpRequestProtocol;
-        }
-
-        @Override
-        public void setRequestProtocol(HttpRequestProtocol protocol) {
-            this.httpRequestProtocol = protocol;
-        }
-
-        @Override
-        public HttpResponseProtocol getResponseProtocol() {
-            return this.httpResponseProtocol;
-        }
-
-        @Override
-        public void setResponseProtocol(HttpResponseProtocol protocol) {
-            this.httpResponseProtocol = protocol;
-        }
-    }
-
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/HttpJob.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/HttpJob.java
deleted file mode 100644
index 4d7fe00..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/HttpJob.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.scheduler;
-
-import com.webank.wedatasphere.linkis.cs.server.protocol.HttpRequestProtocol;
-
-/**
- * Created by patinousward on 2020/2/18.
- */
-public interface HttpJob {
-
-    HttpRequestProtocol getRequestProtocol();
-
-    void setRequestProtocol(HttpRequestProtocol protocol);
-
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/HttpJobBuilder.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/HttpJobBuilder.java
deleted file mode 100644
index 51e95d4..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/HttpJobBuilder.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.scheduler;
-
-import com.webank.wedatasphere.linkis.cs.server.enumeration.ServiceType;
-
-/**
- * Created by patinousward on 2020/2/22.
- */
-public abstract class HttpJobBuilder {
-
-    public HttpJob build(ServiceType serviceType) {
-        return buildRequestProtocol(createHttpJob(), serviceType);
-    }
-
-    private HttpJob buildRequestProtocol(HttpJob job, ServiceType serviceType) {
-        job.setRequestProtocol(serviceType.getRequestProtocol());
-        return job;
-    }
-
-    protected abstract HttpJob createHttpJob();
-
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/HttpPriorityJob.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/HttpPriorityJob.java
deleted file mode 100644
index 7f1602c..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/HttpPriorityJob.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.scheduler;
-
-/**
- * Created by patinousward on 2020/2/18.
- */
-public interface HttpPriorityJob extends HttpJob {
-
-    int getPriority();
-
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/RestJobBuilder.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/RestJobBuilder.java
deleted file mode 100644
index 37df82d..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/RestJobBuilder.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.scheduler;
-
-import com.webank.wedatasphere.linkis.cs.server.protocol.RestResponseProtocol;
-
-/**
- * Created by patinousward on 2020/2/22.
- */
-public class RestJobBuilder extends HttpAnswerJobBuilder {
-
-    @Override
-    protected final HttpJob buildResponseProtocol(HttpJob job) {
-        RestResponseProtocol protocol = new RestResponseProtocol();
-        ((HttpAnswerJob) job).setResponseProtocol(protocol);
-        return job;
-    }
-
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/linkisImpl/CsExecuteRequest.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/linkisImpl/CsExecuteRequest.java
deleted file mode 100644
index 3a85cda..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/linkisImpl/CsExecuteRequest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.scheduler.linkisImpl;
-
-import com.webank.wedatasphere.linkis.cs.server.scheduler.HttpJob;
-import com.webank.wedatasphere.linkis.scheduler.executer.ExecuteRequest;
-
-import java.util.function.Consumer;
-
-/**
- * Created by patinousward on 2020/2/18.
- */
-public class CsExecuteRequest implements ExecuteRequest, JobToExecuteRequestConsumer<HttpJob> {
-
-    private HttpJob httpJob;
-
-    // TODO: 2020/3/3 变量名修改
-    private Consumer<HttpJob> jobConsumer;
-
-    @Override
-    public String code() {
-        return null;
-    }
-
-
-    @Override
-    public HttpJob get() {
-        return this.httpJob;
-    }
-
-    @Override
-    public void set(HttpJob httpJob) {
-        this.httpJob = httpJob;
-    }
-
-    @Override
-    public Consumer<HttpJob> getConsumer() {
-        return this.jobConsumer;
-    }
-
-    @Override
-    public void setConsuemr(Consumer<HttpJob> jobConsumer) {
-        this.jobConsumer = jobConsumer;
-    }
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/linkisImpl/CsExecutor.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/linkisImpl/CsExecutor.java
deleted file mode 100644
index 965c64b..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/linkisImpl/CsExecutor.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.scheduler.linkisImpl;
-
-import com.webank.wedatasphere.linkis.protocol.engine.EngineState$;
-import com.webank.wedatasphere.linkis.scheduler.executer.*;
-import scala.Enumeration;
-
-import java.io.IOException;
-
-/**
- * Created by patinousward on 2020/2/22.
- */
-public class CsExecutor implements Executor {
-
-    private long id;
-    private Enumeration.Value state;
-
-    @Override
-    public long getId() {
-        return this.id;
-    }
-
-    @Override
-    public ExecuteResponse execute(ExecuteRequest executeRequest) {
-        //httpjob执行的地方
-        try {
-            if (executeRequest instanceof CsExecuteRequest) {
-                CsExecuteRequest request = (CsExecuteRequest) executeRequest;
-                request.getConsumer().accept(request.get());
-            }
-            return new SuccessExecuteResponse();
-        } catch (Exception e) {
-            return new ErrorExecuteResponse(e.getMessage(), e);
-        }
-    }
-
-    @Override
-    public EngineState$.Value state() {
-        return this.state;
-    }
-
-    @Override
-    public ExecutorInfo getExecutorInfo() {
-        return new ExecutorInfo(id, state);
-    }
-
-    @Override
-    public void close() throws IOException {
-    }
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/linkisImpl/CsExecutorManager.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/linkisImpl/CsExecutorManager.java
deleted file mode 100644
index 08e55c9..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/linkisImpl/CsExecutorManager.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.scheduler.linkisImpl;
-
-import com.webank.wedatasphere.linkis.scheduler.executer.Executor;
-import com.webank.wedatasphere.linkis.scheduler.executer.ExecutorManager;
-import com.webank.wedatasphere.linkis.scheduler.listener.ExecutorListener;
-import com.webank.wedatasphere.linkis.scheduler.queue.SchedulerEvent;
-import scala.Option;
-import scala.Some;
-import scala.concurrent.duration.Duration;
-
-/**
- * Created by patinousward on 2020/2/18.
- */
-public class CsExecutorManager extends ExecutorManager {
-
-    @Override
-    public void setExecutorListener(ExecutorListener executorListener) {
-
-    }
-
-    @Override
-    public Executor createExecutor(SchedulerEvent event) {
-        return new CsExecutor();
-    }
-
-    @Override
-    public Option<Executor> askExecutor(SchedulerEvent event) {
-        return new Some<>(createExecutor(event));
-    }
-
-    @Override
-    public Option<Executor> askExecutor(SchedulerEvent event, Duration wait) {
-        return askExecutor(event);
-    }
-
-    @Override
-    public Option<Executor> getById(long id) {
-        return new Some<>(null);
-    }
-
-    @Override
-    public Executor[] getByGroup(String groupName) {
-        return new Executor[0];
-    }
-
-    @Override
-    public void delete(Executor executor) {
-
-    }
-
-    @Override
-    public void shutdown() {
-
-    }
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/linkisImpl/CsJobListener.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/linkisImpl/CsJobListener.java
deleted file mode 100644
index 9fb8d52..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/linkisImpl/CsJobListener.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.scheduler.linkisImpl;
-
-import com.webank.wedatasphere.linkis.cs.server.protocol.HttpResponseProtocol;
-import com.webank.wedatasphere.linkis.cs.server.protocol.RestResponseProtocol;
-import com.webank.wedatasphere.linkis.cs.server.scheduler.HttpAnswerJob;
-import com.webank.wedatasphere.linkis.cs.server.scheduler.HttpJob;
-import com.webank.wedatasphere.linkis.scheduler.executer.ErrorExecuteResponse;
-import com.webank.wedatasphere.linkis.scheduler.listener.JobListener;
-import com.webank.wedatasphere.linkis.scheduler.queue.Job;
-
-/**
- * Created by patinousward on 2020/2/22.
- */
-public class CsJobListener implements JobListener {
-    @Override
-    public void onJobScheduled(Job job) {
-        //nothing to do
-    }
-
-    @Override
-    public void onJobInited(Job job) {
-        //nothing to do
-    }
-
-    @Override
-    public void onJobWaitForRetry(Job job) {
-        //nothing to do
-    }
-
-    @Override
-    public void onJobRunning(Job job) {
-        //nothing to do
-    }
-
-    @Override
-    public void onJobCompleted(Job job) {
-        // TODO: 2020/2/22 正常 /异常
-        if (job instanceof CsSchedulerJob) {
-            HttpJob httpJob = ((CsSchedulerJob) job).get();
-            if (httpJob instanceof HttpAnswerJob) {
-                HttpAnswerJob answerJob = (HttpAnswerJob) httpJob;
-                HttpResponseProtocol responseProtocol = answerJob.getResponseProtocol();
-                if (!job.isSucceed() && responseProtocol instanceof RestResponseProtocol) {
-                    ErrorExecuteResponse errorResponse = job.getErrorResponse();
-                    ((RestResponseProtocol) responseProtocol).error(errorResponse.message(), errorResponse.t());
-                }
-                answerJob.getResponseProtocol().notifyJob();
-            }
-        }
-    }
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/linkisImpl/CsSchedulerBean.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/linkisImpl/CsSchedulerBean.java
deleted file mode 100644
index dc93657..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/linkisImpl/CsSchedulerBean.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.scheduler.linkisImpl;
-
-import com.webank.wedatasphere.linkis.scheduler.Scheduler;
-import com.webank.wedatasphere.linkis.scheduler.SchedulerContext;
-import com.webank.wedatasphere.linkis.scheduler.executer.ExecutorManager;
-import com.webank.wedatasphere.linkis.scheduler.queue.parallelqueue.ParallelScheduler;
-import com.webank.wedatasphere.linkis.scheduler.queue.parallelqueue.ParallelSchedulerContextImpl;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Import;
-
-/**
- * Created by patinousward on 2020/2/18.
- */
-@Configuration
-@Import(CsExecutorManager.class)
-public class CsSchedulerBean {
-
-    @Bean
-    public SchedulerContext getSchedulerContext(CsExecutorManager csExecutorManager) {
-        return new ParallelSchedulerContextImpl(3000) {
-            @Override
-            public ExecutorManager getOrCreateExecutorManager() {
-                return csExecutorManager;
-            }
-        };
-    }
-
-    @Bean
-    public Scheduler getScheduler(SchedulerContext context) {
-        ParallelScheduler parallelScheduler = new ParallelScheduler(context);
-        parallelScheduler.init();
-        return parallelScheduler;
-    }
-
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/linkisImpl/CsSchedulerJob.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/linkisImpl/CsSchedulerJob.java
deleted file mode 100644
index e7d0584..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/linkisImpl/CsSchedulerJob.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.scheduler.linkisImpl;
-
-import com.webank.wedatasphere.linkis.cs.server.scheduler.HttpJob;
-import com.webank.wedatasphere.linkis.scheduler.executer.ExecuteRequest;
-import com.webank.wedatasphere.linkis.scheduler.queue.Job;
-import com.webank.wedatasphere.linkis.scheduler.queue.JobInfo;
-
-import java.io.IOException;
-import java.util.function.Consumer;
-
-/**
- * Created by patinousward on 2020/2/18.
- */
-public class CsSchedulerJob extends Job implements JobToExecuteRequestConsumer<HttpJob> {
-
-    private HttpJob httpJob;
-
-    private Consumer<HttpJob> jobConsumer;
-
-    @Override
-    public HttpJob get() {
-        return this.httpJob;
-    }
-
-    @Override
-    public void set(HttpJob httpJob) {
-        this.httpJob = httpJob;
-    }
-
-    @Override
-    public Consumer<HttpJob> getConsumer() {
-        return this.jobConsumer;
-    }
-
-    @Override
-    public void setConsuemr(Consumer<HttpJob> jobConsumer) {
-        this.jobConsumer = jobConsumer;
-    }
-
-
-    @Override
-    public void init() {
-        // TODO: 2020/2/18
-    }
-
-    @Override
-    public ExecuteRequest jobToExecuteRequest() {
-        CsExecuteRequest request = new CsExecuteRequest();
-        request.set(httpJob);
-        request.setConsuemr(jobConsumer);
-        return request;
-    }
-
-    @Override
-    public String getName() {
-        return getId();
-    }
-
-    @Override
-    public JobInfo getJobInfo() {
-        return null;
-    }
-
-    @Override
-    public void close() throws IOException {
-    }
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/linkisImpl/JobToExecuteRequestConsumer.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/linkisImpl/JobToExecuteRequestConsumer.java
deleted file mode 100644
index 3f93990..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/scheduler/linkisImpl/JobToExecuteRequestConsumer.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.scheduler.linkisImpl;
-
-import java.util.function.Consumer;
-
-/**
- * Created by patinousward on 2020/2/22.
- */
-public interface JobToExecuteRequestConsumer<T> {
-
-    T get();
-
-    void set(T t);
-
-    Consumer<T> getConsumer();
-
-    void setConsuemr(Consumer<T> tConsumer);
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/service/AbstractService.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/service/AbstractService.java
deleted file mode 100644
index e380a06..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/service/AbstractService.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.service;
-
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSWarnException;
-import com.webank.wedatasphere.linkis.cs.server.protocol.HttpRequestProtocol;
-import com.webank.wedatasphere.linkis.cs.server.protocol.HttpResponseProtocol;
-import com.webank.wedatasphere.linkis.cs.server.protocol.RestResponseProtocol;
-import com.webank.wedatasphere.linkis.cs.server.scheduler.HttpAnswerJob;
-import com.webank.wedatasphere.linkis.cs.server.scheduler.HttpJob;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.util.Arrays;
-import java.util.Optional;
-
-/**
- * Created by patinousward on 2020/2/18.
- */
-public abstract class AbstractService implements Service {
-
-    protected final Logger logger = LoggerFactory.getLogger(this.getClass());
-
-    @Override
-    public boolean ifAccept(HttpJob job) {
-        return getName().equals(job.getRequestProtocol().getServiceName());
-    }
-
-    @Override
-    public void accept(HttpJob job) throws CSWarnException {
-        try {
-            //根据参数类型和方法名,选出方法进行调用
-            HttpRequestProtocol protocol = job.getRequestProtocol();
-            Object[] params = protocol.getRequestObjects();
-            String method = protocol.getServiceMethod().name().toUpperCase();
-            Method[] methods = this.getClass().getMethods();
-            Optional<Method> first = Arrays.stream(methods).filter(f -> f.getName().toUpperCase().contains(method))
-                    .filter(f -> f.getParameterTypes().length == params.length)
-                    .filter(f -> judgeMethod(f, params)).findFirst();
-            Object response = first.orElseThrow(() -> new CSErrorException(97000, "can not find a method to invoke")).invoke(this, params);
-            if (job instanceof HttpAnswerJob) {
-                HttpResponseProtocol responseProtocol = ((HttpAnswerJob) job).getResponseProtocol();
-                if (responseProtocol instanceof RestResponseProtocol) {
-                    ((RestResponseProtocol) responseProtocol).ok(null);
-                }
-                responseProtocol.setResponseData(response);
-            }
-        } catch (Exception e) {
-            logger.error(String.format("execute %s service failed:", getName()), e);
-            throw new CSWarnException(97000, e.getMessage());
-        }
-    }
-
-    private boolean judgeMethod(Method method, Object... objects) {
-        boolean flag = true;
-        //传入参数类型是否是方法参数的子类
-        Class<?>[] parameterTypes = method.getParameterTypes();
-        for (int i = 0; i < parameterTypes.length; i++) {
-            if (!parameterTypes[i].isAssignableFrom(objects[i].getClass())) {
-                flag = false;
-                break;
-            }
-        }
-        return flag;
-    }
-
-    @Override
-    public void init() {
-
-    }
-
-    @Override
-    public void start() {
-
-    }
-
-    @Override
-    public void close() throws IOException {
-
-    }
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/service/ContextIDService.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/service/ContextIDService.java
deleted file mode 100644
index ad8472a..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/service/ContextIDService.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.service;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-
-/**
- * Created by patinousward on 2020/2/18.
- */
-public abstract class ContextIDService extends AbstractService {
-
-    public abstract String createContextID(ContextID contextID) throws CSErrorException;
-
-    public abstract ContextID getContextID(String id) throws CSErrorException;
-
-    public abstract void updateContextID(ContextID contextID) throws CSErrorException;
-
-    public abstract void resetContextID(String id) throws CSErrorException;
-
-    public abstract void removeContextID(String id) throws CSErrorException;
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/service/ContextListenerService.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/service/ContextListenerService.java
deleted file mode 100644
index 66450b4..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/service/ContextListenerService.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.service;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.ContextIDListenerDomain;
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.ContextKeyListenerDomain;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.listener.callback.imp.ContextKeyValueBean;
-
-import java.util.List;
-
-/**
- * Created by patinousward on 2020/2/18.
- */
-public abstract class ContextListenerService extends AbstractService {
-
-    public abstract void onBind(ContextID contextID, ContextIDListenerDomain listener) throws CSErrorException;
-
-    public abstract void onBind(ContextID contextID, ContextKey contextKey, ContextKeyListenerDomain listener) throws CSErrorException;
-
-    public abstract List<ContextKeyValueBean> heartbeat(String source);
-
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/service/ContextService.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/service/ContextService.java
deleted file mode 100644
index 64389be..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/service/ContextService.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.service;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextValue;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.condition.Condition;
-import com.webank.wedatasphere.linkis.cs.exception.ContextSearchFailedException;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * Created by patinousward on 2020/2/18.
- */
-public abstract class ContextService extends AbstractService {
-
-    public abstract ContextValue getContextValue(ContextID contextID, ContextKey contextKey);
-
-    public abstract List<ContextKeyValue> searchContextValue(ContextID contextID, Map<Object, Object> conditionMap) throws ContextSearchFailedException;
-
-    //public abstract List<ContextKeyValue> searchContextValueByCondition(Condition condition) throws ContextSearchFailedException;
-
-    public abstract void setValueByKey(ContextID contextID, ContextKey contextKey, ContextValue contextValue) throws CSErrorException, ClassNotFoundException, JsonProcessingException;
-
-    public abstract void setValue(ContextID contextID, ContextKeyValue contextKeyValuee) throws CSErrorException, ClassNotFoundException, JsonProcessingException;
-
-    public abstract void resetValue(ContextID contextID, ContextKey contextKey) throws CSErrorException;
-
-    public abstract void removeValue(ContextID contextID, ContextKey contextKey) throws CSErrorException;
-
-    public abstract void removeAllValue(ContextID contextID) throws CSErrorException;
-
-    public abstract void removeAllValueByKeyPrefixAndContextType(ContextID contextID, ContextType contextType,String keyPrefix) throws CSErrorException;
-
-    public abstract void removeAllValueByKeyPrefix(ContextID contextID,String keyPrefix) throws CSErrorException;
-
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/service/Service.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/service/Service.java
deleted file mode 100644
index fd28fd3..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/service/Service.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.service;
-
-import com.webank.wedatasphere.linkis.cs.common.exception.CSWarnException;
-import com.webank.wedatasphere.linkis.cs.server.scheduler.HttpJob;
-
-import java.io.Closeable;
-
-/**
- * Created by patinousward on 2020/2/18.
- */
-public interface Service extends Closeable {
-
-    void init();
-
-    void start();
-
-    String getName();
-
-    boolean ifAccept(HttpJob job);
-
-    void accept(HttpJob job) throws CSWarnException;
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/service/impl/ContextIDServiceImpl.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/service/impl/ContextIDServiceImpl.java
deleted file mode 100644
index 96ba24f..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/service/impl/ContextIDServiceImpl.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.service.impl;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.persistence.ContextPersistenceManager;
-import com.webank.wedatasphere.linkis.cs.persistence.persistence.ContextIDPersistence;
-import com.webank.wedatasphere.linkis.cs.server.enumeration.ServiceType;
-import com.webank.wedatasphere.linkis.cs.server.service.ContextIDService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-/**
- * Created by patinousward on 2020/2/21.
- */
-@Component
-public class ContextIDServiceImpl extends ContextIDService {
-
-    private final Logger logger = LoggerFactory.getLogger(this.getClass());
-
-    @Autowired
-    private ContextPersistenceManager persistenceManager;
-
-    private ContextIDPersistence getPersistence() throws CSErrorException {
-        return persistenceManager.getContextIDPersistence();
-    }
-
-    @Override
-    public String getName() {
-        return ServiceType.CONTEXT_ID.name();
-    }
-
-
-    @Override
-    public String createContextID(ContextID contextID) throws CSErrorException {
-        getPersistence().createContextID(contextID);
-        logger.info(String.format("createContextID,csId:%s", contextID.getContextId()));
-        return contextID.getContextId();
-    }
-
-    @Override
-    public ContextID getContextID(String id) throws CSErrorException {
-        logger.info(String.format("getContextID,csId:%s", id));
-        return getPersistence().getContextID(id);
-    }
-
-    @Override
-    public void updateContextID(ContextID contextID) throws CSErrorException {
-        logger.info(String.format("getContextID,csId:%s", contextID.getContextId()));
-        getPersistence().updateContextID(contextID);
-    }
-
-    @Override
-    public void resetContextID(String id) throws CSErrorException {
-        // TODO: 2020/2/23 reset 方法
-    }
-
-    @Override
-    public void removeContextID(String id) throws CSErrorException {
-        logger.info(String.format("removeContextID,csId:%s", id));
-        getPersistence().deleteContextID(id);
-    }
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/service/impl/ContextListenerServiceImpl.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/service/impl/ContextListenerServiceImpl.java
deleted file mode 100644
index 6fb7d73..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/service/impl/ContextListenerServiceImpl.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.service.impl;
-
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.CommonContextKeyListenerDomain;
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.ContextIDListenerDomain;
-import com.webank.wedatasphere.linkis.cs.common.entity.listener.ContextKeyListenerDomain;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.listener.callback.imp.ContextKeyValueBean;
-import com.webank.wedatasphere.linkis.cs.listener.manager.imp.DefaultContextListenerManager;
-import com.webank.wedatasphere.linkis.cs.persistence.ContextPersistenceManager;
-import com.webank.wedatasphere.linkis.cs.persistence.persistence.ContextIDListenerPersistence;
-import com.webank.wedatasphere.linkis.cs.persistence.persistence.ContextKeyListenerPersistence;
-import com.webank.wedatasphere.linkis.cs.server.enumeration.ServiceType;
-import com.webank.wedatasphere.linkis.cs.server.service.ContextListenerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Created by patinousward on 2020/2/21.
- */
-@Component
-public class ContextListenerServiceImpl extends ContextListenerService {
-
-    @Autowired
-    private ContextPersistenceManager persistenceManager;
-
-    private final Logger logger = LoggerFactory.getLogger(this.getClass());
-
-
-    private ContextIDListenerPersistence getIDListenerPersistence() throws CSErrorException {
-        return persistenceManager.getContextIDListenerPersistence();
-    }
-
-    private ContextKeyListenerPersistence getKeyListenerPersistence() throws CSErrorException {
-        return persistenceManager.getContextKeyListenerPersistence();
-    }
-
-    @Override
-    public String getName() {
-        return ServiceType.CONTEXT_LISTENER.name();
-    }
-
-
-    @Override
-    public void onBind(ContextID contextID, ContextIDListenerDomain domain) throws CSErrorException {
-        logger.info(String.format("onBind,csId:%s", contextID.getContextId()));
-        domain.setContextID(contextID);
-        getIDListenerPersistence().create(contextID, domain);
-        DefaultContextListenerManager instance = DefaultContextListenerManager.getInstance();
-        instance.getContextIDCallbackEngine().registerClient(domain);
-    }
-
-    @Override
-    public void onBind(ContextID contextID, ContextKey contextKey, ContextKeyListenerDomain domain) throws CSErrorException {
-        logger.info(String.format("onBind,csId:%s,key:%s", contextID.getContextId(), contextKey.getKey()));
-        domain.setContextKey(contextKey);
-        // TODO: 2020/2/28  
-        if (domain instanceof CommonContextKeyListenerDomain) {
-            ((CommonContextKeyListenerDomain) domain).setContextID(contextID);
-        }
-        getKeyListenerPersistence().create(contextID, domain);
-        DefaultContextListenerManager instance = DefaultContextListenerManager.getInstance();
-        instance.getContextKeyCallbackEngine().registerClient(domain);
-    }
-
-    @Override
-    public List<ContextKeyValueBean> heartbeat(String clientSource) {
-        logger.info(String.format("heartbeat,clientSource:%s", clientSource));
-        DefaultContextListenerManager instance = DefaultContextListenerManager.getInstance();
-        ArrayList<ContextKeyValueBean> idCallback = instance.getContextIDCallbackEngine().getListenerCallback(clientSource);
-        ArrayList<ContextKeyValueBean> keyCallback = instance.getContextKeyCallbackEngine().getListenerCallback(clientSource);
-        idCallback.addAll(keyCallback);
-        return idCallback;
-    }
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/service/impl/ContextServiceImpl.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/service/impl/ContextServiceImpl.java
deleted file mode 100644
index 5511d14..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/service/impl/ContextServiceImpl.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.service.impl;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.webank.wedatasphere.linkis.cs.ContextSearch;
-import com.webank.wedatasphere.linkis.cs.DefaultContextSearch;
-import com.webank.wedatasphere.linkis.cs.common.entity.enumeration.ContextType;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextID;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKey;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.common.entity.source.ContextValue;
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.contextcache.ContextCacheService;
-import com.webank.wedatasphere.linkis.cs.exception.ContextSearchFailedException;
-import com.webank.wedatasphere.linkis.cs.persistence.ContextPersistenceManager;
-import com.webank.wedatasphere.linkis.cs.persistence.entity.PersistenceContextKeyValue;
-import com.webank.wedatasphere.linkis.cs.persistence.persistence.ContextMapPersistence;
-import com.webank.wedatasphere.linkis.cs.server.enumeration.ServiceType;
-import com.webank.wedatasphere.linkis.cs.server.parser.KeywordParser;
-import com.webank.wedatasphere.linkis.cs.server.service.ContextService;
-import com.webank.wedatasphere.linkis.server.BDPJettyServerHelper;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Created by patinousward on 2020/2/21.
- */
-@Component
-public class ContextServiceImpl extends ContextService {
-
-    //对接search
-
-    private ContextSearch contextSearch = new DefaultContextSearch();
-
-    @Autowired
-    private ContextCacheService contextCacheService;
-
-    @Autowired
-    private ContextPersistenceManager persistenceManager;
-
-    @Autowired
-    private KeywordParser keywordParser;
-
-
-    private ObjectMapper jackson = BDPJettyServerHelper.jacksonJson();
-
-
-    private ContextMapPersistence getPersistence() throws CSErrorException {
-        return persistenceManager.getContextMapPersistence();
-    }
-
-    @Override
-    public String getName() {
-        return ServiceType.CONTEXT.name();
-    }
-
-    @Override
-    public ContextValue getContextValue(ContextID contextID, ContextKey contextKey) {
-        //从缓存取即可,缓存中无会去数据库中拉取
-        ContextKeyValue keyValue = contextCacheService.get(contextID, contextKey);
-        if (keyValue == null) {
-            return null;
-        }
-        logger.info(String.format("getContextValue,csId:%s,key:%s,csType:%s,csScope:%s",
-                contextID.getContextId(), contextKey.getKey(), contextKey.getContextType(), contextKey.getContextScope()));
-        return keyValue.getContextValue();
-    }
-
-    @Override
-    public List<ContextKeyValue> searchContextValue(ContextID contextID, Map<Object, Object> conditionMap) throws ContextSearchFailedException {
-        //return List<ContextKeyValue>
-        logger.info(String.format("searchContextValue,csId:%s", contextID.getContextId()));
-        return contextSearch.search(contextCacheService, contextID, conditionMap);
-    }
-
-/*    @Override
-    public List<ContextKeyValue> searchContextValueByCondition(Condition condition) throws ContextSearchFailedException {
-        //return List<ContextKeyValue>
-        return contextSearch.search(contextCacheService, null, condition);
-    }*/
-
-    @Override
-    public void setValueByKey(ContextID contextID, ContextKey contextKey, ContextValue contextValue) throws CSErrorException, ClassNotFoundException, JsonProcessingException {
-        //1.获取value
-        Object value = contextValue.getValue();
-        //2.解析keywords,放入contextKey的keys中
-        Set<String> keys = keywordParser.parse(value);
-        keys.add(contextKey.getKey());
-        contextValue.setKeywords(jackson.writeValueAsString(keys));
-        //3.缓存中是否有这个key,没有创建,有就更新
-        ContextKeyValue keyValue = contextCacheService.get(contextID, contextKey);
-        if (keyValue == null) {
-            //创建校验scope和tye
-            if (contextKey.getContextScope() == null || contextKey.getContextType() == null) {
-                throw new CSErrorException(97000, "try to create context ,type or scope cannot be empty");
-            }
-            //这里没有给出contextKeyvalue的具体实现,给个默认的persistence
-            logger.warn(String.format("setValueByKey, keyValue is not exist, csId:%s,key:%s", contextID.getContextId(), contextKey.getKey()));
-            keyValue = new PersistenceContextKeyValue();
-            keyValue.setContextKey(contextKey);
-            keyValue.setContextValue(contextValue);
-            getPersistence().create(contextID, keyValue);
-        } else {
-            //update的话,如果scope和type 是空的,要用数据库中的值,因为update缓存要用到
-            if (contextKey.getContextScope() == null) {
-                contextKey.setContextScope(keyValue.getContextKey().getContextScope());
-            }
-            if (contextKey.getContextType() == null) {
-                contextKey.setContextType(keyValue.getContextKey().getContextType());
-            }
-            keyValue.setContextKey(contextKey);
-            keyValue.setContextValue(contextValue);
-            getPersistence().update(contextID, keyValue);
-        }
-        //4.更新缓存
-        contextCacheService.put(contextID, keyValue);
-        logger.info(String.format("setValueByKey, csId:%s,key:%s,keywords:%s", contextID.getContextId(), contextKey.getKey(), contextValue.getKeywords()));
-    }
-
-    @Override
-    public void setValue(ContextID contextID, ContextKeyValue contextKeyValue) throws CSErrorException, ClassNotFoundException, JsonProcessingException {
-        //1.解析keywords
-        Object value = contextKeyValue.getContextValue().getValue();
-        Set<String> keys = keywordParser.parse(value);
-        keys.add(contextKeyValue.getContextKey().getKey());
-        contextKeyValue.getContextValue().setKeywords(jackson.writeValueAsString(keys));
-        //2.数据库中是否有这个key,没有就创建,有就更新
-        ContextKeyValue keyValue = contextCacheService.get(contextID, contextKeyValue.getContextKey());
-        if (keyValue == null) {
-            logger.warn("cache can not find contextId:{},key:{},now try to load from MySQL", contextID.getContextId(), contextKeyValue.getContextKey().getKey());
-            keyValue = getPersistence().get(contextID, contextKeyValue.getContextKey());
-            if (keyValue != null) {
-                logger.warn("MySQL find the key,now reset the cache and get it");
-                contextCacheService.rest(contextID, contextKeyValue.getContextKey());
-                keyValue = contextCacheService.get(contextID, contextKeyValue.getContextKey());
-            }
-        }
-        if (keyValue == null) {
-            if (contextKeyValue.getContextKey().getContextScope() == null || contextKeyValue.getContextKey().getContextType() == null) {
-                throw new CSErrorException(97000, "try to create context ,type or scope cannot be empty");
-            }
-            getPersistence().create(contextID, contextKeyValue);
-        } else {
-            //update的话,如果scope和type 是空的,要用数据库中的值,因为update缓存要用到
-            if (contextKeyValue.getContextKey().getContextScope() == null) {
-                contextKeyValue.getContextKey().setContextScope(keyValue.getContextKey().getContextScope());
-            }
-            if (contextKeyValue.getContextKey().getContextType() == null) {
-                contextKeyValue.getContextKey().setContextType(keyValue.getContextKey().getContextType());
-            }
-            getPersistence().update(contextID, contextKeyValue);
-        }
-        //3.更新缓存
-        contextCacheService.put(contextID, contextKeyValue);
-        logger.info(String.format("setValue, csId:%s,key:%s", contextID.getContextId(), contextKeyValue.getContextKey().getKey()));
-    }
-
-    @Override
-    public void resetValue(ContextID contextID, ContextKey contextKey) throws CSErrorException {
-        //1.reset 数据库
-        getPersistence().reset(contextID, contextKey);
-        //2.reset 缓存
-        contextCacheService.rest(contextID, contextKey);
-        logger.info(String.format("resetValue, csId:%s,key:%s", contextID.getContextId(), contextKey.getKey()));
-    }
-
-    @Override
-    public void removeValue(ContextID contextID, ContextKey contextKey) throws CSErrorException {
-        ContextKeyValue contextKeyValue = contextCacheService.get(contextID, contextKey);
-        if (contextKeyValue == null) {
-            return;
-        }
-        //如果scope和type 不为空,则从原数据中进行赋值
-        if (contextKey.getContextScope() == null) {
-            contextKey.setContextScope(contextKeyValue.getContextKey().getContextScope());
-        }
-        if (contextKey.getContextType() == null) {
-            contextKey.setContextType(contextKeyValue.getContextKey().getContextType());
-        }
-        //1.remove 数据库
-        getPersistence().remove(contextID, contextKey);
-        //2.remove 缓存
-        contextCacheService.remove(contextID, contextKey);
-        logger.info(String.format("removeValue, csId:%s,key:%s", contextID.getContextId(), contextKey.getKey()));
-    }
-
-    @Override
-    public void removeAllValue(ContextID contextID) throws CSErrorException {
-        //移除数据库
-        getPersistence().removeAll(contextID);
-        //移除缓存
-        contextCacheService.removeAll(contextID);
-
-        logger.info(String.format("removeAllValue, csId:%s", contextID.getContextId()));
-    }
-
-    @Override
-    public void removeAllValueByKeyPrefixAndContextType(ContextID contextID, ContextType contextType, String keyPrefix) throws CSErrorException {
-        contextCacheService.removeByKeyPrefix(contextID, keyPrefix, contextType);
-        getPersistence().removeByKeyPrefix(contextID, contextType, keyPrefix);
-        logger.info(String.format("removeAllValueByKeyPrefixAndContextType, csId:%s,csType:%s,keyPrefix:%s",
-                contextID.getContextId(), contextType, keyPrefix));
-    }
-
-    @Override
-    public void removeAllValueByKeyPrefix(ContextID contextID, String keyPrefix) throws CSErrorException {
-        contextCacheService.removeByKeyPrefix(contextID, keyPrefix);
-        getPersistence().removeByKeyPrefix(contextID, keyPrefix);
-        logger.info(String.format("removeAllValueByKeyPrefix, csId:%s,keyPrefix:%s",
-                contextID.getContextId(), keyPrefix));
-    }
-
-
-}
diff --git a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/util/CsUtils.java b/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/util/CsUtils.java
deleted file mode 100644
index b82e5c4..0000000
--- a/contextservice/cs-server/src/main/java/com/webank/wedatasphere/linkis/cs/server/util/CsUtils.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.cs.server.util;
-
-import com.webank.wedatasphere.linkis.cs.common.exception.CSErrorException;
-import com.webank.wedatasphere.linkis.cs.common.serialize.helper.ContextSerializationHelper;
-import com.webank.wedatasphere.linkis.cs.common.serialize.helper.SerializationHelper;
-
-/**
- * Created by patinousward on 2020/2/22.
- */
-public class CsUtils {
-
-    public static final SerializationHelper SERIALIZE = ContextSerializationHelper.getInstance();
-
-    public static String serialize(Object o) throws CSErrorException {
-        if (o instanceof String){
-            return (String)o;
-        }
-        return SERIALIZE.serialize(o);
-    }
-
-}
diff --git a/contextservice/cs-server/src/main/resources/application.yml b/contextservice/cs-server/src/main/resources/application.yml
deleted file mode 100644
index 246846d..0000000
--- a/contextservice/cs-server/src/main/resources/application.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-server:
-  port: 9004
-spring:
-  application:
-    name: cloud-contextservice
-
-
-eureka:
-  client:
-    serviceUrl:
-      defaultZone: http://127.0.0.1:20303/eureka/
-  instance:
-    metadata-map:
-      test: wedatasphere
-
-management:
-  endpoints:
-    web:
-      exposure:
-        include: refresh,info
-logging:
-  config: classpath:log4j2.xml
diff --git a/contextservice/cs-server/src/main/resources/linkis.properties b/contextservice/cs-server/src/main/resources/linkis.properties
deleted file mode 100644
index 9abef04..0000000
--- a/contextservice/cs-server/src/main/resources/linkis.properties
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# Copyright 2019 WeBank
-# Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-wds.linkis.test.mode=true
-
-wds.linkis.server.mybatis.datasource.url=jdbc:mysql://127.0.0.1:3306/ide_gz_bdap_sit_01?characterEncoding=UTF-8
-wds.linkis.server.mybatis.datasource.username=
-wds.linkis.server.mybatis.datasource.password=
-
-
-wds.linkis.log.clear=true
-wds.linkis.server.version=v1
-
-##restful
-wds.linkis.server.restful.scan.packages=com.webank.wedatasphere.linkis.cs.server.restful
-
-##mybatis
-wds.linkis.server.mybatis.mapperLocations=classpath*:com\\webank\\wedatasphere\\linkis\\cs\\persistence\\dao\\impl\\*.xml
-
-wds.linkis.server.mybatis.typeAliasesPackage=com.webank.wedatasphere.linkis.cs.persistence.entity
-
-wds.linkis.server.mybatis.BasePackage=com.webank.wedatasphere.linkis.cs.persistence.dao
diff --git a/contextservice/cs-server/src/main/resources/log4j.properties b/contextservice/cs-server/src/main/resources/log4j.properties
deleted file mode 100644
index 0807e60..0000000
--- a/contextservice/cs-server/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-# Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-
-### set log levels ###
-
-log4j.rootCategory=INFO,console
-
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.Threshold=INFO
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-#log4j.appender.console.layout.ConversionPattern= %d{ISO8601} %-5p (%t) [%F:%M(%L)] - %m%n
-log4j.appender.console.layout.ConversionPattern= %d{ISO8601} %-5p (%t) %p %c{1} - %m%n
-
-
-log4j.appender.com.webank.bdp.ide.core=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.com.webank.bdp.ide.core.Threshold=INFO
-log4j.additivity.com.webank.bdp.ide.core=false
-log4j.appender.com.webank.bdp.ide.core.layout=org.apache.log4j.PatternLayout
-log4j.appender.com.webank.bdp.ide.core.Append=true
-log4j.appender.com.webank.bdp.ide.core.File=logs/linkis.log
-log4j.appender.com.webank.bdp.ide.core.layout.ConversionPattern= %d{ISO8601} %-5p (%t) [%F:%M(%L)] - %m%n
-
-log4j.logger.org.springframework=INFO
diff --git a/contextservice/cs-server/src/main/resources/log4j2.xml b/contextservice/cs-server/src/main/resources/log4j2.xml
deleted file mode 100644
index 3923cd9..0000000
--- a/contextservice/cs-server/src/main/resources/log4j2.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  ~
-  -->
-
-<configuration status="error" monitorInterval="30">
-    <appenders>
-        <Console name="Console" target="SYSTEM_OUT">
-            <ThresholdFilter level="INFO" onMatch="ACCEPT" onMismatch="DENY"/>
-            <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%t] %logger{36} %L %M - %msg%xEx%n"/>
-        </Console>
-        <RollingFile name="RollingFile" fileName="logs/linkis.log"
-                     filePattern="logs/$${date:yyyy-MM}/linkis-log-%d{yyyy-MM-dd}-%i.log">
-            <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5level] [%-40t] %c{1.} (%L) [%M] - %msg%xEx%n"/>
-            <SizeBasedTriggeringPolicy size="100MB"/>
-            <DefaultRolloverStrategy max="20"/>
-        </RollingFile>
-    </appenders>
-    <loggers>
-        <root level="INFO">
-            <appender-ref ref="RollingFile"/>
-            <appender-ref ref="Console"/>
-        </root>
-    </loggers>
-</configuration>
-
diff --git a/contextservice/cs-ujes-client/pom.xml b/contextservice/cs-ujes-client/pom.xml
deleted file mode 100644
index fd8b60e..0000000
--- a/contextservice/cs-ujes-client/pom.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>linkis-cs-ujes-client</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cs-client</artifactId>
-            </dependency>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-storage</artifactId>
-            <scope>provided</scope>
-            </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>${basedir}/src/main/resources</directory>
-            </resource>
-        </resources>
-    </build>
-
-</project>
\ No newline at end of file
diff --git a/contextservice/cs-ujes-client/src/main/scala/com/webank/wedatasphere/linkis/cs/storage/CSTableResultSetWriter.scala b/contextservice/cs-ujes-client/src/main/scala/com/webank/wedatasphere/linkis/cs/storage/CSTableResultSetWriter.scala
deleted file mode 100644
index 03e8f50..0000000
--- a/contextservice/cs-ujes-client/src/main/scala/com/webank/wedatasphere/linkis/cs/storage/CSTableResultSetWriter.scala
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.cs.storage
-
-import java.util.Date
-
-import com.webank.wedatasphere.linkis.common.io.FsPath
-import com.webank.wedatasphere.linkis.common.utils.Logging
-import com.webank.wedatasphere.linkis.cs.client.service.CSTableService
-import com.webank.wedatasphere.linkis.cs.common.entity.metadata.{CSColumn, CSTable}
-import com.webank.wedatasphere.linkis.storage.resultset.StorageResultSetWriter
-import com.webank.wedatasphere.linkis.storage.resultset.table.{TableMetaData, TableRecord, TableResultSet}
-import com.webank.wedatasphere.linkis.storage.utils.StorageUtils
-import org.apache.commons.lang.StringUtils
-
-/**
-  * @author peacewong
-  * @date 2020/4/1 21:03
-  */
-class CSTableResultSetWriter(tableResult: TableResultSet, maxCacheSize: Long,
-                             storePath: FsPath, contextIDStr: String, nodeName: String, alias: String) extends StorageResultSetWriter[TableMetaData, TableRecord](tableResult, maxCacheSize, storePath) with Logging {
-
-  override def toString: String = {
-    try {
-      registerToCS
-    } catch {
-      case t: Throwable =>
-        info("Failed to register tmp table", t)
-    }
-    super.toString
-  }
-
-  private def registerToCS: Unit = {
-
-    if (StringUtils.isNotBlank(contextIDStr) && StringUtils.isNotBlank(nodeName) && !isEmpty) {
-      info("Start to register resultSet to cs")
-      flush()
-      val csTable = new CSTable
-      csTable.setAlias(alias)
-      csTable.setAvailable(true)
-      csTable.setComment("cs temp table")
-      csTable.setCreateTime(new Date())
-      csTable.setCreator(StorageUtils.getJvmUser)
-      csTable.setExternalUse(true)
-      csTable.setImport(false)
-      csTable.setLocation(toFSPath.getSchemaPath)
-      csTable.setPartitionTable(false)
-      csTable.setView(true)
-      val csColumns = getMetaData.asInstanceOf[TableMetaData].columns.map { column =>
-        val csColumn = new CSColumn
-        csColumn.setName(column.columnName)
-        csColumn.setType(column.dataType.typeName)
-        csColumn.setComment(column.comment)
-        csColumn
-      }
-      csTable.setColumns(csColumns)
-      CSTableService.getInstance().registerCSTable(contextIDStr, nodeName, alias, csTable)
-      info("Finished to register resultSet to cs")
-    }
-  }
-}
diff --git a/core/cloudModule/pom.xml b/core/cloudModule/pom.xml
deleted file mode 100644
index be71d09..0000000
--- a/core/cloudModule/pom.xml
+++ /dev/null
@@ -1,553 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>linkis-module</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-common</artifactId>
-            <exclusions>
-                <exclusion>
-                    <artifactId>json4s-jackson_2.11</artifactId>
-                    <groupId>org.json4s</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jackson-core</artifactId>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot</artifactId>
-            <version>${spring.boot.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.apache.logging.log4j</groupId>
-                    <artifactId>log4j-api</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.apache.logging.log4j</groupId>
-                    <artifactId>log4j-core</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-eureka</artifactId>
-            <version>${spring.eureka.version}</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>jsr311-api</artifactId>
-                    <groupId>javax.ws.rs</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jackson-annotations</artifactId>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jackson-core</artifactId>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jackson-databind</artifactId>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>httpclient</artifactId>
-                    <groupId>org.apache.httpcomponents</groupId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework.cloud</groupId>
-                    <artifactId>spring-cloud-commons</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework.cloud</groupId>
-                    <artifactId>spring-cloud-starter</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework.cloud</groupId>
-                    <artifactId>spring-cloud-starter-openfeign</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework.cloud</groupId>
-                    <artifactId>spring-cloud-starter-netflix-archaius</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework.cloud</groupId>
-                    <artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>guava</artifactId>
-                    <groupId>com.google.guava</groupId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework.boot</groupId>
-                    <artifactId>spring-boot-autoconfigure</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework.boot</groupId>
-                    <artifactId>spring-boot</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework.boot</groupId>
-                    <artifactId>spring-boot-starter-web</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework.cloud</groupId>
-                    <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
-            <version>2.0.0.RELEASE</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>jsr311-api</artifactId>
-                    <groupId>javax.ws.rs</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jackson-databind</artifactId>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jackson-annotations</artifactId>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jackson-core</artifactId>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-jetty</artifactId>
-            <version>${spring.boot.version}</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>asm</artifactId>
-                    <groupId>org.ow2.asm</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>javax.annotation-api</artifactId>
-                    <groupId>javax.annotation</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-web</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.springframework.boot</groupId>
-                    <artifactId>spring-boot-starter-tomcat</artifactId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>hibernate-validator</artifactId>
-                    <groupId>org.hibernate.validator</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jackson-databind</artifactId>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jackson-datatype-jdk8</artifactId>
-                    <groupId>com.fasterxml.jackson.datatype</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jackson-datatype-jsr310</artifactId>
-                    <groupId>com.fasterxml.jackson.datatype</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jackson-module-parameter-names</artifactId>
-                    <groupId>com.fasterxml.jackson.module</groupId>
-                </exclusion>
-            </exclusions>
-            <version>${spring.boot.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter</artifactId>
-            <version>${spring.boot.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.springframework.boot</groupId>
-                    <artifactId>spring-boot-starter-logging</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-log4j2</artifactId>
-            <version>${spring.boot.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-actuator</artifactId>
-            <version>${spring.boot.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.springframework.boot</groupId>
-                    <artifactId>spring-boot-starter-logging</artifactId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jackson-databind</artifactId>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jackson-datatype-jsr310</artifactId>
-                    <groupId>com.fasterxml.jackson.datatype</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-config</artifactId>
-            <version>2.0.0.RELEASE</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.springframework.boot</groupId>
-                    <artifactId>spring-boot-starter-logging</artifactId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jackson-databind</artifactId>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jackson-annotations</artifactId>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>spring-cloud-commons</artifactId>
-                    <groupId>org.springframework.cloud</groupId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework.cloud</groupId>
-                    <artifactId>spring-cloud-context</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-aop</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.springframework.boot</groupId>
-                    <artifactId>spring-boot-starter-logging</artifactId>
-                </exclusion>
-            </exclusions>
-            <version>${spring.boot.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>mysql</groupId>
-            <artifactId>mysql-connector-java</artifactId>
-            <version>5.1.49</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.glassfish.jersey.bundles</groupId>
-            <artifactId>jaxrs-ri</artifactId>
-            <version>2.21</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>jersey-container-servlet-core</artifactId>
-                    <groupId>org.glassfish.jersey.containers</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jersey-container-servlet</artifactId>
-                    <groupId>org.glassfish.jersey.containers</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>javax.annotation-api</artifactId>
-                    <groupId>javax.annotation</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>cglib</groupId>
-            <artifactId>cglib</artifactId>
-            <version>2.2.2</version>
-        </dependency>
-        <dependency>
-            <groupId>commons-dbcp</groupId>
-            <artifactId>commons-dbcp</artifactId>
-            <version>1.4</version>
-        </dependency>
-        <dependency>
-            <groupId>org.eclipse.jetty</groupId>
-            <artifactId>jetty-server</artifactId>
-            <version>${jetty.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.eclipse.jetty</groupId>
-            <artifactId>jetty-webapp</artifactId>
-            <version>${jetty.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.eclipse.jetty.websocket</groupId>
-            <artifactId>websocket-server</artifactId>
-            <version>${jetty.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.glassfish.jersey.ext</groupId>
-            <artifactId>jersey-spring3</artifactId>
-            <version>${jersey.servlet.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.springframework</groupId>
-                    <artifactId>spring</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework</groupId>
-                    <artifactId>spring-core</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework</groupId>
-                    <artifactId>spring-web</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework</groupId>
-                    <artifactId>spring-beans</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework</groupId>
-                    <artifactId>spring-context</artifactId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jersey-server</artifactId>
-                    <groupId>org.glassfish.jersey.core</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-
-        <dependency>
-            <groupId>com.sun.jersey</groupId>
-            <artifactId>jersey-server</artifactId>
-            <version>1.19.1</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>jsr311-api</artifactId>
-                    <groupId>javax.ws.rs</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>com.sun.jersey</groupId>
-            <artifactId>jersey-servlet</artifactId>
-            <version>1.19.1</version>
-        </dependency>
-        <dependency>
-            <groupId>org.glassfish.jersey.containers</groupId>
-            <artifactId>jersey-container-servlet</artifactId>
-            <version>${jersey.servlet.version}</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>jersey-common</artifactId>
-                    <groupId>org.glassfish.jersey.core</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jersey-server</artifactId>
-                    <groupId>org.glassfish.jersey.core</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.glassfish.jersey.containers</groupId>
-            <artifactId>jersey-container-servlet-core</artifactId>
-            <version>${jersey.servlet.version}</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>javax.ws.rs-api</artifactId>
-                    <groupId>javax.ws.rs</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jersey-common</artifactId>
-                    <groupId>org.glassfish.jersey.core</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jersey-server</artifactId>
-                    <groupId>org.glassfish.jersey.core</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <dependency>
-            <groupId>org.glassfish.jersey.media</groupId>
-            <artifactId>jersey-media-json-jackson</artifactId>
-            <version>${jersey.version}</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>jackson-annotations</artifactId>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jackson-core</artifactId>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jackson-databind</artifactId>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jersey-common</artifactId>
-                    <groupId>org.glassfish.jersey.core</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.glassfish.jersey.media</groupId>
-            <artifactId>jersey-media-multipart</artifactId>
-            <version>${jersey.version}</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>jersey-common</artifactId>
-                    <groupId>org.glassfish.jersey.core</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.glassfish.jersey.ext</groupId>
-            <artifactId>jersey-entity-filtering</artifactId>
-            <version>${jersey.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.sun.jersey</groupId>
-            <artifactId>jersey-json</artifactId>
-            <exclusions>
-                <exclusion>
-                    <artifactId>jsr311-api</artifactId>
-                    <groupId>javax.ws.rs</groupId>
-                </exclusion>
-            </exclusions>
-            <version>1.19</version>
-        </dependency>
-
-        <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-databind</artifactId>
-            <version>${fasterxml.jackson.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-annotations</artifactId>
-            <version>${fasterxml.jackson.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.reflections</groupId>
-            <artifactId>reflections</artifactId>
-            <version>0.9.10</version>
-        </dependency>
-
-        <dependency>
-            <groupId>com.google.code.gson</groupId>
-            <artifactId>gson</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>io.netty</groupId>
-            <artifactId>netty-all</artifactId>
-            <version>${netty.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>io.netty</groupId>
-            <artifactId>netty-transport-native-epoll</artifactId>
-            <version>${netty.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.json4s</groupId>
-            <artifactId>json4s-jackson_${scala.binary.version}</artifactId>
-            <version>${json4s.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.scala-lang</groupId>
-                    <artifactId>scala-library</artifactId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jackson-databind</artifactId>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>json4s-core_2.11</artifactId>
-                    <groupId>org.json4s</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-openfeign</artifactId>
-            <version>2.0.0.RELEASE</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>guava</artifactId>
-                    <groupId>com.google.guava</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-    </dependencies>
-
-
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-
-        </plugins>
-        <resources>
-            <resource>
-                <directory>${basedir}/src/main/resources</directory>
-            </resource>
-        </resources>
-        <finalName>${project.artifactId}-${project.version}</finalName>
-    </build>
-
-</project>
diff --git a/core/cloudModule/src/main/assembly/distribution.xml b/core/cloudModule/src/main/assembly/distribution.xml
deleted file mode 100644
index 865b4a9..0000000
--- a/core/cloudModule/src/main/assembly/distribution.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<!--
-  ~ Copyright 2019 WeBank
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<assembly
-        xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/2.3"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/2.3 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-    <id>module</id>
-    <formats>
-        <format>zip</format>
-    </formats>
-    <includeBaseDirectory>true</includeBaseDirectory>
-    <baseDirectory>module</baseDirectory>
-
-    <dependencySets>
-        <dependencySet>
-            <!-- Enable access to all projects in the current multimodule build! <useAllReactorProjects>true</useAllReactorProjects> -->
-            <!-- Now, select which projects to include in this module-set. -->
-            <outputDirectory>lib</outputDirectory>
-            <useProjectArtifact>true</useProjectArtifact>
-            <useTransitiveDependencies>true</useTransitiveDependencies>
-            <unpack>false</unpack>
-            <useStrictFiltering>true</useStrictFiltering>
-            <useTransitiveFiltering>true</useTransitiveFiltering>
-            <excludes>
-                <exclude>io.netty:netty-buffer*</exclude>
-                <exclude>io.netty:netty-codec*</exclude>
-                <exclude>io.netty:netty-common*</exclude>
-                <exclude>io.netty:netty-handler*</exclude>
-                <exclude>io.netty:netty-transport*</exclude>
-            </excludes>
-        </dependencySet>
-    </dependencySets>
-
-</assembly>
-
diff --git a/core/cloudModule/src/main/java/com/webank/wedatasphere/linkis/DataWorkCloudApplication.java b/core/cloudModule/src/main/java/com/webank/wedatasphere/linkis/DataWorkCloudApplication.java
deleted file mode 100644
index 9aac150..0000000
--- a/core/cloudModule/src/main/java/com/webank/wedatasphere/linkis/DataWorkCloudApplication.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis;
-
-import com.webank.wedatasphere.linkis.common.ServiceInstance;
-import com.webank.wedatasphere.linkis.common.conf.BDPConfiguration;
-import com.webank.wedatasphere.linkis.common.conf.Configuration;
-import com.webank.wedatasphere.linkis.common.exception.DWCException;
-import com.webank.wedatasphere.linkis.common.utils.Utils;
-import com.webank.wedatasphere.linkis.server.BDPJettyServerHelper;
-import com.webank.wedatasphere.linkis.server.conf.DataWorkCloudCustomExcludeFilter;
-import com.webank.wedatasphere.linkis.server.conf.ServerConfiguration;
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.eclipse.jetty.server.Handler;
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.servlet.FilterHolder;
-import org.eclipse.jetty.webapp.WebAppContext;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.builder.SpringApplicationBuilder;
-import org.springframework.boot.context.event.ApplicationPreparedEvent;
-import org.springframework.boot.web.embedded.jetty.JettyServerCustomizer;
-import org.springframework.boot.web.embedded.jetty.JettyServletWebServerFactory;
-import org.springframework.boot.web.server.WebServerFactoryCustomizer;
-import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.cloud.context.config.annotation.RefreshScope;
-import org.springframework.cloud.context.scope.refresh.RefreshScopeRefreshedEvent;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ApplicationListener;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ComponentScan;
-import org.springframework.context.annotation.FilterType;
-import org.springframework.core.env.CompositePropertySource;
-import org.springframework.core.env.Environment;
-import org.springframework.core.env.PropertySource;
-import org.springframework.core.env.StandardEnvironment;
-import org.springframework.web.filter.CharacterEncodingFilter;
-
-import javax.servlet.DispatcherType;
-import javax.ws.rs.ext.RuntimeDelegate;
-import java.util.EnumSet;
-
-/**
- * Created by enjoyyin on 2018/8/6.
- */
-@SpringBootApplication
-@EnableDiscoveryClient
-@RefreshScope
-@ComponentScan(basePackages = "com.webank.wedatasphere",
-        excludeFilters = @ComponentScan.Filter(type = FilterType.CUSTOM, classes = {DataWorkCloudCustomExcludeFilter.class}))
-public class DataWorkCloudApplication extends SpringBootServletInitializer {
-    private static final Log logger = LogFactory.getLog(DataWorkCloudApplication.class);
-
-    private static ConfigurableApplicationContext applicationContext;
-    private static ServiceInstance serviceInstance;
-
-    public static ApplicationContext getApplicationContext() {
-        return applicationContext;
-    }
-
-    public static void main(String[] args) throws ReflectiveOperationException {
-        RuntimeDelegate.setInstance(new org.glassfish.jersey.internal.RuntimeDelegateImpl());
-        final SpringApplication application = new SpringApplication(DataWorkCloudApplication.class);
-        application.addListeners(new ApplicationListener<ApplicationPreparedEvent>(){
-            public void onApplicationEvent(ApplicationPreparedEvent applicationPreparedEvent) {
-                logger.info("add config from config server...");
-                if(applicationContext == null) {
-                    applicationContext = applicationPreparedEvent.getApplicationContext();
-                }
-                addRemoteConfig();
-                logger.info("initialize DataWorkCloud spring application...");
-                initDWCApplication();
-            }
-        });
-        application.addListeners(new ApplicationListener<RefreshScopeRefreshedEvent>() {
-            public void onApplicationEvent(RefreshScopeRefreshedEvent applicationEvent) {
-                logger.info("refresh config from config server...");
-                updateRemoteConfig();
-            }
-        });
-        String listeners = ServerConfiguration.BDP_SERVER_SPRING_APPLICATION_LISTENERS().getValue();
-        if(StringUtils.isNotBlank(listeners)) {
-            for (String listener : listeners.split(",")) {
-                application.addListeners((ApplicationListener<?>) Class.forName(listener).newInstance());
-            }
-        }
-        applicationContext = application.run(args);
-    }
-
-    public static void updateRemoteConfig() {
-        addOrUpdateRemoteConfig(applicationContext.getEnvironment(), true);
-    }
-
-    public static void addRemoteConfig() {
-        addOrUpdateRemoteConfig(applicationContext.getEnvironment(), false);
-    }
-
-    private static void addOrUpdateRemoteConfig(Environment env, boolean isUpdateOrNot) {
-        StandardEnvironment environment = (StandardEnvironment) env;
-        PropertySource propertySource = environment.getPropertySources().get("bootstrapProperties");
-        if(propertySource == null) {
-            return;
-        }
-        CompositePropertySource source = (CompositePropertySource) propertySource;
-        for (String key: source.getPropertyNames()) {
-            Object val = source.getProperty(key);
-            if(val == null) {
-                continue;
-            }
-            if(isUpdateOrNot) {
-                logger.info("update remote config => " + key + " = " + source.getProperty(key));
-                BDPConfiguration.set(key, val.toString());
-            } else {
-                logger.info("add remote config => " + key + " = " + source.getProperty(key));
-                BDPConfiguration.setIfNotExists(key, val.toString());
-            }
-        }
-    }
-
-    private static void initDWCApplication() {
-        serviceInstance = new ServiceInstance();
-        serviceInstance.setApplicationName(applicationContext.getEnvironment().getProperty("spring.application.name"));
-        serviceInstance.setInstance(Utils.getLocalHostname() + ":" + applicationContext.getEnvironment().getProperty("server.port"));
-        DWCException.setApplicationName(serviceInstance.getApplicationName());
-        DWCException.setHostname(Utils.getLocalHostname());
-        DWCException.setHostPort(Integer.parseInt(applicationContext.getEnvironment().getProperty("server.port")));
-    }
-
-    public static ServiceInstance getServiceInstance() {
-        return serviceInstance;
-    }
-
-    public static String getApplicationName() {
-      return serviceInstance.getApplicationName();
-    }
-
-    public static String getInstance() {
-        return serviceInstance.getInstance();
-    }
-
-    public static void setProperty(String key, String value) {
-        BDPConfiguration.set(key, value);
-    }
-
-    public static void setPropertyIfNotExists(String key, String value) {
-        BDPConfiguration.setIfNotExists(key, value);
-    }
-
-    @Override
-    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
-        return builder.sources(DataWorkCloudApplication.class);
-    }
-
-    @Bean
-    public WebServerFactoryCustomizer<JettyServletWebServerFactory> jettyFactoryCustomizer() {
-        return new WebServerFactoryCustomizer<JettyServletWebServerFactory>() {
-            public void customize(JettyServletWebServerFactory jettyServletWebServerFactory) {
-                jettyServletWebServerFactory.getJsp().setRegistered(false);
-                jettyServletWebServerFactory.addServerCustomizers(new JettyServerCustomizer() {
-                    public void customize(Server server) {
-                        Handler[] childHandlersByClass = server.getChildHandlersByClass(WebAppContext.class);
-                        final WebAppContext webApp = (WebAppContext) childHandlersByClass[0];
-                        FilterHolder filterHolder = new FilterHolder(CharacterEncodingFilter.class);
-                        filterHolder.setInitParameter("encoding", Configuration.BDP_ENCODING().getValue());
-                        filterHolder.setInitParameter("forceEncoding", "true");
-                        webApp.addFilter(filterHolder, "/*", EnumSet.allOf(DispatcherType.class));
-                        BDPJettyServerHelper.setupRestApiContextHandler(webApp);
-                        if(ServerConfiguration.BDP_SERVER_SOCKET_MODE().getValue()) {
-                            BDPJettyServerHelper.setupControllerServer(webApp);
-                        }
-                        if(!ServerConfiguration.BDP_SERVER_DISTINCT_MODE().getValue()) {
-                            BDPJettyServerHelper.setupWebAppContext(webApp);
-                        }
-                    }
-                });
-            }
-        };
-    }
-}
diff --git a/core/cloudModule/src/main/java/com/webank/wedatasphere/linkis/server/restful/RestfulApplication.java b/core/cloudModule/src/main/java/com/webank/wedatasphere/linkis/server/restful/RestfulApplication.java
deleted file mode 100644
index b396486..0000000
--- a/core/cloudModule/src/main/java/com/webank/wedatasphere/linkis/server/restful/RestfulApplication.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.server.restful;
-
-import com.webank.wedatasphere.linkis.server.conf.ServerConfiguration;
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.codehaus.jackson.jaxrs.JacksonJsonProvider;
-import org.glassfish.jersey.jackson.JacksonFeature;
-import org.glassfish.jersey.media.multipart.MultiPartFeature;
-import org.glassfish.jersey.server.ResourceConfig;
-
-/**
- * Created by enjoyyin on 2018/8/6.
- */
-public class RestfulApplication extends ResourceConfig {
-
-    private static final Log logger = LogFactory.getLog(RestfulApplication.class);
-
-    public RestfulApplication() throws ClassNotFoundException {
-        register(JacksonFeature.class);
-        register(JacksonJsonProvider.class);
-        register(MultiPartFeature.class);
-        String registerClasses = ServerConfiguration.BDP_SERVER_RESTFUL_REGISTER_CLASSES().acquireNew();
-        if(StringUtils.isNotBlank(registerClasses)) {
-            for(String clazz : registerClasses.split(",")) {
-                logger.info("register " + clazz);
-                register(Class.forName(clazz));
-            }
-        }
-        String packages = ServerConfiguration.BDP_SERVER_RESTFUL_SCAN_PACKAGES().acquireNew();
-        if(StringUtils.isNotBlank(packages)) {
-            logger.info("packages " + packages);
-            packages(packages.split(","));
-        }
-    }
-}
diff --git a/core/cloudModule/src/main/scala/com/webank/wedatasphere/linkis/server/BDPJettyServerHelper.scala b/core/cloudModule/src/main/scala/com/webank/wedatasphere/linkis/server/BDPJettyServerHelper.scala
deleted file mode 100644
index a83fa66..0000000
--- a/core/cloudModule/src/main/scala/com/webank/wedatasphere/linkis/server/BDPJettyServerHelper.scala
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.server
-
-import java.io.File
-import java.lang
-import java.lang.reflect.Type
-import java.text.SimpleDateFormat
-import java.util.EnumSet
-
-import com.fasterxml.jackson.databind.ObjectMapper
-import javax.servlet.{DispatcherType, Filter}
-import com.google.gson._
-import com.webank.wedatasphere.linkis.common.utils.Logging
-import com.webank.wedatasphere.linkis.server.conf.ServerConfiguration._
-import com.webank.wedatasphere.linkis.server.restful.RestfulApplication
-import com.webank.wedatasphere.linkis.server.socket.ControllerServer
-import com.webank.wedatasphere.linkis.server.socket.controller.{ServerEventService, ServerListenerEventBus}
-import org.apache.commons.io.FileUtils
-import org.eclipse.jetty.server.session.SessionHandler
-import org.eclipse.jetty.servlet.{DefaultServlet, FilterHolder, ServletContextHandler, ServletHolder}
-import org.eclipse.jetty.webapp.WebAppContext
-import org.glassfish.jersey.servlet.ServletContainer
-
-import scala.collection.mutable
-
-/**
-  * Created by enjoyyin on 2018/8/6.
-  */
-private[linkis] object BDPJettyServerHelper extends Logging {
-
-  private var serverListenerEventBus: ServerListenerEventBus = _
-  private var controllerServer: ControllerServer = _
-  private val services = mutable.Buffer[ServerEventService]()
-
-  private[server] def getControllerServer = controllerServer
-
-  private def createServerListenerEventBus(): Unit = {
-    serverListenerEventBus = new ServerListenerEventBus(BDP_SERVER_EVENT_QUEUE_SIZE.getValue,
-      "WebSocket-Server-Event-ListenerBus", BDP_SERVER_EVENT_CONSUMER_THREAD_SIZE.getValue, BDP_SERVER_EVENT_CONSUMER_THREAD_FREE_MAX.getValue.toLong)
-    services.foreach(serverListenerEventBus.addListener)
-    serverListenerEventBus.start()
-  }
-
-  def addServerEventService(serverEventService: ServerEventService): Unit = {
-    if(serverListenerEventBus != null) serverListenerEventBus.addListener(serverEventService)
-    else services += serverEventService
-  }
-
-  private def getSecurityFilter(): Class[Filter] =
-    Class.forName(BDP_SERVER_SECURITY_FILTER.getValue).asInstanceOf[Class[Filter]]
-
-  def setupRestApiContextHandler(webApp: ServletContextHandler) {
-    val servletHolder = new ServletHolder(classOf[ServletContainer])
-    servletHolder.setInitParameter("javax.ws.rs.Application", classOf[RestfulApplication].getName)
-    servletHolder.setName("restful")
-    servletHolder.setForcedPath("restful")
-    webApp.setSessionHandler(new SessionHandler)
-    val p = BDP_SERVER_RESTFUL_URI.getValue
-    val restfulPath = if(p.endsWith("/*")) p
-    else if(p.endsWith("/")) p + "*"
-    else p + "/*"
-    webApp.addServlet(servletHolder, restfulPath)
-    val filterHolder = new FilterHolder(getSecurityFilter())
-    webApp.addFilter(filterHolder, restfulPath, EnumSet.allOf(classOf[DispatcherType]))
-  }
-
-  def setupControllerServer(webApp: ServletContextHandler): ControllerServer = {
-    if(controllerServer != null) return controllerServer
-    synchronized {
-      if(controllerServer != null) return controllerServer
-      createServerListenerEventBus()
-      controllerServer = new ControllerServer(serverListenerEventBus)
-      val maxTextMessageSize = BDP_SERVER_SOCKET_TEXT_MESSAGE_SIZE_MAX.getValue
-      val servletHolder = new ServletHolder(controllerServer)
-      servletHolder.setInitParameter("maxTextMessageSize", maxTextMessageSize)
-      val p = BDP_SERVER_SOCKET_URI.getValue
-      val socketPath = if(p.endsWith("/*")) p
-      else if(p.endsWith("/")) p + "*"
-      else p + "/*"
-      webApp.addServlet(servletHolder, socketPath)
-      controllerServer
-    }
-  }
-
-  def setupWebAppContext(webApp: WebAppContext): Unit = {
-    webApp.setContextPath(BDP_SERVER_SERVER_CONTEXT_PATH.getValue)
-    var warPath = new File(BDP_SERVER_WAR.getValue)
-    warPath.listFiles().find(_.getName.endsWith(".war")).foreach(warPath = _)
-    if (warPath.isDirectory) {
-      // Development mode, read from FS
-      // webApp.setDescriptor(warPath+"/WEB-INF/web.xml");
-      webApp.setResourceBase(warPath.getPath)
-      webApp.setParentLoaderPriority(true)
-    } else {
-      // use packaged WAR
-      webApp.setWar(warPath.getAbsolutePath)
-      webApp.setExtractWAR(true)
-      val warTempDirectory = new File(BDP_SERVER_WAR_TEMPDIR.getValue)
-      if(warTempDirectory.exists) {
-        warn(s"delete ${warTempDirectory.getPath}, since it is exists.")
-        FileUtils.deleteDirectory(warTempDirectory)
-      }
-      warTempDirectory.mkdir
-      info(s"BDPJettyServer Webapps path: ${warTempDirectory.getPath}.")
-      webApp.setTempDirectory(warTempDirectory)
-    }
-    // Explicit bind to root
-    webApp.addServlet(new ServletHolder(new DefaultServlet), "/*")
-    webApp.setWelcomeFiles(Array("index.html", "index.htm"))
-    webApp.getSessionHandler.setMaxInactiveInterval((BDP_SERVER_WEB_SESSION_TIMEOUT.getValue.toLong / 1000).toInt)
-    webApp.setInitParameter("org.eclipse.jetty.servlet.Default.dirAllowed", BDP_SERVER_SERVER_DEFAULT_DIR_ALLOWED.getValue)
-  }
-
-  implicit val gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ssZ").serializeNulls
-    .registerTypeAdapter(classOf[java.lang.Double], new JsonSerializer[java.lang.Double] {
-      override def serialize(t: lang.Double, `type`: Type, jsonSerializationContext: JsonSerializationContext): JsonElement =
-        if(t == t.longValue()) new JsonPrimitive(t.longValue()) else new JsonPrimitive(t)
-    }).create
-
-  implicit val jacksonJson = new ObjectMapper().setDateFormat(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"))
-}
diff --git a/core/cloudModule/src/main/scala/com/webank/wedatasphere/linkis/server/Message.scala b/core/cloudModule/src/main/scala/com/webank/wedatasphere/linkis/server/Message.scala
deleted file mode 100644
index 5f7ac6d..0000000
--- a/core/cloudModule/src/main/scala/com/webank/wedatasphere/linkis/server/Message.scala
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.server
-
-import java.util
-import javax.ws.rs.Path
-import javax.ws.rs.core.Response
-import javax.xml.bind.annotation.XmlRootElement
-
-import org.apache.commons.lang.StringUtils
-import org.apache.commons.lang.exception.ExceptionUtils
-import org.reflections.ReflectionUtils
-
-/**
-  * Created by enjoyyin on 2018/1/10.
-  */
-@XmlRootElement(name = "message")
-class Message(private var method: String,
-              private var status: Int = 0,          //-1 no login, 0 success, 1 error, 2 validate failed, 3 auth failed, 4 warning
-              private var message: String,
-                   private var data: util.HashMap[String, Object] = new util.HashMap[String, Object]) {
-  def this() = this(null, 0, null)
-  def << (key: String, value: Any): Message = {
-    data.put(key, value.asInstanceOf[AnyRef])
-    this
-  }
-  def << (keyValue: (String, Any)): Message = <<(keyValue._1, keyValue._2)
-
-  def list[T <: Any](keyValue: (String, java.util.List[T])): Message = << (keyValue)
-
-  def map[K <: Any, V <: Any](keyValue: (String, java.util.Map[K, V])): Message = << (keyValue)
-
-  def data(key: String, value: Any): Message = <<(key, value)
-
-  def << (method: String): Message = {
-    this.method = method
-    this
-  }
-  def setMessage(message: String) = {
-    this.message = message
-    this
-  }
-  def getMessage = message
-  def setMethod(method: String): Unit = this.method = method
-  def getMethod = method
-  def setStatus(status: Int): Unit = this.status = status
-  def getStatus = status
-  def setData(data: util.HashMap[String, Object]): Unit = this.data = data
-  def getData = data
-
-//  def isSuccess = status == 0
-//  def isError = status != 0
-
-  override def toString = s"Message($getMethod, $getStatus, $getData)"
-}
-
-object Message {
-  def apply(method: String = null, status: Int = 0, message: String = null,
-            data: util.HashMap[String, Object] = new util.HashMap[String, Object]): Message = {
-    if(StringUtils.isEmpty(method)) {
-      Thread.currentThread().getStackTrace.find(_.getClassName.toLowerCase.endsWith("restfulapi")).foreach { stack =>
-        val clazz = ReflectionUtils.forName(stack.getClassName)
-        val path = clazz.getAnnotation(classOf[Path]).value()
-        clazz.getDeclaredMethods.find(m => m.getName == stack.getMethodName && m.getAnnotation(classOf[Path]) != null)
-          .foreach { m =>
-            val path1 = m.getAnnotation(classOf[Path]).value()
-            var method = if(path.startsWith("/")) path else "/" + path
-            if(method.endsWith("/")) method = method.substring(0, method.length - 1)
-            method = if(path1.startsWith("/")) "/api" + method + path1 else "/api" + method + "/" + path1
-          return new Message(method, status, message, data)
-        }
-      }
-    }
-    new Message(method, status, message, data)
-  }
-  implicit def ok(): Message = Message().setMessage("OK")
-  implicit def ok(msg: String): Message = {
-    val message = Message()
-    if(StringUtils.isNotBlank(msg)) message.setMessage(msg) else message.setMessage("OK")
-  }
-  def error(msg: String): Message = error(msg, null)
-  implicit def error(t: Throwable): Message = {
-    Message(status =  1).setMessage(ExceptionUtils.getRootCauseMessage(t)) << ("stack", ExceptionUtils.getFullStackTrace(t))
-  }
-  implicit def error(e: (String, Throwable)): Message = error(e._1, e._2)
-  implicit def error(msg: String, t: Throwable): Message = {
-    val message = Message(status =  1)
-    message.setMessage(msg)
-    if(t != null) message << ("stack", ExceptionUtils.getFullStackTrace(t))
-    message
-  }
-  implicit def warn(msg: String): Message = {
-    val message = Message(status = 4)
-    message.setMessage(msg)
-    message
-  }
-  implicit def response(message: Message): String = BDPJettyServerHelper.gson.toJson(message)
-  def noLogin(msg: String, t: Throwable): Message = {
-    val message = Message(status = -1)
-    message.setMessage(msg)
-    if(t != null) message << ("stack", ExceptionUtils.getFullStackTrace(t))
-    message
-  }
-  def noLogin(msg: String): Message = noLogin(msg, null)
-  implicit def messageToResponse(message: Message): Response =
-    Response.status(messageToHttpStatus(message)).entity(message).build()
-  implicit def responseToMessage(response: Response): Message = response.readEntity(classOf[Message])
-  def messageToHttpStatus(message: Message): Int = message.getStatus match {
-    case -1 => 401
-    case 0 => 200
-    case 1 => 400
-    case 2 => 412
-    case 3 => 403
-    case 4 => 206
-  }
-}
\ No newline at end of file
diff --git a/core/cloudModule/src/main/scala/com/webank/wedatasphere/linkis/server/conf/ServerConfiguration.scala b/core/cloudModule/src/main/scala/com/webank/wedatasphere/linkis/server/conf/ServerConfiguration.scala
deleted file mode 100644
index 52c4568..0000000
--- a/core/cloudModule/src/main/scala/com/webank/wedatasphere/linkis/server/conf/ServerConfiguration.scala
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.server.conf
-
-import java.io.File
-import java.lang.Boolean
-
-import com.webank.wedatasphere.linkis.common.conf.{CommonVars, Configuration, TimeType}
-import com.webank.wedatasphere.linkis.common.utils.{DESUtil, Utils}
-import com.webank.wedatasphere.linkis.server.exception.BDPInitServerException
-import org.apache.commons.lang.StringUtils
-import sun.misc.BASE64Encoder
-
-/**
-  * Created by enjoyyin on 2018/1/9.
-  */
-object ServerConfiguration {
-  val BDP_SERVER_EXCLUDE_PACKAGES = CommonVars("wds.linkis.server.component.exclude.packages", "")
-  val BDP_SERVER_EXCLUDE_CLASSES = CommonVars("wds.linkis.server.component.exclude.classes", "")
-  val BDP_SERVER_EXCLUDE_ANNOTATION = CommonVars("wds.linkis.server.component.exclude.annotation", "")
-  val BDP_SERVER_SPRING_APPLICATION_LISTENERS = CommonVars("wds.linkis.server.spring.application.listeners", "")
-
-  val BDP_SERVER_VERSION = CommonVars("wds.linkis.server.version", "").getValue
-  if(StringUtils.isBlank(BDP_SERVER_VERSION)) {
-    throw new BDPInitServerException(10010, "DataWorkCloud service must set the version, please add property [[wds.linkis.server.version]] to properties file.")
-  }
-
-  val cryptKey =  new BASE64Encoder().encode(CommonVars("wds.linkis.crypt.key", "bdp-for-server").getValue.getBytes)
-  private val ticketHeader = CommonVars("wds.linkis.ticket.header", "bfs_").getValue
-  def getUsernameByTicket(ticketId: String): Option[String] = if(StringUtils.isEmpty(ticketId)) None
-  else {
-    val userName = DESUtil.decrypt(ticketId, ServerConfiguration.cryptKey)
-    if(userName.startsWith(ticketHeader)) Some(userName.substring(ticketHeader.length))
-    else None
-  }
-  def getUsernameByTicket(ticketId: Any): Option[String] = if(ticketId == null) None else getUsernameByTicket(ticketId.toString)
-  def getTicketByUsername(userName: String): String = DESUtil.encrypt(ticketHeader + userName, ServerConfiguration.cryptKey)
-
-  val BDP_TEST_USER = CommonVars("wds.linkis.test.user", "")
-
-  val BDP_SERVER_HOME = CommonVars("wds.linkis.server.home", CommonVars("BDP_SERVER_HOME", "").getValue)
-  val BDP_SERVER_DISTINCT_MODE = CommonVars("wds.linkis.server.distinct.mode", new Boolean(true))
-  if(!BDP_SERVER_DISTINCT_MODE.getValue && StringUtils.isEmpty(BDP_SERVER_HOME.getValue))
-    throw new BDPInitServerException(11000, "wds.linkis.server.home或BDP_SERVER_HOME haven't set!")
-  val BDP_SERVER_SOCKET_MODE = CommonVars("wds.linkis.server.socket.mode", new Boolean(false))
-  val BDP_SERVER_IDENT_STRING = CommonVars("wds.linkis.server.ident.string", "true")
-  val BDP_SERVER_SERVER_JETTY_NAME = CommonVars("wds.linkis.server.jetty.name", "")
-  val BDP_SERVER_ADDRESS = CommonVars("wds.linkis.server.address", Utils.getLocalHostname)
-  val BDP_SERVER_PORT = CommonVars("wds.linkis.server.port", 20303)
-  val BDP_SERVER_SECURITY_FILTER = CommonVars("wds.linkis.server.security.filter", "com.webank.wedatasphere.linkis.server.security.SecurityFilter")
-  val BDP_SERVER_SECURITY_REFERER_VALIDATE = CommonVars("wds.linkis.server.security.referer.validate", false)
-  val BDP_SERVER_SECURITY_SSL = CommonVars("wds.linkis.server.security.ssl", false)
-  val BDP_SERVER_SECURITY_SSL_EXCLUDE_PROTOCOLS = CommonVars("wds.linkis.server.security.ssl.excludeProtocols", "SSLv2,SSLv3")
-  val BDP_SERVER_SECURITY_SSL_KEYSTORE_PATH = CommonVars("wds.linkis.server.security.ssl.keystore.path",
-    new File(BDP_SERVER_HOME.getValue, "keystore").getPath)
-  val BDP_SERVER_SECURITY_SSL_KEYSTORE_TYPE = CommonVars("wds.linkis.server.security.ssl.keystore.type", "JKS")
-  val BDP_SERVER_SECURITY_SSL_KEYSTORE_PASSWORD = CommonVars("wds.linkis.server.security.ssl.keystore.password", "")
-  val BDP_SERVER_SECURITY_SSL_KEY_MANAGER_PASSWORD = CommonVars("wds.linkis.server.security.ssl.key.manager.password", "")
-  val BDP_SERVER_SECURITY_SSL_CIPHER_SUITES = CommonVars("wds.linkis.server.security.ssl.cipher.suites",
-    "")
-
-  val BDP_SERVER_SERVER_CONTEXT_PATH = CommonVars("wds.linkis.server.context.path", "/")
-  val BDP_SERVER_RESTFUL_URI = CommonVars("wds.linkis.server.restful.uri", "/api/rest_j/" + BDP_SERVER_VERSION)
-  val BDP_SERVER_USER_URI = CommonVars("wds.linkis.server.user.restful.uri", "/api/rest_j/" + BDP_SERVER_VERSION + "/user")
-  val BDP_SERVER_RESTFUL_LOGIN_URI = CommonVars("wds.linkis.server.user.restful.login.uri", new File(BDP_SERVER_USER_URI.getValue, "login").getPath)
-  val BDP_SERVER_SECURITY_SSL_URI = CommonVars("wds.linkis.server.user.security.ssl.uri", new File(BDP_SERVER_USER_URI.getValue, "publicKey").getPath)
-  val BDP_SERVER_SOCKET_URI = CommonVars("wds.linkis.server.socket.uri", "/ws")
-  val BDP_SERVER_SOCKET_LOGIN_URI = CommonVars("wds.linkis.server.socket.login.uri", "/ws/user/login")
-  val BDP_SERVER_WAR = CommonVars("wds.linkis.server.war", new File(BDP_SERVER_HOME.getValue, "web/dist").getPath)
-  val BDP_SERVER_WAR_TEMPDIR = CommonVars("wds.linkis.server.war.tempdir", new File(BDP_SERVER_HOME.getValue, "web/webapps").getPath)
-  val BDP_SERVER_SERVER_DEFAULT_DIR_ALLOWED = CommonVars("wds.linkis.server.default.dir.allowed", "false")
-  val BDP_SERVER_WEB_SESSION_TIMEOUT = CommonVars("wds.linkis.server.web.session.timeout", new TimeType("2h"))
-
-  val BDP_SERVER_EVENT_QUEUE_SIZE = CommonVars("wds.linkis.server.event.queue.size", 5000)
-  val BDP_SERVER_EVENT_CONSUMER_THREAD_SIZE = CommonVars("wds.linkis.server.event.consumer.thread", 10)
-  val BDP_SERVER_EVENT_CONSUMER_THREAD_FREE_MAX = CommonVars("wds.linkis.server.event.consumer.thread.max.free", new TimeType("2m"))
-
-  val BDP_SERVER_SOCKET_QUEUE_SIZE = CommonVars("wds.linkis.server.socket.queue.size", BDP_SERVER_EVENT_CONSUMER_THREAD_SIZE.getValue * 20)
-  val BDP_SERVER_SOCKET_TEXT_MESSAGE_SIZE_MAX = CommonVars("wds.linkis.server.socket.text.message.size.max", "1024000")
-
-  val BDP_SERVER_ENCODING = Configuration.BDP_ENCODING
-
-  val BDP_SERVER_RESTFUL_SCAN_PACKAGES = CommonVars("wds.linkis.server.restful.scan.packages", "")
-  val BDP_SERVER_RESTFUL_REGISTER_CLASSES = CommonVars("wds.linkis.server.restful.register.classes", "")
-//  val BDP_SERVER_SOCKET_SERVICE_SCAN_PACKAGES = CommonVars("wds.linkis.server.socket.service.scan.packages", BDP_SERVER_RESTFUL_SCAN_PACKAGES.getValue)
-}
diff --git a/core/cloudModule/src/main/scala/com/webank/wedatasphere/linkis/server/package.scala b/core/cloudModule/src/main/scala/com/webank/wedatasphere/linkis/server/package.scala
deleted file mode 100644
index 5f00528..0000000
--- a/core/cloudModule/src/main/scala/com/webank/wedatasphere/linkis/server/package.scala
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis
-
-import java.util
-
-import javax.servlet.http.HttpServletRequest
-import com.webank.wedatasphere.linkis.common.exception.{ErrorException, ExceptionManager, FatalException, WarnException}
-import com.webank.wedatasphere.linkis.common.utils.Utils
-import com.webank.wedatasphere.linkis.server.exception.{BDPServerErrorException, NonLoginException}
-import com.webank.wedatasphere.linkis.server.security.SecurityFilter
-import org.apache.commons.lang.StringUtils
-import org.apache.commons.lang.exception.ExceptionUtils
-import org.slf4j.Logger
-
-import scala.collection.{JavaConversions, mutable}
-
-/**
-  * Created by enjoyyin on 2018/5/2.
-  */
-package object server {
-
-  val EXCEPTION_MSG = "errorMsg"
-  type JMap[K, V] = java.util.HashMap[K, V]
-
-  implicit def getUser(req: HttpServletRequest): String = SecurityFilter.getLoginUsername(req)
-
-  def validateFailed(message: String): Message = Message(status = 2).setMessage(message)
-  def validate[T](json: util.Map[String, T], keys: String*): Unit = {
-    keys.foreach(k => if(!json.contains(k) || json.get(k) == null || StringUtils.isEmpty(json.get(k).toString))
-      throw new BDPServerErrorException(11001, s"Verification failed, $k cannot be empty!(验证失败,$k 不能为空!)"))
-  }
-  def error(message: String): Message = Message.error(message)
-  implicit def ok(msg: String): Message = Message.ok(msg)
-  implicit def error(t: Throwable): Message = Message.error(t)
-  implicit def error(e: (String, Throwable)): Message = Message.error(e)
-  implicit def error(msg: String, t: Throwable): Message = Message.error(msg -> t)
-  //  def tryCatch[T](tryOp: => T)(catchOp: Throwable => T): T = Utils.tryCatch(tryOp)(catchOp)
-//  def tryCatch(tryOp: => Message)(catchOp: Throwable => Message): Message = Utils.tryCatch(tryOp){
-//    case nonLogin: NonLoginException => Message.noLogin(msg = nonLogin.getMessage)
-//    case t => catchOp(t)
-//  }
-  def catchMsg(tryOp: => Message)(msg: String)(implicit log: Logger): Message = Utils.tryCatch(tryOp){
-    case fatal: FatalException =>
-      log.error("Fatal Error, system exit...", fatal)
-      System.exit(fatal.getErrCode)
-      Message.error("Fatal Error, system exit...")
-    case nonLogin: NonLoginException =>
-      val message = Message.noLogin(nonLogin.getMessage)
-      message.data(EXCEPTION_MSG, nonLogin.toMap)
-      message
-    case error: ErrorException =>
-      val cause = error.getCause
-      val errorMsg = cause match {
-        case t: ErrorException => s"error code(错误码): ${t.getErrCode}, error message(错误信息): ${t.getDesc}."
-        case _ => s"error code(错误码): ${error.getErrCode}, error message(错误信息): ${error.getDesc}."
-      }
-      log.error(errorMsg, error)
-      val message = Message.error(errorMsg)
-      message.data(EXCEPTION_MSG, error.toMap)
-      message
-    case warn: WarnException =>
-      val warnMsg = s"Warning code(警告码): ${warn.getErrCode}, Warning message(警告信息): ${warn.getDesc}."
-      log.warn(warnMsg, warn)
-      val message = Message.warn(warnMsg)
-      message.data(EXCEPTION_MSG, warn.toMap)
-      message
-    case t =>
-      log.error(msg, t)
-      val errorMsg = ExceptionUtils.getRootCauseMessage(t)
-      val message = if(StringUtils.isNotEmpty(errorMsg) && "operation failed(操作失败)" != msg) error(msg + "!the reason(原因):" + errorMsg)
-      else if(StringUtils.isNotEmpty(errorMsg)) error(errorMsg) else error(msg)
-      message.data(EXCEPTION_MSG, ExceptionManager.unknownException(message.getMessage))
-  }
-  def catchIt(tryOp: => Message)(implicit log: Logger): Message = catchMsg(tryOp)("operation failed(操作失败)s")
-  implicit def toScalaBuffer[T](list: util.List[T]): mutable.Buffer[T] = JavaConversions.asScalaBuffer(list)
-  implicit def toScalaMap[K, V](map: util.Map[K, V]): mutable.Map[K, V] = JavaConversions.mapAsScalaMap(map)
-  implicit def toJavaList[T](list: mutable.Buffer[T]): util.List[T] = {
-    val arrayList = new util.ArrayList[T]
-    list.foreach(arrayList.add)
-    arrayList
-  }
-  implicit def toJavaMap[K, V](map: mutable.Map[K, V]): JMap[K, V] = {
-    val hashMap = new util.HashMap[K, V]()
-    map.foreach(m => hashMap.put(m._1, m._2))
-    hashMap
-  }
-  implicit def toJavaMap[K, V](map: Map[K, V]): JMap[K, V] = {
-    val hashMap = new util.HashMap[K, V]()
-    map.foreach(m => hashMap.put(m._1, m._2))
-    hashMap
-  }
-  implicit def asString(mapWithKey: (util.Map[String, Object], String)): String = mapWithKey._1.get(mapWithKey._2).asInstanceOf[String]
-  implicit def getString(mapWithKey: (util.Map[String, String], String)): String = mapWithKey._1.get(mapWithKey._2)
-  implicit def asInt(map: util.Map[String, Object], key: String): Int = map.get(key).asInstanceOf[Int]
-  implicit def asBoolean(mapWithKey: (util.Map[String, Object], String)): Boolean = mapWithKey._1.get(mapWithKey._2).asInstanceOf[Boolean]
-
-}
diff --git a/core/cloudModule/src/main/scala/com/webank/wedatasphere/linkis/server/restful/RestfulCatchAOP.scala b/core/cloudModule/src/main/scala/com/webank/wedatasphere/linkis/server/restful/RestfulCatchAOP.scala
deleted file mode 100644
index 70d3c0c..0000000
--- a/core/cloudModule/src/main/scala/com/webank/wedatasphere/linkis/server/restful/RestfulCatchAOP.scala
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.server.restful
-
-import javax.ws.rs.core.Response
-
-import com.webank.wedatasphere.linkis.common.utils.Logging
-import com.webank.wedatasphere.linkis.server.{Message, catchIt}
-import org.aspectj.lang.ProceedingJoinPoint
-import org.aspectj.lang.annotation.{Around, Aspect, Pointcut}
-import org.springframework.stereotype.Component
-
-/**
-  * Created by enjoyyin on 2018/8/9.
-  */
-@Aspect
-@Component
-class RestfulCatchAOP extends Logging {
-
-  @Pointcut("@annotation(javax.ws.rs.Path) && execution(public com.webank.wedatasphere.linkis.server.Message *(..))")
-  def restfulMessageCatch() : Unit = {}
-
-  @Around("restfulMessageCatch()")
-  def dealMessageRestful(proceedingJoinPoint: ProceedingJoinPoint): Object = catchIt {
-    proceedingJoinPoint.proceed().asInstanceOf[Message]
-  }
-
-  @Pointcut("@annotation(javax.ws.rs.Path) && execution(public javax.ws.rs.core.Response *(..)))")
-  def restfulResponseCatch() : Unit = {}
-
-  @Around("restfulResponseCatch()")
-  def dealResponseRestful(proceedingJoinPoint: ProceedingJoinPoint): Object = {
-    val resp: Response = catchIt {
-      return proceedingJoinPoint.proceed()
-    }
-    resp
-  }
-
-}
diff --git a/core/cloudModule/src/main/scala/com/webank/wedatasphere/linkis/server/security/SecurityFilter.scala b/core/cloudModule/src/main/scala/com/webank/wedatasphere/linkis/server/security/SecurityFilter.scala
deleted file mode 100644
index 1d01cd6..0000000
--- a/core/cloudModule/src/main/scala/com/webank/wedatasphere/linkis/server/security/SecurityFilter.scala
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.server.security
-
-import java.text.DateFormat
-import java.util.{Date, Locale}
-
-import com.webank.wedatasphere.linkis.common.conf.{CommonVars, Configuration}
-import com.webank.wedatasphere.linkis.common.utils.{Logging, RSAUtils, Utils}
-import com.webank.wedatasphere.linkis.server.conf.ServerConfiguration
-import com.webank.wedatasphere.linkis.server.exception.{IllegalUserTicketException, LoginExpireException, NonLoginException}
-import com.webank.wedatasphere.linkis.server.security.SSOUtils.sslEnable
-import com.webank.wedatasphere.linkis.server.{Message, _}
-import javax.servlet._
-import javax.servlet.http.{Cookie, HttpServletRequest, HttpServletResponse}
-import org.apache.commons.lang.StringUtils
-
-/**
-  * Created by enjoyyin on 2018/1/9.
-  */
-class SecurityFilter extends Filter with Logging {
-  private val refererValidate = ServerConfiguration.BDP_SERVER_SECURITY_REFERER_VALIDATE.getValue
-  private val localAddress = ServerConfiguration.BDP_SERVER_ADDRESS.getValue
-  protected val testUser = ServerConfiguration.BDP_TEST_USER.getValue
-
-  override def init(filterConfig: FilterConfig): Unit = {}
-
-  private def filterResponse(message: Message)(implicit response: HttpServletResponse): Unit = {
-    response.setHeader("Content-Type", "application/json;charset=UTF-8")
-    response.setStatus(Message.messageToHttpStatus(message))
-    response.getOutputStream.print(message)
-    response.getOutputStream.flush()
-  }
-
-  def doFilter(request: HttpServletRequest)(implicit response: HttpServletResponse): Boolean = {
-    addAccessHeaders(response)
-    if(refererValidate) {
-      //Security certification support, referer limited(安全认证支持,referer限定)
-      val referer = request.getHeader("Referer")
-      if(StringUtils.isNotEmpty(referer) && !referer.trim.contains(localAddress)) {
-        filterResponse(validateFailed("不允许的跨站请求!"))
-        return false
-      }
-      //Security certification support, solving verb tampering(安全认证支持,解决动词篡改)
-      request.getMethod.toUpperCase match {
-        case "GET" | "POST" | "PUT" | "DELETE" | "HEAD" | "TRACE" | "CONNECT" | "OPTIONS" =>
-        case _ =>
-          filterResponse(validateFailed("Do not use HTTP verbs to tamper with!(不可使用HTTP动词篡改!)"))
-          return false
-      }
-    }
-    
-    if(request.getRequestURI == ServerConfiguration.BDP_SERVER_SECURITY_SSL_URI.getValue) {
-      val message = Message.ok("Get success!(获取成功!)").data("enable", SSOUtils.sslEnable)
-      if(SSOUtils.sslEnable) message.data("publicKey", RSAUtils.getDefaultPublicKey())
-      filterResponse(message)
-      false
-    } else if(request.getRequestURI == ServerConfiguration.BDP_SERVER_RESTFUL_LOGIN_URI.getValue) {
-      true
-    } else {
-      val userName = Utils.tryCatch(SecurityFilter.getLoginUser(request)){
-        case n: NonLoginException =>
-          if(Configuration.IS_TEST_MODE.getValue) None else {
-            filterResponse(Message.noLogin(n.getMessage) << request.getRequestURI)
-            return false
-          }
-        case t: Throwable =>
-          SecurityFilter.warn("", t)
-          throw t
-      }
-      if(userName.isDefined) {
-        true
-      } else if(Configuration.IS_TEST_MODE.getValue) {
-        SecurityFilter.info("test mode! login for uri: " + request.getRequestURI)
-        SecurityFilter.setLoginUser(response, testUser)
-        true
-      } else {
-        filterResponse(Message.noLogin("You are not logged in, please login first!(您尚未登录,请先登录!)") << request.getRequestURI)
-        false
-      }
-    }
-  }
-
-  override def doFilter(servletRequest: ServletRequest, servletResponse: ServletResponse, filterChain: FilterChain): Unit = {
-    val request = servletRequest.asInstanceOf[HttpServletRequest]
-    implicit val response = servletResponse.asInstanceOf[HttpServletResponse]
-    if(doFilter(request)) filterChain.doFilter(servletRequest, servletResponse)
-    if(SecurityFilter.isRequestIgnoreTimeout(request)) SecurityFilter.removeIgnoreTimeoutSignal(response)
-  }
-
-  protected def addAccessHeaders(response: HttpServletResponse) {
-    response.setHeader("Access-Control-Allow-Origin", "*")
-    response.setHeader("Access-Control-Allow-Credentials", "true")
-    response.setHeader("Access-Control-Allow-Headers", "authorization,Content-Type")
-    response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, HEAD, DELETE")
-    val fullDateFormatEN = DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL, new Locale("EN", "en"))
-    response.setHeader("Date", fullDateFormatEN.format(new Date))
-  }
-
-  override def destroy(): Unit = {}
-}
-
-object SecurityFilter extends Logging {
-  private[linkis] val OTHER_SYSTEM_IGNORE_UM_USER = "dataworkcloud_rpc_user"
-  private[linkis] val ALLOW_ACCESS_WITHOUT_TIMEOUT = "dataworkcloud_inner_request"
-  def getLoginUserThrowsExceptionWhenTimeout(req: HttpServletRequest): Option[String] = Option(req.getCookies).flatMap(cs => SSOUtils.getLoginUser(cs))
-    .orElse(SSOUtils.getLoginUserIgnoreTimeout(key => Option(req.getHeader(key))).filter(_ == OTHER_SYSTEM_IGNORE_UM_USER))
-  def getLoginUser(req: HttpServletRequest): Option[String] = Utils.tryCatch(getLoginUserThrowsExceptionWhenTimeout(req)) {
-    case _: LoginExpireException =>
-      SSOUtils.getLoginUserIgnoreTimeout(key => Option(req.getCookies).flatMap(_.find(_.getName == key).map(_.getValue))).filter(user => user != OTHER_SYSTEM_IGNORE_UM_USER &&
-        isRequestIgnoreTimeout(req))
-    case t => throw t
-  }
-  def isRequestIgnoreTimeout(req: HttpServletRequest): Boolean = Option(req.getCookies).exists(_.exists(c => c.getName == ALLOW_ACCESS_WITHOUT_TIMEOUT && c.getValue == "true"))
-  def addIgnoreTimeoutSignal(response: HttpServletResponse): Unit = response.addCookie(ignoreTimeoutSignal())
-  def ignoreTimeoutSignal(): Cookie = {
-    val cookie = new Cookie(ALLOW_ACCESS_WITHOUT_TIMEOUT, "true")
-    cookie.setMaxAge(-1)
-    cookie.setPath("/")
-    if(sslEnable) cookie.setSecure(true)
-    cookie
-  }
-  def removeIgnoreTimeoutSignal(response: HttpServletResponse): Unit = {
-    val cookie = new Cookie(ALLOW_ACCESS_WITHOUT_TIMEOUT, "false")
-    cookie.setMaxAge(0)
-    cookie.setPath("/")
-    if(sslEnable) cookie.setSecure(true)
-    response.addCookie(cookie)
-  }
-  def getLoginUsername(req: HttpServletRequest): String = getLoginUser(req).getOrElse(throw new IllegalUserTicketException( s"Illegal user token information(非法的用户token信息)."))
-  def setLoginUser(resp: HttpServletResponse, username: String): Unit = SSOUtils.setLoginUser(c => resp.addCookie(c), username)
-  def removeLoginUser(req: HttpServletRequest, resp: HttpServletResponse): Unit = {
-    SSOUtils.removeLoginUser(req.getCookies)
-    SSOUtils.removeLoginUserByAddCookie(s => resp.addCookie(s))
-  }
-}
\ No newline at end of file
diff --git a/core/cloudModule/src/main/scala/com/webank/wedatasphere/linkis/server/socket/ServerSocket.scala b/core/cloudModule/src/main/scala/com/webank/wedatasphere/linkis/server/socket/ServerSocket.scala
deleted file mode 100644
index f79b552..0000000
--- a/core/cloudModule/src/main/scala/com/webank/wedatasphere/linkis/server/socket/ServerSocket.scala
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.server.socket
-
-import java.util.concurrent.TimeUnit
-
-import com.webank.wedatasphere.linkis.common.collection.BlockingLoopArray
-import com.webank.wedatasphere.linkis.common.utils.Utils
-import javax.servlet.http.HttpServletRequest
-import com.webank.wedatasphere.linkis.server.security.SecurityFilter
-import org.eclipse.jetty.websocket.api.{Session, WebSocketAdapter}
-
-/**
-  * Created by enjoyyin on 2018/1/9.
-  */
-case class ServerSocket(request: HttpServletRequest, socketListener: SocketListener, protocol: String = "")
-  extends WebSocketAdapter {
-  private var session: Session = _
-  private[socket] var id: Int = _
-  val createTime = System.currentTimeMillis
-  def user = SecurityFilter.getLoginUser(request)
-  //Add a queue to do buffering, can not directly sendMessage back, will lead to the connection can not stand
-  //加一个队列做缓冲,不能直接sendMessage回去,会导致连接受不住
-  private val cacheMessages = new BlockingLoopArray[String](100)
-  Utils.defaultScheduler.scheduleAtFixedRate(new Runnable {
-    override def run(): Unit = {
-      var message = cacheMessages.poll()
-      while(message.isDefined) {
-        message.foreach(session.getRemote.sendString)
-        message = cacheMessages.poll()
-      }
-    }
-  }, 1000, 1000, TimeUnit.MILLISECONDS)
-
-  override def onWebSocketClose(statusCode: Int, reason: String): Unit = socketListener.onClose(this, statusCode, reason)
-
-  override def onWebSocketConnect(sess: Session): Unit = {
-    session = sess
-    socketListener.onOpen(this)
-  }
-
-  override def onWebSocketText(message: String): Unit = socketListener.onMessage(this, message)
-
-  def sendMessage(message: String): Unit ={
-    cacheMessages.put(message)
-  }
-
-  override def toString: String = s"ServerSocket($id, $user)"
-}
diff --git a/core/cloudMybatis/pom.xml b/core/cloudMybatis/pom.xml
deleted file mode 100644
index c4dade4..0000000
--- a/core/cloudMybatis/pom.xml
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-    <packaging>jar</packaging>
-
-    <artifactId>linkis-mybatis</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-module</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.mybatis.spring.boot</groupId>
-            <artifactId>mybatis-spring-boot-starter</artifactId>
-            <version>1.3.2</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>spring-boot-starter</artifactId>
-                    <groupId>org.springframework.boot</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>spring-boot-autoconfigure</artifactId>
-                    <groupId>org.springframework.boot</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>spring-beans</artifactId>
-                    <groupId>org.springframework</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>com.github.pagehelper</groupId>
-            <artifactId>pagehelper</artifactId>
-            <version>5.1.4</version>
-        </dependency>
-    </dependencies>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>src/main/resources</directory>
-            </resource>
-        </resources>
-        <finalName>${project.artifactId}-${project.version}</finalName>
-    </build>
-</project>
\ No newline at end of file
diff --git a/core/cloudMybatis/src/main/java/com/webank/wedatasphere/linkis/mybatis/MybatisConfigurationFactory.java b/core/cloudMybatis/src/main/java/com/webank/wedatasphere/linkis/mybatis/MybatisConfigurationFactory.java
deleted file mode 100644
index 131b412..0000000
--- a/core/cloudMybatis/src/main/java/com/webank/wedatasphere/linkis/mybatis/MybatisConfigurationFactory.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.mybatis;
-
-import com.github.pagehelper.PageHelper;
-import com.github.pagehelper.PageInterceptor;
-import com.webank.wedatasphere.linkis.common.utils.JavaLog;
-import com.webank.wedatasphere.linkis.mybatis.conf.MybatisConfiguration;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.lang.StringUtils;
-import org.apache.ibatis.plugin.Interceptor;
-import org.apache.ibatis.session.SqlSessionFactory;
-import org.mybatis.spring.SqlSessionFactoryBean;
-import org.mybatis.spring.SqlSessionTemplate;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Primary;
-import org.springframework.core.io.DefaultResourceLoader;
-import org.springframework.core.io.Resource;
-import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
-import org.springframework.jdbc.datasource.DataSourceTransactionManager;
-import org.springframework.transaction.PlatformTransactionManager;
-import org.springframework.transaction.annotation.EnableTransactionManagement;
-
-import javax.sql.DataSource;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-
-/**
- * Created by enjoyyin on 2018/8/6.
- */
-@Configuration
-@ConfigurationProperties
-@AutoConfigureAfter(DataSourceConfig.class)
-@EnableTransactionManagement
-public class MybatisConfigurationFactory extends JavaLog {
-
-    @Autowired
-    private DataSource dataSource;
-    // Provide SqlSeesion(提供SqlSeesion)
-    @Bean(name = "sqlSessionFactory")
-    @Primary
-    public SqlSessionFactory sqlSessionFactory() {
-        String typeAliasesPackage = MybatisConfiguration.BDP_SERVER_MYBATIS_TYPEALIASESPACKAGE.getValue();
-        //Configure the mapper scan to find all mapper.xml mapping files(配置mapper的扫描,找到所有的mapper.xml映射文件)
-        String mapperLocations = MybatisConfiguration.BDP_SERVER_MYBATIS_MAPPER_LOCATIONS.getValue();
-        //Load the global configuration file(加载全局的配置文件)
-        String configLocation = MybatisConfiguration.BDP_SERVER_MYBATIS_CONFIGLOCATION.getValue();
-        try {
-            SqlSessionFactoryBean sessionFactoryBean = new SqlSessionFactoryBean();
-            sessionFactoryBean.setDataSource(dataSource);
-
-            info("Mybatis typeAliasesPackage=" + typeAliasesPackage);
-            info("Mybatis mapperLocations=" + mapperLocations);
-            info("Mybatis configLocation=" + configLocation);
-            // Read configuration(读取配置)
-            sessionFactoryBean.setTypeAliasesPackage(typeAliasesPackage);
-
-            //Set the location of the mapper.xml file(设置mapper.xml文件所在位置)
-            if(StringUtils.isNotBlank(mapperLocations)) {
-                String[] mapperArray = mapperLocations.split(",");
-                List<Resource> resources = new ArrayList<>();
-                for(String mapperLocation : mapperArray){
-                    CollectionUtils.addAll(resources,new PathMatchingResourcePatternResolver().getResources(mapperLocation));
-                }
-                sessionFactoryBean.setMapperLocations(resources.toArray(new Resource[0]));
-            }
-           /* Resource[] resources = new PathMatchingResourcePatternResolver().getResources(mapperLocations);
-            sessionFactoryBean.setMapperLocations(resources);*/
-//            Set the location of the mybatis-config.xml configuration file(设置mybatis-config.xml配置文件位置)
-            sessionFactoryBean.setConfigLocation(new DefaultResourceLoader().getResource(configLocation));
-
-//            Add paging plugin, print sql plugin(添加分页插件、打印sql插件)
-            Interceptor[] plugins = new Interceptor[]{pageInterceptor()};
-            sessionFactoryBean.setPlugins(plugins);
-
-            return sessionFactoryBean.getObject();
-        } catch (IOException e) {
-            error("mybatis resolver mapper*xml is error",e);
-            return null;
-        } catch (Exception e) {
-            error("mybatis sqlSessionFactoryBean create error",e);
-            return null;
-        }
-    }
-
-    @Bean
-    @Primary
-    public SqlSessionTemplate sqlSessionTemplate(SqlSessionFactory sqlSessionFactory) {
-        return new SqlSessionTemplate(sqlSessionFactory);
-    }
-
-    //Transaction management(事务管理)
-    @Bean
-    @Primary
-    public PlatformTransactionManager annotationDrivenTransactionManager() {
-        return new DataSourceTransactionManager(dataSource);
-    }
-//    Log the log to be executed (if you don't want to intercept it, comment out this method)
-//    将要执行的sql进行日志打印(不想拦截,就把这方法注释掉)
-//    @Bean
-//    public SqlPrintInterceptor sqlPrintInterceptor(){
-//        return new SqlPrintInterceptor();
-//    }
-
-    @Bean
-    public PageInterceptor pageInterceptor() {
-        PageInterceptor pageInterceptor = new PageInterceptor();
-        Properties p = new Properties();
-//        p.setProperty("offsetAsPageNum", "true");
-//        p.setProperty("rowBoundsWithCount", "true");
-        p.setProperty("reasonable", "true");
-        p.setProperty("pageSizeZero", "true");
-        p.setProperty("helperDialect", "mysql");
-        pageInterceptor.setProperties(p);
-        return pageInterceptor;
-    }
-}
diff --git a/core/cloudProtocol/pom.xml b/core/cloudProtocol/pom.xml
deleted file mode 100644
index 95b8587..0000000
--- a/core/cloudProtocol/pom.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>linkis-protocol</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-common</artifactId>
-            <scope>provided</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>${basedir}/src/main/resources</directory>
-            </resource>
-        </resources>
-        <finalName>${project.artifactId}-${project.version}</finalName>
-    </build>
-
-</project>
\ No newline at end of file
diff --git a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/constants/TaskConstant.java b/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/constants/TaskConstant.java
deleted file mode 100644
index b45d052..0000000
--- a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/constants/TaskConstant.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.constants;
-
-/**
- * created by enjoyyin on 2018/10/10
- * Description:
- */
-public interface TaskConstant {
-    String UMUSER = "umUser";
-    String TASKTYPE = "taskType";
-    String STORAGETYPE = "storageType";
-    String EXECUTIONCODE = "executionCode";
-    String TASK = "task";
-    String TASKID = "taskID";
-    String PARAMS = "params";
-    String FORMATCODE = "formatCode";
-    String EXECUTEAPPLICATIONNAME = "executeApplicationName";
-    String REQUESTAPPLICATIONNAME = "requestApplicationName";
-    String SCRIPTPATH = "scriptPath";
-    String SOURCE = "source";
-    String RUNTYPE = "runType";
-
-    String PARAMS_VARIABLE = "variable";
-    String PARAMS_CONFIGURATION = "configuration";
-    String PARAMS_CONFIGURATION_STARTUP = "startup";
-    String PARAMS_CONFIGURATION_RUNTIME = "runtime";
-    String PARAMS_CONFIGURATION_SPECIAL = "special";
-    String PARAMS_CONFIGURATION_DATASOURCE = "datasource";
-}
diff --git a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/RequestInsertTask.java b/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/RequestInsertTask.java
deleted file mode 100644
index 200136b..0000000
--- a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/RequestInsertTask.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.query;
-
-
-
-/**
- * Created by enjoyyin on 2018/9/30.
- */
-public class RequestInsertTask extends RequestPersistTask implements QueryProtocol {
-}
diff --git a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/RequestPersistTask.java b/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/RequestPersistTask.java
deleted file mode 100644
index a3f2ff4..0000000
--- a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/RequestPersistTask.java
+++ /dev/null
@@ -1,343 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.query;
-
-import com.webank.wedatasphere.linkis.protocol.task.Task;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-
-import java.util.Date;
-import java.util.Map;
-
-/**
- * Created by enjoyyin on 2018/9/30.
- */
-public class RequestPersistTask implements Task {
-    private Long taskID;
-    /**
-     * instance 是指该task所在的统一入口的实例 ip + port
-     */
-    private String instance;
-    private String execId;
-    private String umUser;
-    /**
-     * engineInstance 是指task执行所请求的engine的实例信息,ip+port
-     */
-    private String engineInstance;
-    private String executionCode;
-    private Float progress;
-    private String logPath;
-    private String resultLocation;
-    private String status;
-    private Date createdTime;
-    private Date updatedTime;
-    private Integer errCode;
-    private String errDesc;
-    private String taskResource;
-    /**
-     * executeApplicationName 参数指的是用户所寻求的服务,比如spark python R等等
-     */
-    private String executeApplicationName;
-    /**
-     * requestApplicationName 是creator的传参名,例如IDE或WTSS等
-     */
-    private String requestApplicationName;
-    /**
-     * source 存放脚本来源,scriptPath是其中一个参数用户采用传入执行脚本的方式,scriptPath就是脚本的存储地址
-     */
-    private Map<String, String> source;
-    /**
-     * runType需要和executeApplicationName结合使用,如用户选择了Spark做为服务,他还需要指明使用哪种执行方式,比如pySpark RSpark等
-     * runType和engineType是同一个属性,为了兼容以前的代码
-     */
-    private String runType;
-    private String engineType;
-    private Map<String, Object> params;
-
-    private Date engineStartTime;
-
-    public String getEngineType() {
-        return engineType;
-    }
-
-    public void setEngineType(String engineType) {
-        this.engineType = engineType;
-        this.runType = engineType;
-    }
-
-    public Date getEngineStartTime() {
-        return engineStartTime;
-    }
-
-    public void setEngineStartTime(Date engineStartTime) {
-        this.engineStartTime = engineStartTime;
-    }
-
-    public String getRunType() {
-        return runType;
-    }
-
-    public void setRunType(String runType) {
-        this.runType = runType;
-        this.engineType = runType;
-    }
-
-    @Override
-    public String getInstance() {
-        return instance;
-    }
-
-    @Override
-    public String getExecId() {
-        return execId;
-    }
-
-    @Override
-    public void setInstance(String instance) {
-        this.instance = instance;
-    }
-
-    @Override
-    public void setExecId(String execId) {
-        this.execId = execId;
-    }
-
-    public Map<String, Object> getParams() {
-        return params;
-    }
-
-    public void setParams(Map<String, Object> params) {
-        this.params = params;
-    }
-
-    public String getExecuteApplicationName() {
-        return executeApplicationName;
-    }
-
-    public void setExecuteApplicationName(String executeApplicationName) {
-        this.executeApplicationName = executeApplicationName;
-    }
-
-    public String getRequestApplicationName() {
-        return requestApplicationName;
-    }
-
-    public void setRequestApplicationName(String requestApplicationName) {
-        this.requestApplicationName = requestApplicationName;
-    }
-
-    public Map<String, String> getSource() {
-        return source;
-    }
-
-    public void setSource(Map<String, String> source) {
-        this.source = source;
-    }
-
-    public Long getTaskID() {
-        return taskID;
-    }
-
-    public void setTaskID(Long taskID) {
-        this.taskID = taskID;
-    }
-
-    public String getUmUser() {
-        return umUser;
-    }
-
-    public void setUmUser(String umUser) {
-        this.umUser = umUser;
-    }
-
-    public Float getProgress() {
-        return progress;
-    }
-
-    public void setProgress(Float progress) {
-        this.progress = progress;
-    }
-
-    public String getResultLocation() {
-        return resultLocation;
-    }
-
-    public void setResultLocation(String resultLocation) {
-        this.resultLocation = resultLocation;
-    }
-
-    public String getStatus() {
-        return status;
-    }
-
-    public void setStatus(String status) {
-        this.status = status;
-    }
-
-    public Date getCreatedTime() {
-        return createdTime;
-    }
-
-    public void setCreatedTime(Date createdTime) {
-        this.createdTime = createdTime;
-    }
-
-    public Date getUpdatedTime() {
-        return updatedTime;
-    }
-
-    public void setUpdatedTime(Date updatedTime) {
-        this.updatedTime = updatedTime;
-    }
-
-    public Integer getErrCode() {
-        return errCode;
-    }
-
-    public void setErrCode(Integer errCode) {
-        this.errCode = errCode;
-    }
-
-    public String getErrDesc() {
-        return errDesc;
-    }
-
-    public void setErrDesc(String errDesc) {
-        this.errDesc = errDesc;
-    }
-
-    public String getExecutionCode() {
-        return executionCode;
-    }
-
-    public String getCode() {
-        return this.getExecutionCode();
-    }
-
-    public void setExecutionCode(String executionCode) {
-        this.executionCode = executionCode;
-    }
-
-    public String getLogPath() {
-        return logPath;
-    }
-
-    public void setLogPath(String logPath) {
-        this.logPath = logPath;
-    }
-
-    public String getEngineInstance() {
-        return engineInstance;
-    }
-
-    public void setEngineInstance(String engineInstance) {
-        this.engineInstance = engineInstance;
-    }
-
-    public String getTaskResource() {
-        return taskResource;
-    }
-
-    public void setTaskResource(String taskResource) {
-        this.taskResource = taskResource;
-    }
-
-    @Override
-    public String toString() {
-        return "RequestPersistTask{" +
-                "taskID=" + taskID +
-                ", instance='" + instance + '\'' +
-                ", execId='" + execId + '\'' +
-                ", umUser='" + umUser + '\'' +
-                ", engineInstance='" + engineInstance + '\'' +
-                ", executionCode='" + executionCode + '\'' +
-                ", progress=" + progress +
-                ", logPath='" + logPath + '\'' +
-                ", resultLocation='" + resultLocation + '\'' +
-                ", status='" + status + '\'' +
-                ", createdTime=" + createdTime +
-                ", updatedTime=" + updatedTime +
-                ", errCode=" + errCode +
-                ", errDesc='" + errDesc + '\'' +
-                ", executeApplicationName='" + executeApplicationName + '\'' +
-                ", requestApplicationName='" + requestApplicationName + '\'' +
-                ", source=" + source +
-                ", runType='" + runType + '\'' +
-                ", params=" + params +
-                '}';
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-
-        if (o == null || getClass() != o.getClass()) {
-            return false;
-        }
-
-        RequestPersistTask task = (RequestPersistTask) o;
-
-        return new EqualsBuilder()
-                .append(taskID, task.taskID)
-                .append(instance, task.instance)
-                .append(execId, task.execId)
-                .append(umUser, task.umUser)
-                .append(engineInstance, task.engineInstance)
-                .append(executionCode, task.executionCode)
-                .append(progress, task.progress)
-                .append(logPath, task.logPath)
-                .append(resultLocation, task.resultLocation)
-                .append(status, task.status)
-                .append(createdTime, task.createdTime)
-                .append(updatedTime, task.updatedTime)
-                .append(errCode, task.errCode)
-                .append(errDesc, task.errDesc)
-                .append(executeApplicationName, task.executeApplicationName)
-                .append(requestApplicationName, task.requestApplicationName)
-                .append(source, task.source)
-                .append(runType, task.runType)
-                .append(params, task.params)
-                .isEquals();
-    }
-
-    @Override
-    public int hashCode() {
-        return new HashCodeBuilder(17, 37)
-                .append(taskID)
-                .append(instance)
-                .append(execId)
-                .append(umUser)
-                .append(engineInstance)
-                .append(executionCode)
-                .append(progress)
-                .append(logPath)
-                .append(resultLocation)
-                .append(status)
-                .append(createdTime)
-                .append(updatedTime)
-                .append(errCode)
-                .append(errDesc)
-                .append(executeApplicationName)
-                .append(requestApplicationName)
-                .append(source)
-                .append(runType)
-                .append(params)
-                .toHashCode();
-    }
-}
\ No newline at end of file
diff --git a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/RequestQueryTask.java b/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/RequestQueryTask.java
deleted file mode 100644
index d5323a4..0000000
--- a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/RequestQueryTask.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.query;
-
-
-/**
- * Created by enjoyyin on 2018/9/30.
- * Need to inherit the relationship, to fill in the rest of the query module restful code
- * 需要继承关系,方便query模块restful代码的填写
- */
-public class RequestQueryTask extends RequestPersistTask implements QueryProtocol {
-
-}
diff --git a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/RequestReadAllTask.java b/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/RequestReadAllTask.java
deleted file mode 100644
index 886b75c..0000000
--- a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/RequestReadAllTask.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.query;
-
-/**
- * created by enjoyyin on 2018/10/9
- * Description:
- */
-public class RequestReadAllTask implements QueryProtocol {
-    /**
-     * Instance of microservices, through this example, we can take all the tasks below this instance from the database
-     * instance 微服务的实例,通过这个实例,我们可以将这个实例下面的所有的task全部从数据库中拿出来
-     */
-    private String instance;
-
-    public RequestReadAllTask(String instance){
-        super();
-        this.instance = instance;
-    }
-
-    public String getInstance() {
-        return instance;
-    }
-
-    public void setInstance(String instance) {
-        this.instance = instance;
-    }
-
-
-}
diff --git a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/RequestUpdateTask.java b/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/RequestUpdateTask.java
deleted file mode 100644
index 216001a..0000000
--- a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/RequestUpdateTask.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.query;
-
-
-/**
- * Created by enjoyyin on 2018/9/30.
- */
-public class RequestUpdateTask extends RequestPersistTask implements QueryProtocol {
-}
diff --git a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/ResponsePersist.java b/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/ResponsePersist.java
deleted file mode 100644
index 39dde90..0000000
--- a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/ResponsePersist.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.query;
-
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-
-import java.util.Map;
-
-/**
- * Created by enjoyyin on 2018/9/30.
- * Description: ResponsePersist is the content type returned by the query module to the entity
- * Description: ResponsePersist 是query模块向entrance返回的内容类型
- */
-public class ResponsePersist implements QueryProtocol {
-    private Integer status;
-    private String msg;
-    private Map<String, Object> data;
-
-    public Integer getStatus() {
-        return status;
-    }
-
-    public void setStatus(Integer status) {
-        this.status = status;
-    }
-
-    public String getMsg() {
-        return msg;
-    }
-
-    public void setMsg(String msg) {
-        this.msg = msg;
-    }
-
-    public Map<String, Object> getData() {
-        return data;
-    }
-
-    public void setData(Map<String, Object> data) {
-        this.data = data;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) return true;
-
-        if (o == null || getClass() != o.getClass()) return false;
-
-        ResponsePersist that = (ResponsePersist) o;
-
-        return new EqualsBuilder()
-                .append(status, that.status)
-                .append(msg, that.msg)
-                .append(data, that.data)
-                .isEquals();
-    }
-
-    @Override
-    public int hashCode() {
-        return new HashCodeBuilder(17, 37)
-                .append(status)
-                .append(msg)
-                .append(data)
-                .toHashCode();
-    }
-
-    @Override
-    public String toString() {
-        return "ResponsePersist{" +
-                "status=" + status +
-                ", msg='" + msg + '\'' +
-                ", data=" + data +
-                '}';
-    }
-}
diff --git a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/cache/CacheNotFound.java b/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/cache/CacheNotFound.java
deleted file mode 100644
index f0c719e..0000000
--- a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/cache/CacheNotFound.java
+++ /dev/null
@@ -1,4 +0,0 @@
-package com.webank.wedatasphere.linkis.protocol.query.cache;
-
-public class CacheNotFound implements ResponseReadCache {
-}
diff --git a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/cache/CacheTaskResult.java b/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/cache/CacheTaskResult.java
deleted file mode 100644
index 7f36f7d..0000000
--- a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/cache/CacheTaskResult.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.webank.wedatasphere.linkis.protocol.query.cache;
-
-public class CacheTaskResult implements ResponseReadCache {
-
-    private String resultLocation;
-
-    public CacheTaskResult(String resultLocation) {
-        this.resultLocation = resultLocation;
-    }
-
-    public String getResultLocation() {
-        return resultLocation;
-    }
-}
diff --git a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/cache/FailedToDeleteCache.java b/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/cache/FailedToDeleteCache.java
deleted file mode 100644
index 41cdca6..0000000
--- a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/cache/FailedToDeleteCache.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.webank.wedatasphere.linkis.protocol.query.cache;
-
-public class FailedToDeleteCache {
-    private String errorMessage;
-
-    public FailedToDeleteCache(String errorMessage) {
-        this.errorMessage = errorMessage;
-    }
-
-    public String getErrorMessage() {
-        return errorMessage;
-    }
-}
diff --git a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/cache/RequestDeleteCache.java b/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/cache/RequestDeleteCache.java
deleted file mode 100644
index 317eed7..0000000
--- a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/cache/RequestDeleteCache.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.webank.wedatasphere.linkis.protocol.query.cache;
-
-import com.webank.wedatasphere.linkis.protocol.query.QueryProtocol;
-
-public class RequestDeleteCache implements QueryProtocol {
-
-    private String executionCode;
-    private String engineType;
-    private String user;
-
-    public RequestDeleteCache(String executionCode, String engineType, String user) {
-        this.executionCode = executionCode;
-        this.engineType = engineType;
-        this.user = user;
-    }
-
-    public String getExecutionCode() {
-        return executionCode;
-    }
-
-    public String getEngineType() {
-        return engineType;
-    }
-
-    public String getUser() {
-        return user;
-    }
-}
diff --git a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/cache/RequestReadCache.java b/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/cache/RequestReadCache.java
deleted file mode 100644
index 49ed99e..0000000
--- a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/cache/RequestReadCache.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.webank.wedatasphere.linkis.protocol.query.cache;
-
-import com.webank.wedatasphere.linkis.protocol.query.QueryProtocol;
-
-public class RequestReadCache implements QueryProtocol {
-    private String executionCode;
-    private String engineType;
-    private String user;
-    private Long readCacheBefore;
-
-    public RequestReadCache(String executionCode, String engineType, String user, Long readCacheBefore) {
-        this.executionCode = executionCode;
-        this.engineType = engineType;
-        this.user = user;
-        this.readCacheBefore = readCacheBefore;
-    }
-
-    public String getExecutionCode() {
-        return executionCode;
-    }
-
-    public String getEngineType() {
-        return engineType;
-    }
-
-    public String getUser() {
-        return user;
-    }
-
-    public Long getReadCacheBefore() {
-        return readCacheBefore;
-    }
-}
diff --git a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/cache/ResponseDeleteCache.java b/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/cache/ResponseDeleteCache.java
deleted file mode 100644
index e9c0e3a..0000000
--- a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/cache/ResponseDeleteCache.java
+++ /dev/null
@@ -1,6 +0,0 @@
-package com.webank.wedatasphere.linkis.protocol.query.cache;
-
-import com.webank.wedatasphere.linkis.protocol.query.QueryProtocol;
-
-public interface ResponseDeleteCache extends QueryProtocol {
-}
diff --git a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/cache/ResponseReadCache.java b/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/cache/ResponseReadCache.java
deleted file mode 100644
index dbcc84a..0000000
--- a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/cache/ResponseReadCache.java
+++ /dev/null
@@ -1,6 +0,0 @@
-package com.webank.wedatasphere.linkis.protocol.query.cache;
-
-import com.webank.wedatasphere.linkis.protocol.query.QueryProtocol;
-
-public interface ResponseReadCache extends QueryProtocol {
-}
diff --git a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/cache/SuccessDeletedCache.java b/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/cache/SuccessDeletedCache.java
deleted file mode 100644
index b16098f..0000000
--- a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/query/cache/SuccessDeletedCache.java
+++ /dev/null
@@ -1,4 +0,0 @@
-package com.webank.wedatasphere.linkis.protocol.query.cache;
-
-public class SuccessDeletedCache {
-}
diff --git a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/usercontrol/RequestLogin.java b/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/usercontrol/RequestLogin.java
deleted file mode 100644
index 76237ea..0000000
--- a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/usercontrol/RequestLogin.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.usercontrol;
-
-
-/**
- * Created by alexyang
- */
-public class RequestLogin   implements UserControlLoginProtocol {
-
-    private String userName;
-    private String password;
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public RequestLogin setUserName(String userName) {
-        this.userName = userName;
-        return this;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    public RequestLogin setPassword(String password) {
-        this.password = password;
-        return this;
-    }
-}
diff --git a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/usercontrol/RequestRegister.java b/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/usercontrol/RequestRegister.java
deleted file mode 100644
index f36a021..0000000
--- a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/usercontrol/RequestRegister.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.usercontrol;
-
-/**
- * Created by alexyang
- */
-public class RequestRegister implements UserControlRegtisterProtocol{
-
-    // json string
-    private String params;
-
-    public RequestRegister() {}
-
-    public String getParams() {
-        return params;
-    }
-
-    public void setParams(String params) {
-        this.params = params;
-    }
-}
diff --git a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/usercontrol/ResponseLogin.java b/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/usercontrol/ResponseLogin.java
deleted file mode 100644
index e82a4a7..0000000
--- a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/usercontrol/ResponseLogin.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.usercontrol;
-
-import java.util.Date;
-
-/**
- * Created by alexyang
- */
-public class ResponseLogin implements UserControlLoginProtocol {
-
-    private String userName;
-    private Date lastLoginDate;
-    private Integer status;
-    private String errMsg;
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    public Date getLastLoginDate() {
-        return lastLoginDate;
-    }
-
-    public void setLastLoginDate(Date lastLoginDate) {
-        this.lastLoginDate = lastLoginDate;
-    }
-
-    public Integer getStatus() {
-        return status;
-    }
-
-    public void setStatus(Integer status) {
-        this.status = status;
-    }
-
-    public String getErrMsg() {
-        return errMsg;
-    }
-
-    public void setErrMsg(String errMsg) {
-        this.errMsg = errMsg;
-    }
-}
diff --git a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/usercontrol/ResponseRegister.java b/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/usercontrol/ResponseRegister.java
deleted file mode 100644
index 5c12d62..0000000
--- a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/usercontrol/ResponseRegister.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.usercontrol;
-
-import java.util.HashMap;
-
-/**
- * Created by alexyang
- */
-public class ResponseRegister implements UserControlRegtisterProtocol {
-
-    private int status;
-    private String message;
-    private HashMap<String, Object> data;
-    private String method;
-
-    public int getStatus() {
-        return status;
-    }
-
-    public void setStatus(int status) {
-        this.status = status;
-    }
-
-    public String getMessage() {
-        return message;
-    }
-
-    public void setMessage(String message) {
-        this.message = message;
-    }
-
-    public HashMap<String, Object> getData() {
-        return data;
-    }
-
-    public void setData(HashMap<String, Object> data) {
-        this.data = data;
-    }
-
-    public String getMethod() {
-        return method;
-    }
-
-    public void setMethod(String method) {
-        this.method = method;
-    }
-}
diff --git a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/usercontrol/UserControlLoginProtocol.java b/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/usercontrol/UserControlLoginProtocol.java
deleted file mode 100644
index 95b0036..0000000
--- a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/usercontrol/UserControlLoginProtocol.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.webank.wedatasphere.linkis.protocol.usercontrol;
-
-/**
- * Created by alexyang
- */
-public interface UserControlLoginProtocol {
-}
diff --git a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/usercontrol/UserControlRegtisterProtocol.java b/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/usercontrol/UserControlRegtisterProtocol.java
deleted file mode 100644
index 04a6d1f..0000000
--- a/core/cloudProtocol/src/main/java/com/webank/wedatasphere/linkis/protocol/usercontrol/UserControlRegtisterProtocol.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.webank.wedatasphere.linkis.protocol.usercontrol;
-
-/**
- * Created by alexyang
- */
-public interface UserControlRegtisterProtocol {
-}
diff --git a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/BroadcastProtocol.scala b/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/BroadcastProtocol.scala
deleted file mode 100644
index 6f5e20f..0000000
--- a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/BroadcastProtocol.scala
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol
-
-/**
-  * Created by enjoyyin on 2019/1/14.
-  */
-trait BroadcastProtocol extends Protocol {
-
-  val throwsIfAnyFailed = false
-  var skipBroadcast = false
-  val instances = Array.empty[String]
-
-}
\ No newline at end of file
diff --git a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/CacheableProtocol.scala b/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/CacheableProtocol.scala
deleted file mode 100644
index b4706a7..0000000
--- a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/CacheableProtocol.scala
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol
-
-/**
-  * Created by enjoyyin on 2019/1/14.
-  */
-trait CacheableProtocol extends Protocol {
-  override def toString: String = super.toString
-}
diff --git a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/IRCommonProtocol.scala b/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/IRCommonProtocol.scala
deleted file mode 100644
index 218ad3e..0000000
--- a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/IRCommonProtocol.scala
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol
-
-/**
-  * Created by enjoyyin on 2019/1/14.
-  */
-trait IRCommonProtocol extends IRProtocol {
-  val rule: String
-}
diff --git a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/IRProtocol.scala b/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/IRProtocol.scala
deleted file mode 100644
index f086081..0000000
--- a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/IRProtocol.scala
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol
-
-/**
-  * Created by enjoyyin on 2019/1/7.
-  */
-trait IRProtocol
\ No newline at end of file
diff --git a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/IRServiceGroupProtocol.scala b/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/IRServiceGroupProtocol.scala
deleted file mode 100644
index 89afccc..0000000
--- a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/IRServiceGroupProtocol.scala
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol
-
-/**
-  * Created by enjoyyin on 2019/1/7.
-  */
-trait IRServiceGroupProtocol extends IRProtocol with InstanceProtocol {
-  val userWithCreator: UserWithCreator
-
-  def user = userWithCreator.user
-  def creator = userWithCreator.creator
-}
-case class UserWithCreator(user: String, creator: String)
\ No newline at end of file
diff --git a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/InstanceProtocol.scala b/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/InstanceProtocol.scala
deleted file mode 100644
index 650476c..0000000
--- a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/InstanceProtocol.scala
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol
-
-/**
-  * Created by enjoyyin on 2019/1/7.
-  */
-trait InstanceProtocol extends Protocol {
-
-  var choseInstance: Option[String] = None
-
-}
\ No newline at end of file
diff --git a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/Protocol.scala b/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/Protocol.scala
deleted file mode 100644
index f750149..0000000
--- a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/Protocol.scala
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol
-
-/**
-  * Created by enjoyyin on 2019/1/7.
-  */
-trait Protocol
\ No newline at end of file
diff --git a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/RetryableProtocol.scala b/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/RetryableProtocol.scala
deleted file mode 100644
index 84bf31b..0000000
--- a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/RetryableProtocol.scala
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol
-
-/**
-  * Created by enjoyyin on 2019/1/7.
-  */
-trait RetryableProtocol extends Protocol {
-  val retryNum = 2
-  val period = 1000l
-  val maxPeriod = 3000l
-  val retryExceptions = Array.empty[Class[_  <: Throwable]]
-}
\ No newline at end of file
diff --git a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/SingleInstanceProtocol.scala b/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/SingleInstanceProtocol.scala
deleted file mode 100644
index 3b25e43..0000000
--- a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/SingleInstanceProtocol.scala
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol
-
-/**
-  * Created by enjoyyin on 2019/1/7.
-  */
-trait SingleInstanceProtocol extends Protocol
\ No newline at end of file
diff --git a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/config/RequestQueryGlobalConfig.scala b/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/config/RequestQueryGlobalConfig.scala
deleted file mode 100644
index 18592fd..0000000
--- a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/config/RequestQueryGlobalConfig.scala
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.config
-
-import com.webank.wedatasphere.linkis.protocol.{CacheableProtocol, RetryableProtocol}
-
-/**
-  * Created by enjoyyin on 2018/10/16.
-  */
-trait ConfigProtocol
-
-case class RequestQueryGlobalConfig(userName:String) extends CacheableProtocol with RetryableProtocol with ConfigProtocol
-
-case class RequestQueryAppConfig(userName:String,creator:String,appName:String) extends CacheableProtocol with RetryableProtocol with ConfigProtocol
-
-case class RequestQueryAppConfigWithGlobal(userName:String,creator:String,appName:String,isMerge:Boolean) extends CacheableProtocol with RetryableProtocol with ConfigProtocol
diff --git a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/config/ResponseQueryConfig.scala b/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/config/ResponseQueryConfig.scala
deleted file mode 100644
index 2b9129e..0000000
--- a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/config/ResponseQueryConfig.scala
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.config
-
-import java.util
-
-/**
-  * Created by enjoyyin on 2018/10/17.
-  */
-class ResponseQueryConfig extends ConfigProtocol {
-  private var keyAndValue: util.Map[String, String] = _
-  def getKeyAndValue :util.Map[String, String] = keyAndValue
-  def setKeyAndValue(keyAndValue :util.Map[String, String]) :Unit = this.keyAndValue =keyAndValue
-}
diff --git a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/engine/EngineCallback.scala b/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/engine/EngineCallback.scala
deleted file mode 100644
index e5cef40..0000000
--- a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/engine/EngineCallback.scala
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.engine
-
-/**
-  * Created by enjoyyin on 2018/9/26.
-  */
-object EngineCallback {
-  private val DWC_APPLICATION_NAME = "dwc.application.name"
-  private val DWC_INSTANCE = "dwc.application.instance"
-  def mapToEngineCallback(options: Map[String, String]): EngineCallback =
-    EngineCallback(options(DWC_APPLICATION_NAME), options(DWC_INSTANCE))
-  def callbackToMap(engineCallback: EngineCallback): Map[String, String] =
-    Map(DWC_APPLICATION_NAME -> engineCallback.applicationName, DWC_INSTANCE -> engineCallback.instance)
-}
-case class EngineCallback(applicationName: String, instance: String)
\ No newline at end of file
diff --git a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/engine/EngineState.scala b/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/engine/EngineState.scala
deleted file mode 100644
index 5e16ca2..0000000
--- a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/engine/EngineState.scala
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.engine
-
-/**
-  * Created by enjoyyin on 2018/9/27.
-  */
-object EngineState extends Enumeration {
-  type EngineState = Value
-  val Starting, Idle, Busy, ShuttingDown, Error, Dead, Success = Value
-  def isCompleted(executorState: EngineState): Boolean = executorState match {
-    case Error | Dead | Success => true
-    case _ => false
-  }
-  def isAvailable(executorState: EngineState): Boolean = executorState match {
-    case Idle | Busy => true
-    case _ => false
-  }
-}
\ No newline at end of file
diff --git a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/engine/RequestEngineStatus.scala b/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/engine/RequestEngineStatus.scala
deleted file mode 100644
index e3aeb3e..0000000
--- a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/engine/RequestEngineStatus.scala
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.engine
-
-import com.webank.wedatasphere.linkis.protocol.RetryableProtocol
-
-/**
-  *
-  * Request status information from an engine(向某一个engine请求状态信息)
-  * Created by enjoyyin on 2018/9/27.
-  */
-case class RequestEngineStatus(messageType: Int) extends RetryableProtocol
-object RequestEngineStatus {
-  val Status_Only = 1
-  val Status_Overload = 2
-  val Status_Concurrent = 3
-  val Status_Overload_Concurrent = 4
-  val Status_BasicInfo = 5
-  val ALL = 6
-}
\ No newline at end of file
diff --git a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/engine/RequestNewEngine.scala b/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/engine/RequestNewEngine.scala
deleted file mode 100644
index d8f354c..0000000
--- a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/engine/RequestNewEngine.scala
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.engine
-
-import java.util
-
-import com.webank.wedatasphere.linkis.protocol.RetryableProtocol
-
-/**
-  * Created by enjoyyin on 2018/9/18.
-  */
-trait RequestEngine extends RetryableProtocol {
-  val creator: String
-  val user: String
-  val properties: util.Map[String, String]  //Other parameter information(其他参数信息)
-}
-object RequestEngine {
-  private val header = "_req_"
-  val REQUEST_ENTRANCE_INSTANCE = header + "entrance_instance"
-//  val ENGINE_MAX_FREE_TIME = header + "engine_max_free_time"
-//  val ENGINE_MAX_EXECUTE_NUM = header + "engine_max_execute_num"
-  //  val ENGINE_USER = header + "engine_user"
-  val ENGINE_INIT_SPECIAL_CODE = header + "engine_init_code"
-  def isRequestEngineProperties(key: String) = key.startsWith(header)
-}
-trait TimeoutRequestEngine {
-  val timeout: Long
-}
-case class RequestNewEngine(creator: String, user: String, properties: util.Map[String, String]) extends RequestEngine
-case class TimeoutRequestNewEngine(timeout: Long, user: String, creator: String, properties: util.Map[String, String]) extends RequestEngine with TimeoutRequestEngine
-case class RequestKillEngine(instance: String, killApplicationName: String, killInstance: String)
\ No newline at end of file
diff --git a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/engine/RequestTask.scala b/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/engine/RequestTask.scala
deleted file mode 100644
index 6411d6a..0000000
--- a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/engine/RequestTask.scala
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.engine
-
-import java.util
-
-import com.webank.wedatasphere.linkis.protocol.RetryableProtocol
-
-/**
-  * Created by enjoyyin on 2018/9/14.
-  */
-trait RequestTask {
-  def getCode: String
-  def setCode(code: String): Unit
-  def getLock: String
-  def setLock(lock: String): Unit
-  def getProperties: util.Map[String, Object]
-  def setProperties(properties: util.Map[String, Object])
-  def data(key: String, value: Object): Unit
-}
-object RequestTask {
-  private val header = "#rt_"
-  val RESULT_SET_STORE_PATH = header + "rs_store_path"
-}
-class RequestTaskExecute extends RequestTask {
-  private var code: String = _
-  private var lock: String = _
-  private var properties: util.Map[String, Object] = new util.HashMap[String, Object]
-  override def getCode: String = code
-
-  override def setCode(code: String): Unit = this.code = code
-
-  override def getLock: String = lock
-
-  override def setLock(lock: String): Unit = this.lock = lock
-
-  override def getProperties: util.Map[String, Object] = properties
-
-  override def setProperties(properties: util.Map[String, Object]): Unit = this.properties = properties
-
-  override def data(key: String, value: Object): Unit = {
-    if(properties == null) properties = new util.HashMap[String, Object]
-    properties.put(key, value)
-  }
-}
-case class RequestTaskPause(execId: String)
-case class RequestTaskResume(execId: String)
-case class RequestTaskKill(execId: String)
-//Instance pass the corresponding instance information, used to print the log, to facilitate troubleshooting
-//instance传递对应的实例信息,用于打印日志,方便排查问题
-case class RequestEngineLock(instance: String, timeout: Long)
-case class RequestEngineUnlock(instance: String, lock: String)
-
-/**
-  * The status of requesting job execution, mainly used for:<br>
-  * 1. If the engine has not sent information to the entity for a long time, the enumeration periodically requests status information<br>
-  * 2. If the entance of the request engine is hanged, the newly taken entity first requests the status of the job from the engine, the engine maintains the new sender information,
-  * and then sends log information to the sender.
-  * 请求Job执行的状态,主要用于:<br>
-  * 1. 如果engine很久没有给entrance发送信息,entrance定时请求一次状态信息<br>
-  * 2. 如果请求engine的entrance挂掉了,新接手的entrance第一次向engine请求Job的状态,engine维系新的sender信息,后续向该sender发送日志信息
-  */
-case class RequestTaskStatus(execId: String)
\ No newline at end of file
diff --git a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/engine/RequestUserEngineKill.scala b/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/engine/RequestUserEngineKill.scala
deleted file mode 100644
index c3596c3..0000000
--- a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/engine/RequestUserEngineKill.scala
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.engine
-
-import com.webank.wedatasphere.linkis.protocol.RetryableProtocol
-
-case class RequestUserEngineKill(ticketId: String, creator: String, user: String, properties: Map[String, String]) extends RetryableProtocol
-case class ResponseUserEngineKill(ticketId: String, status: String, message: String)
-object ResponseUserEngineKill{
-  val Success = "Success"
-  val Error = "Error"
-}
\ No newline at end of file
diff --git a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/engine/ResponseNewEngine.scala b/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/engine/ResponseNewEngine.scala
deleted file mode 100644
index 167f50c..0000000
--- a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/engine/ResponseNewEngine.scala
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.engine
-
-import com.webank.wedatasphere.linkis.protocol.{BroadcastProtocol, RetryableProtocol}
-
-/**
-  * Created by enjoyyin on 2018/9/18.
-  */
-trait ResponseEngine extends RetryableProtocol {
-  val port: Int
-  val status: Int
-  val initErrorMsg: String
-}
-
-/**
-  * engine send to engineManager
-  * @param pid
-  */
-case class ResponseEnginePid(port: Int, pid: String) extends RetryableProtocol
-/**
-  * engine send to engineManager
-  * @param host
-  */
-case class ResponseEngineHost(port: Int, host: String) extends RetryableProtocol
-/**
-  * engine send to engineManager
-  * @param port
-  * @param status
-  * @param initErrorMsg
-  */
-case class ResponseEngineStatusCallback(override val port: Int,
-                                override val status: Int,
-                                override val initErrorMsg: String) extends ResponseEngine
-
-/**
-  * engineManager send to entrance
-  * @param instance
-  * @param responseEngineStatus
-  */
-  case class ResponseNewEngineStatus(instance: String, responseEngineStatus: ResponseEngineStatusCallback) extends RetryableProtocol
-
-/**
-  * engineManager send to entrance
-  * @param applicationName
-  * @param instance
-  */
-case class ResponseNewEngine(applicationName: String, instance: String) extends RetryableProtocol
-
-case class BroadcastNewEngine(responseNewEngine: ResponseNewEngine, responseEngineStatus: ResponseEngineStatus)
-  extends BroadcastProtocol
\ No newline at end of file
diff --git a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/engine/ResponseTaskExecute.scala b/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/engine/ResponseTaskExecute.scala
deleted file mode 100644
index 66d7d97..0000000
--- a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/engine/ResponseTaskExecute.scala
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.engine
-
-import java.util
-
-import com.webank.wedatasphere.linkis.protocol.{BroadcastProtocol, IRServiceGroupProtocol, RetryableProtocol, UserWithCreator}
-
-/**
-  * Created by enjoyyin on 2018/9/14.
-  */
-case class ResponseTaskExecute(execId: String)
-case class JobProgressInfo(id: String, totalTasks: Int, runningTasks: Int, failedTasks: Int, succeedTasks: Int)
-case class ResponseTaskProgress(execId: String, progress: Float, progressInfo: Array[JobProgressInfo])(
-  implicit override val userWithCreator: UserWithCreator) extends RetryableProtocol with IRServiceGroupProtocol
-case class ResponseEngineLock(lock: String)
-case class EngineConcurrentInfo(runningTasks: Int, pendingTasks: Int, succeedTasks: Int, failedTasks: Int)
-case class EngineOverloadInfo(maxMemory: Long, usedMemory: Long, systemCPUUsed: Float)
-case class ResponseEngineStatusChanged(instance: String, fromState: Int, toState: Int,
-                                       overload: EngineOverloadInfo, concurrent: EngineConcurrentInfo)
-  extends BroadcastProtocol
-case class ResponseEngineInfo(createEntranceInstance: String, creator: String, user: String, properties: util.Map[String, String])
-case class ResponseEngineStatus(instance: String, state: Int, overload: EngineOverloadInfo, concurrent: EngineConcurrentInfo,
-                                engineInfo: ResponseEngineInfo)
-case class ResponseTaskLog(execId: String, log: String)(
-  implicit override val userWithCreator: UserWithCreator) extends RetryableProtocol with IRServiceGroupProtocol
-
-case class ResponseTaskError(execId: String, errorMsg: String)(
-  implicit override val userWithCreator: UserWithCreator) extends RetryableProtocol with IRServiceGroupProtocol
-
-case class ResponseTaskStatus(execId: String, state: Int)(
-  implicit override val userWithCreator: UserWithCreator) extends RetryableProtocol with IRServiceGroupProtocol
-
-case class ResponseTaskResultSet(execId: String, output: String, alias: String)(
-  implicit override val userWithCreator: UserWithCreator) extends RetryableProtocol with IRServiceGroupProtocol
-
-case class ResponseTaskResultSize(execId: String, resultSize: Int)(implicit override val userWithCreator: UserWithCreator) extends RetryableProtocol
-  with IRServiceGroupProtocol
\ No newline at end of file
diff --git a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/task/Task.scala b/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/task/Task.scala
deleted file mode 100644
index e2f02f2..0000000
--- a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/task/Task.scala
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.task
-
-/**
-  * created by enjoyyin on 2018/10/8
-  * Description:
-  */
-trait Task {
-
-  def getInstance: String
-
-  def getExecId: String
-
-  def setInstance(instance: String):Unit
-
-  def setExecId(execId:String):Unit
-
-}
\ No newline at end of file
diff --git a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/utils/ProtocolUtils.scala b/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/utils/ProtocolUtils.scala
deleted file mode 100644
index 63e4e71..0000000
--- a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/utils/ProtocolUtils.scala
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.utils
-
-import com.webank.wedatasphere.linkis.common.conf.CommonVars
-
-/**
-  * Created by enjoyyin on 2019/1/7.
-  */
-object ProtocolUtils {
-
-  val SERVICE_SUFFIX = CommonVars("wds.linkis.service.suffix","engineManager,entrance,engine")
-  val suffixs = SERVICE_SUFFIX.getValue.split(",")
-
-  /**
-    * Pass in moduleName to return the corresponding appName
-    * 传入moduleName返回对应的appName
-    * @param moduleName
-    * @return
-    */
-  def getAppName(moduleName:String):Option[String] = {
-    val moduleNameLower = moduleName.toLowerCase()
-    for(suffix <- suffixs ){
-      if(moduleNameLower.contains(suffix.toLowerCase())) return Some(moduleNameLower.replace(suffix.toLowerCase(),""))
-    }
-    None
-  }
-
-}
diff --git a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/utils/TaskUtils.scala b/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/utils/TaskUtils.scala
deleted file mode 100644
index e888fe1..0000000
--- a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/utils/TaskUtils.scala
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.utils
-
-import java.util
-
-import com.webank.wedatasphere.linkis.protocol.constants.TaskConstant
-
-import scala.collection.JavaConversions._
-
-object TaskUtils {
-
-  private def getMap(params: util.Map[String, Any], key: String): util.Map[String, Any] =
-    if(params != null && params.containsKey(key))
-      params.get(key) match {
-        case map: util.Map[String, Any] => map
-        case map: util.Map[String, Object] =>
-          val resultMap = new util.HashMap[String, Any]
-          map.keySet().foreach { k => resultMap.put(k, map.get(k))}
-          resultMap
-        case _ => new util.HashMap[String, Any]()
-      }
-    else new util.HashMap[String, Any]()
-
-  private def addMap(params: util.Map[String, Any], waitToAdd: util.Map[String, Any], key: String): Unit =
-    if(params != null && params.containsKey(key))
-      params.get(key) match {
-        case map: util.Map[String, Any] => map.putAll(waitToAdd)
-        case map: util.Map[String, _] =>
-          val resultMap = new util.HashMap[String, Any]
-          map.keySet().foreach { k => resultMap.put(k, map.get(k))}
-          resultMap.putAll(waitToAdd)
-          params.put(key, resultMap)
-        case _ => params.put(key, waitToAdd)
-      }
-    else params.put(key, waitToAdd)
-
-  private def getConfigurationMap(params: util.Map[String, Any], key: String) = {
-    val configurationMap = getMap(params, TaskConstant.PARAMS_CONFIGURATION)
-    getMap(configurationMap, key)
-  }
-
-  def addConfigurationMap(params: util.Map[String, Any], waitToAdd: util.Map[String, Any], key: String): Unit = {
-    val configurationMap = getMap(params, TaskConstant.PARAMS_CONFIGURATION)
-    if(configurationMap.isEmpty) params.put(TaskConstant.PARAMS_CONFIGURATION, configurationMap)
-    addMap(configurationMap, waitToAdd, key)
-  }
-
-  def getVariableMap(params: util.Map[String, Any]) = getMap(params, TaskConstant.PARAMS_VARIABLE)
-
-  def getStartupMap(params: util.Map[String, Any]) = getConfigurationMap(params, TaskConstant.PARAMS_CONFIGURATION_STARTUP)
-
-  def getRuntimeMap(params: util.Map[String, Any]) = getConfigurationMap(params, TaskConstant.PARAMS_CONFIGURATION_RUNTIME)
-
-  def getSpecialMap(params: util.Map[String, Any]) = getConfigurationMap(params, TaskConstant.PARAMS_CONFIGURATION_SPECIAL)
-
-  def addVariableMap(params: util.Map[String, Any], variableMap: util.Map[String, Any]) = addMap(params, variableMap, TaskConstant.PARAMS_VARIABLE)
-
-  def addStartupMap(params: util.Map[String, Any], startupMap: util.Map[String, Any]) =
-    addConfigurationMap(params, startupMap, TaskConstant.PARAMS_CONFIGURATION_STARTUP)
-
-  def addRuntimeMap(params: util.Map[String, Any], runtimeMap: util.Map[String, Any]) =
-    addConfigurationMap(params, runtimeMap, TaskConstant.PARAMS_CONFIGURATION_RUNTIME)
-
-  def addSpecialMap(params: util.Map[String, Any], specialMap: util.Map[String, Any]) =
-    addConfigurationMap(params, specialMap, TaskConstant.PARAMS_CONFIGURATION_SPECIAL)
-
-  def addDatasourceMap(params: util.Map[String, Any], datasourceMap: util.Map[String, Any]) =
-    addConfigurationMap(params, datasourceMap, TaskConstant.PARAMS_CONFIGURATION_DATASOURCE)
-
-}
diff --git a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/utils/ZuulEntranceUtils.scala b/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/utils/ZuulEntranceUtils.scala
deleted file mode 100644
index 7e333c1..0000000
--- a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/utils/ZuulEntranceUtils.scala
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.utils
-
-import javafx.beans.binding.LongExpression
-
-/**
-  * created by enjoyyin on 2018/11/8
-  * Description:
-  */
-object ZuulEntranceUtils {
-
-
-
-  def parseExecID(longExecID:String):Array[String] = {
-    //Add creator to execID while old code is compatible(添加creator到execID,同时老代码兼容)
-    if(isNumberic(longExecID.substring(0, 6))){
-      val creatorLength = Integer.parseInt(longExecID.substring(0,2))
-      val executeLength = Integer.parseInt(longExecID.substring(2,4))
-      val instanceLength = Integer.parseInt(longExecID.substring(4,6))
-      val creator = longExecID.substring(6, 6 + creatorLength)
-      val executeApplicationName = longExecID.substring(6 + creatorLength, 6 + creatorLength + executeLength)
-      val instance = longExecID.substring(6 + creatorLength + executeLength, 6 + creatorLength + executeLength + instanceLength)
-      val shortExecID = longExecID.substring(6 + creatorLength + executeLength + instanceLength, longExecID.length)
-      return Array(creator, executeApplicationName, instance, shortExecID)
-    }
-    val executeLength = Integer.parseInt(longExecID.substring(0,2))
-    val instanceLength = Integer.parseInt(longExecID.substring(2,4))
-    val executeApplicationName:String = longExecID.substring(4, 4 + executeLength)
-    val instance:String = longExecID.substring(4 + executeLength, 4 + executeLength + instanceLength)
-    val shortExecID:String = longExecID.substring(4 + executeLength + instanceLength, longExecID.length)
-    Array[String](executeApplicationName, instance, shortExecID)
-  }
-
-
-  private def isNumberic(s:String):Boolean = {
-    s.toCharArray foreach {
-      c => if (c < 48 || c >57) return false
-    }
-    true
-  }
-
-  /**
-    *
-    * @param shortExecID ExecID generated by the scheduler, such as IDE_neiljianliu_0(scheduler生成的ExecID, 如 IDE_neiljianliu_0)
-    * @param executeApplicationName {dd}{dd}${executeApplicationName}${instance}${shortExecID}
-    * @return
-    */
-  @Deprecated
-  def generateExecID(shortExecID:String, executeApplicationName:String, instance:String):String = {
-    val executeLength = getLengthStr(executeApplicationName)
-    val instanceLength = getLengthStr(instance)
-    if (shortExecID.split("_").length == 3){
-      //Backward compatible(向下兼容)
-      val creator = shortExecID.split("_")(0)
-      val creatorLength = getLengthStr(creator)
-      return creatorLength + executeLength + instanceLength + creator + executeApplicationName + instance + shortExecID
-    }
-    executeLength + instanceLength + executeApplicationName + instance + shortExecID
-  }
-
-
-  def generateExecID(shortExecID:String, executeApplicationName:String, instance:String, creator:String):String = {
-    val creatorLength = getLengthStr(creator)
-    val executeLength = getLengthStr(executeApplicationName)
-    val instanceLength = getLengthStr(instance)
-    creatorLength + executeLength + instanceLength + creator + executeApplicationName + instance + shortExecID
-  }
-
-
-
-
-  private def getLengthStr(string:String):String = {
-    val length = string.length
-    if (length >= 10) String.valueOf(length) else "0" + String.valueOf(length)
-  }
-
-  def main(args: Array[String]): Unit = {
-
-  }
-
-}
diff --git a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/variable/RequestQueryGlobalVariable.scala b/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/variable/RequestQueryGlobalVariable.scala
deleted file mode 100644
index 4629cef..0000000
--- a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/variable/RequestQueryGlobalVariable.scala
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.variable
-
-import com.webank.wedatasphere.linkis.protocol.{CacheableProtocol, RetryableProtocol}
-
-/**
-  * Created by enjoyyin on 2018/10/18.
-  */
-trait VariableProtocol
-
-case class RequestQueryGlobalVariable (userName:String) extends CacheableProtocol with RetryableProtocol with VariableProtocol
-
-case class RequestQueryAppVariable(userName:String,creator:String,appName:String) extends CacheableProtocol with RetryableProtocol with VariableProtocol
diff --git a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/variable/ResponseQueryVariable.scala b/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/variable/ResponseQueryVariable.scala
deleted file mode 100644
index fe87ce4..0000000
--- a/core/cloudProtocol/src/main/scala/com/webank/wedatasphere/linkis/protocol/variable/ResponseQueryVariable.scala
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.protocol.variable
-
-import java.util
-
-/**
-  * Created by enjoyyin on 2018/10/18.
-  */
-class ResponseQueryVariable extends VariableProtocol {
-  private var keyAndValue: util.Map[String, String] = _
-  def getKeyAndValue :util.Map[String, String] = keyAndValue
-  def setKeyAndValue(keyAndValue :util.Map[String, String]) :Unit = this.keyAndValue =keyAndValue
-}
diff --git a/core/cloudRPC/pom.xml b/core/cloudRPC/pom.xml
deleted file mode 100644
index 8a9a9c3..0000000
--- a/core/cloudRPC/pom.xml
+++ /dev/null
@@ -1,156 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>linkis-cloudRPC</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-protocol</artifactId>
-            </dependency>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-module</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-feign</artifactId>
-            <version>${spring.eureka.version}</version>
-          <exclusions>
-            <exclusion>
-              <artifactId>netty-codec</artifactId>
-              <groupId>io.netty</groupId>
-            </exclusion>
-              <exclusion>
-                  <artifactId>netty-transport</artifactId>
-                  <groupId>io.netty</groupId>
-              </exclusion>
-              <exclusion>
-                  <artifactId>jersey-client</artifactId>
-                  <groupId>com.sun.jersey</groupId>
-              </exclusion>
-              <exclusion>
-                  <artifactId>jersey-apache-client4</artifactId>
-                  <groupId>com.sun.jersey.contribs</groupId>
-              </exclusion>
-              <exclusion>
-                  <artifactId>jackson-databind</artifactId>
-                  <groupId>com.fasterxml.jackson.core</groupId>
-              </exclusion>
-              <exclusion>
-                  <artifactId>jackson-core</artifactId>
-                  <groupId>com.fasterxml.jackson.core</groupId>
-              </exclusion>
-              <exclusion>
-                  <artifactId>jackson-annotations</artifactId>
-                  <groupId>com.fasterxml.jackson.core</groupId>
-              </exclusion>
-              <exclusion>
-                  <artifactId>httpclient</artifactId>
-                  <groupId>org.apache.httpcomponents</groupId>
-              </exclusion>
-              <exclusion>
-                  <artifactId>spring-cloud-commons</artifactId>
-                  <groupId>org.springframework.cloud</groupId>
-              </exclusion>
-              <exclusion>
-                  <artifactId>HdrHistogram</artifactId>
-                  <groupId>org.hdrhistogram</groupId>
-              </exclusion>
-              <exclusion>
-                  <artifactId>jsr305</artifactId>
-                  <groupId>com.google.code.findbugs</groupId>
-              </exclusion>
-              <exclusion>
-                  <groupId>org.springframework.cloud</groupId>
-                  <artifactId>spring-cloud-starter</artifactId>
-              </exclusion>
-              <exclusion>
-                  <groupId>org.springframework.cloud</groupId>
-                  <artifactId>spring-cloud-starter-openfeign</artifactId>
-              </exclusion>
-          </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.json4s</groupId>
-            <artifactId>json4s-jackson_${scala.binary.version}</artifactId>
-            <version>3.5.3</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>jackson-databind</artifactId>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-openfeign</artifactId>
-            <version>2.0.0.RELEASE</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>jackson-databind</artifactId>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jackson-core</artifactId>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jackson-annotations</artifactId>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-
-        </plugins>
-        <resources>
-            <resource>
-                <directory>${basedir}/src/main/resources</directory>
-            </resource>
-        </resources>
-        <finalName>${project.artifactId}-${project.version}</finalName>
-    </build>
-
-</project>
\ No newline at end of file
diff --git a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/conf/RPCConfiguration.scala b/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/conf/RPCConfiguration.scala
deleted file mode 100644
index e1d0670..0000000
--- a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/conf/RPCConfiguration.scala
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.rpc.conf
-
-import com.webank.wedatasphere.linkis.common.conf.{CommonVars, TimeType}
-
-/**
-  * Created by enjoyyin on 2019/1/14.
-  */
-object RPCConfiguration {
-
-  val BDP_RPC_BROADCAST_THREAD_SIZE = CommonVars("wds.linkis.rpc.broadcast.thread.num", new Integer(10))
-
-  val BDP_RPC_EUREKA_SERVICE_REFRESH_INTERVAL = CommonVars("wds.linkis.rpc.eureka.client.refresh.interval", new TimeType("1s"))
-  val BDP_RPC_EUREKA_SERVICE_REFRESH_MAX_WAIT_TIME = CommonVars("wds.linkis.rpc.eureka.client.refresh.wait.time.max", new TimeType("5s"))
-  val BDP_RPC_RECEIVER_ASYN_CONSUMER_THREAD_MAX = CommonVars("wds.linkis.rpc.receiver.asyn.consumer.thread.max", 10)
-  val BDP_RPC_RECEIVER_ASYN_CONSUMER_THREAD_FREE_TIME_MAX = CommonVars("wds.linkis.rpc.receiver.asyn.consumer.freeTime.max", new TimeType("2m"))
-  val BDP_RPC_RECEIVER_ASYN_QUEUE_CAPACITY = CommonVars("wds.linkis.rpc.receiver.asyn.queue.size.max", 1000)
-
-  val BDP_RPC_SENDER_ASYN_CONSUMER_THREAD_MAX = CommonVars("wds.linkis.rpc.sender.asyn.consumer.thread.max", 5)
-  val BDP_RPC_SENDER_ASYN_CONSUMER_THREAD_FREE_TIME_MAX = CommonVars("wds.linkis.rpc.sender.asyn.consumer.freeTime.max", new TimeType("2m"))
-  val BDP_RPC_SENDER_ASYN_QUEUE_CAPACITY = CommonVars("wds.linkis.rpc.sender.asyn.queue.size.max", 300)
-
-  val ENABLE_PUBLIC_SERVICE = CommonVars("wds.linkis.gateway.conf.enable.publicservice", true)
-  val PUBLIC_SERVICE_APPLICATION_NAME = CommonVars("wds.linkis.gateway.conf.publicservice.name", "publicservice")
-  val PUBLIC_SERVICE_LIST = CommonVars("wds.linkis.gateway.conf.publicservice.list", "query,jobhistory,application,configuration,filesystem,udf,variable").getValue.split(",")
-
-  val BDP_RPC_INSTANCE_ALIAS_SERVICE_REFRESH_INTERVAL = CommonVars("wds.linkis.rpc.instancealias.refresh.interval", new TimeType("3s"))
-
-  val CONTEXT_SERVICE_APPLICATION_NAME = CommonVars("wds.linkis.gateway.conf.contextservice.name", "contextservice")
-}
diff --git a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/conf/RPCSpringConfiguration.scala b/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/conf/RPCSpringConfiguration.scala
deleted file mode 100644
index b6a43a8..0000000
--- a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/conf/RPCSpringConfiguration.scala
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.rpc.conf
-
-import com.netflix.discovery.EurekaClient
-import com.webank.wedatasphere.linkis.DataWorkCloudApplication
-import com.webank.wedatasphere.linkis.common.utils.Logging
-import com.webank.wedatasphere.linkis.rpc.RPCReceiveRestful
-import com.webank.wedatasphere.linkis.rpc.interceptor.RPCServerLoader
-import com.webank.wedatasphere.linkis.rpc.sender.eureka.EurekaRPCServerLoader
-import com.webank.wedatasphere.linkis.server.conf.ServerConfiguration
-import org.apache.commons.lang.StringUtils
-import org.springframework.boot.autoconfigure.condition.{ConditionalOnClass, ConditionalOnMissingBean}
-import org.springframework.boot.context.event.ApplicationPreparedEvent
-import org.springframework.cloud.openfeign.EnableFeignClients
-import org.springframework.context.annotation.{Bean, Configuration}
-import org.springframework.context.event.EventListener
-
-/**
-  * Created by enjoyyin on 2019/1/14.
-  */
-@Configuration
-@EnableFeignClients
-class RPCSpringConfiguration extends Logging {
-
-  @Bean(Array("rpcServerLoader"))
-  @ConditionalOnClass(Array(classOf[EurekaClient]))
-  @ConditionalOnMissingBean
-  def createRPCServerLoader(): RPCServerLoader = new EurekaRPCServerLoader
-
-  @EventListener
-  def completeInitialize(applicationPreparedEvent: ApplicationPreparedEvent): Unit = {
-    val restfulClasses = ServerConfiguration.BDP_SERVER_RESTFUL_REGISTER_CLASSES.getValue
-    if(StringUtils.isEmpty(restfulClasses))
-      DataWorkCloudApplication.setProperty(ServerConfiguration.BDP_SERVER_RESTFUL_REGISTER_CLASSES.key, classOf[RPCReceiveRestful].getName)
-    else
-      DataWorkCloudApplication.setProperty(ServerConfiguration.BDP_SERVER_RESTFUL_REGISTER_CLASSES.key, restfulClasses +
-        "," + classOf[RPCReceiveRestful].getName)
-    info("DataWorkCloud RPC need register RPCReceiveRestful, now add it to configuration.")
-  }
-
-}
diff --git a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/instancealias/InstanceAliasManager.scala b/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/instancealias/InstanceAliasManager.scala
deleted file mode 100644
index 3a6b4a7..0000000
--- a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/instancealias/InstanceAliasManager.scala
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.webank.wedatasphere.linkis.rpc.instancealias
-
-import com.webank.wedatasphere.linkis.common.ServiceInstance
-import javax.annotation.Nullable
-
-/**
- * @Author alexyang
- * @Date 2020/2/18
- */
-trait InstanceAliasManager {
-
-  def getAliasByServiceInstance(instance: ServiceInstance): String
-
-  def getAliasByInstance(instance: String): String
-
-  @Nullable
-  def getInstanceByAlias(alias: String): ServiceInstance
-
-  def refresh(): Unit
-
-  def getAllInstanceList(): java.util.List[ServiceInstance]
-
-  def isInstanceAliasValid(alias: String): Boolean
-}
diff --git a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/instancealias/impl/InstanceAliasManagerImpl.scala b/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/instancealias/impl/InstanceAliasManagerImpl.scala
deleted file mode 100644
index 353f6a4..0000000
--- a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/instancealias/impl/InstanceAliasManagerImpl.scala
+++ /dev/null
@@ -1,92 +0,0 @@
-package com.webank.wedatasphere.linkis.rpc.instancealias.impl
-
-import java.util
-
-import com.webank.wedatasphere.linkis.DataWorkCloudApplication
-import com.webank.wedatasphere.linkis.common.ServiceInstance
-import com.webank.wedatasphere.linkis.common.utils.Logging
-import com.webank.wedatasphere.linkis.rpc.conf.RPCConfiguration
-import com.webank.wedatasphere.linkis.rpc.instancealias.{InstanceAliasConverter, InstanceAliasManager}
-import com.webank.wedatasphere.linkis.rpc.sender.eureka.EurekaRPCServerLoader
-import com.webank.wedatasphere.linkis.rpc.utils.RPCUtils
-import org.springframework.beans.factory.annotation.Autowired
-import org.springframework.stereotype.Component
-
-import scala.collection.JavaConversions._
-
-/**
- * @Author alexyang
- * @Date 2020/2/18
- */
-@Component
-class InstanceAliasManagerImpl extends InstanceAliasManager with Logging {
-
-  private val serverLoader = new EurekaRPCServerLoader()
-
-  private val mainInstance = DataWorkCloudApplication.getServiceInstance
-
-  @Autowired
-  var instanceAliasConverter: InstanceAliasConverter = _
-
-  override def getAliasByInstance(instance: String): String  = {
-    instanceAliasConverter.instanceToAlias(instance)
-  }
-
-  override def getInstanceByAlias(alias: String): ServiceInstance = {
-    val serviceID = getContextServiceID()
-    if (null == serviceID) {
-      return null
-    }
-    val instances = serverLoader.getServiceInstances(serviceID)
-    if (null == instances || instances.isEmpty) {
-      error(s"None serviec instances for Context Service ID : " + serviceID)
-      return null
-    }
-    val targetInstance = instanceAliasConverter.aliasToInstance(alias)
-    instances.foreach(ins => {
-      if (ins.getInstance.equalsIgnoreCase(targetInstance)) {
-        return ins
-      }
-    })
-    null
-  }
-
-  def getContextServiceID(): String = {
-    RPCUtils.findService (RPCConfiguration.CONTEXT_SERVICE_APPLICATION_NAME.getValue, list => {
-    val services = list.filter (_.contains (RPCConfiguration.CONTEXT_SERVICE_APPLICATION_NAME.getValue) )
-      services.headOption
-    }).getOrElse(null)
-  }
-
-  @Deprecated
-  override def refresh(): Unit = {
-
-  }
-
-  override def getAllInstanceList(): util.List[ServiceInstance] = {
-    val serviceID = getContextServiceID()
-    if (null == serviceID) {
-      return new util.ArrayList[ServiceInstance](0)
-    }
-    serverLoader.getServiceInstances(serviceID).toList
-  }
-
-  override def isInstanceAliasValid(alias: String): Boolean = {
-    if (!instanceAliasConverter.checkAliasFormatValid(alias)) {
-      return false
-    }
-    if (null != getInstanceByAlias(alias)) {
-      true
-    } else {
-      false
-    }
-  }
-
-  override def getAliasByServiceInstance(instance: ServiceInstance): String = {
-    if (null == instance) {
-      return null
-    }
-    instanceAliasConverter.instanceToAlias(instance.getInstance)
-  }
-}
-
diff --git a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/interceptor/common/CacheableRPCInterceptor.scala b/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/interceptor/common/CacheableRPCInterceptor.scala
deleted file mode 100644
index b5f67d9..0000000
--- a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/interceptor/common/CacheableRPCInterceptor.scala
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.rpc.interceptor.common
-
-import java.util.concurrent.{Callable, TimeUnit}
-
-import com.google.common.cache.{Cache, CacheBuilder, RemovalListener, RemovalNotification}
-import com.webank.wedatasphere.linkis.common.exception.WarnException
-import com.webank.wedatasphere.linkis.common.utils.Logging
-import com.webank.wedatasphere.linkis.protocol.CacheableProtocol
-import com.webank.wedatasphere.linkis.rpc.interceptor.{RPCInterceptor, RPCInterceptorChain, RPCInterceptorExchange}
-import org.springframework.stereotype.Component
-
-/**
-  * Created by enjoyyin on 2019/1/14.
-  */
-@Component
-class CacheableRPCInterceptor extends RPCInterceptor with Logging{
-
-  private val guavaCache: Cache[Any, Any] = CacheBuilder.newBuilder().concurrencyLevel(5)
-    .expireAfterAccess(120000, TimeUnit.MILLISECONDS).initialCapacity(20)  //TODO Make parameters(做成参数)
-    .maximumSize(1000).recordStats().removalListener(new RemovalListener[Any, Any] {
-    override def onRemoval(removalNotification: RemovalNotification[Any, Any]): Unit = {
-      debug(s"CacheSender removed key => ${removalNotification.getKey}, value => ${removalNotification.getValue}.")
-    }
-  }).asInstanceOf[CacheBuilder[Any, Any]].build()
-
-  override val order: Int = 10
-
-  override def intercept(interceptorExchange: RPCInterceptorExchange, chain: RPCInterceptorChain): Any = interceptorExchange.getProtocol match {
-    case cacheable: CacheableProtocol =>
-      guavaCache.get(cacheable.toString, new Callable[Any] {
-        override def call(): Any = {
-          val returnMsg = chain.handle(interceptorExchange)
-          returnMsg match {
-            case warn: WarnException =>
-              throw warn
-            case _ =>
-              returnMsg
-          }
-        }
-      })
-    case _ => chain.handle(interceptorExchange)
-  }
-}
diff --git a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/interceptor/common/RetryableRPCInterceptor.scala b/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/interceptor/common/RetryableRPCInterceptor.scala
deleted file mode 100644
index 7a8e784..0000000
--- a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/interceptor/common/RetryableRPCInterceptor.scala
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.rpc.interceptor.common
-
-import java.net.ConnectException
-
-import com.webank.wedatasphere.linkis.common.ServiceInstance
-import com.webank.wedatasphere.linkis.common.exception.DWCRetryException
-import com.webank.wedatasphere.linkis.common.utils.RetryHandler
-import com.webank.wedatasphere.linkis.protocol.RetryableProtocol
-import com.webank.wedatasphere.linkis.rpc.exception.{DWCRPCRetryException, NoInstanceExistsException}
-import com.webank.wedatasphere.linkis.rpc.interceptor.{RPCInterceptor, RPCInterceptorChain, RPCInterceptorExchange, ServiceInstanceRPCInterceptorChain}
-import com.webank.wedatasphere.linkis.rpc.utils.RPCUtils
-import feign.RetryableException
-import org.apache.commons.lang.StringUtils
-import org.springframework.stereotype.Component
-
-/**
-  * Created by enjoyyin on 2019/1/14.
-  */
-@Component
-class RetryableRPCInterceptor extends RPCInterceptor {
-  override val order: Int = 20
-
-//  private val commonRetryHandler = new RPCRetryHandler
-//  commonRetryHandler.setRetryInfo(new RetryableProtocol{})
-//
-//  private def isCommonRetryHandler(retry: RetryableProtocol): Boolean = retry.maxPeriod == commonRetryHandler.getRetryMaxPeriod &&
-//    retry.period == commonRetryHandler.getRetryPeriod && retry.retryNum == commonRetryHandler.getRetryNum &&
-//    (retry.retryExceptions.isEmpty || commonRetryHandler.getRetryExceptions.containsSlice(retry.retryExceptions))
-
-  override def intercept(interceptorExchange: RPCInterceptorExchange, chain: RPCInterceptorChain): Any = interceptorExchange.getProtocol match {
-    case retry: RetryableProtocol =>
-      val retryName = retry.getClass.getSimpleName
-//      if(isCommonRetryHandler(retry)) commonRetryHandler.retry(chain.handle(interceptorExchange), retryName)
-//      else {
-        val retryHandler = new RPCRetryHandler
-        retryHandler.setRetryInfo(retry, chain)
-        retryHandler.retry(chain.handle(interceptorExchange), retryName)
-//      }
-    case _ => chain.handle(interceptorExchange)
-  }
-
-  class RPCRetryHandler extends RetryHandler {
-    addRetryException(classOf[ConnectException])
-    addRetryException(classOf[RetryableException])
-    private var serviceInstance: Option[ServiceInstance] = None
-    def setRetryInfo(retry: RetryableProtocol, chain: RPCInterceptorChain): Unit ={
-      setRetryNum(retry.retryNum)
-      setRetryPeriod(retry.period)
-      setRetryMaxPeriod(retry.maxPeriod)
-      retry.retryExceptions.foreach(addRetryException)
-      chain match {
-        case s: ServiceInstanceRPCInterceptorChain => serviceInstance = Option(s.getServiceInstance)
-        case _ =>
-      }
-    }
-
-    private def isNoServiceException(t: Throwable): Boolean = RPCUtils.isReceiverNotExists(t)
-
-    override def exceptionCanRetry(t: Throwable): Boolean = t match {
-      case _: DWCRPCRetryException => true
-      case r: DWCRetryException => r.getErrCode == DWCRPCRetryException.RPC_RETRY_ERROR_CODE
-      case _ => (serviceInstance.exists(s => StringUtils.isBlank(s.getInstance)) && isNoServiceException(t)) || super.exceptionCanRetry(t)
-    }
-  }
-}
-object RetryableRPCInterceptor {
-  def isRetryableProtocol(message: Any): Boolean = message match {
-    case protocol: RetryableProtocol => true
-    case _ => false
-  }
-}
\ No newline at end of file
diff --git a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/sender/SpringCloudFeignConfigurationCache.scala b/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/sender/SpringCloudFeignConfigurationCache.scala
deleted file mode 100644
index 2fd1ce4..0000000
--- a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/sender/SpringCloudFeignConfigurationCache.scala
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.rpc.sender
-
-import com.webank.wedatasphere.linkis.DataWorkCloudApplication
-import com.webank.wedatasphere.linkis.rpc.{RPCReceiveRestful, RPCSpringBeanCache, Receiver}
-import feign.codec.{Decoder, Encoder}
-import feign.{Client, Contract}
-import javax.annotation.PostConstruct
-import org.springframework.beans.factory.annotation.Autowired
-import org.springframework.boot.autoconfigure.{AutoConfigureAfter, AutoConfigureBefore}
-import org.springframework.cloud.client.discovery.DiscoveryClient
-import org.springframework.cloud.client.loadbalancer.LoadBalancedRetryFactory
-import org.springframework.cloud.netflix.ribbon.SpringClientFactory
-import org.springframework.cloud.openfeign.FeignClientsConfiguration
-import org.springframework.context.annotation.{Configuration, Import}
-
-/**
-  * Created by enjoyyin on 2019/1/14.
-  */
-@Import(Array(classOf[FeignClientsConfiguration]))
-@Autowired
-@Configuration
-@AutoConfigureBefore(Array(classOf[Receiver], classOf[RPCReceiveRestful]))
-class SpringCloudFeignConfigurationCache(encoder: Encoder, decoder: Decoder,
-                                         contract: Contract, client: Client) {
-
-  @Autowired
-  private var discoveryClient: DiscoveryClient = _
-  @Autowired
-  private var clientFactory: SpringClientFactory = _
-  @Autowired(required = false)
-  private var loadBalancedRetryFactory: LoadBalancedRetryFactory = _
-
-  @PostConstruct
-  def storeFeignConfiguration(): Unit = {
-    SpringCloudFeignConfigurationCache.client = client
-    SpringCloudFeignConfigurationCache.clientFactory = clientFactory
-    SpringCloudFeignConfigurationCache.loadBalancedRetryFactory = loadBalancedRetryFactory
-    SpringCloudFeignConfigurationCache.contract = contract
-    SpringCloudFeignConfigurationCache.decoder = decoder
-    SpringCloudFeignConfigurationCache.encoder = encoder
-    SpringCloudFeignConfigurationCache.discoveryClient = discoveryClient
-  }
-
-}
-private[linkis] object SpringCloudFeignConfigurationCache {
-  private[SpringCloudFeignConfigurationCache] var encoder: Encoder = _
-  private[SpringCloudFeignConfigurationCache] var decoder: Decoder = _
-  private[SpringCloudFeignConfigurationCache] var contract: Contract = _
-  private[SpringCloudFeignConfigurationCache] var client: Client = _
-  private[SpringCloudFeignConfigurationCache] var clientFactory: SpringClientFactory = _
-  private[SpringCloudFeignConfigurationCache] var loadBalancedRetryFactory: LoadBalancedRetryFactory = _
-  private[SpringCloudFeignConfigurationCache] var discoveryClient: DiscoveryClient = _
-  private val rpcTicketIdRequestInterceptor = new FeignClientRequestInterceptor
-
-  private[rpc] def getEncoder = encoder
-  private[rpc] def getDecoder = decoder
-  private[rpc] def getContract = contract
-  private[rpc] def getClient = {
-    if(client == null) DataWorkCloudApplication.getApplicationContext.getBean(classOf[SpringCloudFeignConfigurationCache])
-    client
-  }
-  private[rpc] def getClientFactory = clientFactory
-  private[rpc] def getLoadBalancedRetryFactory = loadBalancedRetryFactory
-  private[linkis] def getDiscoveryClient = {
-    if(discoveryClient == null) DataWorkCloudApplication.getApplicationContext.getBean(classOf[SpringCloudFeignConfigurationCache])
-    discoveryClient
-  }
-  private[rpc] def getRPCTicketIdRequestInterceptor = rpcTicketIdRequestInterceptor
-}
\ No newline at end of file
diff --git a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/sender/SpringMVCRPCSender.scala b/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/sender/SpringMVCRPCSender.scala
deleted file mode 100644
index 29d74a5..0000000
--- a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/sender/SpringMVCRPCSender.scala
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.rpc.sender
-
-import java.lang.reflect.Field
-
-import com.netflix.client.ClientRequest
-import com.netflix.client.config.IClientConfig
-import com.netflix.loadbalancer.reactive.LoadBalancerCommand
-import com.webank.wedatasphere.linkis.common.ServiceInstance
-import com.webank.wedatasphere.linkis.common.conf.{Configuration => DWCConfiguration}
-import com.webank.wedatasphere.linkis.protocol.Protocol
-import com.webank.wedatasphere.linkis.rpc.interceptor.{BaseRPCInterceptorChain, RPCInterceptor, RPCLoadBalancer, ServiceInstanceRPCInterceptorChain}
-import com.webank.wedatasphere.linkis.rpc.transform.RPCConsumer
-import com.webank.wedatasphere.linkis.rpc.{BaseRPCSender, RPCMessageEvent, RPCSpringBeanCache}
-import com.webank.wedatasphere.linkis.server.{BDPJettyServerHelper, Message}
-import feign._
-import org.apache.commons.lang.StringUtils
-import org.springframework.cloud.netflix.ribbon.ServerIntrospector
-import org.springframework.cloud.openfeign.ribbon.{CachingSpringLoadBalancerFactory, FeignLoadBalancer, LoadBalancerFeignClient}
-
-/**
-  * Created by enjoyyin on 2018/8/28.
-  */
-private[rpc] class SpringMVCRPCSender private[rpc](private[rpc] val serviceInstance: ServiceInstance)
-  extends BaseRPCSender(serviceInstance.getApplicationName) {
-
-  import SpringCloudFeignConfigurationCache._
-
-  override protected def getRPCInterceptors: Array[RPCInterceptor] = RPCSpringBeanCache.getRPCInterceptors
-
-  override protected def createRPCInterceptorChain() = new ServiceInstanceRPCInterceptorChain(0, getRPCInterceptors, serviceInstance)
-
-  protected def getRPCLoadBalancers: Array[RPCLoadBalancer] = RPCSpringBeanCache.getRPCLoadBalancers
-
-  override protected def doBuilder(builder: Feign.Builder): Unit = {
-    val client = getClient.asInstanceOf[LoadBalancerFeignClient]
-    val newClient = new LoadBalancerFeignClient(client.getDelegate, new CachingSpringLoadBalancerFactory(getClientFactory) {
-      override def create(clientName: String): FeignLoadBalancer = {
-        val serverIntrospector = getClientFactory.getInstance(clientName, classOf[ServerIntrospector])
-        new FeignLoadBalancer(getClientFactory.getLoadBalancer(clientName), getClientFactory.getClientConfig(clientName), serverIntrospector) {
-          override def customizeLoadBalancerCommandBuilder(request: FeignLoadBalancer.RibbonRequest, config: IClientConfig,
-                                                           builder: LoadBalancerCommand.Builder[FeignLoadBalancer.RibbonResponse]): Unit = {
-            val instance = if(getRPCLoadBalancers.isEmpty) None else {
-              val requestBody = SpringMVCRPCSender.getRequest(request).body()
-              val requestStr = new String(requestBody, DWCConfiguration.BDP_ENCODING.getValue)
-              val obj = RPCConsumer.getRPCConsumer.toObject(BDPJettyServerHelper.gson.fromJson(requestStr, classOf[Message]))
-              obj match {
-                case protocol: Protocol =>
-                  var serviceInstance: Option[ServiceInstance] = None
-                  for (lb <- getRPCLoadBalancers if serviceInstance.isEmpty)
-                    serviceInstance = lb.choose(protocol, SpringMVCRPCSender.this.serviceInstance, getLoadBalancer)
-                  serviceInstance.foreach(f =>
-                    info("origin serviceInstance: " + SpringMVCRPCSender.this.serviceInstance + ", chose serviceInstance: " + f)) //TODO just for test
-                  serviceInstance
-                case _ => None
-              }
-            }
-            instance.orElse(Option(SpringMVCRPCSender.this.serviceInstance)).filter(s => StringUtils.isNotBlank(s.getInstance))
-              .foreach { serviceInstance =>
-                val server = RPCSpringBeanCache.getRPCServerLoader.getServer(getLoadBalancer, serviceInstance)
-                builder.withServer(server)
-              }
-          }
-        }
-      }
-    }, getClientFactory)
-    super.doBuilder(builder)
-    builder.contract(getContract)
-      .encoder(getEncoder).decoder(getDecoder)
-      .client(newClient).requestInterceptor(getRPCTicketIdRequestInterceptor)
-  }
-
-
-  /**
-    * Deliver is an asynchronous method that requests the target microservice asynchronously, ensuring that the target microservice is requested once,
-    * but does not guarantee that the target microservice will successfully receive the request.
-    * deliver是一个异步方法,该方法异步请求目标微服务,确保一定会请求目标微服务一次,但不保证目标微服务一定能成功接收到本次请求。
-    * @param message Requested parameters(请求的参数)
-    */
-  override def deliver(message: Any): Unit = getRPCSenderListenerBus.post(RPCMessageEvent(message, serviceInstance))
-
-  override def equals(obj: Any): Boolean = if(obj == null) false
-    else obj match {
-      case sender: SpringMVCRPCSender => sender.serviceInstance == serviceInstance
-      case _ => false
-    }
-
-  override def hashCode(): Int = serviceInstance.hashCode()
-
-  override val toString: String = if(StringUtils.isBlank(serviceInstance.getInstance)) s"RPCSender(${serviceInstance.getApplicationName})"
-    else s"RPCSender($getApplicationName, ${serviceInstance.getInstance})"
-}
-private object SpringMVCRPCSender {
-  private var requestField: Field = _
-  def getRequest(req: ClientRequest): Request = {
-    if(requestField == null) synchronized {
-      if(requestField == null) {
-        requestField = req.getClass.getDeclaredField("request")
-        requestField.setAccessible(true)
-      }
-    }
-    requestField.get(req).asInstanceOf[Request]
-  }
-}
\ No newline at end of file
diff --git a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/sender/UnionSender.scala b/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/sender/UnionSender.scala
deleted file mode 100644
index a3694b5..0000000
--- a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/sender/UnionSender.scala
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.rpc.sender
-
-import java.util
-
-import com.webank.wedatasphere.linkis.rpc.Sender
-import com.webank.wedatasphere.linkis.rpc.Receiver
-
-import scala.concurrent.duration.Duration
-
-/**
-  * Created by enjoyyin on 2018/11/3.
-  */
-private class UnionSender private(receiver: Receiver, recycler: Receiver) extends Sender {
-
-  override def ask(message: Any): Any =
-    receiver.receiveAndReply(message, UnionSender.getUnionSender(recycler, receiver))
-
-  override def ask(message: Any, timeout: Duration): Any =
-    receiver.receiveAndReply(message, timeout, UnionSender.getUnionSender(recycler, receiver))
-
-  override def send(message: Any): Unit = receiver.receive(message, UnionSender.getUnionSender(recycler, receiver))
-
-  /**
-    * Deliver is an asynchronous method that requests the target microservice asynchronously, ensuring that the target microservice is requested once,
-    * but does not guarantee that the target microservice will successfully receive the request.
-    * deliver是一个异步方法,该方法异步请求目标微服务,确保一定会请求目标微服务一次,但不保证目标微服务一定能成功接收到本次请求。
-    * @param message Requested parameters(请求的参数)
-    */
-  override def deliver(message: Any): Unit = send(message)
-}
-object UnionSender {
-  private val receiverStringToSenders = new util.HashMap[String, Sender]
-  def getUnionSender(receiver: Receiver, recycler: Receiver): Sender = {
-    val key = receiver.hashCode() + "_" + recycler.hashCode()
-    if(!receiverStringToSenders.containsKey(key)) receiverStringToSenders synchronized {
-      if(!receiverStringToSenders.containsKey(key))
-        receiverStringToSenders.put(key, new UnionSender(receiver, recycler))
-    }
-    receiverStringToSenders.get(key)
-  }
-}
\ No newline at end of file
diff --git a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/sender/eureka/EurekaRPCServerLoader.scala b/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/sender/eureka/EurekaRPCServerLoader.scala
deleted file mode 100644
index 033a631..0000000
--- a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/sender/eureka/EurekaRPCServerLoader.scala
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.rpc.sender.eureka
-
-import com.netflix.loadbalancer.{DynamicServerListLoadBalancer, ILoadBalancer}
-import com.webank.wedatasphere.linkis.common.ServiceInstance
-import com.webank.wedatasphere.linkis.common.utils.Utils
-import com.webank.wedatasphere.linkis.rpc.conf.RPCConfiguration
-import com.webank.wedatasphere.linkis.rpc.interceptor.AbstractRPCServerLoader
-import org.springframework.cloud.netflix.eureka.EurekaDiscoveryClient.EurekaServiceInstance
-
-import scala.concurrent.duration.Duration
-
-/**
-  * Created by enjoyyin on 2019/1/14.
-  */
-class EurekaRPCServerLoader extends AbstractRPCServerLoader {
-
-  override def refreshAllServers(): Unit = Utils.tryAndWarn(EurekaClientRefreshUtils().refreshEurekaClient())
-
-  override val refreshMaxWaitTime: Duration = RPCConfiguration.BDP_RPC_EUREKA_SERVICE_REFRESH_MAX_WAIT_TIME.getValue.toDuration
-
-  override def getDWCServiceInstance(serviceInstance: SpringCloudServiceInstance): ServiceInstance = serviceInstance match {
-    case instance: EurekaServiceInstance =>
-      val applicationName = instance.getInstanceInfo.getAppName
-      val instanceId = instance.getInstanceInfo.getInstanceId
-      ServiceInstance(applicationName, getInstance(applicationName, instanceId))
-  }
-
-  private[rpc] def getInstance(applicationName: String, instanceId: String): String =
-    if (instanceId.toLowerCase.indexOf(applicationName.toLowerCase) > 0) {
-      val instanceInfos = instanceId.split(":")
-      instanceInfos(0) + ":" + instanceInfos(2)
-    } else instanceId
-}
diff --git a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/transform/JavaCollectionSerializer.scala b/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/transform/JavaCollectionSerializer.scala
deleted file mode 100644
index dbefa9a..0000000
--- a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/transform/JavaCollectionSerializer.scala
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.rpc.transform
-
-import com.webank.wedatasphere.linkis.server.BDPJettyServerHelper
-import org.json4s.{CustomSerializer, JArray, JObject}
-import org.json4s.jackson.Serialization.write
-import org.json4s.jackson.JsonMethods.parse
-
-//TODO is now only the simplest implementation, and there is a need to optimize it later.(TODO 现在只做最简单的实现,后续有需要再优化)
-/**
-  * Created by enjoyyin on 2018/10/27.
-  */
-object JavaCollectionSerializer extends CustomSerializer[java.util.List[_]](implicit formats => ( {
-  case j: JArray=> BDPJettyServerHelper.gson.fromJson(write(j), classOf[java.util.List[_]])
-}, {
-  case list: java.util.List[_] => parse(BDPJettyServerHelper.gson.toJson(list))
-}
-)
-)
-
-object JavaMapSerializer extends CustomSerializer[java.util.Map[_, _]](implicit formats => ( {
-  case j: JObject => BDPJettyServerHelper.gson.fromJson(write(j), classOf[java.util.Map[_, _]])
-}, {
-  case map: java.util.Map[_, _] => parse(BDPJettyServerHelper.gson.toJson(map))
-}
-)
-)
\ No newline at end of file
diff --git a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/transform/RPCConsumer.scala b/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/transform/RPCConsumer.scala
deleted file mode 100644
index dba8f10..0000000
--- a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/transform/RPCConsumer.scala
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.rpc.transform
-
-import com.webank.wedatasphere.linkis.common.exception.ExceptionManager
-import com.webank.wedatasphere.linkis.common.utils.Utils
-import com.webank.wedatasphere.linkis.rpc.exception.DWCURIException
-import com.webank.wedatasphere.linkis.server.{BDPJettyServerHelper, JMap, Message, EXCEPTION_MSG}
-import org.json4s.jackson.Serialization
-
-import scala.reflect.ManifestFactory
-import scala.runtime.BoxedUnit
-
-/**
-  * Created by enjoyyin on 2018/9/13.
-  */
-private[linkis] trait RPCConsumer {
-
-  def toObject(message: Message): Any
-
-}
-private[linkis] object RPCConsumer {
-  import RPCProduct._
-  private val rpcConsumer: RPCConsumer = new RPCConsumer {
-    override def toObject(message: Message): Any = {
-      message.getStatus match {
-        case 0 =>
-          val data = message.getData
-          if(data.isEmpty) return BoxedUnit.UNIT
-          val objectStr = data.get(OBJECT_VALUE).toString
-          val objectClass = data.get(CLASS_VALUE).toString
-          val clazz = Utils.tryThrow(Class.forName(objectClass)){
-            case _: ClassNotFoundException =>
-              new DWCURIException(10003, s"The corresponding anti-sequence class $objectClass was not found.(找不到对应的反序列类$objectClass.)")
-            case t: ExceptionInInitializerError =>
-              val exception = new DWCURIException(10004, s"The corresponding anti-sequence class ${objectClass} failed to initialize.(对应的反序列类${objectClass}初始化失败.)")
-              exception.initCause(t)
-              exception
-            case t: Throwable => t
-          }
-          if(data.get(IS_SCALA_CLASS).toString.toBoolean) {
-            val realClass = getSerializableScalaClass(clazz)
-            Serialization.read(objectStr)(formats, ManifestFactory.classType(realClass))
-          } else {
-            BDPJettyServerHelper.gson.fromJson(objectStr, clazz)
-          }
-        case 4 =>
-          val errorMsg = message.getData.get(EXCEPTION_MSG).asInstanceOf[JMap[String, Object]]
-          ExceptionManager.generateException(errorMsg)
-        case _ =>
-          val errorMsg = message.getData.get(EXCEPTION_MSG)
-          if(errorMsg == null) throw new DWCURIException(10005, message.getMessage)
-          val realError = ExceptionManager.generateException(errorMsg.asInstanceOf[JMap[String, Object]])
-          throw realError;
-      }
-    }
-  }
-  def getRPCConsumer: RPCConsumer = rpcConsumer
-}
\ No newline at end of file
diff --git a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/transform/RPCProduct.scala b/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/transform/RPCProduct.scala
deleted file mode 100644
index 6323bc7..0000000
--- a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/transform/RPCProduct.scala
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.rpc.transform
-
-import java.lang.reflect.{ParameterizedType, Type}
-import java.util
-
-import com.webank.wedatasphere.linkis.DataWorkCloudApplication
-import com.webank.wedatasphere.linkis.common.utils.Logging
-import com.webank.wedatasphere.linkis.rpc.exception.DWCURIException
-import com.webank.wedatasphere.linkis.server.{BDPJettyServerHelper, EXCEPTION_MSG, Message}
-import org.apache.commons.lang.ClassUtils
-import org.json4s.jackson.Serialization
-import org.json4s.{DefaultFormats, Formats, Serializer}
-
-import scala.collection.JavaConversions
-
-/**
-  * Created by enjoyyin on 2018/9/13.
-  */
-private[linkis] trait RPCProduct {
-
-  def toMessage(t: Any): Message
-
-  def notFound(): Message
-
-  def ok(): Message
-
-}
-private[linkis] object RPCProduct extends Logging {
-  private[rpc] val IS_SCALA_CLASS = "rpc_is_scala_class"
-  private[rpc] val CLASS_VALUE = "rpc_object_class"
-  private[rpc] val OBJECT_VALUE = "rpc_object_value"
-  private[rpc] implicit var formats: Formats = DefaultFormats + JavaCollectionSerializer + JavaMapSerializer
-  private var serializerClasses: List[Class[_]] = List.empty
-  private val rpcProduct: RPCProduct = new RPCProduct {
-    private val rpcFormats = DataWorkCloudApplication.getApplicationContext.getBeansOfType(classOf[RPCFormats])
-    if(rpcFormats != null && !rpcFormats.isEmpty) {
-      val serializers = JavaConversions.mapAsScalaMap(rpcFormats).map(_._2.getSerializers).toArray.flatMap(_.iterator)
-      setFormats(serializers)
-    }
-    override def toMessage(t: Any): Message = {
-      if(t == null) throw new DWCURIException(10001, "The transmitted bean is Null.(传输的bean为Null.)")
-      val message = Message.ok("RPC Message.")
-      if(isScalaClass(t)){
-        message.data(IS_SCALA_CLASS, "true")
-        message.data(OBJECT_VALUE, Serialization.write(t.asInstanceOf[AnyRef]))
-      } else {
-        message.data(IS_SCALA_CLASS, "false")
-        message.data(OBJECT_VALUE, BDPJettyServerHelper.gson.toJson(t))
-      }
-      message.setMethod("/rpc/message")
-      message.data(CLASS_VALUE, t.getClass.getName)
-    }
-
-    override def notFound(): Message = {
-      val message = Message.error("RPC Message.")
-      message.setMethod("/rpc/message")
-      message.data(EXCEPTION_MSG, new DWCURIException(10000, "The service does not exist for the available Receiver.(服务不存在可用的Receiver.)").toMap)
-    }
-
-    override def ok(): Message = {
-      val message = Message.ok("RPC Message.")
-      message.setMethod("/rpc/message")
-      message
-    }
-  }
-  private[rpc] def setFormats(serializer: Array[Serializer[_]]): Unit ={
-    this.formats = (serializer :+ JavaCollectionSerializer :+ JavaMapSerializer).foldLeft(DefaultFormats.asInstanceOf[Formats])(_ + _)
-    serializerClasses = formats.customSerializers.map(s => getActualTypeClass(s.getClass.getGenericSuperclass))
-      .filter(_ != null) ++: List(classOf[util.List[_]], classOf[util.Map[_, _]])
-    info("RPC Serializers: " + this.formats.customSerializers.map(_.getClass.getSimpleName) + ", serializerClasses: " +
-      "" + serializerClasses)
-  }
-  private def getActualTypeClass(classType: Type): Class[_] = classType match {
-    case p: ParameterizedType =>
-      val params = p.getActualTypeArguments
-      if(params == null || params.isEmpty) null
-      else getActualTypeClass(params(0))
-    case c: Class[_] => c
-    case _ => null
-  }
-  private[rpc] def isScalaClass(obj: Any): Boolean =
-    (obj.isInstanceOf[Product] && obj.isInstanceOf[Serializable]) ||
-      serializerClasses.exists(ClassUtils.isAssignable(obj.getClass, _)) ||
-        obj.getClass.getName.startsWith("scala.")
-  private[rpc] def getSerializableScalaClass(clazz: Class[_]): Class[_] =
-    serializerClasses.find(ClassUtils.isAssignable(clazz, _)).getOrElse(clazz)
-  def getRPCProduct: RPCProduct = rpcProduct
-}
\ No newline at end of file
diff --git a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/utils/RPCUtils.scala b/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/utils/RPCUtils.scala
deleted file mode 100644
index cd50461..0000000
--- a/core/cloudRPC/src/main/scala/com/webank/wedatasphere/linkis/rpc/utils/RPCUtils.scala
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.rpc.utils
-
-import java.lang.reflect.UndeclaredThrowableException
-import java.net.ConnectException
-
-import com.netflix.client.ClientException
-import com.webank.wedatasphere.linkis.rpc.exception.NoInstanceExistsException
-import com.webank.wedatasphere.linkis.rpc.sender.SpringCloudFeignConfigurationCache
-import feign.RetryableException
-import org.apache.commons.lang.StringUtils
-import scala.collection.JavaConversions._
-
-/**
-  * Created by enjoyyin on 2019/2/22.
-  */
-object RPCUtils {
-
-  def isReceiverNotExists(t: Throwable): Boolean = t match {
-    case connect: ConnectException => connect.getMessage != null && connect.getMessage.contains("Connection refused")
-    case _: NoInstanceExistsException => true
-    case t: UndeclaredThrowableException =>
-      t.getCause match {
-        case _: NoInstanceExistsException => true
-        case _ => false
-      }
-    case t: RetryableException => t.getCause match {
-      case connect: ConnectException =>
-        connect.getMessage != null && connect.getMessage.contains("Connection refused")
-      case _ => false
-    }
-    case t: RuntimeException => t.getCause match {
-      case client: ClientException => StringUtils.isNotBlank(client.getErrorMessage) &&
-        client.getErrorMessage.contains("Load balancer does not have available server for client")
-      case _ => false
-    }
-    case _ => false
-  }
-
-  def findService(parsedServiceId: String, tooManyDeal: List[String] => Option[String]): Option[String] = {
-    val services = SpringCloudFeignConfigurationCache.getDiscoveryClient
-      .getServices.filter(_.toLowerCase.contains(parsedServiceId.toLowerCase)).toList
-    if(services.length == 1) Some(services.head)
-    else if(services.length > 1) tooManyDeal(services)
-    else None
-  }
-}
diff --git a/core/common/pom.xml b/core/common/pom.xml
deleted file mode 100644
index f44e156..0000000
--- a/core/common/pom.xml
+++ /dev/null
@@ -1,204 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>linkis-common</artifactId>
-    <packaging>jar</packaging>
-
-
-
-    <dependencies>
-        <dependency>
-            <groupId>org.scala-lang</groupId>
-            <artifactId>scala-library</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.scala-lang</groupId>
-            <artifactId>scala-compiler</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.scala-lang</groupId>
-            <artifactId>scala-reflect</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.scala-lang</groupId>
-            <artifactId>scalap</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>commons-lang</groupId>
-            <artifactId>commons-lang</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>commons-io</groupId>
-            <artifactId>commons-io</artifactId>
-            <version>2.4</version>
-        </dependency>
-        <dependency>
-            <groupId>commons-collections</groupId>
-            <artifactId>commons-collections</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-databind</artifactId>
-            <version>${fasterxml.jackson.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-annotations</artifactId>
-            <version>${fasterxml.jackson.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.module</groupId>
-            <artifactId>jackson-module-scala_${scala.binary.version}</artifactId>
-            <version>${fasterxml.jackson.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>com.google.guava</groupId>
-                    <artifactId>guava</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.scala-lang</groupId>
-                    <artifactId>scala-library</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.scala-lang</groupId>
-                    <artifactId>scala-reflect</artifactId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>paranamer</artifactId>
-                    <groupId>com.thoughtworks.paranamer</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <dependency>
-            <groupId>com.fasterxml.jackson.module</groupId>
-            <artifactId>jackson-module-parameter-names</artifactId>
-            <version>${fasterxml.jackson.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>com.fasterxml.jackson.datatype</groupId>
-            <artifactId>jackson-datatype-jsr310</artifactId>
-            <version>${fasterxml.jackson.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>com.fasterxml.jackson.datatype</groupId>
-            <artifactId>jackson-datatype-jdk8</artifactId>
-            <version>${fasterxml.jackson.version}</version>
-        </dependency>
-
-
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <version>${slf4j.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>commons-net</groupId>
-            <artifactId>commons-net</artifactId>
-            <version>3.1</version>
-        </dependency>
-
-        <dependency>
-            <groupId>commons-codec</groupId>
-            <artifactId>commons-codec</artifactId>
-            <version>1.10</version>
-        </dependency>
-        <dependency>
-            <groupId>com.google.code.gson</groupId>
-            <artifactId>gson</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.json4s</groupId>
-                    <artifactId>json4s-jackson_2.11</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.json4s</groupId>
-            <artifactId>json4s-core_${scala.binary.version}</artifactId>
-            <version>3.2.11</version>
-        </dependency>
-        <dependency>
-            <groupId>org.json4s</groupId>
-            <artifactId>json4s-jackson_${scala.binary.version}</artifactId>
-            <version>3.2.11</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>jackson-databind</artifactId>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.json4s</groupId>
-            <artifactId>json4s-ast_2.11</artifactId>
-            <version>3.2.11</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpclient</artifactId>
-            <version>4.5.4</version>
-        </dependency>
-    </dependencies>
-
-
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>src/main/resources</directory>
-            </resource>
-        </resources>
-        <finalName>${project.artifactId}-${project.version}</finalName>
-    </build>
-
-
-</project>
\ No newline at end of file
diff --git a/core/common/src/main/java/com/webank/wedatasphere/linkis/common/exception/DWCRuntimeException.java b/core/common/src/main/java/com/webank/wedatasphere/linkis/common/exception/DWCRuntimeException.java
deleted file mode 100644
index a1cae01..0000000
--- a/core/common/src/main/java/com/webank/wedatasphere/linkis/common/exception/DWCRuntimeException.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * author: enjoyyin
- * date: 2018/9/10
- * time: 15:16
- * Description:
- */
-package com.webank.wedatasphere.linkis.common.exception;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import static com.webank.wedatasphere.linkis.common.exception.DWCException.applicationName;
-import static com.webank.wedatasphere.linkis.common.exception.DWCException.hostname;
-import static com.webank.wedatasphere.linkis.common.exception.DWCException.hostPort;
-
-public abstract class DWCRuntimeException extends RuntimeException{
-
-    private int errCode;
-    private String desc;
-    private String ip;
-    private int port;
-    private String serviceKind;
-
-    public DWCRuntimeException(int errCode, String desc){
-        this(errCode, desc, hostname, hostPort, applicationName);
-    }
-    public DWCRuntimeException(int errCode, String desc, String ip, int port, String serviceKind){
-        super("errCode: " + errCode + " ,desc: " + desc + " ,ip: " + ip +
-                " ,port: " + port + " ,serviceKind: " + serviceKind);
-        this.errCode = errCode;
-        this.desc = desc;
-        this.ip = ip;
-        this.port = port;
-        this.serviceKind = serviceKind;
-    }
-
-    public int getErrCode() {
-        return errCode;
-    }
-
-    public void setErrCode(int errCode) {
-        this.errCode = errCode;
-    }
-
-    public String getDesc() {
-        return desc;
-    }
-
-    public void setDesc(String desc) {
-        this.desc = desc;
-    }
-
-    public String getIp() {
-        return ip;
-    }
-
-    public void setIp(String ip) {
-        this.ip = ip;
-    }
-
-    public int getPort() {
-        return port;
-    }
-
-    public void setPort(int port) {
-        this.port = port;
-    }
-
-    public String getServiceKind() {
-        return serviceKind;
-    }
-
-    public void setServiceKind(String serviceKind) {
-        this.serviceKind = serviceKind;
-    }
-
-    public Map<String, Object> toMap(){
-        Map<String, Object> retMap = new HashMap<String, Object>();
-        retMap.put("errCode", getErrCode());
-        retMap.put("desc", getDesc());
-        retMap.put("ip", getIp());
-        retMap.put("port", getPort());
-        retMap.put("level", getLevel().getLevel());
-        retMap.put("serviceKind", getServiceKind());
-        return retMap;
-    }
-
-    public abstract ExceptionLevel getLevel();
-
-    @Override
-    public String toString() {
-        return "DWCException{" +
-                "errCode=" + errCode +
-                ", desc='" + desc + '\'' +
-                ", ip='" + ip + '\'' +
-                ", port=" + port +
-                ", serviceKind='" + serviceKind + '\'' +
-                '}';
-    }
-}
diff --git a/core/common/src/main/java/com/webank/wedatasphere/linkis/common/exception/FatalException.java b/core/common/src/main/java/com/webank/wedatasphere/linkis/common/exception/FatalException.java
deleted file mode 100644
index 4c66a52..0000000
--- a/core/common/src/main/java/com/webank/wedatasphere/linkis/common/exception/FatalException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * author: enjoyyin
- * date: 2018/9/11
- * time: 20:40
- * Description:
- */
-package com.webank.wedatasphere.linkis.common.exception;
-
-import java.util.Map;
-
-public class FatalException extends DWCException{
-    private ExceptionLevel level = ExceptionLevel.FATAL;
-    public FatalException(int errCode, String desc){
-        super(errCode, desc);
-    }
-    public FatalException(int errCode, String desc, String ip, int port, String serviceKind){
-        super(errCode, desc, ip, port, serviceKind);
-    }
-
-    @Override
-    public ExceptionLevel getLevel(){
-        return this.level;
-    }
-}
diff --git a/core/common/src/main/java/com/webank/wedatasphere/linkis/common/exception/WarnException.java b/core/common/src/main/java/com/webank/wedatasphere/linkis/common/exception/WarnException.java
deleted file mode 100644
index 64aeb27..0000000
--- a/core/common/src/main/java/com/webank/wedatasphere/linkis/common/exception/WarnException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * author: enjoyyin
- * date: 2018/9/11
- * time: 20:39
- * Description:
- */
-package com.webank.wedatasphere.linkis.common.exception;
-
-import java.util.Map;
-
-public class WarnException extends DWCRuntimeException{
-    private ExceptionLevel level = ExceptionLevel.WARN;
-    public WarnException(int errCode, String desc){
-        super(errCode, desc);
-    }
-    public WarnException(int errCode, String desc, String ip, int port, String serviceKind){
-        super(errCode, desc, ip, port, serviceKind);
-    }
-
-    @Override
-    public ExceptionLevel getLevel(){
-        return this.level;
-    }
-}
diff --git a/core/common/src/main/java/com/webank/wedatasphere/linkis/common/io/Fs.java b/core/common/src/main/java/com/webank/wedatasphere/linkis/common/io/Fs.java
deleted file mode 100644
index 8f522d9..0000000
--- a/core/common/src/main/java/com/webank/wedatasphere/linkis/common/io/Fs.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.common.io;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Created by enjoyyin on 2017/2/4.
- */
-public interface Fs {
-
-    public abstract void init(Map<String, String> properties) throws IOException;
-
-    public abstract String fsName();
-
-    String rootUserName();
-
-    FsPath get(String dest) throws IOException;
-
-    public abstract InputStream read(FsPath dest) throws IOException;
-
-    public abstract OutputStream write(FsPath dest, boolean overwrite) throws IOException;
-
-    boolean create(String dest) throws IOException;
-
-    List<FsPath> list(final FsPath path) throws IOException;
-
-    public abstract boolean canRead(FsPath dest) throws IOException;
-
-    public abstract boolean canWrite(FsPath dest) throws IOException;
-
-    public abstract boolean exists(FsPath dest) throws IOException;
-
-    public abstract boolean delete(FsPath dest) throws IOException;
-
-    public abstract boolean renameTo(FsPath oldDest, FsPath newDest) throws IOException;
-
-    public abstract void close() throws IOException;
-
-}
diff --git a/core/common/src/main/java/com/webank/wedatasphere/linkis/common/io/FsPath.java b/core/common/src/main/java/com/webank/wedatasphere/linkis/common/io/FsPath.java
deleted file mode 100644
index a25efb5..0000000
--- a/core/common/src/main/java/com/webank/wedatasphere/linkis/common/io/FsPath.java
+++ /dev/null
@@ -1,330 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.common.io;
-
-import org.apache.commons.lang.StringUtils;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.nio.file.FileSystems;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.nio.file.attribute.PosixFilePermission;
-import java.nio.file.attribute.PosixFilePermissions;
-import java.util.Set;
-import java.util.regex.Pattern;
-
-/**
- * Created by enjoyyin on 2017/3/13.
- */
-public class FsPath {
-
-    public static final String CUR_DIR = ".";
-    public static final boolean WINDOWS
-            = System.getProperty("os.name").startsWith("Windows");
-    public static final char SEPARATOR_CHAR = '/';
-    public static final String SEPARATOR = "/";
-    private static final Pattern hasDriveLetterSpecifier = Pattern.compile("^/?[a-zA-Z]:");
-
-    private URI uri;
-    private long modification_time;
-    private long access_time;
-    private long length;
-    private boolean isdir;
-    private String permissionString;
-    private String owner;
-    private String group;
-    private PosixFilePermission[] permissions;
-
-    public FsPath(String pathString) throws IllegalArgumentException {
-        checkPathArg(pathString);
-        // We can't use 'new URI(String)' directly, since it assumes things are
-        // escaped, which we don't require of Paths.
-
-        // add a slash in front of paths with Windows drive letters
-        if (hasWindowsDrive(pathString) && pathString.charAt(0) != '/') {
-            pathString = "/" + pathString;
-        }
-        // parse uri components
-        String scheme = null;
-        String authority = null;
-
-        int start = 0;
-        // parse uri scheme, if any
-        int colon = pathString.indexOf(':');
-        int slash = pathString.indexOf('/');
-        if ((colon != -1) &&
-                ((slash == -1) || (colon < slash))) {     // has a scheme
-            scheme = pathString.substring(0, colon);
-            start = colon+1;
-        }
-        // parse uri authority, if any
-        if (pathString.startsWith("//", start) &&
-                (pathString.length()-start > 2)) {       // has authority
-            int nextSlash = pathString.indexOf('/', start+2);
-            int authEnd = nextSlash > 0 ? nextSlash : pathString.length();
-            authority = pathString.substring(start+2, authEnd);
-            start = authEnd;
-        }
-
-        // uri path is the rest of the string -- query & fragment not supported
-        String path = pathString.substring(start, pathString.length());
-        initialize(scheme, authority, path, null);
-    }
-
-    public FsPath(String scheme, String authority, String path) {
-        checkPathArg(path);
-        // add a slash in front of paths with Windows drive letters
-        if (hasWindowsDrive(path) && path.charAt(0) != '/') {
-            path = "/" + path;
-        }
-        // add "./" in front of Linux relative paths so that a path containing
-        // a colon e.q. "a:b" will not be interpreted as scheme "a".
-        if (!WINDOWS && path.charAt(0) != '/') {
-            path = "./" + path;
-        }
-        initialize(scheme, authority, path, null);
-    }
-
-    private void checkPathArg( String path ) throws IllegalArgumentException {
-        // disallow construction of a Path from an empty string
-        if ( path == null ) {
-            throw new IllegalArgumentException(
-                    "Can not create a Path from a null string");
-        }
-        if( path.length() == 0 ) {
-            throw new IllegalArgumentException(
-                    "Can not create a Path from an empty string");
-        }
-    }
-
-    private void initialize(String scheme, String authority, String path,
-                            String fragment) {
-        try {
-            this.uri = new URI(scheme, authority, normalizePath(scheme, path), null, fragment)
-                    .normalize();
-        } catch (URISyntaxException e) {
-            throw new IllegalArgumentException(e);
-        }
-    }
-
-    private static String normalizePath(String scheme, String path) {
-        // Remove double forward slashes.
-        path = StringUtils.replace(path, "//", "/");
-
-        // Remove backslashes if this looks like a Windows path. Avoid
-        // the substitution if it looks like a non-local URI.
-        if (WINDOWS &&
-                (hasWindowsDrive(path) ||
-                        (scheme == null) ||
-                        (scheme.isEmpty()) ||
-                        (scheme.equals("file")))) {
-            path = StringUtils.replace(path, "\\", "/");
-        }
-
-        // trim trailing slash from non-root path (ignoring windows drive)
-        int minLength = startPositionWithoutWindowsDrive(path) + 1;
-        if (path.length() > minLength && path.endsWith(SEPARATOR)) {
-            path = path.substring(0, path.length()-1);
-        }
-
-        return path;
-    }
-
-    private static boolean hasWindowsDrive(String path) {
-        return (WINDOWS && hasDriveLetterSpecifier.matcher(path).find());
-    }
-
-    private static int startPositionWithoutWindowsDrive(String path) {
-        if (hasWindowsDrive(path)) {
-            return path.charAt(0) ==  SEPARATOR_CHAR ? 3 : 2;
-        } else {
-            return 0;
-        }
-    }
-
-    /**
-     *
-     * @return if no storage type pointed, hdfs type will returned
-     */
-    public String getFsType() {
-        return getFsType("file");
-    }
-
-    public String getFsType(String defaultType) {
-        String scheme = uri.getScheme();
-        if(StringUtils.isEmpty(scheme)) {
-            return defaultType;
-        } else {
-            return scheme;
-        }
-    }
-
-    public File toFile() {
-        return new File(uri);
-    }
-
-    public Path toPath() {
-        return FileSystems.getDefault().getPath(uri.toString());
-    }
-
-    public boolean isOwner(String user) {
-        return owner.equals(user);
-    }
-
-    public FsPath getParent() throws IOException {
-        String path = uri.getPath();
-        int lastSlash = path.lastIndexOf('/');
-        int start = startPositionWithoutWindowsDrive(path);
-        if ((path.length() == start) ||               // empty path
-                (lastSlash == start && path.length() == start + 1)) { // at root
-            return null;
-        }
-        String parent;
-        if (lastSlash == -1) {
-            parent = CUR_DIR;
-        } else {
-            parent = path.substring(0, lastSlash == start ? start + 1 : lastSlash);
-        }
-        return new FsPath(uri.getScheme(), uri.getAuthority(), parent);
-    }
-
-    public long getModification_time() {
-        return modification_time;
-    }
-
-    public void setModification_time(long modification_time) {
-        this.modification_time = modification_time;
-    }
-
-    public long getAccess_time() {
-        return access_time;
-    }
-
-    public void setAccess_time(long access_time) {
-        this.access_time = access_time;
-    }
-
-    public long getLength() {
-        return length;
-    }
-
-    public void setLength(long length) {
-        this.length = length;
-    }
-
-    public boolean isdir() {
-        return isdir;
-    }
-
-    public void setIsdir(boolean isdir) {
-        this.isdir = isdir;
-    }
-
-    public String getPermissionString() {
-        return permissionString;
-    }
-
-    public String getOwner() {
-        return owner;
-    }
-
-    public void setOwner(String owner) {
-        this.owner = owner;
-    }
-
-    public String getGroup() {
-        return group;
-    }
-
-    public void setGroup(String group) {
-        this.group = group;
-    }
-
-    public void setPermissions(Set<PosixFilePermission> permissions) throws IOException {
-//        this.permissions = FileSystem.permissionFormatted(permissions);
-        this.permissions = permissions.toArray(new PosixFilePermission[] {});
-        this.permissionString = PosixFilePermissions.toString(permissions);
-    }
-
-    public void setPermissionString(String permissionString) throws IOException {
-        this.permissionString = permissionFormatted(permissionString);
-        this.permissions = PosixFilePermissions.fromString(this.permissionString).toArray(new PosixFilePermission[] {});
-    }
-
-    public String getPath() {
-        if(WINDOWS && ! "hdfs".equals(getFsType())){
-            return uri.getAuthority() + uri.getPath();
-        }
-        return uri.getPath();
-    }
-
-    public String getSchemaPath(){
-        if(WINDOWS && ! "hdfs".equals(getFsType())){
-            return getFsType() + "://" + uri.getAuthority() + uri.getPath();
-        }
-        return getFsType() + "://" + uri.getPath();
-    }
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append(getClass().getSimpleName());
-        sb.append("{");
-        sb.append("path=").append(uri.getPath());
-        sb.append("; isDirectory=").append(isdir);
-        if(!isdir){
-            sb.append("; length=").append(length);
-        }
-        sb.append("; modification_time=").append(modification_time);
-        sb.append("; access_time=").append(access_time);
-        sb.append("; owner=").append(owner);
-        sb.append("; group=").append(group);
-        sb.append("; permission=").append(permissions);
-        sb.append("}");
-        return sb.toString();
-    }
-
-    public static String permissionFormatted(String permission) throws IOException {
-        if(!StringUtils.isNumeric(permission)) {
-            return permission;
-        }
-        char[] ps = permission.toCharArray();
-        return permissionFormatted(ps[0]) + permissionFormatted(ps[1]) + permissionFormatted(ps[2]);
-    }
-
-    public static String permissionFormatted(char i) throws IOException {
-        int in = Integer.parseInt(String.valueOf(i));
-        switch (in) {
-            case 0: return "---";
-            case 1: return "--x";
-            case 2: return "-w-";
-            case 3: return "-wx";
-            case 4: return "r--";
-            case 5: return "r-x";
-            case 6: return "rw-";
-            case 7: return "rwx";
-            default: throw new IOException("Incorrent permission number " + in);
-        }
-    }
-
-    public static FsPath getFsPath(String path, String... more) {
-        String realPath = Paths.get(path, more).toFile().getPath();
-        return new FsPath(realPath);
-    }
-}
diff --git a/core/common/src/main/java/com/webank/wedatasphere/linkis/common/io/TestMain.java b/core/common/src/main/java/com/webank/wedatasphere/linkis/common/io/TestMain.java
deleted file mode 100644
index abd1f65..0000000
--- a/core/common/src/main/java/com/webank/wedatasphere/linkis/common/io/TestMain.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.common.io;
-
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.net.*;
-
-/**
- * Created by enjoyyin on 2018/10/24.
- */
-public class TestMain {
-    public static void main(String[] args) throws FileNotFoundException, URISyntaxException, MalformedURLException, UnknownHostException {
-        FsPath fsPath = new FsPath("hdfs:///test");
-        System.out.print(fsPath.getPath());
-    }
-}
diff --git a/core/common/src/main/java/com/webank/wedatasphere/linkis/common/utils/ByteTimeUtils.java b/core/common/src/main/java/com/webank/wedatasphere/linkis/common/utils/ByteTimeUtils.java
deleted file mode 100644
index 8486ec2..0000000
--- a/core/common/src/main/java/com/webank/wedatasphere/linkis/common/utils/ByteTimeUtils.java
+++ /dev/null
@@ -1,362 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.common.utils;
-
-import com.google.common.collect.ImmutableMap;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.Locale;
-import java.util.concurrent.TimeUnit;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class ByteTimeUtils {
-
-  /** Returns a hash consistent with Spark's Utils.nonNegativeHash(). */
-  public static int nonNegativeHash(Object obj) {
-    if (obj == null) { return 0; }
-    int hash = obj.hashCode();
-    return hash != Integer.MIN_VALUE ? Math.abs(hash) : 0;
-  }
-
-  /*
-   * Delete a file or directory and its contents recursively.
-   * Don't follow directories if they are symlinks.
-   * Throws an exception if deletion is unsuccessful.
-   */
-  public static void deleteRecursively(File file) throws IOException {
-    if (file == null) { return; }
-
-    if (file.isDirectory() && !isSymlink(file)) {
-      IOException savedIOException = null;
-      for (File child : listFilesSafely(file)) {
-        try {
-          deleteRecursively(child);
-        } catch (IOException e) {
-          // In case of multiple exceptions, only last one will be thrown
-          savedIOException = e;
-        }
-      }
-      if (savedIOException != null) {
-        throw savedIOException;
-      }
-    }
-
-    boolean deleted = file.delete();
-    // Delete can also fail if the file simply did not exist.
-    if (!deleted && file.exists()) {
-      throw new IOException("Failed to delete: " + file.getAbsolutePath());
-    }
-  }
-
-  private static File[] listFilesSafely(File file) throws IOException {
-    if (file.exists()) {
-      File[] files = file.listFiles();
-      if (files == null) {
-        throw new IOException("Failed to list files for dir: " + file);
-      }
-      return files;
-    } else {
-      return new File[0];
-    }
-  }
-
-  private static boolean isSymlink(File file) throws IOException {
-    File fileInCanonicalDir = null;
-    if (file.getParent() == null) {
-      fileInCanonicalDir = file;
-    } else {
-      fileInCanonicalDir = new File(file.getParentFile().getCanonicalFile(), file.getName());
-    }
-    return !fileInCanonicalDir.getCanonicalFile().equals(fileInCanonicalDir.getAbsoluteFile());
-  }
-
-  private static final ImmutableMap<String, TimeUnit> timeSuffixes =
-    ImmutableMap.<String, TimeUnit>builder()
-      .put("us", TimeUnit.MICROSECONDS)
-      .put("ms", TimeUnit.MILLISECONDS)
-      .put("s", TimeUnit.SECONDS)
-      .put("m", TimeUnit.MINUTES)
-      .put("min", TimeUnit.MINUTES)
-      .put("h", TimeUnit.HOURS)
-      .put("d", TimeUnit.DAYS)
-      .build();
-
-  private static final ImmutableMap<String, ByteUnit> byteSuffixes =
-    ImmutableMap.<String, ByteUnit>builder()
-      .put("b", ByteUnit.BYTE)
-      .put("k", ByteUnit.KiB)
-      .put("kb", ByteUnit.KiB)
-      .put("m", ByteUnit.MiB)
-      .put("mb", ByteUnit.MiB)
-      .put("g", ByteUnit.GiB)
-      .put("gb", ByteUnit.GiB)
-      .put("t", ByteUnit.TiB)
-      .put("tb", ByteUnit.TiB)
-      .put("p", ByteUnit.PiB)
-      .put("pb", ByteUnit.PiB)
-      .build();
-
-  /**
-   * Convert a passed time string (e.g. 50s, 100ms, or 250us) to a time count for
-   * internal use. If no suffix is provided a direct conversion is attempted.
-   */
-  private static long parseTimeString(String str, TimeUnit unit) {
-    String lower = str.toLowerCase().trim();
-
-    try {
-      Matcher m = Pattern.compile("(-?[0-9]+)([a-z]+)?").matcher(lower);
-      if (!m.matches()) {
-        throw new NumberFormatException("Failed to parse time string: " + str);
-      }
-
-      long val = Long.parseLong(m.group(1));
-      String suffix = m.group(2);
-
-      // Check for invalid suffixes
-      if (suffix != null && !timeSuffixes.containsKey(suffix)) {
-        throw new NumberFormatException("Invalid suffix: \"" + suffix + "\"");
-      }
-
-      // If suffix is valid use that, otherwise none was provided and use the default passed
-      return unit.convert(val, suffix != null ? timeSuffixes.get(suffix) : unit);
-    } catch (NumberFormatException e) {
-      String timeError = "Time " + str +" must be specified as seconds (s), " +
-              "milliseconds (ms), microseconds (us), minutes (m or min), hour (h), or day (d). " +
-              "E.g. 50s, 100ms, or 250us.";
-
-      throw new NumberFormatException(timeError + "\n" + e.getMessage());
-    }
-  }
-
-  /**
-   * Convert a time parameter such as (50s, 100ms, or 250us) to milliseconds for internal use. If
-   * no suffix is provided, the passed number is assumed to be in ms.
-   */
-  public static long timeStringAsMs(String str) {
-    return parseTimeString(str, TimeUnit.MILLISECONDS);
-  }
-
-  /**
-   * Convert a time parameter such as (50s, 100ms, or 250us) to seconds for internal use. If
-   * no suffix is provided, the passed number is assumed to be in seconds.
-   */
-  public static long timeStringAsSec(String str) {
-    return parseTimeString(str, TimeUnit.SECONDS);
-  }
-
-    /**
-     * Returns a human-readable string representing a duration such as "35ms"
-     */
-    public static String msDurationToString(long ms) {
-        int second = 1000;
-        int minute = 60 * second;
-        int hour = 60 * minute;
-        Locale locale = Locale.US;
-        if (ms < second) {
-            return String.format(locale, "%d ms", ms);
-        } else if(ms < minute) {
-            return String.format(locale, "%.1f s", ms * 1f / second);
-        } else if(ms < hour) {
-            return String.format(locale, "%.1f m", ms * 1f / minute);
-        } else {
-            return String.format(locale, "%.2f h", ms * 1f / hour);
-        }
-    }
-
-  /**
-   * Convert a passed byte string (e.g. 50b, 100kb, or 250mb) to a ByteUnit for
-   * internal use. If no suffix is provided a direct conversion of the provided default is
-   * attempted.
-   */
-  private static long parseByteString(String str, ByteUnit unit) {
-    String lower = str.toLowerCase().trim();
-
-    try {
-      Matcher m = Pattern.compile("([0-9]+)\\s?([a-zA-Z]+)?").matcher(lower);
-//      Matcher fractionMatcher = Pattern.compile("([0-9]+\\.[0-9]+)\\s?([a-z]+)?").matcher(lower);
-    	Matcher fractionMatcher = Pattern.compile("([0-9]+\\.[0-9]+)\\s?([a-zA-Z]{1,2})?").matcher(lower);
-
-    	long size = 0;
-    	int sub = 1;
-    	String suffix;
-      if (fractionMatcher.matches()) {
-        double val = Double.parseDouble(fractionMatcher.group(1));
-        size = (long) (val * 100);
-        suffix = fractionMatcher.group(2);
-        sub = 100;
-      } else if (m.matches()) {
-    	  size = Long.parseLong(m.group(1));
-    	  suffix = m.group(2);
-      } else {
-        throw new NumberFormatException("Failed to parse byte string: " + str);
-      }
-      suffix = suffix.toLowerCase();
-      // Check for invalid suffixes
-      if (suffix != null && !byteSuffixes.containsKey(suffix)) {
-        throw new NumberFormatException("Invalid suffix: \"" + suffix + "\"");
-      }
-      // If suffix is valid use that, otherwise none was provided and use the default passed
-      return unit.convertFrom(size, suffix != null ? byteSuffixes.get(suffix) : unit)/sub;
-
-    } catch (NumberFormatException e) {
-      String timeError = "Error size string " + str +". Size must be specified as bytes (b), " +
-        "kibibytes (k), mebibytes (m), gibibytes (g), tebibytes (t), or pebibytes(p). " +
-        "E.g. 50b, 100k, or 250m.";
-
-      throw new IllegalArgumentException(timeError, e);
-    }
-  }
-
-    /**
-     * Convert a quantity in bytes to a human-readable string such as "4.0 MB".
-     */
-    public static String bytesToString(long size) {
-        long TB = 1L << 40;
-        long GB = 1L << 30;
-        long MB = 1L << 20;
-        long KB = 1L << 10;
-
-        double value;
-        String unit;
-        if (size >= 2*TB) {
-            value = size * 1f / TB;
-            unit = "TB";
-        } else if (size >= 2*GB) {
-            value = size * 1f / GB;
-            unit = "GB";
-        } else if (size >= 2*MB) {
-            value = size * 1f / MB;
-            unit = "MB";
-        } else if (size >= 2*KB) {
-            value = size * 1f / KB;
-            unit = "KB";
-        } else {
-            value = size * 1f;
-            unit = "B";
-        }
-        return String.format(Locale.US, "%.1f %s", value, unit);
-    }
-
-  /**
-   * Convert a passed byte string (e.g. 50b, 100k, or 250m) to bytes for
-   * internal use.
-   *
-   * If no suffix is provided, the passed number is assumed to be in bytes.
-   */
-  public static long byteStringAsBytes(String str) {
-    return parseByteString(str, ByteUnit.BYTE);
-  }
-
-  /**
-   * Convert a passed byte string (e.g. 50b, 100k, or 250m) to kibibytes for
-   * internal use.
-   *
-   * If no suffix is provided, the passed number is assumed to be in kibibytes.
-   */
-  public static long byteStringAsKb(String str) {
-    return parseByteString(str, ByteUnit.KiB);
-  }
-
-  /**
-   * Convert a passed byte string (e.g. 50b, 100k, or 250m) to mebibytes for
-   * internal use.
-   *
-   * If no suffix is provided, the passed number is assumed to be in mebibytes.
-   */
-  public static long byteStringAsMb(String str) {
-    return parseByteString(str, ByteUnit.MiB);
-  }
-
-  /**
-   * Convert a passed byte string (e.g. 50b, 100k, or 250m) to gibibytes for
-   * internal use.
-   *
-   * If no suffix is provided, the passed number is assumed to be in gibibytes.
-   */
-  public static long byteStringAsGb(String str) {
-    return parseByteString(str, ByteUnit.GiB);
-  }
-
-  /**
-   * Returns a byte array with the buffer's contents, trying to avoid copying the data if
-   * possible.
-   */
-  public static byte[] bufferToArray(ByteBuffer buffer) {
-    if (buffer.hasArray() && buffer.arrayOffset() == 0 &&
-        buffer.array().length == buffer.remaining()) {
-      return buffer.array();
-    } else {
-      byte[] bytes = new byte[buffer.remaining()];
-      buffer.get(bytes);
-      return bytes;
-    }
-  }
-  
-  enum ByteUnit {
-	  BYTE (1),
-	  KiB (1024L),
-	  MiB ((long) Math.pow(1024L, 2L)),
-	  GiB ((long) Math.pow(1024L, 3L)),
-	  TiB ((long) Math.pow(1024L, 4L)),
-	  PiB ((long) Math.pow(1024L, 5L));
-
-	  private ByteUnit(long multiplier) {
-	    this.multiplier = multiplier;
-	  }
-
-	  // Interpret the provided number (d) with suffix (u) as this unit type.
-	  // E.g. KiB.interpret(1, MiB) interprets 1MiB as its KiB representation = 1024k
-	  public long convertFrom(long d, ByteUnit u) {
-	    return u.convertTo(d, this);
-	  }
-	  
-	  // Convert the provided number (d) interpreted as this unit type to unit type (u). 
-	  public long convertTo(long d, ByteUnit u) {
-	    if (multiplier > u.multiplier) {
-	      long ratio = multiplier / u.multiplier;
-	      if (Long.MAX_VALUE / ratio < d) {
-	        throw new IllegalArgumentException("Conversion of " + d + " exceeds Long.MAX_VALUE in "
-	          + name() + ". Try a larger unit (e.g. MiB instead of KiB)");
-	      }
-	      return d * ratio;
-	    } else {
-	      // Perform operations in this order to avoid potential overflow 
-	      // when computing d * multiplier
-	      return d / (u.multiplier / multiplier);
-	    }
-	  }
-
-	  public double toBytes(long d) {
-	    if (d < 0) {
-	      throw new IllegalArgumentException("Negative size value. Size must be positive: " + d);
-	    }
-	    return d * multiplier; 
-	  }
-	  
-	  public long toKiB(long d) { return convertTo(d, KiB); }
-	  public long toMiB(long d) { return convertTo(d, MiB); }
-	  public long toGiB(long d) { return convertTo(d, GiB); }
-	  public long toTiB(long d) { return convertTo(d, TiB); }
-	  public long toPiB(long d) { return convertTo(d, PiB); }
-	  
-	  private final long multiplier;
-	}
-  
-}
\ No newline at end of file
diff --git a/core/common/src/main/java/com/webank/wedatasphere/linkis/common/utils/DESUtil.java b/core/common/src/main/java/com/webank/wedatasphere/linkis/common/utils/DESUtil.java
deleted file mode 100644
index ae8ba4f..0000000
--- a/core/common/src/main/java/com/webank/wedatasphere/linkis/common/utils/DESUtil.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.common.utils;
-
-import org.apache.commons.lang.StringUtils;
-
-import javax.crypto.Cipher;
-import javax.crypto.SecretKey;
-import javax.crypto.SecretKeyFactory;
-import javax.crypto.spec.DESKeySpec;
-import java.io.IOException;
-import java.security.SecureRandom;
-import java.util.Base64;
-
-public class DESUtil {
-    private final static String DES = "DES";
-
-    /**
-     * Description Encryption based on key values(Description 根据键值进行加密)
-     * @param data
-     * @param key Encryption key byte array(加密键byte数组)
-     * @return Ciphertext(密文)
-     * @throws Exception
-     */
-    public static String encrypt(String data, String key) throws Exception {
-        if(StringUtils.isNotBlank(key) && key.length() < 8){
-            int i = key.length();
-            while((8-i) > 0){
-                key += "X";
-                i++;
-            }
-        }
-        byte[] bt = encrypt(data.getBytes(), key.getBytes());
-        String strs = Base64.getEncoder().encodeToString(bt);
-        return strs;
-    }
-
-    /**
-     * Description Encryption based on key values(Description 根据键值进行加密)
-     * @param data
-     * @param key Encryption key byte array(加密键byte数组)
-     * @return Ciphertext(密文)
-     * @throws Exception
-     */
-    public static String decrypt(String data, String key) throws Exception {
-        if (StringUtils.isBlank(data)){
-            return null;
-        }
-        if(StringUtils.isNotBlank(key) && key.length() < 8){
-            int i = key.length();
-            while((8-i) > 0){
-                key += "X";
-                i++;
-            }
-        }
-        byte[] buf = Base64.getDecoder().decode(data);
-        byte[] bt = decrypt(buf, key.getBytes());
-        return new String(bt);
-    }
-
-    /**
-     * Description Encryption based on key values(Description 根据键值进行加密)
-     * @param data
-     * @param key Encryption key byte array(加密键byte数组)
-     * @return Ciphertext(密文)
-     * @throws Exception
-     */
-    private static byte[] encrypt(byte[] data, byte[] key) throws Exception {
-        // Generate a trusted random number source(生成一个可信任的随机数源)
-        SecureRandom sr = new SecureRandom();
-
-        // Create a DESKeySpec object from the original key data(从原始密钥数据创建DESKeySpec对象)
-        DESKeySpec dks = new DESKeySpec(key);
-
-        // Create a key factory and use it to convert the DESKeySpec to a SecretKey object(创建一个密钥工厂,然后用它把DESKeySpec转换成SecretKey对象)
-        SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(DES);
-        SecretKey securekey = keyFactory.generateSecret(dks);
-
-        // The Cipher object actually completes the encryption operation.(Cipher对象实际完成加密操作)
-        Cipher cipher = Cipher.getInstance(DES);
-
-        // Initialize a Cipher object with a key(用密钥初始化Cipher对象)
-        cipher.init(Cipher.ENCRYPT_MODE, securekey, sr);
-
-        return cipher.doFinal(data);
-    }
-
-    /**
-     * Description Encryption based on key values(Description 根据键值进行加密)
-     * @param data
-     * @param key Encryption key byte array(加密键byte数组)
-     * @return Ciphertext(密文)
-     * @throws Exception
-     */
-    private static byte[] decrypt(byte[] data, byte[] key) throws Exception {
-        // Generate a trusted random number source(生成一个可信任的随机数源)
-        SecureRandom sr = new SecureRandom();
-
-        // Create a DESKeySpec object from the original key data(从原始密钥数据创建DESKeySpec对象)
-        DESKeySpec dks = new DESKeySpec(key);
-
-        // Create a key factory and use it to convert the DESKeySpec to a SecretKey object(创建一个密钥工厂,然后用它把DESKeySpec转换成SecretKey对象)
-        SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(DES);
-        SecretKey securekey = keyFactory.generateSecret(dks);
-
-        // The Cipher object actually completes the decryption operation.(Cipher对象实际完成解密操作)
-        Cipher cipher = Cipher.getInstance(DES);
-
-        // Initialize a Cipher object with a key(用密钥初始化Cipher对象)
-        cipher.init(Cipher.DECRYPT_MODE, securekey, sr);
-
-        return cipher.doFinal(data);
-    }
-    public static void main(String[] args) throws Exception {
-    }
-}
diff --git a/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/conf/BDPConfiguration.scala b/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/conf/BDPConfiguration.scala
deleted file mode 100644
index 41c10f7..0000000
--- a/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/conf/BDPConfiguration.scala
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.common.conf
-
-import java.io._
-import java.util.Properties
-import com.webank.wedatasphere.linkis.common.utils.Logging
-import org.apache.commons.io.IOUtils
-import org.apache.commons.lang.StringUtils
-import scala.collection.JavaConversions._
-
-/**
-  * Created by enjoyyin on 2018/1/9.
-  */
-private[conf] object BDPConfiguration extends Logging {
-
-  val DEFAULT_PROPERTY_FILE_NAME = "linkis.properties"
-  val CHARSET_NAME = "utf-8"
-
-  private val config = new Properties
-  private val sysProps = sys.props
-  private val extractConfig = new Properties
-
-  private val env = sys.env
-
-  val propertyFile = sysProps.getOrElse("wds.linkis.configuration", DEFAULT_PROPERTY_FILE_NAME)
-  private val configFileURL = getClass.getClassLoader.getResource(propertyFile)
-  if (configFileURL != null && new File(configFileURL.getPath).exists) initConfig(config, configFileURL.getPath)
-  else warn(s"******************************** Notice: The dataworkcloud configuration file $propertyFile is not exists! ***************************")
-
-  private def initConfig(config: Properties, filePath: String) {
-    var inputStream: InputStream = null
-    var inputStreamReader: InputStreamReader = null
-    try {
-      inputStream = new FileInputStream(filePath)
-      inputStreamReader = new InputStreamReader(inputStream, CHARSET_NAME)
-      config.load(inputStreamReader)
-    } catch { case e: IOException =>
-      error("Can't load " + propertyFile, e)
-    } finally {
-      IOUtils.closeQuietly(inputStream)
-      IOUtils.closeQuietly(inputStreamReader)
-    }
-  }
-
-  def getOption(key: String): Option[String] = {
-    if(extractConfig.containsKey(key))
-      return Some(extractConfig.getProperty(key))
-    val value = config.getProperty(key)
-    if(StringUtils.isNotEmpty(value)) {
-      return Some(value)
-    }
-    val propsValue =  sysProps.get(key).orElse(sys.props.get(key))
-    if(propsValue.isDefined){
-      return propsValue
-    }
-    env.get(key)
-  }
-
-  def properties = {
-    val props = new Properties
-    props.putAll(sysProps)
-    props.putAll(config)
-    props.putAll(extractConfig)
-    props.putAll(env)
-    props
-  }
-
-  def getOption[T](commonVars: CommonVars[T]): Option[T] = if(commonVars.value != null) Option(commonVars.value)
-  else {
-    val value = BDPConfiguration.getOption(commonVars.key)
-    if (value.isEmpty) Option(commonVars.defaultValue)
-    else formatValue(commonVars.defaultValue, value)
-  }
-
-  private[common] def formatValue[T](defaultValue: T, value: Option[String]): Option[T] = {
-    if(value.isEmpty || value.exists(StringUtils.isEmpty)) return Option(defaultValue)
-    val formattedValue = defaultValue match {
-      case _: String => value
-      case _: Byte => value.map(_.toByte)
-      case _: Short => value.map(_.toShort)
-      case _: Char => value.map(_.toCharArray.apply(0))
-      case _: Int => value.map(_.toInt)
-      case _: Long => value.map(_.toLong)
-      case _: Float => value.map(_.toFloat)
-      case _: Double => value.map(_.toDouble)
-      case _: Boolean => value.map(_.toBoolean)
-      case _: TimeType => value.map(new TimeType(_))
-      case _: ByteType => value.map(new ByteType(_))
-      case null => value
-    }
-    formattedValue.asInstanceOf[Option[T]]
-  }
-
-  def set(key: String, value: String) = extractConfig.setProperty(key, value)
-
-  def setIfNotExists(key: String, value: String) = if(!config.containsKey(key)) set(key, value)
-
-  def getBoolean(key: String, default: Boolean):Boolean = getOption(key).map(_.toBoolean).getOrElse(default)
-  def getBoolean(commonVars: CommonVars[Boolean]): Option[Boolean] = getOption(commonVars)
-
-  def get(key: String, default: String): String = getOption(key).getOrElse(default)
-  def get(commonVars: CommonVars[String]): Option[String] = getOption(commonVars)
-
-  def get(key: String): String = getOption(key).getOrElse(throw new NoSuchElementException(key))
-
-  def getInt(key: String, default: Int):Int = getOption(key).map(_.toInt).getOrElse(default)
-  def getInt(commonVars: CommonVars[Int]): Option[Int] = getOption(commonVars)
-
-  def contains(key: String): Boolean = getOption(key).isDefined
-
-}
diff --git a/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/conf/CommonVars.scala b/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/conf/CommonVars.scala
deleted file mode 100644
index b939323..0000000
--- a/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/conf/CommonVars.scala
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.common.conf
-
-import scala.collection.JavaConversions._
-
-/**
-  * Created by enjoyyin on 2018/1/9.
-  */
-case class CommonVars[T](key: String, defaultValue: T, value: T, description: String = null) {
-  val getValue: T = BDPConfiguration.getOption(this).getOrElse(defaultValue)
-  def getValue(properties: java.util.Map[String, String]): T = {
-    if(properties == null || !properties.containsKey(key) || properties.get(key) == null) getValue
-    else BDPConfiguration.formatValue(defaultValue, Option(properties.get(key))).get
-  }
-
-  def getValue(properties: Map[String, String]): T = getValue(mapAsJavaMap(properties))
-  def acquireNew: T = BDPConfiguration.getOption(this).getOrElse(defaultValue)
-}
-object CommonVars {
-  def apply[T](key: String, defaultValue: T, description: String): CommonVars[T] =
-    CommonVars(key, defaultValue, null.asInstanceOf[T], description)
-
-  implicit def apply[T](key: String, defaultValue: T): CommonVars[T] = new CommonVars(key, defaultValue, null.asInstanceOf[T], null)
-
-  implicit def apply[T](key: String): CommonVars[T] = apply(key, null.asInstanceOf[T])
-
-  def properties = BDPConfiguration.properties
-
-}
\ No newline at end of file
diff --git a/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/conf/Configuration.scala b/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/conf/Configuration.scala
deleted file mode 100644
index 9b9efbd..0000000
--- a/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/conf/Configuration.scala
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.common.conf
-
-import com.webank.wedatasphere.linkis.common.utils.Logging
-
-/**
-  * Created by enjoyyin on 2018/4/18.
-  */
-object Configuration extends Logging {
-
-  val BDP_ENCODING = CommonVars("wds.linkis.encoding", "utf-8")
-
-  val DEFAULT_DATE_PATTERN = CommonVars("wds.linkis.date.pattern", "yyyy-MM-dd'T'HH:mm:ssZ")
-
-  val FIELD_SPLIT = CommonVars("wds.linkis.field.split", "hadoop")
-
-  val IS_TEST_MODE = CommonVars("wds.linkis.test.mode", false)
-
-  val hadoopConfDir = CommonVars("hadoop.config.dir", CommonVars("HADOOP_CONF_DIR", "").getValue).getValue
-
-  val GATEWAY_URL: CommonVars[String] = CommonVars[String]("wds.linkis.gateway.url", "http://localhost:9001/")
-
-  def getGateWayURL(): String = {
-    val url = GATEWAY_URL.getValue.trim
-    val gatewayUr = if (url.endsWith("/")) {
-      url.substring(0, url.length - 1)
-    } else {
-      url
-    }
-    info(s"gatewayUrl is $gatewayUr")
-    gatewayUr
-  }
-
-}
diff --git a/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/conf/DWCArgumentsParser.scala b/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/conf/DWCArgumentsParser.scala
deleted file mode 100644
index edc3847..0000000
--- a/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/conf/DWCArgumentsParser.scala
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.common.conf
-
-import org.apache.commons.lang.StringUtils
-
-import scala.collection.{JavaConversions, mutable}
-import scala.collection.mutable.ArrayBuffer
-
-/**
-  * Created by enjoyyin on 2018/9/26.
-  */
-object DWCArgumentsParser {
-  protected val DWC_CONF = "--dwc-conf"
-  protected val SPRING_CONF = "--spring-conf"
-  private var dwcOptionMap = Map.empty[String, String]
-
-  private[linkis] def setDWCOptionMap(dwcOptionMap: Map[String, String]) = this.dwcOptionMap = dwcOptionMap
-  def getDWCOptionMap = dwcOptionMap
-
-  def parse(args: Array[String]): DWCArgumentsParser = {
-    val keyValueRegex = "([^=]+)=(.+)".r
-    var i = 0
-    val optionParser = new DWCArgumentsParser
-    while(i < args.length) {
-      args(i) match {
-        case DWC_CONF | SPRING_CONF =>
-          args(i + 1) match {
-            case keyValueRegex(key, value) =>
-              optionParser.setConf(args(i), key, value)
-              i += 1
-            case _ => throw new IllegalArgumentException("illegal commond line, format: --conf key=value.")
-          }
-        case _ => throw new IllegalArgumentException(s"illegal commond line, ${args(i)} cannot recognize.")
-      }
-      i += 1
-    }
-    optionParser.validate()
-    optionParser
-  }
-
-  def formatToArray(optionParser: DWCArgumentsParser): Array[String] = {
-    val options = ArrayBuffer[String]()
-    def write(confMap: Map[String, String], optionType: String): Unit = confMap.foreach { case (key, value) =>
-      if (StringUtils.isNotEmpty(key) && StringUtils.isNotEmpty(value)) {
-        options += optionType
-        options += (key + "=" + value)
-      }
-    }
-    write(optionParser.getDWCConfMap, DWC_CONF)
-    write(optionParser.getSpringConfMap, SPRING_CONF)
-    options.toArray
-  }
-  def formatToArray(springOptionMap: Map[String, String], dwcOptionMap: Map[String, String]): Array[String] =
-    formatToArray(new DWCArgumentsParser().setSpringConf(springOptionMap).setDWCConf(dwcOptionMap))
-
-  def format(optionParser: DWCArgumentsParser): String = formatToArray(optionParser).mkString(" ")
-  def format(springOptionMap: Map[String, String], dwcOptionMap: Map[String, String]): String =
-    formatToArray(springOptionMap, dwcOptionMap).mkString(" ")
-
-  def formatSpringOptions(springOptionMap: Map[String, String]): Array[String] = {
-    val options = ArrayBuffer[String]()
-    springOptionMap.foreach { case (key, value) =>
-      if (StringUtils.isNotEmpty(key) && StringUtils.isNotEmpty(value)) {
-        options += ("--" + key + "=" + value)
-      }
-    }
-    options.toArray
-  }
-}
-class DWCArgumentsParser {
-  import DWCArgumentsParser._
-  private val dwcOptionMap = new mutable.HashMap[String, String]()
-  private val springOptionMap = new mutable.HashMap[String, String]()
-  def getSpringConfMap = springOptionMap.toMap
-  def getSpringConfs = JavaConversions.mapAsJavaMap(springOptionMap)
-  def getDWCConfMap = dwcOptionMap.toMap
-  def setConf(optionType: String, key: String, value: String) = {
-    optionType match {
-      case DWC_CONF =>
-        dwcOptionMap += key -> value
-      case SPRING_CONF =>
-        springOptionMap += key -> value
-    }
-    this
-  }
-  def setSpringConf(optionMap: Map[String, String]): DWCArgumentsParser = {
-    if(optionMap != null) this.springOptionMap ++= optionMap
-    this
-  }
-  def setDWCConf(optionMap: Map[String, String]): DWCArgumentsParser = {
-    if(optionMap != null) this.dwcOptionMap ++= optionMap
-    this
-  }
-  def validate() = {}
-}
\ No newline at end of file
diff --git a/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/listener/ListenerEventBus.scala b/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/listener/ListenerEventBus.scala
deleted file mode 100644
index 035fd66..0000000
--- a/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/listener/ListenerEventBus.scala
+++ /dev/null
@@ -1,295 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.common.listener
-
-import java.util.concurrent.atomic.{AtomicBoolean, AtomicLong}
-import java.util.concurrent.{ArrayBlockingQueue, CopyOnWriteArrayList, Future, LinkedBlockingQueue, TimeoutException}
-
-import com.webank.wedatasphere.linkis.common.collection.BlockingLoopArray
-import com.webank.wedatasphere.linkis.common.utils.{ByteTimeUtils, Logging, Utils}
-import org.apache.commons.lang.time.DateFormatUtils
-
-import scala.util.control.NonFatal
-
-/**
-  * Created by enjoyyin on 2017/6/6.
-  */
-private[wedatasphere] trait ListenerBus[L <: EventListener, E <: Event] extends Logging {
-  val self = this
-
-  private val listeners = new CopyOnWriteArrayList[L]
-
-  /**
-    * Add a listener to listen events. This method is thread-safe and can be called in any thread.
-    */
-  final def addListener(listener: L): Unit = {
-    listeners.add(listener)
-    info(toString + " add a new listener => " + listener.getClass)
-  }
-
-  /**
-    * Remove a listener and it won't receive any events. This method is thread-safe and can be called
-    * in any thread.
-    */
-  final def removeListener(listener: L): Unit = {
-    listeners.remove(listener)
-  }
-
-  /**
-    * Post the event to all registered listeners. The `postToAll` caller should guarantee calling
-    * `postToAll` in the same thread for all events.
-    */
-  final def postToAll(event: E): Unit = {
-    // JavaConverters can create a JIterableWrapper if we use asScala.
-    // However, this method will be called frequently. To avoid the wrapper cost, here we use
-    // Java Iterator directly.
-    val iter = listeners.iterator
-    while (iter.hasNext) {
-      val listener = iter.next()
-      Utils.tryCatch{
-        doPostEvent(listener, event)
-      }{
-        case NonFatal(e) =>
-          Utils.tryAndError(listener.onEventError(event, e))
-        case t: Throwable => throw t
-      }
-    }
-  }
-
-  /**
-    * Post an event to the specified listener. `onPostEvent` is guaranteed to be called in the same
-    * thread for all listeners.
-    */
-  protected def doPostEvent(listener: L, event: E): Unit
-
-}
-private[wedatasphere] abstract class ListenerEventBus[L <: EventListener, E <: Event]
-      (val eventQueueCapacity: Int, name: String)
-      (listenerConsumerThreadSize: Int = 5, listenerThreadMaxFreeTime: Long = ByteTimeUtils.timeStringAsMs("2m"))
-  extends ListenerBus[L, E] with Logging {
-
-//  protected val listenerConsumerThreadSize: Int = 5
-//  protected val listenerThreadMaxFreeTime: Long = ByteTimeUtils.timeStringAsMs("2m")
-
-  private lazy val eventQueue = new ArrayBlockingQueue[E](eventQueueCapacity)
-  protected val executorService = Utils.newCachedThreadPool(listenerConsumerThreadSize + 2, name + "-Consumer-ThreadPool", true)
-  private val eventDealThreads = Array.tabulate(listenerConsumerThreadSize)(new ListenerEventThread(_))
-  private val started = new AtomicBoolean(false)
-  private val stopped = new AtomicBoolean(false)
-
-  private var listenerThread: Future[_] = _
-
-  /**
-    * Start sending events to attached listeners.
-    *
-    * This first sends out all buffered events posted before this listener bus has started, then
-    * listens for any additional events asynchronously while the listener bus is still running.
-    * This should only be called once.
-    *
-    */
-  def start(): Unit = {
-    if (started.compareAndSet(false, true)) {
-      listenerThread = executorService.submit(new Runnable {
-        override def run(): Unit =
-          while (!stopped.get) {
-            val event = Utils.tryCatch(eventQueue.take()){
-              case t: InterruptedException => info(s"stopped $name thread.")
-                return
-            }
-            while(!eventDealThreads.exists(_.putEvent(event)) && !stopped.get) Utils.tryAndError(Thread.sleep(1))
-          }
-      })
-    } else {
-      throw new IllegalStateException(s"$name already started!")
-    }
-  }
-
-  protected val dropEvent: DropEvent = new IgnoreDropEvent
-
-  def post(event: E): Unit = {
-    if (stopped.get || executorService.isTerminated || (listenerThread.isDone && started.get())) {
-      dropEvent.onBusStopped(event)
-    } else if(!eventQueue.offer(event)) {
-      dropEvent.onDropEvent(event)
-    }
-  }
-
-  /**
-    * For testing only. Wait until there are no more events in the queue, or until the specified
-    * time has elapsed. Throw `TimeoutException` if the specified time elapsed before the queue
-    * emptied.
-    * Exposed for testing.
-    */
-  @throws(classOf[TimeoutException])
-  def waitUntilEmpty(timeoutMillis: Long): Unit = {
-    val finishTime = System.currentTimeMillis + timeoutMillis
-    while (!queueIsEmpty) {
-      if (System.currentTimeMillis > finishTime) {
-        throw new TimeoutException(
-          s"The event queue is not empty after $timeoutMillis milliseconds")
-      }
-      /* Sleep rather than using wait/notify, because this is used only for testing and
-       * wait/notify add overhead in the general case. */
-      Thread.sleep(10)
-    }
-  }
-
-  /**
-    * For testing only. Return whether the listener daemon thread is still alive.
-    * Exposed for testing.
-    */
-  def listenerThreadIsAlive: Boolean = !listenerThread.isDone
-
-  /**
-    * Return whether the event queue is empty.
-    *
-    * The use of synchronized here guarantees that all events that once belonged to this queue
-    * have already been processed by all attached listeners, if this returns true.
-    */
-  private def queueIsEmpty: Boolean = synchronized { eventQueue.isEmpty && !eventDealThreads.exists(_.isRunning) }
-
-  /**
-    * Stop the listener bus. It will wait until the queued events have been processed, but drop the
-    * new events after stopping.
-    */
-  def stop(): Unit = {
-    if (!started.get()) {
-      throw new IllegalStateException(s"Attempted to stop $name that has not yet started!")
-    }
-    if (stopped.compareAndSet(false, true)) {
-      // Call eventLock.release() so that listenerThread will poll `null` from `eventQueue` and know
-      // `stop` is called.
-      info(s"try to stop $name thread.")
-      //      eventLock.release()
-      listenerThread.cancel(true)
-      eventDealThreads.foreach(_.shutdown())
-    } else {
-      // Keep quiet
-    }
-  }
-
-
-  override val toString: String = name + "-ListenerBus"
-
-  trait DropEvent {
-    def onDropEvent(event: E): Unit
-    def onBusStopped(event: E): Unit
-  }
-
-  class IgnoreDropEvent extends DropEvent {
-    private val droppedEventsCounter = new AtomicLong(0L)
-    @volatile private var lastReportTimestamp = 0L
-    private val logDroppedEvent = new AtomicBoolean(false)
-    private val logStoppedEvent = new AtomicBoolean(false)
-    executorService.submit(new Runnable {
-      override def run(): Unit = while(true) {
-        val droppedEvents = droppedEventsCounter.get
-        if (droppedEvents > 0) {
-          // Don't log too frequently
-          if (System.currentTimeMillis() - lastReportTimestamp >= 60 * 1000) {
-            // There may be multiple threads trying to decrease droppedEventsCounter.
-            // Use "compareAndSet" to make sure only one thread can win.
-            // And if another thread is increasing droppedEventsCounter, "compareAndSet" will fail and
-            // then that thread will update it.
-            if (droppedEventsCounter.compareAndSet(droppedEvents, 0)) {
-              val prevLastReportTimestamp = lastReportTimestamp
-              lastReportTimestamp = System.currentTimeMillis()
-              warn(s"Dropped $droppedEvents ListenerEvents since " +
-                DateFormatUtils.format(prevLastReportTimestamp, "yyyy-MM-dd HH:mm:ss"))
-            }
-          }
-        }
-        Utils.tryQuietly(Thread.sleep(600000))
-      }
-    })
-    /**
-      * If the event queue exceeds its capacity, the new events will be dropped. The subclasses will be
-      * notified with the dropped events.
-      *
-      * Note: `onDropEvent` can be called in any thread.
-      */
-    def onDropEvent(event: E): Unit = {
-      droppedEventsCounter.incrementAndGet()
-      if (logDroppedEvent.compareAndSet(false, true)) {
-        // Only log the following message once to avoid duplicated annoying logs.
-        error("Dropping ListenerEvent because no remaining room in event queue. " +
-          "This likely means one of the Listeners is too slow and cannot keep up with " +
-          "the rate at which tasks are being started by the scheduler.")
-      }
-    }
-    override def onBusStopped(event: E): Unit = {
-      droppedEventsCounter.incrementAndGet()
-      if (logStoppedEvent.compareAndSet(false, true)) {
-        error(s"$name has already stopped! Dropping event $event.")
-      }
-    }
-  }
-
-  protected class ListenerEventThread(index: Int) extends Runnable {
-    private var future: Option[Future[_]] = None
-    private var continue = true
-    private var event: Option[E] = None
-    private var lastEventDealData = 0l
-
-    def releaseFreeThread(): Unit = if(listenerThreadMaxFreeTime > 0 && future.isDefined && event.isEmpty && lastEventDealData > 0 &&
-      System.currentTimeMillis() - lastEventDealData >= listenerThreadMaxFreeTime) synchronized {
-      if(lastEventDealData == 0 && future.isEmpty) return
-      lastEventDealData = 0l
-      continue = false
-      future.foreach(_.cancel(true))
-      future = None
-    }
-    def isRunning: Boolean = event.isDefined
-
-    def putEvent(event: E): Boolean = if(this.event.isDefined) false else synchronized {
-      if(this.event.isDefined) false
-      else {
-        lastEventDealData = System.currentTimeMillis()
-        this.event = Some(event)
-        if(future.isEmpty) future = Some(executorService.submit(this))
-        else notify()
-        true
-      }
-    }
-    override def run(): Unit = {
-      val threadName = Thread.currentThread().getName
-      val currentThreadName = s"$name-Thread-$index"
-      Thread.currentThread().setName(currentThreadName)
-      info(s"$currentThreadName begin.")
-      def threadRelease(): Unit = {
-        info(s"$currentThreadName released.")
-        Thread.currentThread().setName(threadName)
-      }
-      while(continue) {
-        synchronized {
-          while(event.isEmpty) Utils.tryQuietly(wait(), _ => {
-            threadRelease()
-            return})
-        }
-        Utils.tryFinally(event.foreach(postToAll)) (synchronized {
-          lastEventDealData = System.currentTimeMillis()
-          event = None
-        })
-      }
-      threadRelease()
-    }
-    def shutdown(): Unit = {
-      continue = false
-      future.foreach(_.cancel(true))
-    }
-  }
-}
\ No newline at end of file
diff --git a/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/utils/OverloadUtils.scala b/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/utils/OverloadUtils.scala
deleted file mode 100644
index 78624b5..0000000
--- a/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/utils/OverloadUtils.scala
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.common.utils
-
-import java.lang.management.ManagementFactory
-
-object OverloadUtils {
-
-  def getProcessMaxMemory: Long = ManagementFactory.getMemoryMXBean.getHeapMemoryUsage.getMax
-
-  def getProcessUsedMemory: Long = ManagementFactory.getMemoryMXBean.getHeapMemoryUsage.getUsed
-
-  def getSystemCPUUsed: Float = ManagementFactory.getOperatingSystemMXBean.getSystemLoadAverage.toFloat
-
-}
diff --git a/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/utils/RSAUtils.scala b/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/utils/RSAUtils.scala
deleted file mode 100644
index 8ffcf14..0000000
--- a/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/utils/RSAUtils.scala
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.common.utils
-
-import java.security.{KeyPair, KeyPairGenerator, PrivateKey, PublicKey}
-import javax.crypto.Cipher
-
-import org.apache.commons.codec.binary.Hex
-import org.apache.commons.net.util.Base64
-
-/**
-  * Created by enjoyyin on 2018/6/29.
-  */
-object RSAUtils {
-  private implicit val keyPair = genKeyPair(1024)
-  def genKeyPair(keyLength: Int): KeyPair = {
-    val keyPair = KeyPairGenerator.getInstance("RSA")
-    keyPair.initialize(keyLength)
-    keyPair.generateKeyPair()
-  }
-  def getDefaultPublicKey(): String = {
-    new String(Base64.encodeBase64(keyPair.getPublic.getEncoded))
-  }
-  def encrypt(data: Array[Byte], publicKey: PublicKey): Array[Byte] = {
-    val cipher = Cipher.getInstance("RSA")
-    cipher.init(Cipher.ENCRYPT_MODE, publicKey)
-    cipher.doFinal(data)
-  }
-  def encrypt(data: Array[Byte]): Array[Byte] = encrypt(data, keyPair.getPublic)
-  def decrypt(data: String, privateKey: PrivateKey): Array[Byte] = {
-    val dataBytes = Hex.decodeHex(data.toCharArray)
-    decrypt(dataBytes, privateKey)
-  }
-  def decrypt(data: String): Array[Byte] = decrypt(data, keyPair.getPrivate)
-  def decrypt(data: Array[Byte], privateKey: PrivateKey): Array[Byte] = {
-    val cipher = Cipher.getInstance("RSA")
-    cipher.init(Cipher.DECRYPT_MODE, privateKey)
-    cipher.doFinal(data)
-  }
-  def decrypt(data: Array[Byte]): Array[Byte] = decrypt(data, keyPair.getPrivate)
-}
diff --git a/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/utils/RetryHandler.scala b/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/utils/RetryHandler.scala
deleted file mode 100644
index d3f1153..0000000
--- a/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/utils/RetryHandler.scala
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.common.utils
-
-import com.webank.wedatasphere.linkis.common.exception.{DWCRetryException, FatalException}
-import org.apache.commons.lang.{ClassUtils => CommonClassUtils}
-
-import scala.collection.mutable.ArrayBuffer
-
-/**
-  * Created by enjoyyin on 2018/11/3.
-  */
-trait RetryHandler extends Logging {
-
-  private var retryNum = 2
-  private var period = 100l
-  private var maxPeriod = 1000l
-  private val retryExceptions = ArrayBuffer[Class[_  <: Throwable]]()
-
-  def setRetryNum(retryNum: Int): Unit = this.retryNum = retryNum
-  def getRetryNum: Int = retryNum
-  def setRetryPeriod(retryPeriod: Long): Unit = this.period = retryPeriod
-  def getRetryPeriod: Long = period
-  def setRetryMaxPeriod(retryMaxPeriod: Long): Unit = this.maxPeriod = retryMaxPeriod
-  def getRetryMaxPeriod: Long = maxPeriod
-  def addRetryException(t: Class[_  <: Throwable]): Unit = retryExceptions += t
-  def getRetryExceptions = retryExceptions.toArray
-
-  def exceptionCanRetry(t: Throwable): Boolean = !t.isInstanceOf[FatalException] &&
-    retryExceptions.exists(c => CommonClassUtils.isAssignable(t.getClass, c))
-
-  def nextInterval(attempt: Int): Long = {
-    val interval = (this.period.toDouble * Math.pow(1.5D, (attempt - 1).toDouble)).toLong
-    if (interval > this.maxPeriod) this.maxPeriod
-    else interval
-  }
-
-  def retry[T](op: => T, retryName: String): T = {
-    if(retryExceptions.isEmpty || retryNum <= 1) return op
-    var retry = 0
-    var result = null.asInstanceOf[T]
-    while(retry < retryNum && result == null) result = Utils.tryCatch(op) { t =>
-      retry += 1
-      if(retry >= retryNum) throw t
-      else if(exceptionCanRetry(t)) {
-        val retryInterval = nextInterval(retry)
-        info(retryName + s" failed with ${t.getClass.getName}, wait ${ByteTimeUtils.msDurationToString(retryInterval)} for next retry. Retried $retry++ ...")
-        Utils.tryQuietly(Thread.sleep(retryInterval))
-        null.asInstanceOf[T]
-      } else throw t
-    }
-    result
-  }
-}
diff --git a/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/utils/Utils.scala b/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/utils/Utils.scala
deleted file mode 100644
index 61438c2..0000000
--- a/core/common/src/main/scala/com/webank/wedatasphere/linkis/common/utils/Utils.scala
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.common.utils
-
-import java.io.{BufferedReader, InputStreamReader}
-import java.net.InetAddress
-import java.util.concurrent.atomic.AtomicInteger
-import java.util.concurrent.{ScheduledThreadPoolExecutor, _}
-
-import com.webank.wedatasphere.linkis.common.exception.{DwcCommonErrorException, ErrorException, FatalException, WarnException}
-import org.apache.commons.io.IOUtils
-import org.slf4j.Logger
-
-import scala.annotation.tailrec
-import scala.collection.JavaConversions._
-import scala.concurrent.duration.Duration
-import scala.concurrent.{ExecutionContext, ExecutionContextExecutorService}
-import scala.util.control.ControlThrowable
-/**
-  * Created by enjoyyin on 2018/1/10.
-  */
-object Utils extends Logging {
-
-  def tryQuietly[T](tryOp: => T): T = try tryOp catch {
-    case c: ControlThrowable => throw c
-    case fatal: FatalException =>
-      error("Fatal Error, system exit...", fatal)
-      System.exit(fatal.getErrCode)
-      null.asInstanceOf[T]
-    case _ => null.asInstanceOf[T]
-  }
-
-  def tryCatch[T](tryOp: => T)(catchOp: Throwable => T): T = {
-    try tryOp catch {
-      case t: ControlThrowable => throw t
-      case fatal: FatalException =>
-        error("Fatal Error, system exit...", fatal)
-        System.exit(fatal.getErrCode)
-        null.asInstanceOf[T]
-      case t: Throwable => catchOp(t)
-    }
-  }
-
-  def tryThrow[T](tryOp: => T)(exception: Throwable => Throwable): T = tryCatch(tryOp){
-    t: Throwable => throw exception(t)
-  }
-
-  def tryFinally[T](tryOp: => T)(finallyOp: => Unit): T = try tryOp finally finallyOp
-
-  def tryQuietly[T](tryOp: => T, catchOp: Throwable => Unit): T = tryCatch(tryOp){
-    case fatal: FatalException =>
-      error("Fatal Error, system exit...", fatal)
-      System.exit(fatal.getErrCode)
-      null.asInstanceOf[T]
-    case t: Throwable =>
-      catchOp(t)
-      null.asInstanceOf[T]
-  }
-
-  def tryAndWarn[T](tryOp: => T)(implicit log: Logger): T = tryCatch(tryOp){
-    case error: ErrorException =>
-      val errorMsg = s"error code(错误码): ${error.getErrCode}, Error message(错误信息): ${error.getDesc}."
-      log.error(errorMsg, error)
-      null.asInstanceOf[T]
-    case warn: WarnException =>
-      val warnMsg = s"Warning code(警告码): ${warn.getErrCode}, Warning message(警告信息): ${warn.getDesc}."
-      log.warn(warnMsg, warn)
-      null.asInstanceOf[T]
-    case t: Throwable =>
-      log.warn("", t)
-      null.asInstanceOf[T]
-  }
-
-  def tryAndWarnMsg[T](tryOp: => T)(message: String)(implicit log: Logger): T = tryCatch(tryOp){
-    case error: ErrorException =>
-      log.error(s"error code(错误码): ${error.getErrCode}, Error message(错误信息): ${error.getDesc}.")
-      log.error(message, error)
-      null.asInstanceOf[T]
-    case warn: WarnException =>
-      log.warn(s"Warning code(警告码): ${warn.getErrCode}, Warning message(警告信息): ${warn.getDesc}.")
-      log.warn(message, warn)
-      null.asInstanceOf[T]
-    case t: Throwable =>
-      log.warn(message, t)
-      null.asInstanceOf[T]
-  }
-
-  def tryAndError[T](tryOp: => T)(implicit log: Logger): T = tryCatch(tryOp){
-    case error: ErrorException =>
-      val errorMsg = s"error code(错误码): ${error.getErrCode}, Error message(错误信息): ${error.getDesc}."
-      log.error(errorMsg, error)
-      null.asInstanceOf[T]
-    case warn: WarnException =>
-      val warnMsg = s"Warning code(警告码): ${warn.getErrCode}, Warning message(警告信息): ${warn.getDesc}."
-      log.warn(warnMsg, warn)
-      null.asInstanceOf[T]
-    case t: Throwable =>
-      log.error("", t)
-      null.asInstanceOf[T]
-  }
-
-  def tryAndErrorMsg[T](tryOp: => T)(message: String)(implicit log: Logger): T = tryCatch(tryOp){
-    case error: ErrorException =>
-      log.error(s"error code(错误码): ${error.getErrCode}, Error message(错误信息): ${error.getDesc}.")
-      log.error(message, error)
-      null.asInstanceOf[T]
-    case warn: WarnException =>
-      log.warn(s"Warning code(警告码): ${warn.getErrCode}, Warning message(警告信息): ${warn.getDesc}.")
-      log.warn(message, warn)
-      null.asInstanceOf[T]
-    case t: Throwable =>
-      log.error(message, t)
-      null.asInstanceOf[T]
-  }
-  
-  def sleepQuietly(mills: Long): Unit = tryQuietly(Thread.sleep(mills))
-
-  def threadFactory(threadName: String, isDaemon: Boolean = true): ThreadFactory = {
-    new ThreadFactory {
-      val num = new AtomicInteger(0)
-      override def newThread(r: Runnable): Thread = {
-        val t = new Thread(r)
-        t.setDaemon(isDaemon)
-        t.setName(threadName + num.incrementAndGet())
-        t
-      }
-    }
-  }
-
-  def newCachedThreadPool(threadNum: Int, threadName: String, isDaemon: Boolean = true) = {
-    val threadPool = new ThreadPoolExecutor(threadNum, threadNum, 120L, TimeUnit.SECONDS,
-      new LinkedBlockingQueue[Runnable](10 * threadNum),
-      threadFactory(threadName, isDaemon))
-    threadPool.allowCoreThreadTimeOut(true)
-    threadPool
-  }
-
-  def newCachedExecutionContext(threadNum: Int, threadName: String, isDaemon: Boolean = true) =
-    ExecutionContext.fromExecutorService(newCachedThreadPool(threadNum, threadName, isDaemon))
-
-  def newFixedThreadPool(threadNum: Int, threadName: String, isDaemon: Boolean = true): ExecutorService = {
-    Executors.newFixedThreadPool(threadNum, threadFactory(threadName, isDaemon))
-  }
-
-  def newFixedExecutionContext(threadNum: Int, threadName: String, isDaemon: Boolean = true): ExecutionContextExecutorService = {
-    ExecutionContext.fromExecutorService(newFixedThreadPool(threadNum, threadName, isDaemon))
-  }
-
-  val defaultScheduler = {
-    val scheduler = new ScheduledThreadPoolExecutor(20, threadFactory("BDP-Default-Scheduler-Thread-", true))
-    scheduler.setMaximumPoolSize(20)
-    scheduler.setKeepAliveTime(5, TimeUnit.MINUTES)
-    scheduler
-  }
-
-  def getLocalHostname = InetAddress.getLocalHost.getHostAddress
-
-  def getComputerName = Utils.tryCatch(InetAddress.getLocalHost.getCanonicalHostName)(t => sys.env("COMPUTERNAME"))
-
-  /**
-    * Checks if event has occurred during some time period. This performs an exponential backoff
-    * to limit the poll calls.
-    *
-    * @param checkForEvent
-    * @param atMost
-    * @throws java.util.concurrent.TimeoutException
-    * @throws java.lang.InterruptedException
-    * @return
-    */
-  @throws(classOf[TimeoutException])
-  @throws(classOf[InterruptedException])
-  final def waitUntil(checkForEvent: () => Boolean, atMost: Duration, radix: Int, maxPeriod: Long): Unit = {
-    val endTime = try System.currentTimeMillis() + atMost.toMillis catch { case _: IllegalArgumentException => 0l }
-
-    @tailrec
-    def aux(count: Int): Unit = {
-      if (!checkForEvent()) {
-        val now = System.currentTimeMillis()
-
-        if (endTime == 0 || now < endTime) {
-          val sleepTime = Math.max(Math.min(radix * count, maxPeriod), 100)
-          Thread.sleep(sleepTime)
-          aux(count + 1)
-        } else {
-          throw new TimeoutException
-        }
-      }
-    }
-
-    aux(1)
-  }
-
-  final def waitUntil(checkForEvent: () => Boolean, atMost: Duration): Unit = waitUntil(checkForEvent, atMost, 100, 2000)
-
-  /**
-    * do not exec complex shell command with lots of output, may cause io blocking
-    * @param commandLine shell command
-    * @return
-    */
-  def exec(commandLine: Array[String]): String = exec(commandLine, -1)
-
-  /**
-    * do not exec complex shell command with lots of output, may cause io blocking
-    * @param commandLine shell command
-    * @return
-    */
-  def exec(commandLine: List[String]): String = exec(commandLine, -1)
-
-  /**
-    * do not exec complex shell command with lots of output, may cause io blocking
-    * @param commandLine shell command
-    * @param maxWaitTime max wait time
-    * @return
-    */
-  def exec(commandLine: Array[String], maxWaitTime: Long): String = exec(commandLine.toList, maxWaitTime)
-
-  /**
-    * do not exec complex shell command with lots of output, may cause io blocking
-    * @param commandLine shell command
-    * @param maxWaitTime max wait time
-    * @return
-    */
-  def exec(commandLine: List[String], maxWaitTime: Long): String = {
-    val pb = new ProcessBuilder(commandLine)
-    pb.redirectErrorStream(true)
-    pb.redirectInput(ProcessBuilder.Redirect.PIPE)
-    val process = pb.start
-    val log = new BufferedReader(new InputStreamReader(process.getInputStream))
-    val exitCode = if(maxWaitTime > 0) {
-      val completed = process.waitFor(maxWaitTime, TimeUnit.MILLISECONDS)
-      if(!completed) {
-        IOUtils.closeQuietly(log)
-        process.destroy()
-        throw new TimeoutException(s"exec timeout with ${ByteTimeUtils.msDurationToString(maxWaitTime)}!")
-      }
-      process.exitValue
-    } else
-      tryThrow(process.waitFor)(t => {process.destroy();IOUtils.closeQuietly(log);t})
-    val lines = log.lines().toArray
-    IOUtils.closeQuietly(log)
-    if (exitCode != 0) {
-      throw new DwcCommonErrorException(0, s"exec failed with exit code: $exitCode, ${lines.mkString(". ")}")
-    }
-   lines.mkString("\n")
-  }
-
-  def addShutdownHook(hook: => Unit): Unit = ShutdownUtils.addShutdownHook(hook)
-
-  def getClassInstance[T](className: String): T ={
-    Utils.tryThrow(
-      (Thread.currentThread.getContextClassLoader.loadClass(className).asInstanceOf[Class[T]].newInstance())) (t =>{
-      error(s"Failed to instance: $className ", t)
-      throw t
-    })
-  }
-
-  def msDurationToString(ms: Long): String = {
-    val second = 1000
-    val minute = 60 * second
-    val hour = 60 * minute
-    ms match {
-      case t if t < second =>
-        "%d ms".format(t)
-      case t if t < minute =>
-        "%.1f 秒".format(t.toFloat / second)
-      case t if t < hour =>
-        "%.1f 分钟".format(t.toFloat / minute)
-      case t =>
-        "%.2f 小时".format(t.toFloat / hour)
-    }
-  }
-
-
-}
diff --git a/core/hadoop-common/pom.xml b/core/hadoop-common/pom.xml
deleted file mode 100644
index 62a0c87..0000000
--- a/core/hadoop-common/pom.xml
+++ /dev/null
@@ -1,243 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>linkis-hadoop-common</artifactId>
-    <packaging>jar</packaging>
-
-    <dependencies>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-common</artifactId>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.hadoop</groupId>
-            <artifactId>hadoop-common</artifactId>
-            <version>${hadoop.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>log4j</groupId>
-                    <artifactId>log4j</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.mortbay.jetty</groupId>
-                    <artifactId>jetty</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.mortbay.jetty</groupId>
-                    <artifactId>jetty-util</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>com.sun.jersey</groupId>
-                    <artifactId>jersey-core</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>com.sun.jersey</groupId>
-                    <artifactId>jersey-server</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>com.sun.jersey</groupId>
-                    <artifactId>jersey-json</artifactId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jsr311-api</artifactId>
-                    <groupId>javax.ws.rs</groupId>
-                </exclusion>
-                <exclusion>
-                    <groupId>net.java.dev.jets3t</groupId>
-                    <artifactId>jets3t</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>com.jcraft</groupId>
-                    <artifactId>jsch</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>com.google.code.findbugs</groupId>
-                    <artifactId>jsr305</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>xmlenc</groupId>
-                    <artifactId>xmlenc</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>net.java.dev.jets3t</groupId>
-                    <artifactId>jets3t</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.apache.avro</groupId>
-                    <artifactId>avro</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.apache.hadoop</groupId>
-                    <artifactId>hadoop-auth</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>com.jcraft</groupId>
-                    <artifactId>jsch</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>com.google.code.findbugs</groupId>
-                    <artifactId>jsr305</artifactId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>servlet-api</artifactId>
-                    <groupId>javax.servlet</groupId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-log4j12</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>com.sun.jersey</groupId>
-                    <artifactId>*</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.codehaus.jackson</groupId>
-                    <artifactId>*</artifactId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>commons-codec</artifactId>
-                    <groupId>commons-codec</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>commons-logging</artifactId>
-                    <groupId>commons-logging</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>netty</artifactId>
-                    <groupId>io.netty</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>curator-client</artifactId>
-                    <groupId>org.apache.curator</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.hadoop</groupId>
-            <artifactId>hadoop-hdfs</artifactId>
-            <version>${hadoop.version}</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>io.netty</artifactId>
-                    <groupId>netty</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>servlet-api</artifactId>
-                    <groupId>javax.servlet</groupId>
-                </exclusion>
-                <exclusion>
-                    <groupId>com.google.guava</groupId>
-                    <artifactId>guava</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>com.sun.jersey</groupId>
-                    <artifactId>jersey-core</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>com.sun.jersey</groupId>
-                    <artifactId>jersey-server</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-log4j12</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>com.sun.jersey</groupId>
-                    <artifactId>*</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.codehaus.jackson</groupId>
-                    <artifactId>*</artifactId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>commons-logging</artifactId>
-                    <groupId>commons-logging</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>netty</artifactId>
-                    <groupId>io.netty</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>commons-codec</artifactId>
-                    <groupId>commons-codec</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.hadoop</groupId>
-            <artifactId>hadoop-auth</artifactId>
-            <version>${hadoop.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-log4j12</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.apache.httpcomponents</groupId>
-                    <artifactId>httpclient</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.apache.httpcomponents</groupId>
-                    <artifactId>*</artifactId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>commons-codec</artifactId>
-                    <groupId>commons-codec</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>zookeeper</artifactId>
-                    <groupId>org.apache.zookeeper</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>src/main/resources</directory>
-            </resource>
-        </resources>
-        <finalName>${project.artifactId}-${project.version}</finalName>
-    </build>
-</project>
\ No newline at end of file
diff --git a/core/hadoop-common/src/main/scala/com/webank/wedatasphere/linkis/hadoop/common/conf/HadoopConf.scala b/core/hadoop-common/src/main/scala/com/webank/wedatasphere/linkis/hadoop/common/conf/HadoopConf.scala
deleted file mode 100644
index 24e10df..0000000
--- a/core/hadoop-common/src/main/scala/com/webank/wedatasphere/linkis/hadoop/common/conf/HadoopConf.scala
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.hadoop.common.conf
-
-import com.webank.wedatasphere.linkis.common.conf.CommonVars
-
-/**
-  * Created by johnnwang on 2019/12/11.
-  */
-object HadoopConf {
-
-  val HADOOP_ROOT_USER = CommonVars("wds.linkis.hadoop.root.user", "hadoop")
-
-  val KERBEROS_ENABLE = CommonVars("wds.linkis.keytab.enable", false)
-
-  val KEYTAB_FILE = CommonVars("wds.linkis.keytab.file", "/appcom/keytab/")
-
-  val KEYTAB_HOST = CommonVars("wds.linkis.keytab.host", "127.0.0.1")
-
-  val KEYTAB_HOST_ENABLED = CommonVars("wds.linkis.keytab.host.enabled", false)
-
-}
diff --git a/core/hadoop-common/src/main/scala/com/webank/wedatasphere/linkis/hadoop/common/utils/HDFSUtils.scala b/core/hadoop-common/src/main/scala/com/webank/wedatasphere/linkis/hadoop/common/utils/HDFSUtils.scala
deleted file mode 100644
index 3982b1a..0000000
--- a/core/hadoop-common/src/main/scala/com/webank/wedatasphere/linkis/hadoop/common/utils/HDFSUtils.scala
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.webank.wedatasphere.linkis.hadoop.common.utils
-
-import java.io.File
-import java.nio.file.Paths
-import java.security.PrivilegedExceptionAction
-
-import com.webank.wedatasphere.linkis.common.conf.Configuration.hadoopConfDir
-import com.webank.wedatasphere.linkis.hadoop.common.conf.HadoopConf._
-import org.apache.hadoop.conf.Configuration
-import org.apache.hadoop.fs.{FileSystem, Path}
-import org.apache.hadoop.security.UserGroupInformation
-/**
-  * Created by enjoyyin on 2019/5/27.
-  */
-object HDFSUtils {
-
-
-
-  def getConfiguration(user: String): Configuration = getConfiguration(user, hadoopConfDir)
-
-  def getConfiguration(user: String, hadoopConfDir: String): Configuration = {
-    val confPath = new File(hadoopConfDir)
-    if(!confPath.exists() || confPath.isFile) {
-      throw new RuntimeException(s"Create hadoop configuration failed, path $hadoopConfDir not exists.")
-    }
-    val conf = new Configuration()
-    conf.addResource(new Path(Paths.get(hadoopConfDir, "core-site.xml").toAbsolutePath.toFile.getAbsolutePath))
-    conf.addResource(new Path(Paths.get(hadoopConfDir, "hdfs-site.xml").toAbsolutePath.toFile.getAbsolutePath))
-    conf.addResource(new Path(Paths.get(hadoopConfDir, "yarn-site.xml").toAbsolutePath.toFile.getAbsolutePath))
-    conf
-  }
-
-  def getHDFSRootUserFileSystem: FileSystem = getHDFSRootUserFileSystem(getConfiguration(HADOOP_ROOT_USER.getValue))
-
-  def getHDFSRootUserFileSystem(conf: org.apache.hadoop.conf.Configuration): FileSystem =
-    getHDFSUserFileSystem(HADOOP_ROOT_USER.getValue, conf)
-
-  def getHDFSUserFileSystem(userName: String): FileSystem = getHDFSUserFileSystem(userName, getConfiguration(userName))
-
-  def getHDFSUserFileSystem(userName: String, conf: org.apache.hadoop.conf.Configuration): FileSystem =
-    getUserGroupInformation(userName)
-      .doAs(new PrivilegedExceptionAction[FileSystem]{
-        def run = FileSystem.get(conf)
-      })
-  def getUserGroupInformation(userName: String): UserGroupInformation ={
-    if(KERBEROS_ENABLE.getValue) {
-      val path = new File(KEYTAB_FILE.getValue , userName + ".keytab").getPath
-      val user = getKerberosUser(userName)
-      UserGroupInformation.setConfiguration(getConfiguration(userName))
-      UserGroupInformation.loginUserFromKeytabAndReturnUGI(user, path)
-    } else {
-      UserGroupInformation.createRemoteUser(userName)
-    }
-  }
-
-  def getKerberosUser(userName: String): String = {
-    var user = userName
-    if(KEYTAB_HOST_ENABLED.getValue){
-      user = user+ "/" + KEYTAB_HOST.getValue
-    }
-    user
-  }
-
-}
diff --git a/core/httpclient/pom.xml b/core/httpclient/pom.xml
deleted file mode 100644
index 1276589..0000000
--- a/core/httpclient/pom.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>linkis-httpclient</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-common</artifactId>
-            </dependency>
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpclient</artifactId>
-            <version>${httpclient.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpmime</artifactId>
-            <version>${httpmime.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.json4s</groupId>
-            <artifactId>json4s-jackson_${scala.binary.version}</artifactId>
-            <version>${json4s.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.scala-lang</groupId>
-                    <artifactId>scala-library</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                    <artifactId>jackson-databind</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                    <artifactId>jackson-annotations</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                    <artifactId>jackson-core</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-source-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>attach-sources</id>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-
-        </plugins>
-        <resources>
-            <resource>
-                <directory>${basedir}/src/main/resources</directory>
-            </resource>
-        </resources>
-        <finalName>${project.artifactId}-${project.version}</finalName>
-    </build>
-
-</project>
\ No newline at end of file
diff --git a/core/httpclient/src/main/scala/com/webank/wedatasphere/linkis/httpclient/AbstractHttpClient.scala b/core/httpclient/src/main/scala/com/webank/wedatasphere/linkis/httpclient/AbstractHttpClient.scala
deleted file mode 100644
index e610b63..0000000
--- a/core/httpclient/src/main/scala/com/webank/wedatasphere/linkis/httpclient/AbstractHttpClient.scala
+++ /dev/null
@@ -1,287 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.httpclient
-
-import java.util
-import java.util.concurrent.TimeUnit
-
-import com.webank.wedatasphere.linkis.common.conf.Configuration
-import com.webank.wedatasphere.linkis.common.io.{Fs, FsPath}
-import com.webank.wedatasphere.linkis.common.utils.Utils
-import com.webank.wedatasphere.linkis.httpclient.authentication.{AbstractAuthenticationStrategy, AuthenticationAction, HttpAuthentication}
-import com.webank.wedatasphere.linkis.httpclient.config.ClientConfig
-import com.webank.wedatasphere.linkis.httpclient.discovery.{AbstractDiscovery, Discovery, HeartbeatAction}
-import com.webank.wedatasphere.linkis.httpclient.exception.{HttpClientResultException, HttpMessageParseException}
-import com.webank.wedatasphere.linkis.httpclient.loadbalancer.{AbstractLoadBalancer, DefaultLoadbalancerStrategy, LoadBalancer}
-import com.webank.wedatasphere.linkis.httpclient.request._
-import com.webank.wedatasphere.linkis.httpclient.response._
-import org.apache.commons.io.IOUtils
-import org.apache.commons.lang.StringUtils
-import org.apache.http.client.entity.UrlEncodedFormEntity
-import org.apache.http.client.methods.{CloseableHttpResponse, HttpGet, HttpPost}
-import org.apache.http.client.utils.URIBuilder
-import org.apache.http.entity.mime.MultipartEntityBuilder
-import org.apache.http.entity.{ContentType, StringEntity}
-import org.apache.http.impl.client.HttpClients
-import org.apache.http.message.BasicNameValuePair
-import org.apache.http.util.EntityUtils
-import org.apache.http.{HttpException, HttpResponse, _}
-import org.json4s.jackson.Serialization.read
-import org.json4s.{DefaultFormats, Formats}
-
-import scala.collection.Iterable
-import scala.collection.JavaConversions._
-import scala.concurrent.duration.Duration
-import scala.concurrent.{ExecutionContext, ExecutionContextExecutorService}
-
-
-/**
-  * Created by enjoyyin on 2019/5/20.
-  */
-abstract class AbstractHttpClient(clientConfig: ClientConfig, clientName: String) extends Client {
-
-  protected implicit val formats: Formats = DefaultFormats
-  protected implicit val executors: ExecutionContext = Utils.newCachedExecutionContext(clientConfig.getMaxConnection, clientName, false)
-  protected val httpTimeout: Duration = if (clientConfig.getReadTimeout > 0) Duration(clientConfig.getReadTimeout, TimeUnit.MILLISECONDS)
-  else Duration.Inf
-
-  protected val httpClient = HttpClients.createDefault()
-
-  if (clientConfig.getAuthenticationStrategy != null) clientConfig.getAuthenticationStrategy match {
-    case auth: AbstractAuthenticationStrategy => auth.setClient(this)
-    case _ =>
-  }
-  protected val (discovery, loadBalancer): (Option[Discovery], Option[LoadBalancer]) =
-    if (this.clientConfig.isDiscoveryEnabled) {
-      val discovery = Some(createDiscovery())
-      discovery.foreach {
-        case d: AbstractDiscovery =>
-          d.setServerUrl(clientConfig.getServerUrl)
-          d.setClient(this)
-          d.setSchedule(clientConfig.getDiscoveryPeriod, clientConfig.getDiscoveryTimeUnit)
-        case d => d.setServerUrl(clientConfig.getServerUrl)
-      }
-      //如果discovery没有启用,那么启用loadBalancer是没有意义的
-      val loadBalancer = if (clientConfig.isLoadbalancerEnabled && this.clientConfig.getLoadbalancerStrategy != null)
-        Some(this.clientConfig.getLoadbalancerStrategy.createLoadBalancer())
-      else if (clientConfig.isLoadbalancerEnabled) Some(DefaultLoadbalancerStrategy.createLoadBalancer())
-      else None
-      loadBalancer match {
-        case Some(lb: AbstractLoadBalancer) =>
-          discovery.foreach(_.addDiscoveryListener(lb))
-        case _ =>
-      }
-      (discovery, loadBalancer)
-    } else (None, None)
-
-  discovery.foreach(_.start())
-
-  protected def createDiscovery(): Discovery
-
-  override def execute(requestAction: Action): Result = execute(requestAction, -1)
-
-  override def execute(requestAction: Action, waitTime: Long): Result = {
-    if(!requestAction.isInstanceOf[HttpAction])
-      throw new UnsupportedOperationException("only HttpAction supported, but the fact is " + requestAction.getClass)
-    val action = prepareAction(requestAction.asInstanceOf[HttpAction])
-    val response: CloseableHttpResponse = executeHttpAction(action)
-    responseToResult(response, action)
-  }
-
-  override def execute(requestAction: Action, resultListener: ResultListener): Unit = {
-    if (!requestAction.isInstanceOf[HttpAction]) {
-      throw new UnsupportedOperationException("only HttpAction supported, but the fact is " + requestAction.getClass)
-    }
-    val action = prepareAction(requestAction.asInstanceOf[HttpAction])
-    val response: CloseableHttpResponse = executeHttpAction(action)
-    //response.onSuccess{case r => resultListener.onSuccess(responseToResult(r, action))}
-    //response.onFailure{case t => resultListener.onFailure(t)}
-  }
-
-  protected def getRequestUrl(suffixUrl: String, requestBody: String): String = {
-    val urlPrefix = loadBalancer.map(_.chooseServerUrl(requestBody)).getOrElse(clientConfig.getServerUrl)
-    connectUrl(urlPrefix, suffixUrl)
-  }
-
-  protected def connectUrl(prefix: String, suffix: String): String = {
-    val prefixEnd = prefix.endsWith("/")
-    val suffixStart = suffix.startsWith("/")
-    if(prefixEnd && suffixStart) prefix.substring(0, prefix.length - 1) + suffix
-    else if(!prefixEnd && !suffixStart) prefix + "/" + suffix
-    else prefix + suffix
-  }
-
-  protected def prepareAction(requestAction: HttpAction): HttpAction = requestAction
-
-  protected def executeHttpAction(requestAction: HttpAction): CloseableHttpResponse = {
-    var realURL = ""
-    requestAction match {
-      case serverUrlAction: ServerUrlAction =>
-        realURL = connectUrl(serverUrlAction.serverUrl, requestAction.getURL)
-      case _ =>
-        realURL = getRequestUrl(requestAction.getURL, requestAction.getRequestBody)
-    }
-
-    if (clientConfig.getAuthenticationStrategy != null) clientConfig.getAuthenticationStrategy.login(requestAction, realURL.replaceAll(requestAction.getURL, "")) match {
-      case authAction: HttpAuthentication =>
-        val cookies = authAction.authToCookies
-        if (cookies != null && cookies.nonEmpty) cookies.foreach(requestAction.addCookie)
-        val headers = authAction.authToHeaders
-        if (headers != null && !headers.isEmpty()) {
-          headers.foreach { case (k, v) => requestAction.addHeader(k.toString(), v.toString()) }
-        }
-      case _ =>
-    }
-
-    var response: CloseableHttpResponse = null
-    requestAction match {
-      case upload: UploadAction =>
-        val httpPost = new HttpPost(realURL)
-        val builder = MultipartEntityBuilder.create()
-        if(upload.inputStreams != null)
-          upload.inputStreams.foreach { case (k, v) =>
-            builder.addBinaryBody(k, v, ContentType.create("multipart/form-data"), k)
-          }
-        upload match {
-          case get: GetAction => get.getParameters.
-            retain((k, v) => v != null && k != null).
-            foreach { case (k, v) => builder.addTextBody(k.toString, v.toString) }
-          case _ =>
-        }
-        upload match {
-          case get: GetAction => get.getHeaders.
-            retain((k, v) => v != null && k != null).
-            foreach { case (k, v) => httpPost.addHeader(k.toString, v.toString) }
-          case _ =>
-        }
-        val httpEntity = builder.build()
-        httpPost.setEntity(httpEntity)
-        response = httpClient.execute(httpPost)
-      case post: POSTAction =>
-        val httpPost = new HttpPost(realURL)
-        if (post.getParameters.nonEmpty || post.getFormParams.nonEmpty) {
-          val nvps = new util.ArrayList[NameValuePair]
-          if (post.getParameters.nonEmpty) {
-            post.getParameters.foreach { case (k, v) => nvps.add(new BasicNameValuePair(k, v.toString())) }
-          }
-          if (post.getFormParams.nonEmpty) {
-            post.getFormParams.foreach { case (k, v) => nvps.add(new BasicNameValuePair(k, v.toString())) }
-          }
-          httpPost.setEntity(new UrlEncodedFormEntity(nvps))
-        }
-
-        if (StringUtils.isNotBlank(post.getRequestPayload)) {
-          val stringEntity = new StringEntity(post.getRequestPayload, "UTF-8")
-          stringEntity.setContentEncoding(Configuration.BDP_ENCODING.getValue)
-          stringEntity.setContentType("application/json")
-          httpPost.setEntity(stringEntity)
-        }
-
-        if (requestAction.getHeaders.nonEmpty) {
-          requestAction.getHeaders.foreach { case (k, v) => httpPost.addHeader(k.toString(), v.toString()) }
-        }
-        response = httpClient.execute(httpPost)
-      case get: GetAction =>
-        val builder = new URIBuilder(realURL)
-        if (!get.getParameters.isEmpty) {
-          get.getParameters.foreach { case (k, v) => builder.addParameter(k.toString(), v.toString()) }
-        }
-        val httpGet = new HttpGet(builder.build())
-        if (requestAction.getHeaders.nonEmpty) {
-          requestAction.getHeaders.foreach { case (k, v) => httpGet.addHeader(k.toString(), v.toString()) }
-        }
-        response = httpClient.execute(httpGet);
-      case _ =>
-        val httpost = new HttpPost(realURL)
-        val stringEntity = new StringEntity(requestAction.getRequestBody, "UTF-8")
-        stringEntity.setContentEncoding(Configuration.BDP_ENCODING.getValue)
-        stringEntity.setContentType("application/json")
-        httpost.setEntity(stringEntity)
-        if (requestAction.getHeaders.nonEmpty) {
-          requestAction.getHeaders.foreach { case (k, v) => httpost.addHeader(k.toString(), v.toString()) }
-        }
-        response = httpClient.execute(httpost)
-    }
-    response
-  }
-
-  protected def getFsByUser(user: String, path: FsPath): Fs
-
-  protected def responseToResult(response: HttpResponse, requestAction: Action): Result = {
-    var entity = response.getEntity
-    val result = requestAction match {
-      case download: DownloadAction =>
-        val statusCode = response.getStatusLine.getStatusCode
-        if (statusCode != 200) {
-          var responseBody: String = null
-          if (entity != null) {
-            responseBody = EntityUtils.toString(entity, "UTF-8")
-          }
-          throw new HttpClientResultException(s"request failed! ResponseBody is $responseBody.")
-        }
-        download.write(entity.getContent)
-        Result()
-      case heartbeat: HeartbeatAction =>
-        discovery.map {
-          case d: AbstractDiscovery => d.getHeartbeatResult(response, heartbeat)
-        }.getOrElse(throw new HttpMessageParseException("Discovery is not enable, HeartbeatAction is not needed!"))
-      case auth: AuthenticationAction =>
-        clientConfig.getAuthenticationStrategy match {
-          case a: AbstractAuthenticationStrategy => a.getAuthenticationResult(response, auth)
-          case _ => throw new HttpMessageParseException("AuthenticationStrategy is not enable, login is not needed!")
-        }
-      case httpAction: HttpAction =>
-        var responseBody: String = null
-        if (entity != null) {
-          responseBody = EntityUtils.toString(entity, "UTF-8")
-        }
-        httpResponseToResult(response, httpAction, responseBody)
-          .getOrElse(throw new HttpMessageParseException("cannot parse message: " + responseBody))
-    }
-    result match {
-      case userAction: UserAction => requestAction match {
-        case _userAction: UserAction => userAction.setUser(_userAction.getUser)
-        case _ =>
-      }
-      case _ =>
-    }
-    result
-  }
-
-  protected def httpResponseToResult(response: HttpResponse, requestAction: HttpAction, responseBody: String): Option[Result]
-
-  protected def deserializeResponseBody(response: HttpResponse): Iterable[_] = {
-    var entity = response.getEntity
-    var responseBody: String = null
-    if (entity != null) {
-      responseBody = EntityUtils.toString(entity, "UTF-8")
-    }
-    if (responseBody.startsWith("{") && responseBody.endsWith("}"))
-      read[Map[String, Object]](responseBody)
-    else if (responseBody.startsWith("[") && responseBody.endsWith("}"))
-      read[List[Map[String, Object]]](responseBody)
-    else if (StringUtils.isEmpty(responseBody)) Map.empty[String, Object]
-    else if (responseBody.length > 200) throw new HttpException(responseBody.substring(0, 200))
-    else throw new HttpException(responseBody)
-  }
-
-  override def close(): Unit = {
-    discovery.foreach {
-      case d: AbstractDiscovery => IOUtils.closeQuietly(d)
-      case _ =>
-    }
-    httpClient.close()
-    executors.asInstanceOf[ExecutionContextExecutorService].shutdown()
-  }
-}
\ No newline at end of file
diff --git a/core/httpclient/src/main/scala/com/webank/wedatasphere/linkis/httpclient/config/ClientConfigBuilder.scala b/core/httpclient/src/main/scala/com/webank/wedatasphere/linkis/httpclient/config/ClientConfigBuilder.scala
deleted file mode 100644
index a49c9ac..0000000
--- a/core/httpclient/src/main/scala/com/webank/wedatasphere/linkis/httpclient/config/ClientConfigBuilder.scala
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.httpclient.config
-
-import com.webank.wedatasphere.linkis.common.utils.RetryHandler
-import com.webank.wedatasphere.linkis.httpclient.authentication.AuthenticationStrategy
-import com.webank.wedatasphere.linkis.httpclient.loadbalancer.LoadBalancerStrategy
-
-import scala.concurrent.duration.TimeUnit
-
-/**
-  * Created by enjoyyin on 2019/5/20.
-  */
-class ClientConfigBuilder protected() {
-
-  protected var serverUrl: String = _
-  protected var discoveryEnabled: Boolean = false
-  protected var discoveryPeriod: Long = _
-  protected var discoveryTimeUnit: TimeUnit = _
-  protected var loadbalancerEnabled: Boolean = false
-  protected var loadbalancerStrategy: LoadBalancerStrategy = _
-  protected var authenticationStrategy: AuthenticationStrategy = _
-  protected var authTokenKey: String = _
-  protected var authTokenValue: String = _
-  protected var connectTimeout: Long = _
-  protected var readTimeout: Long = _
-  protected var maxConnection: Int = _
-  protected var retryEnabled: Boolean = _
-  protected var retryHandler: RetryHandler = _
-
-  def addUJESServerUrl(serverUrl: String): this.type = {
-    this.serverUrl = serverUrl
-    this
-  }
-
-  def discoveryEnabled(isDiscoveryEnabled: Boolean): this.type = {
-    this.discoveryEnabled = isDiscoveryEnabled
-    this
-  }
-
-  def discoveryFrequency(period: Long, timeUnit: TimeUnit): this.type = {
-    this.discoveryPeriod = period
-    this.discoveryTimeUnit = timeUnit
-    this
-  }
-
-  def loadbalancerEnabled(isBalanceEnabled: Boolean): this.type = {
-    this.loadbalancerEnabled = isBalanceEnabled
-    this
-  }
-
-  def setBalancerStrategy(loadbalancerStrategy: LoadBalancerStrategy): this.type = {
-    this.loadbalancerStrategy = loadbalancerStrategy
-    this
-  }
-
-  def setAuthenticationStrategy(authenticationStrategy: AuthenticationStrategy): this.type = {
-    this.authenticationStrategy = authenticationStrategy
-    this
-  }
-
-  def connectionTimeout(connectTimeout: Long): this.type = {
-    this.connectTimeout = connectTimeout
-    this
-  }
-
-  def readTimeout(readTimeout: Long): this.type = {
-    this.readTimeout = readTimeout
-    this
-  }
-
-  def maxConnectionSize(maxConnection: Int): this.type = {
-    this.maxConnection = maxConnection
-    this
-  }
-
-  def retryEnabled(isRetryEnabled: Boolean): this.type = {
-    this.retryEnabled = isRetryEnabled
-    this
-  }
-
-  def setRetryHandler(retryHandler: RetryHandler): this.type = {
-    this.retryHandler = retryHandler
-    this
-  }
-
-  def setAuthTokenKey(authTokenKey: String): this.type = {
-    this.authTokenKey = authTokenKey
-    this
-  }
-
-  def setAuthTokenValue(authTokenValue: String): this.type = {
-    this.authTokenValue = authTokenValue
-    this
-  }
-
-
-  def build(): ClientConfig = new ClientConfig(serverUrl, discoveryEnabled, discoveryPeriod, discoveryTimeUnit,
-    loadbalancerEnabled, loadbalancerStrategy, authenticationStrategy,
-    connectTimeout, readTimeout, maxConnection, retryEnabled, retryHandler, authTokenKey, authTokenValue)
-
-}
-object ClientConfigBuilder {
-  def newBuilder(): ClientConfigBuilder = new ClientConfigBuilder
-}
diff --git a/core/httpclient/src/main/scala/com/webank/wedatasphere/linkis/httpclient/exception/HttpMessageParseException.scala b/core/httpclient/src/main/scala/com/webank/wedatasphere/linkis/httpclient/exception/HttpMessageParseException.scala
deleted file mode 100644
index b50629c..0000000
--- a/core/httpclient/src/main/scala/com/webank/wedatasphere/linkis/httpclient/exception/HttpMessageParseException.scala
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Created by ${USER} on ${DATE}.
- */
-
-package com.webank.wedatasphere.linkis.httpclient.exception
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException
-
-/**
-  * Created by enjoyyin on 2019/5/21.
-  */
-class HttpMessageParseException(errorDesc: String) extends ErrorException(10900, errorDesc)
\ No newline at end of file
diff --git a/core/httpclient/src/main/scala/com/webank/wedatasphere/linkis/httpclient/request/UploadAction.scala b/core/httpclient/src/main/scala/com/webank/wedatasphere/linkis/httpclient/request/UploadAction.scala
deleted file mode 100644
index 821bd2d..0000000
--- a/core/httpclient/src/main/scala/com/webank/wedatasphere/linkis/httpclient/request/UploadAction.scala
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.httpclient.request
-
-import scala.tools.nsc.interpreter.InputStream
-
-import java.util
-
-/**
-  * Created by enjoyyin on 2019/5/20.
-  */
-trait UploadAction extends UserAction {
-
-  /**
-    * The file to be uploaded, the key is the parameter name, and the value is the file path.
-    * 需要上传的文件,key为参数名,value为文件路径
-    */
-  val files: util.Map[String, String]
-  /**
-    * The inputStream that needs to be uploaded, the key is the parameter name, and the value is the input stream.
-    * 需要上传的输入流,key为参数名,value为输入流
-    */
-  def inputStreams: util.Map[String, InputStream] = new util.HashMap[String, InputStream]()
-  /**
-    * The inputStream that needs to be uploaded, the key is the parameter name, and the value is the fileName of inputStream.
-    * 需要上传的输入流,key为参数名,value为输入流的文件名
-    */
-  def inputStreamNames: util.Map[String, String] = new util.HashMap[String, String]()
-  def user: Option[String] = Option(getUser)
-
-}
diff --git a/core/scheduler/pom.xml b/core/scheduler/pom.xml
deleted file mode 100644
index 8caf894..0000000
--- a/core/scheduler/pom.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <artifactId>linkis-scheduler</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-common</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-protocol</artifactId>
-            </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>${basedir}/src/main/resources</directory>
-            </resource>
-        </resources>
-        <finalName>${project.artifactId}-${project.version}</finalName>
-    </build>
-
-    <profiles>
-        <profile>
-            <id>product</id>
-            <properties>
-                <project.release.version>0.0.5</project.release.version>
-            </properties>
-        </profile>
-    </profiles>
-</project>
\ No newline at end of file
diff --git a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/Scheduler.scala b/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/Scheduler.scala
deleted file mode 100644
index 4ce1971..0000000
--- a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/Scheduler.scala
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.scheduler
-
-import com.webank.wedatasphere.linkis.common.utils.Logging
-import com.webank.wedatasphere.linkis.scheduler.queue.{Job, SchedulerEvent}
-import com.webank.wedatasphere.linkis.scheduler.queue.fifoqueue.FIFOScheduler
-import com.webank.wedatasphere.linkis.scheduler.queue.parallelqueue.ParallelScheduler
-
-/**
-  * Created by enjoyyin on 2018/9/1.
-  */
-abstract class Scheduler {
-  def init(): Unit
-  def start(): Unit
-  def getName: String
-  def submit(event: SchedulerEvent): Unit
-  def get(event: SchedulerEvent): Option[SchedulerEvent]
-  def get(eventId: String): Option[SchedulerEvent]
-  def shutdown(): Unit
-  def getSchedulerContext: SchedulerContext
-}
-
-object Scheduler extends Logging{
-  def createScheduler(scheduleType: String, schedulerContext: SchedulerContext): Option[Scheduler]={
-    scheduleType match {
-      case "FIFO" => Some(new FIFOScheduler(schedulerContext))
-      case "PARA" => Some(new ParallelScheduler(schedulerContext))
-      case _ => {
-        error("Please enter the correct scheduling type!(请输入正确的调度类型!)")
-        None
-      }
-    }
-  }
-}
\ No newline at end of file
diff --git a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/executer/AbstractExecutor.scala b/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/executer/AbstractExecutor.scala
deleted file mode 100644
index 74300ad..0000000
--- a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/executer/AbstractExecutor.scala
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.scheduler.executer
-
-import com.webank.wedatasphere.linkis.common.utils.{Logging, Utils}
-import com.webank.wedatasphere.linkis.scheduler.exception.SchedulerErrorException
-import com.webank.wedatasphere.linkis.scheduler.executer.ExecutorState._
-import com.webank.wedatasphere.linkis.scheduler.listener.ExecutorListener
-
-/**
-  * Created by enjoyyin on 2018/9/20.
-  */
-abstract class AbstractExecutor(id: Long) extends Executor with Logging {
-
-  private var _state: ExecutorState = Starting
-  private var lastActivityTime = System.currentTimeMillis
-  private var executorListener: Option[ExecutorListener] = None
-  def setExecutorListener(executorListener: ExecutorListener): Unit =
-    this.executorListener = Some(executorListener)
-
-  protected def callback(): Unit
-
-  protected def isIdle = _state == Idle
-  protected def isBusy = _state == Busy
-
-  protected def whenBusy[A](f: => A) = whenState(Busy, f)
-
-  protected def whenIdle[A](f: => A) = whenState(Idle, f)
-
-  protected def whenState[A](state: ExecutorState, f: => A) = if(_state == state) f
-
-  protected def ensureBusy[A](f: => A): A = {
-    lastActivityTime = System.currentTimeMillis
-    if(_state == Busy) synchronized {
-      if (_state == Busy) return f
-    }
-    throw new SchedulerErrorException(20001, "%s is in state %s." format (toString, _state))
-  }
-
-  protected def ensureIdle[A](f: => A): A = ensureIdle(f, true)
-
-  protected def ensureIdle[A](f: => A, transitionState: Boolean): A = {
-    if (_state == Idle) synchronized {
-      if (_state == Idle) {
-        if(transitionState) transition(Busy)
-        return Utils.tryFinally(f){
-          if(transitionState) transition(Idle)
-          callback()
-        }
-      }
-    }
-    throw new SchedulerErrorException(20001, "%s is in state %s." format (toString, _state))
-  }
-
-  protected def ensureAvailable[A](f: => A): A = {
-    if(ExecutorState.isAvailable(_state)) synchronized {
-      if(ExecutorState.isAvailable(_state)) return Utils.tryFinally(f)(callback())
-    }
-    throw new SchedulerErrorException(20001, "%s is in state %s." format (toString, _state))
-  }
-
-  protected def whenAvailable[A](f: => A): A = {
-    if(ExecutorState.isAvailable(_state)) return Utils.tryFinally(f)(callback())
-    throw new SchedulerErrorException(20001, "%s is in state %s." format (toString, _state))
-  }
-
-
-  protected def transition(state: ExecutorState) = this synchronized {
-    lastActivityTime = System.currentTimeMillis
-    this._state match {
-      case Error | Dead | Success =>
-        warn(s"$toString attempt to change state ${this._state} => $state, ignore it.")
-      case ShuttingDown =>
-        state match {
-          case Error | Dead | Success =>
-            val oldState = _state
-            this._state = state
-            executorListener.foreach(_.onExecutorStateChanged(this, oldState, state))
-          case _ => warn(s"$toString attempt to change a ShuttingDown session to $state, ignore it.")
-        }
-      case _ =>
-        info(s"$toString change state ${_state} => $state.")
-        val oldState = _state
-        this._state = state
-        executorListener.foreach(_.onExecutorStateChanged(this, oldState, state))
-    }
-  }
-
-  override def getId: Long = id
-
-  override def state: ExecutorState = _state
-
-  override def getExecutorInfo: ExecutorInfo = ExecutorInfo(id, _state)
-
-  def getLastActivityTime = lastActivityTime
-}
diff --git a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/executer/ExecuteRequest.scala b/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/executer/ExecuteRequest.scala
deleted file mode 100644
index 0228257..0000000
--- a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/executer/ExecuteRequest.scala
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.scheduler.executer
-
-/**
-  * Created by enjoyyin on 2018/8/31.
-  */
-trait ExecuteRequest {
-  val code: String
-}
-trait JobExecuteRequest {
-  val jobId: String
-}
-trait RunTypeExecuteRequest{
-  val runType:String
-}
\ No newline at end of file
diff --git a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/executer/ExecuteResponse.scala b/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/executer/ExecuteResponse.scala
deleted file mode 100644
index 34c7c71..0000000
--- a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/executer/ExecuteResponse.scala
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.scheduler.executer
-
-/**
-  * Created by enjoyyin on 2018/8/31.
-  */
-trait ExecuteResponse
-trait CompletedExecuteResponse extends ExecuteResponse
-case class SuccessExecuteResponse() extends CompletedExecuteResponse
-trait OutputExecuteResponse extends ExecuteResponse {
-  def getOutput: String
-}
-case class AliasOutputExecuteResponse(alias: String, output: String) extends OutputExecuteResponse {
-  override def getOutput: String = output
-}
-case class ErrorExecuteResponse(message: String, t: Throwable) extends CompletedExecuteResponse
-case class IncompleteExecuteResponse(message: String) extends ExecuteResponse
-trait AsynReturnExecuteResponse extends ExecuteResponse {
-  def notify(rs: ExecuteResponse => Unit): Unit
-}
\ No newline at end of file
diff --git a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/executer/Executor.scala b/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/executer/Executor.scala
deleted file mode 100644
index e33f45b..0000000
--- a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/executer/Executor.scala
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.scheduler.executer
-
-import java.io.Closeable
-
-import com.webank.wedatasphere.linkis.protocol.engine.EngineState
-import com.webank.wedatasphere.linkis.protocol.engine.EngineState.EngineState
-
-/**
-  * Created by enjoyyin on 2018/8/31.
-  */
-trait Executor extends Closeable {
-  def getId: Long
-  def execute(executeRequest: ExecuteRequest): ExecuteResponse
-  def state: ExecutorState.ExecutorState
-
-  def getExecutorInfo: ExecutorInfo
-}
-object ExecutorState {
-  type ExecutorState = EngineState
-  val Starting = EngineState.Starting
-  val Idle = EngineState.Idle
-  val Busy = EngineState.Busy
-  val ShuttingDown = EngineState.ShuttingDown
-  val Error = EngineState.Error
-  val Dead = EngineState.Dead
-  val Success = EngineState.Success
-
-  def apply(x: Int): ExecutorState = EngineState(x)
-  def isCompleted(state: ExecutorState) = EngineState.isCompleted(state.asInstanceOf[EngineState])
-  def isAvailable(state: ExecutorState) = EngineState.isAvailable(state.asInstanceOf[EngineState])
-}
\ No newline at end of file
diff --git a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/executer/ExecutorManager.scala b/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/executer/ExecutorManager.scala
deleted file mode 100644
index 3c47224..0000000
--- a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/executer/ExecutorManager.scala
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.scheduler.executer
-
-import com.webank.wedatasphere.linkis.scheduler.listener.ExecutorListener
-import com.webank.wedatasphere.linkis.scheduler.queue.{Job, SchedulerEvent}
-
-import scala.concurrent.duration.Duration
-
-/**
-  * Created by enjoyyin on 2018/9/1.
-  */
-abstract class ExecutorManager {
-
-  def setExecutorListener(executorListener: ExecutorListener): Unit
-
-  protected def createExecutor(event: SchedulerEvent): Executor
-
-  def askExecutor(event: SchedulerEvent): Option[Executor]
-
-  def askExecutor(event: SchedulerEvent, wait: Duration): Option[Executor]
-
-  def getById(id: Long): Option[Executor]
-
-  def getByGroup(groupName: String): Array[Executor]
-
-  protected def delete(executor: Executor): Unit
-
-  def shutdown(): Unit
-
-}
\ No newline at end of file
diff --git a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/executer/SingleTaskInfoSupport.scala b/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/executer/SingleTaskInfoSupport.scala
deleted file mode 100644
index f4eba38..0000000
--- a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/executer/SingleTaskInfoSupport.scala
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.scheduler.executer
-
-import com.webank.wedatasphere.linkis.protocol.engine.JobProgressInfo
-
-/**
-  * Created by enjoyyin on 2018/10/30.
-  */
-trait SingleTaskInfoSupport {
-
-  def progress(): Float
-  def getProgressInfo: Array[JobProgressInfo]
-  def log(): String
-
-}
\ No newline at end of file
diff --git a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/listener/ExecutorListener.scala b/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/listener/ExecutorListener.scala
deleted file mode 100644
index 1469890..0000000
--- a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/listener/ExecutorListener.scala
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.scheduler.listener
-
-import com.webank.wedatasphere.linkis.scheduler.executer.Executor
-import com.webank.wedatasphere.linkis.scheduler.executer.ExecutorState._
-
-/**
-  * Created by enjoyyin on 2018/9/3.
-  */
-trait ExecutorListener extends SchedulerListener {
-  def onExecutorCreated(executor: Executor): Unit
-  def onExecutorCompleted(executor: Executor, message: String): Unit
-  def onExecutorStateChanged(executor: Executor, fromState: ExecutorState, toState: ExecutorState): Unit
-}
\ No newline at end of file
diff --git a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/Consumer.scala b/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/Consumer.scala
deleted file mode 100644
index e456e95..0000000
--- a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/Consumer.scala
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.scheduler.queue
-
-import java.util.concurrent.ExecutorService
-
-import com.webank.wedatasphere.linkis.common.utils.{Logging, Utils}
-import com.webank.wedatasphere.linkis.scheduler.SchedulerContext
-
-/**
-  * Created by enjoyyin on 2018/8/31.
-  */
-abstract class Consumer(schedulerContext: SchedulerContext,
-                        executeService: ExecutorService) extends Runnable with Logging {
-
-  var terminate = false
-
-  def setConsumeQueue(consumeQueue: ConsumeQueue): Unit
-
-  def getConsumeQueue: ConsumeQueue
-
-  def getGroup: Group
-
-  def setGroup(group: Group): Unit
-
-  def getRunningEvents: Array[SchedulerEvent]
-
-  def start(): Unit
-
-  def shutdown(): Unit = {
-    info(s"$toString is ready to stop!")
-    terminate = true
-    info(s"$toString stopped!")
-  }
-
-  override def toString: String = getGroup.getGroupName + "Consumer"
-}
\ No newline at end of file
diff --git a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/Job.scala b/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/Job.scala
deleted file mode 100644
index 2845849..0000000
--- a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/Job.scala
+++ /dev/null
@@ -1,331 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.scheduler.queue
-
-import java.io.Closeable
-import java.util.concurrent.Future
-
-import com.webank.wedatasphere.linkis.common.exception.{DWCRetryException, ErrorException}
-import com.webank.wedatasphere.linkis.common.listener.ListenerEventBus
-import com.webank.wedatasphere.linkis.common.log.LogUtils
-import com.webank.wedatasphere.linkis.common.utils.{Logging, Utils}
-import com.webank.wedatasphere.linkis.protocol.engine.JobProgressInfo
-import com.webank.wedatasphere.linkis.scheduler.event._
-import com.webank.wedatasphere.linkis.scheduler.exception.DWCJobRetryException
-import com.webank.wedatasphere.linkis.scheduler.executer._
-import com.webank.wedatasphere.linkis.scheduler.future.BDPFuture
-import com.webank.wedatasphere.linkis.scheduler.listener._
-import org.apache.commons.io.IOUtils
-import org.apache.commons.lang.StringUtils
-import org.apache.commons.lang.exception.ExceptionUtils
-
-
-/**
-  * Created by enjoyyin on 2018/8/31.
-  */
-abstract class Job extends Runnable with SchedulerEvent with Closeable with Logging {
-
-  import SchedulerEventState._
-  private[queue] var future: Future[_] = _
-  /**
-    * the future of consumer
-    */
-  private[queue] var consumerFuture: BDPFuture = _
-
-  protected var jobDaemon: Option[JobDaemon] = None
-  private var eventListenerBus: ListenerEventBus[_<: SchedulerListener, _<: ScheduleEvent] = _
-  private var executor: Executor = _
-  private var jobListener: Option[JobListener] = None
-  private var logListener: Option[LogListener] = None
-  private var progressListener: Option[ProgressListener] = None
-  private var interrupt = false
-  private var progress: Float = 0f
-  private var retryNum = 0
-  private var errorExecuteResponse: ErrorExecuteResponse = _
-
-  override def isWaiting = super.isWaiting && !interrupt
-  override def isCompleted = super.isCompleted || interrupt
-
-  def kill(): Unit = onFailure("Job is killed by user!", null)
-
-  private[queue] def getJobDaemon = if(!existsJobDaemon) None else {
-    if(jobDaemon.isEmpty) synchronized {
-      if(jobDaemon.isEmpty) jobDaemon = Some(createJobDaemon)
-    }
-    jobDaemon
-  }
-
-  override def cancel() = kill()
-
-  override def pause(): Unit = if(executor != null) executor match {
-    case s: SingleTaskOperateSupport => s.pause()
-    case c: ConcurrentTaskOperateSupport => c.pause(getId)
-    case _ =>
-  }
-
-
-  override def resume(): Unit = if(executor != null) executor match {
-    case s: SingleTaskOperateSupport => s.resume()
-    case c: ConcurrentTaskOperateSupport => c.resume(getId)
-    case _ =>
-  }
-
-  private def killByExecutor(): Unit = if(executor != null) executor match {
-    case s: SingleTaskOperateSupport => s.kill()
-    case c: ConcurrentTaskOperateSupport => c.kill(getId)
-    case _ =>
-  }
-
-  def onFailure(errorMsg: String, t: Throwable): Unit = if(!SchedulerEventState.isCompleted(getState)) {
-    info(s"job $toString is onFailure on state $getState with errorMsg: $errorMsg.")
-    Utils.tryAndWarn {
-      logListener.foreach(_.onLogUpdate(this, LogUtils.generateERROR(errorMsg)))
-      if(t != null) {
-        logListener.foreach(_.onLogUpdate(this, LogUtils.generateERROR(ExceptionUtils.getFullStackTrace(t))))
-      }
-    }
-    errorExecuteResponse = ErrorExecuteResponse(errorMsg, t)
-    jobDaemon.foreach(_.kill())
-    interrupt = true
-    if(future != null && !SchedulerEventState.isCompleted(getState)) {
-      Utils.tryCatch(killByExecutor()){
-        t:Throwable => logger.error(s"kill job $getName failed", t)
-          val s = new ErrorException(23333, s"kill job $getName failed")
-          s.initCause(t)
-          forceCancel(s)
-      }
-      //Utils.tryAndWarnMsg(killByExecutor())(s"kill job $toString failed!")
-      future.cancel(true)
-    }
-    if (consumerFuture != null && executor == null){
-      warn(s"This executor of job($toString) in starting status,When kill job need to interrupter consumer Future")
-      this.consumerFuture.cancel()
-      this.consumerFuture = null
-    }
-    if(super.isWaiting || super.isScheduled) transitionCompleted(errorExecuteResponse)
-    info(s"$toString execute failed. Reason: $errorMsg.", t)
-  }
-
-  /**
-    * updated by enjoyyin
-    * After some jobs call kill, they cannot be killed correctly, causing the state to not be flipped.(一些job调用kill之后,不能被正确kill,导致状态不能翻转)
-    */
-  private def forceCancel(t:Throwable):Unit = {
-    logger.info(s"force to cancel job $getName")
-    val executeCompleted = ErrorExecuteResponse("force to transition Failed", t)
-    transitionCompleted(executeCompleted)
-  }
-
-
-  def setListenerEventBus(eventListenerBus: ListenerEventBus[_<: SchedulerListener, _<: ScheduleEvent]) = this.eventListenerBus = eventListenerBus
-
-  def setExecutor(executor: Executor) = this.executor = executor
-  protected def getExecutor = executor
-
-  def setJobListener(jobListener: JobListener) = this.jobListener = Some(jobListener)
-
-  def setLogListener(logListener: LogListener) = this.logListener = Some(logListener)
-
-  def getLogListener = logListener
-
-
-  def setProgressListener(progressListener: ProgressListener) = this.progressListener = Some(progressListener)
-
-  def getProgressListener = progressListener
-
-  def getProgress = progress
-
-  def setProgress(progress: Float) = this.progress = progress
-
-  def init(): Unit
-
-  protected def jobToExecuteRequest: ExecuteRequest
-
-  def getName: String
-
-  def getJobInfo: JobInfo
-
-  def getErrorResponse = errorExecuteResponse
-
-  protected def existsJobDaemon: Boolean = false
-  protected def createJobDaemon: JobDaemon = new JobDaemon(this, jobDaemonUpdateInterval, executor)
-  protected def jobDaemonUpdateInterval: Long = 1000l
-
-  override def afterStateChanged(fromState: SchedulerEventState, toState: SchedulerEventState): Unit = toState match {
-    case Inited =>
-      jobListener.foreach(_.onJobInited(this))
-    //TODO Add event(加事件)
-    case Scheduled =>
-      jobListener.foreach(_.onJobScheduled(this))
-     // logListener.foreach(_.onLogUpdate(this, "job is scheduled."))
-      //TODO Add event(加事件)
-    case Running =>
-      jobListener.foreach(_.onJobRunning(this))
-      //logListener.foreach(_.onLogUpdate(this, LogUtils.generateInfo( "job is running.")))
-      //TODO job start event
-    case WaitForRetry =>
-      jobListener.foreach(_.onJobWaitForRetry(this))
-    case _ =>
-      jobDaemon.foreach(_.kill())
-      jobListener.foreach(_.onJobCompleted(this))
-     // if(getJobInfo != null) logListener.foreach(_.onLogUpdate(this, getJobInfo.getMetric))
-      //logListener.foreach(_.onLogUpdate(this,  LogUtils.generateInfo( "job is completed.")))
-    //TODO job end event
-  }
-
-  protected def transitionCompleted(executeCompleted: CompletedExecuteResponse): Unit = {
-    val state = getState
-    executeCompleted match {
-      case _: SuccessExecuteResponse =>
-        if(!interrupt) Utils.tryAndWarnMsg(transition(Succeed))(s"update Job $toString from $state to Succeed failed.")
-        else transitionCompleted(errorExecuteResponse)
-      case e: ErrorExecuteResponse =>
-        val canRetry = Utils.tryCatch(isJobShouldRetry(e)) {t =>
-          error(s"Job $toString failed to get the retry information!", t)
-          Utils.tryAndWarn(logListener.foreach(_.onLogUpdate(this, LogUtils.generateERROR("failed to get the retry information! " + ExceptionUtils.getFullStackTrace(t)))))
-          if(e.t == null) errorExecuteResponse = ErrorExecuteResponse(e.message, t)
-          false
-        }
-        if(canRetry) {
-          progress = 0
-          Utils.tryAndWarnMsg(transition(WaitForRetry))(s"update Job $toString from $state to WaitForRetry failed.")
-          return
-        } else {
-          errorExecuteResponse = e
-          Utils.tryAndWarnMsg(transition(if(interrupt && errorExecuteResponse.t == null) Cancelled else Failed))(s"update Job $toString from $state to Failed failed.")
-        }
-    }
-    endTime = System.currentTimeMillis
-    IOUtils.closeQuietly(this)
-  }
-  def isJobSupportRetry: Boolean = true
-  def getRetryNum = retryNum
-  protected def getMaxRetryNum: Int = 2
-  protected def isJobShouldRetry(errorExecuteResponse: ErrorExecuteResponse): Boolean =
-    isJobSupportRetry && errorExecuteResponse != null && (errorExecuteResponse.t match {
-      case t: DWCRetryException =>
-        warn(s"Job $toString is desired to retry.", t)
-        t.getErrCode == DWCJobRetryException.JOB_RETRY_ERROR_CODE
-      case _ => false
-    })
-  final def isJobCanRetry: Boolean = if(!isJobSupportRetry || getState != WaitForRetry) false else synchronized {
-    if(getState == WaitForRetry && (getMaxRetryNum < 1 || retryNum < getMaxRetryNum)) true
-    else if(WaitForRetry == getState && getMaxRetryNum > 0 && retryNum >= getMaxRetryNum) {
-      logListener.foreach(_.onLogUpdate(this,  LogUtils.generateInfo( s"Job cancelled since reached maxRetryNum $getMaxRetryNum.")))
-      transition(Failed)
-      false
-    } else false
-  }
-  final def turnToRetry(): Boolean = if(!isJobSupportRetry || getState != WaitForRetry) false else synchronized (Utils.tryThrow {
-    if(isJobCanRetry) {
-      transition(Scheduled)
-      retryNum += 1
-      true
-    } else false
-  }{t =>
-    retryNum += 1
-    t
-  })
-
-  override def run(): Unit = {
-    if(!isScheduled || interrupt) return
-    startTime = System.currentTimeMillis
-    Utils.tryAndWarn(transition(Running))
-    if(interrupt) {
-      endTime = System.currentTimeMillis
-      transition(Cancelled)
-      close()
-      return
-    }
-    val rs = Utils.tryCatch(executor.execute(jobToExecuteRequest)){
-      case t: InterruptedException =>
-        warn(s"job $toString is interrupted by user!", t)
-        ErrorExecuteResponse("job is interrupted by user!", t)
-      case t =>
-        warn(s"execute job $toString failed!", t)
-        ErrorExecuteResponse("execute job failed!", t)
-    }
-    rs match {
-      case r: CompletedExecuteResponse =>
-        transitionCompleted(r)
-      case r: IncompleteExecuteResponse =>
-        transitionCompleted(ErrorExecuteResponse(if(StringUtils.isNotEmpty(r.message)) r.message else "incomplete code.", null))
-      case r: AsynReturnExecuteResponse =>
-        r.notify(r1 => {
-          val realRS = if(interrupt) errorExecuteResponse else r1 match {
-            case r: IncompleteExecuteResponse =>
-              ErrorExecuteResponse(if(StringUtils.isNotEmpty(r.message)) r.message else "incomplete code.", null)
-            case r: CompletedExecuteResponse => r
-          }
-          transitionCompleted(realRS)
-        })
-    }
-  }
-
-  override def toString: String = if(StringUtils.isNotBlank(getName)) getName else getId
-}
-
-/**
-  * Mainly used to get the status and log. If the Executor can't directly notify the ProgressListener and LogListener, then the Consumer is submitting a Job.
-  * A JobDaemon must be submitted at the same time to ensure that progress and logs are notified in a timely manner.
-  * 主要用于获取状态和日志,如果Executor做不到直接通知ProgressListener和LogListener,则Consumer在提交一个Job时,
-  * 必须同时提交一个JobDaemon,确保进度和日志能及时通知出去
-  * @param job Job to be monitored(需要监听的Job)
-  * @param listenerUpdateIntervalMs Interval of listening(监听的间隔)
-  * @param executor Corresponding actuator(对应的执行器)
-  */
-class JobDaemon(job: Job, listenerUpdateIntervalMs: Long, executor: Executor) extends Runnable with Logging {
-  private var terminate = false
-  private[queue] var future: Future[_] = _
-  private var lastProgress = 0f
-  protected def getProgress: (Float, Array[JobProgressInfo]) = executor match {
-    case s: SingleTaskInfoSupport => (s.progress(), s.getProgressInfo)
-    case c: ConcurrentTaskInfoSupport => (c.progress(job.getId), c.getProgressInfo(job.getId))
-    case _ => (0, null)
-  }
-  protected def getLog: String = executor match {
-    case s: SingleTaskInfoSupport => s.log()
-    case c: ConcurrentTaskInfoSupport => c.log(job.getId)
-    case _ => ""
-  }
-  override def run(): Unit = {
-    if(listenerUpdateIntervalMs < 10) return
-    executor match {
-      case _: SingleTaskInfoSupport =>
-      case _: ConcurrentTaskInfoSupport =>
-      case _ => return
-    }
-    while(!SchedulerEventState.isCompleted(job.getState) && !terminate) {
-      val (progress, progressInfo) = Utils.tryAndWarnMsg(getProgress)(s"Can not get progress information from $executor for job $job.")
-      if(progress != lastProgress) {
-        job.setProgress(progress)
-        Utils.tryAndWarnMsg(job.getProgressListener.foreach(_.onProgressUpdate(job, progress, progressInfo)))(
-          s"Can not update progress for job $job.")
-        lastProgress = progress
-      }
-      val log = Utils.tryAndWarnMsg(getLog)(s"Can not get logs from $executor for job $job.")
-      if(StringUtils.isNotEmpty(log)) Utils.tryAndWarnMsg(job.getLogListener.foreach(_.onLogUpdate(job, log)))(
-        s"Can not update logs for job $job.")
-      Utils.tryQuietly(Thread.sleep(listenerUpdateIntervalMs))
-    }
-  }
-
-  def kill() = {
-    terminate = true
-    if(future != null && !future.isDone) future.cancel(true)
-  }
-}
\ No newline at end of file
diff --git a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/JobInfo.scala b/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/JobInfo.scala
deleted file mode 100644
index 48e0825..0000000
--- a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/JobInfo.scala
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.scheduler.queue
-
-import com.webank.wedatasphere.linkis.scheduler.queue.SchedulerEventState.SchedulerEventState
-
-/**
-  * Created by enjoyyin on 2018/9/4.
-  * JobInfo Is the job information that the server sends to the front end.(是服务端传给前端的job信息)
-  * id: Job execution id(job执行id)
-  * output: Result set(结果集)
-  * state: Job status(job状态)
-  * progress: Job execution progress(job执行的进度)
-  * metric: Some common information about the job, including the startup time, the time that has been run, etc.(job的一些常用信息,包含启动时间,已经运行的时间等)
-  */
-class JobInfo(id: String, output: String, state: String, progress: Float, metric: String){
-  def getId:String = id
-  def getOutput:String = output
-  def getState:String = state
-  def getProgress:Float = progress
-  def getMetric:String = metric
-}
\ No newline at end of file
diff --git a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/SchedulerEvent.scala b/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/SchedulerEvent.scala
deleted file mode 100644
index cbfe363..0000000
--- a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/SchedulerEvent.scala
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.scheduler.queue
-
-import com.webank.wedatasphere.linkis.common.utils.Logging
-import com.webank.wedatasphere.linkis.scheduler.exception.SchedulerErrorException
-import com.webank.wedatasphere.linkis.scheduler.queue.SchedulerEventState._
-
-/**
-  * Created by enjoyyin on 2018/9/17.
-  */
-trait SchedulerEvent extends Logging {
-
-  private[queue] var id: String = _
-  private var state: SchedulerEventState = Inited
-  val createTime = System.currentTimeMillis
-  protected var scheduledTime: Long = 0l
-  protected var startTime: Long = 0l
-  protected var endTime: Long = 0l
-
-  def getEndTime = endTime
-  def getStartTime = startTime
-  def getScheduledTime = scheduledTime
-
-  def getId = id
-
-  def setId(id: String)={
-    this.id = id
-    this synchronized notify()
-  }
-
-  def turnToScheduled(): Boolean = if(!isWaiting) false else this synchronized {
-    if(!isWaiting) false else {
-      scheduledTime = System.currentTimeMillis
-      while(id == null) wait(100)
-      transition(Scheduled)
-      true
-    }
-  }
-
-  def pause(): Unit
-  def resume(): Unit
-
-  def cancel() = transition(Cancelled)
-
-  def isWaiting = state == Inited
-  def isScheduled = state == Scheduled
-  def isRunning = state == Running
-  def isCompleted = SchedulerEventState.isCompleted(state)
-  def isSucceed: Boolean = SchedulerEventState.isSucceed(state)
-  def isWaitForRetry: Boolean = state == WaitForRetry
-
-  def getState = state
-
-  def afterStateChanged(fromState: SchedulerEventState, toState: SchedulerEventState): Unit
-
-  protected def transition(state: SchedulerEventState): Unit = synchronized {
-    if(state.id < this.state.id && state != WaitForRetry)
-      throw new SchedulerErrorException(12000, s"Task status flip error! Cause: Failed to flip from ${this.state} to $state.(任务状态翻转出错!原因:不允许从${this.state} 翻转为$state.)")//抛异常
-    info(s"$toString change state ${this.state} => $state.")
-    val oldState = this.state
-    this.state = state
-    afterStateChanged(oldState, state)
-  }
-}
diff --git a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/fifoqueue/FIFOGroupFactory.scala b/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/fifoqueue/FIFOGroupFactory.scala
deleted file mode 100644
index 1e28644..0000000
--- a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/fifoqueue/FIFOGroupFactory.scala
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.scheduler.queue.fifoqueue
-
-import com.webank.wedatasphere.linkis.scheduler.queue.{Group, GroupFactory, Job, SchedulerEvent}
-
-import scala.collection.mutable
-
-/**
-  * Created by enjoyyin on 2018/9/12.
-  */
-class FIFOGroupFactory extends GroupFactory {
-  private val groupMap = new mutable.HashMap[String, Group]()
-
-  private val UJES_CONTEXT_CONSTRUCTOR_LOCK = new Object()
-
-  //Obtained from the database(从数据库获取)
-  def getInitCapacity(groupName: String): Int = 1000
-
-  def getMaxCapacity(groupName: String): Int = 10000
-
-  override def getOrCreateGroup(groupName: String) = {
-    UJES_CONTEXT_CONSTRUCTOR_LOCK.synchronized {
-      if (groupMap.get(groupName).isDefined) {
-        groupMap.get(groupName).get
-      }
-      else {
-        val group = new FIFOGroup(groupName, getInitCapacity(groupName), getMaxCapacity(groupName))
-        groupMap.put(groupName, group)
-        group
-      }
-    }
-  }
-
-  override def getGroupNameByEvent(event: SchedulerEvent) = "FIFOGROUP"
-}
diff --git a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/fifoqueue/FIFOScheduler.scala b/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/fifoqueue/FIFOScheduler.scala
deleted file mode 100644
index a4c27cd..0000000
--- a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/fifoqueue/FIFOScheduler.scala
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.scheduler.queue.fifoqueue
-
-
-import com.webank.wedatasphere.linkis.common.utils.Utils
-import com.webank.wedatasphere.linkis.scheduler.{AbstractScheduler, Scheduler, SchedulerContext}
-import com.webank.wedatasphere.linkis.scheduler.queue._
-
-/**
-  * Created by enjoyyin on 2018/9/13.
-  */
-class FIFOScheduler(val schedulerContext: SchedulerContext) extends AbstractScheduler {
-  private var consumerManager: ConsumerManager = _
-
-  private var groupFactory: GroupFactory = _
-
-  override def init() = {
-    consumerManager = schedulerContext.getOrCreateConsumerManager
-    groupFactory = schedulerContext.getOrCreateGroupFactory
-  }
-
-  override def getName = "FIFOScheduler"
-
-  override def getSchedulerContext = schedulerContext
-}
diff --git a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/fifoqueue/FIFOUserConsumer.scala b/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/fifoqueue/FIFOUserConsumer.scala
deleted file mode 100644
index db9d4bf..0000000
--- a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/fifoqueue/FIFOUserConsumer.scala
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.scheduler.queue.fifoqueue
-
-/**
-  * Created by enjoyyin on 2018/9/7.
-  */
-
-import java.util.concurrent.{ExecutorService, Future}
-
-import com.webank.wedatasphere.linkis.common.exception.{ErrorException, WarnException}
-import com.webank.wedatasphere.linkis.common.utils.Utils
-import com.webank.wedatasphere.linkis.scheduler.SchedulerContext
-import com.webank.wedatasphere.linkis.scheduler.exception.SchedulerErrorException
-import com.webank.wedatasphere.linkis.scheduler.executer.Executor
-import com.webank.wedatasphere.linkis.scheduler.future.{BDPFuture, BDPFutureTask}
-import com.webank.wedatasphere.linkis.scheduler.queue._
-
-import scala.collection.mutable.ArrayBuffer
-import scala.concurrent.TimeoutException
-
-class FIFOUserConsumer(schedulerContext: SchedulerContext,
-                       executeService: ExecutorService, private var group: Group) extends Consumer(schedulerContext, executeService) {
-  private var fifoGroup = group.asInstanceOf[FIFOGroup]
-  private var queue: ConsumeQueue = _
-  private val maxRunningJobsNum = fifoGroup.getMaxRunningJobs
-  private val runningJobs = new Array[Job](maxRunningJobsNum)
-  private var future: Future[_] = _
-
-  def this(schedulerContext: SchedulerContext,executeService: ExecutorService) = {
-    this(schedulerContext,executeService, null)
-  }
-
-  def start(): Unit = future = executeService.submit(this)
-
-  override def setConsumeQueue(consumeQueue: ConsumeQueue) = {
-    queue = consumeQueue
-  }
-
-  override def getConsumeQueue = queue
-
-  override def getGroup = fifoGroup
-
-  override def setGroup(group: Group) = {
-    this.fifoGroup = group.asInstanceOf[FIFOGroup]
-  }
-
-  override def getRunningEvents = getEvents(_.isRunning)
-
-  private def getEvents(op: SchedulerEvent => Boolean): Array[SchedulerEvent] = {
-    val result = ArrayBuffer[SchedulerEvent]()
-    runningJobs.filter(_ != null).filter(x => op(x)).foreach(result += _)
-    result.toArray
-  }
-
-  override def run() = {
-    Thread.currentThread().setName(s"${toString}Thread")
-    info(s"$toString thread started!")
-    while (!terminate) {
-      Utils.tryAndError(loop())
-      Utils.tryAndError(Thread.sleep(10))
-    }
-    info(s"$toString thread stopped!")
-  }
-
-  protected def askExecutorGap(): Unit = {}
-
-  protected def loop(): Unit = {
-    val completedNums = runningJobs.filter(e => e == null || e.isCompleted)
-    if (completedNums.length < 1) {
-      Utils.tryQuietly(Thread.sleep(1000))  //TODO can also be optimized to optimize by implementing JobListener(TODO 还可以优化,通过实现JobListener进行优化)
-      return
-    }
-    var isRetryJob = false
-    var event: Option[SchedulerEvent] = None
-    def getWaitForRetryEvent: Option[SchedulerEvent] = {
-      val waitForRetryJobs = runningJobs.filter(job => job != null && job.isJobCanRetry)
-      waitForRetryJobs.find{job =>
-        isRetryJob = Utils.tryCatch(job.turnToRetry()){ t =>
-          job.onFailure("Job state flipped to Scheduled failed in Retry(Retry时,job状态翻转为Scheduled失败)!", t)
-          false
-        }
-        isRetryJob
-      }
-    }
-    while(event.isEmpty) {
-      val takeEvent = if(getRunningEvents.isEmpty) Option(queue.take()) else queue.take(3000)
-      event = if(takeEvent.exists(e => Utils.tryCatch(e.turnToScheduled()) {t =>
-          takeEvent.get.asInstanceOf[Job].onFailure("Job state flipped to Scheduled failed(Job状态翻转为Scheduled失败)!", t)
-          false
-      })) takeEvent else getWaitForRetryEvent
-    }
-    event.foreach { case job: Job =>
-      Utils.tryCatch {
-        val (totalDuration, askDuration) = (fifoGroup.getMaxAskExecutorDuration, fifoGroup.getAskExecutorInterval)
-        var executor: Option[Executor] = None
-        job.consumerFuture = new BDPFutureTask(this.future)
-        Utils.waitUntil(() => {
-          executor = Utils.tryCatch(schedulerContext.getOrCreateExecutorManager.askExecutor(job, askDuration)) {
-            case warn: WarnException =>
-              job.getLogListener.foreach(_.onLogUpdate(job, warn.getDesc))
-              None
-            case e:ErrorException =>
-              job.getLogListener.foreach(_.onLogUpdate(job, e.getDesc))
-              throw e
-            case error: Throwable =>
-              throw error
-          }
-          Utils.tryQuietly(askExecutorGap())
-          executor.isDefined
-        }, totalDuration)
-        job.consumerFuture = null
-        executor.foreach { executor =>
-          job.setExecutor(executor)
-          job.future = executeService.submit(job)
-          job.getJobDaemon.foreach(jobDaemon => jobDaemon.future = executeService.submit(jobDaemon))
-          if(!isRetryJob) putToRunningJobs(job)
-        }
-      }{
-        case _: TimeoutException =>
-          warn(s"Ask executor for Job $job timeout!")
-          job.onFailure("The request engine times out and the cluster cannot provide enough resources(请求引擎超时,集群不能提供足够的资源).",
-            new SchedulerErrorException(11055, "Insufficient resources, requesting available engine timeout(资源不足,请求可用引擎超时)!"))
-        case error: Throwable =>
-          job.onFailure("Request engine failed, possibly due to insufficient resources or background process error(请求引擎失败,可能是由于资源不足或后台进程错误)!", error)
-          if(job.isWaitForRetry) {
-            warn(s"Ask executor for Job $job failed, wait for the next retry!", error)
-            if(!isRetryJob)  putToRunningJobs(job)
-          } else warn(s"Ask executor for Job $job failed!", error)
-      }
-    }
-  }
-
-  private def putToRunningJobs(job: Job): Unit = {
-    val index = runningJobs.indexWhere(f => f == null || f.isCompleted)
-    runningJobs(index) = job
-  }
-
-  override def shutdown() = {
-    future.cancel(true)
-    super.shutdown()
-  }
-}
diff --git a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/parallelqueue/ParallelConsumerManager.scala b/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/parallelqueue/ParallelConsumerManager.scala
deleted file mode 100644
index 2c61f6e..0000000
--- a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/parallelqueue/ParallelConsumerManager.scala
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.scheduler.queue.parallelqueue
-
-import java.util.concurrent.ExecutorService
-
-import com.webank.wedatasphere.linkis.common.utils.Utils
-import com.webank.wedatasphere.linkis.scheduler.listener.ConsumerListener
-import com.webank.wedatasphere.linkis.scheduler.queue._
-import com.webank.wedatasphere.linkis.scheduler.queue.fifoqueue.FIFOUserConsumer
-
-import scala.collection.mutable
-
-/**
-  * Created by enjoyyin on 2018/9/11.
-  */
-class ParallelConsumerManager(maxParallelismUsers: Int)extends  ConsumerManager{
-
-  private val UJES_CONTEXT_CONSTRUCTOR_LOCK = new Object()
-  private var consumerListener: Option[ConsumerListener] = None
-
-  private var executorService: ExecutorService = _
-
-  private val consumerGroupMap = new mutable.HashMap[String, FIFOUserConsumer]()
-
-  override def setConsumerListener(consumerListener: ConsumerListener) = {
-    this.consumerListener = Some(consumerListener)
-  }
-
-  override def getOrCreateExecutorService = if(executorService != null) executorService
-    else UJES_CONTEXT_CONSTRUCTOR_LOCK.synchronized {
-      if (executorService == null) {
-        executorService = Utils.newCachedThreadPool(5 * maxParallelismUsers + 1, "Engine-Scheduler-ThreadPool-", true)
-      }
-      executorService
-  }
-
-  override def getOrCreateConsumer(groupName: String) = if(consumerGroupMap.contains(groupName)) consumerGroupMap(groupName)
-    else UJES_CONTEXT_CONSTRUCTOR_LOCK.synchronized {
-      consumerGroupMap.getOrElse(groupName, {
-        val newConsumer = createConsumer(groupName)
-        val group = getSchedulerContext.getOrCreateGroupFactory.getOrCreateGroup(groupName)
-        newConsumer.setGroup(group)
-        newConsumer.setConsumeQueue(new LoopArrayQueue(group))
-        consumerGroupMap.put(groupName, newConsumer)
-        consumerListener.foreach(_.onConsumerCreated(newConsumer))
-        newConsumer.start()
-        newConsumer
-      })
-  }
-
-  override protected def createConsumer(groupName: String) = {
-    val group = getSchedulerContext.getOrCreateGroupFactory.getOrCreateGroup(groupName)
-    new FIFOUserConsumer(getSchedulerContext, getOrCreateExecutorService, group)
-  }
-
-  override def destroyConsumer(groupName: String) =
-    consumerGroupMap.get(groupName).foreach { tmpConsumer =>
-      tmpConsumer.shutdown()
-      consumerGroupMap.remove(groupName)
-      consumerListener.foreach(_.onConsumerDestroyed(tmpConsumer))
-    }
-
-  override def shutdown() = {
-    consumerGroupMap.iterator.foreach(x => x._2.shutdown())
-  }
-
-  override def listConsumers() = consumerGroupMap.values.toArray
-}
diff --git a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/parallelqueue/ParallelGroupFactory.scala b/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/parallelqueue/ParallelGroupFactory.scala
deleted file mode 100644
index c64112d..0000000
--- a/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/parallelqueue/ParallelGroupFactory.scala
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.scheduler.queue.parallelqueue
-
-import com.webank.wedatasphere.linkis.scheduler.queue.{Group, GroupFactory, Job, SchedulerEvent}
-
-import scala.collection.mutable
-
-/**
-  * Created by enjoyyin on 2018/9/12.
-  */
-class ParallelGroupFactory extends GroupFactory{
-  private val groupMap = new mutable.HashMap[String, Group]()
-  def getInitCapacity(groupName: String): Int= 100
-
-  def getMaxCapacity(groupName: String): Int = 1000
-
-  private val UJES_CONTEXT_CONSTRUCTOR_LOCK = new Object()
-
-  override def getOrCreateGroup(groupName: String) = {
-    UJES_CONTEXT_CONSTRUCTOR_LOCK.synchronized {
-      if (groupMap.get(groupName).isDefined) {
-        groupMap.get(groupName).get
-      }
-      else {
-        val group = new ParallelGroup(groupName, getInitCapacity(groupName), getMaxCapacity(groupName))
-        groupMap.put(groupName, group)
-        group
-      }
-    }
-  }
-
-  override def getGroupNameByEvent(event: SchedulerEvent) = {
-    val belongList = groupMap.values.filter(x => x.belongTo(event)).map(x => x.getGroupName).toList
-    if(belongList.size > 0){
-      belongList(0)
-    }else{
-      "NULL"
-    }
-  }
-
-}
diff --git a/datasource/datasourcemanager/common/pom.xml b/datasource/datasourcemanager/common/pom.xml
deleted file mode 100644
index 340baeb..0000000
--- a/datasource/datasourcemanager/common/pom.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  ~ Copyright 2019 WeBank
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <artifactId>linkis</artifactId>
-    <groupId>com.webank.wedatasphere.linkis</groupId>
-    <version>0.11.0</version>
-    <relativePath>../../../pom.xml</relativePath>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-
-  <artifactId>linkis-datasourcemanager-common</artifactId>
-
-
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <um.version>1.0.12</um.version>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-module</artifactId>
-      <exclusions>
-        <exclusion>
-          <artifactId>asm</artifactId>
-          <groupId>org.ow2.asm</groupId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-      </plugin>
-
-      <plugin>
-        <groupId>net.alchim31.maven</groupId>
-        <artifactId>scala-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-      </plugin>
-    </plugins>
-    <resources>
-      <resource>
-        <directory>src/main/resources</directory>
-      </resource>
-    </resources>
-    <finalName>${project.artifactId}-${project.version}</finalName>
-  </build>
-</project>
diff --git a/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/DsmConfiguration.java b/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/DsmConfiguration.java
deleted file mode 100644
index 92c22ef..0000000
--- a/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/DsmConfiguration.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.common;
-
-import com.webank.wedatasphere.linkis.common.conf.CommonVars;
-
-/**
- * Configuration
- * @author kirkzhou
- * 2020/02/14
- */
-public class DsmConfiguration {
-
-    public static CommonVars<String> DSM_ADMIN_USER_LIST =
-            CommonVars.apply("wds.linkis.server.dsm.admin.users", "");
-
-
-}
diff --git a/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/ServiceErrorCode.java b/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/ServiceErrorCode.java
deleted file mode 100644
index 7647f18..0000000
--- a/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/ServiceErrorCode.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.common;
-
-import com.webank.wedatasphere.linkis.common.conf.CommonVars;
-
-/**
- * Store error code map
- * @author kirkzhou
- * 2020/02/11
- */
-public class ServiceErrorCode {
-
-    public static CommonVars<Integer> TRANSFORM_FORM_ERROR =
-            CommonVars.apply("wds.linkis.server.dsm.error-code.transform", 99987);
-
-    public static CommonVars<Integer> BML_SERVICE_ERROR =
-            CommonVars.apply("wds.linkis.server.dsm.error-code.bml", 99982);
-
-    public static CommonVars<Integer> REMOTE_METADATA_SERVICE_ERROR =
-            CommonVars.apply("wds.linkis.server.dsm.error-code.metadata", 99983);
-
-    public static CommonVars<Integer> PARAM_VALIDATE_ERROR =
-            CommonVars.apply("wds.linkis.server.dsm.error-code.param-validate", 99986);
-}
diff --git a/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/domain/DataSource.java b/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/domain/DataSource.java
deleted file mode 100644
index e35d73a..0000000
--- a/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/domain/DataSource.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.common.domain;
-
-import com.webank.wedatasphere.linkis.datasourcemanager.common.util.json.Json;
-import org.apache.commons.lang.StringUtils;
-import org.codehaus.jackson.annotate.JsonIgnore;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-import java.util.*;
-
-/**
- * Store the data source information
- * @author kirkzhou
- * 2020/02/11
- */
-@JsonSerialize(include= JsonSerialize.Inclusion.NON_EMPTY)
-@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler"}, ignoreUnknown = true)
-public class DataSource {
-
-    private Long id;
-
-    /**
-     * Data source name
-     */
-    @NotNull
-    private String dataSourceName;
-
-    /**
-     * Data source description
-     */
-    @Size(min = 0, max = 200)
-    private String dataSourceDesc;
-
-    /**
-     * ID of data source type
-     */
-    @NotNull
-    private Long dataSourceTypeId;
-
-    /**
-     * Identify from creator
-     */
-    private String createIdentify;
-
-    /**
-     * System name from creator
-     */
-    @NotNull
-    private String createSystem;
-    /**
-     * Connection parameters
-     */
-    private Map<String, Object> connectParams = new HashMap<>();
-    /**
-     * Parameter JSON string
-     */
-    @JsonIgnore
-    private String parameter;
-
-    /**
-     * ID of data source environment
-     */
-    private Long dataSourceEnvId;
-
-    /**
-     * Create time
-     */
-    private Date createTime;
-
-    /**
-     * Modify time
-     */
-    private Date modifyTime;
-
-    /**
-     * Modify user
-     */
-    private String modifyUser;
-
-    private String createUser;
-
-    /**
-     * Data source type entity
-     */
-    private DataSourceType dataSourceType;
-
-    /**
-     * Data source env
-     */
-    private DataSourceEnv dataSourceEnv;
-
-    @JsonIgnore
-    private List<DataSourceParamKeyDefinition> keyDefinitions = new ArrayList<>();
-
-    public DataSource(){
-        this.createTime = Calendar.getInstance().getTime();
-    }
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public String getDataSourceName() {
-        return dataSourceName;
-    }
-
-    public void setDataSourceName(String dataSourceName) {
-        this.dataSourceName = dataSourceName;
-    }
-
-    public String getDataSourceDesc() {
-        return dataSourceDesc;
-    }
-
-    public void setDataSourceDesc(String dataSourceDesc) {
-        this.dataSourceDesc = dataSourceDesc;
-    }
-
-    public Long getDataSourceTypeId() {
-        return dataSourceTypeId;
-    }
-
-    public void setDataSourceTypeId(Long dataSourceTypeId) {
-        this.dataSourceTypeId = dataSourceTypeId;
-    }
-
-    public String getCreateIdentify() {
-        return createIdentify;
-    }
-
-    public void setCreateIdentify(String createIdentify) {
-        this.createIdentify = createIdentify;
-    }
-
-    public String getCreateSystem() {
-        return createSystem;
-    }
-
-    public void setCreateSystem(String createSystem) {
-        this.createSystem = createSystem;
-    }
-
-    public String getParameter() {
-        return parameter;
-    }
-
-    public void setParameter(String parameter) {
-        this.parameter = parameter;
-    }
-
-    public Long getDataSourceEnvId() {
-        return dataSourceEnvId;
-    }
-
-    public void setDataSourceEnvId(Long dataSourceEnvId) {
-        this.dataSourceEnvId = dataSourceEnvId;
-    }
-
-    public Date getCreateTime() {
-        return createTime;
-    }
-
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
-
-    public Date getModifyTime() {
-        return modifyTime;
-    }
-
-    public void setModifyTime(Date modifyTime) {
-        this.modifyTime = modifyTime;
-    }
-
-    public Map<String, Object> getConnectParams() {
-        if(connectParams.isEmpty() && StringUtils.isNotBlank(parameter)){
-            connectParams.putAll(Objects.requireNonNull(Json.fromJson(parameter, Map.class)));
-        }
-        return connectParams;
-    }
-
-    public void setConnectParams(Map<String, Object> connectParams) {
-        this.connectParams = connectParams;
-    }
-
-    public String getCreateUser() {
-        return createUser;
-    }
-
-    public void setCreateUser(String createUser) {
-        this.createUser = createUser;
-    }
-
-    public String getModifyUser() {
-        return modifyUser;
-    }
-
-    public void setModifyUser(String modifyUser) {
-        this.modifyUser = modifyUser;
-    }
-
-    public DataSourceType getDataSourceType() {
-        return dataSourceType;
-    }
-
-    public void setDataSourceType(DataSourceType dataSourceType) {
-        this.dataSourceType = dataSourceType;
-    }
-
-    public DataSourceEnv getDataSourceEnv() {
-        return dataSourceEnv;
-    }
-
-    public void setDataSourceEnv(DataSourceEnv dataSourceEnv) {
-        this.dataSourceEnv = dataSourceEnv;
-    }
-
-    public List<DataSourceParamKeyDefinition> getKeyDefinitions() {
-        return keyDefinitions;
-    }
-
-    public void setKeyDefinitions(List<DataSourceParamKeyDefinition> keyDefinitions) {
-        this.keyDefinitions = keyDefinitions;
-    }
-}
diff --git a/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/domain/DataSourceEnv.java b/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/domain/DataSourceEnv.java
deleted file mode 100644
index 575d246..0000000
--- a/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/domain/DataSourceEnv.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.common.domain;
-
-import com.webank.wedatasphere.linkis.datasourcemanager.common.util.json.Json;
-import org.apache.commons.lang.StringUtils;
-import org.codehaus.jackson.annotate.JsonIgnore;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-import java.util.*;
-
-/**
- * Store the data source environment information
- * @author kirkzhou
- * 2020/02/11
- */
-@JsonSerialize(include= JsonSerialize.Inclusion.NON_EMPTY)
-@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler"}, ignoreUnknown = true)
-public class DataSourceEnv {
-
-    private Long id;
-    /**
-     * Environment name
-     */
-    @NotNull
-    private String envName;
-
-    /**
-     * Environment description
-     */
-    @Size(min = 0, max = 200)
-    private String envDesc;
-
-    /**
-     * ID of data source type
-     */
-    @NotNull
-    private Long dataSourceTypeId;
-
-    private DataSourceType dataSourceType;
-    /**
-     * Connection parameters for environment
-     */
-    private Map<String, Object> connectParams = new HashMap<>();
-
-    /**
-     * Parameter JSON string
-     */
-    @JsonIgnore
-    private String parameter;
-
-    /**
-     * Create time
-     */
-    private Date createTime;
-
-    /**
-     * Creator
-     */
-    private String createUser;
-
-    /**
-     * Modify time
-     */
-    private Date modifyTime;
-
-    /**
-     * Modify user
-     */
-    private String modifyUser;
-
-    @JsonIgnore
-    private List<DataSourceParamKeyDefinition> keyDefinitions = new ArrayList<>();
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public String getEnvName() {
-        return envName;
-    }
-
-    public void setEnvName(String envName) {
-        this.envName = envName;
-    }
-
-    public String getEnvDesc() {
-        return envDesc;
-    }
-
-    public void setEnvDesc(String envDesc) {
-        this.envDesc = envDesc;
-    }
-
-    public Map<String, Object> getConnectParams() {
-        if(connectParams.isEmpty() && StringUtils.isNotBlank(parameter)){
-            connectParams.putAll(Objects.requireNonNull(Json.fromJson(parameter, Map.class)));
-        }
-        return connectParams;
-    }
-
-    public void setConnectParams(Map<String, Object> connectParams) {
-        this.connectParams = connectParams;
-    }
-
-    public String getParameter() {
-        return parameter;
-    }
-
-    public void setParameter(String parameter) {
-        this.parameter = parameter;
-    }
-
-    public Date getCreateTime() {
-        return createTime;
-    }
-
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
-
-    public String getCreateUser() {
-        return createUser;
-    }
-
-    public void setCreateUser(String createUser) {
-        this.createUser = createUser;
-    }
-
-    public Date getModifyTime() {
-        return modifyTime;
-    }
-
-    public void setModifyTime(Date modifyTime) {
-        this.modifyTime = modifyTime;
-    }
-
-    public String getModifyUser() {
-        return modifyUser;
-    }
-
-    public void setModifyUser(String modifyUser) {
-        this.modifyUser = modifyUser;
-    }
-
-    public Long getDataSourceTypeId() {
-        return dataSourceTypeId;
-    }
-
-    public void setDataSourceTypeId(Long dataSourceTypeId) {
-        this.dataSourceTypeId = dataSourceTypeId;
-    }
-
-    public List<DataSourceParamKeyDefinition> getKeyDefinitions() {
-        return keyDefinitions;
-    }
-
-    public void setKeyDefinitions(List<DataSourceParamKeyDefinition> keyDefinitions) {
-        this.keyDefinitions = keyDefinitions;
-    }
-
-    public DataSourceType getDataSourceType() {
-        return dataSourceType;
-    }
-
-    public void setDataSourceType(DataSourceType dataSourceType) {
-        this.dataSourceType = dataSourceType;
-    }
-}
diff --git a/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/domain/DataSourceParamKeyDefinition.java b/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/domain/DataSourceParamKeyDefinition.java
deleted file mode 100644
index 6b8360c..0000000
--- a/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/domain/DataSourceParamKeyDefinition.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.common.domain;
-
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import java.io.InputStream;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Parameter key definition for data source type
- * @author kirkzhou
- * 2020/02/11
- */
-@JsonSerialize(include= JsonSerialize.Inclusion.NON_EMPTY)
-@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler"}, ignoreUnknown = true)
-public class DataSourceParamKeyDefinition {
-    /**
-     * Key-value type
-     */
-    public enum ValueType{
-        /**
-         * Email format
-         */
-        EMAIL(String.class),
-        /**
-         * String
-         */
-        TEXT(String.class),
-        /**
-         * Long
-         */
-        NUMBER(Long.class),
-        /**
-         * SELECT
-         */
-        SELECT(String.class),
-        /**
-         * List
-         */
-        LIST(List.class),
-        /**
-         * Map
-         */
-        MAP(Map.class),
-        /**
-         * RADIO
-         */
-        RADIO(String.class),
-        /**
-         * Password
-         */
-        PASSWORD(String.class),
-        /**
-         * DateTime
-         */
-        DATE(Date.class),
-        /**
-         * File
-         */
-        FILE(InputStream .class);
-        Class<?> type;
-        ValueType(Class<?> type){
-            this.type = type;
-        }
-        public Class<?> getJavaType(){
-            return this.type;
-        }
-    }
-
-    public enum Scope{
-        /**
-         * Env SCOPE
-         */
-        ENV,
-    }
-    /**
-     * Definition id
-     */
-    private Long id;
-
-    /**
-     * Key name
-     */
-    private String key;
-
-    /**
-     * Definition description
-     */
-    private String description;
-
-    /**
-     * Option name
-     */
-    private String name;
-
-    /**
-     * Default value
-     */
-    private String defaultValue;
-
-    /**
-     * Value type
-     */
-    private ValueType valueType;
-    /**
-     * Scope
-     */
-    private Scope scope;
-    /**
-     * If the definition is required
-     */
-    private boolean require;
-    /**
-     * Value regex
-     */
-    private String valueRegex;
-
-    /**
-     * Reference id
-     */
-    private Long refId;
-
-    /**
-     * Reference value
-     */
-    private String refValue;
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public String getKey() {
-        return key;
-    }
-
-    public void setKey(String key) {
-        this.key = key;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getDefaultValue() {
-        return defaultValue;
-    }
-
-    public void setDefaultValue(String defaultValue) {
-        this.defaultValue = defaultValue;
-    }
-
-    public ValueType getValueType() {
-        return valueType;
-    }
-
-    public void setValueType(ValueType valueType) {
-        this.valueType = valueType;
-    }
-
-    public String getValueRegex() {
-        return valueRegex;
-    }
-
-    public void setValueRegex(String valueRegex) {
-        this.valueRegex = valueRegex;
-    }
-
-    public boolean isRequire() {
-        return require;
-    }
-
-    public void setRequire(boolean require) {
-        this.require = require;
-    }
-
-    public Scope getScope() {
-        return scope;
-    }
-
-    public void setScope(Scope scope) {
-        this.scope = scope;
-    }
-
-    public Long getRefId() {
-        return refId;
-    }
-
-    public void setRefId(Long refId) {
-        this.refId = refId;
-    }
-
-    public String getRefValue() {
-        return refValue;
-    }
-
-    public void setRefValue(String refValue) {
-        this.refValue = refValue;
-    }
-
-}
diff --git a/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/domain/DataSourceType.java b/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/domain/DataSourceType.java
deleted file mode 100644
index c273eac..0000000
--- a/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/domain/DataSourceType.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.common.domain;
-
-
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-/**
- * Data source type entity
- * @author kirkzhou
- * 2020/02/11
- */
-@JsonSerialize(include= JsonSerialize.Inclusion.NON_EMPTY)
-@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler"}, ignoreUnknown = true)
-public class DataSourceType {
-
-    private String id;
-    /**
-     * Icon class
-     */
-    private String icon;
-
-    /**
-     * Description
-     */
-    private String description;
-
-    /**
-     * Name
-     */
-    private String name;
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    public String getIcon() {
-        return icon;
-    }
-
-    public void setIcon(String icon) {
-        this.icon = icon;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-}
diff --git a/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/util/CryptoUtils.java b/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/util/CryptoUtils.java
deleted file mode 100644
index 7b2ae4a..0000000
--- a/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/util/CryptoUtils.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.common.util;
-
-import org.apache.commons.codec.binary.Base64;
-import org.apache.commons.lang.StringUtils;
-
-import java.io.*;
-import java.security.MessageDigest;
-
-/**
- * @author kirkzhou
- * 用于密码的加密解密
- *
- */
-public class CryptoUtils {
-    private CryptoUtils(){
-    }
-    /**
-     * 序列化对象为String字符
-     *
-     * @param o Object
-     * @return String
-     * @throws Exception
-     */
-    public static String object2String(Serializable o) {
-        try {
-            ByteArrayOutputStream bos = new ByteArrayOutputStream();
-            ObjectOutputStream oos = new ObjectOutputStream(bos);
-            oos.writeObject(o);
-            oos.flush();
-            oos.close();
-            bos.close();
-            return new String(new Base64().encode(bos.toByteArray()));
-        }catch(Exception e){
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
-     * 反序列化字符串为对象
-     *
-     * @param str String
-     * @return Object
-     * @throws IOException
-     * @throws ClassNotFoundException
-     */
-    public static Object string2Object(String str) {
-        try {
-            ByteArrayInputStream bis = new ByteArrayInputStream(new Base64().decode(str.getBytes()));
-            ObjectInputStream ois = new ObjectInputStream(bis);
-            Object o = ois.readObject();
-            bis.close();
-            ois.close();
-            return o;
-        }catch(Exception e){
-            throw new RuntimeException(e);
-        }
-
-    }
-
-    /**
-     * MD5 encrypt
-     * @param source
-     * @param salt
-     * @param iterator
-     * @return
-     */
-    public static String md5(String source, String salt, int iterator){
-        StringBuilder token = new StringBuilder();
-        try{
-            MessageDigest digest = MessageDigest.getInstance("md5");
-            if(StringUtils.isNotEmpty(salt)){
-                digest.update(salt.getBytes("UTF-8"));
-            }
-            byte[] result = digest.digest(source.getBytes());
-            for(int i = 0; i < iterator - 1; i++){
-                digest.reset();
-                result = digest.digest(result);
-            }
-            for (byte aResult : result) {
-                int temp = aResult & 0xFF;
-                if (temp <= 0xF) {
-                    token.append("0");
-                }
-                token.append(Integer.toHexString(temp));
-            }
-        }catch(Exception e){
-            throw new RuntimeException(e.getMessage());
-        }
-        return token.toString();
-    }
-
-}
diff --git a/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/util/PatternInjectUtils.java b/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/util/PatternInjectUtils.java
deleted file mode 100644
index 30d6dbc..0000000
--- a/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/util/PatternInjectUtils.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.common.util;
-
-import com.webank.wedatasphere.linkis.datasourcemanager.common.util.json.Json;
-import org.apache.commons.lang.StringEscapeUtils;
-import org.apache.commons.lang.StringUtils;
-
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * @author kirkzhou
- * 2018/10/26
- */
-public class PatternInjectUtils {
-
-    private PatternInjectUtils(){
-
-    }
-
-    private static final String PARAMETER_PREFIX = "[#|$]";
-
-    private static final String ASSIGN_SYMBOL = "=";
-
-    private static final Pattern REGEX = Pattern.compile(
-            "(" + ASSIGN_SYMBOL + "?)" +
-                   "("+ PARAMETER_PREFIX + ")" +
-                    "\\{([\\w-]+)[|]?([^}]*)}?"
-    );
-
-    /**
-     * inject pattern
-     * @param template
-     * @param params
-     * @param useDefault use default Value
-     * @return
-     */
-    public static String inject(String template, Object[] params, boolean useDefault, boolean escape, boolean placeholder){
-        Matcher matcher = REGEX.matcher(template);
-        StringBuffer sb = new StringBuffer();
-        int offset = 0;
-        while(matcher.find()){
-            String value = "";
-            String extra = "";
-            if( offset < params.length && null != params[offset] ){
-                Object paramsV = params[offset];
-                if( paramsV instanceof  String || paramsV instanceof Enum ||
-                        paramsV.getClass().isPrimitive() ||
-                        isWrapClass(paramsV.getClass())){
-                    value = escape? StringEscapeUtils.escapeJava(String.valueOf(paramsV))
-                        : String.valueOf(paramsV);
-                }else{
-                    value = Json.toJson(paramsV, null);
-                    value = escape? StringEscapeUtils.escapeJava(value) : value;
-                }
-                if( null != matcher.group(1)
-                        && !"".equals(matcher.group(1))){
-                    extra = matcher.group(1);
-                }
-                offset ++;
-            }else if(null != matcher.group(4) && useDefault){
-                value = escape? StringEscapeUtils.escapeJava(String.valueOf(matcher.group(4)))
-                        : matcher.group(4);
-            }
-            if(StringUtils.isBlank(value) && !useDefault){
-                value = "\"" + (escape?StringEscapeUtils.escapeJava(matcher.group(3))
-                        : matcher.group(3));
-            }else if(!"$".equals(matcher.group(2)) && placeholder){
-                value = "\"" + StringEscapeUtils.escapeJava(value) + "\"";
-            }
-            String result = (extra + value).replace("$", "\\$");
-            matcher.appendReplacement(sb, result);
-        }
-        matcher.appendTail(sb);
-        return sb.toString().replace("\\$","$");
-    }
-    public static String inject(String pattern, Object[] params){
-        return inject(pattern, params, true, true, true);
-    }
-
-    /**
-     * inject pattern
-     * @param template
-     * @param params
-     * @param useDefault
-     * @return
-     */
-    public static String inject(String template, Map<String, Object> params, boolean useDefault, boolean escape, boolean placeholder){
-        Matcher matcher = REGEX.matcher(template);
-        StringBuffer sb = new StringBuffer();
-        //will be more faster?
-        while(matcher.find()){
-            String injected = matcher.group(3);
-            if(null !=  injected  && !"".equals(injected)){
-                int flag = 0;
-                String value = "";
-                String extra = "";
-                for(Map.Entry<String, Object> entry : params.entrySet()){
-                    if(injected.equals(entry.getKey()) && null != entry.getValue()){
-                        Object entryV = entry.getValue();
-                        if(entryV instanceof  String || entryV instanceof Enum ||
-                                entryV.getClass().isPrimitive() ||
-                                isWrapClass(entryV.getClass())){
-                            value = escape? StringEscapeUtils.escapeJava(String.valueOf(entryV))
-                            : String.valueOf(entryV);
-                        }else{
-                            value = Json.toJson(entryV, null);
-                            value = escape? StringEscapeUtils.escapeJava(value) : value;
-                        }
-                        if(null != matcher.group(1)
-                                || !"".equals(matcher.group(1))){
-                            extra = matcher.group(1);
-                        }
-                        flag = 1;
-                        break;
-                    }
-                }
-                if(flag == 0 && null != matcher.group(4) && useDefault){
-                    value = escape? StringEscapeUtils.escapeJava(String.valueOf(matcher.group(4)))
-                    : matcher.group(4);
-                }
-                if(StringUtils.isBlank(value) && !useDefault){
-                    value = "\"*#{" + (escape?StringEscapeUtils.escapeJava(matcher.group(3))
-                            : matcher.group(3)) + "}*\"";
-                } else if(!"$".equals(matcher.group(2)) && placeholder){
-                    value = "\"" + StringEscapeUtils.escapeJava(value) + "\"";
-                }
-                String result = (extra + value).replace("$", "\\$");
-                matcher.appendReplacement(sb, result);
-            }
-        }
-        matcher.appendTail(sb);
-        String print = sb.toString();
-        return print.replace("\\$","$").replace("","");
-    }
-
-    public static String injectPattern(String template, String valuePattern){
-        Matcher matcher = REGEX.matcher(template);
-        StringBuffer sb  = new StringBuffer();
-        while(matcher.find()){
-            String extra = matcher.group(1);
-            String value = StringEscapeUtils.escapeJava(matcher.group(3));
-            value = (extra + value.replaceAll("[\\s\\S]+", valuePattern))
-                    .replace("$", "\\$");
-            matcher.appendReplacement(sb, value);
-        }
-        matcher.appendTail(sb);
-        return sb.toString().replace("\\$", "$");
-    }
-
-    public static String inject(String template, Map<String, Object> params){
-        return inject(template, params, true, true, true);
-    }
-
-
-    private static boolean isWrapClass(Class clz){
-        try{
-            return ((Class)clz.getField("TYPE").get(null)).isPrimitive();
-        }catch(Exception e){
-            return false;
-        }
-    }
-
-}
diff --git a/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/util/json/Json.java b/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/util/json/Json.java
deleted file mode 100644
index 9becb83..0000000
--- a/datasource/datasourcemanager/common/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/common/util/json/Json.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.common.util.json;
-
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.*;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-
-/**
- * @author kirkzhou
- * Json utils
- * 2018/9/3
- */
-public class Json {
-    private static final String PREFIX = "[";
-    private static final String SUFFIX = "]";
-    private static final Logger logger = LoggerFactory.getLogger(Json.class);
-
-    private static ObjectMapper mapper;
-
-    static{
-        mapper = new ObjectMapper();
-        mapper.configure(JsonParser.Feature.ALLOW_COMMENTS, true);
-        mapper.configure(JsonParser.Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);
-        mapper.configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true);
-        mapper.configure(DeserializationFeature.READ_ENUMS_USING_TO_STRING, true);
-        mapper.configure(SerializationFeature.WRITE_ENUMS_USING_TO_STRING, true);
-        mapper.configure(JsonParser.Feature.ALLOW_UNQUOTED_CONTROL_CHARS, true);
-        //empty beans allowed
-        mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
-        //ignore unknown properties
-        mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
-        //cancel to scape non ascii
-        mapper.configure(JsonGenerator.Feature.ESCAPE_NON_ASCII, false);
-    }
-    private Json(){}
-
-    @SuppressWarnings("unchecked")
-    public static <T> T fromJson(String json, Class<?> clazz, Class<?>... parameters){
-        if(StringUtils.isNotBlank(json)){
-            try{
-                if(parameters.length > 0){
-                    return (T)mapper.readValue(json, mapper.getTypeFactory().constructParametricType(clazz, parameters));
-                }
-                if(json.startsWith(PREFIX)
-                    && json.endsWith(SUFFIX)){
-                    JavaType javaType = mapper.getTypeFactory()
-                            .constructParametricType(ArrayList.class, clazz);
-                    return mapper.readValue(json, javaType);
-                }
-                return (T)mapper.readValue(json, clazz);
-            } catch (Exception e) {
-                logger.info(e.getLocalizedMessage());
-                throw new RuntimeException(e);
-            }
-        }
-        return null;
-    }
-
-    public static <T> T fromJson(InputStream stream, Class<?> clazz, Class<?>... parameters){
-        StringBuilder builder = new StringBuilder();
-        String jsonStr = null;
-        try{
-            BufferedReader reader = new BufferedReader(new InputStreamReader(stream, "UTF-8"));
-            while((jsonStr = reader.readLine()) != null){
-                builder.append(jsonStr);
-            }
-            reader.close();
-        }catch(Exception e){
-            logger.info(e.getLocalizedMessage());
-            throw new RuntimeException(e);
-        }
-        return fromJson(builder.toString(), clazz, parameters);
-    }
-
-    public static String toJson(Object obj, Class<?> model){
-        ObjectWriter writer = mapper.writer();
-        if(null != obj){
-            try{
-                if(null != model){
-                    writer = writer.withView(model);
-                }
-                return writer.writeValueAsString(obj);
-            } catch (JsonProcessingException e) {
-                logger.info(e.getLocalizedMessage());
-                throw new RuntimeException(e);
-            }
-        }
-        return null;
-    }
-
-}
diff --git a/datasource/datasourcemanager/common/src/main/scala/com/webank/wedatasphere/linkis/datasourcemanager/common/protocol/DsmQueryProtocol.scala b/datasource/datasourcemanager/common/src/main/scala/com/webank/wedatasphere/linkis/datasourcemanager/common/protocol/DsmQueryProtocol.scala
deleted file mode 100644
index 455e7dd..0000000
--- a/datasource/datasourcemanager/common/src/main/scala/com/webank/wedatasphere/linkis/datasourcemanager/common/protocol/DsmQueryProtocol.scala
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.common.protocol
-
-import java.util
-
-/**
- * Store error code map
- * @author kirkzhou
- * 2020/02/11
- */
-trait DsmQueryProtocol {
-
-}
-
-/**
- * Query request of Data Source Information
- * @param id
- */
-case class DsInfoQueryRequest(id: String, system: String) extends DsmQueryProtocol
-
-/**
- * Response of parameter map
- * @param params
- */
-case class DsInfoResponse(status: Boolean, dsType: String, params : util.Map[String, Object], creator: String) extends DsmQueryProtocol
-
diff --git a/datasource/datasourcemanager/server/Dockerfile b/datasource/datasourcemanager/server/Dockerfile
deleted file mode 100644
index edda49a..0000000
--- a/datasource/datasourcemanager/server/Dockerfile
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-#  Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM wedatasphere/linkis:emr-base-spark2.4.4
-
-MAINTAINER wedatasphere@webank.com
-
-RUN yum install -y unzip
-WORKDIR /opt/linkis
-
-COPY target/linkis-dsm-server.zip /opt/linkis
-RUN unzip linkis-dsm-server.zip
-
-WORKDIR /opt/linkis/linkis-dsm-server/bin
-ENTRYPOINT ["/opt/linkis/linkis-dsm-server/bin/startup.sh"]
diff --git a/datasource/datasourcemanager/server/conf/application.yml b/datasource/datasourcemanager/server/conf/application.yml
deleted file mode 100644
index 8e9cb3a..0000000
--- a/datasource/datasourcemanager/server/conf/application.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-server:
-  port: 8196
-spring:
-  application:
-    name: dsm-server
-
-eureka:
-  client:
-    serviceUrl:
-      defaultZone: ${eurekaurl}
-    registry-fetch-interval-seconds: 5
-  instance:
-    lease-renewal-interval-in-second: 5
-    lease-expiration-duration-in-second: 10
-    prefer-ip-address: true
-    instance-id: ${spring.cloud.client.ip-address}:${server.port}
-    metadata-map:
-      test: wedatasphere
-
-
-management:
-  endpoints:
-    web:
-      exposure:
-        include: refresh,info
-logging:
-  config: classpath:log4j2.xml
-
-
-
diff --git a/datasource/datasourcemanager/server/pom.xml b/datasource/datasourcemanager/server/pom.xml
deleted file mode 100644
index efdf6ed..0000000
--- a/datasource/datasourcemanager/server/pom.xml
+++ /dev/null
@@ -1,191 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  ~ Copyright 2019 WeBank
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <artifactId>linkis</artifactId>
-    <groupId>com.webank.wedatasphere.linkis</groupId>
-    <version>0.11.0</version>
-    <relativePath>../../../pom.xml</relativePath>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-
-  <artifactId>linkis-datasourcemanager-server</artifactId>
-
-
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-module</artifactId>
-      <exclusions>
-        <exclusion>
-          <artifactId>asm</artifactId>
-          <groupId>org.ow2.asm</groupId>
-        </exclusion>
-        <exclusion>
-          <artifactId>hk2-api</artifactId>
-          <groupId>org.glassfish.hk2</groupId>
-        </exclusion>
-        <exclusion>
-          <artifactId>jersey-common</artifactId>
-          <groupId>org.glassfish.jersey.core</groupId>
-        </exclusion>
-      </exclusions>
-      <scope>provided</scope>
-    </dependency>
-    <!-- data source manager common dependency-->
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-datasourcemanager-common</artifactId>
-      <exclusions>
-        <exclusion>
-          <artifactId>asm</artifactId>
-          <groupId>org.ow2.asm</groupId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <!--jersey bean validation-->
-    <dependency>
-      <groupId>org.glassfish.jersey.ext</groupId>
-      <artifactId>jersey-bean-validation</artifactId>
-      <version>${jersey.version}</version>
-      <exclusions>
-        <exclusion>
-          <artifactId>javax.ws.rs-api</artifactId>
-          <groupId>javax.ws.rs</groupId>
-        </exclusion>
-        <exclusion>
-          <artifactId>hk2-locator</artifactId>
-          <groupId>org.glassfish.hk2</groupId>
-        </exclusion>
-        <exclusion>
-          <artifactId>hk2-api</artifactId>
-          <groupId>org.glassfish.hk2</groupId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <!--bml client-->
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-bmlclient</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-mybatis</artifactId>
-    </dependency>
-    <!--rpc-->
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-cloudRPC</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <!--Metadata common-->
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-metadatamanager-common</artifactId>
-    </dependency>
-    <dependency>
-      <artifactId>hk2-api</artifactId>
-      <groupId>org.glassfish.hk2</groupId>
-      <version>2.4.0-b34</version>
-    </dependency>
-    <dependency>
-      <groupId>org.json4s</groupId>
-      <artifactId>json4s-jackson_2.11</artifactId>
-      <version>${json4s.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.json4s</groupId>
-      <artifactId>json4s-core_2.11</artifactId>
-      <version>${json4s.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.json4s</groupId>
-      <artifactId>json4s-ast_2.11</artifactId>
-      <version>${json4s.version}</version>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-      </plugin>
-
-      <plugin>
-        <groupId>net.alchim31.maven</groupId>
-        <artifactId>scala-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <version>2.3</version>
-        <inherited>false</inherited>
-        <executions>
-          <execution>
-            <id>make-assembly</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <configuration>
-              <descriptors>
-                <descriptor>src/main/assembly/distribution.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </execution>
-        </executions>
-        <configuration>
-          <skipAssembly>false</skipAssembly>
-          <finalName>linkis-dsm-server</finalName>
-          <appendAssemblyId>false</appendAssemblyId>
-          <attach>false</attach>
-          <descriptors>
-            <descriptor>src/main/assembly/distribution.xml</descriptor>
-          </descriptors>
-        </configuration>
-      </plugin>
-    </plugins>
-    <resources>
-      <resource>
-        <directory>src/main/java</directory>
-        <includes>
-          <include>**/*.xml</include>
-        </includes>
-      </resource>
-      <resource>
-        <directory>src/main/resources</directory>
-        <excludes>
-          <exclude>**/*.properties</exclude>
-          <exclude>**/application.yml</exclude>
-          <exclude>**/bootstrap.yml</exclude>
-          <exclude>**/log4j2.xml</exclude>
-        </excludes>
-      </resource>
-    </resources>
-    <finalName>${project.artifactId}-${project.version}</finalName>
-  </build>
-</project>
diff --git a/datasource/datasourcemanager/server/pom_k8s.xml b/datasource/datasourcemanager/server/pom_k8s.xml
deleted file mode 100644
index 2eefaa0..0000000
--- a/datasource/datasourcemanager/server/pom_k8s.xml
+++ /dev/null
@@ -1,209 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  ~ Copyright 2019 WeBank
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <artifactId>linkis</artifactId>
-    <groupId>com.webank.wedatasphere.linkis</groupId>
-    <version>0.11.0</version>
-    <relativePath>../../../pom.xml</relativePath>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-
-  <artifactId>linkis-datasourcemanager-server</artifactId>
-
-
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-module</artifactId>
-      <exclusions>
-        <exclusion>
-          <artifactId>asm</artifactId>
-          <groupId>org.ow2.asm</groupId>
-        </exclusion>
-        <exclusion>
-          <artifactId>hk2-api</artifactId>
-          <groupId>org.glassfish.hk2</groupId>
-        </exclusion>
-        <exclusion>
-          <artifactId>jersey-common</artifactId>
-          <groupId>org.glassfish.jersey.core</groupId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <!-- data source manager common dependency-->
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-datasourcemanager-common</artifactId>
-      <exclusions>
-        <exclusion>
-          <artifactId>asm</artifactId>
-          <groupId>org.ow2.asm</groupId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <!--jersey bean validation-->
-    <dependency>
-      <groupId>org.glassfish.jersey.ext</groupId>
-      <artifactId>jersey-bean-validation</artifactId>
-      <version>${jersey.version}</version>
-      <exclusions>
-        <exclusion>
-          <artifactId>javax.ws.rs-api</artifactId>
-          <groupId>javax.ws.rs</groupId>
-        </exclusion>
-        <exclusion>
-          <artifactId>hk2-locator</artifactId>
-          <groupId>org.glassfish.hk2</groupId>
-        </exclusion>
-        <exclusion>
-          <artifactId>hk2-api</artifactId>
-          <groupId>org.glassfish.hk2</groupId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <!--bml client-->
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-bmlclient</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-mybatis</artifactId>
-    </dependency>
-    <!--rpc-->
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-cloudRPC</artifactId>
-    </dependency>
-    <!--Metadata common-->
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-metadatamanager-common</artifactId>
-    </dependency>
-    <dependency>
-      <artifactId>hk2-api</artifactId>
-      <groupId>org.glassfish.hk2</groupId>
-      <version>2.4.0-b34</version>
-    </dependency>
-    <dependency>
-      <groupId>org.json4s</groupId>
-      <artifactId>json4s-jackson_2.11</artifactId>
-      <version>${json4s.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.json4s</groupId>
-      <artifactId>json4s-core_2.11</artifactId>
-      <version>${json4s.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.json4s</groupId>
-      <artifactId>json4s-ast_2.11</artifactId>
-      <version>${json4s.version}</version>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-      </plugin>
-
-      <plugin>
-        <groupId>net.alchim31.maven</groupId>
-        <artifactId>scala-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <version>2.3</version>
-        <inherited>false</inherited>
-        <executions>
-          <execution>
-            <id>make-assembly</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <configuration>
-              <descriptors>
-                <descriptor>src/main/assembly/distribution.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </execution>
-        </executions>
-        <configuration>
-          <skipAssembly>false</skipAssembly>
-          <finalName>linkis-dsm-server</finalName>
-          <appendAssemblyId>false</appendAssemblyId>
-          <attach>false</attach>
-          <descriptors>
-            <descriptor>src/main/assembly/distribution.xml</descriptor>
-          </descriptors>
-        </configuration>
-      </plugin>
-<!--      <plugin>-->
-<!--          <groupId>com.spotify</groupId>-->
-<!--          <artifactId>dockerfile-maven-plugin</artifactId>-->
-<!--          <version>1.3.4</version>-->
-<!--          <executions>-->
-<!--              <execution>-->
-<!--                  <id>default</id>-->
-<!--                  <phase>package</phase>-->
-<!--                  <goals>-->
-<!--                      <goal>build</goal>-->
-<!--                      <goal>tag</goal>-->
-<!--                  </goals>-->
-<!--              </execution>-->
-<!--          </executions>-->
-<!--          <configuration>-->
-<!--              <repository>${harbor.reposity}/linkis-dsm-server</repository>-->
-<!--              <tag>${linkis.version}</tag>-->
-<!--              <dockerInfoDirectory>${basedir}/dockerinfo</dockerInfoDirectory>-->
-<!--          </configuration>-->
-<!--      </plugin>-->
-    </plugins>
-    <resources>
-      <resource>
-        <directory>src/main/java</directory>
-        <includes>
-          <include>**/*.xml</include>
-        </includes>
-      </resource>
-      <resource>
-        <directory>src/main/resources</directory>
-        <!--<excludes>-->
-          <!--<exclude>**/*.properties</exclude>-->
-          <!--<exclude>**/application.yml</exclude>-->
-          <!--<exclude>**/bootstrap.yml</exclude>-->
-          <!--<exclude>**/log4j2.xml</exclude>-->
-        <!--</excludes>-->
-      </resource>
-    </resources>
-    <finalName>${project.artifactId}-${project.version}</finalName>
-  </build>
-</project>
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/dao/DataSourceDao.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/dao/DataSourceDao.java
deleted file mode 100644
index b14fa32..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/dao/DataSourceDao.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.dao;
-
-
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSource;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.vo.DataSourceVo;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * Data source dao
- * @author dennyzhou-zdx
- * 2020/02/14
- */
-public interface DataSourceDao {
-
-    /**
-     * Insert
-     * @param dataSource data source
-     */
-    void  insertOne(DataSource dataSource);
-
-    /**
-     * View detail
-     * @param dataSourceId data source id
-     * @param createSystem system name
-     * @return data source entity
-     */
-    DataSource selectOneDetail(@Param("dataSourceId") Long dataSourceId,
-                               @Param("createSystem") String createSystem);
-
-    /**
-     * View normal
-     * @param dataSourceId data source id
-     * @param createSystem system name
-     * @return data source entity
-     */
-    DataSource selectOne(@Param("dataSourceId") Long dataSourceId,
-                         @Param("createSystem") String createSystem);
-    /**
-     * Delete One
-     * @param dataSourceId data source id
-     * @param createSystem create system
-     * @return affect row
-     */
-    int removeOne(@Param("dataSourceId")Long dataSourceId,
-                  @Param("createSystem")String createSystem);
-
-
-    /**
-     * Update one
-     * @param updatedOne updated one
-     */
-    void updateOne(DataSource updatedOne);
-
-    /**
-     * Page of query
-     * @param dataSourceVo data source view entity
-     * @return query list
-     */
-    List<DataSource> selectByPageVo(DataSourceVo dataSourceVo);
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/dao/DataSourceEnvDao.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/dao/DataSourceEnvDao.java
deleted file mode 100644
index 247c419..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/dao/DataSourceEnvDao.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.dao;
-
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSourceEnv;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.vo.DataSourceEnvVo;
-
-import java.util.List;
-
-/**
- * Data source dao
- * @author dennyzhou-zdx
- * 2020/02/14
- */
-public interface DataSourceEnvDao {
-
-    /**
-     * View details of data source environment information
-     * @param dataSourceEnvId env id
-     * @return
-     */
-    DataSourceEnv selectOneDetail(Long dataSourceEnvId);
-
-    /**
-     * Insert one
-     * @param dataSourceEnv environment
-     */
-    void insertOne(DataSourceEnv dataSourceEnv);
-
-    /**
-     * List all by type id
-     * @param dataSourceTypeId type id
-     * @return
-     */
-    List<DataSourceEnv> listByTypeId(Long dataSourceTypeId);
-
-    /**
-     * Remove one
-     * @param envId env id
-     * @return
-     */
-    int removeOne(Long envId);
-
-    /**
-     * Update one
-     * @param updatedOne
-     */
-    void updateOne(DataSourceEnv updatedOne);
-
-    /**
-     * Page query
-     * @param dataSourceEnvVo  environment view entity
-     * @return
-     */
-    List<DataSourceEnv> selectByPageVo(DataSourceEnvVo dataSourceEnvVo);
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/dao/DataSourceParamKeyDao.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/dao/DataSourceParamKeyDao.java
deleted file mode 100644
index e6693fb..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/dao/DataSourceParamKeyDao.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.dao;
-
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSourceParamKeyDefinition;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-/**
- *
- * @author dennyzhou-zdx
- * 2020/02/14
- */
-public interface DataSourceParamKeyDao {
-
-    /**
-     * List by data source type id
-     * @param dataSourceTypeId type id
-     * @return
-     */
-    List<DataSourceParamKeyDefinition> listByDataSourceType(Long dataSourceTypeId);
-
-    /**
-     * List by data source type id and scope
-     * @param dataSourceTypeId type id
-     * @param scope scope
-     * @return
-     */
-    List<DataSourceParamKeyDefinition> listByDataSourceTypeAndScope(@Param("dataSourceTypeId")Long dataSourceTypeId,
-                                                                    @Param("scope")DataSourceParamKeyDefinition.Scope scope);
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/dao/DataSourceTypeDao.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/dao/DataSourceTypeDao.java
deleted file mode 100644
index 94a7b6a..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/dao/DataSourceTypeDao.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.dao;
-
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSourceType;
-
-import java.util.List;
-/**
- * @author dennyzhou-zdx
- * 2020/02/14
- */
-public interface DataSourceTypeDao {
-    /**
-     * Get all types
-     * @return type entity list
-     */
-    List<DataSourceType> getAllTypes();
-
-    /**
-     * View
-     * @param typeId
-     * @return
-     */
-    DataSourceType selectOne(Long typeId);
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/dao/DataSourceTypeEnvDao.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/dao/DataSourceTypeEnvDao.java
deleted file mode 100644
index 83e6ae4..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/dao/DataSourceTypeEnvDao.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.dao;
-
-import org.apache.ibatis.annotations.Param;
-
-/**
- * @author dennyzhu-zdx
- * 2020/02/14
- */
-public interface DataSourceTypeEnvDao {
-
-    /**
-     * Insert relation between type and environment
-     * @param dataSourceTypeId data source type
-     * @param dataSourceEnvId data source env
-     */
-    void insertRelation(@Param("dataSourceTypeId") Long dataSourceTypeId,
-                        @Param("dataSourceEnvId") Long dataSourceEnvId);
-
-    /**
-     * Remove relations by environment id
-     * @param envId
-     * @return
-     */
-    int removeRelationsByEnvId(Long envId);
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/formdata/CustomMultiPartFormDataTransformer.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/formdata/CustomMultiPartFormDataTransformer.java
deleted file mode 100644
index 8d1b7ed..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/formdata/CustomMultiPartFormDataTransformer.java
+++ /dev/null
@@ -1,311 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.formdata;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.common.exception.WarnException;
-import com.webank.wedatasphere.linkis.datasourcemanager.common.ServiceErrorCode;
-import org.apache.commons.lang.StringUtils;
-import org.glassfish.jersey.media.multipart.FormDataBodyPart;
-import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
-import org.glassfish.jersey.media.multipart.FormDataMultiPart;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.validation.ConstraintViolation;
-import javax.validation.ConstraintViolationException;
-import javax.validation.ValidationException;
-import javax.validation.Validator;
-import javax.validation.groups.Default;
-import javax.ws.rs.core.MediaType;
-import java.io.ByteArrayInputStream;
-import java.lang.reflect.*;
-import java.util.*;
-
-/**
- * Custom Transformer of multipart form
- * @author alexwu
- * 2020/02/12
- */
-public class CustomMultiPartFormDataTransformer implements MultiPartFormDataTransformer{
-    private static final Logger LOG = LoggerFactory.getLogger(CustomMultiPartFormDataTransformer.class);
-    @Override
-    public <T> T transformToObject(FormDataMultiPart formData, Class<?> clazz,
-                                   Validator beanValidator)
-        throws ValidationException, ErrorException {
-        Field[] fields = clazz.getDeclaredFields();
-        Map<String, Field> objectFieldMap = new HashMap<>();
-        Object object;
-        try {
-            object = clazz.getConstructor().newInstance();
-            //Put the bean fields information into map
-            for (Field field : fields) {
-                objectFieldMap.put(field.getName(), field);
-            }
-            Map<String, List<FormDataBodyPart>> formDataParts = formData.getFields();
-            formDataParts.forEach((partName, bodyParts) -> {
-                List<String> stepFieldNames = Arrays.asList(StringUtils.split(partName.replace("[", ".["), "."));
-                String rootFieldName = stepFieldNames.get(0);
-                Field field = objectFieldMap.get(rootFieldName);
-                if (null != field) {
-                    try {
-                        injectToObject(object, field, stepFieldNames, 0, transformBodyPartToObject(bodyParts));
-                    } catch (Exception e) {
-                        throw new WarnException(ServiceErrorCode.TRANSFORM_FORM_ERROR.getValue(), "Fail to inject request parameter to object, message:[" + e.getMessage() +"]");
-                    }
-                }
-            });
-        }catch(Exception e){
-            LOG.error("Error in transform multipart from: " + e.getMessage());
-            throw new ErrorException(ServiceErrorCode.TRANSFORM_FORM_ERROR.getValue(), "Error in transform multipart from: " + e.getMessage());
-        }
-        if(null != beanValidator){
-            Set<ConstraintViolation<T>> result = beanValidator.validate((T)object, Default.class);
-            if(result.size() > 0){
-                throw new ConstraintViolationException(result);
-            }
-        }
-        return (T)object;
-    }
-
-
-    /**
-     * Transform body parts
-     * @param bodyParts body parts
-     * @return
-     */
-    private Object transformBodyPartToObject(List<FormDataBodyPart> bodyParts){
-        if(bodyParts.size() > 0){
-            Object[] result = new Object[bodyParts.size()];
-            for(int i = 0 ; i < bodyParts.size(); i++){
-                //Get media type
-                FormDataBodyPart bodyPart = bodyParts.get(i);
-                MediaType mediaType = bodyPart.getMediaType();
-                if(mediaType.getType().equals(MediaType.TEXT_PLAIN_TYPE.getType())){
-                    result[i] = bodyPart.getValue();
-                }else {
-                    //Think others as file
-                    FormStreamContent streamContent = new FormStreamContent();
-                    FormDataContentDisposition disposition = bodyPart.getFormDataContentDisposition();
-                    streamContent.setStream(new ByteArrayInputStream(bodyPart.getValueAs(byte[].class)));
-                    streamContent.setFileName(disposition.getFileName());
-                    streamContent.setCreateDate(disposition.getCreationDate());
-                    streamContent.setModifyDate(disposition.getModificationDate());
-                    streamContent.setParameters(disposition.getParameters());
-                    result[i] = streamContent;
-                }
-            }
-            return result.length > 1 ? result : result[0];
-        }
-        return null;
-    }
-
-    /**
-     * Inject value to object's field
-     * @param object object injected
-     * @param field field entity
-     * @param stepFieldNames step field name list
-     * @param step step index
-     * @param value actual value
-     * @throws Exception
-     */
-    private void injectToObject(Object object, Field field,
-                                        List<String> stepFieldNames, int step, Object value) throws Exception {
-        Class<?> fieldType = field.getType();
-        String fieldName = field.getName();
-        if(step + 1 >= stepFieldNames.size()){
-            if(fieldType.equals(String.class) || PrimitiveUtils.isPrimitive(fieldType)){
-                setObjectField(object, field, PrimitiveUtils.primitiveTypeConverse(value, fieldType));
-            } else if (fieldType.equals(Object.class)) {
-                setObjectField(object, field, value);
-            } else {
-                throw new IllegalAccessException("Cannot set value: " + value + " to object field: " + fieldName);
-            }
-        }else if(!PrimitiveUtils.isPrimitive(fieldType)){
-            Object subObject = getObjectField(object, field);
-            if(null == subObject){
-                if(fieldType.equals(Map.class)){
-                    subObject = HashMap.class.getConstructor().newInstance();
-                }else if(fieldType.equals(List.class)){
-                    subObject = ArrayList.class.getConstructor().newInstance();
-                }else {
-                    subObject = fieldType.getConstructor().newInstance();
-                }
-                setObjectField(object, field, subObject);
-            }
-            injectRecurse(subObject, field, stepFieldNames, step + 1, value);
-        }
-
-    }
-
-    /**
-     * Inject value to map structure
-     * @param mapObject map
-     * @param valueType value type
-     * @param stepFieldNames step field name list
-     * @param step step index
-     * @param value actual value
-     * @throws Exception
-     */
-    private void injectToMap(Map mapObject, Class<?> valueType,
-                             List<String> stepFieldNames, int step, Object value) throws Exception{
-        String fieldName = stepFieldNames.get(step);
-        if(step + 1 >= stepFieldNames.size()){
-            if(valueType.equals(String.class) || PrimitiveUtils.isPrimitive(valueType)){
-                mapObject.put(fieldName, PrimitiveUtils.primitiveTypeConverse(value, valueType));
-            }else if (valueType.equals(Object.class)){
-                mapObject.put(fieldName, value);
-            }else{
-                throw new IllegalAccessException("Cannot set value: " + value + " to map: " + stepFieldNames.get(step - 1));
-            }
-        }
-    }
-
-    /**
-     * Inject value to list structure
-     * @param listObject list object
-     * @param elementType element type
-     * @param stepFieldNames step field name list
-     * @param step step index
-     * @param value value
-     * @throws Exception
-     */
-    private void injectToList(List listObject, Class<?> elementType,
-                              List<String> stepFieldNames, int step, Object value) throws Exception{
-        String fieldName = stepFieldNames.get(step);
-        if(step + 1 >= stepFieldNames.size() && fieldName.matches("\\[\\d+]")){
-            int index = Integer.parseInt(fieldName.substring(1, fieldName.length() - 1));
-            //expand list
-            int expand = index + 1 - listObject.size();
-            while (expand-- > 0) {
-                listObject.add(null);
-            }
-            if(elementType.equals(String.class) || PrimitiveUtils.isPrimitive(elementType)){
-                listObject.set(index, PrimitiveUtils.primitiveTypeConverse(value, elementType));
-            }else if (elementType.equals(Object.class)){
-                listObject.set(index, value);
-            }else{
-                throw new IllegalAccessException("Cannot set value: " + value + " to array: " + stepFieldNames.get(step - 1));
-            }
-        }
-    }
-
-    /**
-     * Inject recursively
-     * @param subObject sub object
-     * @param field sub object's field
-     * @param stepFieldNames step field name list
-     * @param step step index
-     * @param value actual value
-     * @throws Exception
-     */
-    private void injectRecurse(Object subObject, Field field,
-                               List<String> stepFieldNames, int step, Object value) throws Exception{
-        Class<?> fieldType = field.getType();
-        if(fieldType.equals(Map.class)){
-            Class<?>[] generic = getGenericTypes(field);
-            if(null == generic || generic[0].equals(String.class)){
-                Class<?> valueType = null == generic ? String.class : generic[1];
-                injectToMap((Map) subObject, valueType,  stepFieldNames, step, value);
-            }
-        }else if(fieldType.equals(List.class)){
-            Class<?>[] generic = getGenericTypes(field);
-            injectToList((List)subObject, generic == null ? String.class : generic[0], stepFieldNames,
-                    step, value );
-        }else{
-            String nextFieldName = stepFieldNames.get(step);
-            Field nextField = subObject.getClass().getField(nextFieldName);
-            injectToObject(subObject, nextField, stepFieldNames, step, value);
-        }
-    }
-
-    /**
-     * Get generic types
-     * @param field
-     * @return
-     */
-    private Class<?>[] getGenericTypes(Field field){
-        Type fc = field.getGenericType();
-        if(fc instanceof ParameterizedType){
-            Type[] types = ((ParameterizedType)fc).getActualTypeArguments();
-            if(null != types && types.length > 0){
-                Class<?>[] genericClazz = new Class<?>[types.length];
-                for(int i = 0 ; i < genericClazz.length ; i++){
-                    genericClazz[i] = (Class<?>)types[i];
-                }
-                return genericClazz;
-            }
-        }
-        return null;
-    }
-
-    private void setObjectField(Object object, Field field, Object value) throws Exception{
-        field.setAccessible(true);
-        field.set(object, value);
-    }
-
-    private Object getObjectField(Object object, Field field) throws Exception{
-        field.setAccessible(true);
-        return field.get(object);
-    }
-
-
-    /**
-     * Tool of primitive
-     */
-    public static class PrimitiveUtils{
-        public static Object primitiveTypeConverse(Object objValue, Class<?> type){
-            if(type.equals(String.class) || null == objValue){
-                return objValue;
-            }
-            String value = String.valueOf(objValue);
-            if(!type.isPrimitive()){
-                try {
-                    type = ((Class)type.getField("TYPE").get(null));
-                } catch (Exception e) {
-                    //ignore
-                }
-            }
-            switch (type.getSimpleName()) {
-                case "int":
-                    return Integer.valueOf(value);
-                case "long":
-                    return Long.valueOf(value);
-                case "short":
-                    return Short.valueOf(value);
-                case "char":
-                    return value.toCharArray()[0];
-                case "float":
-                    return Float.valueOf(value);
-                case "double":
-                    return Double.valueOf(value);
-                case "byte":
-                    return Byte.valueOf(value);
-                case "boolean":
-                    return Boolean.valueOf(value);
-                default:
-                    throw new RuntimeException("Type: " + type.getSimpleName() + " is not primitive");
-            }
-        }
-
-        public static boolean isPrimitive(Class<?> type){
-            try {
-                return type.isPrimitive() || ((Class) type.getField("TYPE").get(null)).isPrimitive();
-            }catch(Exception e){
-                return false;
-            }
-        }
-    }
-
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/formdata/FormStreamContent.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/formdata/FormStreamContent.java
deleted file mode 100644
index 4f5b318..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/formdata/FormStreamContent.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.formdata;
-
-import java.io.InputStream;
-import java.util.Date;
-import java.util.Map;
-
-/**
- * Stream content
- * @author alexwu
- * 2020/02/12
- */
-public class FormStreamContent {
-    private InputStream stream;
-    private String fileName;
-
-    private long size;
-
-    private Date createDate;
-
-    private Date modifyDate;
-
-    private Map<String, String> parameters;
-
-    public InputStream getStream() {
-        return stream;
-    }
-
-    public void setStream(InputStream stream) {
-        this.stream = stream;
-    }
-
-    public String getFileName() {
-        return fileName;
-    }
-
-    public void setFileName(String fileName) {
-        this.fileName = fileName;
-    }
-
-    public long getSize() {
-        return size;
-    }
-
-    public void setSize(long size) {
-        this.size = size;
-    }
-
-    public Date getCreateDate() {
-        return createDate;
-    }
-
-    public void setCreateDate(Date createDate) {
-        this.createDate = createDate;
-    }
-
-    public Date getModifyDate() {
-        return modifyDate;
-    }
-
-    public void setModifyDate(Date modifyDate) {
-        this.modifyDate = modifyDate;
-    }
-
-    public Map<String, String> getParameters() {
-        return parameters;
-    }
-
-    public void setParameters(Map<String, String> parameters) {
-        this.parameters = parameters;
-    }
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/formdata/MultiPartFormDataTransformer.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/formdata/MultiPartFormDataTransformer.java
deleted file mode 100644
index 73156e7..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/formdata/MultiPartFormDataTransformer.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.formdata;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import org.glassfish.jersey.media.multipart.FormDataMultiPart;
-
-import javax.validation.ValidationException;
-import javax.validation.Validator;
-
-/**
- * Transformer of multipart form
- * @author alexwu
- * 2020/02/12
- */
-public interface MultiPartFormDataTransformer {
-    /**
-     * Transform the form data to object and validate its fields
-     * @param formData form data
-     * @param clazz clazz
-     * @param beanValidator validator
-     * @param <T>
-     * @return
-     * @throws ValidationException
-     * @throws ErrorException
-     */
-    <T>T transformToObject(FormDataMultiPart formData, Class<?> clazz, Validator beanValidator)
-            throws ValidationException, ErrorException;
-
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/restful/DataSourceAdminRestfulApi.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/restful/DataSourceAdminRestfulApi.java
deleted file mode 100644
index 22254d0..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/restful/DataSourceAdminRestfulApi.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.restful;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSourceEnv;
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSourceParamKeyDefinition;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.formdata.FormDataTransformerFactory;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.formdata.MultiPartFormDataTransformer;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.service.DataSourceInfoService;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.service.DataSourceRelateService;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.vo.DataSourceEnvVo;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.validate.ParameterValidator;
-import com.webank.wedatasphere.linkis.server.Message;
-import com.webank.wedatasphere.linkis.server.security.SecurityFilter;
-import org.glassfish.jersey.media.multipart.FormDataMultiPart;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import javax.annotation.PostConstruct;
-import javax.servlet.http.HttpServletRequest;
-import javax.validation.ConstraintViolation;
-import javax.validation.ConstraintViolationException;
-import javax.validation.Validator;
-import javax.validation.groups.Default;
-import javax.ws.rs.*;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import java.util.*;
-
-/**
- * @author liaoyt
- * 2020/02/10
- */
-@Path("/data_source")
-@Consumes(MediaType.APPLICATION_JSON)
-@Produces(MediaType.APPLICATION_JSON)
-public class DataSourceAdminRestfulApi {
-
-    @Autowired
-    private DataSourceInfoService dataSourceInfoService;
-
-    @Autowired
-    private DataSourceRelateService dataSourceRelateService;
-
-    @Autowired
-    private ParameterValidator parameterValidator;
-
-    @Autowired
-    private Validator beanValidator;
-
-    private MultiPartFormDataTransformer formDataTransformer;
-
-    @PostConstruct
-    public void initRestful(){
-        this.formDataTransformer = FormDataTransformerFactory.buildCustom();
-    }
-
-    @POST
-    @Path("/env/json")
-    public Response insertJsonEnv(DataSourceEnv dataSourceEnv, @Context HttpServletRequest req){
-        return RestfulApiHelper.doAndResponse(()->{
-            String userName = SecurityFilter.getLoginUsername(req);
-            if(!RestfulApiHelper.isAdminUser(userName)){
-                return Message.error("User '" + userName + "' is not admin user[非管理员用户]");
-            }
-            //Bean validation
-            Set<ConstraintViolation<DataSourceEnv>> result = beanValidator.validate(dataSourceEnv, Default.class);
-            if(result.size() > 0){
-                throw new ConstraintViolationException(result);
-            }
-            dataSourceEnv.setCreateUser(userName);
-            insertDataSourceEnv(dataSourceEnv);
-            return Message.ok().data("insert_id", dataSourceEnv.getId());
-        }, "/data_source/env/json","Fail to insert data source environment[新增数据源环境失败]");
-    }
-
-    @POST
-    @Path("/env/form")
-    public Response insertFormEnv(FormDataMultiPart multiPartForm,
-                                  @Context HttpServletRequest request){
-        return RestfulApiHelper.doAndResponse(()->{
-           String userName = SecurityFilter.getLoginUsername(request);
-            if(!RestfulApiHelper.isAdminUser(userName)){
-                return Message.error("User '" + userName + "' is not admin user[非管理员用户]");
-            }
-            DataSourceEnv dataSourceEnv = formDataTransformer.transformToObject(multiPartForm, DataSourceEnv.class, beanValidator);
-            dataSourceEnv.setCreateUser(userName);
-            insertDataSourceEnv(dataSourceEnv);
-            return Message.ok().data("insert_id", dataSourceEnv.getId());
-        }, "/data_source/env/form","Fail to insert data source environment[新增数据源环境失败]");
-    }
-
-    @GET
-    @Path("/env_list/all/type/{type_id}")
-    public Response getAllEnvListByDataSourceType(@PathParam("type_id")Long typeId){
-        return RestfulApiHelper.doAndResponse(()->{
-            List<DataSourceEnv> envList = dataSourceInfoService.listDataSourceEnvByType(typeId);
-            return Message.ok().data("env_list", envList);
-        }, "/data_source/env_list/all/type/" + typeId,"Fail to get data source environment list[获取数据源环境清单失败]");
-    }
-
-    @GET
-    @Path("/env/{env_id}")
-    public Response getEnvEntityById(@PathParam("env_id")Long envId){
-        return RestfulApiHelper.doAndResponse(() ->{
-            DataSourceEnv dataSourceEnv = dataSourceInfoService.getDataSourceEnv(envId);
-            return Message.ok().data("env", dataSourceEnv);
-        }, "/data_source/env/" + envId,"Fail to get data source environment[获取数据源环境信息失败]");
-    }
-
-    @DELETE
-    @Path("/env/{env_id}")
-    public Response removeEnvEntity(@PathParam("env_id")Long envId,
-                                    @Context HttpServletRequest request){
-        return RestfulApiHelper.doAndResponse(() -> {
-            String userName = SecurityFilter.getLoginUsername(request);
-            if(!RestfulApiHelper.isAdminUser(userName)){
-                return Message.error("User '" + userName + "' is not admin user[非管理员用户]");
-            }
-            Long removeId = dataSourceInfoService.removeDataSourceEnv(envId);
-            if(removeId < 0){
-                return Message.error("Fail to remove data source environment[删除数据源环境信息失败], [id:" +
-                        envId + "]");
-            }
-            return Message.ok().data("remove_id", removeId);
-        }, "/data_source/env/" + envId,"Fail to remove data source environment[删除数据源环境信息失败]");
-    }
-
-    @PUT
-    @Path("/env/{env_id}/json")
-    public Response updateJsonEnv(DataSourceEnv dataSourceEnv,
-                                  @PathParam("env_id")Long envId,
-                                  @Context HttpServletRequest request){
-        return RestfulApiHelper.doAndResponse(() -> {
-            String userName = SecurityFilter.getLoginUsername(request);
-            if(!RestfulApiHelper.isAdminUser(userName)){
-                return Message.error("User '" + userName + "' is not admin user[非管理员用户]");
-            }
-            //Bean validation
-            Set<ConstraintViolation<DataSourceEnv>> result = beanValidator.validate(dataSourceEnv, Default.class);
-            if(result.size() > 0){
-                throw new ConstraintViolationException(result);
-            }
-            dataSourceEnv.setId(envId);
-            dataSourceEnv.setModifyUser(userName);
-            dataSourceEnv.setModifyTime(Calendar.getInstance().getTime());
-            DataSourceEnv storedDataSourceEnv = dataSourceInfoService.getDataSourceEnv(envId);
-            if(null == storedDataSourceEnv){
-                return Message.error("Fail to update data source environment[更新数据源环境失败], " + "[Please check the id:'"
-                        + envId + " is correct ']");
-            }
-            dataSourceEnv.setCreateUser(storedDataSourceEnv.getCreateUser());
-            updateDataSourceEnv(dataSourceEnv, storedDataSourceEnv);
-            return Message.ok().data("update_id", envId);
-        }, "/data_source/env/" + envId + "/json","Fail to update data source environment[更新数据源环境失败]");
-    }
-
-    @PUT
-    @Path("/env/{env_id}/form")
-    @Consumes(MediaType.MULTIPART_FORM_DATA)
-    public  Response updateFormEnv(FormDataMultiPart multiPartForm,
-                                   @PathParam("env_id")Long envId,
-                                   @Context HttpServletRequest request){
-        return RestfulApiHelper.doAndResponse(()->{
-            if(null != multiPartForm) {
-                String userName = SecurityFilter.getLoginUsername(request);
-                if (!RestfulApiHelper.isAdminUser(userName)) {
-                    return Message.error("User '" + userName + "' is not admin user[非管理员用户]");
-                }
-                DataSourceEnv dataSourceEnv = formDataTransformer.transformToObject(multiPartForm, DataSourceEnv.class, beanValidator);
-                dataSourceEnv.setId(envId);
-                dataSourceEnv.setModifyUser(userName);
-                dataSourceEnv.setModifyTime(Calendar.getInstance().getTime());
-                DataSourceEnv storedDataSourceEnv = dataSourceInfoService.getDataSourceEnv(envId);
-                if (null == storedDataSourceEnv) {
-                    return Message.error("Fail to update data source environment[更新数据源环境失败], " + "[Please check the id:'"
-                            + envId + " is correct ']");
-                }
-                dataSourceEnv.setCreateUser(storedDataSourceEnv.getCreateUser());
-                updateDataSourceEnv(dataSourceEnv, storedDataSourceEnv);
-                return Message.ok().data("update_id", envId);
-            }
-            return Message.error("Empty request");
-        }, "/data_source/env/" + envId + "/form","Fail to update data source environment[更新数据源环境失败]");
-    }
-
-    @GET
-    @Path("/env")
-    public Response queryDataSourceEnv(@QueryParam("name")String envName,
-                                       @QueryParam("typeId")Long dataSourceTypeId,
-                                       @QueryParam("currentPage")Integer currentPage,
-                                       @QueryParam("pageSize")Integer pageSize){
-        return RestfulApiHelper.doAndResponse(() -> {
-            DataSourceEnvVo dataSourceEnvVo = new DataSourceEnvVo(envName, dataSourceTypeId);
-            dataSourceEnvVo.setCurrentPage(null != currentPage ? currentPage : 1);
-            dataSourceEnvVo.setPageSize(null != pageSize? pageSize : 10);
-            List<DataSourceEnv> queryList = dataSourceInfoService.queryDataSourceEnvPage(dataSourceEnvVo);
-            return Message.ok().data("query_list", queryList);
-        }, "/data_source/env","Fail to query page of data source environment[查询数据源环境失败]");
-    }
-
-    /**
-     * Inner method to insert data source environment
-     * @param dataSourceEnv data source environment entity
-     * @throws ErrorException
-     */
-    private void insertDataSourceEnv(DataSourceEnv dataSourceEnv) throws ErrorException{
-        //Get key definitions in environment scope
-        List<DataSourceParamKeyDefinition> keyDefinitionList = dataSourceRelateService
-                .getKeyDefinitionsByType(dataSourceEnv.getDataSourceTypeId(), DataSourceParamKeyDefinition.Scope.ENV);
-        dataSourceEnv.setKeyDefinitions(keyDefinitionList);
-        Map<String, Object> connectParams = dataSourceEnv.getConnectParams();
-        //Validate connect parameters
-        parameterValidator.validate(keyDefinitionList, connectParams);
-        dataSourceInfoService.saveDataSourceEnv(dataSourceEnv);
-    }
-
-    /**
-     * Inner method to update data source environment
-     * @param updatedOne new entity
-     * @param storedOne old entity
-     * @throws ErrorException
-     */
-    private void updateDataSourceEnv(DataSourceEnv updatedOne, DataSourceEnv storedOne) throws ErrorException{
-        //Get key definitions in environment scope
-        List<DataSourceParamKeyDefinition> keyDefinitionList = dataSourceRelateService
-                .getKeyDefinitionsByType(updatedOne.getDataSourceTypeId(), DataSourceParamKeyDefinition.Scope.ENV);
-        updatedOne.setKeyDefinitions(keyDefinitionList);
-        Map<String, Object> connectParams = updatedOne.getConnectParams();
-        //Validate connect parameters
-        parameterValidator.validate(keyDefinitionList, connectParams);
-        dataSourceInfoService.updateDataSourceEnv(updatedOne, storedOne);
-    }
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/restful/DataSourceCoreRestfulApi.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/restful/DataSourceCoreRestfulApi.java
deleted file mode 100644
index 425cfcc..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/restful/DataSourceCoreRestfulApi.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.restful;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSourceType;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.formdata.FormDataTransformerFactory;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.formdata.MultiPartFormDataTransformer;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.service.DataSourceInfoService;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.service.DataSourceRelateService;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.vo.DataSourceVo;
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSource;
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSourceParamKeyDefinition;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.validate.ParameterValidateException;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.validate.ParameterValidator;
-import com.webank.wedatasphere.linkis.server.Message;
-import com.webank.wedatasphere.linkis.server.security.SecurityFilter;
-import org.apache.commons.lang.StringUtils;
-import org.glassfish.jersey.media.multipart.FormDataMultiPart;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.PostConstruct;
-import javax.servlet.http.HttpServletRequest;
-import javax.validation.ConstraintViolation;
-import javax.validation.ConstraintViolationException;
-import javax.validation.Validator;
-import javax.validation.groups.Default;
-import javax.ws.rs.*;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import java.util.*;
-
-/**
- * @author liaoyt
- * 2020/02/10
- */
-@Path("/data_source")
-@Consumes(MediaType.APPLICATION_JSON)
-@Produces(MediaType.APPLICATION_JSON)
-@Component
-public class DataSourceCoreRestfulApi {
-
-    private static final Logger LOG = LoggerFactory.getLogger(DataSourceCoreRestfulApi.class);
-    @Autowired
-    private DataSourceInfoService dataSourceInfoService;
-
-    @Autowired
-    private DataSourceRelateService dataSourceRelateService;
-
-    @Autowired
-    private ParameterValidator parameterValidator;
-
-    @Autowired
-    private Validator beanValidator;
-
-    private MultiPartFormDataTransformer formDataTransformer;
-
-
-    @PostConstruct
-    public void initRestful(){
-        this.formDataTransformer = FormDataTransformerFactory.buildCustom();
-    }
-
-    @POST
-    @Path("/info/json")
-    public Response insertJsonInfo(DataSource dataSource, @Context HttpServletRequest req) {
-        return RestfulApiHelper.doAndResponse(() -> {
-            String userName = SecurityFilter.getLoginUsername(req);
-            //Bean validation
-            Set<ConstraintViolation<DataSource>> result = beanValidator.validate(dataSource, Default.class);
-            if(result.size() > 0){
-                throw new ConstraintViolationException(result);
-            }
-            dataSource.setCreateUser(userName);
-            insertDataSourceConfig(dataSource);
-            return Message.ok().data("insert_id", dataSource.getId());
-        }, "/data_source/info/json", "Fail to insert data source[新增数据源失败]");
-    }
-
-    @POST
-    @Path("/info/form")
-    @Consumes(MediaType.MULTIPART_FORM_DATA)
-    public Response insertFormConfig(FormDataMultiPart multiPartForm,
-                                     @Context HttpServletRequest request){
-        return RestfulApiHelper.doAndResponse(() -> {
-            if(null != multiPartForm) {
-                String userName = SecurityFilter.getLoginUsername(request);
-                DataSource dataSource = formDataTransformer.transformToObject(multiPartForm, DataSource.class, beanValidator);
-                dataSource.setCreateUser(userName);
-                insertDataSourceConfig(dataSource);
-                return Message.ok().data("insert_id", dataSource.getId());
-            }
-            return Message.error("Empty request");
-        }, "/data_source/info/form", "Fail to insert data source[新增数据源失败]");
-    }
-
-    @GET
-    @Path("/info/{data_source_id}")
-    public Response getInfoByDataSourceId(@QueryParam("system")String createSystem,
-                                            @PathParam("data_source_id")Long dataSourceId,
-                                            @Context HttpServletRequest request){
-        return RestfulApiHelper.doAndResponse(() -> {
-            if(StringUtils.isBlank(createSystem)){
-                return Message.error("'create system' is missing[缺少系统名]");
-            }
-            DataSource dataSource = dataSourceInfoService.getDataSourceInfo(dataSourceId, createSystem);
-            //Decrypt
-            if(null != dataSource) {
-                RestfulApiHelper.decryptPasswordKey(dataSourceRelateService.getKeyDefinitionsByType(dataSource.getDataSourceTypeId())
-                        , dataSource.getConnectParams());
-            }
-            return Message.ok().data("info", dataSource);
-        }, "/data_source/info/" + dataSourceId, "Fail to access data source[获取数据源信息失败]");
-    }
-
-
-    @DELETE
-    @Path("/info/{data_source_id}")
-    public Response removeDataSource(@QueryParam("system")String createSystem,
-                                     @PathParam("data_source_id")Long dataSourceId){
-        return RestfulApiHelper.doAndResponse(() -> {
-            if(StringUtils.isBlank(createSystem)){
-                return Message.error("'create system' is missing[缺少系统名]");
-            }
-            Long removeId = dataSourceInfoService.removeDataSourceInfo(dataSourceId, createSystem);
-            if(removeId < 0){
-                return Message.error("Fail to remove data source[删除数据源信息失败], [id:" + dataSourceId +"]");
-            }
-            return Message.ok().data("remove_id", removeId);
-        }, "/data_source/info/" + dataSourceId,"Fail to remove data source[删除数据源信息失败]");
-    }
-
-    @PUT
-    @Path("/info/{data_source_id}/json")
-    public Response updateDataSourceInJson(DataSource dataSource,
-                                           @PathParam("data_source_id")Long dataSourceId,
-                                           @Context HttpServletRequest req){
-        return RestfulApiHelper.doAndResponse(() -> {
-            String userName = SecurityFilter.getLoginUsername(req);
-            //Bean validation
-            Set<ConstraintViolation<DataSource>> result = beanValidator.validate(dataSource, Default.class);
-            if(result.size() > 0){
-                throw new ConstraintViolationException(result);
-            }
-            dataSource.setId(dataSourceId);
-            dataSource.setModifyUser(userName);
-            dataSource.setModifyTime(Calendar.getInstance().getTime());
-            DataSource storedDataSource = dataSourceInfoService.getDataSourceInfoBrief(dataSourceId, dataSource.getCreateSystem());
-            if(null == storedDataSource){
-                return Message.error("Fail to update data source[更新数据源失败], " + "[Please check the id:'"
-                        + dataSourceId +"' and create system: '"+dataSource.getCreateSystem()+" is correct ']");
-            }
-            dataSource.setCreateUser(storedDataSource.getCreateUser());
-            updateDataSourceConfig(dataSource, storedDataSource);
-            return Message.ok().data("update_id", dataSourceId);
-        }, "/data_source/info/"+dataSourceId+"/json","Fail to update data source[更新数据源失败]");
-    }
-
-    @PUT
-    @Path("/info/{data_source_id}/form")
-    @Consumes(MediaType.MULTIPART_FORM_DATA)
-    public Response updateDataSourceInForm(FormDataMultiPart multiPartForm,
-                                           @PathParam("data_source_id")Long dataSourceId,
-                                           @Context HttpServletRequest req){
-        return RestfulApiHelper.doAndResponse(() -> {
-            String userName = SecurityFilter.getLoginUsername(req);
-            DataSource dataSource = formDataTransformer.transformToObject(multiPartForm, DataSource.class, beanValidator);
-            dataSource.setId(dataSourceId);
-            dataSource.setModifyUser(userName);
-            dataSource.setModifyTime(Calendar.getInstance().getTime());
-            DataSource storedDataSource = dataSourceInfoService.getDataSourceInfoBrief(dataSourceId, dataSource.getCreateSystem());
-            if(null == storedDataSource){
-                return Message.error("Fail to update data source[更新数据源失败], " +
-                        "[Please check the id:'" + dataSourceId +"' and create system: '"+dataSource.getCreateSystem()+" is correct ']");
-            }
-            dataSource.setCreateUser(storedDataSource.getCreateUser());
-            updateDataSourceConfig(dataSource, storedDataSource);
-            return Message.ok().data("update_id", dataSourceId);
-        }, "/data_source/info/" + dataSourceId + "/form", "Fail to update data source[更新数据源失败]");
-    }
-
-    @GET
-    @Path("/info")
-    public Response queryDataSource(@QueryParam("system")String createSystem,
-                                    @QueryParam("name")String dataSourceName,
-                                    @QueryParam("typeId")Long dataSourceTypeId,
-                                    @QueryParam("identifies")String identifies,
-                                    @QueryParam("currentPage")Integer currentPage,
-                                    @QueryParam("pageSize")Integer pageSize){
-        return RestfulApiHelper.doAndResponse(() -> {
-            if(StringUtils.isBlank(createSystem)){
-                return Message.error("'create system' is missing[缺少系统名]");
-            }
-            DataSourceVo dataSourceVo = new DataSourceVo(dataSourceName, dataSourceTypeId,
-                    identifies, createSystem);
-            dataSourceVo.setCurrentPage(null != currentPage ? currentPage : 1);
-            dataSourceVo.setPageSize(null != pageSize? pageSize : 10);
-            List<DataSource> queryList = dataSourceInfoService.queryDataSourceInfoPage(dataSourceVo);
-            return Message.ok().data("query_list", queryList);
-        }, "/data_source/info", "Fail to query page of data source[查询数据源失败]");
-    }
-
-    @GET
-    @Path("/key_define/type/{type_id}")
-    public Response getKeyDefinitionsByType(@PathParam("type_id") Long dataSourceTypeId){
-        return RestfulApiHelper.doAndResponse(() -> {
-            List<DataSourceParamKeyDefinition> keyDefinitions = dataSourceRelateService.getKeyDefinitionsByType(dataSourceTypeId);
-            return Message.ok().data("key_define", keyDefinitions);
-        }, "/data_source/key_define/type/" + dataSourceTypeId,
-                "Fail to get key definitions of data source type[查询数据源参数键值对失败]");
-    }
-
-    @GET
-    @Path("/key_define/type/{type_id}/{scope}")
-    public Response getKeyDefinitionsByTypeAndScope(@PathParam("type_id") Long dataSourceTypeId,
-                                                    @PathParam("scope") String scopeValue){
-        return RestfulApiHelper.doAndResponse(() -> {
-            DataSourceParamKeyDefinition.Scope scope = DataSourceParamKeyDefinition.Scope.valueOf(scopeValue.toUpperCase());
-            List<DataSourceParamKeyDefinition> keyDefinitions = dataSourceRelateService
-                    .getKeyDefinitionsByType(dataSourceTypeId, scope);
-            return Message.ok().data("key_define", keyDefinitions);
-        }, "/data_source/key_define/type/" + dataSourceTypeId + "/" + scopeValue,
-                "Fail to get key definitions of data source type[查询数据源参数键值对失败]");
-    }
-
-    @GET
-    @Path("/type/all")
-    public Response getAllDataSourceTypes(){
-        return RestfulApiHelper.doAndResponse(() -> {
-            List<DataSourceType> dataSourceTypes = dataSourceRelateService.getAllDataSourceTypes();
-            return Message.ok().data("type_list", dataSourceTypes);
-        }, "/data_source/type/all", "Fail to get all types of data source[获取数据源类型列表失败]");
-    }
-
-    /**
-     * Inner method to insert data source
-     * @param dataSource data source entity
-     * @throws ParameterValidateException
-     */
-    private void insertDataSourceConfig(DataSource dataSource) throws ErrorException {
-        if(null != dataSource.getDataSourceEnvId()){
-            //Merge parameters
-            dataSourceInfoService.addEnvParamsToDataSource(dataSource.getDataSourceEnvId(), dataSource);
-        }
-        //Validate connect parameters
-        List<DataSourceParamKeyDefinition> keyDefinitionList = dataSourceRelateService
-                .getKeyDefinitionsByType(dataSource.getDataSourceTypeId());
-        dataSource.setKeyDefinitions(keyDefinitionList);
-        Map<String,Object> connectParams = dataSource.getConnectParams();
-        parameterValidator.validate(keyDefinitionList, connectParams);
-        //Encrypt password value type
-        RestfulApiHelper.encryptPasswordKey(keyDefinitionList, connectParams);
-        dataSourceInfoService.saveDataSourceInfo(dataSource);
-    }
-
-    /**
-     * Inner method to update data source
-     * @param updatedOne new entity
-     * @param storedOne old entity
-     * @throws ErrorException
-     */
-    private void updateDataSourceConfig(DataSource updatedOne, DataSource storedOne) throws ErrorException{
-        if(null != updatedOne.getDataSourceEnvId()){
-            //Merge parameters
-            dataSourceInfoService.addEnvParamsToDataSource(updatedOne.getDataSourceEnvId(), updatedOne);
-        }
-        //Validate connect parameters
-        List<DataSourceParamKeyDefinition> keyDefinitionList = dataSourceRelateService
-                .getKeyDefinitionsByType(updatedOne.getDataSourceTypeId());
-        updatedOne.setKeyDefinitions(keyDefinitionList);
-        Map<String, Object> connectParams = updatedOne.getConnectParams();
-        parameterValidator.validate(keyDefinitionList, connectParams);
-        RestfulApiHelper.encryptPasswordKey(keyDefinitionList, connectParams);
-        dataSourceInfoService.updateDataSourceInfo(updatedOne, storedOne);
-    }
-
-
-
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/restful/DataSourceOperateRestfulApi.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/restful/DataSourceOperateRestfulApi.java
deleted file mode 100644
index 4258239..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/restful/DataSourceOperateRestfulApi.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.restful;
-
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSource;
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSourceParamKeyDefinition;
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSourceType;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.formdata.FormDataTransformerFactory;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.formdata.MultiPartFormDataTransformer;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.service.DataSourceInfoService;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.service.DataSourceRelateService;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.service.MetadataOperateService;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.validate.ParameterValidateException;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.validate.ParameterValidator;
-import com.webank.wedatasphere.linkis.metadatamanager.common.MdmConfiguration;
-import com.webank.wedatasphere.linkis.server.Message;
-import com.webank.wedatasphere.linkis.server.security.SecurityFilter;
-import org.apache.commons.lang.StringUtils;
-import org.glassfish.jersey.media.multipart.FormDataMultiPart;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.PostConstruct;
-import javax.servlet.http.HttpServletRequest;
-import javax.validation.ConstraintViolation;
-import javax.validation.ConstraintViolationException;
-import javax.validation.Validator;
-import javax.validation.groups.Default;
-import javax.ws.rs.*;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * @author liaoyt
- * 2020/02/10
- */
-@Path("/data_source/op/")
-@Consumes(MediaType.APPLICATION_JSON)
-@Produces(MediaType.APPLICATION_JSON)
-@Component
-public class DataSourceOperateRestfulApi {
-
-    @Autowired
-    private MetadataOperateService metadataOperateService;
-
-    @Autowired
-    private DataSourceRelateService dataSourceRelateService;
-
-    @Autowired
-    private DataSourceInfoService dataSourceInfoService;
-
-    @Autowired
-    private ParameterValidator parameterValidator;
-
-    @Autowired
-    private Validator beanValidator;
-
-    private MultiPartFormDataTransformer formDataTransformer;
-
-    @PostConstruct
-    public void initRestful(){
-        this.formDataTransformer = FormDataTransformerFactory.buildCustom();
-    }
-
-    @POST
-    @Path("/connect/json")
-    public Response connect(DataSource dataSource,
-                            @Context HttpServletRequest request){
-        return RestfulApiHelper.doAndResponse(() -> {
-            String operator = SecurityFilter.getLoginUsername(request);
-            //Bean validation
-            Set<ConstraintViolation<DataSource>> result = beanValidator.validate(dataSource, Default.class);
-            if(result.size() > 0){
-                throw new ConstraintViolationException(result);
-            }
-            doConnect(operator, dataSource);
-            return Message.ok().data("ok", true);
-        }, "/data_source/op/connect/json","");
-    }
-
-    @POST
-    @Path("/connect/form")
-    public Response connect(FormDataMultiPart multiPartForm,
-                            @Context HttpServletRequest request){
-        return RestfulApiHelper.doAndResponse(() -> {
-            String operator = SecurityFilter.getLoginUsername(request);
-            DataSource dataSource = formDataTransformer.transformToObject(multiPartForm, DataSource.class, beanValidator);
-            doConnect(operator, dataSource);
-            return Message.ok().data("ok", true);
-        }, "/data_source/op/connect/form","");
-    }
-
-    /**
-     * Build a connection
-     * @param dataSource
-     */
-    protected void doConnect(String operator, DataSource dataSource) throws ParameterValidateException {
-        if(null != dataSource.getDataSourceEnvId()){
-            dataSourceInfoService.addEnvParamsToDataSource(dataSource.getDataSourceEnvId(), dataSource);
-        }
-        //Validate connect parameters
-        List<DataSourceParamKeyDefinition> keyDefinitionList = dataSourceRelateService
-                .getKeyDefinitionsByType(dataSource.getDataSourceTypeId());
-        dataSource.setKeyDefinitions(keyDefinitionList);
-        Map<String,Object> connectParams = dataSource.getConnectParams();
-        parameterValidator.validate(keyDefinitionList, connectParams);
-        DataSourceType dataSourceType = dataSourceRelateService.getDataSourceType(dataSource.getDataSourceTypeId());
-        metadataOperateService.doRemoteConnect(MdmConfiguration.METADATA_SERVICE_APPLICATION.getValue()
-                        + (StringUtils.isNotBlank(dataSourceType.getName())?("-" +dataSourceType.getName().toLowerCase()) : ""),
-                operator, dataSource.getConnectParams());
-    }
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/restful/RestfulApiHelper.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/restful/RestfulApiHelper.java
deleted file mode 100644
index 0456919..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/restful/RestfulApiHelper.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.restful;
-
-import com.webank.wedatasphere.linkis.common.exception.WarnException;
-import com.webank.wedatasphere.linkis.datasourcemanager.common.DsmConfiguration;
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSourceParamKeyDefinition;
-import com.webank.wedatasphere.linkis.datasourcemanager.common.util.CryptoUtils;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.restful.exception.BeanValidationExceptionMapper;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.validate.ParameterValidateException;
-import com.webank.wedatasphere.linkis.server.Message;
-
-import javax.validation.ConstraintViolationException;
-import javax.ws.rs.core.Response;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Helper of restful api entrance
- * @author liaoyt
- * 2020/02/10
- */
-public class RestfulApiHelper {
-    /**
-     * If is administrator
-     * @param userName user name
-     * @return
-     */
-    public static boolean isAdminUser(String userName){
-        List<String> userList = Arrays.asList(DsmConfiguration.DSM_ADMIN_USER_LIST.getValue().split(","));
-        return userList.contains(userName);
-    }
-
-    /**
-     * Encrypt key of password type
-     * @param keyDefinitionList definition list
-     * @param connectParams connection parameters
-     */
-    public static void encryptPasswordKey(List<DataSourceParamKeyDefinition> keyDefinitionList,
-                                    Map<String, Object> connectParams){
-        keyDefinitionList.forEach(keyDefinition -> {
-            if(keyDefinition.getValueType() == DataSourceParamKeyDefinition.ValueType.PASSWORD){
-                Object password = connectParams.get(keyDefinition.getKey());
-                if(null != password){
-                    connectParams.put(keyDefinition.getKey(), CryptoUtils.object2String(String.valueOf(password)));
-                }
-            }
-        });
-    }
-
-    /**
-     * Encrypt key of password type
-     * @param keyDefinitionList definition list
-     * @param connectParams connection parameters
-     */
-    public static void decryptPasswordKey(List<DataSourceParamKeyDefinition> keyDefinitionList,
-                                          Map<String, Object> connectParams){
-        keyDefinitionList.forEach(keyDefinition -> {
-            if(keyDefinition.getValueType() == DataSourceParamKeyDefinition.ValueType.PASSWORD){
-                Object password = connectParams.get(keyDefinition.getKey());
-                if(null != password){
-                    connectParams.put(keyDefinition.getKey(), CryptoUtils.string2Object(String.valueOf(password)));
-                }
-            }
-        });
-    }
-
-    /**
-     *
-     * @param tryOperation operate function
-     * @param failMessage message
-     */
-    public static Response doAndResponse(TryOperation tryOperation, String method, String failMessage){
-        try{
-            Message message = tryOperation.operateAndGetMessage();
-            return Message.messageToResponse(setMethod(message, method));
-        }catch(ParameterValidateException e){
-            return Message.messageToResponse(setMethod(Message.error(e.getMessage()), method));
-        }catch(ConstraintViolationException e){
-            return new BeanValidationExceptionMapper().toResponse(e);
-        }catch(WarnException e){
-            return Message.messageToResponse(setMethod(Message.warn(e.getMessage()), method));
-        }catch(Exception e){
-            return Message.messageToResponse(setMethod(Message.error(failMessage, e), method));
-        }
-    }
-    private static Message setMethod(Message message, String method){
-        message.setMethod(method);
-        return message;
-    }
-
-
-    @FunctionalInterface
-    public interface TryOperation {
-
-        /**
-         * Operate method
-         */
-        Message operateAndGetMessage() throws Exception;
-    }
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/restful/exception/BeanValidationExceptionMapper.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/restful/exception/BeanValidationExceptionMapper.java
deleted file mode 100644
index f176dda..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/restful/exception/BeanValidationExceptionMapper.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.restful.exception;
-
-import com.webank.wedatasphere.linkis.server.Message;
-
-import javax.validation.ConstraintViolationException;
-import javax.validation.ValidationException;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.ext.ExceptionMapper;
-import javax.ws.rs.ext.Provider;
-
-/**
- * Map bean validation exception to response
- * @author liaoyt
- * 2020/02/11
- */
-@Provider
-public class BeanValidationExceptionMapper implements ExceptionMapper<ValidationException> {
-    @Override
-    public Response toResponse(ValidationException exception) {
-        StringBuilder stringBuilder = new StringBuilder();
-        ((ConstraintViolationException)exception)
-                .getConstraintViolations().forEach(constraintViolation -> stringBuilder.append(constraintViolation.getMessage()).append(";"));
-        Message message = Message.error("Bean validation error[实例校验出错], detail:" + stringBuilder.toString());
-        return Message.messageToResponse(message);
-    }
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/service/BmlAppService.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/service/BmlAppService.java
deleted file mode 100644
index 9725112..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/service/BmlAppService.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.service;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-
-import java.io.InputStream;
-
-/**
- * BML application service
- * @author davidhua
- * 2020/02/14
- */
-public interface BmlAppService {
-
-    /**
-     * Upload resource by bml client
-     * @param fileName file name
-     * @param inputStream inputStream
-     * @return resource id
-     */
-    String clientUploadResource(String userName, String fileName, InputStream inputStream) throws ErrorException;
-
-    /**
-     * Remove resource by bml client
-     * @param resourceId resource id
-     */
-    void clientRemoveResource(String userName, String resourceId) throws ErrorException;
-
-    /**
-     * Update resource by bml client
-     * @param resourceId resource id
-     * @param inputStream input stream
-     * @return version
-     */
-    String clientUpdateResource(String userName, String resourceId, InputStream inputStream) throws ErrorException;
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/service/DataSourceInfoService.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/service/DataSourceInfoService.java
deleted file mode 100644
index 8592d58..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/service/DataSourceInfoService.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.service;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSource;
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSourceEnv;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.vo.DataSourceEnvVo;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.vo.DataSourceVo;
-
-import java.util.List;
-
-
-/**
- * @author davidhua
- * 2020/02/13
- */
-public interface DataSourceInfoService {
-
-    /**
-     * Save data source information
-     * @param dataSource data source
-     */
-    void saveDataSourceInfo(DataSource dataSource) throws ErrorException;
-
-    /**
-     * Add parameters of data source environment
-     * @param dataSourceEnvId data source environment
-     * @param dataSource data source
-     */
-    void addEnvParamsToDataSource(Long dataSourceEnvId, DataSource dataSource);
-
-    /**
-     * Get data source
-     * @param dataSourceId id
-     * @param createSystem system name
-     * @return data source entity
-     */
-    DataSource getDataSourceInfo(Long dataSourceId, String createSystem);
-
-    /**
-     * Get data source brief information
-     * @param dataSourceId data source id
-     * @param createSystem system
-     * @return
-     */
-    DataSource getDataSourceInfoBrief(Long dataSourceId, String createSystem);
-    /**
-     * Remove data source
-     * @param dataSourceId id
-     * @param createSystem system name
-     * @return
-     */
-    Long removeDataSourceInfo(Long dataSourceId, String createSystem);
-
-    /**
-     * Update data source
-     * @param updatedOne updated data source
-     * @param storedOne stored data source
-     */
-    void updateDataSourceInfo(DataSource updatedOne, DataSource storedOne) throws ErrorException;
-
-    /**
-     * Page query of data source
-     * @param dataSourceVo data source view entity
-     * @return
-     */
-    List<DataSource> queryDataSourceInfoPage(DataSourceVo dataSourceVo);
-
-    /**
-     * Save data source environment
-     * @param dataSourceEnv data source environment
-     */
-    void saveDataSourceEnv(DataSourceEnv dataSourceEnv) throws ErrorException;
-
-    /**
-     * List data source environments
-     * @param dataSourceTypeId type id
-     * @return
-     */
-    List<DataSourceEnv> listDataSourceEnvByType(Long dataSourceTypeId);
-
-    /**
-     * Get data source environment
-     * @param envId environment id
-     * @return
-     */
-    DataSourceEnv getDataSourceEnv(Long envId);
-
-    /**
-     * Remove data source environment
-     * @param envId environment id
-     * @return
-     */
-    Long removeDataSourceEnv(Long envId);
-
-    /**
-     * Update data source environment
-     * @param updatedOne
-     * @param storedOne
-     */
-    void updateDataSourceEnv(DataSourceEnv updatedOne, DataSourceEnv storedOne) throws ErrorException;
-
-    /**
-     * Page query of data source environment
-     * @param dataSourceEnvVo
-     * @return
-     */
-    List<DataSourceEnv> queryDataSourceEnvPage(DataSourceEnvVo dataSourceEnvVo);
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/service/DataSourceRelateService.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/service/DataSourceRelateService.java
deleted file mode 100644
index 165773d..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/service/DataSourceRelateService.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.service;
-
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSourceParamKeyDefinition;
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSourceType;
-
-import java.util.List;
-
-/**
- * @author davidhua
- * 2020/02/14
- */
-public interface DataSourceRelateService {
-    /**
-     * Get key definitions by data source type and scope
-     * @param dataSourceTypeId data source type id
-     * @param scope scope
-     * @return
-     */
-    List<DataSourceParamKeyDefinition> getKeyDefinitionsByType(Long dataSourceTypeId,
-                                                               DataSourceParamKeyDefinition.Scope scope);
-
-    /**
-     * Get key definitions by data source type and scope
-     * @param dataSourceTypeId data source type id
-     * @return
-     */
-    List<DataSourceParamKeyDefinition> getKeyDefinitionsByType(Long dataSourceTypeId);
-
-    /**
-     * Get all data source types
-     * @return
-     */
-    List<DataSourceType> getAllDataSourceTypes();
-
-    /**
-     * Get data source type
-     * @param typeId
-     * @return
-     */
-    DataSourceType getDataSourceType(Long typeId);
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/service/MetadataOperateService.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/service/MetadataOperateService.java
deleted file mode 100644
index ca46888..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/service/MetadataOperateService.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.service;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.common.exception.WarnException;
-
-import java.util.Map;
-
-/**
- * Metadata service
- * @author davidhua
- * 2020/02/14
- */
-public interface MetadataOperateService {
-
-    /**
-     * Build connection with  parameters in request
-     * @param mdRemoteServiceName metadata remote service
-     * @param operator operate user
-     * @param connectParams parameters
-     * @throws ErrorException
-     */
-    void doRemoteConnect(String mdRemoteServiceName, String operator, Map<String, Object> connectParams) throws WarnException;
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/service/impl/BmlAppServiceImpl.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/service/impl/BmlAppServiceImpl.java
deleted file mode 100644
index ad3c26e..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/service/impl/BmlAppServiceImpl.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.service.impl;
-
-import com.webank.wedatasphere.linkis.bml.client.BmlClient;
-import com.webank.wedatasphere.linkis.bml.client.BmlClientFactory;
-import com.webank.wedatasphere.linkis.bml.protocol.BmlDeleteResponse;
-import com.webank.wedatasphere.linkis.bml.protocol.BmlUpdateResponse;
-import com.webank.wedatasphere.linkis.bml.protocol.BmlUploadResponse;
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.datasourcemanager.common.ServiceErrorCode;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.service.BmlAppService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.cloud.context.config.annotation.RefreshScope;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.PostConstruct;
-import java.io.InputStream;
-
-/**
- * Wrap the communication between Bml service
- * @author davidhua
- * 2020/02/15
- */
-@Service
-@RefreshScope
-public class BmlAppServiceImpl implements BmlAppService {
-    private static final Logger LOG = LoggerFactory.getLogger(BmlAppService.class);
-    /**
-     * Bml client
-     */
-    private BmlClient client;
-
-    @PostConstruct
-    public void buildClient(){
-        client = BmlClientFactory.createBmlClient();
-    }
-    @Override
-    public String clientUploadResource(String userName, String fileName,
-                                       InputStream inputStream) throws ErrorException{
-        LOG.info("Upload resource to bml server: [ proxy_to_user: " + userName +
-                ", file name:" + fileName + " ]");
-        try{
-            BmlUploadResponse response = client.uploadResource(userName, fileName, inputStream);
-            if(!response.isSuccess()){
-                throw new ErrorException(ServiceErrorCode.BML_SERVICE_ERROR.getValue(), "");
-            }
-            return response.resourceId();
-        }catch(Exception e){
-            LOG.error("Failed to upload resource to bml server[上传资源文件失败], [ proxy_to_user: " + userName +
-                    ", file name:" + fileName + " ]", e);
-            throw e;
-        }
-    }
-
-    @Override
-    public void clientRemoveResource(String userName, String resourceId) throws ErrorException{
-        LOG.info("Remove resource to bml server: [ proxy_to_user: " + userName +
-                ", resource id:" + resourceId + " ]");
-        try{
-            BmlDeleteResponse response = client.deleteResource(userName, resourceId);
-            if(!response.isSuccess()){
-                throw new ErrorException(ServiceErrorCode.BML_SERVICE_ERROR.getValue(), "");
-            }
-        }catch(Exception e){
-            LOG.error("Fail to remove resource to bml server[删除资源文件失败], [ proxy_to_user: " + userName +
-                    ", resource id:" + resourceId + " ]");
-            throw e;
-        }
-    }
-
-    @Override
-    public String clientUpdateResource(String userName, String resourceId,
-                                       InputStream inputStream) throws ErrorException{
-        LOG.info("Update resource to bml server: [ proxy_to_user: " + userName +
-                ", resource id:" + resourceId + " ]");
-        try{
-            //File name is invalid;
-            BmlUpdateResponse response = client.updateResource(userName, resourceId, "filename", inputStream);
-            if(!response.isSuccess()){
-                throw new ErrorException(ServiceErrorCode.BML_SERVICE_ERROR.getValue(), "");
-            }
-            return response.version();
-        }catch(Exception e){
-            LOG.error("Fail to update resource to bml server[更新资源文件失败], [ proxy_to_user: " + userName +
-                    ", resource id:" + resourceId + " ]");
-            throw e;
-        }
-    }
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/service/impl/DataSourceInfoServiceImpl.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/service/impl/DataSourceInfoServiceImpl.java
deleted file mode 100644
index c948ed9..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/service/impl/DataSourceInfoServiceImpl.java
+++ /dev/null
@@ -1,370 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.service.impl;
-
-import com.github.pagehelper.PageHelper;
-import com.github.pagehelper.PageInfo;
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.dao.DataSourceParamKeyDao;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.dao.DataSourceTypeEnvDao;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.formdata.FormStreamContent;
-import com.webank.wedatasphere.linkis.datasourcemanager.common.util.json.Json;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.dao.DataSourceDao;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.dao.DataSourceEnvDao;
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSource;
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSourceEnv;
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSourceParamKeyDefinition;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.service.BmlAppService;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.service.DataSourceInfoService;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.vo.DataSourceEnvVo;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.vo.DataSourceVo;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.function.Consumer;
-import java.util.stream.Collectors;
-
-
-/**
- * @author davidhua
- * 2020/02/13
- */
-@Service
-public class DataSourceInfoServiceImpl implements DataSourceInfoService {
-
-    private static final Logger LOG = LoggerFactory.getLogger(DataSourceInfoService.class);
-    @Autowired
-    private BmlAppService bmlAppService;
-
-    @Autowired
-    private DataSourceTypeEnvDao dataSourceTypeEnvDao;
-
-    @Autowired
-    private DataSourceDao dataSourceDao;
-
-    @Autowired
-    private DataSourceEnvDao dataSourceEnvDao;
-
-    @Autowired
-    private DataSourceParamKeyDao dataSourceParamKeyDao;
-
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public void saveDataSourceInfo(DataSource dataSource) throws ErrorException {
-        storeConnectParams(dataSource.getCreateUser(), dataSource.getKeyDefinitions(),
-                dataSource.getConnectParams(), parameter ->{
-                dataSource.setParameter(parameter);
-                //Save information into database
-                dataSourceDao.insertOne(dataSource);
-        });
-    }
-
-    @Override
-    public void addEnvParamsToDataSource(Long dataSourceEnvId, DataSource dataSource) {
-        DataSourceEnv dataSourceEnv = dataSourceEnvDao.selectOneDetail(dataSourceEnvId);
-        if(null != dataSourceEnv){
-            Map<String, Object> envParamMap = dataSourceEnv.getConnectParams();
-            envParamMap.putAll(dataSource.getConnectParams());
-            dataSource.setConnectParams(envParamMap);
-        }
-    }
-
-    @Override
-    public DataSource getDataSourceInfo(Long dataSourceId, String createSystem) {
-         return dataSourceDao.selectOneDetail(dataSourceId, createSystem);
-    }
-
-    @Override
-    public DataSource getDataSourceInfoBrief(Long dataSourceId, String createSystem) {
-        return dataSourceDao.selectOne(dataSourceId, createSystem);
-    }
-
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public Long removeDataSourceInfo(Long dataSourceId, String createSystem) {
-        DataSource dataSource = dataSourceDao.selectOne(dataSourceId, createSystem);
-        if(null != dataSource){
-            //First to delete record in db
-            int affect = dataSourceDao.removeOne(dataSourceId, createSystem);
-            if(affect > 0){
-                //Remove resource
-                Map<String, Object> connectParams = dataSource.getConnectParams();
-                List<DataSourceParamKeyDefinition> keyDefinitions = dataSourceParamKeyDao
-                        .listByDataSourceType(dataSource.getDataSourceTypeId());
-                keyDefinitions.forEach(keyDefinition -> {
-                    if(keyDefinition.getValueType() == DataSourceParamKeyDefinition.ValueType.FILE
-                            && keyDefinition.getScope() != DataSourceParamKeyDefinition.Scope.ENV
-                            && connectParams.containsKey(keyDefinition.getKey())){
-                        try {
-                            //Proxy creator to delete resource
-                            bmlAppService.clientRemoveResource(dataSource.getCreateUser(), String
-                                    .valueOf(connectParams.get(keyDefinition.getKey())));
-                        }catch(Exception e){
-                            //Ignore remove error
-                        }
-                    }
-                });
-                return dataSourceId;
-            }
-        }
-        return -1L;
-    }
-
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public void updateDataSourceInfo(DataSource updatedOne, DataSource storedOne) throws ErrorException{
-        updateConnectParams(updatedOne.getCreateUser(), updatedOne.getKeyDefinitions(),
-                updatedOne.getConnectParams(), storedOne.getConnectParams(),
-                parameter -> {
-            updatedOne.setParameter(parameter);
-            //Save information into database
-            dataSourceDao.updateOne(updatedOne);
-        });
-    }
-
-    @Override
-    public List<DataSource> queryDataSourceInfoPage(DataSourceVo dataSourceVo) {
-        PageHelper.startPage(dataSourceVo.getCurrentPage(), dataSourceVo.getPageSize());
-        List<DataSource> queryList = dataSourceDao.selectByPageVo(dataSourceVo);
-        PageInfo<DataSource> pageInfo = new PageInfo<>(queryList);
-        return pageInfo.getList();
-    }
-
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public void saveDataSourceEnv(DataSourceEnv dataSourceEnv) throws ErrorException {
-        storeConnectParams(dataSourceEnv.getCreateUser(), dataSourceEnv.getKeyDefinitions(),
-                dataSourceEnv.getConnectParams(),
-                parameter ->{
-            dataSourceEnv.setParameter(parameter);
-            //Save environment into database
-            dataSourceEnvDao.insertOne(dataSourceEnv);
-            //Store relation
-            dataSourceTypeEnvDao.insertRelation(dataSourceEnv.getDataSourceTypeId(), dataSourceEnv.getId());
-        });
-    }
-
-    @Override
-    public List<DataSourceEnv> listDataSourceEnvByType(Long dataSourceTypeId) {
-        return dataSourceEnvDao.listByTypeId(dataSourceTypeId);
-    }
-
-    @Override
-    public DataSourceEnv getDataSourceEnv(Long envId) {
-        return dataSourceEnvDao.selectOneDetail(envId);
-    }
-
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public Long removeDataSourceEnv(Long envId) {
-       DataSourceEnv dataSourceEnv = dataSourceEnvDao.selectOneDetail(envId);
-       if(null != dataSourceEnv){
-            //First to delete record in db
-           int affect = dataSourceEnvDao.removeOne(envId);
-           if(affect > 0){
-               //Remove relations
-               dataSourceTypeEnvDao.removeRelationsByEnvId(envId);
-               //Remove resource
-               Map<String, Object> connectParams = dataSourceEnv.getConnectParams();
-               List<DataSourceParamKeyDefinition> keyDefinitions = dataSourceParamKeyDao
-                       .listByDataSourceTypeAndScope(dataSourceEnv.getDataSourceTypeId(), DataSourceParamKeyDefinition.Scope.ENV);
-               keyDefinitions.forEach(keyDefinition -> {
-                    if(keyDefinition.getValueType() == DataSourceParamKeyDefinition.ValueType.FILE
-                            && connectParams.containsKey(keyDefinition.getKey())){
-                        try{
-                            //Proxy creator to delete resource
-                            bmlAppService.clientRemoveResource(dataSourceEnv.getCreateUser(), String
-                                .valueOf(connectParams.get(keyDefinition.getKey())));
-                        }catch(Exception e){
-                            //Ignore remove error
-                        }
-                    }
-               });
-               return envId;
-           }
-       }
-       return -1L;
-    }
-
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public void updateDataSourceEnv(DataSourceEnv updatedOne, DataSourceEnv storedOne) throws ErrorException {
-        updateConnectParams(updatedOne.getCreateUser(), updatedOne.getKeyDefinitions(),
-                updatedOne.getConnectParams(), storedOne.getConnectParams(),
-                parameter ->{
-            updatedOne.setParameter(parameter);
-            //Update environment into database
-            dataSourceEnvDao.updateOne(updatedOne);
-            if(!updatedOne.getDataSourceTypeId().equals(storedOne.getDataSourceTypeId())){
-                //Remove old relation and add new relation
-                dataSourceTypeEnvDao.removeRelationsByEnvId(updatedOne.getId());
-                dataSourceTypeEnvDao.insertRelation(updatedOne.getDataSourceTypeId(), updatedOne.getId());
-            }
-        });
-    }
-
-    @Override
-    public List<DataSourceEnv> queryDataSourceEnvPage(DataSourceEnvVo dataSourceEnvVo) {
-        PageHelper.startPage(dataSourceEnvVo.getCurrentPage(), dataSourceEnvVo.getPageSize());
-        List<DataSourceEnv> queryList = dataSourceEnvDao.selectByPageVo(dataSourceEnvVo);
-        PageInfo<DataSourceEnv> pageInfo = new PageInfo<>(queryList);
-        return pageInfo.getList();
-    }
-
-    /**
-     *
-     * @param userName
-     * @param keyDefinitionList
-     * @param updatedParams
-     * @param storedParams
-     * @param parameterCallback
-     * @throws ErrorException
-     */
-    private void updateConnectParams(String userName, List<DataSourceParamKeyDefinition> keyDefinitionList,
-                                     Map<String, Object> updatedParams, Map<String, Object> storedParams,
-                                     Consumer<String> parameterCallback) throws ErrorException {
-        List<String> definedKeyNames = keyDefinitionList.stream().map(DataSourceParamKeyDefinition::getKey)
-                .collect(Collectors.toList());
-        List<String> uploadedResources = new ArrayList<>();
-        try {
-            updatedParams.entrySet().removeIf(entry -> {
-                if (!definedKeyNames.contains(entry.getKey())) {
-                    return true;
-                }
-                Object paramValue = entry.getValue();
-                if (paramValue instanceof FormStreamContent) {
-                    String resourceId = String.valueOf(storedParams.getOrDefault(entry.getKey(), ""));
-                    if (StringUtils.isNotBlank(resourceId)) {
-                        uploadFormStream(userName, (FormStreamContent) paramValue, resourceId);
-                    } else {
-                        resourceId = uploadFormStream(userName, (FormStreamContent) paramValue, "");
-                    }
-                    if (null == resourceId) {
-                        return true;
-                    }
-                    uploadedResources.add(resourceId);
-                    entry.setValue(resourceId);
-                }
-                storedParams.remove(entry.getKey());
-                return false;
-            });
-            //Found the duplicate File
-            List<String> duplicateResources = new ArrayList<>();
-            keyDefinitionList.forEach( definedKey-> {
-               if(definedKey.getValueType() == DataSourceParamKeyDefinition.ValueType.FILE
-                    && storedParams.containsKey(definedKey.getKey())){
-                    duplicateResources.add(String.valueOf(storedParams.get(definedKey.getKey())));
-                }
-            });
-            parameterCallback.accept(Json.toJson(updatedParams, null));
-            deleteResources(userName, duplicateResources);
-        }catch(Exception e){
-            deleteResources(userName, uploadedResources);
-            if(e.getCause() instanceof  ErrorException){
-                throw (ErrorException)e.getCause();
-            }
-            throw e;
-        }
-    }
-
-    /**
-     * Upload the form stream context in connect parameters,
-     * and serialize parameters
-     * @param keyDefinitionList
-     * @param connectParams
-     * @param parameterCallback
-     */
-    private void storeConnectParams(String userName, List<DataSourceParamKeyDefinition> keyDefinitionList,
-                                    Map<String, Object> connectParams,
-                                    Consumer<String> parameterCallback) throws ErrorException{
-        List<String> definedKeyNames = keyDefinitionList.stream().map(DataSourceParamKeyDefinition::getKey)
-                .collect(Collectors.toList());
-        List<String> uploadedResources = new ArrayList<>();
-        try{
-            connectParams.entrySet().removeIf(entry -> {
-                if(!definedKeyNames.contains(entry.getKey())){
-                    return true;
-                }
-                Object paramValue = entry.getValue();
-                //Upload stream resource in connection params
-                if (paramValue instanceof FormStreamContent) {
-                    String resourceId = uploadFormStream(userName, (FormStreamContent)paramValue, "");
-                    if(null == resourceId) {
-                        return true;
-                    }
-                    uploadedResources.add(resourceId);
-                    entry.setValue(resourceId);
-                }
-                return false;
-            });
-            parameterCallback.accept(Json.toJson(connectParams, null));
-        }catch(Exception e){
-            deleteResources(userName, uploadedResources);
-            if(e.getCause() instanceof ErrorException){
-                throw (ErrorException)e.getCause();
-            }
-            throw e;
-        }
-    }
-
-    /**
-     * Upload form stream
-     * @param userName user name
-     * @param streamContent stream content
-     * @param resourceId resource id
-     * @return resource id or version tab
-     */
-    private String uploadFormStream(String userName, FormStreamContent streamContent, String resourceId){
-        String fileName = streamContent.getFileName();
-        InputStream inputStream = streamContent.getStream();
-        if (null != inputStream){
-            //Proxy creator to upload resource
-            try{
-                return StringUtils.isBlank(resourceId)? bmlAppService.clientUploadResource(userName, fileName, inputStream)
-                        : bmlAppService.clientUpdateResource(userName, resourceId, inputStream);
-            }catch(Exception e){
-                //Wrap with runtime exception
-                throw new RuntimeException(e);
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Delete uploaded resources
-     * @param userName user name
-     * @param uploadedResources resource id list
-     */
-    private void deleteResources(String userName, List<String> uploadedResources){
-        if(!uploadedResources.isEmpty()){
-            //Remove duplicated resource
-            for (String resourceId : uploadedResources) {
-                try{
-                    //Proxy to delete resource
-                    bmlAppService.clientRemoveResource(userName, resourceId);
-                }catch(Exception ie){
-                    //ignore
-                }
-            }
-        }
-    }
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/service/impl/DataSourceRelateServiceImpl.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/service/impl/DataSourceRelateServiceImpl.java
deleted file mode 100644
index 16c7ad3..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/service/impl/DataSourceRelateServiceImpl.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.service.impl;
-
-import com.webank.wedatasphere.linkis.datasourcemanager.core.dao.DataSourceTypeDao;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.dao.DataSourceParamKeyDao;
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSourceParamKeyDefinition;
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSourceType;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.service.DataSourceRelateService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * @author davidhua
- * 2020/02/14
- */
-@Service
-public class DataSourceRelateServiceImpl implements DataSourceRelateService {
-
-    @Autowired
-    private DataSourceParamKeyDao paramKeyDao;
-
-    @Autowired
-    private DataSourceTypeDao dataSourceTypeDao;
-
-    @Override
-    public List<DataSourceParamKeyDefinition> getKeyDefinitionsByType(Long dataSourceTypeId, DataSourceParamKeyDefinition.Scope scope) {
-        return paramKeyDao.listByDataSourceTypeAndScope(dataSourceTypeId, scope);
-    }
-
-    @Override
-    public List<DataSourceParamKeyDefinition> getKeyDefinitionsByType(Long dataSourceTypeId) {
-        return paramKeyDao.listByDataSourceType(dataSourceTypeId);
-    }
-
-    @Override
-    public List<DataSourceType> getAllDataSourceTypes() {
-        return dataSourceTypeDao.getAllTypes();
-    }
-
-    @Override
-    public DataSourceType getDataSourceType(Long typeId) {
-        return dataSourceTypeDao.selectOne(typeId);
-    }
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/service/impl/MetadataOperateServiceImpl.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/service/impl/MetadataOperateServiceImpl.java
deleted file mode 100644
index 910e26a..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/service/impl/MetadataOperateServiceImpl.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.service.impl;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.common.exception.WarnException;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.formdata.FormStreamContent;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.service.BmlAppService;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.service.MetadataOperateService;
-import com.webank.wedatasphere.linkis.metadatamanager.common.protocol.MetadataConnect;
-import com.webank.wedatasphere.linkis.metadatamanager.common.protocol.MetadataResponse;
-import com.webank.wedatasphere.linkis.rpc.Sender;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import static com.webank.wedatasphere.linkis.datasourcemanager.common.ServiceErrorCode.BML_SERVICE_ERROR;
-import static com.webank.wedatasphere.linkis.datasourcemanager.common.ServiceErrorCode.REMOTE_METADATA_SERVICE_ERROR;
-
-/**
- * @author davidhua
- * 2020/02/14
- */
-@Service
-public class MetadataOperateServiceImpl implements MetadataOperateService {
-
-    private static final Logger LOG = LoggerFactory.getLogger(MetadataOperateService.class);
-    @Autowired
-    private BmlAppService bmlAppService;
-    @Override
-    public void doRemoteConnect(String mdRemoteServiceName ,
-                                String operator, Map<String, Object> connectParams) throws WarnException {
-        List<String> uploadedResources = new ArrayList<>();
-        try{
-            connectParams.entrySet().removeIf(entry -> {
-                Object paramValue = entry.getValue();
-                //Upload stream resource in connection parameters
-                if(paramValue instanceof FormStreamContent){
-                    FormStreamContent streamContent = (FormStreamContent)paramValue;
-                    String fileName = streamContent.getFileName();
-                    InputStream inputStream = streamContent.getStream();
-                    if (null != inputStream){
-                        try {
-                            String resourceId = bmlAppService.clientUploadResource(operator,
-                                    fileName, inputStream);
-                            if(null == resourceId){
-                                return true;
-                            }
-                            uploadedResources.add(resourceId);
-                            entry.setValue(resourceId);
-                        } catch (ErrorException e) {
-                            throw new WarnException(BML_SERVICE_ERROR.getValue(), "Fail to operate file in request[上传文件处理失败]");
-                        }
-                    }
-                }
-                return false;
-            });
-            LOG.info("Send request to metadata service:[" + mdRemoteServiceName + "] for building a connection");
-            //Get a sender
-            Sender sender = Sender.getSender(mdRemoteServiceName);
-            try {
-                Object object = sender.ask(new MetadataConnect(operator, connectParams, ""));
-                if (object instanceof MetadataResponse) {
-                    MetadataResponse response = (MetadataResponse) object;
-                    if (!response.status()) {
-                        throw new WarnException(REMOTE_METADATA_SERVICE_ERROR.getValue(),
-                                "Connection Failed[连接失败], Msg[" + response.data() + "]");
-                    }
-                } else {
-                    throw new WarnException(REMOTE_METADATA_SERVICE_ERROR.getValue(),
-                            "Remote Service Error[远端服务出错, 联系运维处理]");
-                }
-            }catch(Throwable t){
-                if(!(t instanceof WarnException)) {
-                    throw new WarnException(REMOTE_METADATA_SERVICE_ERROR.getValue(),
-                            "Remote Service Error[远端服务出错, 联系运维处理]");
-                }
-                throw t;
-            }
-        }finally{
-            if(!uploadedResources.isEmpty()){
-                uploadedResources.forEach( resourceId ->{
-                    try{
-                        //Proxy to delete resource
-                        bmlAppService.clientRemoveResource(operator, resourceId);
-                    }catch(Exception e){
-                        //ignore
-                    }
-                });
-            }
-        }
-    }
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/validate/DataSourceParameterValidator.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/validate/DataSourceParameterValidator.java
deleted file mode 100644
index 29e9e72..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/validate/DataSourceParameterValidator.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.validate;
-
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSourceParamKeyDefinition;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.validate.strategy.RegExpParameterValidateStrategy;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.validate.strategy.TypeParameterValidateStrategy;
-import org.apache.commons.lang.StringUtils;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.PostConstruct;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author georgeqiao
- * 2020/02/11
- */
-
-
-@Component
-public class DataSourceParameterValidator implements ParameterValidator {
-    @PostConstruct
-    public void initToRegister(){
-        registerStrategy(new TypeParameterValidateStrategy());
-        registerStrategy(new RegExpParameterValidateStrategy());
-    }
-    /**
-     * strategies list
-     */
-    private List<ParameterValidateStrategy> strategies = new ArrayList<>();
-
-    @Override
-    public void registerStrategy(ParameterValidateStrategy strategy) {
-        strategies.add(strategy);
-    }
-
-    @Override
-    public void validate(List<DataSourceParamKeyDefinition> paramKeyDefinitions,
-                         Map<String, Object> parameters) throws ParameterValidateException{
-        for(DataSourceParamKeyDefinition paramKeyDefinition : paramKeyDefinitions){
-            String keyName = paramKeyDefinition.getKey();
-            Object keyValue = parameters.get(keyName);
-            DataSourceParamKeyDefinition.ValueType valueType = paramKeyDefinition.getValueType();
-            if(null == keyValue){
-                String defaultValue = paramKeyDefinition.getDefaultValue();
-                if(StringUtils.isNotBlank(defaultValue) &&
-                        valueType == DataSourceParamKeyDefinition.ValueType.SELECT){
-                    defaultValue = defaultValue.split(",")[0].trim();
-                }
-                keyValue = defaultValue;
-            }
-            if(null == keyValue || StringUtils.isBlank(String.valueOf(keyValue))){
-                if(paramKeyDefinition.isRequire()) {
-                    throw new ParameterValidateException("Param Validate Failed[参数校验出错], [the value of key: '"
-                            + keyName + " cannot be blank']");
-                }
-                continue;
-            }
-            for(ParameterValidateStrategy validateStrategy : strategies){
-                if(validateStrategy.accept(valueType)) {
-                    validateStrategy.validate(paramKeyDefinition, keyValue);
-                }
-            }
-        }
-    }
-
-    @Override
-    public List<ParameterValidateStrategy> getStrategies() {
-        return strategies;
-    }
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/validate/ParameterValidateException.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/validate/ParameterValidateException.java
deleted file mode 100644
index 448cd73..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/validate/ParameterValidateException.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.validate;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-
-import static com.webank.wedatasphere.linkis.datasourcemanager.common.ServiceErrorCode.PARAM_VALIDATE_ERROR;
-
-
-/**
- * @author georgeqiao
- * 2020/02/11
- */
-
-
-public class ParameterValidateException extends ErrorException {
-    public ParameterValidateException(String desc) {
-        super(PARAM_VALIDATE_ERROR.getValue(), desc);
-    }
-
-    public ParameterValidateException(String desc, String ip, int port, String serviceKind) {
-        super(PARAM_VALIDATE_ERROR.getValue(), desc, ip, port, serviceKind);
-    }
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/validate/ParameterValidateStrategy.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/validate/ParameterValidateStrategy.java
deleted file mode 100644
index 1d25b30..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/validate/ParameterValidateStrategy.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.validate;
-
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSourceParamKeyDefinition;
-
-/**
- * Parameter validate strategy
- * @author georgeqiao
- * 2020/02/11
- */
-public interface ParameterValidateStrategy {
-    /**
-     * If accept value type
-     * @param valueType validate type
-     * @return result
-     */
-    boolean accept(DataSourceParamKeyDefinition.ValueType valueType);
-
-    /**
-     * Validate actual value by key definition
-     * @param keyDefinition key definition
-     * @param actualValue actual value
-     * @return new value
-     */
-    Object validate(DataSourceParamKeyDefinition keyDefinition,
-                  Object actualValue) throws ParameterValidateException;
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/validate/ParameterValidator.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/validate/ParameterValidator.java
deleted file mode 100644
index 89ff0f7..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/validate/ParameterValidator.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.validate;
-
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSourceParamKeyDefinition;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author georgeqiao
- * 2020/02/11
- */
-
-
-public interface ParameterValidator {
-    /**
-     * Register validate strategy
-     * @param strategy strategy
-     */
-    void registerStrategy(ParameterValidateStrategy strategy);
-
-    /**
-     * Validate parameter dictionary
-     * @param paramKeyDefinitions definitions
-     * @param parameters parameters
-     */
-    void validate(List<DataSourceParamKeyDefinition> paramKeyDefinitions,
-                  Map<String, Object> parameters) throws ParameterValidateException;
-
-    /**
-     * Get all strategies
-     * @return
-     */
-    List<ParameterValidateStrategy> getStrategies();
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/validate/strategy/RegExpParameterValidateStrategy.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/validate/strategy/RegExpParameterValidateStrategy.java
deleted file mode 100644
index 64c639a..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/validate/strategy/RegExpParameterValidateStrategy.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.validate.strategy;
-
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSourceParamKeyDefinition;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.validate.ParameterValidateException;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.validate.ParameterValidateStrategy;
-import org.apache.commons.lang.StringUtils;
-
-import java.util.List;
-
-/**
- * RegExpression validate strategy
- * @author georgeqiao
- * 2020/02/11
- */
-public class RegExpParameterValidateStrategy implements ParameterValidateStrategy {
-
-
-    @Override
-    public boolean accept(DataSourceParamKeyDefinition.ValueType valueType) {
-        return valueType == DataSourceParamKeyDefinition.ValueType.EMAIL || valueType == DataSourceParamKeyDefinition.ValueType.TEXT || valueType == DataSourceParamKeyDefinition.ValueType.LIST;
-    }
-
-    @Override
-    public Object validate(DataSourceParamKeyDefinition keyDefinition,
-                         Object actualValue) throws ParameterValidateException {
-        String valueRegex = keyDefinition.getValueRegex();
-        if(StringUtils.isNotBlank(valueRegex)){
-            if(actualValue instanceof List){
-                List valueList = ((List)actualValue);
-                for(Object value : valueList){
-                   match(keyDefinition.getKey(), keyDefinition.getName(), String.valueOf(value), valueRegex);
-                }
-            }else{
-                match(keyDefinition.getKey(), keyDefinition.getName(), String.valueOf(actualValue), valueRegex);
-            }
-
-        }
-        return actualValue;
-    }
-
-    private void match(String key,  String name, String value, String valueRegex) throws ParameterValidateException {
-        boolean match = String.valueOf(value).matches(valueRegex);
-        if(!match){
-            throw new ParameterValidateException("Param Validate Failed[参数校验出错], [the value: '"
-                    + String.valueOf(value) + "' to key: '"
-                    + key + "(" + name +")' doesn't match]");
-        }
-    }
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/validate/strategy/TypeParameterValidateStrategy.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/validate/strategy/TypeParameterValidateStrategy.java
deleted file mode 100644
index bbc0af7..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/validate/strategy/TypeParameterValidateStrategy.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.validate.strategy;
-
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSourceParamKeyDefinition;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.formdata.FormStreamContent;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.validate.ParameterValidateException;
-import com.webank.wedatasphere.linkis.datasourcemanager.core.validate.ParameterValidateStrategy;
-import com.webank.wedatasphere.linkis.metadatamanager.common.Json;
-
-import java.util.List;
-import java.util.Map;
-
-import static com.webank.wedatasphere.linkis.datasourcemanager.core.formdata.CustomMultiPartFormDataTransformer.*;
-
-/**
- * Type validate strategy
- * @author georgeqiao
- * 2020/02/13
- */
-public class TypeParameterValidateStrategy implements ParameterValidateStrategy {
-    @Override
-    public boolean accept(DataSourceParamKeyDefinition.ValueType valueType) {
-        //Accept all value
-        return true;
-    }
-
-    @Override
-    public Object validate(DataSourceParamKeyDefinition keyDefinition,
-                         Object actualValue) throws ParameterValidateException {
-        DataSourceParamKeyDefinition.ValueType valueType = keyDefinition.getValueType();
-        Class<?> javaType = valueType.getJavaType();
-        if(valueType == DataSourceParamKeyDefinition.ValueType.FILE ){
-            if(!actualValue.getClass().equals(FormStreamContent.class)){
-                throw new ParameterValidateException("Param Validate Failed[参数校验出错], [the value of '"
-                        + keyDefinition.getKey() + "' must be 'File']");
-            }
-            return actualValue;
-        }
-        if(!javaType.isAssignableFrom(actualValue.getClass())){
-            try {
-                if(javaType.equals(List.class)){
-                    return Json.fromJson(String.valueOf(actualValue), List.class, String.class);
-                }else if(javaType.equals(Map.class)){
-                    return Json.fromJson(String.valueOf(actualValue), Map.class, String.class, String.class);
-                }else if(PrimitiveUtils.isPrimitive(javaType)){
-                    return PrimitiveUtils.primitiveTypeConverse(actualValue, javaType);
-                }
-            }catch(Exception e){
-                throw new ParameterValidateException("Param Validate Failed[参数校验出错], [type of value: '"
-                    + actualValue + "' is not '" + javaType.getSimpleName() + "']");
-            }
-           throw new ParameterValidateException("Param Validate Failed[参数校验出错], [type of value: '"
-                   + actualValue + "' is not '" + javaType.getSimpleName() + "']");
-        }
-        return actualValue;
-    }
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/vo/DataSourceEnvVo.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/vo/DataSourceEnvVo.java
deleted file mode 100644
index 10a6b80..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/vo/DataSourceEnvVo.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.vo;
-
-
-/**
- * @author georgeqiao
- * 2020/02/11
- */
-public class DataSourceEnvVo extends PageViewVo{
-
-    private String envName;
-
-    private Long dataSourceTypeId;
-
-    public DataSourceEnvVo(){
-
-    }
-
-    public DataSourceEnvVo(String envName, Long dataSourceTypeId){
-        this.envName = envName;
-        this.dataSourceTypeId = dataSourceTypeId;
-    }
-
-    public String getEnvName() {
-        return envName;
-    }
-
-    public void setEnvName(String envName) {
-        this.envName = envName;
-    }
-
-    public Long getDataSourceTypeId() {
-        return dataSourceTypeId;
-    }
-
-    public void setDataSourceTypeId(Long dataSourceTypeId) {
-        this.dataSourceTypeId = dataSourceTypeId;
-    }
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/vo/DataSourceVo.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/vo/DataSourceVo.java
deleted file mode 100644
index 7a8d2e4..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/vo/DataSourceVo.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.vo;
-
-
-import org.apache.commons.lang.StringUtils;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * @author georgeqiao
- * 2020/02/11
- */
-public class DataSourceVo extends PageViewVo{
-
-    private String dataSourceName;
-
-    private Long dataSourceTypeId;
-
-    private List<String> createIdentifyList = new ArrayList<>();
-
-    private String createSystem;
-
-    public DataSourceVo(){
-
-    }
-
-    public DataSourceVo(String dataSourceName, Long dataSourceTypeId,
-                        String createIdentifies, String createSystem){
-        this.dataSourceName = dataSourceName;
-        this.dataSourceTypeId = dataSourceTypeId;
-        if(StringUtils.isNotBlank(createIdentifies)){
-            createIdentifyList.addAll(Arrays.asList(createIdentifies.split(",")));
-        }
-        this.createSystem = createSystem;
-    }
-    public String getDataSourceName() {
-        return dataSourceName;
-    }
-
-    public void setDataSourceName(String dataSourceName) {
-        this.dataSourceName = dataSourceName;
-    }
-
-    public Long getDataSourceTypeId() {
-        return dataSourceTypeId;
-    }
-
-    public void setDataSourceTypeId(Long dataSourceTypeId) {
-        this.dataSourceTypeId = dataSourceTypeId;
-    }
-
-
-    public String getCreateSystem() {
-        return createSystem;
-    }
-
-    public void setCreateSystem(String createSystem) {
-        this.createSystem = createSystem;
-    }
-
-    public List<String> getCreateIdentifyList() {
-        return createIdentifyList;
-    }
-
-    public void setCreateIdentifyList(List<String> createIdentifyList) {
-        this.createIdentifyList = createIdentifyList;
-    }
-}
diff --git a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/vo/PageViewVo.java b/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/vo/PageViewVo.java
deleted file mode 100644
index 9db3b1f..0000000
--- a/datasource/datasourcemanager/server/src/main/java/com/webank/wedatasphere/linkis/datasourcemanager/core/vo/PageViewVo.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.vo;
-
-/**
- * @author georgeqiao
- * 2020/02/11
- */
-public class PageViewVo {
-    private int currentPage;
-    private int pageSize;
-
-    public int getCurrentPage() {
-        return currentPage;
-    }
-
-    public void setCurrentPage(int currentPage) {
-        this.currentPage = currentPage;
-    }
-
-    public int getPageSize() {
-        return pageSize;
-    }
-
-    public void setPageSize(int pageSize) {
-        this.pageSize = pageSize;
-    }
-}
diff --git a/datasource/datasourcemanager/server/src/main/scala/com/webank/wedatasphere/linkis/datasourcemanager/core/receivers/DsmReceiver.scala b/datasource/datasourcemanager/server/src/main/scala/com/webank/wedatasphere/linkis/datasourcemanager/core/receivers/DsmReceiver.scala
deleted file mode 100644
index 58f106e..0000000
--- a/datasource/datasourcemanager/server/src/main/scala/com/webank/wedatasphere/linkis/datasourcemanager/core/receivers/DsmReceiver.scala
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.datasourcemanager.core.receivers
-
-import com.webank.wedatasphere.linkis.common.utils.{Logging, Utils}
-import com.webank.wedatasphere.linkis.datasourcemanager.core.service.{DataSourceInfoService, DataSourceRelateService}
-import com.webank.wedatasphere.linkis.datasourcemanager.common.protocol.DsInfoResponse
-import com.webank.wedatasphere.linkis.rpc.{Receiver, Sender}
-import org.springframework.beans.factory.annotation.Autowired
-import org.springframework.stereotype.Component
-
-import scala.concurrent.duration.Duration
-import java.util
-
-import com.webank.wedatasphere.linkis.datasourcemanager.common.domain.DataSource
-import com.webank.wedatasphere.linkis.datasourcemanager.common.protocol.{DsInfoQueryRequest, DsInfoResponse}
-import com.webank.wedatasphere.linkis.datasourcemanager.core.restful.RestfulApiHelper
-import com.webank.wedatasphere.linkis.datasourcemanager.core.service.{DataSourceInfoService, DataSourceRelateService}
-import com.webank.wedatasphere.linkis.datasourcemanager.core.restful.RestfulApiHelper
-/**
- * @author georgeqiao
- *  2020/02/10
- */
-@Component
-class DsmReceiver extends Receiver with Logging{
-
-  @Autowired
-  private var dataSourceInfoService: DataSourceInfoService = _
-
-  @Autowired
-  private var dataSourceRelateService: DataSourceRelateService = _
-
-  override def receive(message: Any, sender: Sender): Unit = ???
-
-  override def receiveAndReply(message: Any, sender: Sender): Any = message match {
-    case DsInfoQueryRequest(id, system) =>
-      if ( id.toLong > 0 &&  Some(system).isDefined ) {
-        Utils.tryCatch {
-          val dataSource: DataSource = dataSourceInfoService.getDataSourceInfo(id.toLong, system)
-          if ( null != dataSource ) {
-            RestfulApiHelper.decryptPasswordKey(dataSourceRelateService.getKeyDefinitionsByType(dataSource.getDataSourceTypeId),
-              dataSource.getConnectParams)
-            DsInfoResponse(status = true, dataSource.getDataSourceType.getName,
-              dataSource.getConnectParams, dataSource.getCreateUser)
-          }else DsInfoResponse(status = true, "", new util.HashMap[String, Object](), "")
-        }{
-          case e: Exception => logger.error(s"Fail to get data source information, id:$id system:$system", e)
-            DsInfoResponse(status = false, "", new util.HashMap[String, Object](), "")
-          case t: Throwable => logger.error(s"Fail to get data source information, id:$id system:$system", t)
-            DsInfoResponse(status = false, "", new util.HashMap[String, Object](), "")
-        }
-      } else {
-        DsInfoResponse(status = true, "", new util.HashMap[String, Object](), "")
-      }
-    case _ => new Object()
-  }
-
-  override def receiveAndReply(message: Any, duration: Duration, sender: Sender): Any = message match {
-    case DsInfoQueryRequest(id, system) =>
-      if ( id.toLong > 0 &&  Some(system).isDefined ) {
-        Utils.tryCatch {
-          val dataSource: DataSource = dataSourceInfoService.getDataSourceInfo(id.toLong, system)
-          if ( null != dataSource ) {
-            RestfulApiHelper.decryptPasswordKey(dataSourceRelateService.getKeyDefinitionsByType(dataSource.getDataSourceTypeId),
-              dataSource.getConnectParams)
-            DsInfoResponse(status = true, dataSource.getDataSourceType.getName,
-              dataSource.getConnectParams, dataSource.getCreateUser)
-          }else DsInfoResponse(status = true, "", new util.HashMap[String, Object](), "")
-        }{
-          case e: Exception => logger.error(s"Fail to get data source information, id:$id system:$system", e)
-            DsInfoResponse(status = false, "", new util.HashMap[String, Object](), "")
-          case t: Throwable => logger.error(s"Fail to get data source information, id:$id system:$system", t)
-            DsInfoResponse(status = false, "", new util.HashMap[String, Object](), "")
-        }
-      } else {
-        DsInfoResponse(status = true, "", new util.HashMap[String, Object](), "")
-      }
-    case _ => new Object()
-  }
-}
diff --git a/datasource/metadatamanager/common/pom.xml b/datasource/metadatamanager/common/pom.xml
deleted file mode 100644
index c3b9381..0000000
--- a/datasource/metadatamanager/common/pom.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  ~ Copyright 2019 WeBank
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>linkis-metadatamanager-common</artifactId>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    </properties>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-common</artifactId>
-            <exclusions>
-                <exclusion>
-                    <artifactId>asm</artifactId>
-                    <groupId>org.ow2.asm</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <!--rpc-->
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cloudRPC</artifactId>
-            </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>src/main/resources</directory>
-            </resource>
-        </resources>
-        <finalName>${project.artifactId}-${project.version}</finalName>
-    </build>
-</project>
diff --git a/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/Json.java b/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/Json.java
deleted file mode 100644
index 203c4a1..0000000
--- a/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/Json.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.metadatamanager.common;
-
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.*;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-
-/**
- * Json utils
- * Created by jackyxxie on 2018/9/3.
- */
-public class Json {
-    private static final String PREFIX = "[";
-    private static final String SUFFIX = "]";
-    private static final Logger logger = LoggerFactory.getLogger(Json.class);
-
-    private static ObjectMapper mapper;
-
-    static{
-        mapper = new ObjectMapper();
-        mapper.configure(JsonParser.Feature.ALLOW_COMMENTS, true);
-        mapper.configure(JsonParser.Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);
-        mapper.configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true);
-        mapper.configure(DeserializationFeature.READ_ENUMS_USING_TO_STRING, true);
-        mapper.configure(SerializationFeature.WRITE_ENUMS_USING_TO_STRING, true);
-        mapper.configure(JsonParser.Feature.ALLOW_UNQUOTED_CONTROL_CHARS, true);
-        //empty beans allowed
-        mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
-        //ignore unknown properties
-        mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
-        //cancel to scape non ascii
-        mapper.configure(JsonGenerator.Feature.ESCAPE_NON_ASCII, false);
-    }
-    private Json(){}
-
-    @SuppressWarnings("unchecked")
-    public static <T> T fromJson(String json, Class<?> clazz, Class<?>... parameters){
-        if(StringUtils.isNotBlank(json)){
-            try{
-                if(parameters.length > 0){
-                    return (T)mapper.readValue(json, mapper.getTypeFactory().constructParametricType(clazz, parameters));
-                }
-                if(json.startsWith(PREFIX)
-                    && json.endsWith(SUFFIX)){
-                    JavaType javaType = mapper.getTypeFactory()
-                            .constructParametricType(ArrayList.class, clazz);
-                    return mapper.readValue(json, javaType);
-                }
-                return (T)mapper.readValue(json, clazz);
-            } catch (Exception e) {
-                logger.info(e.getLocalizedMessage());
-                throw new RuntimeException(e);
-            }
-        }
-        return null;
-    }
-
-    public static <T> T fromJson(InputStream stream, Class<?> clazz, Class<?>... parameters){
-        StringBuilder builder = new StringBuilder();
-        String jsonStr = null;
-        try{
-            BufferedReader reader = new BufferedReader(new InputStreamReader(stream, "UTF-8"));
-            while((jsonStr = reader.readLine()) != null){
-                builder.append(jsonStr);
-            }
-            reader.close();
-        }catch(Exception e){
-            logger.info(e.getLocalizedMessage());
-            throw new RuntimeException(e);
-        }
-        return fromJson(builder.toString(), clazz, parameters);
-    }
-
-    public static String toJson(Object obj, Class<?> model){
-        ObjectWriter writer = mapper.writer();
-        if(null != obj){
-            try{
-                if(null != model){
-                    writer = writer.withView(model);
-                }
-                return writer.writeValueAsString(obj);
-            } catch (JsonProcessingException e) {
-                logger.info(e.getLocalizedMessage());
-                throw new RuntimeException(e);
-            }
-        }
-        return null;
-    }
-
-}
diff --git a/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/MdmConfiguration.java b/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/MdmConfiguration.java
deleted file mode 100644
index 480b36d..0000000
--- a/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/MdmConfiguration.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.metadatamanager.common;
-
-import com.webank.wedatasphere.linkis.common.conf.CommonVars;
-
-/**
- * Created by jackyxxie on 2020/2/10.
- */
-public class MdmConfiguration {
-
-    public static CommonVars<String> METADATA_SERVICE_APPLICATION =
-            CommonVars.apply("wds.linkis.server.mdm.service.app.name", "mdm-service");
-
-    public static CommonVars<String> DATA_SOURCE_SERVICE_APPLICATION =
-            CommonVars.apply("wds.linkis.server.dsm.app.name", "dsm-server");
-}
diff --git a/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/cache/CacheConfiguration.java b/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/cache/CacheConfiguration.java
deleted file mode 100644
index 01d083d..0000000
--- a/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/cache/CacheConfiguration.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.metadatamanager.common.cache;
-
-import com.webank.wedatasphere.linkis.common.conf.CommonVars;
-
-/**
- * Created by jackyxxie on 2020/02/14.
- */
-public class CacheConfiguration {
-
-    public static CommonVars<Long> CACHE_MAX_SIZE =
-            CommonVars.apply("wds.linkis.server.mdm.service.cache.size", 1000L);
-
-    public static CommonVars<Long> CACHE_EXPIRE_TIME =
-            CommonVars.apply("wds.linkis.server.mdm.service.cache.expire", 600L);
-}
diff --git a/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/cache/CacheManager.java b/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/cache/CacheManager.java
deleted file mode 100644
index a1c608a..0000000
--- a/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/cache/CacheManager.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.metadatamanager.common.cache;
-
-
-import com.google.common.cache.Cache;
-import com.google.common.cache.CacheLoader;
-import com.google.common.cache.LoadingCache;
-import com.google.common.cache.RemovalListener;
-
-/**
- * Created by jackyxxie on 2020/2/14.
- */
-public interface CacheManager {
-    /**
-     * build simple cache
-     * @param cacheId
-     * @param removalListener
-     * @return
-     */
-    <V> Cache<String, V> buildCache(String cacheId, RemovalListener<String, V> removalListener);
-
-    /**
-     * build loading cache
-     * @param cacheId
-     * @param loader
-     * @param removalListener
-     * @return
-     */
-    <V> LoadingCache<String, V> buildCache(String cacheId, CacheLoader<String, V> loader, RemovalListener<String, V> removalListener);
-}
diff --git a/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/cache/ConnCacheManager.java b/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/cache/ConnCacheManager.java
deleted file mode 100644
index 7d96236..0000000
--- a/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/cache/ConnCacheManager.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.metadatamanager.common.cache;
-
-import com.google.common.cache.*;
-
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.TimeUnit;
-
-/**
- * Created by jackyxxie on 2020/02/14.
- */
-public class ConnCacheManager implements CacheManager {
-    private ConcurrentHashMap<String, Cache> cacheStore = new ConcurrentHashMap<>();
-    private ConnCacheManager(){
-
-    }
-
-    public static CacheManager custom(){
-        return new ConnCacheManager();
-    }
-
-    @Override
-    public <V> Cache<String, V> buildCache(String cacheId, RemovalListener<String, V> removalListener) {
-        Cache<String, V> vCache = CacheBuilder.newBuilder()
-                .maximumSize(CacheConfiguration.CACHE_MAX_SIZE.getValue())
-                .expireAfterWrite(CacheConfiguration.CACHE_EXPIRE_TIME.getValue(), TimeUnit.SECONDS)
-                .removalListener(removalListener)
-                .build();
-        cacheStore.putIfAbsent(cacheId, vCache);
-        return vCache;
-    }
-
-    @Override
-    public <V> LoadingCache<String, V> buildCache(String cacheId, CacheLoader<String, V> loader,
-                                                  RemovalListener<String, V> removalListener) {
-        LoadingCache<String, V> vCache = CacheBuilder.newBuilder()
-                .maximumSize(CacheConfiguration.CACHE_MAX_SIZE.getValue())
-                .expireAfterWrite(CacheConfiguration.CACHE_EXPIRE_TIME.getValue(), TimeUnit.SECONDS)
-                .removalListener(removalListener)
-                .build(loader);
-        cacheStore.putIfAbsent(cacheId, vCache);
-        return vCache;
-    }
-}
diff --git a/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/domain/MetaColumnInfo.java b/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/domain/MetaColumnInfo.java
deleted file mode 100644
index 60911a8..0000000
--- a/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/domain/MetaColumnInfo.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.metadatamanager.common.domain;
-
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import java.io.Serializable;
-
-/**
- * The meta information of field
- * Created by jackyxxie on 2020/2/10.
- */
-@JsonSerialize(include= JsonSerialize.Inclusion.NON_EMPTY)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public class MetaColumnInfo implements Serializable {
-    private int  index = -1;
-    private boolean isPrimaryKey;
-    private String name;
-    private String type;
-
-    public int getIndex() {
-        return index;
-    }
-
-    public void setIndex(int index) {
-        this.index = index;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getType() {
-        return type;
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    public boolean isPrimaryKey() {
-        return isPrimaryKey;
-    }
-
-    public void setPrimaryKey(boolean primaryKey) {
-        isPrimaryKey = primaryKey;
-    }
-}
diff --git a/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/domain/MetaPartitionInfo.java b/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/domain/MetaPartitionInfo.java
deleted file mode 100644
index d4286c4..0000000
--- a/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/domain/MetaPartitionInfo.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.metadatamanager.common.domain;
-
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * The meta information of partition
- * Created by jackyxxie on 2020/2/10.
- */
-@JsonSerialize(include= JsonSerialize.Inclusion.NON_EMPTY)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public class MetaPartitionInfo implements Serializable {
-    private List<String> partKeys = new ArrayList<>();
-
-    private String name;
-    /**
-     * Partition tree
-     */
-    private PartitionNode root;
-
-    @JsonSerialize(include= JsonSerialize.Inclusion.NON_EMPTY)
-    @JsonIgnoreProperties(ignoreUnknown = true)
-    public static class PartitionNode{
-        /**
-         * Node name
-         */
-        private String name;
-        /**
-         * Key: partition value
-         * Value: child partition node
-         */
-        private Map<String, PartitionNode> partitions = new HashMap<>();
-
-        public String getName() {
-            return name;
-        }
-
-        public void setName(String name) {
-            this.name = name;
-        }
-
-        public Map<String, PartitionNode> getPartitions() {
-            return partitions;
-        }
-
-        public void setPartitions(Map<String, PartitionNode> partitions) {
-            this.partitions = partitions;
-        }
-    }
-
-    public List<String> getPartKeys() {
-        return partKeys;
-    }
-
-    public void setPartKeys(List<String> partKeys) {
-        this.partKeys = partKeys;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public PartitionNode getRoot() {
-        return root;
-    }
-
-    public void setRoot(PartitionNode root) {
-        this.root = root;
-    }
-}
diff --git a/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/exception/MetaRuntimeException.java b/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/exception/MetaRuntimeException.java
deleted file mode 100644
index e3dcb0e..0000000
--- a/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/exception/MetaRuntimeException.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.metadatamanager.common.exception;
-
-import com.webank.wedatasphere.linkis.common.exception.WarnException;
-
-/**
- * Created by jackyxxie on 2020/2/10.
- */
-public class MetaRuntimeException extends WarnException {
-    private static final int ERROR_CODE = 99900;
-    public MetaRuntimeException(String desc) {
-        super(ERROR_CODE, desc);
-    }
-
-    public MetaRuntimeException(String desc, String ip, int port, String serviceKind) {
-        super(ERROR_CODE, desc, ip, port, serviceKind);
-    }
-
-}
diff --git a/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/service/AbstractMetaService.java b/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/service/AbstractMetaService.java
deleted file mode 100644
index 744440f..0000000
--- a/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/service/AbstractMetaService.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.metadatamanager.common.service;
-
-import com.google.common.cache.Cache;
-import com.webank.wedatasphere.linkis.common.exception.WarnException;
-import com.webank.wedatasphere.linkis.metadatamanager.common.Json;
-import com.webank.wedatasphere.linkis.metadatamanager.common.cache.CacheManager;
-import com.webank.wedatasphere.linkis.metadatamanager.common.cache.ConnCacheManager;
-import com.webank.wedatasphere.linkis.metadatamanager.common.domain.MetaColumnInfo;
-import com.webank.wedatasphere.linkis.metadatamanager.common.domain.MetaPartitionInfo;
-import com.webank.wedatasphere.linkis.metadatamanager.common.exception.MetaRuntimeException;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.annotation.PostConstruct;
-import java.io.Closeable;
-import java.io.IOException;
-import java.nio.charset.StandardCharsets;
-import java.security.MessageDigest;
-import java.util.List;
-import java.util.Map;
-import java.util.function.Function;
-
-/**
- * Created by jackyxxie on 2020/2/10.
- */
-public abstract class AbstractMetaService<C extends Closeable> implements MetadataService {
-    private static final Logger LOG = LoggerFactory.getLogger(AbstractMetaService.class);
-    private static final String CONN_CACHE_REQ = "_STORED";
-
-
-    private CacheManager connCacheManager;
-
-    /**
-     * Caching connections which built by connect parameters requested with
-     */
-    protected Cache<String, MetadataConnection<C>> reqCache;
-
-    @PostConstruct
-    public void init(){
-        connCacheManager = ConnCacheManager.custom();
-        initCache(connCacheManager);
-    }
-    /**
-     * If want to use cache component, you should invoke this in constructor method
-     * @param cacheManager
-     */
-    protected void initCache(CacheManager cacheManager){
-        String prefix = this.getClass().getSimpleName();
-        reqCache = cacheManager.buildCache(prefix + CONN_CACHE_REQ, notification ->{
-            assert notification.getValue() != null;
-            close(notification.getValue().getConnection());
-        });
-    }
-
-    @Override
-    public abstract MetadataConnection<C> getConnection(String operator, Map<String, Object> params) throws Exception;
-
-    @Override
-    public List<String> getDatabases(String operator, Map<String, Object> params) {
-        return this.getConnAndRun(operator, params, this::queryDatabases);
-    }
-
-    @Override
-    public List<String> getTables(String operator, Map<String, Object> params, String database) {
-        return this.getConnAndRun(operator, params, conn -> this.queryTables(conn, database));
-    }
-
-    @Override
-    public Map<String, String> getTableProps(String operator, Map<String, Object> params, String database, String table) {
-        return this.getConnAndRun(operator, params, conn -> this.queryTableProps(conn, database, table));
-    }
-
-    @Override
-    public MetaPartitionInfo getPartitions(String operator, Map<String, Object> params, String database, String table) {
-        return this.getConnAndRun(operator, params, conn -> this.queryPartitions(conn, database, table));
-    }
-
-    @Override
-    public List<MetaColumnInfo> getColumns(String operator, Map<String, Object> params, String database, String table) {
-        return this.getConnAndRun(operator, params, conn -> this.queryColumns(conn, database, table));
-    }
-
-    /**
-     * Get database list by connection
-     * @param connection metadata connection
-     * @return
-     */
-    public List<String> queryDatabases(C connection){
-        throw new WarnException(-1, "This method is no supported");
-    }
-
-    /**
-     * Get table list by connection and database
-     * @param connection metadata connection
-     * @param database database
-     * @return
-     */
-    public List<String> queryTables(C connection, String database){
-        throw new WarnException(-1, "This method is no supported");
-    }
-
-    /**
-     * Get partitions by connection, database and table
-     * @param connection metadata connection
-     * @param database database
-     * @param table table
-     * @return
-     */
-    public MetaPartitionInfo queryPartitions(C connection, String database, String table){
-        throw new WarnException(-1, "This method is no supported");
-    }
-
-    /**
-     * Get columns by connection, database and table
-     * @param connection metadata connection
-     * @param database database
-     * @param table table
-     * @return
-     */
-    public List<MetaColumnInfo> queryColumns(C connection, String database, String table){
-        throw new WarnException(-1, "This method is no supported");
-    }
-
-    /**
-     * Get table properties
-     * @param connection metadata connection
-     * @param database database
-     * @param table table
-     * @return
-     */
-    public Map<String, String> queryTableProps(C connection, String database, String table){
-        throw new WarnException(-1, "This method is no supported");
-    }
-
-    protected void close(C connection){
-        try {
-            connection.close();
-        } catch (IOException e) {
-            throw new MetaRuntimeException("Fail to close connection[关闭连接失败], [" + e.getMessage() + "]");
-        }
-    }
-
-    protected <R>R getConnAndRun(String operator, Map<String, Object> params, Function<C, R> action) {
-        String cacheKey = "";
-        try{
-            cacheKey = md5String(Json.toJson(params, null), "", 2);
-            MetadataConnection<C> connection;
-            if(null != reqCache) {
-                connection = reqCache.get(cacheKey, () -> getConnection(operator, params));
-            }else{
-                connection = getConnection(operator, params);
-            }
-            return run(connection, action);
-        }catch(Exception e){
-            LOG.error("Error to invoke meta service", e);
-            if(StringUtils.isNotBlank(cacheKey)){
-                reqCache.invalidate(cacheKey);
-            }
-            throw new MetaRuntimeException(e.getMessage());
-        }
-    }
-    private <R>R run(MetadataConnection<C> connection, Function<C, R> action){
-        if(connection.isLock()){
-            connection.getLock().lock();
-            try{
-                return action.apply(connection.getConnection());
-            }finally{
-                connection.getLock().unlock();
-            }
-        }else{
-            return action.apply(connection.getConnection());
-        }
-    }
-
-    private String md5String(String source, String salt, int iterator){
-        StringBuilder token = new StringBuilder();
-        try{
-            MessageDigest digest = MessageDigest.getInstance("md5");
-            if(StringUtils.isNotEmpty(salt)){
-                digest.update(salt.getBytes(StandardCharsets.UTF_8));
-            }
-            byte[] result = digest.digest(source.getBytes());
-            for(int i = 0; i < iterator - 1; i++){
-                digest.reset();
-                result = digest.digest(result);
-            }
-            for (byte aResult : result) {
-                int temp = aResult & 0xFF;
-                if (temp <= 0xF) {
-                    token.append("0");
-                }
-                token.append(Integer.toHexString(temp));
-            }
-        }catch(Exception e){
-            throw new RuntimeException(e.getMessage());
-        }
-        return token.toString();
-    }
-}
diff --git a/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/service/BaseMetadataService.java b/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/service/BaseMetadataService.java
deleted file mode 100644
index e9146d4..0000000
--- a/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/service/BaseMetadataService.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.metadatamanager.common.service;
-
-
-import java.io.Closeable;
-import java.util.Map;
-
-/**
- * Created by jackyxxie on 2020/02/10.
- */
-public interface BaseMetadataService {
-
-    /**
-     * Get connection
-     *
-     * @param params connect params
-     * @return
-     */
-    MetadataConnection<? extends Closeable> getConnection(String operator, Map<String, Object> params) throws Exception;
-}
diff --git a/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/service/MetadataConnection.java b/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/service/MetadataConnection.java
deleted file mode 100644
index 80a2d9d..0000000
--- a/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/service/MetadataConnection.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.metadatamanager.common.service;
-
-import java.util.concurrent.locks.ReentrantLock;
-
-/**
- * Connection for metadata
- * Created by jackyxxie on 2020/2/10.
- */
-public class MetadataConnection<C> {
-    /***
-     * Avoid complication when different threads calling connection API
-     */
-    private ReentrantLock lock = new ReentrantLock();
-
-    private boolean isLock = true;
-
-    private C connection;
-
-    public MetadataConnection(C connection){
-        this.connection = connection;
-    }
-
-    public MetadataConnection(C connection, boolean isLock){
-        this.connection = connection;
-        this.isLock = isLock;
-    }
-    public ReentrantLock getLock() {
-        return lock;
-    }
-
-    public C getConnection() {
-        return connection;
-    }
-
-    public boolean isLock() {
-        return isLock;
-    }
-
-    public void setLock(boolean lock) {
-        isLock = lock;
-    }
-}
diff --git a/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/service/MetadataDbService.java b/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/service/MetadataDbService.java
deleted file mode 100644
index b4de097..0000000
--- a/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/service/MetadataDbService.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.metadatamanager.common.service;
-
-import com.webank.wedatasphere.linkis.metadatamanager.common.domain.MetaColumnInfo;
-import com.webank.wedatasphere.linkis.metadatamanager.common.domain.MetaPartitionInfo;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * Created by jackyxxie on 2020/2/10.
- */
-public interface MetadataDbService extends BaseMetadataService {
-
-    /**
-     * Get all databases
-     * @param params connect params
-     * @return
-     */
-    List<String> getDatabases(String operator, Map<String, Object> params);
-
-    /**
-     * Get all tables from database specified
-     * @param params params
-     * @param database database name
-     * @return
-     */
-    List<String> getTables(String operator, Map<String, Object> params, String database);
-
-    /**
-     * Get table properties from database specified
-     * @param params params
-     * @param database database name
-     * @return
-     */
-    Map<String, String> getTableProps(String operator, Map<String, Object> params, String database, String table);
-    /**
-     * Get all partitions from table specified
-     * @param params params
-     * @param database
-     * @param table
-     * @return
-     */
-    MetaPartitionInfo getPartitions(String operator, Map<String, Object> params, String database, String table);
-
-    /**
-     * Get all field information from table specified
-     * @param params
-     * @param database
-     * @param table
-     * @return
-     */
-    List<MetaColumnInfo> getColumns(String operator, Map<String, Object> params, String database, String table);
-
-}
diff --git a/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/service/MetadataService.java b/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/service/MetadataService.java
deleted file mode 100644
index 3152182..0000000
--- a/datasource/metadatamanager/common/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/common/service/MetadataService.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.metadatamanager.common.service;
-
-/**
- * Created by jackyxxie on 2020/2/10.
- */
-public interface MetadataService extends MetadataDbService {
-}
diff --git a/datasource/metadatamanager/common/src/main/scala/com/webank/wedatasphere/linkis/metadatamanager/common/receiver/BaseMetaReceiver.scala b/datasource/metadatamanager/common/src/main/scala/com/webank/wedatasphere/linkis/metadatamanager/common/receiver/BaseMetaReceiver.scala
deleted file mode 100644
index d4ecf7d..0000000
--- a/datasource/metadatamanager/common/src/main/scala/com/webank/wedatasphere/linkis/metadatamanager/common/receiver/BaseMetaReceiver.scala
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.metadatamanager.common.receiver
-
-import com.webank.wedatasphere.linkis.common.exception.WarnException
-import com.webank.wedatasphere.linkis.common.utils.{Logging, Utils}
-import com.webank.wedatasphere.linkis.metadatamanager.common.protocol._
-import com.webank.wedatasphere.linkis.metadatamanager.common.service.MetadataService
-import com.webank.wedatasphere.linkis.rpc.{Receiver, Sender}
-import com.webank.wedatasphere.linkis.server.BDPJettyServerHelper
-
-import scala.concurrent.duration.Duration
-
-/**
- * Created by jackyxxie on 2020/2/10.
- */
-class BaseMetaReceiver extends Receiver with Logging{
-  protected var metadataService: MetadataService = _
-
-  override def receive(message: Any, sender: Sender): Unit = ???
-
-  override def receiveAndReply(message: Any, sender: Sender): Any = invoke(metadataService, message)
-
-  override def receiveAndReply(message: Any, duration: Duration, sender: Sender): Any = invoke(metadataService, message)
-
-
-  def invoke(service: MetadataService, message: Any): Any = Utils.tryCatch{
-    val data = message match {
-      case MetaGetDatabases(params, operator) => service.getDatabases(operator, params)
-      case MetaGetTableProps(params, database, table, operator) => service.getTableProps(operator, params, database, table)
-      case MetaGetTables(params, database, operator) => service.getTables(operator, params, database)
-      case MetaGetPartitions(params, database, table, operator) => service.getPartitions(operator, params, database, table)
-      case MetaGetColumns(params, database, table, operator) => service.getColumns(operator, params, database, table)
-      case MetadataConnect(operator, params, version) =>
-        service.getConnection(operator, params)
-        //MetadataConnection is not scala class
-        null
-      case _ => new Object()
-    }
-    MetadataResponse(status = true, BDPJettyServerHelper.gson.toJson(data))
-  }{
-    case e:WarnException => val errorMsg = e.getMessage
-      info(s"Fail to invoke meta service: [$message],[$errorMsg]")
-      MetadataResponse(status = false, errorMsg)
-    case t:Throwable =>
-      val errorMsg = t.getMessage
-      if (message.isInstanceOf[MetadataConnect])
-        info(s"Fail to invoke meta service: [$message], [$errorMsg]")
-      else error(s"Fail to invoke meta service", t)
-      MetadataResponse(status = false, t.getMessage)
-  }
-}
diff --git a/datasource/metadatamanager/server/Dockerfile b/datasource/metadatamanager/server/Dockerfile
deleted file mode 100644
index 6e7ebcb..0000000
--- a/datasource/metadatamanager/server/Dockerfile
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-#  Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM wedatasphere/linkis:emr-base-spark2.4.4
-
-MAINTAINER wedatasphere@webank.com
-
-RUN yum install -y unzip
-WORKDIR /opt/linkis
-
-COPY target/linkis-mdm-server.zip /opt/linkis
-RUN unzip linkis-mdm-server.zip
-
-WORKDIR /opt/linkis/linkis-mdm-server/bin
-ENTRYPOINT ["/opt/linkis/linkis-mdm-server/bin/startup.sh"]
diff --git a/datasource/metadatamanager/server/conf/application.yml b/datasource/metadatamanager/server/conf/application.yml
deleted file mode 100644
index c74a09c..0000000
--- a/datasource/metadatamanager/server/conf/application.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-server:
-  port: 8296
-spring:
-  application:
-    name: mdm-server
-
-
-eureka:
-  client:
-    serviceUrl:
-      defaultZone: ${eurekaurl}
-    registry-fetch-interval-seconds: 5
-  instance:
-    lease-renewal-interval-in-second: 5
-    lease-expiration-duration-in-second: 10
-    prefer-ip-address: true
-    instance-id: ${spring.cloud.client.ip-address}:${server.port}
-    metadata-map:
-      test: wedatasphere
-
-management:
-  endpoints:
-    web:
-      exposure:
-        include: refresh,info
-logging:
-  config: classpath:log4j2.xml
-
-
-pagehelper:
-  helper-dialect: mysql
-  reasonable: true
-  support-methods-arguments: true
-  params: countSql
-
diff --git a/datasource/metadatamanager/server/pom.xml b/datasource/metadatamanager/server/pom.xml
deleted file mode 100644
index 1aaa0b7..0000000
--- a/datasource/metadatamanager/server/pom.xml
+++ /dev/null
@@ -1,131 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  ~ Copyright 2019 WeBank
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <artifactId>linkis</artifactId>
-    <groupId>com.webank.wedatasphere.linkis</groupId>
-    <version>0.11.0</version>
-    <relativePath>../../../pom.xml</relativePath>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>linkis-metadatamanager-server</artifactId>
-
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-module</artifactId>
-      <exclusions>
-        <exclusion>
-          <artifactId>asm</artifactId>
-          <groupId>org.ow2.asm</groupId>
-        </exclusion>
-      </exclusions>
-      <scope>provided</scope>
-    </dependency>
-    <!--Metadata common-->
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-metadatamanager-common</artifactId>
-      </dependency>
-    <!-- data source manager common dependency-->
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-datasourcemanager-common</artifactId>
-      <exclusions>
-        <exclusion>
-          <artifactId>asm</artifactId>
-          <groupId>org.ow2.asm</groupId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <!--rpc-->
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-cloudRPC</artifactId>
-      <scope>provided</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-      </plugin>
-
-      <plugin>
-        <groupId>net.alchim31.maven</groupId>
-        <artifactId>scala-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <version>2.3</version>
-        <inherited>false</inherited>
-        <executions>
-          <execution>
-            <id>make-assembly</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <configuration>
-              <descriptors>
-                <descriptor>src/main/assembly/distribution.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </execution>
-        </executions>
-        <configuration>
-          <skipAssembly>false</skipAssembly>
-          <finalName>linkis-mdm-server</finalName>
-          <appendAssemblyId>false</appendAssemblyId>
-          <attach>false</attach>
-          <descriptors>
-            <descriptor>src/main/assembly/distribution.xml</descriptor>
-          </descriptors>
-        </configuration>
-      </plugin>
-    </plugins>
-    <resources>
-      <resource>
-        <directory>src/main/java</directory>
-        <includes>
-          <include>**/*.xml</include>
-        </includes>
-      </resource>
-      <resource>
-        <directory>src/main/resources</directory>
-        <excludes>
-          <exclude>**/*.properties</exclude>
-          <exclude>**/application.yml</exclude>
-          <exclude>**/bootstrap.yml</exclude>
-          <exclude>**/log4j2.xml</exclude>
-        </excludes>
-      </resource>
-    </resources>
-    <finalName>${project.artifactId}-${project.version}</finalName>
-  </build>
-</project>
diff --git a/datasource/metadatamanager/server/pom_k8s.xml b/datasource/metadatamanager/server/pom_k8s.xml
deleted file mode 100644
index 69f3f67..0000000
--- a/datasource/metadatamanager/server/pom_k8s.xml
+++ /dev/null
@@ -1,149 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  ~ Copyright 2019 WeBank
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <artifactId>linkis</artifactId>
-    <groupId>com.webank.wedatasphere.linkis</groupId>
-    <version>0.11.0</version>
-    <relativePath>../../../pom.xml</relativePath>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>linkis-metadatamanager-server</artifactId>
-
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-module</artifactId>
-      <exclusions>
-        <exclusion>
-          <artifactId>asm</artifactId>
-          <groupId>org.ow2.asm</groupId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <!--Metadata common-->
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-metadatamanager-common</artifactId>
-    </dependency>
-    <!-- data source manager common dependency-->
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-datasourcemanager-common</artifactId>
-      <exclusions>
-        <exclusion>
-          <artifactId>asm</artifactId>
-          <groupId>org.ow2.asm</groupId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <!--rpc-->
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-cloudRPC</artifactId>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-      </plugin>
-
-      <plugin>
-        <groupId>net.alchim31.maven</groupId>
-        <artifactId>scala-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <version>2.3</version>
-        <inherited>false</inherited>
-        <executions>
-          <execution>
-            <id>make-assembly</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <configuration>
-              <descriptors>
-                <descriptor>src/main/assembly/distribution.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </execution>
-        </executions>
-        <configuration>
-          <skipAssembly>false</skipAssembly>
-          <finalName>linkis-mdm-server</finalName>
-          <appendAssemblyId>false</appendAssemblyId>
-          <attach>false</attach>
-          <descriptors>
-            <descriptor>src/main/assembly/distribution.xml</descriptor>
-          </descriptors>
-        </configuration>
-      </plugin>
-<!--      <plugin>-->
-<!--          <groupId>com.spotify</groupId>-->
-<!--          <artifactId>dockerfile-maven-plugin</artifactId>-->
-<!--          <version>1.3.4</version>-->
-<!--          <executions>-->
-<!--              <execution>-->
-<!--                  <id>default</id>-->
-<!--                  <phase>package</phase>-->
-<!--                  <goals>-->
-<!--                      <goal>build</goal>-->
-<!--                      <goal>tag</goal>-->
-<!--                  </goals>-->
-<!--              </execution>-->
-<!--          </executions>-->
-<!--          <configuration>-->
-<!--              <repository>${harbor.reposity}/linkis-mdm-server</repository>-->
-<!--              <tag>${linkis.version}</tag>-->
-<!--              <dockerInfoDirectory>${basedir}/dockerinfo</dockerInfoDirectory>-->
-<!--          </configuration>-->
-<!--      </plugin>-->
-    </plugins>
-    <resources>
-      <resource>
-        <directory>src/main/java</directory>
-        <includes>
-          <include>**/*.xml</include>
-        </includes>
-      </resource>
-      <resource>
-        <directory>src/main/resources</directory>
-        <excludes>
-          <exclude>**/*.properties</exclude>
-          <exclude>**/application.yml</exclude>
-          <exclude>**/bootstrap.yml</exclude>
-          <exclude>**/log4j2.xml</exclude>
-        </excludes>
-      </resource>
-    </resources>
-    <finalName>${project.artifactId}-${project.version}</finalName>
-  </build>
-</project>
diff --git a/datasource/metadatamanager/server/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/server/restful/MetadataCoreRestful.java b/datasource/metadatamanager/server/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/server/restful/MetadataCoreRestful.java
deleted file mode 100644
index 63791c5..0000000
--- a/datasource/metadatamanager/server/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/server/restful/MetadataCoreRestful.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.metadatamanager.server.restful;
-
-import com.webank.wedatasphere.linkis.metadatamanager.common.domain.MetaColumnInfo;
-import com.webank.wedatasphere.linkis.metadatamanager.common.domain.MetaPartitionInfo;
-import com.webank.wedatasphere.linkis.metadatamanager.server.service.MetadataAppService;
-import com.webank.wedatasphere.linkis.server.Message;
-import org.apache.commons.lang.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import javax.ws.rs.*;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author alexyang
- * 2020/02/10
- */
-@Path("/metadata")
-@Consumes(MediaType.APPLICATION_JSON)
-@Produces(MediaType.APPLICATION_JSON)
-@Component
-public class MetadataCoreRestful {
-
-    @Autowired
-    private MetadataAppService metadataAppService;
-
-    @GET
-    @Path("/dbs/{data_source_id}")
-    public Response getDatabases(@PathParam("data_source_id")String dataSourceId,
-                                 @QueryParam("system")String system){
-        try{
-            if(StringUtils.isBlank(system)){
-                return Message.messageToResponse(Message.error("'system' is missing[缺少系统名]"));
-            }
-            List<String> databases = metadataAppService.getDatabasesByDsId(dataSourceId, system);
-            return Message.messageToResponse(Message.ok().data("dbs", databases));
-        }catch(Exception e){
-            return Message.messageToResponse(
-                    Message.error("Fail to get database list[获取库信息失败], id:[" + dataSourceId +"], system:[" + system + "]", e));
-        }
-    }
-
-    @GET
-    @Path("/tables/{data_source_id}/db/{database}")
-    public Response getTables(@PathParam("data_source_id")String dataSourceId,
-                              @PathParam("database")String database,
-                              @QueryParam("system")String system){
-        try{
-            if(StringUtils.isBlank(system)){
-                return Message.messageToResponse(Message.error("'system' is missing[缺少系统名]"));
-            }
-            List<String> tables = metadataAppService.getTablesByDsId(dataSourceId, database, system);
-            return Message.messageToResponse(Message.ok().data("tables", tables));
-        }catch(Exception e){
-            return Message.messageToResponse(
-                    Message.error("Fail to get table list[获取表信息失败], id:[" + dataSourceId +"]" +
-                            ", system:[" + system + "], database:[" +database +"]", e));
-        }
-    }
-
-    @GET
-    @Path("/props/{data_source_id}/db/{database}/table/{table}")
-    public Response getTableProps(@PathParam("data_source_id")String dataSourceId,
-                                  @PathParam("database")String database,
-                                  @PathParam("table") String table,
-                                  @QueryParam("system")String system){
-        try{
-            if(StringUtils.isBlank(system)){
-                return Message.messageToResponse(Message.error("'system' is missing[缺少系统名]"));
-            }
-            Map<String, String> tableProps = metadataAppService.getTablePropsByDsId(dataSourceId, database, table, system);
-            return Message.messageToResponse(Message.ok().data("props", tableProps));
-        }catch(Exception e){
-            return Message.messageToResponse(
-                    Message.error("Fail to get table properties[获取表参数信息失败], id:[" + dataSourceId +"]" +
-                            ", system:[" + system + "], database:[" +database +"], table:[" + table +"]", e));
-        }
-    }
-
-    @GET
-    @Path("/partitions/{data_source_id}/db/{database}/table/{table}")
-    public Response getPartitions(@PathParam("data_source_id")String dataSourceId,
-                                  @PathParam("database")String database,
-                                  @PathParam("table") String table,
-                                  @QueryParam("system")String system){
-        try{
-            if(StringUtils.isBlank(system)){
-                return Message.messageToResponse(Message.error("'system' is missing[缺少系统名]"));
-            }
-            MetaPartitionInfo partitionInfo = metadataAppService.getPartitionsByDsId(dataSourceId, database, table, system);
-            return Message.messageToResponse(Message.ok().data("props", partitionInfo));
-        }catch(Exception e){
-            return Message.messageToResponse(
-                    Message.error("Fail to get partitions[获取表分区信息失败], id:[" + dataSourceId +"]" +
-                            ", system:[" + system + "], database:[" +database +"], table:[" + table +"]"));
-        }
-    }
-
-    @GET
-    @Path("/columns/{data_source_id}/db/{database}/table/{table}")
-    public Response getColumns(@PathParam("data_source_id")String dataSourceId,
-                               @PathParam("database")String database,
-                               @PathParam("table") String table,
-                               @QueryParam("system")String system){
-        try{
-            if(StringUtils.isBlank(system)){
-                return Message.messageToResponse(Message.error("'system' is missing[缺少系统名]"));
-            }
-            List<MetaColumnInfo> columns = metadataAppService.getColumns(dataSourceId, database, table, system);
-            return Message.messageToResponse(Message.ok().data("columns", columns));
-        }catch(Exception e){
-            return Message.messageToResponse(
-                    Message.error("Fail to get column list[获取表字段信息失败], id:[" + dataSourceId +"]" +
-                            ", system:[" + system + "], database:[" +database +"], table:[" + table +"]", e));
-        }
-    }
-
-}
diff --git a/datasource/metadatamanager/server/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/server/service/MetadataAppService.java b/datasource/metadatamanager/server/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/server/service/MetadataAppService.java
deleted file mode 100644
index 1656b94..0000000
--- a/datasource/metadatamanager/server/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/server/service/MetadataAppService.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.metadatamanager.server.service;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.metadatamanager.common.domain.MetaColumnInfo;
-import com.webank.wedatasphere.linkis.metadatamanager.common.domain.MetaPartitionInfo;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author alexyang
- * 2020/02/10
- */
-public interface MetadataAppService {
-
-    /**
-     * @param dataSourceId data source id
-     * @param system system
-     * @return
-     */
-    List<String> getDatabasesByDsId(String dataSourceId, String system) throws ErrorException;
-
-    /**
-     * @param dataSourceId data source id
-     * @param system system
-     * @param database database
-     * @return
-     */
-    List<String> getTablesByDsId(String dataSourceId, String database, String system) throws ErrorException;
-
-    /**
-     * @param dataSourceId data source id
-     * @param database database
-     * @param table table
-     * @param system system
-     * @return
-     */
-    Map<String, String> getTablePropsByDsId(String dataSourceId, String database, String table, String system) throws ErrorException;
-    /**
-     * @param dataSourceId data source i
-     * @param database database
-     * @param table table
-     * @param system system
-     * @return
-     */
-    MetaPartitionInfo getPartitionsByDsId(String dataSourceId, String database, String table, String system) throws ErrorException;
-
-    /**
-     * @param dataSourceId data source id
-     * @param database database
-     * @param table table
-     * @param system system
-     * @return
-     */
-    List<MetaColumnInfo> getColumns(String dataSourceId, String database, String table, String system) throws ErrorException;
-}
diff --git a/datasource/metadatamanager/server/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/server/service/impl/MetadataAppServiceImpl.java b/datasource/metadatamanager/server/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/server/service/impl/MetadataAppServiceImpl.java
deleted file mode 100644
index 371e726..0000000
--- a/datasource/metadatamanager/server/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/server/service/impl/MetadataAppServiceImpl.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.metadatamanager.server.service.impl;
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException;
-import com.webank.wedatasphere.linkis.datasourcemanager.common.util.json.Json;
-import com.webank.wedatasphere.linkis.datasourcemanager.common.protocol.DsInfoQueryRequest;
-import com.webank.wedatasphere.linkis.datasourcemanager.common.protocol.DsInfoResponse;
-import com.webank.wedatasphere.linkis.metadatamanager.common.MdmConfiguration;
-import com.webank.wedatasphere.linkis.metadatamanager.common.domain.MetaColumnInfo;
-import com.webank.wedatasphere.linkis.metadatamanager.common.domain.MetaPartitionInfo;
-import com.webank.wedatasphere.linkis.metadatamanager.server.service.MetadataAppService;
-import com.webank.wedatasphere.linkis.metadatamanager.common.protocol.*;
-import com.webank.wedatasphere.linkis.rpc.Sender;
-import org.apache.commons.lang.StringUtils;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.PostConstruct;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author alexyang
- * 2020/02/10
- */
-@Service
-public class MetadataAppServiceImpl implements MetadataAppService {
-    private Sender dataSourceRpcSender;
-
-    @PostConstruct
-    public void init(){
-        dataSourceRpcSender = Sender.getSender(MdmConfiguration.DATA_SOURCE_SERVICE_APPLICATION.getValue());
-    }
-    @Override
-    public List<String> getDatabasesByDsId(String dataSourceId, String system) throws ErrorException {
-        DsInfoResponse dsInfoResponse = reqToGetDataSourceInfo(dataSourceId, system);
-        if(StringUtils.isNotBlank(dsInfoResponse.dsType())){
-            MetadataResponse metaQueryResponse = doAndGetMetaInfo(dsInfoResponse.dsType(),
-                    new MetaGetDatabases(dsInfoResponse.params(), dsInfoResponse.creator()));
-            return Json.fromJson(metaQueryResponse.data(), List.class, String.class);
-        }
-        return new ArrayList<>();
-    }
-
-    @Override
-    public List<String> getTablesByDsId(String dataSourceId, String database, String system) throws ErrorException {
-        DsInfoResponse dsInfoResponse = reqToGetDataSourceInfo(dataSourceId, system);
-        if(StringUtils.isNotBlank(dsInfoResponse.dsType())){
-            MetadataResponse metaQueryResponse = doAndGetMetaInfo(dsInfoResponse.dsType(),
-                    new MetaGetTables(dsInfoResponse.params(), database, dsInfoResponse.creator()));
-            return Json.fromJson(metaQueryResponse.data(), List.class, String.class);
-        }
-        return new ArrayList<>();
-    }
-
-    @Override
-    public Map<String, String> getTablePropsByDsId(String dataSourceId, String database, String table, String system) throws ErrorException {
-        DsInfoResponse dsInfoResponse = reqToGetDataSourceInfo(dataSourceId, system);
-        if(StringUtils.isNotBlank(dsInfoResponse.dsType())){
-            MetadataResponse metaQueryResponse = doAndGetMetaInfo(dsInfoResponse.dsType(),
-                    new MetaGetTableProps(dsInfoResponse.params(), database, table, dsInfoResponse.creator()));
-            return Json.fromJson(metaQueryResponse.data(), Map.class, String.class, String.class);
-        }
-        return new HashMap<>();
-    }
-
-    @Override
-    public MetaPartitionInfo getPartitionsByDsId(String dataSourceId, String database, String table, String system) throws ErrorException {
-        DsInfoResponse dsInfoResponse = reqToGetDataSourceInfo(dataSourceId, system);
-        if(StringUtils.isNotBlank(dsInfoResponse.dsType())){
-            MetadataResponse metaQueryResponse = doAndGetMetaInfo(dsInfoResponse.dsType(),
-                    new MetaGetPartitions(dsInfoResponse.params(), database, table, dsInfoResponse.creator()));
-            return Json.fromJson(metaQueryResponse.data(), MetaPartitionInfo.class);
-        }
-        return new MetaPartitionInfo();
-    }
-
-    @Override
-    public List<MetaColumnInfo> getColumns(String dataSourceId, String database, String table, String system) throws ErrorException {
-        DsInfoResponse dsInfoResponse = reqToGetDataSourceInfo(dataSourceId, system);
-        if(StringUtils.isNotBlank(dsInfoResponse.dsType())){
-            MetadataResponse metaQueryResponse = doAndGetMetaInfo(dsInfoResponse.dsType(),
-                    new MetaGetColumns(dsInfoResponse.params(), database, table, dsInfoResponse.creator()));
-            return Json.fromJson(metaQueryResponse.data(), List.class, MetaColumnInfo.class);
-        }
-        return new ArrayList<>();
-    }
-
-    /**
-     * Request to get data source information
-     * (type and connection parameters)
-     * @param dataSourceId data source id
-     * @param system system
-     * @return
-     * @throws ErrorException
-     */
-    public DsInfoResponse reqToGetDataSourceInfo(String dataSourceId, String system) throws ErrorException{
-        Object rpcResult = null;
-        try {
-            rpcResult = dataSourceRpcSender.ask(new DsInfoQueryRequest(dataSourceId, system));
-        }catch(Exception e){
-            throw new ErrorException(-1, "Remote Service Error[远端服务出错, 联系运维处理]");
-        }
-        if(rpcResult instanceof DsInfoResponse){
-            DsInfoResponse response = (DsInfoResponse)rpcResult;
-            if(!response.status()){
-                throw new ErrorException(-1, "Error in Data Source Manager Server[数据源服务出错]");
-            }
-            return response;
-        }else{
-            throw new ErrorException(-1, "Remote Service Error[远端服务出错, 联系运维处理]");
-        }
-    }
-
-    /**
-     * Request to get meta information
-     * @param dataSourceType
-     * @param request
-     * @return
-     */
-    public MetadataResponse doAndGetMetaInfo(String dataSourceType, MetadataQueryProtocol request) throws ErrorException {
-        Sender sender = Sender.getSender(MdmConfiguration.METADATA_SERVICE_APPLICATION.getValue() + "-" + dataSourceType.toLowerCase());
-        Object rpcResult = null;
-        try{
-            rpcResult = sender.ask(request);
-        }catch(Exception e){
-            throw new ErrorException(-1, "Remote Service Error[远端服务出错, 联系运维处理]");
-        }
-        if(rpcResult instanceof MetadataResponse){
-            MetadataResponse response = (MetadataResponse)rpcResult;
-            if(!response.status()){
-                throw new ErrorException(-1, "Error in ["+dataSourceType.toUpperCase()+"] Metadata Service Server[元数据服务出错], " +
-                        "[" +response.data() + "]");
-            }
-            return response;
-        }else{
-            throw new ErrorException(-1, "Remote Service Error[远端服务出错, 联系运维处理]");
-        }
-    }
-}
diff --git a/datasource/metadatamanager/service/elasticsearch/Dockerfile b/datasource/metadatamanager/service/elasticsearch/Dockerfile
deleted file mode 100644
index 4736fd7..0000000
--- a/datasource/metadatamanager/service/elasticsearch/Dockerfile
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-#  Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM wedatasphere/linkis:emr-base-spark2.4.4
-
-MAINTAINER wedatasphere@webank.com
-
-RUN yum install -y unzip
-WORKDIR /opt/linkis
-
-COPY target/linkis-mdm-service-es.zip /opt/linkis
-RUN unzip linkis-mdm-service-es.zip
-
-WORKDIR /opt/linkis/linkis-mdm-service-es/bin
-ENTRYPOINT ["/opt/linkis/linkis-mdm-service-es/bin/startup.sh"]
diff --git a/datasource/metadatamanager/service/elasticsearch/conf/application.yml b/datasource/metadatamanager/service/elasticsearch/conf/application.yml
deleted file mode 100644
index 474819d..0000000
--- a/datasource/metadatamanager/service/elasticsearch/conf/application.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-server:
-  port: 8295
-spring:
-  application:
-    name: mdm-service-elasticsearch
-
-eureka:
-  client:
-    serviceUrl:
-      defaultZone: ${eurekaurl}
-    registry-fetch-interval-seconds: 5
-  instance:
-    lease-renewal-interval-in-second: 5
-    lease-expiration-duration-in-second: 10
-    prefer-ip-address: true
-    instance-id: ${spring.cloud.client.ip-address}:${server.port}
-    metadata-map:
-      test: wedatasphere
-
-management:
-  endpoints:
-    web:
-      exposure:
-        include: refresh,info
-logging:
-  config: classpath:log4j2.xml
-
-
diff --git a/datasource/metadatamanager/service/elasticsearch/pom.xml b/datasource/metadatamanager/service/elasticsearch/pom.xml
deleted file mode 100644
index d710bf8..0000000
--- a/datasource/metadatamanager/service/elasticsearch/pom.xml
+++ /dev/null
@@ -1,118 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  ~ Copyright 2019 WeBank
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <artifactId>linkis</artifactId>
-    <groupId>com.webank.wedatasphere.linkis</groupId>
-    <version>0.11.0</version>
-    <relativePath>../../../../pom.xml</relativePath>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-
-  <artifactId>linkis-metadatamanager-service-es</artifactId>
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <es.version>6.7.1</es.version>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-metadatamanager-common</artifactId>
-      </dependency>
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-module</artifactId>
-      <exclusions>
-        <exclusion>
-          <artifactId>asm</artifactId>
-          <groupId>org.ow2.asm</groupId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.elasticsearch.client</groupId>
-      <artifactId>elasticsearch-rest-client</artifactId>
-      <version>${es.version}</version>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-      </plugin>
-
-      <plugin>
-        <groupId>net.alchim31.maven</groupId>
-        <artifactId>scala-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <version>2.3</version>
-        <inherited>false</inherited>
-        <executions>
-          <execution>
-            <id>make-assembly</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <configuration>
-              <descriptors>
-                <descriptor>src/main/assembly/distribution.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </execution>
-        </executions>
-        <configuration>
-          <skipAssembly>false</skipAssembly>
-          <finalName>linkis-mdm-service-es</finalName>
-          <appendAssemblyId>false</appendAssemblyId>
-          <attach>false</attach>
-          <descriptors>
-            <descriptor>src/main/assembly/distribution.xml</descriptor>
-          </descriptors>
-        </configuration>
-      </plugin>
-    </plugins>
-    <resources>
-      <resource>
-        <directory>src/main/java</directory>
-        <includes>
-          <include>**/*.xml</include>
-        </includes>
-      </resource>
-      <resource>
-        <directory>src/main/resources</directory>
-        <excludes>
-          <exclude>**/*.properties</exclude>
-          <exclude>**/application.yml</exclude>
-          <exclude>**/bootstrap.yml</exclude>
-          <exclude>**/log4j2.xml</exclude>
-        </excludes>
-      </resource>
-    </resources>
-    <finalName>${project.artifactId}-${project.version}</finalName>
-  </build>
-</project>
diff --git a/datasource/metadatamanager/service/elasticsearch/pom_k8s.xml b/datasource/metadatamanager/service/elasticsearch/pom_k8s.xml
deleted file mode 100644
index 540fd2d..0000000
--- a/datasource/metadatamanager/service/elasticsearch/pom_k8s.xml
+++ /dev/null
@@ -1,138 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  ~ Copyright 2019 WeBank
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <artifactId>linkis</artifactId>
-    <groupId>com.webank.wedatasphere.linkis</groupId>
-    <version>0.11.0</version>
-    <relativePath>../../../../pom.xml</relativePath>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-
-  <artifactId>linkis-metadatamanager-service-es</artifactId>
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <es.version>6.7.1</es.version>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-metadatamanager-common</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-module</artifactId>
-      <exclusions>
-        <exclusion>
-          <artifactId>asm</artifactId>
-          <groupId>org.ow2.asm</groupId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.elasticsearch.client</groupId>
-      <artifactId>elasticsearch-rest-client</artifactId>
-      <version>${es.version}</version>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-      </plugin>
-
-      <plugin>
-        <groupId>net.alchim31.maven</groupId>
-        <artifactId>scala-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <version>2.3</version>
-        <inherited>false</inherited>
-        <executions>
-          <execution>
-            <id>make-assembly</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <configuration>
-              <descriptors>
-                <descriptor>src/main/assembly/distribution.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </execution>
-        </executions>
-        <configuration>
-          <skipAssembly>false</skipAssembly>
-          <finalName>linkis-mdm-service-es</finalName>
-          <appendAssemblyId>false</appendAssemblyId>
-          <attach>false</attach>
-          <descriptors>
-            <descriptor>src/main/assembly/distribution.xml</descriptor>
-          </descriptors>
-        </configuration>
-      </plugin>
-<!--      <plugin>-->
-<!--          <groupId>com.spotify</groupId>-->
-<!--          <artifactId>dockerfile-maven-plugin</artifactId>-->
-<!--          <version>1.3.4</version>-->
-<!--          <executions>-->
-<!--              <execution>-->
-<!--                  <id>default</id>-->
-<!--                  <phase>package</phase>-->
-<!--                  <goals>-->
-<!--                      <goal>build</goal>-->
-<!--                      <goal>tag</goal>-->
-<!--                  </goals>-->
-<!--              </execution>-->
-<!--          </executions>-->
-<!--          <configuration>-->
-<!--              <repository>${harbor.reposity}/linkis-mdm-service-es</repository>-->
-<!--              <tag>${linkis.version}</tag>-->
-<!--              <dockerInfoDirectory>${basedir}/dockerinfo</dockerInfoDirectory>-->
-<!--          </configuration>-->
-<!--      </plugin>-->
-    </plugins>
-    <resources>
-      <resource>
-        <directory>src/main/java</directory>
-        <includes>
-          <include>**/*.xml</include>
-        </includes>
-      </resource>
-      <resource>
-        <directory>src/main/resources</directory>
-        <excludes>
-          <exclude>**/*.properties</exclude>
-          <exclude>**/application.yml</exclude>
-          <exclude>**/bootstrap.yml</exclude>
-          <exclude>**/log4j2.xml</exclude>
-        </excludes>
-      </resource>
-    </resources>
-    <finalName>${project.artifactId}-${project.version}</finalName>
-  </build>
-</project>
diff --git a/datasource/metadatamanager/service/elasticsearch/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/ElasticConnection.java b/datasource/metadatamanager/service/elasticsearch/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/ElasticConnection.java
deleted file mode 100644
index b485c69..0000000
--- a/datasource/metadatamanager/service/elasticsearch/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/ElasticConnection.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.metadatamanager.service;
-
-import com.webank.wedatasphere.linkis.metadatamanager.common.Json;
-import org.apache.commons.lang.StringUtils;
-import org.apache.http.HttpHost;
-import org.apache.http.auth.AuthScope;
-import org.apache.http.auth.UsernamePasswordCredentials;
-import org.apache.http.client.CredentialsProvider;
-import org.apache.http.impl.client.BasicCredentialsProvider;
-import org.apache.http.impl.nio.reactor.IOReactorConfig;
-import org.elasticsearch.client.Request;
-import org.elasticsearch.client.Response;
-import org.elasticsearch.client.RestClient;
-import org.elasticsearch.client.RestClientBuilder;
-
-import java.io.Closeable;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * @author davidhua
- * 2020/02/14
- */
-public class ElasticConnection implements Closeable {
-
-    public static final String DEFAULT_TYPE_NAME = "type";
-
-    private static final String DEFAULT_MAPPING_NAME = "mappings";
-    private static final String DEFAULT_INDEX_NAME = "index";
-    private static final String FIELD_PROPS = "properties";
-
-    private RestClient restClient;
-
-    public ElasticConnection(String[] endPoints, String username, String password) throws IOException {
-        HttpHost[] httpHosts = new HttpHost[endPoints.length];
-        for(int i = 0; i < endPoints.length; i++){
-            httpHosts[i] = HttpHost.create(endPoints[i]);
-        }
-        RestClientBuilder restClientBuilder = RestClient.builder(httpHosts);
-        CredentialsProvider credentialsProvider = null;
-        if(StringUtils.isNotBlank(username) && StringUtils.isNotBlank(password)){
-            credentialsProvider = new BasicCredentialsProvider();
-            credentialsProvider.setCredentials(AuthScope.ANY,
-                    new UsernamePasswordCredentials(username, password));
-        }
-        //set only one thread
-        CredentialsProvider finalCredentialsProvider = credentialsProvider;
-        restClientBuilder.setHttpClientConfigCallback(httpClientBuilder -> {
-            if(null != finalCredentialsProvider){
-                httpClientBuilder
-                        .setDefaultCredentialsProvider(finalCredentialsProvider);
-            }
-            return httpClientBuilder.setDefaultIOReactorConfig(IOReactorConfig.custom().setIoThreadCount(1).build());
-        });
-        this.restClient = restClientBuilder.build();
-        //Try to test connection
-        ping();
-    }
-
-    public List<String> getAllIndices() throws IOException {
-        List<String> indices = new ArrayList<>();
-        Request request = new Request("GET", "_cat/indices");
-        request.addParameter("format", "JSON");
-        Response response = restClient.performRequest(request);
-        List<Map<String, Object>> list = Json.fromJson(response.getEntity().getContent(), Map.class);
-        list.forEach( v ->{
-            String index = String.valueOf(v.getOrDefault(DEFAULT_INDEX_NAME, ""));
-            if(StringUtils.isNotBlank(index) && !index.startsWith(".")){
-                indices.add(index);
-            }
-        });
-        return indices;
-    }
-
-    public List<String> getTypes(String index) throws IOException{
-        List<String> types = new ArrayList<>();
-        Request request = new Request("GET", index +"/_mappings");
-        Response response = restClient.performRequest(request);
-        Map<String, Map<String, Object>> result =
-                Json.fromJson(response.getEntity().getContent(), Map.class);
-        Map<String, Object> indexMap = result.get(index);
-        Object props = indexMap.get(DEFAULT_MAPPING_NAME);
-        if(props instanceof Map){
-            Set keySet = ((Map)props).keySet();
-            for(Object v : keySet){
-                types.add(String.valueOf(v));
-            }
-        }
-        return types;
-    }
-
-    public Map<Object, Object> getProps(String index, String type) throws IOException{
-        Request request = new Request("GET", index + "/_mappings/" + type);
-        Response response = restClient.performRequest(request);
-        Map<String, Map<String, Object>> result =
-                Json.fromJson(response.getEntity().getContent(), Map.class);
-        Map mappings = (Map)result.get(index).get("mappings");
-        Map propsMap = mappings;
-        if(mappings.containsKey(type)){
-            Object typeMap = mappings.get(type);
-            if(typeMap instanceof Map){
-                propsMap = (Map)typeMap;
-            }
-        }
-        Object props = propsMap.get(FIELD_PROPS);
-        if(props instanceof Map){
-            return (Map)props;
-        }
-        return null;
-    }
-    public void ping() throws IOException{
-        Response response = restClient.performRequest(new Request("GET", "/"));
-        int code = response.getStatusLine().getStatusCode();
-        int successCode = 200;
-        if(code != successCode){
-            throw new RuntimeException("Ping to ElasticSearch ERROR, response code: " + code);
-        }
-    }
-
-    @Override
-    public void close() throws IOException {
-        this.restClient.close();
-    }
-}
diff --git a/datasource/metadatamanager/service/elasticsearch/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/ElasticMetaService.java b/datasource/metadatamanager/service/elasticsearch/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/ElasticMetaService.java
deleted file mode 100644
index 8778ba4..0000000
--- a/datasource/metadatamanager/service/elasticsearch/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/ElasticMetaService.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.metadatamanager.service;
-
-import com.webank.wedatasphere.linkis.metadatamanager.common.Json;
-import com.webank.wedatasphere.linkis.metadatamanager.common.domain.MetaColumnInfo;
-import com.webank.wedatasphere.linkis.metadatamanager.common.service.AbstractMetaService;
-import com.webank.wedatasphere.linkis.metadatamanager.common.service.MetadataConnection;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-
-/**
- * @author davidhua
- * 2020/02/14
- */
-@Component
-public class ElasticMetaService extends AbstractMetaService<ElasticConnection> {
-    @Override
-    public MetadataConnection<ElasticConnection> getConnection(String operator, Map<String, Object> params)
-    throws Exception{
-        String[] endPoints = new String[]{};
-        Object urls = params.get(ElasticParamsMapper.PARAM_ES_URLS.getValue());
-        if(!(urls instanceof List)){
-            List<String> urlList = Json.fromJson(String.valueOf(urls), List.class, String.class);
-            assert urlList != null;
-            endPoints = urlList.toArray(endPoints);
-        }else{
-            endPoints = ((List<String>)urls).toArray(endPoints);
-        }
-        ElasticConnection conn = new ElasticConnection(endPoints, String.valueOf(params.getOrDefault(ElasticParamsMapper.PARAM_ES_USERNAME.getValue(), "")),
-                String.valueOf(params.getOrDefault(ElasticParamsMapper.PARAM_ES_PASSWORD.getValue(), "")));
-        return new MetadataConnection<>(conn, false);
-    }
-
-    @Override
-    public List<String> queryDatabases(ElasticConnection connection) {
-        //Get indices
-        try{
-            return connection.getAllIndices();
-        }catch (Exception e){
-            throw new RuntimeException("Fail to get ElasticSearch indices(获取索引列表失败)", e);
-        }
-    }
-
-    @Override
-    public List<String> queryTables(ElasticConnection connection, String database) {
-        //Get types
-        try{
-            return connection.getTypes(database);
-        }catch (Exception e){
-            throw new RuntimeException("Fail to get ElasticSearch types(获取索引类型失败)", e);
-        }
-    }
-
-    @Override
-    public List<MetaColumnInfo> queryColumns(ElasticConnection connection, String database, String table) {
-        try {
-            Map<Object, Object> props = connection.getProps(database, table);
-            return props.entrySet().stream().map(entry -> {
-                MetaColumnInfo info = new MetaColumnInfo();
-                info.setName(String.valueOf(entry.getKey()));
-                Object value = entry.getValue();
-                if(value instanceof Map){
-                    info.setType(String.valueOf(((Map)value)
-                            .getOrDefault(ElasticConnection.DEFAULT_TYPE_NAME, "")));
-                }
-                return info;
-            }).collect(Collectors.toList());
-        } catch (Exception e) {
-            throw new RuntimeException("Fail to get ElasticSearch columns(获取索引字段失败)", e);
-        }
-    }
-}
diff --git a/datasource/metadatamanager/service/elasticsearch/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/ElasticParamsMapper.java b/datasource/metadatamanager/service/elasticsearch/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/ElasticParamsMapper.java
deleted file mode 100644
index 3af7e8a..0000000
--- a/datasource/metadatamanager/service/elasticsearch/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/ElasticParamsMapper.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.metadatamanager.service;
-
-import com.webank.wedatasphere.linkis.common.conf.CommonVars;
-
-/**
- * Configuration
- * @author davidhua
- * 2020/02/14
- */
-public class ElasticParamsMapper {
-    public static final CommonVars<String> PARAM_ES_URLS =
-            CommonVars.apply("wds.linkis.server.mdm.service.es.urls", "elasticUrls");
-
-    public static final CommonVars<String> PARAM_ES_USERNAME =
-            CommonVars.apply("wds.linkis.server.mdm.service.es.username", "username");
-
-    public static final CommonVars<String> PARAM_ES_PASSWORD =
-            CommonVars.apply("wds.linkis.server.mdm.service.es.password", "password");
-}
diff --git a/datasource/metadatamanager/service/hive/Dockerfile b/datasource/metadatamanager/service/hive/Dockerfile
deleted file mode 100644
index 1f6244a..0000000
--- a/datasource/metadatamanager/service/hive/Dockerfile
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-#  Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM wedatasphere/linkis:emr-base-spark2.4.4
-
-MAINTAINER wedatasphere@webank.com
-
-RUN yum install -y unzip
-WORKDIR /opt/linkis
-
-COPY target/linkis-mdm-service-hive.zip /opt/linkis
-RUN unzip linkis-mdm-service-hive.zip
-
-WORKDIR /opt/linkis/linkis-mdm-service-hive/bin
-ENTRYPOINT ["/opt/linkis/linkis-mdm-service-hive/bin/startup.sh"]
diff --git a/datasource/metadatamanager/service/hive/conf/application.yml b/datasource/metadatamanager/service/hive/conf/application.yml
deleted file mode 100644
index 08f79c0..0000000
--- a/datasource/metadatamanager/service/hive/conf/application.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-server:
-  port: 8293
-spring:
-  application:
-    name: mdm-service-hive
-
-eureka:
-  client:
-    serviceUrl:
-      defaultZone: ${eurekaurl}
-    registry-fetch-interval-seconds: 5
-  instance:
-    lease-renewal-interval-in-second: 5
-    lease-expiration-duration-in-second: 10
-    prefer-ip-address: true
-    instance-id: ${spring.cloud.client.ip-address}:${server.port}
-    metadata-map:
-      test: wedatasphere
-
-management:
-  endpoints:
-    web:
-      exposure:
-        include: refresh,info
-logging:
-  config: classpath:log4j2.xml
-
-
diff --git a/datasource/metadatamanager/service/hive/pom.xml b/datasource/metadatamanager/service/hive/pom.xml
deleted file mode 100644
index 3c84251..0000000
--- a/datasource/metadatamanager/service/hive/pom.xml
+++ /dev/null
@@ -1,154 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  ~ Copyright 2019 WeBank
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <artifactId>linkis</artifactId>
-    <groupId>com.webank.wedatasphere.linkis</groupId>
-    <version>0.11.0</version>
-    <relativePath>../../../../pom.xml</relativePath>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>linkis-metadatamanager-service-hive</artifactId>
-
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-metadatamanager-common</artifactId>
-      </dependency>
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-module</artifactId>
-      </dependency>
-    <!--Hive dependencies-->
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-client</artifactId>
-      <version>${hadoop.version}</version>
-      <exclusions>
-        <exclusion>
-          <groupId>org.slf4j</groupId>
-          <artifactId>slf4j-log4j12</artifactId>
-        </exclusion>
-        <exclusion>
-          <artifactId>servlet-api</artifactId>
-          <groupId>javax.servlet</groupId>
-        </exclusion>
-        <exclusion>
-          <artifactId>guava</artifactId>
-          <groupId>com.google.guava</groupId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hive</groupId>
-      <artifactId>hive-exec</artifactId>
-      <version>${hive.version}</version>
-      <exclusions>
-        <exclusion>
-          <artifactId>slf4j-log4j12</artifactId>
-          <groupId>org.slf4j</groupId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.apache.ivy</groupId>
-          <artifactId>ivy</artifactId>
-        </exclusion>
-        <exclusion>
-          <artifactId>guava</artifactId>
-          <groupId>com.google.guava</groupId>
-        </exclusion>
-        <exclusion>
-          <artifactId>commons-lang3</artifactId>
-          <groupId>org.apache.commons</groupId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <!--bml client-->
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-bmlclient</artifactId>
-      </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-      </plugin>
-
-      <plugin>
-        <groupId>net.alchim31.maven</groupId>
-        <artifactId>scala-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <version>2.3</version>
-        <inherited>false</inherited>
-        <executions>
-          <execution>
-            <id>make-assembly</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <configuration>
-              <descriptors>
-                <descriptor>src/main/assembly/distribution.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </execution>
-        </executions>
-        <configuration>
-          <skipAssembly>false</skipAssembly>
-          <finalName>linkis-mdm-service-hive</finalName>
-          <appendAssemblyId>false</appendAssemblyId>
-          <attach>false</attach>
-          <descriptors>
-            <descriptor>src/main/assembly/distribution.xml</descriptor>
-          </descriptors>
-        </configuration>
-      </plugin>
-    </plugins>
-    <resources>
-      <resource>
-        <directory>src/main/java</directory>
-        <includes>
-          <include>**/*.xml</include>
-        </includes>
-      </resource>
-      <resource>
-        <directory>src/main/resources</directory>
-        <excludes>
-          <exclude>**/*.properties</exclude>
-          <exclude>**/application.yml</exclude>
-          <exclude>**/bootstrap.yml</exclude>
-          <exclude>**/log4j2.xml</exclude>
-        </excludes>
-      </resource>
-    </resources>
-    <finalName>${project.artifactId}-${project.version}</finalName>
-  </build>
-</project>
diff --git a/datasource/metadatamanager/service/hive/pom_k8s.xml b/datasource/metadatamanager/service/hive/pom_k8s.xml
deleted file mode 100644
index cb3df71..0000000
--- a/datasource/metadatamanager/service/hive/pom_k8s.xml
+++ /dev/null
@@ -1,174 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  ~ Copyright 2019 WeBank
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <artifactId>linkis</artifactId>
-    <groupId>com.webank.wedatasphere.linkis</groupId>
-    <version>0.11.0</version>
-    <relativePath>../../../../pom.xml</relativePath>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>linkis-metadatamanager-service-hive</artifactId>
-
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-metadatamanager-common</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-module</artifactId>
-    </dependency>
-    <!--Hive dependencies-->
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-client</artifactId>
-      <version>${hadoop.version}</version>
-      <exclusions>
-        <exclusion>
-          <groupId>org.slf4j</groupId>
-          <artifactId>slf4j-log4j12</artifactId>
-        </exclusion>
-        <exclusion>
-          <artifactId>servlet-api</artifactId>
-          <groupId>javax.servlet</groupId>
-        </exclusion>
-        <exclusion>
-          <artifactId>guava</artifactId>
-          <groupId>com.google.guava</groupId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hive</groupId>
-      <artifactId>hive-exec</artifactId>
-      <version>${hive.version}</version>
-      <exclusions>
-        <exclusion>
-          <artifactId>slf4j-log4j12</artifactId>
-          <groupId>org.slf4j</groupId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.apache.ivy</groupId>
-          <artifactId>ivy</artifactId>
-        </exclusion>
-        <exclusion>
-          <artifactId>guava</artifactId>
-          <groupId>com.google.guava</groupId>
-        </exclusion>
-        <exclusion>
-          <artifactId>commons-lang3</artifactId>
-          <groupId>org.apache.commons</groupId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <!--bml client-->
-    <dependency>
-      <groupId>com.webank.wedatasphere.linkis</groupId>
-      <artifactId>linkis-bmlclient</artifactId>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-      </plugin>
-
-      <plugin>
-        <groupId>net.alchim31.maven</groupId>
-        <artifactId>scala-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <version>2.3</version>
-        <inherited>false</inherited>
-        <executions>
-          <execution>
-            <id>make-assembly</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <configuration>
-              <descriptors>
-                <descriptor>src/main/assembly/distribution.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </execution>
-        </executions>
-        <configuration>
-          <skipAssembly>false</skipAssembly>
-          <finalName>linkis-mdm-service-hive</finalName>
-          <appendAssemblyId>false</appendAssemblyId>
-          <attach>false</attach>
-          <descriptors>
-            <descriptor>src/main/assembly/distribution.xml</descriptor>
-          </descriptors>
-        </configuration>
-      </plugin>
-<!--      <plugin>-->
-<!--          <groupId>com.spotify</groupId>-->
-<!--          <artifactId>dockerfile-maven-plugin</artifactId>-->
-<!--          <version>1.3.4</version>-->
-<!--          <executions>-->
-<!--              <execution>-->
-<!--                  <id>default</id>-->
-<!--                  <phase>package</phase>-->
-<!--                  <goals>-->
-<!--                      <goal>build</goal>-->
-<!--                      <goal>tag</goal>-->
-<!--                  </goals>-->
-<!--              </execution>-->
-<!--          </executions>-->
-<!--          <configuration>-->
-<!--              <repository>${harbor.reposity}/linkis-mdm-service-hive</repository>-->
-<!--              <tag>${linkis.version}</tag>-->
-<!--              <dockerInfoDirectory>${basedir}/dockerinfo</dockerInfoDirectory>-->
-<!--          </configuration>-->
-<!--      </plugin>-->
-    </plugins>
-    <resources>
-      <resource>
-        <directory>src/main/java</directory>
-        <includes>
-          <include>**/*.xml</include>
-        </includes>
-      </resource>
-      <resource>
-        <directory>src/main/resources</directory>
-        <excludes>
-          <exclude>**/*.properties</exclude>
-          <exclude>**/application.yml</exclude>
-          <exclude>**/bootstrap.yml</exclude>
-          <exclude>**/log4j2.xml</exclude>
-        </excludes>
-      </resource>
-    </resources>
-    <finalName>${project.artifactId}-${project.version}</finalName>
-  </build>
-</project>
diff --git a/datasource/metadatamanager/service/hive/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/HiveConnection.java b/datasource/metadatamanager/service/hive/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/HiveConnection.java
deleted file mode 100644
index f581bdc..0000000
--- a/datasource/metadatamanager/service/hive/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/HiveConnection.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.metadatamanager.service;
-
-import com.webank.wedatasphere.linkis.common.conf.CommonVars;
-import org.apache.commons.lang.StringUtils;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hive.conf.HiveConf;
-import org.apache.hadoop.hive.metastore.IMetaStoreClient;
-import org.apache.hadoop.hive.ql.metadata.Hive;
-import org.apache.hadoop.security.UserGroupInformation;
-
-import java.io.Closeable;
-import java.io.IOException;
-import java.net.URI;
-import java.security.PrivilegedExceptionAction;
-import java.util.concurrent.locks.ReentrantLock;
-
-import static org.apache.hadoop.fs.FileSystem.FS_DEFAULT_NAME_KEY;
-
-/**
- * @author davidhua
- * 2020/02/14
- */
-public class HiveConnection implements Closeable {
-
-    private Hive hiveClient;
-
-    private IMetaStoreClient metaStoreClient;
-
-    private static final CommonVars<String> KERBEROS_DEFAULT_PRINCIPLE =
-            CommonVars.apply("wds.linkis.server.mdm.service.kerberos.principle", "hadoop/_HOST@EXAMPLE.COM");
-
-    private static final CommonVars<String> DEFAULT_SERVICE_USER =
-            CommonVars.apply("wds.linkis.server.mdm.service.user", "hadoop");
-
-    private static final CommonVars<String> KERBEROS_KRB5_CONF_PATH =
-            CommonVars.apply("wds.linkis.server.mdm.service.kerberos.krb5.path", "");
-
-    static{
-        if(StringUtils.isNotBlank(KERBEROS_KRB5_CONF_PATH.getValue())){
-            System.setProperty("java.security.krb5.conf", KERBEROS_KRB5_CONF_PATH.getValue());
-        }
-    }
-
-    public HiveConnection(String uris, String principle, String keytabFilePath) throws Exception {
-        final HiveConf conf = new HiveConf();
-        conf.setVar(HiveConf.ConfVars.METASTOREURIS, uris);
-        conf.setVar(HiveConf.ConfVars.METASTORE_USE_THRIFT_SASL, "true");
-        conf.setVar(HiveConf.ConfVars.METASTORE_KERBEROS_PRINCIPAL, KERBEROS_DEFAULT_PRINCIPLE.getValue());
-        //Disable the cache in FileSystem
-        conf.setBoolean(String.format("fs.%s.impl.disable.cache", URI.create(conf.get(FS_DEFAULT_NAME_KEY, "")).getScheme()), true);
-        conf.set("hadoop.security.authentication", "kerberos");
-        principle = principle.substring(0, principle.indexOf("@"));
-        UserGroupInformation ugi = UserGroupInformationWrapper.loginUserFromKeytab(conf,
-                principle, keytabFilePath);
-        hiveClient = getHive(ugi, conf);
-    }
-
-    public HiveConnection(String uris) throws Exception{
-        final HiveConf conf = new HiveConf();
-        conf.setVar(HiveConf.ConfVars.METASTOREURIS, uris);
-        //Disable the cache in FileSystem
-        conf.setBoolean(String.format("fs.%s.impl.disable.cache", URI.create(conf.get(FS_DEFAULT_NAME_KEY, "")).getScheme()), true);
-        //TODO choose an authentication strategy for hive, and then use createProxyUser
-        UserGroupInformation ugi = UserGroupInformation.createRemoteUser(DEFAULT_SERVICE_USER.getValue());
-        hiveClient = getHive(ugi, conf);
-    }
-    /**
-     * Get Hive client(Hive object)
-     * @return hive
-     */
-    public Hive getClient(){
-        return hiveClient;
-    }
-
-    private Hive getHive(UserGroupInformation ugi, HiveConf conf) throws IOException, InterruptedException {
-        return ugi.doAs((PrivilegedExceptionAction<Hive>) () -> {
-            Hive hive = Hive.get(conf);
-            metaStoreClient = hive.getMSC();
-            //To remove thread Local vars
-            Hive.set(null);
-            return hive;
-        });
-    }
-    @Override
-    public void close() throws IOException {
-        //Close meta store client
-        metaStoreClient.close();
-    }
-
-    /**
-     * Wrapper class of UserGroupInformation
-     */
-    private static class UserGroupInformationWrapper{
-        private static ReentrantLock globalLock = new ReentrantLock();
-
-        public static UserGroupInformation loginUserFromKeytab(final Configuration conf, String  user, String path) throws Exception {
-            globalLock.lock();
-            try{
-                UserGroupInformation.setConfiguration(conf);
-                return UserGroupInformation.loginUserFromKeytabAndReturnUGI(user, path);
-            }finally{
-                globalLock.unlock();
-            }
-        }
-        public static UserGroupInformation createProxyUser(final Configuration conf, String user) throws Exception{
-            globalLock.lock();
-            try{
-                UserGroupInformation.setLoginUser(null);
-                UserGroupInformation.setConfiguration(conf);
-                return UserGroupInformation.createProxyUser(user, UserGroupInformation.getLoginUser());
-            }finally{
-                globalLock.unlock();
-            }
-        }
-
-        public static UserGroupInformation getLoginUser() throws Exception{
-            globalLock.lock();
-            try{
-                UserGroupInformation.setLoginUser(null);
-                return UserGroupInformation.getLoginUser();
-            }finally{
-                globalLock.unlock();
-            }
-        }
-    }
-}
diff --git a/datasource/metadatamanager/service/hive/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/HiveMetaService.java b/datasource/metadatamanager/service/hive/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/HiveMetaService.java
deleted file mode 100644
index 4ea3581..0000000
--- a/datasource/metadatamanager/service/hive/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/HiveMetaService.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.metadatamanager.service;
-
-import com.webank.wedatasphere.linkis.bml.client.BmlClient;
-import com.webank.wedatasphere.linkis.bml.client.BmlClientFactory;
-import com.webank.wedatasphere.linkis.bml.protocol.BmlDownloadResponse;
-import com.webank.wedatasphere.linkis.common.conf.CommonVars;
-import com.webank.wedatasphere.linkis.metadatamanager.common.domain.MetaColumnInfo;
-import com.webank.wedatasphere.linkis.metadatamanager.common.domain.MetaPartitionInfo;
-import com.webank.wedatasphere.linkis.metadatamanager.common.exception.MetaRuntimeException;
-import com.webank.wedatasphere.linkis.metadatamanager.common.service.AbstractMetaService;
-import com.webank.wedatasphere.linkis.metadatamanager.common.service.MetadataConnection;
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang.StringUtils;
-import org.apache.hadoop.hive.metastore.api.FieldSchema;
-import org.apache.hadoop.hive.ql.metadata.HiveException;
-import org.apache.hadoop.hive.ql.metadata.Partition;
-import org.apache.hadoop.hive.ql.metadata.Table;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.core.io.Resource;
-import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.PostConstruct;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.*;
-
-/**
- * @author davidhua
- * 2020/02/14
- */
-@Component
-public class HiveMetaService extends AbstractMetaService<HiveConnection> {
-
-    private static final Logger LOG = LoggerFactory.getLogger(HiveMetaService.class);
-    private static final CommonVars<String> TMP_FILE_STORE_LOCATION =
-            CommonVars.apply("wds.linkis.server.mdm.service.temp.location", "classpath:/tmp");
-
-    private BmlClient client;
-
-    @PostConstruct
-    public void buildClient(){
-        client = BmlClientFactory.createBmlClient();
-    }
-    @Override
-    public MetadataConnection<HiveConnection> getConnection(String operator, Map<String, Object> params) throws Exception {
-        Resource resource = new PathMatchingResourcePatternResolver().getResource(TMP_FILE_STORE_LOCATION.getValue());
-        String uris = String.valueOf(params.getOrDefault(HiveParamsMapper.PARAM_HIVE_URIS.getValue(), ""));
-        String principle = String.valueOf(params.getOrDefault(HiveParamsMapper.PARAM_HIVE_PRINCIPLE.getValue(), ""));
-        HiveConnection conn = null;
-        if(StringUtils.isNotBlank(principle)){
-            LOG.info("Try to connect Hive MetaStore in kerberos with principle:[" + principle +"]");
-            String keytabResourceId = String.valueOf(params.getOrDefault(HiveParamsMapper.PARAM_HIVE_KEYTAB.getValue(), ""));
-            if(StringUtils.isNotBlank(keytabResourceId)){
-                LOG.info("Start to download resource id:[" + keytabResourceId +"]");
-                String keytabFilePath = resource.getFile().getAbsolutePath() + "/" + UUID.randomUUID().toString().replace("-", "");
-                if(!downloadResource(keytabResourceId, operator, keytabFilePath)){
-                    throw new MetaRuntimeException("Fail to download resource i:[" + keytabResourceId +"]");
-                }
-                conn = new HiveConnection(uris, principle, keytabFilePath);
-            }else{
-                throw new MetaRuntimeException("Cannot find the keytab file in connect parameters");
-            }
-        }else{
-            conn = new HiveConnection(uris);
-        }
-        return new MetadataConnection<>(conn, true);
-    }
-
-    /**
-     * Download resource to path by id
-     * @param resourceId resource id
-     * @param user user
-     * @param absolutePath absolute path
-     * @return
-     * @throws IOException
-     */
-    private boolean downloadResource(String resourceId, String user, String absolutePath) throws IOException {
-        BmlDownloadResponse downloadResponse = client.downloadResource(user, resourceId, absolutePath);
-        if(downloadResponse.isSuccess()){
-            IOUtils.copy(downloadResponse.inputStream(), new FileOutputStream(absolutePath));
-            return true;
-        }
-        return false;
-    }
-
-    @Override
-    public List<String> queryDatabases(HiveConnection connection) {
-        try {
-            return connection.getClient().getAllDatabases();
-        } catch (HiveException e) {
-            throw new RuntimeException("Fail to get Hive databases(获取数据库列表失败)", e);
-        }
-    }
-
-    @Override
-    public List<String> queryTables(HiveConnection connection, String database) {
-        try {
-            return connection.getClient().getAllTables(database);
-        } catch (HiveException e) {
-            throw new RuntimeException("Fail to get Hive tables(获取表列表失败)", e);
-        }
-    }
-
-    @Override
-    public MetaPartitionInfo queryPartitions(HiveConnection connection, String database, String table) {
-        List<Partition> partitions;
-        Table rawTable;
-        try {
-            rawTable = connection.getClient().getTable(database, table);
-            partitions = connection.getClient().getPartitions(rawTable);
-        } catch (HiveException e) {
-            throw new RuntimeException("Fail to get Hive partitions(获取分区信息失败)", e);
-        }
-        MetaPartitionInfo info = new MetaPartitionInfo();
-        List<FieldSchema> partitionKeys = rawTable.getPartitionKeys();
-        List<String> partKeys = new ArrayList<>();
-        partitionKeys.forEach(e -> partKeys.add(e.getName()));
-        info.setPartKeys(partKeys);
-        //Static partitions
-        Map<String, MetaPartitionInfo.PartitionNode> pMap = new HashMap<>(20);
-        MetaPartitionInfo.PartitionNode root = new MetaPartitionInfo.PartitionNode();
-        info.setRoot(root);
-        long t = System.currentTimeMillis();
-        for(Partition p : partitions){
-            try {
-                List<String> values = p.getValues();
-                if(!partitionKeys.isEmpty()){
-                    String parentNameValue = "";
-                    for(int i = 0; i < values.size(); i++){
-                        FieldSchema fieldSchema = partitionKeys.get(i);
-                        String name = fieldSchema.getName();
-                        String value = values.get(i);
-                        String nameValue= name + "=" + value;
-                        MetaPartitionInfo.PartitionNode node = new MetaPartitionInfo.PartitionNode();
-                        if(i > 0){
-                            MetaPartitionInfo.PartitionNode parent = pMap.get(parentNameValue);
-                            parent.setName(name);
-                            parent.getPartitions().putIfAbsent(value, node);
-                        }else{
-                            root.setName(name);
-                            root.getPartitions().putIfAbsent(value, node);
-                        }
-                        parentNameValue += "/" + nameValue;
-                        pMap.putIfAbsent(parentNameValue, node);
-                    }
-                }
-            }catch(Exception e){
-                LOG.warn(e.getMessage(), e);
-            }
-        }
-        return info;
-    }
-
-    @Override
-    public List<MetaColumnInfo> queryColumns(HiveConnection connection, String database, String table) {
-        List<MetaColumnInfo> columns = new ArrayList<>();
-        Table tb;
-        try {
-            tb = connection.getClient().getTable(database, table);
-        } catch (HiveException e) {
-            throw new RuntimeException("Fail to get Hive columns(获得表字段信息失败)", e);
-        }
-        tb.getFields().forEach( field ->{
-            MetaColumnInfo metaColumnInfo = new MetaColumnInfo();
-            metaColumnInfo.setIndex(field.getFieldID());
-            metaColumnInfo.setName(field.getFieldName());
-            metaColumnInfo.setType(field.getFieldObjectInspector().getTypeName());
-            columns.add(metaColumnInfo);
-        });
-        return columns;
-    }
-
-    @Override
-    public Map<String, String> queryTableProps(HiveConnection connection, String database, String table) {
-        try {
-            Table rawTable = connection.getClient().getTable(database, table);
-            return new HashMap<>((Map)rawTable.getMetadata());
-        }catch(Exception e){
-            throw new RuntimeException("Fail to get Hive table properties(获取表参数信息失败)", e);
-        }
-    }
-}
diff --git a/datasource/metadatamanager/service/hive/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/HiveParamsMapper.java b/datasource/metadatamanager/service/hive/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/HiveParamsMapper.java
deleted file mode 100644
index 6a3372b..0000000
--- a/datasource/metadatamanager/service/hive/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/HiveParamsMapper.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.metadatamanager.service;
-
-import com.webank.wedatasphere.linkis.common.conf.CommonVars;
-
-/**
- * @author davidhua
- * 2020/02/14
- */
-public class HiveParamsMapper {
-
-    public static final CommonVars<String> PARAM_HIVE_PRINCIPLE =
-            CommonVars.apply("wds.linkis.server.mdm.service.hive.principle", "principle");
-
-    public static final CommonVars<String> PARAM_HIVE_URIS =
-            CommonVars.apply("wds.linkis.server.mdm.service.hive.uris", "uris");
-
-    public static final CommonVars<String> PARAM_HIVE_KEYTAB =
-            CommonVars.apply("wds.linkis.server.mdm.service.hive.keytab", "keytab");
-
-}
diff --git a/datasource/metadatamanager/service/mysql/Dockerfile b/datasource/metadatamanager/service/mysql/Dockerfile
deleted file mode 100644
index 269399c..0000000
--- a/datasource/metadatamanager/service/mysql/Dockerfile
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-#  Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM wedatasphere/linkis:emr-base-spark2.4.4
-
-MAINTAINER wedatasphere@webank.com
-
-RUN yum install -y unzip
-WORKDIR /opt/linkis
-
-COPY target/linkis-mdm-service-mysql.zip /opt/linkis
-RUN unzip linkis-mdm-service-mysql.zip
-
-WORKDIR /opt/linkis/linkis-mdm-service-mysql/bin
-ENTRYPOINT ["/opt/linkis/linkis-mdm-service-mysql/bin/startup.sh"]
diff --git a/datasource/metadatamanager/service/mysql/conf/application.yml b/datasource/metadatamanager/service/mysql/conf/application.yml
deleted file mode 100644
index 072b1b5..0000000
--- a/datasource/metadatamanager/service/mysql/conf/application.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-server:
-  port: 8294
-spring:
-  application:
-    name: mdm-service-mysql
-
-eureka:
-  client:
-    serviceUrl:
-      defaultZone: ${eurekaurl}
-    registry-fetch-interval-seconds: 5
-  instance:
-    lease-renewal-interval-in-second: 5
-    lease-expiration-duration-in-second: 10
-    prefer-ip-address: true
-    instance-id: ${spring.cloud.client.ip-address}:${server.port}
-    metadata-map:
-      test: wedatasphere
-
-management:
-  endpoints:
-    web:
-      exposure:
-        include: refresh,info
-logging:
-  config: classpath:log4j2.xml
-
-
diff --git a/datasource/metadatamanager/service/mysql/pom.xml b/datasource/metadatamanager/service/mysql/pom.xml
deleted file mode 100644
index cbe8df0..0000000
--- a/datasource/metadatamanager/service/mysql/pom.xml
+++ /dev/null
@@ -1,123 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  ~ Copyright 2019 WeBank
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>linkis-metadatamanager-service-mysql</artifactId>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <mysql.version>5.1.34</mysql.version>
-    </properties>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-metadatamanager-common</artifactId>
-            </dependency>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-module</artifactId>
-            <exclusions>
-                <exclusion>
-                    <artifactId>asm</artifactId>
-                    <groupId>org.ow2.asm</groupId>
-                </exclusion>
-                <exclusion>
-                    <groupId>mysql</groupId>
-                    <artifactId>mysql-connector-java</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>mysql</groupId>
-            <artifactId>mysql-connector-java</artifactId>
-            <version>${mysql.version}</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>2.3</version>
-                <inherited>false</inherited>
-                <executions>
-                    <execution>
-                        <id>make-assembly</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                        <configuration>
-                            <descriptors>
-                                <descriptor>src/main/assembly/distribution.xml</descriptor>
-                            </descriptors>
-                        </configuration>
-                    </execution>
-                </executions>
-                <configuration>
-                    <skipAssembly>false</skipAssembly>
-                    <finalName>linkis-mdm-service-mysql</finalName>
-                    <appendAssemblyId>false</appendAssemblyId>
-                    <attach>false</attach>
-                    <descriptors>
-                        <descriptor>src/main/assembly/distribution.xml</descriptor>
-                    </descriptors>
-                </configuration>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>src/main/java</directory>
-                <includes>
-                    <include>**/*.xml</include>
-                </includes>
-            </resource>
-            <resource>
-                <directory>src/main/resources</directory>
-                <excludes>
-                    <exclude>**/*.properties</exclude>
-                    <exclude>**/application.yml</exclude>
-                    <exclude>**/bootstrap.yml</exclude>
-                    <exclude>**/log4j2.xml</exclude>
-                </excludes>
-            </resource>
-        </resources>
-        <finalName>${project.artifactId}-${project.version}</finalName>
-    </build>
-</project>
diff --git a/datasource/metadatamanager/service/mysql/pom_k8s.xml b/datasource/metadatamanager/service/mysql/pom_k8s.xml
deleted file mode 100644
index e93710b..0000000
--- a/datasource/metadatamanager/service/mysql/pom_k8s.xml
+++ /dev/null
@@ -1,143 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  ~ Copyright 2019 WeBank
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>linkis-metadatamanager-service-mysql</artifactId>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <mysql.version>5.1.34</mysql.version>
-    </properties>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-metadatamanager-common</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-module</artifactId>
-            <exclusions>
-                <exclusion>
-                    <artifactId>asm</artifactId>
-                    <groupId>org.ow2.asm</groupId>
-                </exclusion>
-                <exclusion>
-                    <groupId>mysql</groupId>
-                    <artifactId>mysql-connector-java</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>mysql</groupId>
-            <artifactId>mysql-connector-java</artifactId>
-            <version>${mysql.version}</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>2.3</version>
-                <inherited>false</inherited>
-                <executions>
-                    <execution>
-                        <id>make-assembly</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                        <configuration>
-                            <descriptors>
-                                <descriptor>src/main/assembly/distribution.xml</descriptor>
-                            </descriptors>
-                        </configuration>
-                    </execution>
-                </executions>
-                <configuration>
-                    <skipAssembly>false</skipAssembly>
-                    <finalName>linkis-mdm-service-mysql</finalName>
-                    <appendAssemblyId>false</appendAssemblyId>
-                    <attach>false</attach>
-                    <descriptors>
-                        <descriptor>src/main/assembly/distribution.xml</descriptor>
-                    </descriptors>
-                </configuration>
-            </plugin>
-<!--            <plugin>-->
-<!--                <groupId>com.spotify</groupId>-->
-<!--                <artifactId>dockerfile-maven-plugin</artifactId>-->
-<!--                <version>1.3.4</version>-->
-<!--                <executions>-->
-<!--                    <execution>-->
-<!--                        <id>default</id>-->
-<!--                        <phase>package</phase>-->
-<!--                        <goals>-->
-<!--                            <goal>build</goal>-->
-<!--                            <goal>tag</goal>-->
-<!--                        </goals>-->
-<!--                    </execution>-->
-<!--                </executions>-->
-<!--                <configuration>-->
-<!--                    <repository>${harbor.reposity}/linkis-mdm-service-mysql</repository>-->
-<!--                    <tag>${linkis.version}</tag>-->
-<!--                    <dockerInfoDirectory>${basedir}/dockerinfo</dockerInfoDirectory>-->
-<!--                </configuration>-->
-<!--            </plugin>-->
-        </plugins>
-        <resources>
-            <resource>
-                <directory>src/main/java</directory>
-                <includes>
-                    <include>**/*.xml</include>
-                </includes>
-            </resource>
-            <resource>
-                <directory>src/main/resources</directory>
-                <excludes>
-                    <exclude>**/*.properties</exclude>
-                    <exclude>**/application.yml</exclude>
-                    <exclude>**/bootstrap.yml</exclude>
-                    <exclude>**/log4j2.xml</exclude>
-                </excludes>
-            </resource>
-        </resources>
-        <finalName>${project.artifactId}-${project.version}</finalName>
-    </build>
-</project>
diff --git a/datasource/metadatamanager/service/mysql/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/SqlConnection.java b/datasource/metadatamanager/service/mysql/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/SqlConnection.java
deleted file mode 100644
index 383a0f1..0000000
--- a/datasource/metadatamanager/service/mysql/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/SqlConnection.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.metadatamanager.service;
-
-import com.webank.wedatasphere.linkis.common.conf.CommonVars;
-import com.webank.wedatasphere.linkis.metadatamanager.common.domain.MetaColumnInfo;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.Closeable;
-import java.io.IOException;
-import java.sql.*;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-
-/**
- * @author davidhua
- * 2020/02/14
- */
-public class SqlConnection implements Closeable {
-
-    private static final Logger LOG = LoggerFactory.getLogger(SqlConnection.class);
-
-    private static final CommonVars<String> SQL_DRIVER_CLASS =
-            CommonVars.apply("wds.linkis.server.mdm.service.sql.driver", "com.mysql.jdbc.Driver");
-
-    private static final CommonVars<String> SQL_CONNECT_URL =
-            CommonVars.apply("wds.linkis.server.mdm.service.sql.url", "jdbc:mysql://%s:%s/%s");
-
-    private Connection conn;
-
-    private ConnectMessage connectMessage;
-
-    public SqlConnection(String host, Integer port,
-                         String username, String password,
-                         Map<String, Object> extraParams ) throws ClassNotFoundException, SQLException {
-        connectMessage = new ConnectMessage(host, port, username, password, extraParams);
-        conn = getDBConnection(connectMessage, "");
-        //Try to create statement
-        Statement statement = conn.createStatement();
-        statement.close();
-    }
-
-    public List<String> getAllDatabases() throws SQLException {
-        java.util.List<java.lang.String> dataBaseName = new ArrayList<>();
-        Statement stmt = null;
-        ResultSet rs = null;
-        try{
-            stmt = conn.createStatement();
-            rs = stmt.executeQuery("SHOW DATABASES");
-            while (rs.next()){
-                dataBaseName.add(rs.getString(1));
-            }
-        } finally {
-            closeResource(null, stmt, rs);
-        }
-        return dataBaseName;
-    }
-
-    public List<String> getAllTables(String database) throws SQLException {
-        List<String> tableNames = new ArrayList<>();
-        Statement stmt = null;
-        ResultSet rs = null;
-        try {
-            stmt = conn.createStatement();
-            rs = stmt.executeQuery("SHOW TABLES FROM `" + database + "`");
-            while (rs.next()) {
-                tableNames.add(rs.getString(1));
-            }
-            return tableNames;
-        } finally{
-            closeResource(null, stmt, rs);
-        }
-    }
-
-    public List<MetaColumnInfo> getColumns(String database, String table) throws SQLException, ClassNotFoundException {
-        List<MetaColumnInfo> columns = new ArrayList<>();
-        String columnSql = "SELECT * FROM `" + database +"`.`" + table + "` WHERE 1 = 2";
-        PreparedStatement ps = null;
-        ResultSet rs = null;
-        ResultSetMetaData meta = null;
-        try {
-            List<String> primaryKeys = getPrimaryKeys(getDBConnection(connectMessage, database),  table);
-            ps = conn.prepareStatement(columnSql);
-            rs = ps.executeQuery();
-            meta = rs.getMetaData();
-            int columnCount = meta.getColumnCount();
-            for (int i = 1; i < columnCount + 1; i++) {
-                MetaColumnInfo info = new MetaColumnInfo();
-                info.setIndex(i);
-                info.setName(meta.getColumnName(i));
-                info.setType(meta.getColumnTypeName(i));
-                if(primaryKeys.contains(meta.getColumnName(i))){
-                    info.setPrimaryKey(true);
-                }
-                columns.add(info);
-            }
-        }finally {
-            closeResource(null, ps, rs);
-        }
-        return columns;
-    }
-
-    /**
-     * Get primary keys
-     * @param connection connection
-     * @param table table name
-     * @return
-     * @throws SQLException
-     */
-    private List<String> getPrimaryKeys(Connection connection, String table) throws SQLException {
-        ResultSet rs = null;
-        List<String> primaryKeys = new ArrayList<>();
-        try {
-            DatabaseMetaData dbMeta = connection.getMetaData();
-            rs = dbMeta.getPrimaryKeys(null, null, table);
-            while(rs.next()){
-                primaryKeys.add(rs.getString("column_name"));
-            }
-            return primaryKeys;
-        }finally{
-            if(null != rs){
-                closeResource(connection, null, rs);
-            }
-        }
-    }
-
-    /**
-     * close database resource
-     * @param connection connection
-     * @param statement statement
-     * @param resultSet result set
-     */
-    private void closeResource(Connection connection,  Statement statement, ResultSet resultSet){
-        try {
-            if(null != resultSet && !resultSet.isClosed()) {
-                resultSet.close();
-            }
-            if(null != statement && !statement.isClosed()){
-                statement.close();
-            }
-            if(null != connection && !connection.isClosed()){
-                connection.close();
-            }
-        }catch (SQLException e){
-            LOG.warn("Fail to release resource [" + e.getMessage() +"]", e);
-        }
-    }
-
-    @Override
-    public void close() throws IOException {
-        closeResource(conn, null, null);
-    }
-
-    /**
-     * @param connectMessage
-     * @param database
-     * @return
-     * @throws ClassNotFoundException
-     */
-    private Connection getDBConnection(ConnectMessage connectMessage, String database) throws ClassNotFoundException, SQLException {
-        String extraParamString = connectMessage.extraParams.entrySet()
-                .stream().map(e -> String.join("=", e.getKey(), String.valueOf(e.getValue())))
-                .collect(Collectors.joining("&"));
-        Class.forName(SQL_DRIVER_CLASS.getValue());
-        String url = String.format(SQL_CONNECT_URL.getValue(), connectMessage.host, connectMessage.port, database);
-        if(!connectMessage.extraParams.isEmpty()) {
-            url += "?" + extraParamString;
-        }
-        return DriverManager.getConnection(url, connectMessage.username, connectMessage.password);
-    }
-
-    /**
-     * Connect message
-     */
-    private static class ConnectMessage{
-        private String host;
-
-        private Integer port;
-
-        private String username;
-
-        private String password;
-
-        private Map<String, Object> extraParams;
-
-        public ConnectMessage(String host, Integer port,
-                              String username, String password,
-                              Map<String, Object> extraParams){
-            this.host = host;
-            this.port = port;
-            this.username = username;
-            this.password = password;
-            this.extraParams = extraParams;
-        }
-    }
-}
diff --git a/datasource/metadatamanager/service/mysql/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/SqlMetaService.java b/datasource/metadatamanager/service/mysql/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/SqlMetaService.java
deleted file mode 100644
index 744ee4a..0000000
--- a/datasource/metadatamanager/service/mysql/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/SqlMetaService.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.metadatamanager.service;
-
-import com.webank.wedatasphere.linkis.metadatamanager.common.Json;
-import com.webank.wedatasphere.linkis.metadatamanager.common.domain.MetaColumnInfo;
-import com.webank.wedatasphere.linkis.metadatamanager.common.service.AbstractMetaService;
-import com.webank.wedatasphere.linkis.metadatamanager.common.service.MetadataConnection;
-import org.springframework.stereotype.Component;
-
-import java.sql.SQLException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author davidhua
- * 2020/02/14
- */
-@Component
-public class SqlMetaService extends AbstractMetaService<SqlConnection> {
-    @Override
-    public MetadataConnection<SqlConnection> getConnection(String operator, Map<String, Object> params) throws Exception {
-        String host = String.valueOf(params.getOrDefault(SqlParamsMapper.PARAM_SQL_HOST.getValue(), ""));
-        //After deserialize, Integer will be Double, Why?
-        Integer port = (Double.valueOf(String.valueOf(params.getOrDefault(SqlParamsMapper.PARAM_SQL_PORT.getValue(), 0)))).intValue();
-        String username = String.valueOf(params.getOrDefault(SqlParamsMapper.PARAM_SQL_USERNAME.getValue(), ""));
-        String password = String.valueOf(params.getOrDefault(SqlParamsMapper.PARAM_SQL_PASSWORD.getValue(), ""));
-        Map<String, Object> extraParams = new HashMap<>();
-        Object sqlParamObj =  params.get(SqlParamsMapper.PARAM_SQL_EXTRA_PARAMS.getValue());
-        if(null != sqlParamObj){
-            if(!(sqlParamObj instanceof Map)){
-                extraParams = Json.fromJson(String.valueOf(sqlParamObj), Map.class, String.class, Object.class);
-            }else{
-                extraParams = (Map<String, Object>)sqlParamObj;
-            }
-        }
-        assert extraParams != null;
-        return new MetadataConnection<>(new SqlConnection(host, port, username, password, extraParams));
-    }
-
-    @Override
-    public List<String> queryDatabases(SqlConnection connection) {
-        try {
-            return connection.getAllDatabases();
-        } catch (SQLException e) {
-            throw new RuntimeException("Fail to get Sql databases(获取数据库列表失败)", e);
-        }
-    }
-
-    @Override
-    public List<String> queryTables(SqlConnection connection, String database) {
-        try {
-            return connection.getAllTables(database);
-        } catch (SQLException e) {
-            throw new RuntimeException("Fail to get Sql tables(获取表列表失败)", e);
-        }
-    }
-
-    @Override
-    public List<MetaColumnInfo> queryColumns(SqlConnection connection, String database, String table) {
-        try {
-            return connection.getColumns(database, table);
-        } catch (SQLException | ClassNotFoundException e) {
-            throw new RuntimeException("Fail to get Sql columns(获取字段列表失败)", e);
-        }
-    }
-}
diff --git a/datasource/metadatamanager/service/mysql/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/SqlParamsMapper.java b/datasource/metadatamanager/service/mysql/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/SqlParamsMapper.java
deleted file mode 100644
index c41285e..0000000
--- a/datasource/metadatamanager/service/mysql/src/main/java/com/webank/wedatasphere/linkis/metadatamanager/service/SqlParamsMapper.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2019 WeBank
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.metadatamanager.service;
-
-import com.webank.wedatasphere.linkis.common.conf.CommonVars;
-
-/**
- * @author davidhua
- * 2020/02/14
- */
-public class SqlParamsMapper {
-
-    public static final CommonVars<String> PARAM_SQL_HOST =
-            CommonVars.apply("wds.linkis.server.mdm.service.sql.host", "host");
-
-    public static final CommonVars<String> PARAM_SQL_PORT =
-            CommonVars.apply("wds.linkis.server.mdm.service.sql.port", "port");
-
-    public static final CommonVars<String> PARAM_SQL_USERNAME =
-            CommonVars.apply("wds.linkis.server.mdm.service.sql.username", "username");
-
-    public static final CommonVars<String> PARAM_SQL_PASSWORD =
-            CommonVars.apply("wds.linkis.server.mdm.service.sql.password", "password");
-
-    public static final CommonVars<String> PARAM_SQL_EXTRA_PARAMS =
-            CommonVars.apply("wds.linkis.server.mdm.service.sql.params", "params");
-}
diff --git a/db/linkis_ddl.sql b/db/linkis_ddl.sql
index 620c7e2..c271459 100644
--- a/db/linkis_ddl.sql
+++ b/db/linkis_ddl.sql
@@ -1,171 +1,45 @@
 SET FOREIGN_KEY_CHECKS=0;
 
--- ----------------------------
--- Table structure for linkis_develop_application
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_develop_application`;
-CREATE TABLE `linkis_develop_application` (
-  `id` bigint(20) NOT NULL AUTO_INCREMENT,
-  `name` varchar(200) DEFAULT NULL,
-  `source` varchar(50) DEFAULT NULL COMMENT 'Source of the development application',
-  `version` varchar(50) DEFAULT NULL,
-  `description` text,
-  `user_id` bigint(20) DEFAULT NULL,
-  `is_published` bit(1) DEFAULT NULL,
-  `create_time` datetime DEFAULT NULL,
-  `update_time` datetime DEFAULT NULL,
-  `org_id` bigint(20) DEFAULT NULL COMMENT 'Organization ID',
-  `visibility` bit(1) DEFAULT NULL,
-  `is_transfer` bit(1) DEFAULT NULL COMMENT 'Reserved word',
-  `initial_org_id` bigint(20) DEFAULT NULL,
-  `json_path` varchar(255) DEFAULT NULL COMMENT 'Path of the jason file which is used for data development in the front-end. ',
-  `isAsh` bit(1) DEFAULT NULL COMMENT 'If it is active',
-  `pic` varchar(255) DEFAULT NULL,
-  `star_num` int(11) DEFAULT '0',
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
-
-
--- ----------------------------
--- Table structure for linkis_project_list
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_project_list`;
-CREATE TABLE `linkis_project_list` (
-  `id` bigint(20) NOT NULL AUTO_INCREMENT,
-  `name` varchar(200) DEFAULT NULL COMMENT 'Project service name which needs to be initialized',
-  `is_project_need_init` bit(1) DEFAULT NULL,
-  `url` varchar(255) DEFAULT NULL COMMENT 'URL used to initialize a project',
-  `is_user_need_init` bit(1) DEFAULT NULL,
-  `is_project_inited` bit(1) DEFAULT NULL,
-  `json` text COMMENT 'Data provided by project to the front-end would be jsonized after initialization.',
-  `level` tinyint(255) DEFAULT NULL COMMENT 'Marks the importance of the project. When encounter initialization failure, if a user tried to log in, the project would report an error if its level is greater than 4, otherwise, grey the corresponding function button',
-  `user_init_url` varchar(255) DEFAULT NULL COMMENT 'URL used to initialize a user',
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
-
-
--- ----------------------------
--- Table structure for linkis_project_user
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_project_user`;
-CREATE TABLE `linkis_project_user` (
-  `id` bigint(20) NOT NULL AUTO_INCREMENT,
-  `project_id` bigint(20) DEFAULT NULL,
-  `json` varchar(255) DEFAULT NULL COMMENT 'Data returned by initializing a user would be jsonized',
-  `user_id` bigint(20) DEFAULT NULL,
-  `is_init_success` bit(1) DEFAULT NULL,
-  `is_new_feature` bit(1) DEFAULT NULL COMMENT 'If this project is a new function to the user',
-  PRIMARY KEY (`id`),
-  UNIQUE KEY `project_id` (`project_id`,`user_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-
--- ----------------------------
--- Table structure for linkis_user
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_user`;
-CREATE TABLE `linkis_user` (
-  `id` bigint(20) NOT NULL AUTO_INCREMENT,
-  `email` varchar(255) DEFAULT NULL,
-  `username` varchar(255) NOT NULL,
-  `password` varchar(255) DEFAULT NULL,
-  `admin` tinyint(1) DEFAULT NULL COMMENT 'If it is an administrator',
-  `active` tinyint(1) DEFAULT NULL COMMENT 'If it is active',
-  `name` varchar(255) DEFAULT NULL COMMENT 'User name',
-  `description` varchar(255) DEFAULT NULL,
-  `department` varchar(255) DEFAULT NULL,
-  `avatar` varchar(255) DEFAULT NULL COMMENT 'Path of the avator',
-  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-  `create_by` bigint(20) DEFAULT '0',
-  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
-  `update_by` bigint(20) DEFAULT '0',
-  `is_first_login` bit(1) DEFAULT NULL COMMENT 'If it is the first time to log in',
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-SET FOREIGN_KEY_CHECKS=0;
-
-
--- ----------------------------
--- Table structure for linkis_application
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_application`;
-CREATE TABLE `linkis_application` (
-  `id` bigint(20) NOT NULL AUTO_INCREMENT,
-  `name` varchar(50) DEFAULT NULL COMMENT 'Can be one of the following: execute_application_name(in table linkis_task), request_application_name(i.e. creator), general configuration',
-  `chinese_name` varchar(50) DEFAULT NULL,
-  `description` varchar(200) DEFAULT NULL,
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4;
-
-
--- ----------------------------
--- Table structure for linkis_config_key_tree
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_config_key_tree`;
-CREATE TABLE `linkis_config_key_tree` (
-  `id` bigint(20) NOT NULL AUTO_INCREMENT,
-  `key_id` bigint(20) DEFAULT NULL,
-  `tree_id` bigint(20) DEFAULT NULL,
-  PRIMARY KEY (`id`),
-  KEY `key_id` (`key_id`),
-  KEY `tree_id` (`tree_id`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4;
-
-
--- ----------------------------
--- Table structure for linkis_config_key_user
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_config_key_user`;
-CREATE TABLE `linkis_config_key_user` (
-  `id` bigint(20) NOT NULL AUTO_INCREMENT,
-  `application_id` bigint(20) DEFAULT NULL COMMENT 'Same as id in tale linkis_application, except that it cannot be the id of creator',
-  `key_id` bigint(20) DEFAULT NULL,
-  `user_name` varchar(50) DEFAULT NULL,
-  `value` varchar(200) DEFAULT NULL COMMENT 'Value of the key',
-  PRIMARY KEY (`id`),
-  UNIQUE KEY `application_id_2` (`application_id`,`key_id`,`user_name`),
-  KEY `key_id` (`key_id`),
-  KEY `application_id` (`application_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-
-
--- ----------------------------
--- Table structure for linkis_config_key
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_config_key`;
-CREATE TABLE `linkis_config_key` (
+DROP TABLE IF EXISTS `linkis_configuration_config_key`;
+CREATE TABLE `linkis_configuration_config_key`(
   `id` bigint(20) NOT NULL AUTO_INCREMENT,
   `key` varchar(50) DEFAULT NULL COMMENT 'Set key, e.g. spark.executor.instances',
   `description` varchar(200) DEFAULT NULL,
   `name` varchar(50) DEFAULT NULL,
-  `application_id` bigint(20) DEFAULT NULL COMMENT 'Correlate with id in table linkis_application',
+  `engine_conn_type` varchar(50) DEFAULT NULL COMMENT 'engine type,such as spark,hive etc',
   `default_value` varchar(200) DEFAULT NULL COMMENT 'Adopted when user does not set key',
   `validate_type` varchar(50) DEFAULT NULL COMMENT 'Validate type, one of the following: None, NumInterval, FloatInterval, Include, Regex, OPF, Custom Rules',
-  `validate_range` varchar(100) DEFAULT NULL COMMENT 'Validate range',
+  `validate_range` varchar(50) DEFAULT NULL COMMENT 'Validate range',
   `is_hidden` tinyint(1) DEFAULT NULL COMMENT 'Whether it is hidden from user. If set to 1(true), then user cannot modify, however, it could still be used in back-end',
   `is_advanced` tinyint(1) DEFAULT NULL COMMENT 'Whether it is an advanced parameter. If set to 1(true), parameters would be displayed only when user choose to do so',
   `level` tinyint(1) DEFAULT NULL COMMENT 'Basis for displaying sorting in the front-end. Higher the level is, higher the rank the parameter gets',
-  `unit` varchar(64) DEFAULT NULL,
-  PRIMARY KEY (`id`),
-  KEY `application_id` (`application_id`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4;
+  `treeName` varchar(20) DEFAULT NULL COMMENT 'Reserved field, representing the subdirectory of engineType',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
 
 
--- ----------------------------
--- Table structure for linkis_config_tree
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_config_tree`;
-CREATE TABLE `linkis_config_tree` (
+DROP TABLE IF EXISTS `linkis_configuration_config_value`;
+CREATE TABLE linkis_configuration_config_value(
   `id` bigint(20) NOT NULL AUTO_INCREMENT,
-  `parent_id` bigint(20) DEFAULT NULL COMMENT 'Parent ID',
-  `name` varchar(50) DEFAULT NULL COMMENT 'Application name or category name under general configuration',
-  `description` varchar(200) DEFAULT NULL,
-  `application_id` bigint(20) DEFAULT NULL COMMENT 'Same as id(in table linkis_application), except that it cannot be the id of creator',
+  `configkey_id` bigint(20),
+  `config_value` varchar(50),
+  `config_label_id`int(20),
   PRIMARY KEY (`id`),
-  KEY `application_id` (`application_id`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4;
-SET FOREIGN_KEY_CHECKS=0;
+  UNIQUE INDEX(`configkey_id`, `config_label_id`)
+)ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+DROP TABLE IF EXISTS `linkis_configuration_category`;
+CREATE TABLE `linkis_configuration_category` (
+  `id` int(20) NOT NULL AUTO_INCREMENT,
+  `label_id` int(20) NOT NULL,
+  `level` int(20) NOT NULL,
+  `description` varchar(200),
+  `tag` varchar(200),
+  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`id`),
+  UNIQUE INDEX(`label_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
 
 -- ----------------------------
 -- Table structure for linkis_task
@@ -176,6 +50,7 @@
   `instance` varchar(50) DEFAULT NULL COMMENT 'An instance of Entrance, consists of IP address of the entrance server and port',
   `exec_id` varchar(50) DEFAULT NULL COMMENT 'execution ID, consists of jobID(generated by scheduler), executeApplicationName , creator and instance',
   `um_user` varchar(50) DEFAULT NULL COMMENT 'User name',
+  `submit_user` varchar(50) DEFAULT NULL COMMENT 'submitUser name',
   `execution_code` text COMMENT 'Run script. When exceeding 6000 lines, script would be stored in HDFS and its file path would be stored in database',
   `progress` float DEFAULT NULL COMMENT 'Script execution progress, between zero and one',
   `log_path` varchar(200) DEFAULT NULL COMMENT 'File path of the log files',
@@ -191,63 +66,15 @@
   `script_path` varchar(200) DEFAULT NULL COMMENT 'Path of the script in workspace',
   `params` text COMMENT 'Configuration item of the parameters',
   `engine_instance` varchar(50) DEFAULT NULL COMMENT 'An instance of engine, consists of IP address of the engine server and port',
+  `task_resource` varchar(1024) DEFAULT NULL,
   `engine_start_time` time DEFAULT NULL,
+  `label_json` varchar(200) DEFAULT NULL COMMENT 'label json',
   PRIMARY KEY (`id`),
   KEY `created_time` (`created_time`),
   KEY `um_user` (`um_user`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 
 
-DROP TABLE IF EXISTS `linkis_em_resource_meta_data`;
-CREATE TABLE `linkis_em_resource_meta_data` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `em_application_name` varchar(500) COLLATE utf8_bin DEFAULT NULL,
-  `em_instance` varchar(500) COLLATE utf8_bin DEFAULT NULL,
-  `total_resource` varchar(2000) COLLATE utf8_bin DEFAULT NULL,
-  `protected_resource` varchar(2000) COLLATE utf8_bin DEFAULT NULL,
-  `resource_policy` varchar(500) COLLATE utf8_bin DEFAULT NULL,
-  `used_resource` varchar(2000) COLLATE utf8_bin DEFAULT NULL,
-  `left_resource` varchar(2000) COLLATE utf8_bin DEFAULT NULL,
-  `locked_resource` varchar(2000) COLLATE utf8_bin DEFAULT NULL,
-  `register_time` bigint(20) DEFAULT NULL,
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-
-DROP TABLE IF EXISTS `linkis_resource_lock`;
-CREATE TABLE `linkis_resource_lock` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `user` varchar(50) COLLATE utf8_bin DEFAULT NULL,
-  `em_application_name` varchar(50) COLLATE utf8_bin DEFAULT NULL,
-  `em_instance` varchar(50) COLLATE utf8_bin DEFAULT NULL,
-  PRIMARY KEY (`id`),
-  UNIQUE KEY `lock_unique` (`user`,`em_application_name`,`em_instance`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-
-DROP TABLE IF EXISTS `linkis_user_resource_meta_data`;
-CREATE TABLE `linkis_user_resource_meta_data` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `user` varchar(500) COLLATE utf8_bin DEFAULT NULL,
-  `ticket_id` varchar(500) COLLATE utf8_bin DEFAULT NULL,
-  `creator` varchar(500) COLLATE utf8_bin DEFAULT NULL,
-  `em_application_name` varchar(500) COLLATE utf8_bin DEFAULT NULL,
-  `em_instance` varchar(500) COLLATE utf8_bin DEFAULT NULL,
-  `engine_application_name` varchar(500) COLLATE utf8_bin DEFAULT NULL,
-  `engine_instance` varchar(500) COLLATE utf8_bin DEFAULT NULL,
-  `user_locked_resource` varchar(5000) COLLATE utf8_bin DEFAULT NULL,
-  `user_used_resource` varchar(5000) COLLATE utf8_bin DEFAULT NULL,
-  `resource_type` varchar(500) COLLATE utf8_bin DEFAULT NULL,
-  `locked_time` bigint(20) DEFAULT NULL,
-  `used_time` bigint(20) DEFAULT NULL,
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-
-DROP TABLE IF EXISTS `linkis_em_meta_data`;
-CREATE TABLE `linkis_em_meta_data` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `em_name` varchar(500) COLLATE utf8_bin DEFAULT NULL,
-  `resource_request_policy` varchar(500) COLLATE utf8_bin DEFAULT NULL,
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
 
 SET FOREIGN_KEY_CHECKS=0;
 
@@ -295,7 +122,7 @@
 CREATE TABLE `linkis_udf_tree` (
   `id` bigint(20) NOT NULL AUTO_INCREMENT,
   `parent` bigint(20) NOT NULL,
-  `name` varchar(200) DEFAULT NULL COMMENT 'Category name of the function. It would be displayed in the front-end',
+  `name` varchar(100) DEFAULT NULL COMMENT 'Category name of the function. It would be displayed in the front-end',
   `user_name` varchar(50) NOT NULL,
   `description` varchar(255) DEFAULT NULL,
   `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
@@ -473,6 +300,102 @@
   PRIMARY KEY (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
 
+-- ----------------------------
+-- Table structure for linkis_role
+-- ----------------------------
+DROP TABLE IF EXISTS `linkis_role`;
+CREATE TABLE `linkis_role` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `name` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `chinese_name` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `description` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+-- ----------------------------
+-- Table structure for linkis_user_role
+-- ----------------------------
+DROP TABLE IF EXISTS `linkis_user_role`;
+ CREATE TABLE `linkis_user_role` (
+  `user_id` bigint(20) NOT NULL,
+  `role_id` bigint(20) NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+-- ----------------------------
+-- Table structure for linkis_cs_context_map
+-- ----------------------------
+DROP TABLE IF EXISTS `linkis_cs_context_map`;
+CREATE TABLE `linkis_cs_context_map` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `key` varchar(128) DEFAULT NULL,
+  `context_scope` varchar(32) DEFAULT NULL,
+  `context_type` varchar(32) DEFAULT NULL,
+  `props` text,
+  `value` text,
+  `context_id` int(11) DEFAULT NULL,
+  `keywords` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `key` (`key`,`context_id`,`context_type`),
+  KEY `keywords` (`keywords`(191))
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Table structure for linkis_cs_context_map_listener
+-- ----------------------------
+DROP TABLE IF EXISTS `linkis_cs_context_map_listener`;
+CREATE TABLE `linkis_cs_context_map_listener` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `listener_source` varchar(255) DEFAULT NULL,
+  `key_id` int(11) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Table structure for linkis_cs_context_history
+-- ----------------------------
+DROP TABLE IF EXISTS `linkis_cs_context_history`;
+CREATE TABLE `linkis_cs_context_history` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `context_id` int(11) DEFAULT NULL,
+  `source` text,
+  `context_type` varchar(32) DEFAULT NULL,
+  `history_json` text,
+  `keyword` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`id`),
+  KEY `keyword` (`keyword`(191))
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Table structure for linkis_cs_context_id
+-- ----------------------------
+DROP TABLE IF EXISTS `linkis_cs_context_id`;
+CREATE TABLE `linkis_cs_context_id` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `user` varchar(32) DEFAULT NULL,
+  `application` varchar(32) DEFAULT NULL,
+  `source` varchar(255) DEFAULT NULL,
+  `expire_type` varchar(32) DEFAULT NULL,
+  `expire_time` datetime DEFAULT NULL,
+  `instance` varchar(32) DEFAULT NULL,
+  `backup_instance` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`id`),
+  KEY `instance` (`instance`),
+  KEY `backup_instance` (`backup_instance`(191)),
+  KEY `instance_2` (`instance`,`backup_instance`(191))
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Table structure for linkis_cs_context_listener
+-- ----------------------------
+DROP TABLE IF EXISTS `linkis_cs_context_listener`;
+CREATE TABLE `linkis_cs_context_listener` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `listener_source` varchar(255) DEFAULT NULL,
+  `context_id` int(11) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+
 drop table if exists `linkis_resources`;
 CREATE TABLE if not exists `linkis_resources` (
   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
@@ -566,153 +489,256 @@
   PRIMARY KEY (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 
--- ----------------------------
--- Table structure for linkis_cs_context_map
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_cs_context_map`;
-CREATE TABLE `linkis_cs_context_map` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `key` varchar(128) DEFAULT NULL,
-  `context_scope` varchar(32) DEFAULT NULL,
-  `context_type` varchar(32) DEFAULT NULL,
-  `props` text,
-  `value` text,
-  `context_id` int(11) DEFAULT NULL,
-  `keywords` varchar(255) DEFAULT NULL,
-  PRIMARY KEY (`id`),
-  UNIQUE KEY `key` (`key`,`context_id`,`context_type`),
-  KEY `keywords` (`keywords`(191))
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 
--- ----------------------------
--- Table structure for linkis_cs_context_map_listener
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_cs_context_map_listener`;
-CREATE TABLE `linkis_cs_context_map_listener` (
+
+drop table if exists linkis_bml_project;
+create table if not exists linkis_bml_project(
+  `id` int(10) NOT NULL AUTO_INCREMENT,
+  `name` varchar(128) DEFAULT NULL,
+  `system` varchar(64) not null default 'dss',
+  `source` varchar(1024) default null,
+  `description` varchar(1024) default null,
+  `creator` varchar(128) not null,
+  `enabled` tinyint default 1,
+  `create_time` datetime DEFAULT now(),
+  unique key(`name`),
+PRIMARY KEY (`id`)
+)ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=COMPACT;
+
+
+
+drop table if exists linkis_bml_project_user;
+create table if not exists linkis_bml_project_user(
+  `id` int(10) NOT NULL AUTO_INCREMENT,
+  `project_id` int(10) NOT NULL,
+  `username` varchar(64) DEFAULT NULL,
+  `priv` int(10) not null default 7, -- rwx 421 相加, 8是管理员,可以为其他用户授权
+  `creator` varchar(128) not null,
+  `create_time` datetime DEFAULT now(),
+  `expire_time` datetime default null,
+  unique key user_project(`username`, `project_id`),
+PRIMARY KEY (`id`)
+)ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=COMPACT;
+
+
+drop table if exists linkis_bml_project_resource;
+create table if not exists linkis_bml_project_resource(
+  `id` int(10) NOT NULL AUTO_INCREMENT,
+  `project_id` int(10) NOT NULL,
+  `resource_id` varchar(128) DEFAULT NULL,
+PRIMARY KEY (`id`)
+)ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=COMPACT;
+
+DROP TABLE IF EXISTS `linkis_manager_service_instance`;
+
+CREATE TABLE `linkis_manager_service_instance` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
-  `listener_source` varchar(255) DEFAULT NULL,
-  `key_id` int(11) DEFAULT NULL,
+  `instance` varchar(64) COLLATE utf8_bin DEFAULT NULL,
+  `name` varchar(32) COLLATE utf8_bin DEFAULT NULL,
+  `owner` varchar(32) COLLATE utf8_bin DEFAULT NULL,
+  `mark` varchar(32) COLLATE utf8_bin DEFAULT NULL,
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  `updator` varchar(32) COLLATE utf8_bin DEFAULT NULL,
+  `creator` varchar(32) COLLATE utf8_bin DEFAULT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `instance` (`instance`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+DROP TABLE IF EXISTS `linkis_manager_linkis_resources`;
+
+CREATE TABLE `linkis_manager_linkis_resources` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `max_resource` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `min_resource` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `used_resource` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `left_resource` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `expected_resource` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `locked_resource` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `resourceType` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `ticketId` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  `updator` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `creator` varchar(255) COLLATE utf8_bin DEFAULT NULL,
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
 
--- ----------------------------
--- Table structure for linkis_cs_context_history
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_cs_context_history`;
-CREATE TABLE `linkis_cs_context_history` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `context_id` int(11) DEFAULT NULL,
-  `source` text,
-  `context_type` varchar(32) DEFAULT NULL,
-  `history_json` text,
-  `keyword` varchar(255) DEFAULT NULL,
-  PRIMARY KEY (`id`),
-  KEY `keyword` (`keyword`(191))
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+DROP TABLE IF EXISTS `linkis_manager_lock`;
 
--- ----------------------------
--- Table structure for linkis_cs_context_id
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_cs_context_id`;
-CREATE TABLE `linkis_cs_context_id` (
+CREATE TABLE `linkis_manager_lock` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
-  `user` varchar(32) DEFAULT NULL,
-  `application` varchar(32) DEFAULT NULL,
-  `source` varchar(255) DEFAULT NULL,
-  `expire_type` varchar(32) DEFAULT NULL,
-  `expire_time` datetime DEFAULT NULL,
-  `instance` varchar(32) DEFAULT NULL,
-  `backup_instance` varchar(255) DEFAULT NULL,
-  PRIMARY KEY (`id`),
-  KEY `instance` (`instance`),
-  KEY `backup_instance` (`backup_instance`(191)),
-  KEY `instance_2` (`instance`,`backup_instance`(191))
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-
--- ----------------------------
--- Table structure for linkis_cs_context_listener
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_cs_context_listener`;
-CREATE TABLE `linkis_cs_context_listener` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `listener_source` varchar(255) DEFAULT NULL,
-  `context_id` int(11) DEFAULT NULL,
+  `lock_object` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `time_out` longtext COLLATE utf8_bin,
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+DROP TABLE IF EXISTS `linkis_external_resource_provider`;
+CREATE TABLE `linkis_external_resource_provider` (
+  `id` int(10) NOT NULL AUTO_INCREMENT,
+  `resource_type` varchar(32) NOT NULL,
+  `name` varchar(32) NOT NULL,
+  `labels` varchar(32) DEFAULT NULL,
+  `config` text NOT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+DROP TABLE IF EXISTS `linkis_manager_engine_em`;
+CREATE TABLE `linkis_manager_engine_em` (
+  `id` int(20) NOT NULL AUTO_INCREMENT,
+  `engine_instance` varchar(64) COLLATE utf8_bin DEFAULT NULL,
+  `em_instance` varchar(64) COLLATE utf8_bin DEFAULT NULL,
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+DROP TABLE IF EXISTS `linkis_manager_label`;
+
+CREATE TABLE `linkis_manager_label` (
+  `id` int(20) NOT NULL AUTO_INCREMENT,
+  `label_key` varchar(32) COLLATE utf8_bin NOT NULL,
+  `label_value` varchar(255) COLLATE utf8_bin NOT NULL,
+  `label_feature` varchar(16) COLLATE utf8_bin NOT NULL,
+  `label_value_size` int(20) NOT NULL,
+  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `label_key_value` (`label_key`,`label_value`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+DROP TABLE IF EXISTS `linkis_manager_label_value_relation`;
+
+CREATE TABLE `linkis_manager_label_value_relation` (
+  `label_value_key` varchar(255) COLLATE utf8_bin NOT NULL,
+  `label_value_content` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `label_id` int(20) DEFAULT NULL,
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  UNIQUE KEY `label_value_key_label_id` (`label_value_key`,`label_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+DROP TABLE IF EXISTS `linkis_manager_label_resource`;
+CREATE TABLE `linkis_manager_label_resource` (
+  `id` int(20) NOT NULL AUTO_INCREMENT,
+  `label_id` int(20) DEFAULT NULL,
+  `resource_id` int(20) DEFAULT NULL,
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
 
 
+DROP TABLE IF EXISTS `linkis_manager_label_service_instance`;
+CREATE TABLE `linkis_manager_label_service_instance` (
+  `id` int(20) NOT NULL AUTO_INCREMENT,
+  `label_id` int(20) DEFAULT NULL,
+  `service_instance` varchar(64) COLLATE utf8_bin DEFAULT NULL,
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
 
 
--- ----------------------------
--- Table structure for linkis_datasource
--- ----------------------------
-CREATE TABLE IF NOT EXISTS `linkis_datasource` (
-   `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
-   `datasource_name` VARCHAR(100) NOT NULL COMMENT 'Data source name',
-   `datasource_type_id` BIGINT(20) DEFAULT NULL COMMENT 'Data source type id',
-   `datasource_desc` VARCHAR(200) DEFAULT NULL COMMENT 'Data source description',
-   `create_identify` VARCHAR(20) DEFAULT 'BDP' COMMENT 'Example: project name',
-	`create_system` VARCHAR(20) DEFAULT 'BDP' COMMENT 'Create system',
-	`create_user` VARCHAR(50) DEFAULT NULL COMMENT 'Creator',
-	`parameter` TEXT COMMENT 'Connect parameters',
-	`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-	`modify_user` VARCHAR(50) DEFAULT NULL COMMENT 'Modify user',
-	`modify_time` DATETIME DEFAULT NULL COMMENT 'Modify time',
-	`datasource_env_id` BIGINT(20) DEFAULT NULL,
-	PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=140 DEFAULT CHARSET=utf8;
+DROP TABLE IF EXISTS `linkis_manager_label_user`;
+CREATE TABLE `linkis_manager_label_user` (
+  `id` int(20) NOT NULL AUTO_INCREMENT,
+  `username` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `label_id` int(20) DEFAULT NULL,
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
 
--- ----------------------------
--- Table structure for linkis_datasource_env
--- ----------------------------
-CREATE TABLE IF NOT EXISTS `linkis_datasource_env` (
-	`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
-	`env_name` VARCHAR(100) NOT NULL COMMENT 'Environment name',
-    `env_desc` VARCHAR(200) DEFAULT NULL COMMENT 'Description',
-	`create_user` VARCHAR(50) DEFAULT NULL COMMENT 'Creator',
-	`parameter` TEXT NOT NULL COMMENT 'Connect parameters',
-	`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-	`modify_user` VARCHAR(50) DEFAULT NULL COMMENT 'Modify user',
-	`modify_time` DATETIME DEFAULT NULL COMMENT 'Modify time',
-	PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=108 DEFAULT CHARSET=utf8;
 
--- ----------------------------
--- Table structure for linkis_datasource_type_key
--- ----------------------------
-CREATE TABLE IF NOT EXISTS `linkis_datasource_type_key` (
-	`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
-	`key` VARCHAR(50) DEFAULT NULL COMMENT 'Key of variable',
-	`description` VARCHAR(200) DEFAULT NULL COMMENT 'Description',
-	`name` VARCHAR(50) DEFAULT NULL COMMENT 'Option name of column in page',
-	`data_source_type_id` BIGINT(20) DEFAULT NULL COMMENT 'Type id',
-	`require` TINYINT(1) DEFAULT '0',
-	`scope` VARCHAR(50) DEFAULT NULL COMMENT 'Scope',
-	`default_value` VARCHAR(200) DEFAULT NULL COMMENT 'Default value',
-	`value_type` VARCHAR(50) DEFAULT NULL COMMENT 'Value type',
-	`value_regex` VARCHAR(100) DEFAULT NULL COMMENT 'Value regex',
-	`ref_id` BIGINT(20) DEFAULT NULL COMMENT 'Related id',
-	`ref_value` VARCHAR(100) DEFAULT NULL COMMENT 'Related value',
-	PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+DROP TABLE IF EXISTS `linkis_manager_metrics_history`;
 
--- ----------------------------
--- Table structure for linkis_datasource_type
--- ----------------------------
-CREATE TABLE IF NOT EXISTS `linkis_datasource_type` (
-	`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
-	`icon` VARCHAR(50) DEFAULT NULL COMMENT 'Icon',
-	`description` VARCHAR(200) DEFAULT NULL COMMENT 'Description',
-	`name` VARCHAR(50) DEFAULT NULL COMMENT 'Name',
-	PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+CREATE TABLE `linkis_manager_metrics_history` (
+  `instance_status` int(20) DEFAULT NULL,
+  `overload` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `heartbeat_msg` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `healthy_status` int(20) DEFAULT NULL,
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  `creator` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `ticketID` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `serviceName` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `instance` varchar(255) COLLATE utf8_bin DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
 
--- ----------------------------
--- Table structure for linkis_datasource_type_env
--- ----------------------------
-CREATE TABLE IF NOT EXISTS `linkis_datasource_type_env` (
-	`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
-	`data_source_type_id` BIGINT(20) DEFAULT NULL COMMENT 'Type id',
-	`env_id` BIGINT(20) DEFAULT NULL COMMENT 'Environment id',
-	PRIMARY KEY (`id`)
-)ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
\ No newline at end of file
+DROP TABLE IF EXISTS `linkis_manager_service_instance_metrics`;
+
+CREATE TABLE `linkis_manager_service_instance_metrics` (
+  `instance` varchar(32) COLLATE utf8_bin NOT NULL,
+  `instance_status` int(11) DEFAULT NULL,
+  `overload` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `heartbeat_msg` text COLLATE utf8_bin DEFAULT NULL,
+  `healthy_status` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`instance`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+DROP TABLE IF EXISTS `linkis_engine_conn_plugin_bml_resources`;
+CREATE TABLE `linkis_engine_conn_plugin_bml_resources` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `engine_conn_type` varchar(100) NOT NULL COMMENT '引擎类型',
+  `version` varchar(100) COMMENT '版本',
+  `file_name` varchar(255) COMMENT '文件名',
+  `file_size` bigint(20)  DEFAULT 0 NOT NULL COMMENT '文件大小',
+  `last_modified` bigint(20)  COMMENT '文件更新时间',
+  `bml_resource_id` varchar(100) NOT NULL COMMENT '所属系统',
+  `bml_resource_version` varchar(200) NOT NULL COMMENT '资源所属者',
+  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `last_update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
+
+DROP TABLE IF EXISTS `linkis_instance_label`;
+CREATE TABLE `linkis_instance_label` (
+  `id` int(20) NOT NULL AUTO_INCREMENT,
+  `label_key` varchar(32) COLLATE utf8_bin NOT NULL COMMENT 'string key',
+  `label_value` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'string value',
+  `label_feature` varchar(16) COLLATE utf8_bin NOT NULL COMMENT 'store the feature of label, but it may be redundant',
+  `label_value_size` int(20) NOT NULL COMMENT 'size of key -> value map',
+  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'update unix timestamp',
+  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'update unix timestamp',
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `label_key_value` (`label_key`,`label_value`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+
+DROP TABLE IF EXISTS `linkis_instance_label_value_relation`;
+CREATE TABLE `linkis_instance_label_value_relation` (
+  `label_value_key` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'value key',
+  `label_value_content` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT 'value content',
+  `label_id` int(20) DEFAULT NULL COMMENT 'id reference linkis_instance_label -> id',
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'update unix timestamp',
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'create unix timestamp',
+  UNIQUE KEY `label_value_key_label_id` (`label_value_key`,`label_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+DROP TABLE IF EXISTS `linkis_instance_label_relation`;
+CREATE TABLE `linkis_instance_label_relation` (
+  `id` int(20) NOT NULL AUTO_INCREMENT,
+  `label_id` int(20) DEFAULT NULL COMMENT 'id reference linkis_instance_label -> id',
+  `service_instance` varchar(64) NOT NULL COLLATE utf8_bin COMMENT 'structure like ${host|machine}:${port}',
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'update unix timestamp',
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'create unix timestamp',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+
+DROP TABLE IF EXISTS `linkis_instance_info`;
+CREATE TABLE `linkis_instance_info` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `instance` varchar(128) COLLATE utf8_bin DEFAULT NULL COMMENT 'structure like ${host|machine}:${port}',
+  `name` varchar(128) COLLATE utf8_bin DEFAULT NULL COMMENT 'equal application name in registry',
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'update unix timestamp',
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'create unix timestamp',
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `instance` (`instance`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+
diff --git a/db/linkis_dml.sql b/db/linkis_dml.sql
index 4ffba93..cccd2d8 100644
--- a/db/linkis_dml.sql
+++ b/db/linkis_dml.sql
@@ -1,260 +1,318 @@
-INSERT INTO `linkis_application` (`id`, `name`, `chinese_name`, `description`) VALUES (0, '通用设置', NULL, NULL);
-INSERT INTO `linkis_application` (`id`, `name`, `chinese_name`, `description`) VALUES (0, 'spark', NULL, NULL);
-INSERT INTO `linkis_application` (`id`, `name`, `chinese_name`, `description`) VALUES (0, 'IDE', NULL, NULL);
-INSERT INTO `linkis_application` (`id`, `name`, `chinese_name`, `description`) VALUES (0, 'hive', NULL, NULL);
-INSERT INTO `linkis_application` (`id`, `name`, `chinese_name`, `description`) VALUES (0, 'storage', NULL, NULL);
-INSERT INTO `linkis_application` (`id`, `name`, `chinese_name`, `description`) VALUES (0, 'python', NULL, NULL);
-INSERT INTO `linkis_application` (`id`, `name`, `chinese_name`, `description`) VALUES (0, 'tidb', NULL, NULL);
-INSERT INTO `linkis_application` (`id`, `name`, `chinese_name`, `description`) VALUES (0, 'presto', NULL, NULL);
-
-SELECT @application_id := id from linkis_application where name = '通用设置';
-INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', '队列资源', NULL, @application_id);
-INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', '预热机制', NULL, @application_id);
-INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', '清理机制', NULL, @application_id);
-INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', '引擎设置', NULL, @application_id);
-INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', '驱动器资源', NULL, @application_id);
-
-SELECT @application_id := id from linkis_application where name = 'spark';
-INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', 'spark资源设置', NULL, @application_id);
-INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', 'spark引擎设置', NULL, @application_id);
-
-SELECT @application_id := id from linkis_application where name = 'hive';
-INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', 'hive引擎设置', NULL, @application_id);
-INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', 'hive资源设置', NULL, @application_id);
-
-SELECT @application_id := id from linkis_application where name = 'python';
-INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', 'python引擎设置', NULL, @application_id);
-INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', 'python资源设置', NULL, @application_id);
-
-SELECT @application_id := id from linkis_application where name = 'tidb';
-INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', 'tidb设置', NULL, @application_id);
-INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', 'spark引擎设置', NULL, @application_id);
-INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', 'spark资源设置', NULL, @application_id);
-
-SELECT @application_id := id from linkis_application where name = 'presto';
-INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', 'presto引擎设置', NULL, @application_id);
-INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', 'presto资源设置', NULL, @application_id);
 
 
-SELECT @application_id := id from linkis_application where name = '通用设置';
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'wds.linkis.yarnqueue', 'yarn队列名', 'yarn队列名', @application_id, 'default', 'None', NULL, '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'wds.linkis.preheating.time', '预热时间', '预热时间', @application_id, '9:00', 'None', NULL, '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'wds.linkis.tmpfile.clean.time', 'tmp文件清理时间', 'tmp文件清理时间', @application_id, '10:00', 'None', NULL, '0', '0', '1');
+-- 变量:
+SET @SPARK_LABEL="spark-2.4.3";
+SET @HIVE_LABEL="hive-1.2.1";
+SET @PYTHON_LABEL="python-python2";
+SET @PIPELINE_LABEL="pipeline-*";
+SET @JDBC_LABEL="jdbc-4";
 
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'wds.linkis.yarnqueue.cores.max', '取值范围:1-500,单位:个', '队列CPU使用上限', @application_id, '150', 'Regex', '^(?:[1-9]\\d?|[1234]\\d{2}|500)$', '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `unit`) VALUES (0, 'wds.linkis.yarnqueue.memory.max', '取值范围:1-1000,单位:G', '队列内存使用上限', @application_id, '300G', 'Regex', '^([1-9]\\d{0,2}|1000)(G|g)$', '0', '0', '1', 'G');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `unit`) VALUES (0, 'wds.linkis.client.memory.max', '取值范围:1-1000,单位:G', '驱动器内存使用上限', @application_id, '20G', 'Regex', '^([1-9]\\d{0,1}|100)(G|g)$', '0', '0', '1', 'G');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'wds.linkis.instance', '范围:1-20,单位:个', '引擎最大并发数', @application_id, '10', 'NumInterval', '[1,20]', '0', '0', '1');
+-- 衍生变量:
+SET @SPARK_ALL=CONCAT('*-*,',@SPARK_LABEL);
+SET @SPARK_IDE=CONCAT('*-IDE,',@SPARK_LABEL);
+SET @SPARK_NODE=CONCAT('*-nodeexecution,',@SPARK_LABEL);
+SET @SPARK_VISUALIS=CONCAT('*-Visualis,',@SPARK_LABEL);
+
+SET @HIVE_ALL=CONCAT('*-*,',@HIVE_LABEL);
+SET @HIVE_IDE=CONCAT('*-IDE,',@HIVE_LABEL);
+SET @HIVE_NODE=CONCAT('*-nodeexecution,',@HIVE_LABEL);
+
+SET @PYTHON_ALL=CONCAT('*-*,',@PYTHON_LABEL);
+SET @PYTHON_IDE=CONCAT('*-IDE,',@PYTHON_LABEL);
+SET @PYTHON_NODE=CONCAT('*-nodeexecution,',@PYTHON_LABEL);
+
+SET @PIPELINE_ALL=CONCAT('*-*,',@PIPELINE_LABEL);
+SET @PIPELINE_IDE=CONCAT('*-IDE,',@PIPELINE_LABEL);
+
+SET @JDBC_ALL=CONCAT('*-*,',@JDBC_LABEL);
+SET @JDBC_IDE=CONCAT('*-IDE,',@JDBC_LABEL);
 
 
-SELECT @application_id := id from linkis_application where name = 'IDE';
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.executor.instances', '取值范围:1-40,单位:个', '执行器实例最大并发数', @application_id, '2', 'NumInterval', '[1,40]', '0', '0', '2');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.executor.cores', '取值范围:1-8,单位:个', '执行器核心个数', @application_id, '2', 'NumInterval', '[1,2]', '1', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.executor.memory', '取值范围:3-15,单位:G', '执行器内存大小', @application_id, '3', 'NumInterval', '[3,15]', '0', '0', '3');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.driver.cores', '取值范围:只能取1,单位:个', '驱动器核心个数', @application_id, '1', 'NumInterval', '[1,1]', '1', '1', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.driver.memory', '取值范围:1-15,单位:G', '驱动器内存大小', @application_id, '2', 'NumInterval', '[1,15]', '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'hive.client.memory', '取值范围:1-10,单位:G', 'hive引擎初始化内存大小', @application_id, '2', 'NumInterval', '[1,10]', '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'hive.client.java.opts', 'hive客户端进程参数', 'hive引擎启动时jvm参数', @application_id, '', 'None', NULL, '1', '1', '1');
 
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'wds.linkis.instance', '范围:1-3,单位:个', 'hive引擎最大并发数', @application_id, '3', 'NumInterval', '[1,3]', '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'wds.linkis.instance', '范围:1-3,单位:个', 'spark引擎最大并发数', @application_id, '3', 'NumInterval', '[1,3]', '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'wds.linkis.instance', '范围:1-3,单位:个', 'python引擎最大并发数', @application_id, '3', 'NumInterval', '[1,3]', '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'mapred.reduce.tasks', '范围:1-20,单位:个', 'reduce数', @application_id, '10', 'NumInterval', '[1,20]', '0', '1', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'dfs.block.size', '取值范围:2-10,单位:G', 'map数据块大小', @application_id, '10', 'NumInterval', '[2,10]', '0', '1', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'hive.exec.reduce.bytes.per.reducer', '取值范围:2-10,单位:G', 'reduce处理的数据量', @application_id, '10', 'NumInterval', '[2,10]', '0', '1', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'python.java.client.memory', '取值范围:1-2,单位:G', 'python引擎初始化内存大小', @application_id, '1', 'NumInterval', '[1,2]', '0', '0', '1');
+-- Configuration的默认Key
+-- 全局设置
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`) VALUES ('wds.linkis.rm.yarnqueue', 'yarn队列名', 'yarn队列名', 'default', 'None', NULL, '0', '0', '1', '队列资源');
+-- spark
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.rm.yarnqueue.instance.max', '取值范围:1-128,单位:个', 'yarn队列实例最大个数', '30', 'Regex', '^(?:[1-9]\\d?|[1234]\\d{2}|128)$', '0', '0', '1', '队列资源', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.rm.yarnqueue.cores.max', '取值范围:1-500,单位:个', '队列CPU使用上限', '150', 'Regex', '^(?:[1-9]\\d?|[1234]\\d{2}|500)$', '0', '0', '1', '队列资源', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.rm.yarnqueue.memory.max', '取值范围:1-1000,单位:G', '队列内存使用上限', '300G', 'Regex', '^([1-9]\\d{0,2}|1000)(G|g)$', '0', '0', '1', '队列资源', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.rm.client.memory.max', '取值范围:1-100,单位:G', '驱动器内存使用上限', '20G', 'Regex', '^([1-9]\\d{0,1}|100)(G|g)$', '0', '0', '1', '队列资源', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.rm.client.core.max', '取值范围:1-128,单位:个', '驱动器核心个数上限', '10', 'Regex', '^(?:[1-9]\\d?|[1234]\\d{2}|128)$', '0', '0', '1', '队列资源', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.rm.instance', '范围:1-20,单位:个', '引擎最大并发数', '10', 'NumInterval', '[1,20]', '0', '0', '1', '队列资源', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('spark.executor.instances', '取值范围:1-40,单位:个', '执行器实例最大并发数', '2', 'NumInterval', '[1,40]', '0', '0', '2', 'spark资源设置', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('spark.executor.cores', '取值范围:1-8,单位:个', '执行器核心个数',  '2', 'NumInterval', '[1,2]', '1', '0', '1','spark资源设置', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('spark.executor.memory', '取值范围:3-15,单位:G', '执行器内存大小', '3', 'NumInterval', '[3,15]', '0', '0', '3', 'spark资源设置', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('spark.driver.cores', '取值范围:只能取1,单位:个', '驱动器核心个数', '1', 'NumInterval', '[1,1]', '1', '1', '1', 'spark资源设置','spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('spark.driver.memory', '取值范围:1-15,单位:G', '驱动器内存大小','2', 'NumInterval', '[1,15]', '0', '0', '1', 'spark资源设置', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('spark.tispark.pd.addresses', NULL, NULL, 'pd0:2379', 'None', NULL, '0', '0', '1', 'tidb设置', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('spark.tispark.tidb.addr', NULL, NULL, 'tidb', 'None', NULL, '0', '0', '1', 'tidb设置', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('spark.tispark.tidb.password', NULL, NULL, NULL, 'None', NULL, '0', '0', '1', 'tidb设置', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('spark.tispark.tidb.port', NULL, NULL, '4000', 'None', NULL, '0', '0', '1', 'tidb设置', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('spark.tispark.tidb.user', NULL, NULL, 'root', 'None', NULL, '0', '0', '1', 'tidb设置', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('spark.python.version', '取值范围:python2,python3', 'python版本','python2', 'OFT', '[\"python3\",\"python2\"]', '0', '0', '1', 'spark引擎设置', 'spark');
+-- hive
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.rm.client.memory.max', '取值范围:1-100,单位:G', '驱动器内存使用上限', '20G', 'Regex', '^([1-9]\\d{0,1}|100)(G|g)$', '0', '0', '1', '队列资源', 'hive');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.rm.client.core.max', '取值范围:1-128,单位:个', '驱动器核心个数上限', '10', 'Regex', '^(?:[1-9]\\d?|[1234]\\d{2}|128)$', '0', '0', '1', '队列资源', 'hive');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.rm.instance', '范围:1-20,单位:个', '引擎最大并发数', '10', 'NumInterval', '[1,20]', '0', '0', '1', '队列资源', 'hive');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('hive.client.memory', '取值范围:1-10,单位:G', 'hive引擎初始化内存大小','2', 'NumInterval', '[1,10]', '0', '0', '1', 'hive引擎设置', 'hive');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('hive.client.java.opts', 'hive客户端进程参数', 'hive引擎启动时jvm参数','', 'None', NULL, '1', '1', '1', 'hive引擎设置', 'hive');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('mapred.reduce.tasks', '范围:1-20,单位:个', 'reduce数', '10', 'NumInterval', '[1,20]', '0', '1', '1', 'hive资源设置', 'hive');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('dfs.block.size', '取值范围:2-10,单位:G', 'map数据块大小', '10', 'NumInterval', '[2,10]', '0', '1', '1', 'hive资源设置', 'hive');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('hive.exec.reduce.bytes.per.reducer', '取值范围:2-10,单位:G', 'reduce处理的数据量', '10', 'NumInterval', '[2,10]', '0', '1', '1', 'hive资源设置', 'hive');
+-- python
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.rm.client.memory.max', '取值范围:1-100,单位:G', '驱动器内存使用上限', '20G', 'Regex', '^([1-9]\\d{0,1}|100)(G|g)$', '0', '0', '1', '队列资源', 'python');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.rm.client.core.max', '取值范围:1-128,单位:个', '驱动器核心个数上限', '10', 'Regex', '^(?:[1-9]\\d?|[1234]\\d{2}|128)$', '0', '0', '1', '队列资源', 'python');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.rm.instance', '范围:1-20,单位:个', '引擎最大并发数', '10', 'NumInterval', '[1,20]', '0', '0', '1', '队列资源', 'python');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('python.java.client.memory', '取值范围:1-2,单位:G', 'python引擎初始化内存大小', '1', 'NumInterval', '[1,2]', '0', '0', '1', 'python引擎设置', 'python');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('python.version', '取值范围:python2,python3', 'python版本','python2', 'OFT', '[\"python3\",\"python2\"]', '0', '0', '1', 'python引擎设置', 'python');
+-- pipeline
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('pipeline.output.mold', '取值范围:csv或excel', '结果集导出类型','csv', 'OFT', '[\"csv\",\"excel\"]', '0', '0', '1', 'pipeline引擎设置', 'pipeline');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('pipeline.field.split', '取值范围:,或\\t', 'csv分隔符',',', 'OFT', '[\",\",\"\\\\t\"]', '0', '0', '1', 'pipeline引擎设置', 'pipeline');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('pipeline.output.charset', '取值范围:utf-8或gbk', '结果集导出字符集','gbk', 'OFT', '[\"utf-8\",\"gbk\"]', '0', '0', '1', 'pipeline引擎设置', 'pipeline');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('pipeline.output.isoverwtite', '取值范围:true或false', '是否覆写','true', 'OFT', '[\"true\",\"false\"]', '0', '0', '1', 'pipeline引擎设置', 'pipeline');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.instance', '范围:1-3,单位:个', 'pipeline引擎最大并发数','3', 'NumInterval', '[1,3]', '0', '0', '1', 'pipeline引擎设置', 'pipeline');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('pipeline.engine.memory', '取值范围:1-10,单位:G', 'pipeline引擎初始化内存大小','2', 'NumInterval', '[1,10]', '0', '0', '1', 'pipeline资源设置', 'pipeline');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('pipeline.output.shuffle.null.type', '取值范围:NULL或者BLANK', '空值替换','NULL', 'OFT', '[\"NULL\",\"BLANK\"]', '0', '0', '1', 'pipeline引擎设置', 'pipeline');
+-- jdbc
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.jdbc.connect.url', '例如:jdbc:hive2://127.0.0.1:10000', 'jdbc连接地址', 'jdbc:hive2://127.0.0.1:10000', 'Regex', '^\s*jdbc:\w+://([^:]+)(:\d+)(/[^\?]+)?(\?\S*)?$', '0', '0', '1', '数据源配置', 'jdbc');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.jdbc.version', '取值范围:jdbc3,jdbc4', 'jdbc版本','jdbc4', 'OFT', '[\"jdbc3\",\"jdbc4\"]', '0', '0', '1', '数据源配置', 'jdbc');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.jdbc.username', 'username', '数据库连接用户名', '', '', '', '0', '0', '1', '用户配置', 'jdbc');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.jdbc.password', 'password', '数据库连接密码', '', '', '', '0', '0', '1', '用户配置', 'jdbc');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.jdbc.connect.max', '范围:1-20,单位:个', 'jdbc引擎最大连接数', '10', 'NumInterval', '[1,20]', '0', '0', '1', '数据源配置', 'jdbc');
+-- Configuration一级目录
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator','*-全局设置,*-*', 'OPTIONAL', 2, now(), now());
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator','*-IDE,*-*', 'OPTIONAL', 2, now(), now());
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator','*-Visualis,*-*', 'OPTIONAL', 2, now(), now());
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator','*-nodeexecution,*-*', 'OPTIONAL', 2, now(), now());
 
 
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'wds.linkis.instance', '范围:1-3,单位:个', 'spark引擎最大并发数', @application_id, '1', 'NumInterval', '[1,3]', '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.executor.instances', '取值范围:1-40,单位:个', '执行器实例最大并发数', @application_id, '2', 'NumInterval', '[1,40]', '0', '0', '2');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.executor.cores', '取值范围:1-8,单位:个', '执行器核心个数', @application_id, '2', 'NumInterval', '[1,2]', '1', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.executor.memory', '取值范围:3-15,单位:G', '执行器内存大小', @application_id, '3', 'NumInterval', '[3,15]', '0', '0', '3');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.driver.cores', '取值范围:只能取1,单位:个', '驱动器核心个数 ', @application_id, '1', 'NumInterval', '[1,1]', '1', '1', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.driver.memory', '取值范围:1-15,单位:G', '驱动器内存大小', @application_id, '2', 'NumInterval', '[1,15]', '0', '0', '1');
-
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.tispark.pd.addresses', NULL, NULL, @application_id, 'pd0:2379', 'None', NULL, '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.tispark.tidb.addr', NULL, NULL, @application_id, 'tidb', 'None', NULL, '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.tispark.tidb.password', NULL, NULL, @application_id, NULL, 'None', NULL, '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.tispark.tidb.port', NULL, NULL, @application_id, '4000', 'None', NULL, '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.tispark.tidb.user', NULL, NULL, @application_id, 'root', 'None', NULL, '0', '0', '1');
-
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'wds.linkis.instance', '范围:1-20,单位:个', 'presto引擎最大并发数', @application_id, '20', 'NumInterval', '[1,20]', '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'presto.session.query_max_total_memory', '取值范围:1-100,单位:GB/MB', 'presto单次任务最大使用内存', @application_id, '20GB', 'Regex', '^([1-9]\\d{0,2}|1000)(GB|MB|gb|mb)$', '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'presto.session.query_max_run_time', '单位:s(秒)/m(分)', 'presto单次任务最大耗时', @application_id, '30m', 'Regex', '^([1-9]\\d{0,2}|1000)(m|s)$', '0', '0', '1');
-
-#---------------------------------------全局设置------------------
-
-SELECT @key_id := id from linkis_config_key WHERE `key` = 'wds.linkis.yarnqueue';
-SELECT @tree_id := id from linkis_config_tree WHERE `name` = '队列资源';
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id := id from linkis_config_key WHERE `key` = 'wds.linkis.yarnqueue.cores.max';
-SELECT @tree_id := id from linkis_config_tree WHERE `name` = '队列资源';
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id := id from linkis_config_key WHERE `key` = 'wds.linkis.yarnqueue.memory.max';
-SELECT @tree_id := id from linkis_config_tree WHERE `name` = '队列资源';
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id := id from linkis_config_key WHERE `key` = 'wds.linkis.preheating.time';
-SELECT @tree_id := id from linkis_config_tree WHERE `name` = '预热机制';
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id := id from linkis_config_key WHERE `key` = 'wds.linkis.tmpfile.clean.time';
-SELECT @tree_id := id from linkis_config_tree WHERE `name` = '清理机制';
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id := id from linkis_config_key WHERE `name` = '引擎最大并发数';
-SELECT @tree_id := id from linkis_config_tree WHERE `name` = '引擎设置';
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id := id from linkis_config_key WHERE `key` = 'wds.linkis.client.memory.max';
-SELECT @tree_id := id from linkis_config_tree WHERE `name` = '驱动器资源';
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-#---------------------------------------spark---------------
-
-SELECT @key_id:=id from(SELECT k.id  as 'id'from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.executor.instances' and a.name = 'IDE' ORDER BY k.id limit 1) as tmp;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'spark资源设置' and a.name = 'spark' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id:=id from(SELECT k.id  as 'id'from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`name` = 'spark引擎最大并发数' and a.name = 'IDE' ORDER BY k.id limit 1) as tmp;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'spark引擎设置' and a.name = 'spark' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id:=id from(SELECT k.id  as 'id'from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.executor.cores' and a.name = 'IDE' ORDER BY k.id limit 1) as tmp;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'spark资源设置' and a.name = 'spark' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id:=id from(SELECT k.id  as 'id'from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.executor.memory' and a.name = 'IDE' ORDER BY k.id limit 1) as tmp;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'spark资源设置' and a.name = 'spark' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id:=id from(SELECT k.id  as 'id'from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.driver.cores' and a.name = 'IDE' ORDER BY k.id limit 1) as tmp;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'spark资源设置' and a.name = 'spark' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id:=id from(SELECT k.id  as 'id'from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.driver.memory' and a.name = 'IDE' ORDER BY k.id limit 1) as tmp;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'spark资源设置' and a.name = 'spark' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-#---------------------------------------tidb------------------
-
-SELECT @key_id:=id from(SELECT k.id  as 'id'from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.executor.instances' and a.name = 'IDE' ORDER BY k.id desc limit 1) as tmp;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'spark资源设置' and a.name = 'tidb' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id:=id from(SELECT k.id  as 'id'from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`name` = 'spark引擎最大并发数' and a.name = 'IDE' ORDER BY k.id desc limit 1) as tmp;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'spark引擎设置' and a.name = 'tidb' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id:=id from(SELECT k.id  as 'id'from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.executor.cores' and a.name = 'IDE' ORDER BY k.id desc limit 1) as tmp;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'spark资源设置' and a.name = 'tidb' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id:=id from(SELECT k.id  as 'id'from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.executor.memory' and a.name = 'IDE' ORDER BY k.id desc limit 1) as tmp;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'spark资源设置' and a.name = 'tidb' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id:=id from(SELECT k.id  as 'id'from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.driver.cores' and a.name = 'IDE' ORDER BY k.id desc limit 1) as tmp;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'spark资源设置' and a.name = 'tidb' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id:=id from(SELECT k.id  as 'id'from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.driver.memory' and a.name = 'IDE' ORDER BY k.id desc limit 1) as tmp;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'spark资源设置' and a.name = 'tidb' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.tispark.pd.addresses' and a.name = 'IDE' ;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'tidb设置' and a.name = 'tidb' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.tispark.tidb.addr' and a.name = 'IDE' ;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'tidb设置' and a.name = 'tidb' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.tispark.tidb.password' and a.name = 'IDE' ;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'tidb设置' and a.name = 'tidb' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.tispark.tidb.port' and a.name = 'IDE' ;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'tidb设置' and a.name = 'tidb' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.tispark.tidb.user' and a.name = 'IDE' ;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'tidb设置' and a.name = 'tidb' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-#---------------------------hive-----------------
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`name` = 'hive引擎最大并发数' and a.name = 'IDE' ;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'hive引擎设置' and a.name = 'hive' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'hive.client.memory' and a.name = 'IDE' ;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'hive资源设置' and a.name = 'hive' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'mapred.reduce.tasks' and a.name = 'IDE';
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'hive资源设置' and a.name = 'hive' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'dfs.block.size' and a.name = 'IDE' ;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'hive资源设置' and a.name = 'hive' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'hive.exec.reduce.bytes.per.reducer' and a.name = 'IDE' ;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'hive资源设置' and a.name = 'hive' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'hive.client.java.opts' and a.name = 'IDE';
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'hive资源设置' and a.name = 'hive' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-#------------------------python---------------------
-
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`name` = 'python引擎最大并发数' and a.name = 'IDE'  ;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'python引擎设置' and a.name = 'python' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'python.java.client.memory' and a.name = 'IDE' ;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'python资源设置' and a.name = 'python' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+-- 引擎级别默认配置
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@SPARK_ALL, 'OPTIONAL', 2, now(), now());
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@HIVE_ALL, 'OPTIONAL', 2, now(), now());
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@PYTHON_ALL, 'OPTIONAL', 2, now(), now());
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@PIPELINE_ALL, 'OPTIONAL', 2, now(), now());
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@JDBC_ALL, 'OPTIONAL', 2, now(), now());
 
 
-#------------控制台-jdbc---------
-INSERT INTO `linkis_application` (`id`, `name`, `chinese_name`, `description`) VALUES (NULL, 'jdbc', NULL, NULL);
+-- Configuration二级目录(creator 级别的默认配置)
+-- IDE
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@SPARK_IDE, 'OPTIONAL', 2, now(), now());
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@HIVE_IDE, 'OPTIONAL', 2, now(), now());
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@PYTHON_IDE, 'OPTIONAL', 2, now(), now());
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@PIPELINE_IDE, 'OPTIONAL', 2, now(), now());
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@JDBC_IDE, 'OPTIONAL', 2, now(), now());
 
-select @application_id:=id from `linkis_application` where `name` = 'IDE';
-select @jdbc_id:=id from `linkis_application` where `name` = 'jdbc';
+-- Visualis
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@SPARK_VISUALIS, 'OPTIONAL', 2, now(), now());
+-- nodeexecution
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@SPARK_NODE, 'OPTIONAL', 2, now(), now());
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@HIVE_NODE, 'OPTIONAL', 2, now(), now());
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@PYTHON_NODE, 'OPTIONAL', 2, now(), now());
 
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (NULL, 'jdbc.url', '格式:', 'jdbc连接地址', @application_id, NULL , 'None', NULL , '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (NULL, 'jdbc.username', NULL , 'jdbc连接用户名', @application_id, NULL, 'None', NULL , '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (NULL, 'jdbc.password', NULL , 'jdbc连接密码', @application_id, NULL , 'None', NULL , '0', '0', '1');
 
-INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (NULL, '0', 'jdbc连接设置', NULL, @jdbc_id);
+-- 关联一级二级目录
+SELECT @label_id := id from linkis_manager_label WHERE `label_value` = '*-全局设置,*-*';
+INSERT INTO linkis_configuration_category (`label_id`, `level`) VALUES (@label_id, 1);
 
-select @key_id1:=id from `linkis_config_key` where `application_id` = @application_id and `key` = 'jdbc.url';
-select @key_id2:=id from `linkis_config_key` where `application_id` = @application_id and `key` = 'jdbc.username';
-select @key_id3:=id from `linkis_config_key` where `application_id` = @application_id and `key` = 'jdbc.password';
+SELECT @label_id := id from linkis_manager_label WHERE `label_value` = '*-IDE,*-*';
+INSERT INTO linkis_configuration_category (`label_id`, `level`) VALUES (@label_id, 1);
 
-SELECT @tree_id1:=t.id from linkis_config_tree t LEFT JOIN  linkis_application a on t.application_id = a.id WHERE t.`name` = 'jdbc连接设置' and a.`name` = 'jdbc';
+SELECT @label_id := id from linkis_manager_label WHERE `label_value` = '*-Visualis,*-*';
+INSERT INTO linkis_configuration_category (`label_id`, `level`) VALUES (@label_id, 1);
 
-insert into `linkis_config_key_tree` VALUES(NULL,@key_id1,@tree_id1);
-insert into `linkis_config_key_tree` VALUES(NULL,@key_id2,@tree_id1);
-insert into `linkis_config_key_tree` VALUES(NULL,@key_id3,@tree_id1);
+SELECT @label_id := id from linkis_manager_label WHERE `label_value` = '*-nodeexecution,*-*';
+INSERT INTO linkis_configuration_category (`label_id`, `level`) VALUES (@label_id, 1);
 
-INSERT INTO `linkis_datasource_type`(`icon`, `name`) VALUES('0x001', 'ElasticSearch');
-INSERT INTO `linkis_datasource_type`(`icon`, `name`) VALUES('0x001', 'Hive');
-INSERT INTO `linkis_datasource_type`(`icon`, `name`) VALUES('0x001', 'MySql');
+SELECT @label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_IDE;
+INSERT INTO linkis_configuration_category (`label_id`, `level`) VALUES (@label_id, 2);
 
-#------------------------presto---------------------
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`name` = 'presto引擎最大并发数' and a.name = 'IDE' ;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'presto引擎设置' and a.name = 'presto' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @label_id := id from linkis_manager_label WHERE `label_value` = @HIVE_IDE;
+INSERT INTO linkis_configuration_category (`label_id`, `level`) VALUES (@label_id, 2);
 
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'presto.session.query_max_total_memory' and a.name = 'IDE' ;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'presto资源设置' and a.name = 'presto' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @label_id := id from linkis_manager_label WHERE `label_value` = @PYTHON_IDE;
+INSERT INTO linkis_configuration_category (`label_id`, `level`) VALUES (@label_id, 2);
 
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'presto.session.query_max_run_time' and a.name = 'IDE';
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'presto资源设置' and a.name = 'presto' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @label_id := id from linkis_manager_label WHERE `label_value` = @PIPELINE_IDE;
+INSERT INTO linkis_configuration_category (`label_id`, `level`) VALUES (@label_id, 2);
+
+SELECT @label_id := id from linkis_manager_label WHERE `label_value` = @JDBC_IDE;
+INSERT INTO linkis_configuration_category (`label_id`, `level`) VALUES (@label_id, 2);
+
+SELECT @label_id := id from linkis_manager_label WHERE `label_value` =  @SPARK_VISUALIS;
+INSERT INTO linkis_configuration_category (`label_id`, `level`) VALUES (@label_id, 2);
+
+SELECT @label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_NODE;
+INSERT INTO linkis_configuration_category (`label_id`, `level`) VALUES (@label_id, 2);
+
+SELECT @label_id := id from linkis_manager_label WHERE `label_value` = @HIVE_NODE;
+INSERT INTO linkis_configuration_category (`label_id`, `level`) VALUES (@label_id, 2);
+
+SELECT @label_id := id from linkis_manager_label WHERE `label_value` = @PYTHON_NODE;
+INSERT INTO linkis_configuration_category (`label_id`, `level`) VALUES (@label_id, 2);
+
+
+---- 关联label和默认配置
+-- 全局默认配置(此处的'*-*,*-*'与一级目录'*-全局设置,*-*'相同,真正查询全局设置的label时应当查询*-*,*-*,而不是*-全局设置,*-*)
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator','*-*,*-*', 'OPTIONAL', 2, now(), now());
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.rm.yarnqueue' AND `engine_conn_type` IS NULL;
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = '*-*,*-*';
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+-- spark默认配置
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.rm.yarnqueue.instance.max' AND `engine_conn_type` = 'spark';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.rm.yarnqueue.cores.max' AND `engine_conn_type` = 'spark';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.rm.yarnqueue.memory.max' AND `engine_conn_type` = 'spark';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.rm.client.memory.max' AND `engine_conn_type` = 'spark';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.rm.client.core.max' AND `engine_conn_type` = 'spark';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.rm.instance' AND `engine_conn_type` = 'spark';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'spark.executor.instances' AND `engine_conn_type` = 'spark';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'spark.executor.cores' AND `engine_conn_type` = 'spark';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'spark.executor.memory' AND `engine_conn_type` = 'spark';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'spark.driver.cores' AND `engine_conn_type` = 'spark';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'spark.driver.memory' AND `engine_conn_type` = 'spark';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'spark.python.version' AND `engine_conn_type` = 'spark';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+-- hive默认配置
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.rm.client.memory.max' AND `engine_conn_type` = 'hive';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @HIVE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.rm.client.core.max' AND `engine_conn_type` = 'hive';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @HIVE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.rm.instance' AND `engine_conn_type` = 'hive';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @HIVE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'hive.client.memory' AND `engine_conn_type` = 'hive';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @HIVE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'hive.client.java.opts' AND `engine_conn_type` = 'hive';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @HIVE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'mapred.reduce.tasks' AND `engine_conn_type` = 'hive';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @HIVE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'dfs.block.size' AND `engine_conn_type` = 'hive';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @HIVE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'hive.exec.reduce.bytes.per.reducer' AND `engine_conn_type` = 'hive';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @HIVE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+-- python默认配置
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.rm.client.memory.max' AND `engine_conn_type` = 'python';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @PYTHON_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.rm.client.core.max' AND `engine_conn_type` = 'python';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` =  @PYTHON_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.rm.instance' AND `engine_conn_type` = 'python';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` =  @PYTHON_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'python.java.client.memory' AND `engine_conn_type` = 'python';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` =  @PYTHON_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'python.version' AND `engine_conn_type` = 'python';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` =  @PYTHON_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+-- pipeline默认配置
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'pipeline.output.mold' AND `engine_conn_type` = 'pipeline';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` =  @PIPELINE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'pipeline.field.split' AND `engine_conn_type` = 'pipeline';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` =  @PIPELINE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'pipeline.output.charset' AND `engine_conn_type` = 'pipeline';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @PIPELINE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'pipeline.output.isoverwtite' AND `engine_conn_type` = 'pipeline';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @PIPELINE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'pipeline.engine.memory' AND `engine_conn_type` = 'pipeline';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @PIPELINE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'pipeline.output.shuffle.null.type' AND `engine_conn_type` = 'pipeline';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @PIPELINE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.instance' AND `engine_conn_type` = 'pipeline';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @PIPELINE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+-- jdbc默认配置
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.jdbc.connect.url' AND `engine_conn_type` = 'jdbc';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @JDBC_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.jdbc.version' AND `engine_conn_type` = 'jdbc';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @JDBC_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.jdbc.username' AND `engine_conn_type` = 'jdbc';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @JDBC_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.jdbc.password' AND `engine_conn_type` = 'jdbc';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @JDBC_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.jdbc.connect.max' AND `engine_conn_type` = 'jdbc';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @JDBC_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
+
+
+
+insert  into `linkis_external_resource_provider`(`id`,`resource_type`,`name`,`labels`,`config`) values
+(1,'Yarn','sit',NULL,'{\r\n\"rmWebAddress\": \"@YARN_RESTFUL_URL\",\r\n\"hadoopVersion\": \"2.7.2\",\r\n\"authorEnable\":true,\r\n\"user\":\"hadoop\",\r\n\"pwd\":\"897ede66a860\"\r\n}');
diff --git a/db/module/linkis-bml.sql b/db/module/linkis-bml.sql
index b2355bf..d5f4b3d 100644
--- a/db/module/linkis-bml.sql
+++ b/db/module/linkis-bml.sql
@@ -17,10 +17,10 @@
   PRIMARY KEY (`id`)
 ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4;
 
--- 修改expire_type的默认值为NULL
+--修改expire_type的默认值为NULL
 alter table linkis_resources alter column expire_type set default null;
 
--- 修改expire_time的默认值为NULL
+--修改expire_time的默认值为NULL
 alter table linkis_resources alter column expire_time set default null;
 
 
@@ -40,15 +40,15 @@
   PRIMARY KEY (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 
--- 添加start_byte 和 end_byte 字段
+--添加start_byte 和 end_byte 字段
 ALTER TABLE `linkis_resources_version` ADD COLUMN `start_byte` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0 AFTER `size`;
 
 ALTER TABLE `linkis_resources_version` ADD COLUMN `end_byte` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0 AFTER `start_byte`;
 
--- version字段修改
+--version字段修改
 alter table `linkis_resources_version` modify column `version` varchar(20) not null;
 
--- 给resource_id 和 version 加上联合唯一约束
+--给resource_id 和 version 加上联合唯一约束
 alter table `linkis_resources_version` add unique key `resource_id_version`(`resource_id`, `version`);
 
 
@@ -75,13 +75,13 @@
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 
 
--- 删除resources_version_id 字段
+--删除resources_version_id 字段
 alter table `linkis_resources_download_history` drop column `resources_version_id`;
 
--- 添加resource_id 字段
+--添加resource_id 字段
 alter table `linkis_resources_download_history` add column `resource_id` varchar(50) not null after `state`;
 
--- 添加version字段
+--添加version字段
 alter table `linkis_resources_download_history` add column `version` varchar(20) not null after `resource_id`;
 
 create table dws_bml_resources_contentType (
@@ -93,7 +93,7 @@
   UNIQUE KEY `whitelist_contentType_uindex` (`content_type`) USING BTREE
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 
--- 创建资源任务表,包括上传,更新,下载
+--创建资源任务表,包括上传,更新,下载
 CREATE TABLE `linkis_resources_task` (
   `id` bigint(20) NOT NULL AUTO_INCREMENT,
   `resource_id` varchar(50) DEFAULT NULL COMMENT '资源id,资源的uuid',
diff --git a/db/module/linkis-datasource.sql b/db/module/linkis-datasource.sql
deleted file mode 100644
index 40a7de9..0000000
--- a/db/module/linkis-datasource.sql
+++ /dev/null
@@ -1,67 +0,0 @@
-CREATE TABLE IF NOT EXISTS `linkis_datasource` (
-   `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
-   `datasource_name` VARCHAR(100) NOT NULL COMMENT 'Data source name',
-   `datasource_type_id` BIGINT(20) DEFAULT NULL COMMENT 'Data source type id',
-   `datasource_desc` VARCHAR(200) DEFAULT NULL COMMENT 'Data source description',
-   `create_identify` VARCHAR(20) DEFAULT 'BDP' COMMENT 'Example: project name',
-	`create_system` VARCHAR(20) DEFAULT 'BDP' COMMENT 'Create system',
-	`create_user` VARCHAR(50) DEFAULT NULL COMMENT 'Creator',
-	`parameter` TEXT COMMENT 'Connect parameters',
-	`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-	`modify_user` VARCHAR(50) DEFAULT NULL COMMENT 'Modify user',
-	`modify_time` DATETIME DEFAULT NULL COMMENT 'Modify time',
-	`datasource_env_id` BIGINT(20) DEFAULT NULL,
-	PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=140 DEFAULT CHARSET=utf8;
-
-
-CREATE TABLE IF NOT EXISTS `linkis_datasource_env` (
-	`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
-	`env_name` VARCHAR(100) NOT NULL COMMENT 'Environment name',
-    `env_desc` VARCHAR(200) DEFAULT NULL COMMENT 'Description',
-	`create_user` VARCHAR(50) DEFAULT NULL COMMENT 'Creator',
-	`parameter` TEXT NOT NULL COMMENT 'Connect parameters',
-	`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-	`modify_user` VARCHAR(50) DEFAULT NULL COMMENT 'Modify user',
-	`modify_time` DATETIME DEFAULT NULL COMMENT 'Modify time',
-	PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=108 DEFAULT CHARSET=utf8;
-
-
-CREATE TABLE IF NOT EXISTS `linkis_datasource_type_key` (
-	`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
-	`key` VARCHAR(50) DEFAULT NULL COMMENT 'Key of variable',
-	`description` VARCHAR(200) DEFAULT NULL COMMENT 'Description',
-	`name` VARCHAR(50) DEFAULT NULL COMMENT 'Option name of column in page',
-	`data_source_type_id` BIGINT(20) DEFAULT NULL COMMENT 'Type id',
-	`require` TINYINT(1) DEFAULT '0',
-	`scope` VARCHAR(50) DEFAULT NULL COMMENT 'Scope',
-	`default_value` VARCHAR(200) DEFAULT NULL COMMENT 'Default value',
-	`value_type` VARCHAR(50) DEFAULT NULL COMMENT 'Value type',
-	`value_regex` VARCHAR(100) DEFAULT NULL COMMENT 'Value regex',
-	`ref_id` BIGINT(20) DEFAULT NULL COMMENT 'Related id',
-	`ref_value` VARCHAR(100) DEFAULT NULL COMMENT 'Related value',
-	PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-
-
-CREATE TABLE IF NOT EXISTS `linkis_datasource_type` (
-	`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
-	`icon` VARCHAR(50) DEFAULT NULL COMMENT 'Icon',
-	`description` VARCHAR(200) DEFAULT NULL COMMENT 'Description',
-	`name` VARCHAR(50) DEFAULT NULL COMMENT 'Name',
-	PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-
-
-CREATE TABLE IF NOT EXISTS `linkis_datasource_type_env` (
-	`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
-	`data_source_type_id` BIGINT(20) DEFAULT NULL COMMENT 'Type id',
-	`env_id` BIGINT(20) DEFAULT NULL COMMENT 'Environment id',
-	PRIMARY KEY (`id`)
-)ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-
-
-INSERT INTO `linkis_datasource_type`(`icon`, `name`) VALUES('0x001', 'ElasticSearch');
-INSERT INTO `linkis_datasource_type`(`icon`, `name`) VALUES('0x001', 'Hive');
-INSERT INTO `linkis_datasource_type`(`icon`, `name`) VALUES('0x001', 'MySql');
\ No newline at end of file
diff --git a/db/module/linkis_application.sql b/db/module/linkis_application.sql
deleted file mode 100644
index 2f739cc..0000000
--- a/db/module/linkis_application.sql
+++ /dev/null
@@ -1,85 +0,0 @@
-SET FOREIGN_KEY_CHECKS=0;
-
--- ----------------------------
--- Table structure for linkis_develop_application
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_develop_application`;
-CREATE TABLE `linkis_develop_application` (
-  `id` bigint(20) NOT NULL AUTO_INCREMENT,
-  `name` varchar(200) DEFAULT NULL,
-  `source` varchar(50) DEFAULT NULL COMMENT 'Source of the development application',
-  `version` varchar(50) DEFAULT NULL,
-  `description` text,
-  `user_id` bigint(20) DEFAULT NULL,
-  `is_published` bit(1) DEFAULT NULL,
-  `create_time` datetime DEFAULT NULL,
-  `update_time` datetime DEFAULT NULL,
-  `org_id` bigint(20) DEFAULT NULL COMMENT 'Organization ID',
-  `visibility` bit(1) DEFAULT NULL,
-  `is_transfer` bit(1) DEFAULT NULL COMMENT 'Reserved word',
-  `initial_org_id` bigint(20) DEFAULT NULL,
-  `json_path` varchar(255) DEFAULT NULL COMMENT 'Path of the jason file which is used for data development in the front-end.',
-  `isAsh` bit(1) DEFAULT NULL COMMENT 'If it is active',
-  `pic` varchar(255) DEFAULT NULL,
-  `star_num` int(11) DEFAULT '0',
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
-
-
--- ----------------------------
--- Table structure for linkis_project_list
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_project_list`;
-CREATE TABLE `linkis_project_list` (
-  `id` bigint(20) NOT NULL AUTO_INCREMENT,
-  `name` varchar(200) DEFAULT NULL COMMENT 'Project service name which needs to be initialized',
-  `is_project_need_init` bit(1) DEFAULT NULL,
-  `url` varchar(255) DEFAULT NULL COMMENT 'URL used to initialize a project',
-  `is_user_need_init` bit(1) DEFAULT NULL,
-  `is_project_inited` bit(1) DEFAULT NULL,
-  `json` text COMMENT 'Data provided by project to the front-end would be jsonized after initialization.',
-  `level` tinyint(255) DEFAULT NULL COMMENT 'Marks the importance of the project. When encounter initialization failure, if a user tried to log in, the project would report an error if its level is greater than 4, otherwise, grey the corresponding function button',
-  `user_init_url` varchar(255) DEFAULT NULL COMMENT 'URL used to initialize a user',
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
-
-
--- ----------------------------
--- Table structure for linkis_project_user
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_project_user`;
-CREATE TABLE `linkis_project_user` (
-  `id` bigint(20) NOT NULL AUTO_INCREMENT,
-  `project_id` bigint(20) DEFAULT NULL,
-  `json` varchar(255) DEFAULT NULL COMMENT 'Data returned by initializing a user would be jsonized',
-  `user_id` bigint(20) DEFAULT NULL,
-  `is_init_success` bit(1) DEFAULT NULL,
-  `is_new_feature` bit(1) DEFAULT NULL COMMENT 'If this project is a new function to the user',
-  PRIMARY KEY (`id`),
-  UNIQUE KEY `project_id` (`project_id`,`user_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-
--- ----------------------------
--- Table structure for linkis_user
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_user`;
-CREATE TABLE `linkis_user` (
-  `id` bigint(20) NOT NULL AUTO_INCREMENT,
-  `email` varchar(255) DEFAULT NULL,
-  `username` varchar(255) NOT NULL,
-  `password` varchar(255) DEFAULT NULL,
-  `admin` tinyint(1) DEFAULT NULL COMMENT 'If it is an administrator',
-  `active` tinyint(1) DEFAULT NULL COMMENT 'If it is active',
-  `name` varchar(255) DEFAULT NULL COMMENT 'User name',
-  `description` varchar(255) DEFAULT NULL,
-  `department` varchar(255) DEFAULT NULL,
-  `avatar` varchar(255) DEFAULT NULL COMMENT 'Path of the avator',
-  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-  `create_by` bigint(20) DEFAULT '0',
-  `update_time` timestamp NOT NULL DEFAULT '1970-01-01 08:00:01',
-  `update_by` bigint(20) DEFAULT '0',
-  `is_first_login` bit(1) DEFAULT NULL COMMENT 'If it is the first time to log in',
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
diff --git a/db/module/linkis_configuration.sql b/db/module/linkis_configuration.sql
index 1f43322..021a39c 100644
--- a/db/module/linkis_configuration.sql
+++ b/db/module/linkis_configuration.sql
@@ -1,82 +1,42 @@
-SET FOREIGN_KEY_CHECKS=0;
-
-
--- ----------------------------
--- Table structure for linkis_application
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_application`;
-CREATE TABLE `linkis_application` (
-  `id` bigint(20) NOT NULL AUTO_INCREMENT,
-  `name` varchar(50) DEFAULT NULL COMMENT 'Can be one of the following: execute_application_name(in table linkis_task), request_application_name(i.e. creator), general configuration',
-  `chinese_name` varchar(50) DEFAULT NULL,
-  `description` varchar(200) DEFAULT NULL,
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4;
-
-
--- ----------------------------
--- Table structure for linkis_config_key_tree
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_config_key_tree`;
-CREATE TABLE `linkis_config_key_tree` (
-  `id` bigint(20) NOT NULL AUTO_INCREMENT,
-  `key_id` bigint(20) DEFAULT NULL,
-  `tree_id` bigint(20) DEFAULT NULL,
-  PRIMARY KEY (`id`),
-  KEY `key_id` (`key_id`),
-  KEY `tree_id` (`tree_id`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4;
-
-
--- ----------------------------
--- Table structure for linkis_config_key_user
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_config_key_user`;
-CREATE TABLE `linkis_config_key_user` (
-  `id` bigint(20) NOT NULL AUTO_INCREMENT,
-  `application_id` bigint(20) DEFAULT NULL COMMENT 'Same as id in tale linkis_application, except that it cannot be the id of creator',
-  `key_id` bigint(20) DEFAULT NULL,
-  `user_name` varchar(50) DEFAULT NULL,
-  `value` varchar(200) DEFAULT NULL COMMENT 'Value of the key',
-  PRIMARY KEY (`id`),
-  UNIQUE KEY `application_id_2` (`application_id`,`key_id`,`user_name`),
-  KEY `key_id` (`key_id`),
-  KEY `application_id` (`application_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-
-
--- ----------------------------
--- Table structure for linkis_config_key
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_config_key`;
-CREATE TABLE `linkis_config_key` (
+DROP TABLE IF EXISTS `linkis_configuration_config_key`;
+CREATE TABLE `linkis_configuration_config_key`(
   `id` bigint(20) NOT NULL AUTO_INCREMENT,
   `key` varchar(50) DEFAULT NULL COMMENT 'Set key, e.g. spark.executor.instances',
   `description` varchar(200) DEFAULT NULL,
   `name` varchar(50) DEFAULT NULL,
-  `application_id` bigint(20) DEFAULT NULL COMMENT 'Correlate with id in table linkis_application',
+  `engine_conn_type` varchar(50) DEFAULT NULL COMMENT 'engine type,such as spark,hive etc',
   `default_value` varchar(200) DEFAULT NULL COMMENT 'Adopted when user does not set key',
   `validate_type` varchar(50) DEFAULT NULL COMMENT 'Validate type, one of the following: None, NumInterval, FloatInterval, Include, Regex, OPF, Custom Rules',
-  `validate_range` varchar(100) DEFAULT NULL COMMENT 'Validate range',
+  `validate_range` varchar(50) DEFAULT NULL COMMENT 'Validate range',
   `is_hidden` tinyint(1) DEFAULT NULL COMMENT 'Whether it is hidden from user. If set to 1(true), then user cannot modify, however, it could still be used in back-end',
   `is_advanced` tinyint(1) DEFAULT NULL COMMENT 'Whether it is an advanced parameter. If set to 1(true), parameters would be displayed only when user choose to do so',
   `level` tinyint(1) DEFAULT NULL COMMENT 'Basis for displaying sorting in the front-end. Higher the level is, higher the rank the parameter gets',
-  `unit` varchar(64) DEFAULT NULL,
-  PRIMARY KEY (`id`),
-  KEY `application_id` (`application_id`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4;
+  `treeName` varchar(20) DEFAULT NULL COMMENT 'Reserved field, representing the subdirectory of engineType',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
 
 
--- ----------------------------
--- Table structure for linkis_config_tree
--- ----------------------------
-DROP TABLE IF EXISTS `linkis_config_tree`;
-CREATE TABLE `linkis_config_tree` (
+DROP TABLE IF EXISTS `linkis_configuration_config_value`;
+CREATE TABLE linkis_configuration_config_value(
   `id` bigint(20) NOT NULL AUTO_INCREMENT,
-  `parent_id` bigint(20) DEFAULT NULL COMMENT 'Parent ID',
-  `name` varchar(50) DEFAULT NULL COMMENT 'Application name or category name under general configuration',
-  `description` varchar(200) DEFAULT NULL,
-  `application_id` bigint(20) DEFAULT NULL COMMENT 'Same as id(in table linkis_application), except that it cannot be the id of creator',
+  `configkey_id` bigint(20),
+  `config_value` varchar(50),
+  `config_label_id`int(20),
   PRIMARY KEY (`id`),
-  KEY `application_id` (`application_id`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4;
+  UNIQUE INDEX(`configkey_id`, `config_label_id`)
+)ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+DROP TABLE IF EXISTS `linkis_configuration_category`;
+CREATE TABLE `linkis_configuration_category` (
+  `id` int(20) NOT NULL AUTO_INCREMENT,
+  `label_id` int(20) NOT NULL,
+  `level` int(20) NOT NULL,
+  `description` varchar(200),
+  `tag` varchar(200),
+  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`id`),
+  UNIQUE INDEX(`label_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+
diff --git a/db/module/linkis_configuration_dml.sql b/db/module/linkis_configuration_dml.sql
index 4e845ac..ca31ec7 100644
--- a/db/module/linkis_configuration_dml.sql
+++ b/db/module/linkis_configuration_dml.sql
@@ -1,246 +1,313 @@
-INSERT INTO `linkis_application` (`id`, `name`, `chinese_name`, `description`) VALUES (0, '通用设置', NULL, NULL);
-INSERT INTO `linkis_application` (`id`, `name`, `chinese_name`, `description`) VALUES (0, 'spark', NULL, NULL);
-INSERT INTO `linkis_application` (`id`, `name`, `chinese_name`, `description`) VALUES (0, 'IDE', NULL, NULL);
-INSERT INTO `linkis_application` (`id`, `name`, `chinese_name`, `description`) VALUES (0, 'hive', NULL, NULL);
-INSERT INTO `linkis_application` (`id`, `name`, `chinese_name`, `description`) VALUES (0, 'storage', NULL, NULL);
-INSERT INTO `linkis_application` (`id`, `name`, `chinese_name`, `description`) VALUES (0, 'python', NULL, NULL);
-INSERT INTO `linkis_application` (`id`, `name`, `chinese_name`, `description`) VALUES (0, 'tidb', NULL, NULL);
-INSERT INTO `linkis_application` (`id`, `name`, `chinese_name`, `description`) VALUES (0, 'pipeline', NULL, NULL);
 
-SELECT @application_id := id from linkis_application where name = '通用设置';
-INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', '队列资源', NULL, @application_id);
-#INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', '预热机制', NULL, @application_id);
-#INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', '清理机制', NULL, @application_id);
-#INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', '引擎设置', NULL, @application_id);
-INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', '驱动器资源', NULL, @application_id);
 
-SELECT @application_id := id from linkis_application where name = 'spark';
-INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', 'spark资源设置', NULL, @application_id);
-#INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', 'spark引擎设置', NULL, @application_id);
+--变量:
+SET @SPARK_LABEL="spark-2.4.3";
+SET @HIVE_LABEL="hive-1.2.1";
+SET @PYTHON_LABEL="python-2";
+SET @PIPELINE_LABEL="pipeline-*";
+SET @JDBC_LABEL="jdbc-4";
 
-SELECT @application_id := id from linkis_application where name = 'hive';
-#INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', 'hive引擎设置', NULL, @application_id);
-INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', 'hive资源设置', NULL, @application_id);
+--衍生变量:
+SET @SPARK_ALL=CONCAT('*-*,',@SPARK_LABEL);
+SET @SPARK_IDE=CONCAT('*-IDE,',@SPARK_LABEL);
+SET @SPARK_NODE=CONCAT('*-nodeexecution,',@SPARK_LABEL);
+SET @SPARK_VISUALIS=CONCAT('*-Visualis,',@SPARK_LABEL);
 
-SELECT @application_id := id from linkis_application where name = 'python';
-#INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', 'python引擎设置', NULL, @application_id);
-INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', 'python资源设置', NULL, @application_id);
+SET @HIVE_ALL=CONCAT('*-*,',@HIVE_LABEL);
+SET @HIVE_IDE=CONCAT('*-IDE,',@HIVE_LABEL);
+SET @HIVE_NODE=CONCAT('*-nodeexecution,',@HIVE_LABEL);
 
-SELECT @application_id := id from linkis_application where name = 'tidb';
-INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', 'tidb设置', NULL, @application_id);
-#INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', 'spark引擎设置', NULL, @application_id);
-INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', 'spark资源设置', NULL, @application_id);
+SET @PYTHON_ALL=CONCAT('*-*,',@PYTHON_LABEL);
+SET @PYTHON_IDE=CONCAT('*-IDE,',@PYTHON_LABEL);
+SET @PYTHON_NODE=CONCAT('*-nodeexecution,',@PYTHON_LABEL);
 
-SELECT @application_id := id from linkis_application where name = 'pipeline';
-INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', '导入导出设置', NULL, @application_id);
-INSERT INTO `linkis_config_tree` (`id`, `parent_id`, `name`, `description`, `application_id`) VALUES (0, '0', '导入导出资源设置', NULL, @application_id);
+SET @PIPELINE_ALL=CONCAT('*-*,',@PIPELINE_LABEL);
+SET @PIPELINE_IDE=CONCAT('*-IDE,',@PIPELINE_LABEL);
+
+SET @JDBC_ALL=CONCAT('*-*,',@JDBC_LABEL);
+SET @JDBC_IDE=CONCAT('*-IDE,',@JDBC_LABEL);
 
 
 
-SELECT @application_id := id from linkis_application where name = '通用设置';
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'wds.linkis.yarnqueue', 'yarn队列名', 'yarn队列名', @application_id, 'ide', 'None', NULL, '0', '0', '1');
-#INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'wds.linkis.preheating.time', '预热时间', '预热时间', @application_id, '9:00', 'None', NULL, '0', '0', '1');
-#INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'wds.linkis.tmpfile.clean.time', 'tmp文件清理时间', 'tmp文件清理时间', @application_id, '10:00', 'None', NULL, '0', '0', '1');
-
-#INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'wds.linkis.yarnqueue.cores.max', '取值范围:1-500,单位:个', '队列CPU使用上限', @application_id, '150', 'Regex', '^(?:[1-9]\\d?|[1234]\\d{2}|500)$', '0', '0', '1');
-#INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `unit`) VALUES (0, 'wds.linkis.yarnqueue.memory.max', '取值范围:1-1000,单位:G', '队列内存使用上限', @application_id, '300G', 'Regex', '^([1-9]\\d{0,2}|1000)(G|g)$', '0', '0', '1','G');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `unit`) VALUES (0, 'wds.linkis.client.memory.max', '取值范围:1-100,单位:G', '驱动器内存使用上限', @application_id, '20G', 'Regex', '^([1-9]\\d{0,1}|100)(G|g)$', '0', '0', '1', 'G');
-#INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'wds.linkis.instance', '范围:1-20,单位:个', '引擎最大并发数', @application_id, '10', 'NumInterval', '[1,20]', '0', '0', '1');
+---- Configuration的默认Key
+-- 全局设置
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`) VALUES ('wds.linkis.rm.yarnqueue', 'yarn队列名', 'yarn队列名', 'default', 'None', NULL, '0', '0', '1', '队列资源');
+-- spark
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.rm.yarnqueue.instance.max', '取值范围:1-128,单位:个', 'yarn队列实例最大个数', '30', 'Regex', '^(?:[1-9]\\d?|[1234]\\d{2}|128)$', '0', '0', '1', '队列资源', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.rm.yarnqueue.cores.max', '取值范围:1-500,单位:个', '队列CPU使用上限', '150', 'Regex', '^(?:[1-9]\\d?|[1234]\\d{2}|500)$', '0', '0', '1', '队列资源', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.rm.yarnqueue.memory.max', '取值范围:1-1000,单位:G', '队列内存使用上限', '300G', 'Regex', '^([1-9]\\d{0,2}|1000)(G|g)$', '0', '0', '1', '队列资源', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.rm.client.memory.max', '取值范围:1-100,单位:G', '驱动器内存使用上限', '20G', 'Regex', '^([1-9]\\d{0,1}|100)(G|g)$', '0', '0', '1', '队列资源', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.rm.client.core.max', '取值范围:1-128,单位:个', '驱动器核心个数上限', '10', 'Regex', '^(?:[1-9]\\d?|[1234]\\d{2}|128)$', '0', '0', '1', '队列资源', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.rm.instance', '范围:1-20,单位:个', '引擎最大并发数', '10', 'NumInterval', '[1,20]', '0', '0', '1', '队列资源', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('spark.executor.instances', '取值范围:1-40,单位:个', '执行器实例最大并发数', '2', 'NumInterval', '[1,40]', '0', '0', '2', 'spark资源设置', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('spark.executor.cores', '取值范围:1-8,单位:个', '执行器核心个数',  '2', 'NumInterval', '[1,2]', '1', '0', '1','spark资源设置', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('spark.executor.memory', '取值范围:3-15,单位:G', '执行器内存大小', '3', 'NumInterval', '[3,15]', '0', '0', '3', 'spark资源设置', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('spark.driver.cores', '取值范围:只能取1,单位:个', '驱动器核心个数', '1', 'NumInterval', '[1,1]', '1', '1', '1', 'spark资源设置','spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('spark.driver.memory', '取值范围:1-15,单位:G', '驱动器内存大小','2', 'NumInterval', '[1,15]', '0', '0', '1', 'spark资源设置', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('spark.tispark.pd.addresses', NULL, NULL, 'pd0:2379', 'None', NULL, '0', '0', '1', 'tidb设置', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('spark.tispark.tidb.addr', NULL, NULL, 'tidb', 'None', NULL, '0', '0', '1', 'tidb设置', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('spark.tispark.tidb.password', NULL, NULL, NULL, 'None', NULL, '0', '0', '1', 'tidb设置', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('spark.tispark.tidb.port', NULL, NULL, '4000', 'None', NULL, '0', '0', '1', 'tidb设置', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('spark.tispark.tidb.user', NULL, NULL, 'root', 'None', NULL, '0', '0', '1', 'tidb设置', 'spark');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('spark.python.version', '取值范围:python2,python3', 'python版本','python2', 'OFT', '[\"python3\",\"python2\"]', '0', '0', '1', 'spark引擎设置', 'spark');
+-- hive
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.rm.client.memory.max', '取值范围:1-100,单位:G', '驱动器内存使用上限', '20G', 'Regex', '^([1-9]\\d{0,1}|100)(G|g)$', '0', '0', '1', '队列资源', 'hive');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.rm.client.core.max', '取值范围:1-128,单位:个', '驱动器核心个数上限', '10', 'Regex', '^(?:[1-9]\\d?|[1234]\\d{2}|128)$', '0', '0', '1', '队列资源', 'hive');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.rm.instance', '范围:1-20,单位:个', '引擎最大并发数', '10', 'NumInterval', '[1,20]', '0', '0', '1', '队列资源', 'hive');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('hive.client.memory', '取值范围:1-10,单位:G', 'hive引擎初始化内存大小','2', 'NumInterval', '[1,10]', '0', '0', '1', 'hive引擎设置', 'hive');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('hive.client.java.opts', 'hive客户端进程参数', 'hive引擎启动时jvm参数','', 'None', NULL, '1', '1', '1', 'hive引擎设置', 'hive');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('mapred.reduce.tasks', '范围:1-20,单位:个', 'reduce数', '10', 'NumInterval', '[1,20]', '0', '1', '1', 'hive资源设置', 'hive');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('dfs.block.size', '取值范围:2-10,单位:G', 'map数据块大小', '10', 'NumInterval', '[2,10]', '0', '1', '1', 'hive资源设置', 'hive');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('hive.exec.reduce.bytes.per.reducer', '取值范围:2-10,单位:G', 'reduce处理的数据量', '10', 'NumInterval', '[2,10]', '0', '1', '1', 'hive资源设置', 'hive');
+--python
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.rm.client.memory.max', '取值范围:1-100,单位:G', '驱动器内存使用上限', '20G', 'Regex', '^([1-9]\\d{0,1}|100)(G|g)$', '0', '0', '1', '队列资源', 'python');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.rm.client.core.max', '取值范围:1-128,单位:个', '驱动器核心个数上限', '10', 'Regex', '^(?:[1-9]\\d?|[1234]\\d{2}|128)$', '0', '0', '1', '队列资源', 'python');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.rm.instance', '范围:1-20,单位:个', '引擎最大并发数', '10', 'NumInterval', '[1,20]', '0', '0', '1', '队列资源', 'python');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('python.java.client.memory', '取值范围:1-2,单位:G', 'python引擎初始化内存大小', '1', 'NumInterval', '[1,2]', '0', '0', '1', 'python引擎设置', 'python');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('python.version', '取值范围:python2,python3', 'python版本','python2', 'OFT', '[\"python3\",\"python2\"]', '0', '0', '1', 'python引擎设置', 'python');
+--pipeline
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('pipeline.output.mold', '取值范围:csv或excel', '结果集导出类型','csv', 'OFT', '[\"csv\",\"excel\"]', '0', '0', '1', 'pipeline引擎设置', 'pipeline');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('pipeline.field.split', '取值范围:,或\\t', 'csv分隔符',',', 'OFT', '[\",\",\"\\\\t\"]', '0', '0', '1', 'pipeline引擎设置', 'pipeline');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('pipeline.output.charset', '取值范围:utf-8或gbk', '结果集导出字符集','gbk', 'OFT', '[\"utf-8\",\"gbk\"]', '0', '0', '1', 'pipeline引擎设置', 'pipeline');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('pipeline.output.isoverwtite', '取值范围:true或false', '是否覆写','true', 'OFT', '[\"true\",\"false\"]', '0', '0', '1', 'pipeline引擎设置', 'pipeline');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.instance', '范围:1-3,单位:个', 'pipeline引擎最大并发数','3', 'NumInterval', '[1,3]', '0', '0', '1', 'pipeline引擎设置', 'pipeline');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('pipeline.engine.memory', '取值范围:1-10,单位:G', 'pipeline引擎初始化内存大小','2', 'NumInterval', '[1,10]', '0', '0', '1', 'pipeline资源设置', 'pipeline');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('pipeline.output.shuffle.null.type', '取值范围:NULL或者BLANK', '空值替换','NULL', 'OFT', '[\"NULL\",\"BLANK\"]', '0', '0', '1', 'pipeline引擎设置', 'pipeline');
+--jdbc
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.jdbc.connect.url', '例如:jdbc:hive2://127.0.0.1:10000', 'jdbc连接地址', 'jdbc:hive2://127.0.0.1:10000', 'Regex', '^\s*jdbc:\w+://([^:]+)(:\d+)(/[^\?]+)?(\?\S*)?$', '0', '0', '1', '数据源配置', 'jdbc');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.jdbc.version', '取值范围:jdbc3,jdbc4', 'jdbc版本','jdbc4', 'OFT', '[\"jdbc3\",\"jdbc4\"]', '0', '0', '1', '数据源配置', 'jdbc');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.jdbc.username', 'username', '数据库连接用户名', '', '', '', '0', '0', '1', '用户配置', 'jdbc');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.jdbc.password', 'password', '数据库连接密码', '', '', '', '0', '0', '1', '用户配置', 'jdbc');
+INSERT INTO `linkis_configuration_config_key` (`key`, `description`, `name`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`, `treeName`, `engine_conn_type`) VALUES ('wds.linkis.jdbc.connect.max', '范围:1-20,单位:个', 'jdbc引擎最大连接数', '10', 'NumInterval', '[1,20]', '0', '0', '1', '数据源配置', 'jdbc');
+---- Configuration一级目录
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator','*-全局设置,*-*', 'OPTIONAL', 2, now(), now());
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator','*-IDE,*-*', 'OPTIONAL', 2, now(), now());
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator','*-Visualis,*-*', 'OPTIONAL', 2, now(), now());
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator','*-nodeexecution,*-*', 'OPTIONAL', 2, now(), now());
 
 
-SELECT @application_id := id from linkis_application where name = 'IDE';
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.executor.instances', '取值范围:1-40,单位:个', '执行器实例最大并发数', @application_id, '2', 'NumInterval', '[1,40]', '0', '0', '2');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.executor.cores', '取值范围:1-8,单位:个', '执行器核心个数', @application_id, '2', 'NumInterval', '[1,2]', '1', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.executor.memory', '取值范围:3-15,单位:G', '执行器内存大小', @application_id, '3', 'NumInterval', '[3,15]', '0', '0', '3');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.driver.cores', '取值范围:只能取1,单位:个', '驱动器核心个数', @application_id, '1', 'NumInterval', '[1,1]', '1', '1', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.driver.memory', '取值范围:1-15,单位:G', '驱动器内存大小', @application_id, '2', 'NumInterval', '[1,15]', '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'hive.client.memory', '取值范围:1-10,单位:G', 'hive引擎初始化内存大小', @application_id, '2', 'NumInterval', '[1,10]', '0', '0', '1');
-#INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'hive.client.java.opts', 'hive客户端进程参数', 'hive引擎启动时jvm参数', @application_id, '', 'None', NULL, '1', '1', '1');
-
-#INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'wds.linkis.instance', '范围:1-3,单位:个', 'hive引擎最大并发数', @application_id, '3', 'NumInterval', '[1,3]', '0', '0', '1');
-#INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'wds.linkis.instance', '范围:1-3,单位:个', 'spark引擎最大并发数', @application_id, '3', 'NumInterval', '[1,3]', '0', '0', '1');
-#INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'wds.linkis.instance', '范围:1-3,单位:个', 'python引擎最大并发数', @application_id, '3', 'NumInterval', '[1,3]', '0', '0', '1');
-#INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'mapred.reduce.tasks', '范围:1-20,单位:个', 'reduce数', @application_id, '10', 'NumInterval', '[1,20]', '0', '1', '1');
-#INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'dfs.block.size', '取值范围:2-10,单位:G', 'map数据块大小', @application_id, '10', 'NumInterval', '[2,10]', '0', '1', '1');
-#INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'hive.exec.reduce.bytes.per.reducer', '取值范围:2-10,单位:G', 'reduce处理的数据量', @application_id, '10', 'NumInterval', '[2,10]', '0', '1', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'python.java.client.memory', '取值范围:1-2,单位:G', 'python引擎初始化内存大小', @application_id, '1', 'NumInterval', '[1,2]', '0', '0', '1');
+---- 引擎级别默认配置
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@SPARK_ALL, 'OPTIONAL', 2, now(), now());
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@HIVE_ALL, 'OPTIONAL', 2, now(), now());
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@PYTHON_ALL, 'OPTIONAL', 2, now(), now());
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@PIPELINE_ALL, 'OPTIONAL', 2, now(), now());
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@JDBC_ALL, 'OPTIONAL', 2, now(), now());
 
 
-#INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'wds.linkis.instance', '范围:1-3,单位:个', 'spark引擎最大并发数', @application_id, '1', 'NumInterval', '[1,3]', '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.executor.instances', '取值范围:1-40,单位:个', '执行器实例最大并发数', @application_id, '2', 'NumInterval', '[1,40]', '0', '0', '2');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.executor.cores', '取值范围:1-8,单位:个', '执行器核心个数', @application_id, '2', 'NumInterval', '[1,2]', '1', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.executor.memory', '取值范围:3-15,单位:G', '执行器内存大小', @application_id, '3', 'NumInterval', '[3,15]', '0', '0', '3');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.driver.cores', '取值范围:只能取1,单位:个', '驱动器核心个数 ', @application_id, '1', 'NumInterval', '[1,1]', '1', '1', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.driver.memory', '取值范围:1-15,单位:G', '驱动器内存大小', @application_id, '2', 'NumInterval', '[1,15]', '0', '0', '1');
+---- Configuration二级目录(creator 级别的默认配置)
+-- IDE
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@SPARK_IDE, 'OPTIONAL', 2, now(), now());
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@HIVE_IDE, 'OPTIONAL', 2, now(), now());
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@PYTHON_IDE, 'OPTIONAL', 2, now(), now());
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@PIPELINE_IDE, 'OPTIONAL', 2, now(), now());
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@JDBC_IDE, 'OPTIONAL', 2, now(), now());
 
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'pipeline.output.mold', '取值范围:csv或excel', '结果集导出类型', @application_id, 'csv', 'OFT', '[csv,excel]', '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'pipeline.field.split', '取值范围:,或\\t', 'csv分隔符', @application_id, ',', 'OFT', '[\",\",\"\\\\t\"]', '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'pipeline.output.charset', '取值范围:utf-8或gbk', '结果集导出字符集', @application_id, 'gbk', 'OFT', '[utf-8,gbk]', '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'pipeline.output.isoverwtite', '取值范围:true或false', '是否覆写', @application_id, 'true', 'OFT', '[true,false]', '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'pipeline.engine.memory', '取值范围:1-10,单位:G', 'pipeline引擎初始化内存大小', @application_id, '2', 'NumInterval', '[1,10]', '0', '0', '1');
+-- Visualis
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@SPARK_VISUALIS, 'OPTIONAL', 2, now(), now());
+-- nodeexecution
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@SPARK_NODE, 'OPTIONAL', 2, now(), now());
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@HIVE_NODE, 'OPTIONAL', 2, now(), now());
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator',@PYTHON_NODE, 'OPTIONAL', 2, now(), now());
 
 
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.tispark.pd.addresses', NULL, NULL, @application_id, 'pd0:2379', 'None', NULL, '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.tispark.tidb.addr', NULL, NULL, @application_id, 'tidb', 'None', NULL, '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.tispark.tidb.password', NULL, NULL, @application_id, NULL, 'None', NULL, '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.tispark.tidb.port', NULL, NULL, @application_id, '4000', 'None', NULL, '0', '0', '1');
-INSERT INTO `linkis_config_key` (`id`, `key`, `description`, `name`, `application_id`, `default_value`, `validate_type`, `validate_range`, `is_hidden`, `is_advanced`, `level`) VALUES (0, 'spark.tispark.tidb.user', NULL, NULL, @application_id, 'root', 'None', NULL, '0', '0', '1');
+-- 关联一级二级目录
+SELECT @label_id := id from linkis_manager_label WHERE `label_value` = '*-全局设置,*-*';
+INSERT INTO linkis_configuration_category (`label_id`, `level`) VALUES (@label_id, 1);
+
+SELECT @label_id := id from linkis_manager_label WHERE `label_value` = '*-IDE,*-*';
+INSERT INTO linkis_configuration_category (`label_id`, `level`) VALUES (@label_id, 1);
+
+SELECT @label_id := id from linkis_manager_label WHERE `label_value` = '*-Visualis,*-*';
+INSERT INTO linkis_configuration_category (`label_id`, `level`) VALUES (@label_id, 1);
+
+SELECT @label_id := id from linkis_manager_label WHERE `label_value` = '*-nodeexecution,*-*';
+INSERT INTO linkis_configuration_category (`label_id`, `level`) VALUES (@label_id, 1);
+
+SELECT @label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_IDE;
+INSERT INTO linkis_configuration_category (`label_id`, `level`) VALUES (@label_id, 2);
+
+SELECT @label_id := id from linkis_manager_label WHERE `label_value` = @HIVE_IDE;
+INSERT INTO linkis_configuration_category (`label_id`, `level`) VALUES (@label_id, 2);
+
+SELECT @label_id := id from linkis_manager_label WHERE `label_value` = @PYTHON_IDE;
+INSERT INTO linkis_configuration_category (`label_id`, `level`) VALUES (@label_id, 2);
+
+SELECT @label_id := id from linkis_manager_label WHERE `label_value` = @PIPELINE_IDE;
+INSERT INTO linkis_configuration_category (`label_id`, `level`) VALUES (@label_id, 2);
+
+SELECT @label_id := id from linkis_manager_label WHERE `label_value` = @JDBC_IDE;
+INSERT INTO linkis_configuration_category (`label_id`, `level`) VALUES (@label_id, 2);
+
+SELECT @label_id := id from linkis_manager_label WHERE `label_value` =  @SPARK_VISUALIS;
+INSERT INTO linkis_configuration_category (`label_id`, `level`) VALUES (@label_id, 2);
+
+SELECT @label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_NODE;
+INSERT INTO linkis_configuration_category (`label_id`, `level`) VALUES (@label_id, 2);
+
+SELECT @label_id := id from linkis_manager_label WHERE `label_value` = @HIVE_NODE;
+INSERT INTO linkis_configuration_category (`label_id`, `level`) VALUES (@label_id, 2);
+
+SELECT @label_id := id from linkis_manager_label WHERE `label_value` = @PYTHON_NODE;
+INSERT INTO linkis_configuration_category (`label_id`, `level`) VALUES (@label_id, 2);
 
 
-#---------------------------------------全局设置------------------
+---- 关联label和默认配置
+-- 全局默认配置(此处的'*-*,*-*'与一级目录'*-全局设置,*-*'相同,真正查询全局设置的label时应当查询*-*,*-*,而不是*-全局设置,*-*)
+INSERT INTO `linkis_manager_label` (`label_key`, `label_value`, `label_feature`, `label_value_size`, `update_time`, `create_time`) VALUES ('combined_engineType_userCreator','*-*,*-*', 'OPTIONAL', 2, now(), now());
 
-SELECT @key_id := id from linkis_config_key WHERE `key` = 'wds.linkis.yarnqueue';
-SELECT @tree_id := id from linkis_config_tree WHERE `name` = '队列资源';
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.rm.yarnqueue' AND `engine_conn_type` IS NULL;
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = '*-*,*-*';
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-#SELECT @key_id := id from linkis_config_key WHERE `key` = 'wds.linkis.yarnqueue.cores.max';
-#SELECT @tree_id := id from linkis_config_tree WHERE `name` = '队列资源';
-#INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+-- spark默认配置
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.rm.yarnqueue.instance.max' AND `engine_conn_type` = 'spark';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-#SELECT @key_id := id from linkis_config_key WHERE `key` = 'wds.linkis.yarnqueue.memory.max';
-#SELECT @tree_id := id from linkis_config_tree WHERE `name` = '队列资源';
-#INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.rm.yarnqueue.cores.max' AND `engine_conn_type` = 'spark';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-#SELECT @key_id := id from linkis_config_key WHERE `key` = 'wds.linkis.preheating.time';
-#SELECT @tree_id := id from linkis_config_tree WHERE `name` = '预热机制';
-#INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.rm.yarnqueue.memory.max' AND `engine_conn_type` = 'spark';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-#SELECT @key_id := id from linkis_config_key WHERE `key` = 'wds.linkis.tmpfile.clean.time';
-#SELECT @tree_id := id from linkis_config_tree WHERE `name` = '清理机制';
-#INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.rm.client.memory.max' AND `engine_conn_type` = 'spark';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-#SELECT @key_id := id from linkis_config_key WHERE `name` = '引擎最大并发数';
-#SELECT @tree_id := id from linkis_config_tree WHERE `name` = '引擎设置';
-#INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.rm.client.core.max' AND `engine_conn_type` = 'spark';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-SELECT @key_id := id from linkis_config_key WHERE `key` = 'wds.linkis.client.memory.max';
-SELECT @tree_id := id from linkis_config_tree WHERE `name` = '驱动器资源';
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.rm.instance' AND `engine_conn_type` = 'spark';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-#---------------------------------------spark---------------
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'spark.executor.instances' AND `engine_conn_type` = 'spark';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-SELECT @key_id:=id from(SELECT k.id  as 'id'from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.executor.instances' and a.name = 'IDE' ORDER BY k.id limit 1) as tmp;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'spark资源设置' and a.name = 'spark' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'spark.executor.cores' AND `engine_conn_type` = 'spark';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-#SELECT @key_id:=id from(SELECT k.id  as 'id'from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`name` = 'spark引擎最大并发数' and a.name = 'IDE' ORDER BY k.id limit 1) as tmp;
-#SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'spark引擎设置' and a.name = 'spark' ;
-#INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'spark.executor.memory' AND `engine_conn_type` = 'spark';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-SELECT @key_id:=id from(SELECT k.id  as 'id'from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.executor.cores' and a.name = 'IDE' ORDER BY k.id limit 1) as tmp;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'spark资源设置' and a.name = 'spark' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'spark.driver.cores' AND `engine_conn_type` = 'spark';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-SELECT @key_id:=id from(SELECT k.id  as 'id'from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.executor.memory' and a.name = 'IDE' ORDER BY k.id limit 1) as tmp;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'spark资源设置' and a.name = 'spark' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'spark.driver.memory' AND `engine_conn_type` = 'spark';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-SELECT @key_id:=id from(SELECT k.id  as 'id'from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.driver.cores' and a.name = 'IDE' ORDER BY k.id limit 1) as tmp;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'spark资源设置' and a.name = 'spark' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'spark.python.version' AND `engine_conn_type` = 'spark';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @SPARK_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-SELECT @key_id:=id from(SELECT k.id  as 'id'from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.driver.memory' and a.name = 'IDE' ORDER BY k.id limit 1) as tmp;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'spark资源设置' and a.name = 'spark' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+-- hive默认配置
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.rm.client.memory.max' AND `engine_conn_type` = 'hive';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @HIVE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-#---------------------------------------tidb------------------
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.rm.client.core.max' AND `engine_conn_type` = 'hive';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @HIVE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-SELECT @key_id:=id from(SELECT k.id  as 'id'from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.executor.instances' and a.name = 'IDE' ORDER BY k.id desc limit 1) as tmp;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'spark资源设置' and a.name = 'tidb' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.rm.instance' AND `engine_conn_type` = 'hive';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @HIVE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-#SELECT @key_id:=id from(SELECT k.id  as 'id'from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`name` = 'spark引擎最大并发数' and a.name = 'IDE' ORDER BY k.id desc limit 1) as tmp;
-#SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'spark引擎设置' and a.name = 'tidb' ;
-#INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'hive.client.memory' AND `engine_conn_type` = 'hive';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @HIVE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-SELECT @key_id:=id from(SELECT k.id  as 'id'from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.executor.cores' and a.name = 'IDE' ORDER BY k.id desc limit 1) as tmp;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'spark资源设置' and a.name = 'tidb' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'hive.client.java.opts' AND `engine_conn_type` = 'hive';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @HIVE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-SELECT @key_id:=id from(SELECT k.id  as 'id'from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.executor.memory' and a.name = 'IDE' ORDER BY k.id desc limit 1) as tmp;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'spark资源设置' and a.name = 'tidb' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'mapred.reduce.tasks' AND `engine_conn_type` = 'hive';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @HIVE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-SELECT @key_id:=id from(SELECT k.id  as 'id'from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.driver.cores' and a.name = 'IDE' ORDER BY k.id desc limit 1) as tmp;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'spark资源设置' and a.name = 'tidb' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'dfs.block.size' AND `engine_conn_type` = 'hive';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @HIVE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-SELECT @key_id:=id from(SELECT k.id  as 'id'from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.driver.memory' and a.name = 'IDE' ORDER BY k.id desc limit 1) as tmp;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'spark资源设置' and a.name = 'tidb' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'hive.exec.reduce.bytes.per.reducer' AND `engine_conn_type` = 'hive';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @HIVE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.tispark.pd.addresses' and a.name = 'IDE' ;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'tidb设置' and a.name = 'tidb' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+-- python默认配置
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.rm.client.memory.max' AND `engine_conn_type` = 'python';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @PYTHON_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.tispark.tidb.addr' and a.name = 'IDE' ;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'tidb设置' and a.name = 'tidb' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.rm.client.core.max' AND `engine_conn_type` = 'python';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` =  @PYTHON_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.tispark.tidb.password' and a.name = 'IDE' ;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'tidb设置' and a.name = 'tidb' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.rm.instance' AND `engine_conn_type` = 'python';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` =  @PYTHON_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.tispark.tidb.port' and a.name = 'IDE' ;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'tidb设置' and a.name = 'tidb' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'python.java.client.memory' AND `engine_conn_type` = 'python';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` =  @PYTHON_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'spark.tispark.tidb.user' and a.name = 'IDE' ;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'tidb设置' and a.name = 'tidb' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'python.version' AND `engine_conn_type` = 'python';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` =  @PYTHON_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-#---------------------------hive-----------------
-#SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`name` = 'hive引擎最大并发数' and a.name = 'IDE' ;
-#SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'hive引擎设置' and a.name = 'hive' ;
-#INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+-- pipeline默认配置
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'pipeline.output.mold' AND `engine_conn_type` = 'pipeline';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` =  @PIPELINE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'hive.client.memory' and a.name = 'IDE' ;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'hive资源设置' and a.name = 'hive' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'pipeline.field.split' AND `engine_conn_type` = 'pipeline';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` =  @PIPELINE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-#SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'mapred.reduce.tasks' and a.name = 'IDE';
-#SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'hive资源设置' and a.name = 'hive' ;
-#INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'pipeline.output.charset' AND `engine_conn_type` = 'pipeline';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @PIPELINE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-#SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'dfs.block.size' and a.name = 'IDE' ;
-#SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'hive资源设置' and a.name = 'hive' ;
-#INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'pipeline.output.isoverwtite' AND `engine_conn_type` = 'pipeline';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @PIPELINE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-#SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'hive.exec.reduce.bytes.per.reducer' and a.name = 'IDE' ;
-#SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'hive资源设置' and a.name = 'hive' ;
-#INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'pipeline.engine.memory' AND `engine_conn_type` = 'pipeline';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @PIPELINE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-#SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'hive.client.java.opts' and a.name = 'IDE';
-#SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'hive资源设置' and a.name = 'hive' ;
-#INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'pipeline.output.shuffle.null.type' AND `engine_conn_type` = 'pipeline';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @PIPELINE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-#------------------------python---------------------
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.instance' AND `engine_conn_type` = 'pipeline';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @PIPELINE_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-#SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`name` = 'python引擎最大并发数' and a.name = 'IDE'  ;
-#SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'python引擎设置' and a.name = 'python' ;
-#INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+-- jdbc默认配置
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.jdbc.connect.url' AND `engine_conn_type` = 'jdbc';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @JDBC_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'python.java.client.memory' and a.name = 'IDE' ;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = 'python资源设置' and a.name = 'python' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.jdbc.version' AND `engine_conn_type` = 'jdbc';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @JDBC_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-#---------------------------pipeline-----------------
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'pipeline.output.mold' and a.name = 'IDE' ;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = '导入导出设置' and a.name = 'pipeline' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.jdbc.username' AND `engine_conn_type` = 'jdbc';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @JDBC_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'pipeline.field.split' and a.name = 'IDE' ;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = '导入导出设置' and a.name = 'pipeline' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.jdbc.password' AND `engine_conn_type` = 'jdbc';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @JDBC_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
 
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'pipeline.output.charset' and a.name = 'IDE' ;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = '导入导出设置' and a.name = 'pipeline' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'pipeline.output.isoverwtite' and a.name = 'IDE' ;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = '导入导出设置' and a.name = 'pipeline' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
-
-SELECT @key_id := k.id from linkis_config_key k left join linkis_application a on k.application_id = a.id WHERE k.`key` = 'pipeline.engine.memory' and a.name = 'IDE' ;
-SELECT @tree_id := t.id from linkis_config_tree t left join linkis_application a on t.application_id = a.id  WHERE t.`name` = '导入导出资源设置' and a.name = 'pipeline' ;
-INSERT INTO `linkis_config_key_tree` (`id`, `key_id`, `tree_id`) VALUES (0, @key_id, @tree_id);
\ No newline at end of file
+SELECT @configkey_id := id from linkis_configuration_config_key WHERE `key` = 'wds.linkis.jdbc.connect.max' AND `engine_conn_type` = 'jdbc';
+SELECT @config_label_id := id from linkis_manager_label WHERE `label_value` = @JDBC_ALL;
+INSERT INTO `linkis_configuration_config_value` (`configkey_id`, `config_value`, `config_label_id`) VALUES (@configkey_id, '', @config_label_id);
diff --git a/db/module/linkis_ecp.sql b/db/module/linkis_ecp.sql
new file mode 100644
index 0000000..c310c37
--- /dev/null
+++ b/db/module/linkis_ecp.sql
@@ -0,0 +1,14 @@
+DROP TABLE IF EXISTS `linkis_engine_conn_plugin_bml_resources`;
+CREATE TABLE `linkis_engine_conn_plugin_bml_resources` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `engine_conn_type` varchar(100) NOT NULL COMMENT '引擎类型',
+  `version` varchar(100) COMMENT '版本',
+  `file_name` varchar(255) COMMENT '文件名',
+  `file_size` bigint(20)  DEFAULT 0 NOT NULL COMMENT '文件大小',
+  `last_modified` bigint(20)  COMMENT '文件更新时间',
+  `bml_resource_id` varchar(100) NOT NULL COMMENT '所属系统',
+  `bml_resource_version` varchar(200) NOT NULL COMMENT '资源所属者',
+  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `last_update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
\ No newline at end of file
diff --git a/db/module/linkis_instance_label.sql b/db/module/linkis_instance_label.sql
new file mode 100644
index 0000000..cdf8f8a
--- /dev/null
+++ b/db/module/linkis_instance_label.sql
@@ -0,0 +1,42 @@
+CREATE TABLE `linkis_instance_label` (
+  `id` int(20) NOT NULL AUTO_INCREMENT,
+  `label_key` varchar(32) COLLATE utf8_bin NOT NULL COMMENT 'string key',
+  `label_value` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'string value',
+  `label_feature` varchar(16) COLLATE utf8_bin NOT NULL COMMENT 'store the feature of label, but it may be redundant',
+  `label_value_size` int(20) NOT NULL COMMENT 'size of key -> value map',
+  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'update unix timestamp',
+  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'update unix timestamp',
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `label_key_value` (`label_key`,`label_value`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+CREATE TABLE `linkis_instance_label_value_relation` (
+  `label_value_key` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'value key',
+  `label_value_content` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT 'value content',
+  `label_id` int(20) DEFAULT NULL COMMENT 'id reference linkis_instance_label -> id',
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'update unix timestamp',
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'create unix timestamp',
+  UNIQUE KEY `label_value_key_label_id` (`label_value_key`,`label_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+CREATE TABLE `linkis_instance_label_relation` (
+  `id` int(20) NOT NULL AUTO_INCREMENT,
+  `label_id` int(20) DEFAULT NULL COMMENT 'id reference linkis_instance_label -> id',
+  `service_instance` varchar(64) NOT NULL COLLATE utf8_bin COMMENT 'structure like ${host|machine}:${port}',
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'update unix timestamp',
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'create unix timestamp',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+CREATE TABLE `linkis_instance_info` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `instance` varchar(64) COLLATE utf8_bin DEFAULT NULL COMMENT 'structure like ${host|machine}:${port}',
+  `name` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT 'equal application name in registry',
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'update unix timestamp',
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'create unix timestamp',
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `instance` (`instance`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+
+
diff --git a/db/module/linkis_manager.sql b/db/module/linkis_manager.sql
new file mode 100644
index 0000000..255a04d
--- /dev/null
+++ b/db/module/linkis_manager.sql
@@ -0,0 +1,151 @@
+DROP TABLE IF EXISTS `linkis_manager_service_instance`;
+
+CREATE TABLE `linkis_manager_service_instance` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `instance` varchar(64) COLLATE utf8_bin DEFAULT NULL,
+  `name` varchar(32) COLLATE utf8_bin DEFAULT NULL,
+  `owner` varchar(32) COLLATE utf8_bin DEFAULT NULL,
+  `mark` varchar(32) COLLATE utf8_bin DEFAULT NULL,
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  `updator` varchar(32) COLLATE utf8_bin DEFAULT NULL,
+  `creator` varchar(32) COLLATE utf8_bin DEFAULT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `instance` (`instance`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+DROP TABLE IF EXISTS `linkis_manager_linkis_resources`;
+
+CREATE TABLE `linkis_manager_linkis_resources` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `max_resource` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `min_resource` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `used_resource` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `left_resource` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `expected_resource` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `locked_resource` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `resourceType` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `ticketId` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  `updator` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `creator` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+DROP TABLE IF EXISTS `linkis_manager_lock`;
+
+CREATE TABLE `linkis_manager_lock` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `lock_object` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `time_out` longtext COLLATE utf8_bin,
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+DROP TABLE IF EXISTS `linkis_external_resource_provider`;
+CREATE TABLE `linkis_external_resource_provider` (
+  `id` int(10) NOT NULL AUTO_INCREMENT,
+  `resource_type` varchar(32) NOT NULL,
+  `name` varchar(32) NOT NULL,
+  `labels` varchar(32) DEFAULT NULL,
+  `config` text NOT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+DROP TABLE IF EXISTS `linkis_manager_engine_em`;
+CREATE TABLE `linkis_manager_engine_em` (
+  `id` int(20) NOT NULL AUTO_INCREMENT,
+  `engine_instance` varchar(64) COLLATE utf8_bin DEFAULT NULL,
+  `em_instance` varchar(64) COLLATE utf8_bin DEFAULT NULL,
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+DROP TABLE IF EXISTS `linkis_manager_label`;
+
+CREATE TABLE `linkis_manager_label` (
+  `id` int(20) NOT NULL AUTO_INCREMENT,
+  `label_key` varchar(32) COLLATE utf8_bin NOT NULL,
+  `label_value` varchar(255) COLLATE utf8_bin NOT NULL,
+  `label_feature` varchar(16) COLLATE utf8_bin NOT NULL,
+  `label_value_size` int(20) NOT NULL,
+  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `label_key_value` (`label_key`,`label_value`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+DROP TABLE IF EXISTS `linkis_manager_label_value_relation`;
+
+CREATE TABLE `linkis_manager_label_value_relation` (
+  `label_value_key` varchar(255) COLLATE utf8_bin NOT NULL,
+  `label_value_content` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `label_id` int(20) DEFAULT NULL,
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  UNIQUE KEY `label_value_key_label_id` (`label_value_key`,`label_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+DROP TABLE IF EXISTS `linkis_manager_label_resource`;
+CREATE TABLE `linkis_manager_label_resource` (
+  `id` int(20) NOT NULL AUTO_INCREMENT,
+  `label_id` int(20) DEFAULT NULL,
+  `resource_id` int(20) DEFAULT NULL,
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+
+DROP TABLE IF EXISTS `linkis_manager_label_service_instance`;
+CREATE TABLE `linkis_manager_label_service_instance` (
+  `id` int(20) NOT NULL AUTO_INCREMENT,
+  `label_id` int(20) DEFAULT NULL,
+  `service_instance` varchar(64) COLLATE utf8_bin DEFAULT NULL,
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+
+DROP TABLE IF EXISTS `linkis_manager_label_user`;
+CREATE TABLE `linkis_manager_label_user` (
+  `id` int(20) NOT NULL AUTO_INCREMENT,
+  `username` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `label_id` int(20) DEFAULT NULL,
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+
+DROP TABLE IF EXISTS `linkis_manager_metrics_history`;
+
+CREATE TABLE `linkis_manager_metrics_history` (
+  `instance_status` int(20) DEFAULT NULL,
+  `overload` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `heartbeat_msg` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `healthy_status` int(20) DEFAULT NULL,
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  `creator` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `ticketID` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `serviceName` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `instance` varchar(255) COLLATE utf8_bin DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+DROP TABLE IF EXISTS `linkis_manager_service_instance_metrics`;
+
+CREATE TABLE `linkis_manager_service_instance_metrics` (
+  `instance` varchar(32) COLLATE utf8_bin NOT NULL,
+  `instance_status` int(11) DEFAULT NULL,
+  `overload` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `heartbeat_msg` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `healthy_status` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`instance`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
diff --git a/db/module/linkis_query.sql b/db/module/linkis_query.sql
index 1262fba..af76c6b 100644
--- a/db/module/linkis_query.sql
+++ b/db/module/linkis_query.sql
@@ -9,22 +9,25 @@
   `instance` varchar(50) DEFAULT NULL COMMENT 'An instance of Entrance, consists of IP address of the entrance server and port',
   `exec_id` varchar(50) DEFAULT NULL COMMENT 'execution ID, consists of jobID(generated by scheduler), executeApplicationName , creator and instance',
   `um_user` varchar(50) DEFAULT NULL COMMENT 'User name',
+  `submit_user` varchar(50) DEFAULT NULL COMMENT 'submitUser name',
   `execution_code` text COMMENT 'Run script. When exceeding 6000 lines, script would be stored in HDFS and its file path would be stored in database',
   `progress` float DEFAULT NULL COMMENT 'Script execution progress, between zero and one',
   `log_path` varchar(200) DEFAULT NULL COMMENT 'File path of the log files',
   `result_location` varchar(200) DEFAULT NULL COMMENT 'File path of the result',
-  `status` varchar(50) DEFAULT NULL COMMENT 'Script execution status, must be one of the following: Inited, WaitForRetry, Scheduled, Running, Succeed, Failed, Cancelled, Timeout', 
+  `status` varchar(50) DEFAULT NULL COMMENT 'Script execution status, must be one of the following: Inited, WaitForRetry, Scheduled, Running, Succeed, Failed, Cancelled, Timeout',
   `created_time` datetime DEFAULT NULL COMMENT 'Creation time',
   `updated_time` datetime DEFAULT NULL COMMENT 'Update time',
   `run_type` varchar(50) DEFAULT NULL COMMENT 'Further refinement of execution_application_time, e.g, specifying whether to run pySpark or SparkR',
   `err_code` int(11) DEFAULT NULL COMMENT 'Error code. Generated when the execution of the script fails',
-  `err_desc` text COMMENT 'Execution description. Generated when the execution of script fails', 
+  `err_desc` text COMMENT 'Execution description. Generated when the execution of script fails',
   `execute_application_name` varchar(200) DEFAULT NULL COMMENT 'The service a user selects, e.g, Spark, Python, R, etc',
   `request_application_name` varchar(200) DEFAULT NULL COMMENT 'Parameter name for creator',
   `script_path` varchar(200) DEFAULT NULL COMMENT 'Path of the script in workspace',
-  `params` text COMMENT 'Configuration item of the parameters', 
+  `params` text COMMENT 'Configuration item of the parameters',
   `engine_instance` varchar(50) DEFAULT NULL COMMENT 'An instance of engine, consists of IP address of the engine server and port',
+  `task_resource` varchar(1024) DEFAULT NULL,
   `engine_start_time` time DEFAULT NULL,
+  `label_json` varchar(200) DEFAULT NULL COMMENT 'label json',
   PRIMARY KEY (`id`),
   KEY `created_time` (`created_time`),
   KEY `um_user` (`um_user`)
diff --git a/docs/zh_CN/README.md b/docs/zh_CN/README.md
deleted file mode 100644
index e4f330a..0000000
--- a/docs/zh_CN/README.md
+++ /dev/null
@@ -1,141 +0,0 @@
-Linkis
-============
-
-[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
-
-[English](../../README.md) | 中文
-
-# 引言:
-
-Linkis是一个打通了多个计算存储引擎如:Spark、TiSpark、Hive、Python和HBase等,对外提供统一REST/WebSocket/JDBC接口,提交执行SQL、Pyspark、HiveQL、Scala等脚本的计算中间件。
-
-Linkis基于微服务架构,提供了金融级多租户隔离、资源管控、权限隔离等企业级特性,支持统一变量、UDF、函数、用户资源文件管理,具备高并发、高性能、高可用的大数据作业/请求全生命周期管理能力。
-
-
-![Linkis效果图](images/ch3/解决方案.jpg)
-<br>
-<br>
-
-基于Linkis计算中间件的架构设计理念,我们在上层构建了很多的应用系统。目前已开源的有:
-- [**DataSphere Studio - 数据应用开发管理门户**](https://github.com/WeBankFinTech/DataSphereStudio)
-- [**Qualitis - 数据质量工具**](https://github.com/WeBankFinTech/Qualitis)
-- [**Scriptis - 数据研发IDE工具**](https://github.com/WeBankFinTech/Scriptis)
-- [**Visualis - 数据可视化工具**](https://github.com/WeBankFinTech/Visualis)
-
-更多工具准备开源中,敬请期待!
-
-----
-
-# 核心特点:
-
-- **统一作业执行服务**:一个分布式的REST/WebSocket服务,用于接收用户提交的各种脚本请求。
-
-    **目前支持的计算引擎有**:Spark、Python、TiSpark、Hive和Shell等。
-
-    **支持的脚本语言有**:SparkSQL、Spark Scala、Pyspark、R、Python、HQL和Shell等;
-
-
-
-- **资源管理服务**: 支持实时管控每个系统和用户的资源使用情况,限制系统和用户的资源使用量和并发数,并提供实时的资源动态图表,方便查看和管理系统和用户的资源;
-
-    **目前已支持的资源类型**:Yarn队列资源、服务器(CPU和内存)、用户并发个数等。
-
-
-
-- **应用管理服务**:管理所有系统的所有用户应用,包括离线批量应用、交互式查询应用和实时流式应用,为离线和交互式应用提供强大的复用能力,并提供应用全生命周期管理,自动释放用户多余的空闲应用;
-
-
-
-- **统一存储服务**:通用的IO架构,能快速对接各种存储系统,提供统一调用入口,支持所有常用格式数据,集成度高,简单易用;
-
-
-
-- **统一上下文服务**:统一用户和系统资源文件(JAR、ZIP、Properties等),用户、系统、计算引擎的参数和变量统一管理,一处设置,处处自动引用;
-
-
-
-- **物料库**:系统和用户级物料管理,可分享和流转,支持全生命周期自动管理;
-
-
-
-- **元数据服务**:实时的库表结构和分区情况展示。
-
-## 与类似系统的对比:
-
-Linkis跟Apache Livy和Apache Zeppelin Interpreter的定位不一样,但是由于开源社区目前尚没有同类竞品,所以这里做一个简单对比供大家参考。
-
-![comparison_table](images/introduction/comparison_table.png)
-
-
-
-----
-
-# 文档列表
-
-[Linkis快速安装使用文档](https://github.com/WeBankFinTech/Linkis/wiki/%E5%A6%82%E4%BD%95%E5%BF%AB%E9%80%9F%E5%AE%89%E8%A3%85%E4%BD%BF%E7%94%A8Linkis)
-
-[上层前端应用的HTTP接入文档](https://github.com/WeBankFinTech/Linkis/wiki/%E4%B8%8A%E5%B1%82%E5%89%8D%E7%AB%AF%E5%BA%94%E7%94%A8HTTP%E6%8E%A5%E5%85%A5%E6%96%87%E6%A1%A3)
-
-[上层前端应用的WebSocket接入文档](https://github.com/WeBankFinTech/Linkis/wiki/%E4%B8%8A%E5%B1%82%E5%89%8D%E7%AB%AF%E5%BA%94%E7%94%A8WebSocket%E6%8E%A5%E5%85%A5%E6%96%87%E6%A1%A3)
-
-[Linkis架构文档](https://github.com/WeBankFinTech/Linkis/wiki/%E6%80%BB%E4%BD%93%E6%9E%B6%E6%9E%84%E8%AE%BE%E8%AE%A1%E4%BB%8B%E7%BB%8D)
-
-**更多文档,请[点我访问](https://github.com/WeBankFinTech/Linkis/wiki)**
-
-
-----
-
-# Architecture:
-
-![introduction_new](images/introduction/introduction_new.png)
-
-----
-
-# RoadMap
-
-### 1. Linkis管理台
-
-- 用户可以查看和管理自己的Job
-- 用户可以查看和管理自己的引擎
-- 用户可以查看Yarn的资源使用情况和用户资源使用排名
-- 用户可以配置引擎的启动参数
-- 用户可以设置变量
-
-### 2. 支持标签功能
-
-- 支持给EngineManager打标签
-- 启动引擎时,支持为引擎打标签
-- 支持通过标签访问目标引擎
-
-### 3. AppGovernance应用治理实现
-
-- 系统级、用户级应用全生命周期管理,包括离线批量、交互式查询和实时流式应用
-- 为离线和交互式应用提供复用能力和智能切换能力
-- 智能限流、应用智能保护
-
-### 4. 支持Flink和Spark Structured Streaming
-
-
-<br>
-
-**如果您有任何需求,欢迎给我们提issue,我们将会及时给您回复。**
-
-----
-
-# Contributing
-
-非常欢迎广大的社区伙伴给我们贡献新引擎和代码!
-
-----
-
-# Communication
-
-如果您想得到最快的响应,请给我们提issue,或者您也可以扫码进群:
-
-![introduction05](images/introduction/introduction05.png)
-
-----
-
-# License
-
-**Linkis is under the Apache 2.0 license. See the [LICENSE](/LICENSE) file for details.**
diff --git a/docs/zh_CN/SUMMARY.md b/docs/zh_CN/SUMMARY.md
index 391a4e1..dca2f1f 100644
--- a/docs/zh_CN/SUMMARY.md
+++ b/docs/zh_CN/SUMMARY.md
@@ -1,16 +1,8 @@
 # Summary
 
-* [Introduction](README.md)
 * [系统部署文档](ch1/deploy.md)
 * [快速使用文档](ch2/linkis快速使用文档.md)
 * [系统使用手册](ch3/linkis使用文档.md)
-* [架构设计]()
+* 架构设计
     * [UJES架构设计](ch4/Linkis-UJES设计文档.md)
-    * [RM架构设计](ch4/Linkis-RM设计文档.md)
-    * [AM架构设计]()
-* [开发文档]()
-* [FAQ]()
-* [版本升级文档]()
-* [历次版本发布内容]()
-
-    
+    * [RM架构设计](ch4/Linkis-RM设计文档.md)
\ No newline at end of file
diff --git a/emr-base/Dockerfile b/emr-base/Dockerfile
deleted file mode 100644
index c42b731..0000000
--- a/emr-base/Dockerfile
+++ /dev/null
@@ -1,73 +0,0 @@
-#
-#  Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM centos:latest
-MAINTAINER wedatasphere@webank.com
-
-RUN yum -y install wget tar && \
-    mkdir /opt/{flink,hadoop,spark,hive}
-
-WORKDIR /tmp
-
-RUN wget -O jdk-8u221-linux-x64.tar.gz \
-  -c --content-disposition \
-  "https://javadl.oracle.com/webapps/download/AutoDL?BundleId=239835_230deb18db3e4014bb8e3e8324f81b43" && \
-   wget "https://archive.apache.org/dist/flink/flink-1.7.2/flink-1.7.2-bin-hadoop27-scala_2.11.tgz" && \
-   wget "https://downloads.lightbend.com/scala/2.11.8/scala-2.11.8.tgz" && \
-   wget "http://archive.apache.org/dist/spark/spark-2.4.4/spark-2.4.4-bin-hadoop2.7.tgz" && \
-   wget "http://archive.apache.org/dist/hive/hive-2.3.6/apache-hive-2.3.6-bin.tar.gz" && \
-   wget "http://archive.apache.org/dist/hadoop/common/hadoop-2.7.7/hadoop-2.7.7.tar.gz"
-
-
-#COPY flink-1.7.2-bin-hadoop27-scala_2.11.tgz .
-#COPY scala-2.11.8.tgz .
-#COPY jdk-8u221-linux-x64.tar.gz .
-#COPY hadoop-2.7.7.tar.gz .
-#COPY spark-2.4.4-bin-hadoop2.7.tgz .
-#COPY apache-hive-2.3.6-bin.tar.gz .
-
-RUN tar xf flink-1.7.2-bin-hadoop27-scala_2.11.tgz -C /opt/flink/ && \
-    tar xf scala-2.11.8.tgz -C /usr/local/ && \
-    tar xf jdk-8u221-linux-x64.tar.gz -C /usr/local/ && \
-    tar xf hadoop-2.7.7.tar.gz -C /opt/hadoop/ && \
-    tar xf spark-2.4.4-bin-hadoop2.7.tgz -C /opt/spark/ && \
-    tar xf apache-hive-2.3.6-bin.tar.gz -C /opt/hive/ && \
-    rm -f *.tgz *.tar.gz
-
-#COPY hive/conf /opt/hive/apache-hive-2.3.6-bin/conf
-#COPY hadoop/conf /opt/hadoop/hadoop-2.7.7/etc/hadoop
-#COPY jdk-8u221-linux-x64.tar.gz  /tmp
-#COPY scala-2.11.8.tgz /tmp
-#COPY spark-2.4.4-bin-hadoop2.7.tgz /tmp
-#
-#RUN tar xf jdk-8u221-linux-x64.tar.gz -C /usr/local/ && \
-#    tar xf scala-2.11.8.tgz -C /usr/local/ && \
-#    tar xf spark-2.4.4-bin-hadoop2.7.tgz -C /opt/spark/ && \
-#    rm -f *.tgz *.tar.gz
-
-ENV TIME_ZONE Asia/Shanghai
-ENV SPARK_HOME=/opt/spark/spark-2.4.4-bin-hadoop2.7
-ENV SPARK_CONF_DIR=$SPARK_HOME/conf
-ENV PYSPARK_ALLOW_INSECURE_GATEWAY=1
-ENV HIVE_HOME=/opt/hive/apache-hive-2.3.6-bin
-ENV FLINK_HOME=/opt/flink/flink-1.7.2
-ENV HIVE_CONF_DIR=$HIVE_HOME/conf
-ENV SCALA_HOME=/usr/local/scala-2.11.8
-ENV HADOOP_HOME=/opt/hadoop/hadoop-2.7.7
-ENV HADOOP_CONF_PATH=$HADOOP_HOME/etc/hadoop
-ENV HADOOP_CONF_DIR=$HADOOP_HOME/etc/hadoop
-ENV JAVA_HOME /usr/local/jdk1.8.0_221
-ENV CLASSPATH $JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
-ENV PATH ${JAVA_HOME}/bin/:${SPARK_HOME}/bin:${HIVE_HOME}/bin:${SCALA_HOME}/bin:${FLINK_HOME}/bin:${HADOOP_HOME}/sbin:${HADOOP_HOME}/bin:$PATH
\ No newline at end of file
diff --git a/emr-base/README.md b/emr-base/README.md
deleted file mode 100644
index ff758fd..0000000
--- a/emr-base/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-该目录下放入jdk,scala,spark二进制压缩包编译基础镜像使用,其他linkis module都是基于基础镜像做扩展
-spark需要二进制包,因为spark-engine调用了spark-submit脚本
-
-hadoop,hive 配置文件core-site.xml,hdfs-sit.xml,hive-site.xml等也放在同一级目录hive/conf,hadoop/conf,按Dockerfile的指定层级
\ No newline at end of file
diff --git a/eurekaServer/bin/start-eureka.sh b/eurekaServer/bin/start-eureka.sh
deleted file mode 100755
index fd70203..0000000
--- a/eurekaServer/bin/start-eureka.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash
-
-cd `dirname $0`
-cd ..
-HOME=`pwd`
-
-export EUREKA_SERVER_PID=$HOME/bin/linkis.pid
-
-if [[ -f "${EUREKA_SERVER_PID}" ]]; then
-    pid=$(cat ${EUREKA_SERVER_PID})
-    if kill -0 ${pid} >/dev/null 2>&1; then
-      echo "EUREKA_SERVER Remote Server is already running."
-      exit 1
-    fi
-fi
-
-export EUREKA_SERVER_LOG_PATH=$HOME/logs
-export EUREKA_SERVER_HEAP_SIZE="512M"
-export EUREKA_SERVER_CLASS=${EUREKA_SERVER_CLASS:-com.webank.wedatasphere.linkis.eureka.SpringCloudEurekaApplication}
-
-profiles='eureka'
-if [ $1 ];then
-        type=$1
-fi
-
-export EUREKA_SERVER_JAVA_OPTS=" -Xmx$EUREKA_SERVER_HEAP_SIZE -XX:+UseG1GC  -Xloggc:$HOME/logs/linkis-gc.log"
-
-java $EUREKA_SERVER_JAVA_OPTS -cp $HOME/conf:$HOME/lib/* $EUREKA_SERVER_CLASS --spring.profiles.active=$profiles  2>&1 > $EUREKA_SERVER_LOG_PATH/linkis.out &
-pid=$!
-sleep 2
-if [[ -z "${pid}" ]]; then
-    echo "EUREKA SERVER start failed!"
-    exit 1
-else
-    echo "EUREKA SERVER start succeed!"
-    echo $pid > $EUREKA_SERVER_PID
-fi
diff --git a/eurekaServer/bin/stop-eureka.sh b/eurekaServer/bin/stop-eureka.sh
deleted file mode 100755
index f032887..0000000
--- a/eurekaServer/bin/stop-eureka.sh
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/bash
-
-cd `dirname $0`
-cd ..
-HOME=`pwd`
-
-export SERVER_PID=$HOME/bin/linkis.pid
-
-function wait_for_server_to_die() {
-  local pid
-  local count
-  pid=$1
-  timeout=$2
-  count=0
-  timeoutTime=$(date "+%s")
-  let "timeoutTime+=$timeout"
-  currentTime=$(date "+%s")
-  forceKill=1
-
-  while [[ $currentTime -lt $timeoutTime ]]; do
-    $(kill ${pid} > /dev/null 2> /dev/null)
-    if kill -0 ${pid} > /dev/null 2>&1; then
-      sleep 3
-    else
-      forceKill=0
-      break
-    fi
-    currentTime=$(date "+%s")
-  done
-
-  if [[ forceKill -ne 0 ]]; then
-    $(kill -9 ${pid} > /dev/null 2> /dev/null)
-  fi
-}
-
-if [[ ! -f "${SERVER_PID}" ]]; then
-    echo "server $SERVER_NAME is not running"
-else
-    pid=$(cat ${SERVER_PID})
-    if [[ -z "${pid}" ]]; then
-      echo "server $SERVER_NAME is not running"
-    else
-      wait_for_server_to_die $pid 40
-      $(rm -f ${SERVER_PID})
-      echo "server $SERVER_NAME is stopped."
-    fi
-fi
\ No newline at end of file
diff --git a/eurekaServer/pom.xml b/eurekaServer/pom.xml
deleted file mode 100644
index 513b43a..0000000
--- a/eurekaServer/pom.xml
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <artifactId>linkis-eureka-server</artifactId>
-    <modelVersion>4.0.0</modelVersion>
-    <packaging>jar</packaging>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.springframework.boot</groupId>
-                    <artifactId>spring-boot-starter</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-eureka-server</artifactId>
-            <version>${spring.eureka.version}</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>hibernate-validator</artifactId>
-                    <groupId>org.hibernate.validator</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-    </dependencies>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>2.3</version>
-                <inherited>false</inherited>
-                <executions>
-                    <execution>
-                        <id>make-assembly</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                        <configuration>
-                            <descriptors>
-                                <descriptor>src/main/assembly/distribution.xml</descriptor>
-                            </descriptors>
-                        </configuration>
-                    </execution>
-                </executions>
-                <configuration>
-                    <skipAssembly>false</skipAssembly>
-                    <finalName>eureka</finalName>
-                    <appendAssemblyId>false</appendAssemblyId>
-                    <attach>false</attach>
-                    <descriptors>
-                        <descriptor>src/main/assembly/distribution.xml</descriptor>
-                    </descriptors>
-                </configuration>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>${basedir}/src/main/resources</directory>
-            </resource>
-        </resources>
-        <finalName>${project.artifactId}-${project.version}</finalName>
-    </build>
-</project>
\ No newline at end of file
diff --git a/eurekaServer/src/main/assembly/distribution.xml b/eurekaServer/src/main/assembly/distribution.xml
deleted file mode 100644
index 6e9cb5c..0000000
--- a/eurekaServer/src/main/assembly/distribution.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<!--
-  ~ Copyright 2019 WeBank
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<assembly
-        xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/2.3"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/2.3 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-    <id>eurekaServer</id>
-    <formats>
-        <format>zip</format>
-    </formats>
-    <includeBaseDirectory>true</includeBaseDirectory>
-    <baseDirectory>eureka</baseDirectory>
-
-    <dependencySets>
-        <dependencySet>
-            <!-- Enable access to all projects in the current multimodule build! <useAllReactorProjects>true</useAllReactorProjects> -->
-            <!-- Now, select which projects to include in this module-set. -->
-            <outputDirectory>lib</outputDirectory>
-            <useProjectArtifact>true</useProjectArtifact>
-            <useTransitiveDependencies>true</useTransitiveDependencies>
-            <unpack>false</unpack>
-            <useStrictFiltering>true</useStrictFiltering>
-            <useTransitiveFiltering>true</useTransitiveFiltering>
-        </dependencySet>
-    </dependencySets>
-
-    <fileSets>
-        <fileSet>
-            <directory>${basedir}/src/main/resources</directory>
-            <includes>
-                <include>*</include>
-            </includes>
-            <fileMode>0777</fileMode>
-            <outputDirectory>conf</outputDirectory>
-            <lineEnding>unix</lineEnding>
-        </fileSet>
-        <fileSet>
-            <directory>${basedir}/bin</directory>
-            <includes>
-                <include>*</include>
-            </includes>
-            <fileMode>0777</fileMode>
-            <outputDirectory>bin</outputDirectory>
-            <lineEnding>unix</lineEnding>
-        </fileSet>
-        <fileSet>
-            <directory>.</directory>
-            <excludes>
-                <exclude>*/**</exclude>
-            </excludes>
-            <outputDirectory>logs</outputDirectory>
-        </fileSet>
-    </fileSets>
-
-</assembly>
-
diff --git a/eurekaServer/src/main/resources/application-eureka.yml b/eurekaServer/src/main/resources/application-eureka.yml
deleted file mode 100644
index 032aad3..0000000
--- a/eurekaServer/src/main/resources/application-eureka.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-spring:
-  application:
-    name: DataWorkCloud
-  profiles: eureka
-
-server:
-  port: 20303
-eureka:
-  instance:
-    hostname:
-#    preferIpAddress: true
-  client:
-#    register-with-eureka: false
-#    fetch-registry: false
-    serviceUrl:
-      defaultZone: http://ip:port/eureka/
-#  server:
-#    enableSelfPreservation: false
-    enable-self-preservation: false
-    eviction-interval-timer-in-ms: 3000
-  server:
-    response-cache-update-interval-ms: 2000
diff --git a/eurekaServer/src/main/resources/log4j.properties b/eurekaServer/src/main/resources/log4j.properties
deleted file mode 100644
index 178f8df..0000000
--- a/eurekaServer/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-### set log levels ###
-
-log4j.rootCategory=INFO,console
-
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.Threshold=INFO
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-#log4j.appender.console.layout.ConversionPattern= %d{ISO8601} %-5p (%t) [%F:%M(%L)] - %m%n
-log4j.appender.console.layout.ConversionPattern= %d{ISO8601} %-5p (%t) %p %c{1} - %m%n
-
-
-log4j.appender.com.webank.bdp.ide.core=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.com.webank.bdp.ide.core.Threshold=INFO
-log4j.additivity.com.webank.bdp.ide.core=false
-log4j.appender.com.webank.bdp.ide.core.layout=org.apache.log4j.PatternLayout
-log4j.appender.com.webank.bdp.ide.core.Append=true
-log4j.appender.com.webank.bdp.ide.core.File=logs/linkis.log
-log4j.appender.com.webank.bdp.ide.core.layout.ConversionPattern= %d{ISO8601} %-5p (%t) [%F:%M(%L)] - %m%n
-
-log4j.logger.org.springframework=INFO
\ No newline at end of file
diff --git a/eurekaServer/src/main/resources/log4j2.xml b/eurekaServer/src/main/resources/log4j2.xml
deleted file mode 100644
index ad88ea5..0000000
--- a/eurekaServer/src/main/resources/log4j2.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<configuration status="error" monitorInterval="30">
-    <appenders>
-        <Console name="Console" target="SYSTEM_OUT">
-            <ThresholdFilter level="INFO" onMatch="ACCEPT" onMismatch="DENY"/>
-            <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%t] %logger{36} %L %M - %msg%xEx%n"/>
-        </Console>
-        <RollingFile name="RollingFile" fileName="logs/linkis.log"
-                     filePattern="logs/$${date:yyyy-MM}/linkis-log-%d{yyyy-MM-dd}-%i.log">
-            <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5level] [%-40t] %c{1.} (%L) [%M] - %msg%xEx%n"/>
-            <SizeBasedTriggeringPolicy size="100MB"/>
-            <DefaultRolloverStrategy max="20"/>
-        </RollingFile>
-    </appenders>
-    <loggers>
-        <root level="INFO">
-            <appender-ref ref="RollingFile"/>
-            <appender-ref ref="Console"/>
-        </root>
-    </loggers>
-</configuration>
-
diff --git a/extensions/spark-excel/pom.xml b/extensions/spark-excel/pom.xml
deleted file mode 100644
index dd2e4af..0000000
--- a/extensions/spark-excel/pom.xml
+++ /dev/null
@@ -1,190 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <groupId>com.webank.weDataSphere</groupId>
-    <artifactId>spark-excel_2.11</artifactId>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-        <java.version>1.7</java.version>
-        <maven.version>3.3.3</maven.version>
-        <scala.version>2.11.7</scala.version>
-        <scala.compat.version>2.11</scala.compat.version>
-        <spark.version>2.1.0</spark.version>
-        <hadoop.version>2.7.2</hadoop.version>
-        <kafka.version>0.8.2.0</kafka.version>
-        <slf4j.version>1.7.12</slf4j.version>
-        <hbase.version>1.2.2</hbase.version>
-        <curator.version>2.7.0</curator.version>
-        <optparse.version>1.1.2</optparse.version>
-        <log4j.version>1.2.17</log4j.version>
-        <json4s.version>3.2.11</json4s.version>
-        <guava.version>12.0.1</guava.version>
-        <hadoop-scope>provided</hadoop-scope>
-        <spark-scope>provided</spark-scope>
-    </properties>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-common</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <version>${slf4j.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.poi</groupId>
-            <artifactId>poi-ooxml</artifactId>
-            <version>3.17</version>
-        </dependency>
-        <dependency>
-            <groupId>com.norbitltd</groupId>
-            <artifactId>spoiwo_${scala.compat.version}</artifactId>
-            <version>1.2.0</version>
-        </dependency>
-        <dependency>
-            <groupId>com.monitorjbl</groupId>
-            <artifactId>xlsx-streamer</artifactId>
-            <version>1.2.1</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.apache.poi</groupId>
-                    <artifactId>ooxml-schemas</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.module</groupId>
-            <artifactId>jackson-module-scala_${scala.compat.version}</artifactId>
-            <version>2.8.8</version>
-            <scope>${spark-scope}</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.scalatest</groupId>
-            <artifactId>scalatest_${scala.compat.version}</artifactId>
-            <version>3.0.1</version>
-            <scope>${spark-scope}</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.scalacheck</groupId>
-            <artifactId>scalacheck_${scala.compat.version}</artifactId>
-            <version>1.13.4</version>
-            <scope>${spark-scope}</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.github.alexarchambault</groupId>
-            <artifactId>scalacheck-shapeless_1.13_${scala.compat.version}</artifactId>
-            <version>1.1.6</version>
-            <scope>${spark-scope}</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.holdenkarau</groupId>
-            <artifactId>spark-testing-base_${scala.compat.version}</artifactId>
-            <version>2.1.0_0.9.0</version>
-            <scope>${spark-scope}</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.scalamock</groupId>
-            <artifactId>scalamock-scalatest-support_${scala.compat.version}</artifactId>
-            <version>3.5.0</version>
-            <scope>${spark-scope}</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.spark</groupId>
-            <artifactId>spark-core_${scala.compat.version}</artifactId>
-            <version>${spark.version}</version>
-            <scope>${spark-scope}</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.spark</groupId>
-            <artifactId>spark-sql_${scala.compat.version}</artifactId>
-            <version>${spark.version}</version>
-            <scope>${spark-scope}</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.hadoop</groupId>
-            <artifactId>hadoop-hdfs</artifactId>
-            <version>${hadoop.version}</version>
-            <scope>${spark-scope}</scope>
-            <exclusions>
-                <exclusion>
-                    <artifactId>servlet-api</artifactId>
-                    <groupId>javax.servlet</groupId>
-                </exclusion>
-                <exclusion>
-                    <groupId>com.google.guava</groupId>
-                    <artifactId>guava</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-    </dependencies>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-                <version>2.8.2</version>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.2</version>
-                <configuration>
-                    <source>${java.version}</source>
-                    <target>${java.version}</target>
-                    <encoding>UTF-8</encoding>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-                <version>3.2.2</version>
-                <configuration>
-                    <recompileMode>incremental</recompileMode>
-                    <args>
-                        <arg>-target:jvm-${java.version}</arg>
-                    </args>
-                    <javacArgs>
-                        <javacArg>-source</javacArg>
-                        <javacArg>${java.version}</javacArg>
-                        <javacArg>-target</javacArg>
-                        <javacArg>${java.version}</javacArg>
-                    </javacArgs>
-                </configuration>
-                <executions>
-                    <execution>
-                        <phase>process-resources</phase>
-                        <goals>
-                            <goal>compile</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>scala-test-compile</id>
-                        <phase>process-test-resources</phase>
-                        <goals>
-                            <goal>testCompile</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-
-        </plugins>
-    </build>
-</project>
\ No newline at end of file
diff --git a/extensions/spark-excel/src/main/scala/com/webank/wedatasphere/spark/excel/DefaultSource.scala b/extensions/spark-excel/src/main/scala/com/webank/wedatasphere/spark/excel/DefaultSource.scala
deleted file mode 100644
index 884b9b1..0000000
--- a/extensions/spark-excel/src/main/scala/com/webank/wedatasphere/spark/excel/DefaultSource.scala
+++ /dev/null
@@ -1,97 +0,0 @@
-package com.webank.wedatasphere.spark.excel
-
-import org.apache.hadoop.fs.Path
-import org.apache.spark.sql.sources._
-import org.apache.spark.sql.types.StructType
-import org.apache.spark.sql.{DataFrame, SQLContext, SaveMode}
-
-class DefaultSource extends RelationProvider with SchemaRelationProvider with CreatableRelationProvider {
-
-  /**
-    * Creates a new relation for retrieving data from an Excel file
-    */
-  override def createRelation(sqlContext: SQLContext, parameters: Map[String, String]): ExcelRelation =
-    createRelation(sqlContext, parameters, null)
-
-  /**
-    * Creates a new relation for retrieving data from an Excel file
-    */
-  override def createRelation(
-    sqlContext: SQLContext,
-    parameters: Map[String, String],
-    schema: StructType
-  ): ExcelRelation = {
-    ExcelRelation(
-      location = checkParameter(parameters, "path"),
-      sheetName = parameters.get("sheetName"),
-      useHeader = checkParameter(parameters, "useHeader").toBoolean,
-      treatEmptyValuesAsNulls = parameters.get("treatEmptyValuesAsNulls").fold(true)(_.toBoolean),
-      userSchema = Option(schema),
-      inferSheetSchema = parameters.get("inferSchema").fold(false)(_.toBoolean),
-      addColorColumns = parameters.get("addColorColumns").fold(false)(_.toBoolean),
-      startColumn = parameters.get("startColumn").fold(0)(_.toInt),
-      endColumn = parameters.get("endColumn").fold(Int.MaxValue)(_.toInt),
-      timestampFormat = parameters.get("timestampFormat"),
-      maxRowsInMemory = parameters.get("maxRowsInMemory").map(_.toInt),
-      excerptSize = parameters.get("excerptSize").fold(10)(_.toInt),
-      parameters = parameters,
-      dateFormat = parameters.get("dateFormats").getOrElse("yyyy-MM-dd").split(";").toList
-    )(sqlContext)
-  }
-
-  override def createRelation(
-    sqlContext: SQLContext,
-    mode: SaveMode,
-    parameters: Map[String, String],
-    data: DataFrame
-  ): BaseRelation = {
-    val path = checkParameter(parameters, "path")
-    val sheetName = parameters.getOrElse("sheetName", "Sheet1")
-    val useHeader = checkParameter(parameters, "useHeader").toBoolean
-    val dateFormat = parameters.getOrElse("dateFormat", ExcelFileSaver.DEFAULT_DATE_FORMAT)
-    val timestampFormat = parameters.getOrElse("timestampFormat", ExcelFileSaver.DEFAULT_TIMESTAMP_FORMAT)
-    val filesystemPath = new Path(path)
-    val fs = filesystemPath.getFileSystem(sqlContext.sparkContext.hadoopConfiguration)
-    fs.setWriteChecksum(false)
-    val doSave = if (fs.exists(filesystemPath)) {
-      mode match {
-        case SaveMode.Append =>
-          sys.error(s"Append mode is not supported by ${this.getClass.getCanonicalName}")
-        case SaveMode.Overwrite =>
-          fs.delete(filesystemPath, true)
-          true
-        case SaveMode.ErrorIfExists =>
-          sys.error(s"path $path already exists.")
-        case SaveMode.Ignore => false
-      }
-    } else {
-      true
-    }
-    if (doSave) {
-      // Only save data when the save mode is not ignore.
-      (new ExcelFileSaver(fs)).save(
-        filesystemPath,
-        data,
-        sheetName = sheetName,
-        useHeader = useHeader,
-        dateFormat = dateFormat,
-        timestampFormat = timestampFormat
-      )
-    }
-
-    createRelation(sqlContext, parameters, data.schema)
-  }
-
-  // Forces a Parameter to exist, otherwise an exception is thrown.
-  private def checkParameter(map: Map[String, String], param: String): String = {
-    if (!map.contains(param)) {
-      throw new IllegalArgumentException(s"Parameter ${'"'}$param${'"'} is missing in options.")
-    } else {
-      map.apply(param)
-    }
-  }
-
-  // Gets the Parameter if it exists, otherwise returns the default argument
-  private def parameterOrDefault(map: Map[String, String], param: String, default: String) =
-    map.getOrElse(param, default)
-}
diff --git a/extensions/spark-excel/src/main/scala/com/webank/wedatasphere/spark/excel/DefaultSource15.scala b/extensions/spark-excel/src/main/scala/com/webank/wedatasphere/spark/excel/DefaultSource15.scala
deleted file mode 100644
index 27d04ef..0000000
--- a/extensions/spark-excel/src/main/scala/com/webank/wedatasphere/spark/excel/DefaultSource15.scala
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.webank.wedatasphere.spark.excel
-
-import org.apache.spark.sql.sources.DataSourceRegister
-
-class DefaultSource15 extends DefaultSource with DataSourceRegister {
-  override def shortName(): String = "excel"
-}
diff --git a/extensions/spark-excel/src/main/scala/com/webank/wedatasphere/spark/excel/ExcelFileSaver.scala b/extensions/spark-excel/src/main/scala/com/webank/wedatasphere/spark/excel/ExcelFileSaver.scala
deleted file mode 100644
index 5e0ddd1..0000000
--- a/extensions/spark-excel/src/main/scala/com/webank/wedatasphere/spark/excel/ExcelFileSaver.scala
+++ /dev/null
@@ -1,146 +0,0 @@
-package com.webank.wedatasphere.spark.excel
-
-import java.io.{BufferedOutputStream, OutputStream}
-import java.text.SimpleDateFormat
-import java.util.Date
-
-import org.apache.hadoop.fs.{FileSystem, Path}
-import org.apache.poi.ss.usermodel.IndexedColors
-import org.apache.poi.xssf.streaming.SXSSFWorkbook
-import org.apache.poi.ss.usermodel._
-import org.apache.spark.sql.DataFrame
-
-import scala.language.postfixOps
-
-object ExcelFileSaver {
-  final val DEFAULT_SHEET_NAME = "Sheet1"
-  final val DEFAULT_DATE_FORMAT = "yyyy-MM-dd"
-  final val DEFAULT_TIMESTAMP_FORMAT = "yyyy-mm-dd hh:mm:ss.000"
-}
-
-class ExcelFileSaver(fs: FileSystem) {
-
-  import ExcelFileSaver._
-
-  def save(
-            location: Path,
-            dataFrame: DataFrame,
-            sheetName: String = DEFAULT_SHEET_NAME,
-            useHeader: Boolean = true,
-            dateFormat: String = DEFAULT_DATE_FORMAT,
-            timestampFormat: String = DEFAULT_TIMESTAMP_FORMAT
-          ): Unit = {
-    fs.setVerifyChecksum(false)
-    val headerRow = dataFrame.schema.map(_.name)
-    val dataRows = dataFrame.toLocalIterator()
-    val excelWriter = new ExcelWriter(sheetName, dateFormat, timestampFormat)
-    if (useHeader) excelWriter.writeHead(headerRow)
-    while (dataRows.hasNext) {
-      val line = dataRows.next().toSeq
-      excelWriter.writerRow(line)
-    }
-    excelWriter.close(new BufferedOutputStream(fs.create(location)))
-  }
-
-  def autoClose[A <: AutoCloseable, B](closeable: A)(fun: (A) => B): B = {
-    try {
-      fun(closeable)
-    } finally {
-      closeable.close()
-    }
-  }
-
-
-}
-
-class ExcelWriter(sheetName: String, dateFormat: String, timestampFormat: String) {
-
-
-  val wb = new SXSSFWorkbook(100)
-  val sheet = wb.createSheet(sheetName)
-  val df = new SimpleDateFormat(dateFormat)
-  val tf = new SimpleDateFormat(timestampFormat)
-  val createHelper = wb.getCreationHelper
-  val sdf = wb.createCellStyle()
-  sdf.setDataFormat(createHelper.createDataFormat().getFormat(dateFormat))
-  val stf = wb.createCellStyle()
-  stf.setDataFormat(createHelper.createDataFormat().getFormat(timestampFormat))
-
-  var rowNum = 0
-  var columnsLen = 0
-
-  def writeHead(headRow: Seq[String]): Unit = {
-    columnsLen = headRow.length
-    //设置header的格式
-    val headerFont = wb.createFont()
-    headerFont.setBold(true)
-    headerFont.setFontHeightInPoints(14)
-    headerFont.setColor(IndexedColors.RED.getIndex())
-    val headerCellStyle = wb.createCellStyle()
-    headerCellStyle.setFont(headerFont)
-    val row = sheet.createRow(rowNum)
-    for (i <- headRow.indices) {
-      createCell(row, i, headRow(i), headerCellStyle)
-    }
-    rowNum = rowNum + 1
-  }
-
-  def writerRow(line: Seq[Any]): Unit = {
-    val row = sheet.createRow(rowNum)
-    for (i <- line.indices) {
-      createCell(row, i, line(i))
-    }
-    rowNum = rowNum + 1
-  }
-
-  def createCell(row: Row, col: Int, value: String, cellStyle: CellStyle): Unit = {
-    val cell = row.createCell(col)
-    cell.setCellValue(value)
-    cell.setCellStyle(cellStyle)
-  }
-
-  def setDateValue(cell:Cell, date: Date): Unit ={
-    cell.setCellStyle(sdf)
-    cell.setCellValue(date)
-  }
-  def setTimestampValue(cell:Cell, date: Date): Unit ={
-    cell.setCellStyle(stf)
-    cell.setCellValue(date)
-  }
-
-  def createCell(row: Row, col: Int, value: Any): Unit = {
-    val cell = row.createCell(col)
-    value match {
-      case t: java.sql.Timestamp => setTimestampValue(cell, new Date(t.getTime))
-      case d: java.sql.Date => setDateValue(cell, new Date(d.getTime))
-      case s: String => cell.setCellValue(s)
-      case f: Float => cell.setCellValue(f)
-      case d: Double => cell.setCellValue(d)
-      case b: Boolean => cell.setCellValue(b)
-      case b: Byte => cell.setCellValue(b)
-      case s: Short => cell.setCellValue(s)
-      case i: Int => cell.setCellValue(i)
-      case l: Long => cell.setCellValue(l)
-      case b: BigDecimal => cell.setCellValue(b.doubleValue())
-      case b: java.math.BigDecimal => cell.setCellValue(b.doubleValue())
-      case null => cell.setCellValue("NULL")
-      case _ => cell.setCellValue(value.toString)
-    }
-  }
-
-  def close(outputStream: OutputStream): Unit = {
-    try {
-      sheet.trackAllColumnsForAutoSizing()
-      for (i <- 0 until  columnsLen) {
-        sheet.autoSizeColumn(i)
-      }
-      wb.write(outputStream);
-    } catch {
-      case e: Throwable =>
-        throw e
-    } finally {
-      outputStream.close()
-      wb.close()
-    }
-  }
-}
diff --git a/extensions/spark-excel/src/main/scala/com/webank/wedatasphere/spark/excel/ExcelRelation.scala b/extensions/spark-excel/src/main/scala/com/webank/wedatasphere/spark/excel/ExcelRelation.scala
deleted file mode 100644
index 8e0cbc4..0000000
--- a/extensions/spark-excel/src/main/scala/com/webank/wedatasphere/spark/excel/ExcelRelation.scala
+++ /dev/null
@@ -1,364 +0,0 @@
-package com.webank.wedatasphere.spark.excel
-
-import java.math.BigDecimal
-import java.sql.Timestamp
-import java.text.SimpleDateFormat
-import java.util.Locale
-
-import com.monitorjbl.xlsx.StreamingReader
-import com.webank.wedatasphere.linkis.common.utils.Logging
-import org.apache.commons.lang.StringUtils
-import org.apache.hadoop.fs.{FileSystem, Path}
-import org.apache.poi.ss.usermodel.{Cell, CellType, DataFormatter, DateUtil, Sheet, Workbook, WorkbookFactory, Row => SheetRow}
-import org.apache.spark.rdd.RDD
-import org.apache.spark.sql._
-import org.apache.spark.sql.catalyst.util.DateTimeUtils
-import org.apache.spark.sql.sources._
-import org.apache.spark.sql.types._
-
-import scala.collection.JavaConverters._
-import scala.util.{Failure, Success, Try}
-
-case class ExcelRelation(
-  location: String,
-  sheetName: Option[String],
-  useHeader: Boolean,
-  treatEmptyValuesAsNulls: Boolean,
-  inferSheetSchema: Boolean,
-  addColorColumns: Boolean = true,
-  userSchema: Option[StructType] = None,
-  startColumn: Int = 0,
-  endColumn: Int = Int.MaxValue,
-  timestampFormat: Option[String] = None,
-  maxRowsInMemory: Option[Int] = None,
-  excerptSize: Int = 10,
-  parameters: Map[String, String] = null,dateFormat: List[String]
-)(@transient val sqlContext: SQLContext)
-    extends BaseRelation
-    with TableScan
-    with PrunedScan with Logging{
-
-  private val path = new Path(location)
-
-  def extractCells(row: org.apache.poi.ss.usermodel.Row): Vector[Option[Cell]] =
-    row.eachCellIterator(startColumn, endColumn).to[Vector]
-
-  private def openWorkbook(): Workbook = {
-    val inputStream = FileSystem.get(path.toUri, sqlContext.sparkContext.hadoopConfiguration).open(path)
-    maxRowsInMemory
-      .map { maxRowsInMem =>
-        StreamingReader
-          .builder()
-          .rowCacheSize(maxRowsInMem)
-          .bufferSize(maxRowsInMem * 1024)
-          .open(inputStream)
-      }
-      .getOrElse(WorkbookFactory.create(inputStream))
-  }
-
-  /**
-    * 抽取10row 用于自动推断
-    * @return
-    */
-  private def getExcerpt(): (SheetRow, List[SheetRow]) = {
-    val workbook = openWorkbook()
-    val sheet = findSheet(workbook, sheetName)
-    val sheetIterator = sheet.iterator.asScala
-    var currentRow: org.apache.poi.ss.usermodel.Row = null
-    while (sheetIterator.hasNext && currentRow == null) {
-      currentRow = sheetIterator.next
-    }
-    if (currentRow == null) {
-      workbook.close()
-      throw new RuntimeException(s"Sheet $sheetName in $path doesn't seem to contain any data")
-    }
-    val firstRow = currentRow
-    var counter = 0
-    val excerpt = new Array[org.apache.poi.ss.usermodel.Row](excerptSize)
-    while (sheetIterator.hasNext && counter < excerptSize) {
-      excerpt(counter) = sheetIterator.next
-      counter += 1
-    }
-    workbook.close()
-    (firstRow, excerpt.take(counter).to[List])
-  }
-
-  /**
-    * 删掉已经自动推断的行
-    * @param wb
-    * @param excerptSize
-    * @return
-    */
-  private def restIterator(wb: Workbook, excerptSize: Int): Iterator[org.apache.poi.ss.usermodel.Row] = {
-    val sheet = findSheet(wb, sheetName)
-    val i = sheet.iterator.asScala
-    i.drop(excerptSize + 1)
-    i
-  }
-
-  /**
-    * 返回推断后的全部数据
-    * @param workbook
-    * @param firstRowWithData
-    * @param excerpt
-    * @return
-    */
-  private def dataIterator(workbook: Workbook, firstRowWithData: SheetRow, excerpt: List[SheetRow]) = {
-    val init = if (useHeader) excerpt else firstRowWithData :: excerpt
-    init.iterator ++ restIterator(workbook, excerpt.size)
-  }
-
-  /**
-    * 遍历所有sheet
-    * @param wb
-    * @return
-    */
-  private def dataAllIterator(wb: Workbook): Iterator[org.apache.poi.ss.usermodel.Row] = {
-    val names = sheetName.getOrElse("sheet1")
-    if("sheet1".equals(names) || ! names.contains(',')){
-      val sheet = findSheet(wb, sheetName)
-      val i = sheet.iterator.asScala
-      if (useHeader) i.drop(1)
-      i
-    } else {
-      val sheetNames = names.split(',')
-      var resIterator  =  Iterator[org.apache.poi.ss.usermodel.Row]()
-      for(name <- sheetNames){
-        val sheet = findSheet(wb, Some(name))
-        val i = sheet.iterator.asScala
-        if (useHeader) i.drop(1)
-        resIterator = resIterator ++ i
-      }
-      resIterator
-    }
-  }
-
-  override val schema: StructType = inferSchema
-
-  /**
-    * 数据格式转换
-    */
-  val dataFormatter = new DataFormatter()
-
-  //val dateFormat: SimpleDateFormat = new SimpleDateFormat(parameters.getOrElse( "dateFormat", "yyyy-MM-dd"), Locale.US)
-
-  val nullValue =parameters.getOrElse( "nullValue", " ")
-  val nanValue = parameters.getOrElse( "nanValue", "null")
-  val quote = parameters.getOrElse( "quote", "\"")
-  val escape = parameters.getOrElse( "escape", "\\")
-  val escapeQuotes = parameters.getOrElse("escapeQuotes", false)
-
-  val timestampParser = if (timestampFormat.isDefined) {
-    Some(new SimpleDateFormat(timestampFormat.get))
-  } else {
-    None
-  }
-
-
-  /**
-    * 获得对应的sheet
-    * @param workBook
-    * @param sheetName
-    * @return
-    */
-  private def findSheet(workBook: Workbook, sheetName: Option[String]): Sheet = {
-    sheetName
-      .map { sn =>
-        Option(workBook.getSheet(sn)).getOrElse(throw new IllegalArgumentException(s"Unknown sheet $sn"))
-      }
-      .getOrElse(workBook.sheetIterator.next)
-  }
-
-  /**
-    * build Row
-    * @return
-    */
-  override def buildScan: RDD[Row] = buildScan(schema.map(_.name).toArray)
-
-  override def buildScan(requiredColumns: Array[String]): RDD[Row] = {
-    val lookups = requiredColumns
-      .map { c =>
-        val columnNameRegex = s"(.*?)(_color)?".r
-        val columnNameRegex(columnName, isColor) = c
-        val columnIndex = schema.indexWhere(_.name == columnName)
-
-        val cellExtractor: Cell => Any = if (isColor == null) {
-          castTo(_, schema(columnIndex).dataType,new SimpleDateFormat(dateFormat(columnIndex),Locale.US),null)
-        } else {
-          _.getCellStyle.getFillForegroundColorColor match {
-            case null => ""
-            case c: org.apache.poi.xssf.usermodel.XSSFColor => c.getARGBHex
-            case c => throw new RuntimeException(s"Unknown color type $c: ${c.getClass}")
-          }
-        }
-        { row: SheetRow =>
-          val cell = row.getCell(columnIndex + startColumn)
-          if (cell == null) {
-            null
-          } else {
-            cellExtractor(cell)
-          }
-        }
-      }
-      .to[Vector]
-    val workbook = openWorkbook()
-    val rows = dataAllIterator(workbook).map(row => lookups.map(l => l(row)))
-    val result = rows.to[Vector]
-    val rdd = sqlContext.sparkContext.parallelize(result.map(Row.fromSeq))
-    workbook.close()
-    rdd
-  }
-
-  private def stringToDouble(value: String): Double = {
-    Try(value.toDouble) match {
-      case Success(d) => d
-      case Failure(_) => Double.NaN
-    }
-  }
-
-  private def castTo(cell: Cell, castType: DataType,dateFormat: SimpleDateFormat,timestampFormat:SimpleDateFormat): Any = {
-    val cellType = cell.getCellTypeEnum
-    if (cellType == CellType.BLANK) {
-      return null
-    }
-
-    lazy val dataFormatter = new DataFormatter()
-    lazy val stringValue =
-      cell.getCellTypeEnum match {
-        case CellType.FORMULA =>
-          cell.getCachedFormulaResultTypeEnum match {
-            case CellType.STRING => cell.getRichStringCellValue.getString
-            case CellType.NUMERIC => cell.getNumericCellValue.toString
-            case _ => dataFormatter.formatCellValue(cell)
-          }
-        case CellType.ERROR =>logger.info(s"解析excel遇到错误公式数据${cell.getStringCellValue},置为空值");""
-        case _ => dataFormatter.formatCellValue(cell)
-      }
-    lazy val numericValue =
-      cell.getCellTypeEnum match {
-        case CellType.NUMERIC => cell.getNumericCellValue
-        case CellType.STRING => stringToDouble(cell.getStringCellValue)
-        case CellType.FORMULA =>
-          cell.getCachedFormulaResultTypeEnum match {
-            case CellType.NUMERIC => cell.getNumericCellValue
-            case CellType.STRING => stringToDouble(cell.getRichStringCellValue.getString)
-          }
-      }
-    lazy val bigDecimal = new BigDecimal(numericValue)
-    castType match {
-      case _: ByteType => numericValue.toByte
-      case _: ShortType => numericValue.toShort
-      case _: IntegerType => numericValue.toInt
-      case _: LongType => numericValue.toLong
-      case _: FloatType => numericValue.toFloat
-      case _: DoubleType => numericValue
-      case _: BooleanType => cell.getBooleanCellValue
-      case _: DecimalType => if (cellType == CellType.STRING && (cell.getStringCellValue == "" || "null".equalsIgnoreCase(cell.getStringCellValue))) null else bigDecimal
-      case _: TimestampType =>
-        cellType match {
-          case CellType.NUMERIC => new Timestamp(DateUtil.getJavaDate(numericValue).getTime)
-          case _ => parseTimestamp(stringValue)
-        }
-      case _: DateType =>
-        if("null".equalsIgnoreCase(cell.getStringCellValue)||StringUtils.isEmpty(cell.getStringCellValue)){
-          null
-        }else{
-          new java.sql.Date(Try(dateFormat.parse(cell.getStringCellValue).getTime).getOrElse(DateUtil.getJavaDate(numericValue).getTime))}
-
-      case _: StringType => stringValue.replaceAll("\n|\t", " ")
-      case t => throw new RuntimeException(s"Unsupported cast from $cell to $t")
-    }
-  }
-
-  private def parseTimestamp(stringValue: String): Timestamp = {
-    timestampParser match {
-      case Some(parser) => new Timestamp(parser.parse(stringValue).getTime)
-      case None => Timestamp.valueOf(stringValue)
-    }
-  }
-
-  private def getSparkType(cell: Option[Cell]): DataType = {
-    cell match {
-      case Some(c) =>
-        c.getCellTypeEnum match {
-          case CellType.FORMULA =>
-            c.getCachedFormulaResultTypeEnum match {
-              case CellType.STRING => StringType
-              case CellType.NUMERIC => DoubleType
-              case _ => NullType
-            }
-          case CellType.STRING if c.getStringCellValue == "" || "null".equalsIgnoreCase(c.getStringCellValue) => NullType
-          case CellType.STRING => StringType
-          case CellType.BOOLEAN => BooleanType
-          case CellType.NUMERIC => if (DateUtil.isCellDateFormatted(c)) TimestampType else DoubleType
-          case CellType.BLANK => NullType
-        }
-      case None => NullType
-    }
-  }
-
-  private def parallelize[T : scala.reflect.ClassTag](seq: Seq[T]): RDD[T] = sqlContext.sparkContext.parallelize(seq)
-
-  /**
-    * Generates a header from the given row which is null-safe and duplicate-safe.
-    */
-  protected def makeSafeHeader(row: Array[String]): Array[String] = {
-    if (useHeader) {
-      val duplicates = {
-        val headerNames = row
-          .filter(_ != null)
-        headerNames.diff(headerNames.distinct).distinct
-      }
-
-      row.zipWithIndex.map {
-        case (value, index) =>
-          if (value == null || value.isEmpty) {
-            // When there are empty strings or the, put the index as the suffix.
-            s"_c$index"
-          } else if (duplicates.contains(value)) {
-            // When there are duplicates, put the index as the suffix.
-            s"$value$index"
-          } else {
-            value
-          }
-      }
-    } else {
-      row.zipWithIndex.map {
-        case (_, index) =>
-          // Uses default column names, "_c#" where # is its position of fields
-          // when header option is disabled.
-          s"_c$index"
-      }
-    }
-  }
-
-  private def inferSchema(): StructType = this.userSchema.getOrElse {
-    val (firstRowWithData, excerpt) = getExcerpt()
-
-    val rawHeader = extractCells(firstRowWithData).map {
-      case Some(value) => value.getStringCellValue
-      case _ => ""
-    }.toArray
-
-    val header = makeSafeHeader(rawHeader)
-
-    val baseSchema = if (this.inferSheetSchema) {
-      val stringsAndCellTypes = excerpt
-        .map(r => extractCells(r).map(getSparkType))
-      InferSchema(parallelize(stringsAndCellTypes), header.toArray)
-    } else {
-      // By default fields are assumed to be StringType
-      val schemaFields = header.map { fieldName =>
-        StructField(fieldName.toString, StringType, nullable = true)
-      }
-      StructType(schemaFields)
-    }
-    if (addColorColumns) {
-      header.foldLeft(baseSchema) { (schema, header) =>
-        schema.add(s"${header}_color", StringType, nullable = true)
-      }
-    } else {
-      baseSchema
-    }
-  }
-}
diff --git a/extensions/spark-excel/src/main/scala/com/webank/wedatasphere/spark/excel/InferSchema.scala b/extensions/spark-excel/src/main/scala/com/webank/wedatasphere/spark/excel/InferSchema.scala
deleted file mode 100644
index cfc2448..0000000
--- a/extensions/spark-excel/src/main/scala/com/webank/wedatasphere/spark/excel/InferSchema.scala
+++ /dev/null
@@ -1,94 +0,0 @@
-package com.webank.wedatasphere.spark.excel
-
-import org.apache.spark.rdd.RDD
-import org.apache.spark.sql.types._
-
-
-private[excel] object InferSchema {
-
-  type CellType = Int
-
-  /**
-    * Similar to the JSON schema inference.
-    * [[org.apache.spark.sql.execution.datasources.json.InferSchema]]
-    *     1. Infer type of each row
-    *     2. Merge row types to find common type
-    *     3. Replace any null types with string type
-    */
-  def apply(rowsRDD: RDD[Seq[DataType]], header: Array[String]): StructType = {
-    val startType: Array[DataType] = Array.fill[DataType](header.length)(NullType)
-    val rootTypes: Array[DataType] = rowsRDD.aggregate(startType)(inferRowType _, mergeRowTypes)
-
-    val structFields = header.zip(rootTypes).map {
-      case (thisHeader, rootType) =>
-        val dType = rootType match {
-          case z: NullType => StringType
-          case other => other
-        }
-        StructField(thisHeader, dType, nullable = true)
-    }
-    StructType(structFields)
-  }
-
-  private def inferRowType(rowSoFar: Array[DataType], next: Seq[DataType]): Array[DataType] = {
-    var i = 0
-    while (i < math.min(rowSoFar.length, next.size)) { // May have columns on right missing.
-      rowSoFar(i) = inferField(rowSoFar(i), next(i))
-      i += 1
-    }
-    rowSoFar
-  }
-
-  private[excel] def mergeRowTypes(first: Array[DataType], second: Array[DataType]): Array[DataType] = {
-    first.zipAll(second, NullType, NullType).map {
-      case ((a, b)) =>
-        findTightestCommonType(a, b).getOrElse(NullType)
-    }
-  }
-
-  /**
-    * Infer type of string field. Given known type Double, and a string "1", there is no
-    * point checking if it is an Int, as the final type must be Double or higher.
-    */
-  private[excel] def inferField(typeSoFar: DataType, field: DataType): DataType = {
-    // Defining a function to return the StringType constant is necessary in order to work around
-    // a Scala compiler issue which leads to runtime incompatibilities with certain Spark versions;
-    // see issue #128 for more details.
-    def stringType(): DataType = {
-      StringType
-    }
-
-    if (field == NullType) {
-      typeSoFar
-    } else {
-      (typeSoFar, field) match {
-        case (NullType, ct) => ct
-        case (DoubleType, DoubleType) => DoubleType
-        case (BooleanType, BooleanType) => BooleanType
-        case (TimestampType, TimestampType) => TimestampType
-        case (StringType, _) => stringType()
-        case (_, _) => stringType()
-      }
-    }
-  }
-
-
-  private val numericPrecedence: IndexedSeq[DataType] =
-    IndexedSeq[DataType](ByteType, ShortType, IntegerType, LongType, FloatType, DoubleType, TimestampType)
-
-
-  val findTightestCommonType: (DataType, DataType) => Option[DataType] = {
-    case (t1, t2) if t1 == t2 => Some(t1)
-    case (NullType, t1) => Some(t1)
-    case (t1, NullType) => Some(t1)
-    case (StringType, t2) => Some(StringType)
-    case (t1, StringType) => Some(StringType)
-
-    // Promote numeric types to the highest of the two and all numeric types to unlimited decimal
-    case (t1, t2) if Seq(t1, t2).forall(numericPrecedence.contains) =>
-      val index = numericPrecedence.lastIndexWhere(t => t == t1 || t == t2)
-      Some(numericPrecedence(index))
-
-    case _ => None
-  }
-}
diff --git a/extensions/spark-excel/src/main/scala/com/webank/wedatasphere/spark/excel/package.scala b/extensions/spark-excel/src/main/scala/com/webank/wedatasphere/spark/excel/package.scala
deleted file mode 100644
index d9e3733..0000000
--- a/extensions/spark-excel/src/main/scala/com/webank/wedatasphere/spark/excel/package.scala
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.webank.wedatasphere.spark
-
-import org.apache.poi.ss.usermodel.Row.MissingCellPolicy
-import org.apache.poi.ss.usermodel.{Cell, Row}
-
-package object excel {
-
-  implicit class RichRow(val row: Row) extends AnyVal {
-
-    def eachCellIterator(startColumn: Int, endColumn: Int): Iterator[Option[Cell]] = new Iterator[Option[Cell]] {
-      private val lastCellInclusive = row.getLastCellNum - 1
-      private val endCol = Math.min(endColumn, Math.max(startColumn, lastCellInclusive))
-      require(startColumn >= 0 && startColumn <= endCol)
-
-      private var nextCol = startColumn
-
-      override def hasNext: Boolean = nextCol <= endCol && nextCol <= lastCellInclusive
-
-      override def next(): Option[Cell] = {
-        val next =
-          if (nextCol > endCol) throw new NoSuchElementException(s"column index = $nextCol")
-          else Option(row.getCell(nextCol, MissingCellPolicy.RETURN_NULL_AND_BLANK))
-        nextCol += 1
-        next
-      }
-    }
-
-  }
-
-}
diff --git a/gateway/core/pom.xml b/gateway/core/pom.xml
deleted file mode 100644
index 0bc8ed2..0000000
--- a/gateway/core/pom.xml
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <artifactId>linkis-gateway-core</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cloudRPC</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.springframework.boot</groupId>
-                    <artifactId>spring-boot-starter-web</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework.boot</groupId>
-                    <artifactId>spring-boot-starter-jetty</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.eclipse.jetty</groupId>
-                    <artifactId>jetty-server</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.eclipse.jetty</groupId>
-                    <artifactId>jetty-webapp</artifactId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>websocket-server</artifactId>
-                    <groupId>org.eclipse.jetty.websocket</groupId>
-                </exclusion>
-                <exclusion>
-                    <groupId>io.netty </groupId>
-                    <artifactId>netty-all</artifactId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>json4s-jackson_2.11</artifactId>
-                    <groupId>org.json4s</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.eclipse.jetty.websocket</groupId>
-            <artifactId>websocket-client</artifactId>
-            <version>${jetty.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.eclipse.jetty.websocket</groupId>
-            <artifactId>websocket-servlet</artifactId>
-            <version>${jetty.version}</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <configuration>
-                    <excludes>
-                        <exclude>**/*.yml</exclude>
-                        <exclude>**/*.properties</exclude>
-                        <exclude>**/*.sh</exclude>
-                    </excludes>
-                    <skip>true</skip>
-                </configuration>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>${basedir}/src/main/resources</directory>
-            </resource>
-        </resources>
-        <finalName>${project.artifactId}-${project.version}</finalName>
-    </build>
-
-</project>
diff --git a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/config/GatewayConfiguration.scala b/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/config/GatewayConfiguration.scala
deleted file mode 100644
index 629ecae..0000000
--- a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/config/GatewayConfiguration.scala
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.config
-
-import com.webank.wedatasphere.linkis.common.conf.CommonVars
-
-/**
-  * created by cooperyang on 2019/5/22.
-  */
-object GatewayConfiguration {
-
-  val ENABLE_PROXY_USER = CommonVars("wds.linkis.gateway.conf.enable.proxy.user", false)
-  val PROXY_USER_CONFIG = CommonVars("wds.linkis.gateway.conf.proxy.user.config", "proxy.properties")
-  val PROXY_USER_SCAN_INTERVAL = CommonVars("wds.linkis.gateway.conf.proxy.user.scan.interval", 1000 * 60 * 10)
-
-  val TOKEN_KEY = "Token-Code"
-  val TOKEN_USER_KEY = "Token-User"
-  val ENABLE_TOKEN_AUTHENTICATION = CommonVars("wds.linkis.gateway.conf.enable.token.auth", false)
-  val TOKEN_AUTHENTICATION_CONFIG = CommonVars("wds.linkis.gateway.conf.token.auth.config", "token.properties")
-  val TOKEN_AUTHENTICATION_SCAN_INTERVAL = CommonVars("wds.linkis.gateway.conf.token.auth.scan.interval", 1000 * 60 * 10)
-
-  val PASS_AUTH_REQUEST_URI = CommonVars("wds.linkis.gateway.conf.url.pass.auth", "/dws/").getValue.split(",")
-
-  val ENABLE_SSO_LOGIN = CommonVars("wds.linkis.gateway.conf.enable.sso", false)
-  val SSO_INTERCEPTOR_CLASS = CommonVars("wds.linkis.gateway.conf.sso.interceptor", "")
-
-  val ADMIN_USER = CommonVars("wds.linkis.gateway.admin.user", "hadoop")
-
-  val USERCONTROL_SWITCH_ON = CommonVars("wds.linkis.gateway.usercontrol_switch_on", false)
-
-//  val PROXY_USER_LIST = CommonVars("wds.linkis.gateway.conf.proxy.user.list", "").getValue.split(",")
-
-  /**
-    * QUERY_PERSISTENCE_SPRING_APPLICATION_NAME is the name of the application that represents the query module in springcloud
-    * QUERY_PERSISTENCE_SPRING_APPLICATION_NAME 是表示usercontrol模块在springcloud中的应用名称
-    */
-  val USERCONTROL_SPRING_APPLICATION_NAME = CommonVars("wds.linkis.query.application.name", "cloud-usercontrol")
-}
diff --git a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/config/GatewaySpringConfiguration.scala b/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/config/GatewaySpringConfiguration.scala
deleted file mode 100644
index 9bf633c..0000000
--- a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/config/GatewaySpringConfiguration.scala
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.config
-
-import com.webank.wedatasphere.linkis.common.conf.CommonVars
-import com.webank.wedatasphere.linkis.gateway.security._
-import javax.annotation.PostConstruct
-import org.springframework.beans.factory.annotation.Autowired
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
-import org.springframework.context.annotation.{Bean, Configuration}
-
-/**
-  * created by cooperyang on 2019/1/9.
-  */
-@Configuration
-class GatewaySpringConfiguration {
-
-  @Autowired
-  private var userRestful: UserRestful = _
-
-  @PostConstruct
-  def init(): Unit = {
-    SecurityFilter.setUserRestful(userRestful)
-  }
-
-//  @Bean(Array("defaultGatewayParser"))
-//  @ConditionalOnMissingBean
-//  @Autowired(required = false)
-//  def createGatewayParser(gatewayParsers: Array[GatewayParser]): DefaultGatewayParser =
-//    new DefaultGatewayParser(gatewayParsers)
-//
-//  @Bean(Array("defaultGatewayRouter"))
-//  @ConditionalOnMissingBean
-//  def createGatewayRouter(): DefaultGatewayParser = new DefaultGatewayRouter
-
-  @Bean(Array("userRestful"))
-  @ConditionalOnMissingBean
-  @Autowired(required = false)
-  def createUserRestful(securityHooks: Array[SecurityHook]): UserRestful = {
-    val userRestful = new LDAPUserRestful
-    if(securityHooks != null) userRestful.setSecurityHooks(securityHooks)
-    userRestful
-  }
-
-}
diff --git a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/exception/GatewayErrorException.scala b/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/exception/GatewayErrorException.scala
deleted file mode 100644
index c13219c..0000000
--- a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/exception/GatewayErrorException.scala
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.exception
-
-import com.webank.wedatasphere.linkis.common.exception.{ErrorException, WarnException}
-
-/**
-  * created by cooperyang on 2019/1/9.
-  */
-class GatewayErrorException(errorCode: Int, message: String) extends ErrorException(errorCode, message)
-
-class GatewayWarnException(errorCode: Int, message: String) extends WarnException(errorCode, message)
\ No newline at end of file
diff --git a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/exception/TooManyServiceException.scala b/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/exception/TooManyServiceException.scala
deleted file mode 100644
index 2a1eca4..0000000
--- a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/exception/TooManyServiceException.scala
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.exception
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException
-
-/**
-  * created by cooperyang on 2019/1/9.
-  */
-class TooManyServiceException(message: String) extends ErrorException(11010, message)
diff --git a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/http/GatewayContext.scala b/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/http/GatewayContext.scala
deleted file mode 100644
index 092ece9..0000000
--- a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/http/GatewayContext.scala
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.http
-
-import java.util
-
-import com.webank.wedatasphere.linkis.server.JMap
-
-/**
-  * created by cooperyang on 2019/1/9.
-  */
-trait GatewayContext {
-
-  def getRequest: GatewayHttpRequest
-  def setRequest(request: GatewayHttpRequest): Unit
-  def getResponse: GatewayHttpResponse
-  def setResponse(response: GatewayHttpResponse): Unit
-
-  def setWebSocketRequest(): Unit
-  def isWebSocketRequest: Boolean
-
-  def setGatewayRoute(gatewayRoute: GatewayRoute): Unit
-  def getGatewayRoute: GatewayRoute
-
-  def getParams: JMap[String, String]
-}
-class BaseGatewayContext extends GatewayContext {
-  private var request: GatewayHttpRequest = _
-  private var response: GatewayHttpResponse = _
-  private var webSocketRequest: Boolean = false
-  private var gatewayRoute: GatewayRoute = _
-
-  private val props: JMap[String, String] = new util.HashMap[String, String]()
-
-  override def getRequest: GatewayHttpRequest = request
-
-  override def setRequest(request: GatewayHttpRequest): Unit = this.request = request
-
-  override def getResponse: GatewayHttpResponse = response
-
-  override def setResponse(response: GatewayHttpResponse): Unit = this.response = response
-
-  override def setWebSocketRequest(): Unit = this.webSocketRequest = true
-
-  override def isWebSocketRequest: Boolean = webSocketRequest
-
-  override def setGatewayRoute(gatewayRoute: GatewayRoute): Unit = this.gatewayRoute = gatewayRoute
-
-  override def getGatewayRoute: GatewayRoute = gatewayRoute
-
-  override def getParams: JMap[String, String] = this.props
-}
\ No newline at end of file
diff --git a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/http/GatewayHttpRequest.scala b/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/http/GatewayHttpRequest.scala
deleted file mode 100644
index 104de05..0000000
--- a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/http/GatewayHttpRequest.scala
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.http
-
-import java.net.{InetSocketAddress, URI}
-
-import com.webank.wedatasphere.linkis.server.JMap
-import javax.servlet.http.Cookie
-
-/**
-  * created by cooperyang on 2019/1/9.
-  */
-trait GatewayHttpRequest {
-
-  def getRequestURI: String
-
-  def getURI: URI
-
-  def getHeaders: JMap[String, Array[String]]
-
-  def addHeader(headerName: String, headers: Array[String]): Unit
-
-  def getQueryParams: JMap[String, Array[String]]
-
-  def addCookie(cookieName: String, cookies: Array[Cookie]): Unit
-
-  def getCookies: JMap[String, Array[Cookie]]
-
-  def getRemoteAddress: InetSocketAddress
-
-  def getMethod: String
-
-  def getRequestBody: String
-
-}
diff --git a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/http/GatewayHttpResponse.scala b/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/http/GatewayHttpResponse.scala
deleted file mode 100644
index c448da8..0000000
--- a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/http/GatewayHttpResponse.scala
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.http
-
-import javax.servlet.http.Cookie
-
-/**
-  * created by cooperyang on 2019/1/9.
-  */
-trait GatewayHttpResponse {
-
-  def addCookie(cookie: Cookie): Unit
-
-  def setHeader(key: String, value: String): Unit
-
-  def setStatus(status: Int): Unit
-
-  def write(message: String): Unit
-
-  def writeWebSocket(message: String): Unit
-
-  def redirectTo(url: String): Unit
-
-  def sendResponse(): Unit
-
-  def isCommitted: Boolean
-
-}
diff --git a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/http/GatewayRoute.scala b/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/http/GatewayRoute.scala
deleted file mode 100644
index 97ae0c2..0000000
--- a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/http/GatewayRoute.scala
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.http
-
-import com.webank.wedatasphere.linkis.common.ServiceInstance
-import com.webank.wedatasphere.linkis.server.JMap
-
-/**
-  * created by cooperyang on 2019/1/9.
-  */
-class GatewayRoute {
-
-  private var requestURI: String = _
-  private var serviceInstance: ServiceInstance = _
-  private var params: JMap[String, String] = new JMap[String, String]
-
-  def setRequestURI(requestURI: String):Unit = this.requestURI = requestURI
-  def getRequestURI:String = requestURI
-  def setServiceInstance(serviceInstance: ServiceInstance):Unit = this.serviceInstance = serviceInstance
-  def getServiceInstance:ServiceInstance = serviceInstance
-  def setParams(params: JMap[String, String]):Unit = this.params = params
-  def getParams:JMap[String, String] = params
-}
diff --git a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/parser/GatewayParser.scala b/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/parser/GatewayParser.scala
deleted file mode 100644
index 36c5b18..0000000
--- a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/parser/GatewayParser.scala
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.parser
-
-import com.webank.wedatasphere.linkis.DataWorkCloudApplication
-import com.webank.wedatasphere.linkis.common.ServiceInstance
-import com.webank.wedatasphere.linkis.common.utils.Logging
-import com.webank.wedatasphere.linkis.gateway.http.{GatewayContext, GatewayRoute}
-import com.webank.wedatasphere.linkis.rpc.conf.RPCConfiguration
-import com.webank.wedatasphere.linkis.rpc.interceptor.ServiceInstanceUtils
-import com.webank.wedatasphere.linkis.server.Message
-import com.webank.wedatasphere.linkis.server.conf.ServerConfiguration
-import org.apache.commons.lang.StringUtils
-
-/**
-  * created by cooperyang on 2019/1/9.
-  */
-trait GatewayParser {
-
-  def shouldContainRequestBody(gatewayContext: GatewayContext): Boolean
-
-  def parse(gatewayContext: GatewayContext): Unit
-
-}
-abstract class AbstractGatewayParser extends GatewayParser with Logging {
-
-  protected def sendResponseWhenNotMatchVersion(gatewayContext: GatewayContext, version: String): Boolean = if(version != ServerConfiguration.BDP_SERVER_VERSION) {
-    warn(s"Version not match. The gateway(${ServerConfiguration.BDP_SERVER_VERSION}) not support requestUri ${gatewayContext.getRequest.getRequestURI} from remoteAddress ${gatewayContext.getRequest.getRemoteAddress.getAddress.getHostAddress}.")
-    sendErrorResponse(s"The gateway${ServerConfiguration.BDP_SERVER_VERSION} not support version $version.", gatewayContext)
-    true
-  } else false
-
-  protected def sendErrorResponse(errorMsg: String, gatewayContext: GatewayContext): Unit = sendMessageResponse(Message.error(errorMsg), gatewayContext)
-
-  protected def sendMessageResponse(dataMsg: Message, gatewayContext: GatewayContext): Unit = {
-    gatewayContext.setGatewayRoute(new GatewayRoute)
-    gatewayContext.getGatewayRoute.setRequestURI(gatewayContext.getRequest.getRequestURI)
-    dataMsg << gatewayContext.getRequest.getRequestURI
-    if(dataMsg.getStatus != 0) warn(dataMsg.getMessage)
-    if(gatewayContext.isWebSocketRequest) gatewayContext.getResponse.writeWebSocket(dataMsg)
-    else gatewayContext.getResponse.write(dataMsg)
-    gatewayContext.getResponse.sendResponse()
-  }
-
-  /**
-    * Return to the gateway list information(返回gateway列表信息)
-    */
-  protected def responseHeartbeat(gatewayContext: GatewayContext): Unit = {
-    val gatewayServiceInstances = ServiceInstanceUtils.getRPCServerLoader.getServiceInstances(DataWorkCloudApplication.getApplicationName)
-    val msg = Message.ok("Gateway heartbeat ok!").data("gatewayList", gatewayServiceInstances.map(_.getInstance)).data("isHealthy", true)
-    sendMessageResponse(msg, gatewayContext)
-  }
-}
-object AbstractGatewayParser {
-  val GATEWAY_HEART_BEAT_URL = Array("gateway", "heartbeat")
-}
-class DefaultGatewayParser(gatewayParsers: Array[GatewayParser]) extends AbstractGatewayParser {
-
-  private val COMMON_REGEX = "/api/rest_[a-zA-Z]+/(v\\d+)/([^/]+)/.+".r
-  private val CLIENT_HEARTBEAT_REGEX = s"/api/rest_[a-zA-Z]+/(v\\d+)/${AbstractGatewayParser.GATEWAY_HEART_BEAT_URL.mkString("/")}".r
-
-  override def shouldContainRequestBody(gatewayContext: GatewayContext): Boolean = gatewayContext.getRequest.getMethod.toUpperCase != "GET" &&
-    (gatewayContext.getRequest.getRequestURI match {
-    case uri if uri.startsWith(ServerConfiguration.BDP_SERVER_USER_URI.getValue) => true
-    case _ => gatewayParsers.exists(_.shouldContainRequestBody(gatewayContext))
-  })
-
-  override def parse(gatewayContext: GatewayContext): Unit = {
-    val path = gatewayContext.getRequest.getRequestURI
-    if(gatewayContext.getGatewayRoute == null) {
-      gatewayContext.setGatewayRoute(new GatewayRoute)
-      gatewayContext.getGatewayRoute.setRequestURI(path)
-    }
-    gatewayParsers.foreach(_.parse(gatewayContext))
-    if(gatewayContext.getGatewayRoute.getServiceInstance == null) path match {
-      case CLIENT_HEARTBEAT_REGEX(version) =>
-        if(sendResponseWhenNotMatchVersion(gatewayContext, version)) return
-        info(gatewayContext.getRequest.getRemoteAddress + " try to heartbeat.")
-        responseHeartbeat(gatewayContext)
-      case COMMON_REGEX(version, serviceId) =>
-        if(sendResponseWhenNotMatchVersion(gatewayContext, version)) return
-        val applicationName = if(RPCConfiguration.ENABLE_PUBLIC_SERVICE.getValue && RPCConfiguration.PUBLIC_SERVICE_LIST.contains(serviceId))
-          RPCConfiguration.PUBLIC_SERVICE_APPLICATION_NAME.getValue else serviceId
-        gatewayContext.getGatewayRoute.setServiceInstance(ServiceInstance(applicationName, null))
-      case p if p.startsWith("/dws/") =>
-        //TODO add version support
-        val params = gatewayContext.getGatewayRoute.getParams
-        params.put("proxyId", "dws")
-        val secondaryProxyId = StringUtils.substringBetween(p, "/dws/", "/")
-        if(StringUtils.isNotBlank(secondaryProxyId)){
-          params.put("proxyId", "dws/" + secondaryProxyId)
-        }
-        gatewayContext.getGatewayRoute.setParams(params)
-      case _ =>
-        sendErrorResponse(s"Cannot find a service to deal $path, ignore it.", gatewayContext)
-    }
-  }
-}
\ No newline at end of file
diff --git a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/route/GatewayRouter.scala b/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/route/GatewayRouter.scala
deleted file mode 100644
index d4ce0ae..0000000
--- a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/route/GatewayRouter.scala
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.route
-
-import com.webank.wedatasphere.linkis.common.ServiceInstance
-import com.webank.wedatasphere.linkis.common.utils.{Logging, Utils}
-import com.webank.wedatasphere.linkis.gateway.exception.TooManyServiceException
-import com.webank.wedatasphere.linkis.gateway.http.GatewayContext
-import com.webank.wedatasphere.linkis.rpc.interceptor.ServiceInstanceUtils
-import com.webank.wedatasphere.linkis.rpc.sender.SpringCloudFeignConfigurationCache
-import com.webank.wedatasphere.linkis.server.Message
-import com.webank.wedatasphere.linkis.server.exception.NoApplicationExistsException
-import org.apache.commons.lang.StringUtils
-import org.apache.commons.lang.exception.ExceptionUtils
-
-/**
-  * created by cooperyang on 2019/1/9.
-  */
-trait GatewayRouter {
-
-  def route(gatewayContext: GatewayContext): ServiceInstance
-
-}
-abstract class AbstractGatewayRouter extends GatewayRouter with Logging {
-  import scala.collection.JavaConversions._
-  protected def findAndRefreshIfNotExists(serviceId: String, findService: => Option[String]): Option[String] = {
-    var service = findService
-    if(service.isEmpty) {
-      val applicationNotExists = new NoApplicationExistsException(10050, "Application " +
-        serviceId + " is not exists any instances.")
-      Utils.tryThrow(Utils.waitUntil(() =>{
-        ServiceInstanceUtils.refreshServiceInstances()
-        service = findService
-        service.nonEmpty
-      }, ServiceInstanceUtils.serviceRefreshMaxWaitTime(), 500, 2000)){ t =>
-        warn(s"Need a random $serviceId instance, but no one can find in Discovery refresh.", t)
-        applicationNotExists.initCause(t)
-        applicationNotExists
-      }
-    }
-    service
-  }
-  protected def findService(parsedServiceId: String, tooManyDeal: List[String] => Option[String]): Option[String] = {
-    val services = SpringCloudFeignConfigurationCache.getDiscoveryClient
-      .getServices.filter(_.toLowerCase.contains(parsedServiceId.toLowerCase)).toList
-    if(services.length == 1) Some(services.head)
-    else if(services.length > 1) tooManyDeal(services)
-    else None
-  }
-}
-
-class DefaultGatewayRouter(gatewayRouters: Array[GatewayRouter]) extends AbstractGatewayRouter{
-
-  private def findCommonService(parsedServiceId: String) = findService(parsedServiceId, services => {
-    val errorMsg = new TooManyServiceException(s"Cannot find a correct serviceId for parsedServiceId $parsedServiceId, service list is: " + services)
-    warn("", errorMsg)
-    throw errorMsg
-  })
-
-  protected def findReallyService(gatewayContext: GatewayContext): ServiceInstance = {
-    var serviceInstance: ServiceInstance = null
-    for (router <- gatewayRouters if serviceInstance == null) {
-      serviceInstance = router.route(gatewayContext)
-    }
-    if(serviceInstance == null) serviceInstance = gatewayContext.getGatewayRoute.getServiceInstance
-    val service = findAndRefreshIfNotExists(serviceInstance.getApplicationName,
-      findCommonService(serviceInstance.getApplicationName))
-    service.map { applicationName =>
-      if(StringUtils.isNotBlank(serviceInstance.getInstance)) {
-        val _serviceInstance = ServiceInstance(applicationName, serviceInstance.getInstance)
-        ServiceInstanceUtils.getRPCServerLoader.getOrRefreshServiceInstance(_serviceInstance)
-        _serviceInstance
-      } else ServiceInstance(applicationName, null)
-    }.get
-  }
-  override def route(gatewayContext: GatewayContext): ServiceInstance = if(gatewayContext.getGatewayRoute.getServiceInstance != null) {
-    val parsedService = gatewayContext.getGatewayRoute.getServiceInstance.getApplicationName
-    val serviceInstance = Utils.tryCatch(findReallyService(gatewayContext)){ t =>
-      val message = Message.error(ExceptionUtils.getRootCauseMessage(t)) << gatewayContext.getRequest.getRequestURI
-      message.data("data", gatewayContext.getRequest.getRequestBody)
-      warn("", t)
-      if(gatewayContext.isWebSocketRequest) gatewayContext.getResponse.writeWebSocket(message) else gatewayContext.getResponse.write(message)
-      gatewayContext.getResponse.sendResponse()
-      return null
-    }
-    info("GatewayRouter route requestUri " + gatewayContext.getGatewayRoute.getRequestURI + " with parsedService " + parsedService + " to " + serviceInstance)
-    serviceInstance
-  } else null
-}
\ No newline at end of file
diff --git a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/security/GatewaySSOUtils.scala b/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/security/GatewaySSOUtils.scala
deleted file mode 100644
index 08dd795..0000000
--- a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/security/GatewaySSOUtils.scala
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.security
-
-import com.webank.wedatasphere.linkis.common.utils.{Logging, Utils}
-import com.webank.wedatasphere.linkis.gateway.http.{GatewayContext, GatewayHttpRequest}
-import com.webank.wedatasphere.linkis.server.exception.LoginExpireException
-import com.webank.wedatasphere.linkis.server.security.SecurityFilter._
-import com.webank.wedatasphere.linkis.server.security.{SSOUtils, ServerSSOUtils}
-import javax.servlet.http.Cookie
-
-import scala.collection.JavaConversions._
-
-/**
-  * created by cooperyang on 2019/1/9.
-  */
-object GatewaySSOUtils extends Logging {
-  private def getCookies(gatewayContext: GatewayContext): Array[Cookie] = gatewayContext.getRequest.getCookies.flatMap(_._2).toArray
-  def getLoginUser(gatewayContext: GatewayContext): Option[String] = {
-    val cookies = getCookies(gatewayContext)
-    Utils.tryCatch(SSOUtils.getLoginUser(cookies)) {
-      case _: LoginExpireException if Option(cookies).exists(_.exists(c => c.getName == ALLOW_ACCESS_WITHOUT_TIMEOUT && c.getValue == "true")) =>
-        ServerSSOUtils.getLoginUserIgnoreTimeout(key => Option(cookies).flatMap(_.find(_.getName == key).map(_.getValue))).filter(_ != OTHER_SYSTEM_IGNORE_UM_USER)
-      case t => throw t
-    }
-  }
-  def getLoginUsername(gatewayContext: GatewayContext): String = SSOUtils.getLoginUsername(getCookies(gatewayContext))
-  def setLoginUser(gatewayContext: GatewayContext, username: String): Unit = {
-    val proxyUser = ProxyUserUtils.getProxyUser(username)
-    SSOUtils.setLoginUser(c => gatewayContext.getResponse.addCookie(c), proxyUser)
-  }
-  def setLoginUser(request: GatewayHttpRequest, username: String): Unit = {
-    val proxyUser = ProxyUserUtils.getProxyUser(username)
-    SSOUtils.setLoginUser(c => request.addCookie(c.getName, Array(c)), proxyUser)
-  }
-  def removeLoginUser(gatewayContext: GatewayContext): Unit = {
-    SSOUtils.removeLoginUser(gatewayContext.getRequest.getCookies.flatMap(_._2).toArray)
-    SSOUtils.removeLoginUserByAddCookie(c => gatewayContext.getResponse.addCookie(c))
-  }
-  def updateLastAccessTime(gatewayContext: GatewayContext): Unit = SSOUtils.updateLastAccessTime(gatewayContext.getRequest.getCookies.flatMap(_._2).toArray)
-}
diff --git a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/security/LDAPUserRestful.scala b/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/security/LDAPUserRestful.scala
deleted file mode 100644
index 0c88e61..0000000
--- a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/security/LDAPUserRestful.scala
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.security
-
-import com.webank.wedatasphere.linkis.common.utils.{LDAPUtils, Logging, Utils}
-import com.webank.wedatasphere.linkis.gateway.http.GatewayContext
-import com.webank.wedatasphere.linkis.server._
-
-/**
-  * created by cooperyang on 2019/1/9.
-  */
-class LDAPUserRestful extends UserPwdAbstractUserRestful with Logging {
-
-  override def login(userName: String, password: String): Message = Utils.tryCatch{
-    LDAPUtils.login(userName.toString, password.toString)
-    "login successful(登录成功)!".data("userName", userName).data("isAdmin", false)
-  }{ t =>
-    warn("wrong user name or password(用户名或密码错误)!", t)
-    Message.error("wrong user name or password(用户名或密码错误)!")
-  }
-
-  override def register(gatewayContext: GatewayContext): Message = {
-    Message.error("please implements the register method(请自行实现注册方法)")
-  }
-
-}
\ No newline at end of file
diff --git a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/security/ProxyUserUtils.scala b/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/security/ProxyUserUtils.scala
deleted file mode 100644
index c223ebe..0000000
--- a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/security/ProxyUserUtils.scala
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.security
-
-import java.util.Properties
-import java.util.concurrent.TimeUnit
-
-import com.webank.wedatasphere.linkis.common.utils.{Logging, Utils}
-import com.webank.wedatasphere.linkis.gateway.config.GatewayConfiguration._
-import org.apache.commons.lang.StringUtils
-
-object ProxyUserUtils extends Logging {
-
-  private val props = new Properties
-  if(ENABLE_PROXY_USER.getValue){
-    Utils.defaultScheduler.scheduleAtFixedRate(new Runnable {
-      override def run(): Unit = {
-        info("loading proxy users.")
-        val newProps = new Properties
-        newProps.load(this.getClass.getResourceAsStream(PROXY_USER_CONFIG.getValue))
-        props.clear()
-        props.putAll(newProps)
-      }
-    }, 0, PROXY_USER_SCAN_INTERVAL.getValue, TimeUnit.MILLISECONDS)
-  }
-
-  def getProxyUser(umUser: String): String = if(ENABLE_PROXY_USER.getValue) {
-    val proxyUser = props.getProperty(umUser)
-    if(StringUtils.isBlank(proxyUser)) umUser else {
-      info(s"switched to proxy user $proxyUser for umUser $umUser.")
-      proxyUser
-    }
-  } else umUser
-
-}
diff --git a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/security/SecurityFilter.scala b/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/security/SecurityFilter.scala
deleted file mode 100644
index 0011fb8..0000000
--- a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/security/SecurityFilter.scala
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.security
-
-import java.text.DateFormat
-import java.util.{Date, Locale}
-
-import com.webank.wedatasphere.linkis.common.conf.Configuration
-import com.webank.wedatasphere.linkis.common.exception.DWCException
-import com.webank.wedatasphere.linkis.common.utils.Utils
-import com.webank.wedatasphere.linkis.gateway.config.GatewayConfiguration
-import com.webank.wedatasphere.linkis.gateway.http.GatewayContext
-import com.webank.wedatasphere.linkis.gateway.security.sso.SSOInterceptor
-import com.webank.wedatasphere.linkis.gateway.security.token.TokenAuthentication
-import com.webank.wedatasphere.linkis.server.conf.ServerConfiguration
-import com.webank.wedatasphere.linkis.server.exception.{LoginExpireException, NonLoginException}
-import com.webank.wedatasphere.linkis.server.{Message, validateFailed}
-import org.apache.commons.lang.StringUtils
-import org.apache.commons.lang.exception.ExceptionUtils
-
-/**
-  * created by cooperyang on 2019/1/9.
-  */
-object SecurityFilter {
-
-  private val refererValidate = ServerConfiguration.BDP_SERVER_SECURITY_REFERER_VALIDATE.getValue
-  private val localAddress = ServerConfiguration.BDP_SERVER_ADDRESS.getValue
-  protected val testUser: String = ServerConfiguration.BDP_TEST_USER.getValue
-
-  private var userRestful: UserRestful = _
-  def setUserRestful(userRestful: UserRestful): Unit = this.userRestful = userRestful
-
-  def filterResponse(gatewayContext: GatewayContext, message: Message): Unit = {
-    gatewayContext.getResponse.setStatus(Message.messageToHttpStatus(message))
-    gatewayContext.getResponse.write(message)
-    gatewayContext.getResponse.sendResponse()
-  }
-
-  def doFilter(gatewayContext: GatewayContext): Boolean = {
-    addAccessHeaders(gatewayContext)
-    if(refererValidate) {
-      //Security certification support, referer limited(安全认证支持,referer限定)
-      val referer = gatewayContext.getRequest.getHeaders.get("Referer")
-      if(referer != null && referer.nonEmpty && StringUtils.isNotEmpty(referer.head) && !referer.head.trim.contains(localAddress)) {
-        filterResponse(gatewayContext, validateFailed("Unallowed cross-site request(不允许的跨站请求)!"))
-        return false
-      }
-      //Security certification support, solving verb tampering(安全认证支持,解决动词篡改)
-      gatewayContext.getRequest.getMethod.toUpperCase match {
-        case "GET" | "POST" | "PUT" | "DELETE" | "HEAD" | "TRACE" | "CONNECT" | "OPTIONS" =>
-        case _ =>
-          filterResponse(gatewayContext, validateFailed("Do not use HTTP verbs to tamper with(不可使用HTTP动词篡改)!"))
-          return false
-      }
-    }
-    val isPassAuthRequest = GatewayConfiguration.PASS_AUTH_REQUEST_URI.exists(gatewayContext.getRequest.getRequestURI.startsWith)
-    if(gatewayContext.getRequest.getRequestURI.startsWith(ServerConfiguration.BDP_SERVER_USER_URI.getValue)) {
-      Utils.tryCatch(userRestful.doUserRequest(gatewayContext)){ t =>
-        val message = t match {
-          case dwc: DWCException => dwc.getMessage
-          case _ => "login failed! reason: " + ExceptionUtils.getRootCauseMessage(t)
-        }
-        GatewaySSOUtils.error("login failed!", t)
-        filterResponse(gatewayContext, Message.error(message).<<(gatewayContext.getRequest.getRequestURI))
-      }
-      false
-    } else if(isPassAuthRequest && !GatewayConfiguration.ENABLE_SSO_LOGIN.getValue) {
-      GatewaySSOUtils.info("No login needed for proxy uri: " + gatewayContext.getRequest.getRequestURI)
-      true
-    } else if(TokenAuthentication.isTokenRequest(gatewayContext)) {
-      TokenAuthentication.tokenAuth(gatewayContext)
-    } else {
-      val userName = Utils.tryCatch(GatewaySSOUtils.getLoginUser(gatewayContext)){
-        case n @ (_: NonLoginException | _: LoginExpireException )=>
-          if(Configuration.IS_TEST_MODE.getValue) None else {
-            filterResponse(gatewayContext, Message.noLogin(n.getMessage) << gatewayContext.getRequest.getRequestURI)
-            return false
-          }
-        case t: Throwable =>
-          GatewaySSOUtils.warn("", t)
-          throw t
-      }
-      if(userName.isDefined) {
-        true
-      } else if(Configuration.IS_TEST_MODE.getValue) {
-        GatewaySSOUtils.info("test mode! login for uri: " + gatewayContext.getRequest.getRequestURI)
-        GatewaySSOUtils.setLoginUser(gatewayContext, testUser)
-        true
-      } else if(GatewayConfiguration.ENABLE_SSO_LOGIN.getValue) {
-        val user = SSOInterceptor.getSSOInterceptor.getUser(gatewayContext)
-        if(StringUtils.isNotBlank(user)) {
-          GatewaySSOUtils.setLoginUser(gatewayContext, user)
-          GatewaySSOUtils.setLoginUser(gatewayContext.getRequest, user)
-          true
-        } else if(isPassAuthRequest) {
-          gatewayContext.getResponse.redirectTo(SSOInterceptor.getSSOInterceptor.redirectTo(gatewayContext.getRequest.getURI))
-          gatewayContext.getResponse.sendResponse()
-          false
-        } else {
-          filterResponse(gatewayContext, Message.noLogin("You are not logged in, please login first(您尚未登录,请先登录)!")
-            .data("enableSSO", true).data("SSOURL", SSOInterceptor.getSSOInterceptor.redirectTo(gatewayContext.getRequest.getURI)) << gatewayContext.getRequest.getRequestURI)
-          false
-        }
-      } else {
-        filterResponse(gatewayContext, Message.noLogin("You are not logged in, please login first(您尚未登录,请先登录)!") << gatewayContext.getRequest.getRequestURI)
-        false
-      }
-    }
-  }
-
-  protected def addAccessHeaders(gatewayContext: GatewayContext) {
-    val response = gatewayContext.getResponse
-    response.setHeader("Access-Control-Allow-Origin", "*")
-    response.setHeader("Access-Control-Allow-Credentials", "true")
-    response.setHeader("Access-Control-Allow-Headers", "authorization,Content-Type")
-    response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, HEAD, DELETE")
-    val fullDateFormatEN = DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL, new Locale("EN", "en"))
-    response.setHeader("Date", fullDateFormatEN.format(new Date))
-  }
-
-}
diff --git a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/security/UserRestful.scala b/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/security/UserRestful.scala
deleted file mode 100644
index d01b9db..0000000
--- a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/security/UserRestful.scala
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.security
-
-import com.google.gson.Gson
-import com.webank.wedatasphere.linkis.common.utils.{Logging, RSAUtils, Utils}
-import com.webank.wedatasphere.linkis.gateway.config.GatewayConfiguration
-import com.webank.wedatasphere.linkis.gateway.http.GatewayContext
-import com.webank.wedatasphere.linkis.gateway.security.sso.SSOInterceptor
-import com.webank.wedatasphere.linkis.protocol.usercontrol.{RequestLogin, RequestRegister, ResponseLogin, ResponseRegister}
-import com.webank.wedatasphere.linkis.rpc.Sender
-import com.webank.wedatasphere.linkis.server.conf.ServerConfiguration
-import com.webank.wedatasphere.linkis.server.security.SSOUtils
-import com.webank.wedatasphere.linkis.server.{Message, _}
-import org.apache.commons.lang.StringUtils
-
-/**
-  * created by cooperyang on 2019/1/9.
-  */
-trait UserRestful {
-
-  def doUserRequest(gatewayContext: GatewayContext): Unit
-
-}
-abstract class AbstractUserRestful extends UserRestful with Logging {
-
-  private var securityHooks: Array[SecurityHook] = Array.empty
-
-  def setSecurityHooks(securityHooks: Array[SecurityHook]): Unit = this.securityHooks = securityHooks
-
-  private val userRegex = {
-    var userURI = ServerConfiguration.BDP_SERVER_USER_URI.getValue
-    if(!userURI.endsWith("/")) userURI += "/"
-    userURI
-  }
-
-  override def doUserRequest(gatewayContext: GatewayContext): Unit = {
-    val path = gatewayContext.getRequest.getRequestURI.replace(userRegex, "")
-    val message = path match {
-      case "register" => register(gatewayContext)
-      case "login" =>
-        Utils.tryCatch {
-          val loginUser = GatewaySSOUtils.getLoginUsername(gatewayContext)
-          Message.error(loginUser + "Already logged in, please log out before signing in(已经登录,请先退出再进行登录)!").data("redirectToIndex", true)
-        }(_ => login(gatewayContext))
-      case "logout" => logout(gatewayContext)
-      case "userInfo" => userInfo(gatewayContext)
-      case "publicKey" => publicKey(gatewayContext)
-      case "heartbeat" => heartbeat(gatewayContext)
-      case _ =>
-        warn(s"Unknown request URI" + path)
-        Message.error("unknown request URI " + path)
-    }
-    gatewayContext.getResponse.write(message)
-    gatewayContext.getResponse.setStatus(Message.messageToHttpStatus(message))
-    gatewayContext.getResponse.sendResponse()
-  }
-
-  def login(gatewayContext: GatewayContext): Message = {
-    val message = tryLogin(gatewayContext)
-    if(securityHooks != null) securityHooks.foreach(_.postLogin(gatewayContext))
-    message
-  }
-
-  def register(gatewayContext: GatewayContext): Message = {
-    val message = tryRegister(gatewayContext)
-    message
-  }
-
-  protected def tryLogin(context: GatewayContext): Message
-
-  def logout(gatewayContext: GatewayContext): Message = {
-    GatewaySSOUtils.removeLoginUser(gatewayContext)
-    if(GatewayConfiguration.ENABLE_SSO_LOGIN.getValue) SSOInterceptor.getSSOInterceptor.logout(gatewayContext)
-    if(securityHooks != null) securityHooks.foreach(_.preLogout(gatewayContext))
-    "Logout successful(退出登录成功)!"
-  }
-
-  def userInfo(gatewayContext: GatewayContext): Message = {
-    "get user information succeed!".data("userName", GatewaySSOUtils.getLoginUsername(gatewayContext))
-  }
-
-  def publicKey(gatewayContext: GatewayContext): Message = {
-    val message = Message.ok("Gain success(获取成功)!").data("enable", SSOUtils.sslEnable)
-    if(SSOUtils.sslEnable) message.data("publicKey", RSAUtils.getDefaultPublicKey())
-    message
-  }
-
-  def heartbeat(gatewayContext: GatewayContext): Message = Utils.tryCatch {
-    GatewaySSOUtils.getLoginUsername(gatewayContext)
-    "Maintain heartbeat success(维系心跳成功)!"
-  }(t => Message.noLogin(t.getMessage))
-
-  protected def tryRegister(context: GatewayContext): Message
-}
-abstract class UserPwdAbstractUserRestful extends AbstractUserRestful with Logging{
-
-  private val sender: Sender = Sender.getSender(GatewayConfiguration.USERCONTROL_SPRING_APPLICATION_NAME.getValue)
-  private val LINE_DELIMITER = "</br>"
-
-  override protected def tryLogin(gatewayContext: GatewayContext): Message = {
-    val userNameArray = gatewayContext.getRequest.getQueryParams.get("userName")
-    val passwordArray = gatewayContext.getRequest.getQueryParams.get("password")
-    val (userName, password) = if(userNameArray != null && userNameArray.nonEmpty &&
-      passwordArray != null && passwordArray.nonEmpty)
-      (userNameArray.head, passwordArray.head)
-    else if(StringUtils.isNotBlank(gatewayContext.getRequest.getRequestBody)){
-      val json = BDPJettyServerHelper.gson.fromJson(gatewayContext.getRequest.getRequestBody, classOf[java.util.Map[String, Object]])
-      (json.get("userName"), json.get("password"))
-    } else (null, null)
-    if(userName == null || StringUtils.isBlank(userName.toString)) {
-      Message.error("Username can not be empty(用户名不能为空)!")
-    } else if(password == null || StringUtils.isBlank(password.toString)) {
-      Message.error("Password can not be blank(密码不能为空)!")
-    } else {
-      //warn: For easy to useing linkis,Admin skip login
-      if(GatewayConfiguration.ADMIN_USER.getValue.equals(userName.toString) && userName.toString.equals(password.toString)){
-          GatewaySSOUtils.setLoginUser(gatewayContext, userName.toString)
-          "login successful(登录成功)!".data("userName", userName)
-            .data("isAdmin", true)
-      } else {
-        // firstly for test user
-        var message = Message.ok()
-        if (GatewayConfiguration.USERCONTROL_SWITCH_ON.getValue) {
-          message = userControlLogin(userName.toString, password.toString, gatewayContext)
-        } else {
-          // standard login
-          val lowerCaseUserName = userName.toString.toLowerCase
-          message = login(lowerCaseUserName, password.toString)
-          if(message.getStatus == 0) GatewaySSOUtils.setLoginUser(gatewayContext, lowerCaseUserName)
-        }
-        if (message.getData.containsKey("errmsg")) {
-          message.setMessage(message.getMessage + LINE_DELIMITER + message.getData.get("errmsg").toString)
-        }
-        message
-      }
-    }
-  }
-
-  protected def login(userName: String, password: String): Message
-
-  protected def register(gatewayContext: GatewayContext) : Message
-
-  def userControlLogin(userName: String, password: String, gatewayContext: GatewayContext): Message = {
-    var message = Message.ok()
-    // usercontrol switch on(开启了用户控制开关)
-          val requestLogin = new RequestLogin
-    requestLogin.setUserName(userName.toString).setPassword(password.toString)
-          Utils.tryCatch(sender.ask(requestLogin) match {
-            case r: ResponseLogin =>
-              message.setStatus(r.getStatus)
-              if (StringUtils.isNotBlank(r.getErrMsg)) {
-                message.data("errmsg", r.getErrMsg)
-              }
-              if (0 == r.getStatus) {
-                GatewaySSOUtils.setLoginUser(gatewayContext, userName.toString)
-                message.setStatus(0)
-                message.setMessage("Login successful(登录成功)")
-              } else {
-                message = Message.error("Invalid username or password, please check and try again later(用户名或密码无效,请稍后再试)")
-              }
-          }) {
-      t => {
-              warn(s"Login rpc request error, err message ", t)
-              message.setStatus(1)
-              message.setMessage("System error, please try again later(系统异常,请稍后再试)")
-              message.data("errmsg", t.getMessage)
-          }
-        }
-        message
-      }
-
-  override def tryRegister(gatewayContext: GatewayContext): Message = {
-    var message = Message.ok()
-    if (GatewayConfiguration.USERCONTROL_SWITCH_ON.getValue) {
-      message = userControlRegister(gatewayContext)
-    } else {
-      // TODO use normal register only when it's implemented(仅当实现了通用注册,才可以调注册接口)
-      message = register(gatewayContext)
-  }
-    message
-  }
-
-  /**
-    * userControl register(用户控制模块登录)
-    * @param gatewayContext
-    * @return
-    */
-  private def userControlRegister(gatewayContext: GatewayContext): Message = {
-    val message = Message.ok()
-    val gson = new Gson
-    val requestRegister = new RequestRegister
-    val requestBody: String = gatewayContext.getRequest.getRequestBody
-    Utils.tryCatch({
-      requestRegister.setParams(requestBody)
-      sender.ask(requestRegister) match {
-        case r: ResponseRegister =>
-          message.setStatus(r.getStatus)
-          message.setMessage(r.getMessage)
-          var map = r.getData
-          message.setData(map)
-          message.setMethod(r.getMethod)
-          info(s"Register rpc success. requestRegister=" + gson.toJson(requestRegister) + ", response=" + gson.toJson(r))
-        }
-    }) {
-      e =>
-       warn(s"Register rpc request error. err message ", e)
-        message.setStatus(1)
-        message.setMessage("System, please try again later(系统异常,请稍后再试)")
-    }
-    if (message.getData.containsKey("errmsg")) {
-      // for frontend display
-      message.setMessage(message.getMessage + LINE_DELIMITER + message.getData.get("errmsg").toString)
-    }
-    message
-  }
-}
\ No newline at end of file
diff --git a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/security/sso/SSOInterceptor.scala b/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/security/sso/SSOInterceptor.scala
deleted file mode 100644
index 5e50654..0000000
--- a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/security/sso/SSOInterceptor.scala
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.webank.wedatasphere.linkis.gateway.security.sso
-
-import java.net.URI
-
-import com.webank.wedatasphere.linkis.DataWorkCloudApplication
-import com.webank.wedatasphere.linkis.common.utils.ClassUtils
-import com.webank.wedatasphere.linkis.gateway.config.GatewayConfiguration
-import com.webank.wedatasphere.linkis.gateway.http.GatewayContext
-
-trait SSOInterceptor {
-
-  /**
-    * 如果打开SSO单点登录功能,当前端跳转SSO登录页面登录成功后,前端再次转发请求给gateway。
-    * 用户需实现该接口,通过Request返回user
-    * @param gatewayContext
-    * @return
-    */
-  def getUser(gatewayContext: GatewayContext): String
-
-  /**
-    * 通过前端的requestUrl,用户传回一个可跳转的SSO登录页面URL。
-    * 要求:需带上原请求URL,以便登录成功后能跳转回来
-    * @param requestUrl
-    * @return
-    */
-  def redirectTo(requestUrl: URI): String
-
-  /**
-    * gateway退出时,会调用此接口,以保证gateway清除cookie后,SSO单点登录也会把登录信息清除掉
-    * @param gatewayContext
-    */
-  def logout(gatewayContext: GatewayContext): Unit
-
-}
-object SSOInterceptor {
-  import scala.collection.JavaConversions._
-  private var interceptor: SSOInterceptor = _
-  def getSSOInterceptor: SSOInterceptor = if(interceptor != null) interceptor else {
-    val ssoInterceptors = DataWorkCloudApplication.getApplicationContext.getBeansOfType(classOf[SSOInterceptor])
-    if(ssoInterceptors != null && !ssoInterceptors.isEmpty) {
-      interceptor = ssoInterceptors.head._2
-    } else {
-      interceptor = ClassUtils.getClassInstance(GatewayConfiguration.SSO_INTERCEPTOR_CLASS.getValue)
-    }
-    interceptor
-  }
-}
\ No newline at end of file
diff --git a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/security/token/TokenAuthentication.scala b/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/security/token/TokenAuthentication.scala
deleted file mode 100644
index 6c2b135..0000000
--- a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/gateway/security/token/TokenAuthentication.scala
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.security.token
-
-import java.io.File
-import java.util.Properties
-import java.util.concurrent.TimeUnit
-
-import com.webank.wedatasphere.linkis.common.utils.{Logging, Utils}
-import com.webank.wedatasphere.linkis.gateway.config.GatewayConfiguration._
-import com.webank.wedatasphere.linkis.gateway.http.GatewayContext
-import com.webank.wedatasphere.linkis.gateway.security.{GatewaySSOUtils, SecurityFilter}
-import com.webank.wedatasphere.linkis.server.Message
-import org.apache.commons.io.{FileUtils, IOUtils}
-import org.apache.commons.lang.StringUtils
-
-/**
-  * created by enjoyyin on 2019/10/4.
-  */
-object TokenAuthentication extends Logging {
-
-  private val (props, file) = if(ENABLE_TOKEN_AUTHENTICATION.getValue)
-    (new Properties, new File(this.getClass.getClassLoader.getResource(TOKEN_AUTHENTICATION_CONFIG.getValue).toURI.getPath))
-  else (null, null)
-  private var lastModified = 0l
-
-  if(ENABLE_TOKEN_AUTHENTICATION.getValue) {
-    Utils.defaultScheduler.scheduleAtFixedRate(new Runnable {
-      override def run(): Unit = Utils.tryAndError(init())
-    }, TOKEN_AUTHENTICATION_SCAN_INTERVAL.getValue, TOKEN_AUTHENTICATION_SCAN_INTERVAL.getValue, TimeUnit.MILLISECONDS)
-    init()
-  }
-
-  private def init(): Unit = if(file.lastModified() > lastModified) {
-    lastModified = file.lastModified()
-    info(s"loading token authentication file $file.")
-    val newProps = new Properties
-    val input = FileUtils.openInputStream(file)
-    Utils.tryFinally(newProps.load(input))(IOUtils.closeQuietly(input))
-    props.putAll(newProps)
-  }
-
-  private def validateTokenUser(token: String, tokenUser: String): Boolean = {
-    val tokenUsers = props.getProperty(token)
-    if(tokenUsers == "*" || (StringUtils.isNotBlank(tokenUsers) && tokenUsers.contains(tokenUser))) true
-    else false
-  }
-
-  def isTokenRequest(gatewayContext: GatewayContext) : Boolean = {
-    (gatewayContext.getRequest.getHeaders.containsKey(TOKEN_KEY) &&
-      gatewayContext.getRequest.getHeaders.containsKey(TOKEN_USER_KEY)) || (
-      gatewayContext.getRequest.getCookies.containsKey(TOKEN_KEY) &&
-        gatewayContext.getRequest.getCookies.containsKey(TOKEN_USER_KEY))
-  }
-
-  def tokenAuth(gatewayContext: GatewayContext): Boolean = {
-    if(!ENABLE_TOKEN_AUTHENTICATION.getValue) {
-      val message = Message.noLogin(s"Gateway未启用token认证,请采用其他认证方式!") << gatewayContext.getRequest.getRequestURI
-      SecurityFilter.filterResponse(gatewayContext, message)
-      return false
-    }
-    var token = "";
-    var tokenUser = "";
-    val requestHeaders = gatewayContext.getRequest.getHeaders
-    if (requestHeaders.containsKey(TOKEN_KEY) && requestHeaders.containsKey(TOKEN_USER_KEY)) {
-      token = requestHeaders.get(TOKEN_KEY)(0)
-      tokenUser = requestHeaders.get(TOKEN_USER_KEY)(0)
-    }
-    if(StringUtils.isBlank(token) || StringUtils.isBlank(tokenUser)) {
-      val cookies = gatewayContext.getRequest.getCookies
-      if (cookies.containsKey(TOKEN_KEY) && cookies.containsKey(TOKEN_USER_KEY)) {
-        token = cookies.get(TOKEN_KEY)(0).getValue
-        tokenUser = cookies.get(TOKEN_USER_KEY)(0).getValue
-      }
-      if(StringUtils.isBlank(token) || StringUtils.isBlank(tokenUser)) {
-        val message = Message.noLogin(s"请在Header或Cookie中同时指定$TOKEN_KEY 和 $TOKEN_USER_KEY,以便完成token认证!") << gatewayContext.getRequest.getRequestURI
-        SecurityFilter.filterResponse(gatewayContext, message)
-        return false
-      }
-    }
-    if(validateTokenUser(token, tokenUser)){
-      info(s"Token authentication succeed, uri: ${gatewayContext.getRequest.getRequestURI}, token: $token, tokenUser: $tokenUser.")
-      GatewaySSOUtils.setLoginUser(gatewayContext.getRequest, tokenUser)
-      true
-    } else {
-      val message = Message.noLogin(s"未授权的token$token,无法将请求绑定给tokenUser$tokenUser!") << gatewayContext.getRequest.getRequestURI
-      SecurityFilter.filterResponse(gatewayContext, message)
-      false
-    }
-  }
-
-}
\ No newline at end of file
diff --git a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/rpc/interceptor/ServiceInstanceUtils.scala b/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/rpc/interceptor/ServiceInstanceUtils.scala
deleted file mode 100644
index 9f89d60..0000000
--- a/gateway/core/src/main/scala/com/webank/wedatasphere/linkis/rpc/interceptor/ServiceInstanceUtils.scala
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.rpc.interceptor
-
-import java.util.concurrent.TimeUnit
-
-import com.webank.wedatasphere.linkis.rpc.RPCSpringBeanCache
-
-import scala.concurrent.duration.Duration
-
-/**
-  * created by cooperyang on 2019/1/9.
-  */
-object ServiceInstanceUtils {
-
-  def getRPCServerLoader: RPCServerLoader = RPCSpringBeanCache.getRPCServerLoader
-  def refreshServiceInstances(): Unit = getRPCServerLoader match {
-    case loader: AbstractRPCServerLoader => loader.refreshAllServers()
-    case _ =>
-  }
-  def serviceRefreshMaxWaitTime(): Duration = getRPCServerLoader match {
-    case loader: AbstractRPCServerLoader => loader.refreshMaxWaitTime
-    case _ => Duration(5, TimeUnit.SECONDS)
-  }
-}
diff --git a/gateway/gateway-httpclient-support/pom.xml b/gateway/gateway-httpclient-support/pom.xml
deleted file mode 100644
index 65f64e5..0000000
--- a/gateway/gateway-httpclient-support/pom.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <artifactId>linkis-gateway-httpclient-support</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-httpclient</artifactId>
-            </dependency>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-storage</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>commons-beanutils</groupId>
-            <artifactId>commons-beanutils</artifactId>
-            <version>1.9.4</version>
-        </dependency>
-        <dependency>
-            <groupId>org.reflections</groupId>
-            <artifactId>reflections</artifactId>
-            <version>0.9.10</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-source-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>attach-sources</id>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>${basedir}/src/main/resources</directory>
-            </resource>
-        </resources>
-        <finalName>${project.artifactId}-${project.version}</finalName>
-    </build>
-
-</project>
\ No newline at end of file
diff --git a/gateway/gateway-httpclient-support/src/main/java/com/webank/wedatasphere/linkis/httpclient/dws/annotation/DWSHttpMessageResult.java b/gateway/gateway-httpclient-support/src/main/java/com/webank/wedatasphere/linkis/httpclient/dws/annotation/DWSHttpMessageResult.java
deleted file mode 100644
index e0b1f66..0000000
--- a/gateway/gateway-httpclient-support/src/main/java/com/webank/wedatasphere/linkis/httpclient/dws/annotation/DWSHttpMessageResult.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * created by cooperyang on 2019/07/24.
- */
-
-package com.webank.wedatasphere.linkis.httpclient.dws.annotation;
-
-import java.lang.annotation.*;
-
-/**
- * created by cooperyang on 2019/5/20.
- */
-@Target({ElementType.TYPE, ElementType.ANNOTATION_TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-public @interface DWSHttpMessageResult {
-    /**
-     * Open with [[com.webank.wedatasphere.linkis.common.Message]], specify the method of Message, support regular expressions
-     * 与[[com.webank.wedatasphere.linkis.common.Message]]打通,指定Message的method,支持正则表达式
-     */
-    String value();
-}
\ No newline at end of file
diff --git a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/DWSHttpClient.scala b/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/DWSHttpClient.scala
deleted file mode 100644
index d36005c..0000000
--- a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/DWSHttpClient.scala
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * created by cooperyang on 2019/07/24.
- */
-
-package com.webank.wedatasphere.linkis.httpclient.dws
-
-import java.text.SimpleDateFormat
-import java.util
-
-import com.fasterxml.jackson.databind.ObjectMapper
-import com.webank.wedatasphere.linkis.common.io.{Fs, FsPath}
-import com.webank.wedatasphere.linkis.httpclient.AbstractHttpClient
-import com.webank.wedatasphere.linkis.httpclient.discovery.Discovery
-import com.webank.wedatasphere.linkis.httpclient.dws.config.DWSClientConfig
-import com.webank.wedatasphere.linkis.httpclient.dws.discovery.DWSGatewayDiscovery
-import com.webank.wedatasphere.linkis.httpclient.dws.request.DWSHttpAction
-import com.webank.wedatasphere.linkis.httpclient.dws.response.{DWSHttpMessageFactory, DWSHttpMessageResultInfo, DWSResult}
-import com.webank.wedatasphere.linkis.httpclient.request.HttpAction
-import com.webank.wedatasphere.linkis.httpclient.response.{HttpResult, ListResult, Result}
-import com.webank.wedatasphere.linkis.storage.FSFactory
-import org.apache.commons.beanutils.BeanUtils
-import org.apache.commons.lang.ClassUtils
-import org.apache.http.HttpResponse
-
-import scala.collection.JavaConversions.mapAsJavaMap
-
-/**
-  * created by cooperyang on 2019/5/20.
-  */
-class DWSHttpClient(clientConfig: DWSClientConfig, clientName: String)
-  extends AbstractHttpClient(clientConfig, clientName) {
-
-  override protected def createDiscovery(): Discovery = new DWSGatewayDiscovery
-
-
-  override protected def prepareAction(requestAction: HttpAction): HttpAction = {
-    requestAction match {
-      case dwsAction: DWSHttpAction => dwsAction.setDWSVersion(clientConfig.getDWSVersion)
-      case _ =>
-    }
-    requestAction
-  }
-
-  override protected def httpResponseToResult(response: HttpResponse, requestAction: HttpAction, responseBody: String): Option[Result] = {
-    var entity = response.getEntity
-    val statusCode: Int = response.getStatusLine.getStatusCode
-    val url: String = requestAction.getURL
-    val contentType: String = entity.getContentType.getValue
-    DWSHttpMessageFactory.getDWSHttpMessageResult(url).map { case DWSHttpMessageResultInfo(_, clazz) =>
-      clazz match {
-        case c if ClassUtils.isAssignable(c, classOf[DWSResult]) =>
-          val dwsResult = clazz.getConstructor().newInstance().asInstanceOf[DWSResult]
-          dwsResult.set(responseBody, statusCode, url, contentType)
-          BeanUtils.populate(dwsResult, dwsResult.getData)
-          return Some(dwsResult)
-        case _ =>
-      }
-
-      def transfer(value: Result, map: Map[String, Object]): Unit = {
-        value match {
-          case httpResult: HttpResult =>
-            httpResult.set(responseBody, statusCode, url, contentType)
-          case _ =>
-        }
-        val javaMap = mapAsJavaMap(map)
-        BeanUtils.populate(value, javaMap)
-        fillResultFields(javaMap, value)
-      }
-      deserializeResponseBody(response) match {
-        case map: Map[String, Object] =>
-          val value = clazz.getConstructor().newInstance().asInstanceOf[Result]
-          transfer(value, map)
-          value
-        case list: List[Map[String, Object]] =>
-          val results = list.map { map =>
-            val value = clazz.getConstructor().newInstance().asInstanceOf[Result]
-            transfer(value, map)
-            value
-          }.toArray
-          new ListResult(responseBody, results)
-      }
-    }.orElse(nonDWSResponseToResult(response, requestAction))
-  }
-
-  protected def nonDWSResponseToResult(response: HttpResponse, requestAction: HttpAction): Option[Result] = None
-
-  protected def fillResultFields(responseMap: util.Map[String, Object], value: Result): Unit = {}
-
-  //TODO Consistent with workspace, plus expiration time(与workspace保持一致,加上过期时间)
-  override protected def getFsByUser(user: String, path: FsPath): Fs = FSFactory.getFsByProxyUser(path, user)
-
-}
-object DWSHttpClient {
-  val jacksonJson = new ObjectMapper().setDateFormat(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"))
-}
\ No newline at end of file
diff --git a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/authentication/StaticAuthenticationStrategy.scala b/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/authentication/StaticAuthenticationStrategy.scala
deleted file mode 100644
index 129a2a0..0000000
--- a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/authentication/StaticAuthenticationStrategy.scala
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.httpclient.dws.authentication
-
-import com.webank.wedatasphere.linkis.common.utils.ByteTimeUtils
-import com.webank.wedatasphere.linkis.httpclient.authentication.{AbstractAuthenticationStrategy, AuthenticationAction, AuthenticationResult}
-import com.webank.wedatasphere.linkis.httpclient.dws.exception.AuthenticationFailedException
-import com.webank.wedatasphere.linkis.httpclient.dws.request.DWSAuthenticationAction
-import com.webank.wedatasphere.linkis.httpclient.dws.response.DWSAuthenticationResult
-import com.webank.wedatasphere.linkis.httpclient.request.{Action, UserAction, UserPwdAction}
-import org.apache.commons.lang.StringUtils
-import org.apache.http.HttpResponse
-
-/**
-  * created by cooperyang on 2019/5/22.
-  */
-class StaticAuthenticationStrategy(override protected val sessionMaxAliveTime: Long) extends AbstractAuthenticationStrategy {
-   def this() = this(ByteTimeUtils.timeStringAsMs("2h"))
-
-  override protected def getAuthenticationAction(requestAction: Action, serverUrl: String): AuthenticationAction = {
-    val action = new DWSAuthenticationAction(serverUrl)
-    def pwd: String = if(StringUtils.isNotBlank(getClientConfig.getAuthTokenValue)) getClientConfig.getAuthTokenValue
-      else throw new AuthenticationFailedException("the value of authTokenValue in ClientConfig must be exists, since no password is found to login.")
-    requestAction match {
-      case userPwd: UserPwdAction =>
-        action.addRequestPayload("userName", userPwd.getUser)
-        action.addRequestPayload("password", userPwd.getPassword.getOrElse(pwd))
-      case userAction: UserAction =>
-        action.addRequestPayload("userName", userAction.getUser)
-        action.addRequestPayload("password", pwd)
-      case _ =>
-        if(StringUtils.isBlank(getClientConfig.getAuthTokenKey))
-          throw new AuthenticationFailedException("the value of authTokenKey in ClientConfig must be exists, since no user is found to login.")
-        action.addRequestPayload("userName", getClientConfig.getAuthTokenKey)
-        action.addRequestPayload("password", pwd)
-    }
-    action
-  }
-
-  override def getAuthenticationResult(response: HttpResponse, requestAction: AuthenticationAction): AuthenticationResult = {
-    new DWSAuthenticationResult(response, requestAction.serverUrl)
-  }
-}
\ No newline at end of file
diff --git a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/authentication/TokenAuthenticationStrategy.scala b/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/authentication/TokenAuthenticationStrategy.scala
deleted file mode 100644
index 061bcc2..0000000
--- a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/authentication/TokenAuthenticationStrategy.scala
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.httpclient.dws.authentication
-
-import java.util
-
-import com.webank.wedatasphere.linkis.httpclient.authentication._
-import com.webank.wedatasphere.linkis.httpclient.dws.exception.AuthenticationFailedException
-import com.webank.wedatasphere.linkis.httpclient.request.{Action, UserAction}
-import org.apache.http.HttpResponse
-import org.apache.http.cookie.Cookie
-
-/**
-  * Created by enjoyyin on 2019/10/4.
-  */
-class TokenAuthenticationStrategy(override protected val sessionMaxAliveTime: Long) extends AbstractAuthenticationStrategy {
-
-  def this() = this(-1)
-
-  override def login(requestAction: Action, serverUrl: String): Authentication = requestAction match {
-    case _: AuthenticationAction => null
-    case action: UserAction => new HttpAuthentication {
-      import TokenAuthenticationStrategy._
-
-      import scala.collection.JavaConversions._
-      override def authToCookies: Array[Cookie] = Array.empty
-
-      override def authToHeaders: util.Map[String, String] = Map(TOKEN_USER_KEY -> action.getUser, TOKEN_KEY -> getClientConfig.getAuthTokenValue)
-
-      override def authToMap: util.Map[String, String] = new util.HashMap[String, String]()
-
-      override def getLastAccessTime: Long = System.currentTimeMillis
-
-      override def updateLastAccessTime(): Unit = {}
-    }
-    case _ => throw new AuthenticationFailedException("cannot use token authentication, since no user is found to proxy.")
-  }
-
-  override protected def getAuthenticationAction(requestAction: Action, serverUrl: String): AuthenticationAction = null
-
-  override def getAuthenticationResult(response: HttpResponse, requestAction: AuthenticationAction): AuthenticationResult = null
-
-}
-object TokenAuthenticationStrategy {
-  val TOKEN_USER_KEY = "Token-User"
-  val TOKEN_KEY = "Token-Code"
-}
\ No newline at end of file
diff --git a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/config/DWSClientConfig.scala b/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/config/DWSClientConfig.scala
deleted file mode 100644
index d3f14a0..0000000
--- a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/config/DWSClientConfig.scala
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.httpclient.dws.config
-
-import com.webank.wedatasphere.linkis.common.utils.RetryHandler
-import com.webank.wedatasphere.linkis.httpclient.authentication.AuthenticationStrategy
-import com.webank.wedatasphere.linkis.httpclient.config.ClientConfig
-import com.webank.wedatasphere.linkis.httpclient.loadbalancer.LoadBalancerStrategy
-
-import scala.concurrent.duration.TimeUnit
-
-/**
-  * created by cooperyang on 2019/5/27.
-  */
-class DWSClientConfig private[config](serverUrl: String, discoveryEnabled: Boolean, discoveryPeriod: Long, discoveryTimeUnit: TimeUnit,
-                                       loadbalancerEnabled: Boolean, loadbalancerStrategy: LoadBalancerStrategy, authenticationStrategy: AuthenticationStrategy,
-                                       connectTimeout: Long, readTimeout: Long, maxConnection: Int, retryEnabled: Boolean, retryHandler: RetryHandler,
-                                       authTokenKey: String, authTokenValue: String) extends ClientConfig(serverUrl, discoveryEnabled, discoveryPeriod,
-  discoveryTimeUnit, loadbalancerEnabled, loadbalancerStrategy, authenticationStrategy, connectTimeout, readTimeout, maxConnection, retryEnabled,
-  retryHandler, authTokenKey, authTokenValue) {
-
-  def this(clientConfig: ClientConfig) = this(clientConfig.getServerUrl, clientConfig.isDiscoveryEnabled, clientConfig.getDiscoveryPeriod,
-    clientConfig.getDiscoveryTimeUnit, clientConfig.isLoadbalancerEnabled, clientConfig.getLoadbalancerStrategy,
-    clientConfig.getAuthenticationStrategy, clientConfig.getConnectTimeout, clientConfig.getReadTimeout,
-    clientConfig.getMaxConnection, clientConfig.isRetryEnabled, clientConfig.getRetryHandler,
-    clientConfig.getAuthTokenKey, clientConfig.getAuthTokenValue)
-
-  private var dwsVersion: String = _
-
-  def setDWSVersion(dwsVersion: String): Unit = this.dwsVersion = dwsVersion
-  def getDWSVersion: String = dwsVersion
-
-}
diff --git a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/config/DWSClientConfigBuilder.scala b/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/config/DWSClientConfigBuilder.scala
deleted file mode 100644
index 2498b8e..0000000
--- a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/config/DWSClientConfigBuilder.scala
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.httpclient.dws.config
-
-import com.webank.wedatasphere.linkis.httpclient.config.ClientConfigBuilder
-import com.webank.wedatasphere.linkis.httpclient.dws.exception.UnknownVersionException
-import org.apache.commons.lang.StringUtils
-
-/**
-  * created by cooperyang on 2019/5/27.
-  */
-class DWSClientConfigBuilder private() extends ClientConfigBuilder {
-
-  private var dwsVersion: String = _
-
-  def setDWSVersion(dwsVersion: String): this.type = {
-    this.dwsVersion = dwsVersion
-    this
-  }
-
-  override def build(): DWSClientConfig = {
-    if(StringUtils.isBlank(dwsVersion)) throw new UnknownVersionException
-    val clientConfig = new DWSClientConfig(super.build())
-    clientConfig.setDWSVersion(dwsVersion)
-    clientConfig
-  }
-}
-object DWSClientConfigBuilder {
-  def newBuilder(): DWSClientConfigBuilder = new DWSClientConfigBuilder
-}
\ No newline at end of file
diff --git a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/discovery/DWSGatewayDiscovery.scala b/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/discovery/DWSGatewayDiscovery.scala
deleted file mode 100644
index bb77b5b..0000000
--- a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/discovery/DWSGatewayDiscovery.scala
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * created by cooperyang on 2019/07/24.
- */
-
-package com.webank.wedatasphere.linkis.httpclient.dws.discovery
-
-import com.webank.wedatasphere.linkis.httpclient.discovery.{AbstractDiscovery, HeartbeatAction, HeartbeatResult}
-import com.webank.wedatasphere.linkis.httpclient.dws.request.DWSHeartbeatAction
-import com.webank.wedatasphere.linkis.httpclient.dws.response.DWSHeartbeatResult
-import org.apache.http.HttpResponse
-
-import scala.util.Random
-
-/**
-  * created by cooperyang on 2019/5/22.
-  */
-class DWSGatewayDiscovery extends AbstractDiscovery {
-
-  override protected def discovery(): Array[String] = {
-    val serverUrl = if(getServerInstances.isEmpty) getServerUrl
-      else Random.shuffle(getServerInstances.toList).head
-    info("discovery to gateway " + serverUrl)
-    getClient.execute(getHeartbeatAction(serverUrl)) match {
-      case dws: DWSHeartbeatResult => dws.getGatewayList
-    }
-  }
-
-  override protected def getHeartbeatAction(serverUrl: String): HeartbeatAction = new DWSHeartbeatAction(serverUrl)
-
-  override def getHeartbeatResult(response: HttpResponse, requestAction: HeartbeatAction): HeartbeatResult = requestAction match {
-    case h: DWSHeartbeatAction => new DWSHeartbeatResult(response, h.serverUrl)
-  }
-}
diff --git a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/exception/AuthenticationFailedException.scala b/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/exception/AuthenticationFailedException.scala
deleted file mode 100644
index 1e00939..0000000
--- a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/exception/AuthenticationFailedException.scala
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.httpclient.dws.exception
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException
-
-/**
-  * created by cooperyang on 2019/5/23.
-  */
-class AuthenticationFailedException(errorDesc: String) extends ErrorException(10901, errorDesc)
diff --git a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/exception/UnknownVersionException.scala b/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/exception/UnknownVersionException.scala
deleted file mode 100644
index 095fb36..0000000
--- a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/exception/UnknownVersionException.scala
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.httpclient.dws.exception
-
-import com.webank.wedatasphere.linkis.common.exception.ErrorException
-
-/**
-  * created by cooperyang on 2019/5/27.
-  */
-class UnknownVersionException extends ErrorException(10901, "ClientConfig must specify the DWS version(ClientConfig必须指定DWS版本)!")
\ No newline at end of file
diff --git a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/request/AbstractAuthenticationAction.scala b/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/request/AbstractAuthenticationAction.scala
deleted file mode 100644
index f19cb9f..0000000
--- a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/request/AbstractAuthenticationAction.scala
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.httpclient.dws.request
-
-import com.webank.wedatasphere.linkis.httpclient.authentication.AuthenticationAction
-import com.webank.wedatasphere.linkis.httpclient.dws.DWSHttpClient
-import com.webank.wedatasphere.linkis.httpclient.request.POSTAction
-
-/**
-  * created by cooperyang on 2019/5/22.
-  */
-abstract class AbstractAuthenticationAction(override val serverUrl: String) extends POSTAction with AuthenticationAction {
-  private var user: String = _
-  private var password: String = _
-
-  override def setPassword(password: String): Unit = this.password = password
-
-  override def getPassword: Option[String] = Option(password)
-
-  override def getRequestBody: String = ""
-
-  override def setUser(user: String): Unit = this.user = user
-
-  override def getUser: String = user
-
-  override def getRequestPayload: String = DWSHttpClient.jacksonJson.writeValueAsString(getRequestPayloads)
-}
-
-class DWSAuthenticationAction(override val serverUrl: String) extends AbstractAuthenticationAction(serverUrl) with DWSHttpAction {
-  override def suffixURLs: Array[String] = Array("user", "login")
-}
\ No newline at end of file
diff --git a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/request/DWSHeartbeatAction.scala b/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/request/DWSHeartbeatAction.scala
deleted file mode 100644
index 19212fd..0000000
--- a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/request/DWSHeartbeatAction.scala
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.httpclient.dws.request
-
-import com.webank.wedatasphere.linkis.httpclient.discovery.HeartbeatAction
-import com.webank.wedatasphere.linkis.httpclient.request.GetAction
-
-/**
-  * created by cooperyang on 2019/5/22.
-  */
-class DWSHeartbeatAction(override val serverUrl: String) extends GetAction with DWSHttpAction with HeartbeatAction {
-  override def getRequestBody: String = ""
-
-  override def suffixURLs: Array[String] = Array("gateway", "heartbeat")
-}
diff --git a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/request/DWSHttpAction.scala b/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/request/DWSHttpAction.scala
deleted file mode 100644
index 6880867..0000000
--- a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/request/DWSHttpAction.scala
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * created by cooperyang on 2019/07/24.
- */
-
-package com.webank.wedatasphere.linkis.httpclient.dws.request
-
-import com.webank.wedatasphere.linkis.httpclient.dws.request.RestType.RestType
-
-/**
-  * created by cooperyang on 2019/5/16.
-  */
-trait DWSHttpAction {
-
-  private var dwsVersion: String = _
-
-  def setDWSVersion(dwsVersion: String): Unit = this.dwsVersion = dwsVersion
-
-  def getPrefixURL: String = "/api/" + getRestType + "/" + dwsVersion
-
-  protected def getRestType: RestType = RestType.JERSEY
-
-  def suffixURLs: Array[String]
-
-  def getURL: String = getPrefixURL + "/" + suffixURLs.mkString("/")
-
-}
\ No newline at end of file
diff --git a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/request/RestType.scala b/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/request/RestType.scala
deleted file mode 100644
index 82a73e4..0000000
--- a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/request/RestType.scala
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * created by cooperyang on 2019/07/24.
- */
-
-package com.webank.wedatasphere.linkis.httpclient.dws.request
-
-/**
-  * created by cooperyang on 2019/5/16.
-  */
-object RestType extends Enumeration {
-  type RestType = Value
-  val JERSEY = Value(1, "rest_j")
-  val SPRING = Value(2, "rest_s")
-}
diff --git a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/response/DWSAuthenticationResult.scala b/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/response/DWSAuthenticationResult.scala
deleted file mode 100644
index bc2c479..0000000
--- a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/response/DWSAuthenticationResult.scala
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.httpclient.dws.response
-
-import java.util
-
-import com.webank.wedatasphere.linkis.httpclient.authentication.{Authentication, AuthenticationResult, HttpAuthentication}
-import com.webank.wedatasphere.linkis.httpclient.exception.HttpMessageParseException
-import org.apache.http.HttpResponse
-import org.apache.http.cookie.Cookie
-import org.apache.http.util.EntityUtils
-
-/**
-  * created by cooperyang on 2019/5/22.
-  */
-class DWSAuthenticationResult(response: HttpResponse, serverUrl: String) extends AuthenticationResult with DWSResult {
-
-  setResponse()
-
-  private def setResponse(): Unit = {
-    val entity = response.getEntity
-    val responseBody: String = if (entity != null) {
-      EntityUtils.toString(entity, "UTF-8")
-    } else {
-      null
-    }
-    val statusCode: Int = response.getStatusLine.getStatusCode
-    val url: String = serverUrl
-    val contentType: String = entity.getContentType.getValue
-    set(responseBody, statusCode, url, contentType)
-  }
-
-
-  override def getAuthentication: Authentication = if (getStatus == 0) new HttpAuthentication {
-    private var lastAccessTime: Long = System.currentTimeMillis
-
-    override def authToCookies: Array[Cookie] = Array.empty
-
-    override def authToHeaders: util.Map[String, String] = new util.HashMap[String, String]()
-
-    override def authToMap: util.Map[String, String] = new util.HashMap[String, String]()
-
-    override def getLastAccessTime: Long = lastAccessTime
-
-    override def updateLastAccessTime(): Unit = lastAccessTime = System.currentTimeMillis
-  } else throw new HttpMessageParseException(s"login to gateway $serverUrl failed! Reason: " + getMessage)
-
-
-}
diff --git a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/response/DWSHeartbeatResult.scala b/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/response/DWSHeartbeatResult.scala
deleted file mode 100644
index 4030a5a..0000000
--- a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/response/DWSHeartbeatResult.scala
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.httpclient.dws.response
-
-import java.util
-
-import com.webank.wedatasphere.linkis.httpclient.discovery.HeartbeatResult
-import org.apache.http.HttpResponse
-import org.apache.http.util.EntityUtils
-
-/**
-  * created by cooperyang on 2019/5/22.
-  */
-class DWSHeartbeatResult(response: HttpResponse, serverUrl: String) extends HeartbeatResult with DWSResult {
-
-
-  setResponse()
-
-  private def setResponse(): Unit = {
-    val entity = response.getEntity
-    val responseBody: String = if (entity != null) {
-      EntityUtils.toString(entity, "UTF-8")
-    } else {
-      null
-    }
-    val statusCode: Int = response.getStatusLine.getStatusCode
-    val url: String = serverUrl
-    val contentType: String = entity.getContentType.getValue
-    set(responseBody, statusCode, url, contentType)
-  }
-
-
-  if (getStatus != 0) warn(s"heartbeat to gateway $serverUrl failed! message: $getMessage.")
-  override val isHealthy: Boolean = getData.get("isHealthy") match {
-    case b: java.lang.Boolean => b
-    case s if s != null => s.toString.toBoolean
-    case _ => false
-  }
-
-  def getGatewayList: Array[String] = getData.get("gatewayList") match {
-    case l: util.List[String] => l.toArray(new Array[String](l.size())).map("http://" + _)
-    case array: Array[String] => array.map("http://" + _)
-    case _ => Array.empty
-  }
-
-}
diff --git a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/response/DWSHttpMessageFactory.scala b/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/response/DWSHttpMessageFactory.scala
deleted file mode 100644
index b0e2c12..0000000
--- a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/response/DWSHttpMessageFactory.scala
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * created by cooperyang on 2019/07/24.
- */
-
-package com.webank.wedatasphere.linkis.httpclient.dws.response
-
-import com.webank.wedatasphere.linkis.httpclient.dws.annotation.DWSHttpMessageResult
-import com.webank.wedatasphere.linkis.httpclient.response.Result
-import org.apache.commons.lang.ClassUtils
-import org.reflections.Reflections
-
-import scala.collection.JavaConversions._
-
-/**
-  * created by cooperyang on 2019/5/21.
-  */
-object DWSHttpMessageFactory {
-
-  private val reflections = new Reflections("com.webank.wedatasphere", classOf[DWSHttpMessageResult].getClassLoader)
-
-  private val methodToHttpMessageClasses = reflections.getTypesAnnotatedWith(classOf[DWSHttpMessageResult])
-    .filter(ClassUtils.isAssignable(_, classOf[Result])).map { c =>
-    val httpMessageResult = c.getAnnotation(classOf[DWSHttpMessageResult])
-    httpMessageResult.value() -> DWSHttpMessageResultInfo(httpMessageResult.value(), c)
-  }.toMap
-  private val methodRegex = methodToHttpMessageClasses.keys.toArray
-
-  def getDWSHttpMessageResult(method: String): Option[DWSHttpMessageResultInfo] = methodToHttpMessageClasses.get(method).orElse {
-    methodRegex.find(method.matches).map(methodToHttpMessageClasses.apply)
-  }
-
-}
-case class DWSHttpMessageResultInfo(method: String, clazz: Class[_])
\ No newline at end of file
diff --git a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/response/DWSResult.scala b/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/response/DWSResult.scala
deleted file mode 100644
index a9d1826..0000000
--- a/gateway/gateway-httpclient-support/src/main/scala/com/webank/wedatasphere/linkis/httpclient/dws/response/DWSResult.scala
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.httpclient.dws.response
-
-import java.util
-
-import com.webank.wedatasphere.linkis.common.utils.Logging
-import com.webank.wedatasphere.linkis.httpclient.dws.DWSHttpClient
-import com.webank.wedatasphere.linkis.httpclient.exception.HttpClientResultException
-import com.webank.wedatasphere.linkis.httpclient.response.HttpResult
-
-/**
-  * created by cooperyang on 2019/5/22.
-  */
-trait DWSResult extends Logging with HttpResult {
-
-  private var resultMap: util.Map[String, Object] = _
-  private var responseBody: String = _
-  private var statusCode: Int = _
-  private var url: String = _
-  private var contentType: String = _
-
-  private var status: Int = -1
-  private var message: String = _
-  private var data: util.Map[String, Object] = _
-
-  def getResultMap: util.Map[String, Object] = resultMap
-
-  def getStatus: Int = status
-
-  def getMessage: String = message
-
-  def getData: util.Map[String, Object] = data
-
-  override def getContentType: String = contentType
-
-  override def getUri: String = url
-
-  override def getStatusCode: Int = statusCode
-
-  override def set(responseBody: String, statusCode: Int, url: String, contentType: String): Unit = {
-    if(statusCode != 200) throw new HttpClientResultException(s"URL $url request failed! ResponseBody is $responseBody." )
-    resultMap = DWSHttpClient.jacksonJson.readValue(responseBody, classOf[util.Map[String, Object]])
-    status = resultMap.get("status").asInstanceOf[Int]
-    if(status != 0) throw new HttpClientResultException(s"URL $url request failed! ResponseBody is $responseBody." )
-    message = getResultMap.get("message").asInstanceOf[String]
-    data = getResultMap.get("data").asInstanceOf[util.Map[String, Object]]
-    this.responseBody = responseBody
-    this.statusCode = statusCode
-    this.url = url
-    this.contentType = contentType
-  }
-
-  override def getResponseBody: String = responseBody
-}
diff --git a/gateway/gateway-ujes-support/Dockerfile b/gateway/gateway-ujes-support/Dockerfile
deleted file mode 100644
index e7016a1..0000000
--- a/gateway/gateway-ujes-support/Dockerfile
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-#  Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM wedatasphere/linkis:emr-base-spark2.4.4
-
-MAINTAINER wedatasphere@webank.com
-
-RUN yum install -y unzip
-WORKDIR /opt/linkis
-
-COPY target/linkis-gateway.zip /opt/linkis
-RUN unzip linkis-gateway.zip
-
-WORKDIR /opt/linkis/linkis-gateway/bin
-ENTRYPOINT ["/opt/linkis/linkis-gateway/bin/startup.sh"]
diff --git a/gateway/gateway-ujes-support/bin/start-gateway.sh b/gateway/gateway-ujes-support/bin/start-gateway.sh
deleted file mode 100755
index 56cab6d..0000000
--- a/gateway/gateway-ujes-support/bin/start-gateway.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-
-cd `dirname $0`
-cd ..
-HOME=`pwd`
-
-export SERVER_PID=$HOME/bin/linkis.pid
-export SERVER_LOG_PATH=$HOME/logs
-export SERVER_CLASS=com.webank.wedatasphere.linkis.DataWorkCloudApplication
-
-if test -z "$SERVER_HEAP_SIZE"
-then
-  export SERVER_HEAP_SIZE="512M"
-fi
-
-if test -z "$SERVER_JAVA_OPTS"
-then
-  export SERVER_JAVA_OPTS=" -Xmx$SERVER_HEAP_SIZE -XX:+UseG1GC -Xloggc:$HOME/logs/linkis-gc.log"
-fi
-
-if [[ -f "${SERVER_PID}" ]]; then
-    pid=$(cat ${SERVER_PID})
-    if kill -0 ${pid} >/dev/null 2>&1; then
-      echo "Server is already running."
-      exit 1
-    fi
-fi
-
-nohup java $SERVER_JAVA_OPTS -cp $HOME/conf:$HOME/lib/* $SERVER_CLASS 2>&1 > $SERVER_LOG_PATH/linkis.out &
-pid=$!
-if [[ -z "${pid}" ]]; then
-    echo "server $SERVER_NAME start failed!"
-    exit 1
-else
-    echo "server $SERVER_NAME start succeeded!"
-    echo $pid > $SERVER_PID
-    sleep 1
-fi
\ No newline at end of file
diff --git a/gateway/gateway-ujes-support/bin/startup.sh b/gateway/gateway-ujes-support/bin/startup.sh
deleted file mode 100755
index 2b531e2..0000000
--- a/gateway/gateway-ujes-support/bin/startup.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/bash
-cd `dirname $0`
-cd ..
-HOME=`pwd`
-
-export SERVER_LOG_PATH=$HOME/logs
-export SERVER_CLASS=com.webank.wedatasphere.linkis.DataWorkCloudApplication
-
-
-if test -z "$SERVER_HEAP_SIZE"
-then
-  export SERVER_HEAP_SIZE="512M"
-fi
-
-if test -z "$SERVER_JAVA_OPTS"
-then
-  export SERVER_JAVA_OPTS=" -Xmx$SERVER_HEAP_SIZE -XX:+UseG1GC -Xloggc:$HOME/logs/linkis-gateway-gc.log"
-fi
-
-if test -z "$START_PORT"
-then
-  export START_PORT=14001
-fi
-
-export SERVER_PID=$HOME/bin/linkis.pid
-
-if [[ -f "${SERVER_PID}" ]]; then
-    pid=$(cat ${SERVER_PID})
-    if kill -0 ${pid} >/dev/null 2>&1; then
-      echo "Server is already running."
-      exit 1
-    fi
-fi
-
-cp -f /opt/linkis/conf/linkis.properties /opt/linkis/linkis-gateway/conf
-
-nohup java $SERVER_JAVA_OPTS -Deurekaurl=$EUREKA_URL -Duser.timezone=Asia/Shanghai -cp $HOME/conf:$HOME/lib/* $SERVER_CLASS --server.port=$START_PORT 2>&1 > $SERVER_LOG_PATH/linkis-gateway.log &
-
-pid=$!
-if [[ -z "${pid}" ]]; then
-    echo "server $SERVER_NAME start failed!"
-    exit 1
-else
-    echo "server $SERVER_NAME start succeeded!"
-    echo $pid > $SERVER_PID
-    sleep 1
-fi
-
-tail -f /dev/null
diff --git a/gateway/gateway-ujes-support/bin/stop-gateway.sh b/gateway/gateway-ujes-support/bin/stop-gateway.sh
deleted file mode 100755
index f032887..0000000
--- a/gateway/gateway-ujes-support/bin/stop-gateway.sh
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/bash
-
-cd `dirname $0`
-cd ..
-HOME=`pwd`
-
-export SERVER_PID=$HOME/bin/linkis.pid
-
-function wait_for_server_to_die() {
-  local pid
-  local count
-  pid=$1
-  timeout=$2
-  count=0
-  timeoutTime=$(date "+%s")
-  let "timeoutTime+=$timeout"
-  currentTime=$(date "+%s")
-  forceKill=1
-
-  while [[ $currentTime -lt $timeoutTime ]]; do
-    $(kill ${pid} > /dev/null 2> /dev/null)
-    if kill -0 ${pid} > /dev/null 2>&1; then
-      sleep 3
-    else
-      forceKill=0
-      break
-    fi
-    currentTime=$(date "+%s")
-  done
-
-  if [[ forceKill -ne 0 ]]; then
-    $(kill -9 ${pid} > /dev/null 2> /dev/null)
-  fi
-}
-
-if [[ ! -f "${SERVER_PID}" ]]; then
-    echo "server $SERVER_NAME is not running"
-else
-    pid=$(cat ${SERVER_PID})
-    if [[ -z "${pid}" ]]; then
-      echo "server $SERVER_NAME is not running"
-    else
-      wait_for_server_to_die $pid 40
-      $(rm -f ${SERVER_PID})
-      echo "server $SERVER_NAME is stopped."
-    fi
-fi
\ No newline at end of file
diff --git a/gateway/gateway-ujes-support/bin/stop.sh b/gateway/gateway-ujes-support/bin/stop.sh
deleted file mode 100755
index f032887..0000000
--- a/gateway/gateway-ujes-support/bin/stop.sh
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/bash
-
-cd `dirname $0`
-cd ..
-HOME=`pwd`
-
-export SERVER_PID=$HOME/bin/linkis.pid
-
-function wait_for_server_to_die() {
-  local pid
-  local count
-  pid=$1
-  timeout=$2
-  count=0
-  timeoutTime=$(date "+%s")
-  let "timeoutTime+=$timeout"
-  currentTime=$(date "+%s")
-  forceKill=1
-
-  while [[ $currentTime -lt $timeoutTime ]]; do
-    $(kill ${pid} > /dev/null 2> /dev/null)
-    if kill -0 ${pid} > /dev/null 2>&1; then
-      sleep 3
-    else
-      forceKill=0
-      break
-    fi
-    currentTime=$(date "+%s")
-  done
-
-  if [[ forceKill -ne 0 ]]; then
-    $(kill -9 ${pid} > /dev/null 2> /dev/null)
-  fi
-}
-
-if [[ ! -f "${SERVER_PID}" ]]; then
-    echo "server $SERVER_NAME is not running"
-else
-    pid=$(cat ${SERVER_PID})
-    if [[ -z "${pid}" ]]; then
-      echo "server $SERVER_NAME is not running"
-    else
-      wait_for_server_to_die $pid 40
-      $(rm -f ${SERVER_PID})
-      echo "server $SERVER_NAME is stopped."
-    fi
-fi
\ No newline at end of file
diff --git a/gateway/gateway-ujes-support/dockerinfo/image-id b/gateway/gateway-ujes-support/dockerinfo/image-id
deleted file mode 100644
index 4cbd2fa..0000000
--- a/gateway/gateway-ujes-support/dockerinfo/image-id
+++ /dev/null
@@ -1 +0,0 @@
-4a6d1f2107f5
diff --git a/gateway/gateway-ujes-support/dockerinfo/image-name b/gateway/gateway-ujes-support/dockerinfo/image-name
deleted file mode 100644
index c17be83..0000000
--- a/gateway/gateway-ujes-support/dockerinfo/image-name
+++ /dev/null
@@ -1 +0,0 @@
-wedatasphere/linkis:linkis-gateway
diff --git a/gateway/gateway-ujes-support/dockerinfo/repository b/gateway/gateway-ujes-support/dockerinfo/repository
deleted file mode 100644
index d2b33f6..0000000
--- a/gateway/gateway-ujes-support/dockerinfo/repository
+++ /dev/null
@@ -1 +0,0 @@
-wedatasphere/linkis
diff --git a/gateway/gateway-ujes-support/dockerinfo/tag b/gateway/gateway-ujes-support/dockerinfo/tag
deleted file mode 100644
index 865786b..0000000
--- a/gateway/gateway-ujes-support/dockerinfo/tag
+++ /dev/null
@@ -1 +0,0 @@
-linkis-gateway
diff --git a/gateway/gateway-ujes-support/pom.xml b/gateway/gateway-ujes-support/pom.xml
deleted file mode 100644
index f80ef6a..0000000
--- a/gateway/gateway-ujes-support/pom.xml
+++ /dev/null
@@ -1,112 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-
-    <artifactId>linkis-gateway-ujes-support</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-gateway-springcloudgateway</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.eclipse.jetty</groupId>
-                    <artifactId>jetty-webapp</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.eclipse.jetty</groupId>
-                    <artifactId>jetty-server</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <dependency>
-            <groupId>javax.servlet.jsp</groupId>
-            <artifactId>jsp-api</artifactId>
-            <version>2.1</version>
-        </dependency>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cs-common</artifactId>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>2.3</version>
-                <inherited>false</inherited>
-                <executions>
-                    <execution>
-                        <id>make-assembly</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                        <configuration>
-                            <descriptors>
-                                <descriptor>../gateway-ujes-support/src/main/assembly/distribution.xml</descriptor>
-                            </descriptors>
-                        </configuration>
-                    </execution>
-                </executions>
-                <configuration>
-                    <skipAssembly>false</skipAssembly>
-                    <finalName>linkis-gateway</finalName>
-                    <appendAssemblyId>false</appendAssemblyId>
-                    <attach>false</attach>
-                    <descriptors>
-                        <descriptor>../gateway-ujes-support/src/main/assembly/distribution.xml</descriptor>
-                    </descriptors>
-                </configuration>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>${basedir}/src/main/resources</directory>
-            </resource>
-        </resources>
-        <finalName>${project.artifactId}-${project.version}</finalName>
-    </build>
-
-</project>
\ No newline at end of file
diff --git a/gateway/gateway-ujes-support/pom_k8s.xml b/gateway/gateway-ujes-support/pom_k8s.xml
deleted file mode 100644
index e537977..0000000
--- a/gateway/gateway-ujes-support/pom_k8s.xml
+++ /dev/null
@@ -1,152 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-
-    <artifactId>linkis-gateway-ujes-support</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-gateway-springcloudgateway</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.eclipse.jetty</groupId>
-                    <artifactId>jetty-webapp</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.eclipse.jetty</groupId>
-                    <artifactId>jetty-server</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <dependency>
-            <groupId>javax.servlet.jsp</groupId>
-            <artifactId>jsp-api</artifactId>
-            <version>2.1</version>
-        </dependency>
-        <dependency>
-            <groupId>org.json4s</groupId>
-            <artifactId>json4s-jackson_2.11</artifactId>
-            <version>3.2.11</version>
-        </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-databind</artifactId>
-            <version>2.9.6</version>
-        </dependency>
-        <dependency>
-            <groupId>io.netty</groupId>
-            <artifactId>netty-all</artifactId>
-            <version>4.1.25.Final</version>
-        </dependency>
-        <dependency>
-            <groupId>io.netty</groupId>
-            <artifactId>netty-transport-native-epoll</artifactId>
-            <version>4.1.25.Final</version>
-        </dependency>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-cs-common</artifactId>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>2.3</version>
-                <inherited>false</inherited>
-                <executions>
-                    <execution>
-                        <id>make-assembly</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                        <configuration>
-                            <descriptors>
-                                <descriptor>../gateway-ujes-support/src/main/assembly/distribution.xml</descriptor>
-                            </descriptors>
-                        </configuration>
-                    </execution>
-                </executions>
-                <configuration>
-                    <skipAssembly>false</skipAssembly>
-                    <finalName>linkis-gateway</finalName>
-                    <appendAssemblyId>false</appendAssemblyId>
-                    <attach>false</attach>
-                    <descriptors>
-                        <descriptor>../gateway-ujes-support/src/main/assembly/distribution.xml</descriptor>
-                    </descriptors>
-                </configuration>
-            </plugin>
-<!--            <plugin>-->
-<!--                <groupId>com.spotify</groupId>-->
-<!--                <artifactId>dockerfile-maven-plugin</artifactId>-->
-<!--                <version>1.3.4</version>-->
-<!--                <executions>-->
-<!--                    <execution>-->
-<!--                        <id>default</id>-->
-<!--                        <phase>package</phase>-->
-<!--                        <goals>-->
-<!--                            <goal>build</goal>-->
-<!--                            <goal>tag</goal>-->
-<!--                        </goals>-->
-<!--                    </execution>-->
-<!--                </executions>-->
-<!--                <configuration>-->
-<!--                    <repository>${harbor.reposity}/linkis-gateway</repository>-->
-<!--                    <tag>${linkis.version}</tag>-->
-<!--                    <dockerInfoDirectory>${basedir}/dockerinfo</dockerInfoDirectory>-->
-<!--                </configuration>-->
-<!--            </plugin>-->
-        </plugins>
-        <resources>
-            <resource>
-                <directory>${basedir}/src/main/resources</directory>
-            </resource>
-        </resources>
-        <finalName>${project.artifactId}-${project.version}</finalName>
-    </build>
-
-</project>
\ No newline at end of file
diff --git a/gateway/gateway-ujes-support/src/main/assembly/distribution.xml b/gateway/gateway-ujes-support/src/main/assembly/distribution.xml
deleted file mode 100644
index bd07b72..0000000
--- a/gateway/gateway-ujes-support/src/main/assembly/distribution.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<!--
-  ~ Copyright 2019 WeBank
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<assembly
-        xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/2.3"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/2.3 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-    <id>linkis-gateway</id>
-    <formats>
-        <format>zip</format>
-    </formats>
-    <includeBaseDirectory>true</includeBaseDirectory>
-    <baseDirectory>linkis-gateway</baseDirectory>
-
-    <dependencySets>
-        <dependencySet>
-            <!-- Enable access to all projects in the current multimodule build! <useAllReactorProjects>true</useAllReactorProjects> -->
-            <!-- Now, select which projects to include in this module-set. -->
-            <outputDirectory>lib</outputDirectory>
-            <useProjectArtifact>true</useProjectArtifact>
-            <useTransitiveDependencies>true</useTransitiveDependencies>
-            <unpack>false</unpack>
-            <useStrictFiltering>true</useStrictFiltering>
-            <useTransitiveFiltering>true</useTransitiveFiltering>
-        </dependencySet>
-    </dependencySets>
-
-    <fileSets>
-        <fileSet>
-            <directory>${basedir}/src/main/resources</directory>
-            <includes>
-                <include>*</include>
-            </includes>
-            <fileMode>0777</fileMode>
-            <outputDirectory>conf</outputDirectory>
-            <lineEnding>unix</lineEnding>
-        </fileSet>
-        <fileSet>
-            <directory>${basedir}/bin</directory>
-            <includes>
-                <include>*</include>
-            </includes>
-            <fileMode>0777</fileMode>
-            <outputDirectory>bin</outputDirectory>
-            <lineEnding>unix</lineEnding>
-        </fileSet>
-        <fileSet>
-            <directory>.</directory>
-            <excludes>
-                <exclude>*/**</exclude>
-            </excludes>
-            <outputDirectory>logs</outputDirectory>
-        </fileSet>
-    </fileSets>
-
-</assembly>
-
diff --git a/gateway/gateway-ujes-support/src/main/resources/application.yml b/gateway/gateway-ujes-support/src/main/resources/application.yml
deleted file mode 100644
index 60b63ee..0000000
--- a/gateway/gateway-ujes-support/src/main/resources/application.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-server:
-  port: 9001
-spring:
-  application:
-    name: DataWorkCloud-Gateway
-  cloud:
-    gateway:
-      routes:
-        - id: dws
-          uri: http://localhost:port/
-          predicates:
-          - Path=/dws/
-        - id: dws/vg
-          uri: http://localhost:port/
-          predicates:
-          - Path=/dws/vg/
-        - id: dws/easyide
-          uri: http://localhost:port/
-          predicates:
-          - Path=/dws/easyide/
-
-eureka:
-  client:
-    serviceUrl:
-      defaultZone: ${eurekaurl}
-    registry-fetch-interval-seconds: 5
-  instance:
-    lease-renewal-interval-in-second: 5
-    lease-expiration-duration-in-second: 10
-    prefer-ip-address: true
-    instance-id: ${spring.cloud.client.ip-address}:${server.port}
-    metadata-map:
-      test: wedatasphere
-
-management:
-  endpoints:
-    web:
-      exposure:
-        include: refresh,info
diff --git a/gateway/gateway-ujes-support/src/main/resources/linkis.properties b/gateway/gateway-ujes-support/src/main/resources/linkis.properties
deleted file mode 100644
index 7867779..0000000
--- a/gateway/gateway-ujes-support/src/main/resources/linkis.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-#wds.linkis.test.mode=true
-
-wds.linkis.server.version=v1
-
-wds.linkis.ldap.proxy.url=
-wds.linkis.ldap.proxy.baseDN=
-
-wds.linkis.server.restful.uri=/
-
-wds.linkis.server.web.session.timeout=1h
-
-wds.linkis.gateway.conf.enable.proxy.user=false
-
-wds.linkis.gateway.conf.url.pass.auth=/dss/
-
-wds.linkis.gateway.admin.user=hadoop
-
-wds.linkis.gateway.conf.enable.token.auth=true
\ No newline at end of file
diff --git a/gateway/gateway-ujes-support/src/main/resources/log4j.properties b/gateway/gateway-ujes-support/src/main/resources/log4j.properties
deleted file mode 100644
index 178f8df..0000000
--- a/gateway/gateway-ujes-support/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-### set log levels ###
-
-log4j.rootCategory=INFO,console
-
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.Threshold=INFO
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-#log4j.appender.console.layout.ConversionPattern= %d{ISO8601} %-5p (%t) [%F:%M(%L)] - %m%n
-log4j.appender.console.layout.ConversionPattern= %d{ISO8601} %-5p (%t) %p %c{1} - %m%n
-
-
-log4j.appender.com.webank.bdp.ide.core=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.com.webank.bdp.ide.core.Threshold=INFO
-log4j.additivity.com.webank.bdp.ide.core=false
-log4j.appender.com.webank.bdp.ide.core.layout=org.apache.log4j.PatternLayout
-log4j.appender.com.webank.bdp.ide.core.Append=true
-log4j.appender.com.webank.bdp.ide.core.File=logs/linkis.log
-log4j.appender.com.webank.bdp.ide.core.layout.ConversionPattern= %d{ISO8601} %-5p (%t) [%F:%M(%L)] - %m%n
-
-log4j.logger.org.springframework=INFO
\ No newline at end of file
diff --git a/gateway/gateway-ujes-support/src/main/resources/log4j2.xml b/gateway/gateway-ujes-support/src/main/resources/log4j2.xml
deleted file mode 100644
index ad88ea5..0000000
--- a/gateway/gateway-ujes-support/src/main/resources/log4j2.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<configuration status="error" monitorInterval="30">
-    <appenders>
-        <Console name="Console" target="SYSTEM_OUT">
-            <ThresholdFilter level="INFO" onMatch="ACCEPT" onMismatch="DENY"/>
-            <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%t] %logger{36} %L %M - %msg%xEx%n"/>
-        </Console>
-        <RollingFile name="RollingFile" fileName="logs/linkis.log"
-                     filePattern="logs/$${date:yyyy-MM}/linkis-log-%d{yyyy-MM-dd}-%i.log">
-            <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5level] [%-40t] %c{1.} (%L) [%M] - %msg%xEx%n"/>
-            <SizeBasedTriggeringPolicy size="100MB"/>
-            <DefaultRolloverStrategy max="20"/>
-        </RollingFile>
-    </appenders>
-    <loggers>
-        <root level="INFO">
-            <appender-ref ref="RollingFile"/>
-            <appender-ref ref="Console"/>
-        </root>
-    </loggers>
-</configuration>
-
diff --git a/gateway/gateway-ujes-support/src/main/resources/token.properties b/gateway/gateway-ujes-support/src/main/resources/token.properties
deleted file mode 100644
index 136141c..0000000
--- a/gateway/gateway-ujes-support/src/main/resources/token.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-QML-AUTH=*
-BML-AUTH=*
-WS-AUTH=*
-dss-AUTH=*
-QUALITIS-AUTH=*
\ No newline at end of file
diff --git a/gateway/gateway-ujes-support/src/main/scala/com/webank/wedatasphere/linkis/gateway/ujes/parser/EntranceExecutionGatewayParser.scala b/gateway/gateway-ujes-support/src/main/scala/com/webank/wedatasphere/linkis/gateway/ujes/parser/EntranceExecutionGatewayParser.scala
deleted file mode 100644
index 939c89a..0000000
--- a/gateway/gateway-ujes-support/src/main/scala/com/webank/wedatasphere/linkis/gateway/ujes/parser/EntranceExecutionGatewayParser.scala
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.ujes.parser
-
-import com.webank.wedatasphere.linkis.common.ServiceInstance
-import com.webank.wedatasphere.linkis.gateway.http.GatewayContext
-import com.webank.wedatasphere.linkis.gateway.parser.AbstractGatewayParser
-import com.webank.wedatasphere.linkis.gateway.springcloud.SpringCloudGatewayConfiguration._
-import com.webank.wedatasphere.linkis.protocol.constants.TaskConstant
-import com.webank.wedatasphere.linkis.server.BDPJettyServerHelper
-import org.apache.commons.lang.StringUtils
-import org.springframework.stereotype.Component
-
-/**
-  * created by cooperyang on 2019/5/15.
-  */
-@Component
-class EntranceExecutionGatewayParser extends AbstractGatewayParser {
-
-  override def shouldContainRequestBody(gatewayContext: GatewayContext): Boolean = gatewayContext.getRequest.getRequestURI match {
-    case EntranceExecutionGatewayParser.ENTRANCE_EXECUTION_REGEX(_, _) => true
-    case _ => false
-  }
-
-  override def parse(gatewayContext: GatewayContext): Unit = gatewayContext.getRequest.getRequestURI match {
-    case EntranceExecutionGatewayParser.ENTRANCE_EXECUTION_REGEX(version, _) =>
-      if(sendResponseWhenNotMatchVersion(gatewayContext, version)) return
-      //var (creator, executeApplicationName): (String, String) = null
-      var creator:String = null
-      var executeApplicationName:String = null
-      if(StringUtils.isNotBlank(gatewayContext.getRequest.getRequestBody)) {
-        val json = BDPJettyServerHelper.gson.fromJson(gatewayContext.getRequest.getRequestBody, classOf[java.util.Map[String, Object]])
-        json.get(TaskConstant.EXECUTEAPPLICATIONNAME) match {
-          case s: String => executeApplicationName = s
-          case _ =>
-        }
-        json.get(TaskConstant.REQUESTAPPLICATIONNAME) match {
-          case s: String => creator = s
-          case _ =>
-        }
-      }
-      val path = gatewayContext.getRequest.getRequestURI
-      if(StringUtils.isBlank(executeApplicationName)) {
-        sendErrorResponse(s"requestUri $path need request parameter " + TaskConstant.EXECUTEAPPLICATIONNAME, gatewayContext)
-      } else {
-        info(s"GatewayParser parse requestUri $path to service $creator or $executeApplicationName.")
-        if(StringUtils.isNotBlank(creator))  gatewayContext.getGatewayRoute.getParams.put(TaskConstant.REQUESTAPPLICATIONNAME, creator)
-        gatewayContext.getGatewayRoute.setServiceInstance(ServiceInstance(executeApplicationName, null))
-      }
-    case _ =>
-  }
-}
-
-object EntranceExecutionGatewayParser {
-  val ENTRANCE_HEADER = normalPath(API_URL_PREFIX) + "rest_[a-zA-Z][a-zA-Z_0-9]*/(v\\d+)/entrance/"
-  val ENTRANCE_EXECUTION_REGEX = (ENTRANCE_HEADER + "(execute|backgroundservice)").r
-}
\ No newline at end of file
diff --git a/gateway/gateway-ujes-support/src/main/scala/com/webank/wedatasphere/linkis/gateway/ujes/parser/EntranceRequestGatewayParser.scala b/gateway/gateway-ujes-support/src/main/scala/com/webank/wedatasphere/linkis/gateway/ujes/parser/EntranceRequestGatewayParser.scala
deleted file mode 100644
index 4775203..0000000
--- a/gateway/gateway-ujes-support/src/main/scala/com/webank/wedatasphere/linkis/gateway/ujes/parser/EntranceRequestGatewayParser.scala
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.ujes.parser
-
-import com.webank.wedatasphere.linkis.common.ServiceInstance
-import com.webank.wedatasphere.linkis.gateway.http.GatewayContext
-import com.webank.wedatasphere.linkis.gateway.parser.AbstractGatewayParser
-import com.webank.wedatasphere.linkis.gateway.ujes.parser.EntranceExecutionGatewayParser._
-import com.webank.wedatasphere.linkis.protocol.constants.TaskConstant
-import com.webank.wedatasphere.linkis.protocol.utils.ZuulEntranceUtils
-import org.springframework.stereotype.Component
-
-/**
-  * created by cooperyang on 2019/5/15.
-  */
-@Component
-class EntranceRequestGatewayParser extends AbstractGatewayParser {
-  override def shouldContainRequestBody(gatewayContext: GatewayContext): Boolean = false
-
-  override def parse(gatewayContext: GatewayContext): Unit = gatewayContext.getRequest.getRequestURI match {
-    case EntranceRequestGatewayParser.ENTRANCE_REQUEST_REGEX(version, execId) =>
-      if(sendResponseWhenNotMatchVersion(gatewayContext, version)) return
-      val moduleInfo = ZuulEntranceUtils.parseExecID(execId)
-      val serviceInstance = if(moduleInfo.length == 3) ServiceInstance(moduleInfo(0), moduleInfo(1))
-      else {
-        gatewayContext.getGatewayRoute.getParams.put(TaskConstant.REQUESTAPPLICATIONNAME, moduleInfo(0))
-        ServiceInstance(moduleInfo(1), moduleInfo(2))
-      }
-      gatewayContext.getGatewayRoute.setServiceInstance(serviceInstance)
-    case _ =>
-  }
-}
-
-object EntranceRequestGatewayParser {
-  val ENTRANCE_REQUEST_REGEX = (ENTRANCE_HEADER + "([^/]+)/.+").r
-}
\ No newline at end of file
diff --git a/gateway/gateway-ujes-support/src/main/scala/com/webank/wedatasphere/linkis/gateway/ujes/route/EntranceGatewayRouter.scala b/gateway/gateway-ujes-support/src/main/scala/com/webank/wedatasphere/linkis/gateway/ujes/route/EntranceGatewayRouter.scala
deleted file mode 100644
index 23badec..0000000
--- a/gateway/gateway-ujes-support/src/main/scala/com/webank/wedatasphere/linkis/gateway/ujes/route/EntranceGatewayRouter.scala
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.ujes.route
-
-import com.webank.wedatasphere.linkis.common.ServiceInstance
-import com.webank.wedatasphere.linkis.gateway.exception.TooManyServiceException
-import com.webank.wedatasphere.linkis.gateway.http.GatewayContext
-import com.webank.wedatasphere.linkis.gateway.route.{AbstractGatewayRouter, GatewayRouter}
-import com.webank.wedatasphere.linkis.gateway.ujes.parser.EntranceExecutionGatewayParser
-import com.webank.wedatasphere.linkis.protocol.constants.TaskConstant
-import org.apache.commons.lang.StringUtils
-import org.springframework.beans.factory.annotation.Autowired
-import org.springframework.stereotype.Component
-
-/**
-  * created by cooperyang on 2019/5/15.
-  */
-@Component
-class EntranceGatewayRouter extends AbstractGatewayRouter {
-
-  @Autowired(required = false)
-  private var rules: Array[EntranceGatewayRouterRuler] = _
-
-  protected def findEntranceService(parsedServiceId: String) = findService(parsedServiceId, list => {
-    val services = list.filter(_.toLowerCase.contains("entrance"))
-    if(services.length == 1) Some(services.head)
-    else if(services.isEmpty) None
-    else {
-      val errorMsg = new TooManyServiceException(s"Cannot find a correct serviceId for parsedServiceId $parsedServiceId, service list is: " + services)
-      warn("", errorMsg)
-      throw errorMsg
-    }
-  })
-  override def route(gatewayContext: GatewayContext): ServiceInstance = {
-    gatewayContext.getGatewayRoute.getRequestURI match {
-      case EntranceGatewayRouter.ENTRANCE_REGEX(_) =>
-        val creator = gatewayContext.getGatewayRoute.getParams.get(TaskConstant.REQUESTAPPLICATIONNAME)
-        val applicationName = gatewayContext.getGatewayRoute.getServiceInstance.getApplicationName
-        val serviceId = if(StringUtils.isBlank(creator) || creator == "IDE")
-          findEntranceService(applicationName)
-        else findEntranceService(creator).orElse {
-          warn(s"Cannot find a service which named $creator, now redirect to $applicationName entrance.")
-          findEntranceService(applicationName)
-        }
-        serviceId.map(applicationName => {
-          rules match {
-            case array: Array[EntranceGatewayRouterRuler] => array.foreach(_.rule(applicationName, gatewayContext))
-            case _ =>
-          }
-          ServiceInstance(applicationName, gatewayContext.getGatewayRoute.getServiceInstance.getInstance)
-        }).orNull
-      case _ => null
-    }
-  }
-}
-object EntranceGatewayRouter {
-  val ENTRANCE_REGEX = (EntranceExecutionGatewayParser.ENTRANCE_HEADER + ".+").r
-}
diff --git a/gateway/gateway-ujes-support/src/main/scala/com/webank/wedatasphere/linkis/gateway/ujes/route/EntranceGatewayRouterRuler.scala b/gateway/gateway-ujes-support/src/main/scala/com/webank/wedatasphere/linkis/gateway/ujes/route/EntranceGatewayRouterRuler.scala
deleted file mode 100644
index 9b819cd..0000000
--- a/gateway/gateway-ujes-support/src/main/scala/com/webank/wedatasphere/linkis/gateway/ujes/route/EntranceGatewayRouterRuler.scala
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.ujes.route
-
-import com.webank.wedatasphere.linkis.gateway.http.GatewayContext
-
-/**
- *
- * @author wang_zh
- * @date 2020/5/21
- */
-trait EntranceGatewayRouterRuler {
-
-  def rule(serviceId: String, gatewayContext: GatewayContext)
-
-}
diff --git a/gateway/gateway-ujes-support/src/main/scala/com/webank/wedatasphere/linkis/gateway/ujes/route/HaContextGatewayRouter.scala b/gateway/gateway-ujes-support/src/main/scala/com/webank/wedatasphere/linkis/gateway/ujes/route/HaContextGatewayRouter.scala
deleted file mode 100644
index 39ddbe9..0000000
--- a/gateway/gateway-ujes-support/src/main/scala/com/webank/wedatasphere/linkis/gateway/ujes/route/HaContextGatewayRouter.scala
+++ /dev/null
@@ -1,124 +0,0 @@
-package com.webank.wedatasphere.linkis.gateway.ujes.route
-
-import java.util
-
-import com.webank.wedatasphere.linkis.common.ServiceInstance
-import com.webank.wedatasphere.linkis.cs.common.entity.source.{ContextID, ContextIDParser}
-import com.webank.wedatasphere.linkis.cs.common.protocol.ContextHTTPConstant
-import com.webank.wedatasphere.linkis.cs.common.serialize.helper.ContextSerializationHelper
-import com.webank.wedatasphere.linkis.gateway.http.GatewayContext
-import com.webank.wedatasphere.linkis.gateway.route.AbstractGatewayRouter
-import com.webank.wedatasphere.linkis.gateway.springcloud.SpringCloudGatewayConfiguration.{API_URL_PREFIX, normalPath}
-import com.webank.wedatasphere.linkis.rpc.interceptor.ServiceInstanceUtils
-import org.apache.commons.lang.StringUtils
-import org.springframework.beans.factory.annotation.Autowired
-import org.springframework.stereotype.Component
-
-import scala.collection.JavaConversions._
-import scala.util.Random
-import scala.util.matching.Regex
-
-/**
- * created by cooperyang on 2020/2/19
- * Description:
- */
-@Component
-class HaContextGatewayRouter extends AbstractGatewayRouter{
-
-  @Autowired
-  private var contextIDParser: ContextIDParser = _
-  private val serializationHelper = ContextSerializationHelper.getInstance();
-
-  override def route(gatewayContext: GatewayContext): ServiceInstance = {
-
-    if (gatewayContext.getGatewayRoute.getRequestURI.contains("contextservice")){
-      val params: util.HashMap[String, String] = gatewayContext.getGatewayRoute.getParams
-      if (!gatewayContext.getRequest.getQueryParams.isEmpty) {
-        for ((k, vArr) <- gatewayContext.getRequest.getQueryParams) {
-          if (vArr.nonEmpty) {
-            params.putIfAbsent(k, vArr.head)
-          }
-        }
-      }
-      if (gatewayContext.getRequest.getHeaders.containsKey(ContextHTTPConstant.CONTEXT_ID_STR)) {
-        params.putIfAbsent(ContextHTTPConstant.CONTEXT_ID_STR, gatewayContext.getRequest.getHeaders.get(ContextHTTPConstant.CONTEXT_ID_STR)(0))
-      }
-      if (null == params || params.isEmpty) {
-        dealContextCreate(gatewayContext)
-      } else {
-        var contextId : String = null
-        for ((key, value) <- params) {
-          if (key.equalsIgnoreCase(ContextHTTPConstant.CONTEXT_ID_STR)) {
-            contextId = value
-            }
-        }
-        if (StringUtils.isNotBlank(contextId)) {
-          dealContextAccess(contextId.toString, gatewayContext)
-        } else {
-          dealContextCreate(gatewayContext)
-        }
-      }
-    }else{
-      null
-    }
-  }
-
-  def dealContextCreate(gatewayContext:GatewayContext):ServiceInstance = {
-    val serviceId =  findService(HaContextGatewayRouter.CONTEXT_SERVICE_STR, list => {
-      val services = list.filter(_.contains(HaContextGatewayRouter.CONTEXT_SERVICE_STR))
-      services.headOption
-    })
-    val serviceInstances = ServiceInstanceUtils.getRPCServerLoader.getServiceInstances(serviceId.orNull)
-    if (serviceInstances.size > 0) {
-      val index = new Random().nextInt(serviceInstances.size)
-      serviceInstances(index)
-    } else {
-      logger.error(s"No valid instance for service : " + serviceId.orNull)
-      null
-    }
-  }
-
-  def dealContextAccess(contextIdStr:String, gatewayContext: GatewayContext):ServiceInstance = {
-    val contextId : String = {
-      var tmpId : String = null
-      if (serializationHelper.accepts(contextIdStr)) {
-        val contextID : ContextID = serializationHelper.deserialize(contextIdStr).asInstanceOf[ContextID]
-        if (null != contextID) {
-          tmpId = contextID.getContextId
-        } else {
-          error(s"Deserializate contextID null. contextIDStr : " + contextIdStr)
-        }
-      } else {
-        error(s"ContxtIDStr cannot be deserialized. contextIDStr : " + contextIdStr)
-      }
-      if (null == tmpId) {
-        contextIdStr
-      } else {
-        tmpId
-      }
-    }
-    val instances = contextIDParser.parse(contextId)
-    var serviceId:Option[String] = None
-    serviceId = findService(HaContextGatewayRouter.CONTEXT_SERVICE_STR, list => {
-      val services = list.filter(_.contains(HaContextGatewayRouter.CONTEXT_SERVICE_STR))
-        services.headOption
-      })
-    val serviceInstances = ServiceInstanceUtils.getRPCServerLoader.getServiceInstances(serviceId.orNull)
-    if (instances.size() > 0) {
-      serviceId.map(ServiceInstance(_, instances.get(0))).orNull
-    } else if (serviceInstances.size > 0) {
-      serviceInstances(0)
-    } else {
-      logger.error(s"No valid instance for service : " + serviceId.orNull)
-      null
-    }
-  }
-
-}
-
-
-object HaContextGatewayRouter{
-  val CONTEXT_ID_STR:String = "contextId"
-  val CONTEXT_SERVICE_STR:String = "contextservice"
-  val CONTEXT_REGEX: Regex = (normalPath(API_URL_PREFIX) + "rest_[a-zA-Z][a-zA-Z_0-9]*/(v\\d+)/contextservice/" + ".+").r
-}
diff --git a/gateway/gateway-ujes-support/src/main/scala/com/webank/wedatasphere/linkis/gateway/ujes/route/contextservice/ContextIdParserImpl.scala b/gateway/gateway-ujes-support/src/main/scala/com/webank/wedatasphere/linkis/gateway/ujes/route/contextservice/ContextIdParserImpl.scala
deleted file mode 100644
index a0fed9e..0000000
--- a/gateway/gateway-ujes-support/src/main/scala/com/webank/wedatasphere/linkis/gateway/ujes/route/contextservice/ContextIdParserImpl.scala
+++ /dev/null
@@ -1,52 +0,0 @@
-package com.webank.wedatasphere.linkis.gateway.ujes.route.contextservice
-
-import java.util
-import java.util.{ArrayList, List}
-
-import com.webank.wedatasphere.linkis.common.utils.Logging
-import com.webank.wedatasphere.linkis.cs.common.entity.source.{ContextIDParser, HAContextID}
-import com.webank.wedatasphere.linkis.cs.common.utils.CSHighAvailableUtils
-import com.webank.wedatasphere.linkis.rpc.instancealias.InstanceAliasManager
-import org.springframework.beans.factory.annotation.Autowired
-import org.springframework.stereotype.Component
-
-
-/**
- * created by cooperyang on 2020/2/19
- * Description: 如果id为HAID,则解析出对应的instance
- */
-@Component
-class ContextIdParserImpl extends ContextIDParser with Logging {
-
-  @Autowired
-  var instanceAliasManager : InstanceAliasManager = _
-
-  override def parse(contextId: String): util.List[String] = {
-
-    if (CSHighAvailableUtils.checkHAIDBasicFormat(contextId)) {
-      val instances = new util.ArrayList[String](2)
-      val haContextID = CSHighAvailableUtils.decodeHAID(contextId)
-      if (instanceAliasManager.isInstanceAliasValid(haContextID.getInstance)) {
-        instances.add(instanceAliasManager.getInstanceByAlias(haContextID.getInstance).getInstance)
-      } else {
-        error(s"parse HAID instance invalid. haIDKey : " + contextId)
-      }
-      if (instanceAliasManager.isInstanceAliasValid(haContextID.getBackupInstance)) {
-        instances.add(instanceAliasManager.getInstanceByAlias(haContextID.getBackupInstance).getInstance)
-      } else {
-        error("parse HAID backupInstance invalid. haIDKey : " + contextId)
-      }
-      instances
-    } else {
-      new util.ArrayList[String](0)
-    }
-  }
-
-  private def isNumberic(s:String):Boolean = {
-    s.toCharArray foreach {
-      c => if (c < 48 || c >57) return false
-    }
-    true
-  }
-
-}
diff --git a/gateway/plugins/gateway-ujes-datasource-ruler/pom.xml b/gateway/plugins/gateway-ujes-datasource-ruler/pom.xml
deleted file mode 100644
index 9d5cb86..0000000
--- a/gateway/plugins/gateway-ujes-datasource-ruler/pom.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>linkis-gateway-ujes-datasource-ruler</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-gateway-ujes-support</artifactId>
-            <version>${project.version}</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-mybatis</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-
-            <!-- 打包jar文件时,配置manifest文件,加入lib包的jar依赖 -->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <version>2.10</version>
-                <executions>
-                    <execution>
-                        <id>copy-dependencies</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>copy-dependencies</goal>
-                        </goals>
-                        <configuration>
-                            <outputDirectory>target/lib</outputDirectory>
-                            <excludeScope>provided</excludeScope>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-
-        <resources>
-            <resource>
-                <directory>src/main/java</directory>
-                <includes>
-                    <include>**/*.xml</include>
-                </includes>
-            </resource>
-            <resource>
-                <directory>src/main/resources</directory>
-                <excludes>
-                    <exclude>**/*.properties</exclude>
-                    <exclude>**/application.yml</exclude>
-                    <exclude>**/bootstrap.yml</exclude>
-                    <exclude>**/log4j2.xml</exclude>
-                </excludes>
-            </resource>
-        </resources>
-    </build>
-
-
-</project>
\ No newline at end of file
diff --git a/gateway/springcloudgateway/pom.xml b/gateway/springcloudgateway/pom.xml
deleted file mode 100644
index e27c004..0000000
--- a/gateway/springcloudgateway/pom.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2019 WeBank
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <artifactId>linkis</artifactId>
-        <groupId>com.webank.wedatasphere.linkis</groupId>
-        <version>0.11.0</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <artifactId>linkis-gateway-springcloudgateway</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.webank.wedatasphere.linkis</groupId>
-            <artifactId>linkis-gateway-core</artifactId>
-            <exclusions>
-                <exclusion>
-                    <artifactId>json4s-jackson_2.11</artifactId>
-                    <groupId>org.json4s</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-gateway</artifactId>
-            <version>2.0.1.RELEASE</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>hibernate-validator</artifactId>
-                    <groupId>org.hibernate.validator</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>spring-boot-starter-logging</artifactId>
-                    <groupId>org.springframework.boot</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>jackson-databind</artifactId>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-reactor-netty</artifactId>
-            <version>2.0.3.RELEASE</version>
-        </dependency>        
-        <dependency>
-            <groupId>io.projectreactor</groupId>
-            <artifactId>reactor-core</artifactId>
-            <version>3.2.2.RELEASE</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>${basedir}/src/main/resources</directory>
-            </resource>
-        </resources>
-        <finalName>${project.artifactId}-${project.version}</finalName>
-    </build>
-
-</project>
\ No newline at end of file
diff --git a/gateway/springcloudgateway/src/main/java/com/webank/wedatasphere/linkis/gateway/springcloud/http/GatewayAuthorizationFilter.java b/gateway/springcloudgateway/src/main/java/com/webank/wedatasphere/linkis/gateway/springcloud/http/GatewayAuthorizationFilter.java
deleted file mode 100644
index 92fb480..0000000
--- a/gateway/springcloudgateway/src/main/java/com/webank/wedatasphere/linkis/gateway/springcloud/http/GatewayAuthorizationFilter.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.springcloud.http;
-
-import com.webank.wedatasphere.linkis.common.ServiceInstance;
-import com.webank.wedatasphere.linkis.common.utils.JavaLog;
-import com.webank.wedatasphere.linkis.gateway.exception.GatewayWarnException;
-import com.webank.wedatasphere.linkis.gateway.http.BaseGatewayContext;
-import com.webank.wedatasphere.linkis.gateway.parser.GatewayParser;
-import com.webank.wedatasphere.linkis.gateway.route.GatewayRouter;
-import com.webank.wedatasphere.linkis.gateway.security.SecurityFilter;
-import com.webank.wedatasphere.linkis.gateway.springcloud.SpringCloudGatewayConfiguration;
-import com.webank.wedatasphere.linkis.server.Message;
-import org.apache.commons.lang.StringUtils;
-import org.springframework.cloud.gateway.config.GatewayProperties;
-import org.springframework.cloud.gateway.filter.GatewayFilterChain;
-import org.springframework.cloud.gateway.filter.GlobalFilter;
-import org.springframework.cloud.gateway.route.Route;
-import org.springframework.cloud.gateway.route.RouteDefinition;
-import org.springframework.cloud.gateway.support.DefaultServerRequest;
-import org.springframework.cloud.gateway.support.ServerWebExchangeUtils;
-import org.springframework.core.Ordered;
-import org.springframework.core.io.buffer.DataBuffer;
-import org.springframework.core.io.buffer.DataBufferFactory;
-import org.springframework.http.server.reactive.AbstractServerHttpRequest;
-import org.springframework.http.server.reactive.ServerHttpRequest;
-import org.springframework.http.server.reactive.ServerHttpRequestDecorator;
-import org.springframework.http.server.reactive.ServerHttpResponse;
-import org.springframework.web.server.ServerWebExchange;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-import java.nio.charset.StandardCharsets;
-
-/**
- * created by cooperyang on 2019/1/9.
- */
-public class GatewayAuthorizationFilter extends JavaLog implements GlobalFilter, Ordered {
-
-    private GatewayParser parser;
-    private GatewayRouter router;
-    private GatewayProperties gatewayProperties;
-
-    public GatewayAuthorizationFilter(GatewayParser parser, GatewayRouter router, GatewayProperties gatewayProperties) {
-        this.parser = parser;
-        this.router = router;
-        this.gatewayProperties = gatewayProperties;
-    }
-
-    private String getRequestBody(ServerWebExchange exchange) {
-//        StringBuilder requestBody = new StringBuilder();
-        DefaultServerRequest serverRequest = new DefaultServerRequest(exchange);
-        String requestBody = null;
-        try {
-            requestBody = serverRequest.bodyToMono(String.class).toFuture().get();
-        } catch (Exception e) {
-            GatewayWarnException exception = new GatewayWarnException(18000, "get requestBody failed!");
-            exception.initCause(e);
-            throw exception;
-        }
-        return requestBody;
-    }
-
-    private BaseGatewayContext getBaseGatewayContext(ServerWebExchange exchange, Route route) {
-        AbstractServerHttpRequest request = (AbstractServerHttpRequest) exchange.getRequest();
-        ServerHttpResponse response = exchange.getResponse();
-        BaseGatewayContext gatewayContext = new BaseGatewayContext();
-        SpringCloudGatewayHttpRequest springCloudGatewayHttpRequest = new SpringCloudGatewayHttpRequest(request);
-        gatewayContext.setRequest(springCloudGatewayHttpRequest);
-        gatewayContext.setResponse(new SpringCloudGatewayHttpResponse(response));
-        if(route.getUri().toString().startsWith(SpringCloudGatewayConfiguration.ROUTE_URI_FOR_WEB_SOCKET_HEADER())){
-            gatewayContext.setWebSocketRequest();
-        }
-//        if(!gatewayContext.isWebSocketRequest() && parser.shouldContainRequestBody(gatewayContext)) {
-//            String requestBody = getRequestBody(exchange);
-//            springCloudGatewayHttpRequest.setRequestBody(requestBody);
-//        }
-        return gatewayContext;
-    }
-
-    private Route getRealRoute(Route route, ServiceInstance serviceInstance) {
-        String routeUri = route.getUri().toString();
-        String scheme = route.getUri().getScheme();
-        if(routeUri.startsWith(SpringCloudGatewayConfiguration.ROUTE_URI_FOR_WEB_SOCKET_HEADER())) {
-            scheme = SpringCloudGatewayConfiguration.ROUTE_URI_FOR_WEB_SOCKET_HEADER();
-        } else if(routeUri.startsWith(SpringCloudGatewayConfiguration.ROUTE_URI_FOR_HTTP_HEADER())) {
-            scheme = SpringCloudGatewayConfiguration.ROUTE_URI_FOR_HTTP_HEADER();
-        } else {
-            scheme += "://";
-        }
-        String uri = scheme + serviceInstance.getApplicationName();
-        if(StringUtils.isNotBlank(serviceInstance.getInstance())) {
-            uri = scheme + SpringCloudGatewayConfiguration.mergeServiceInstance(serviceInstance);
-        }
-        return Route.async().id(route.getId()).filters(route.getFilters()).order(route.getOrder())
-                .uri(uri).asyncPredicate(route.getPredicate()).build();
-    }
-//    @Override
-//    public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
-//        AbstractServerHttpRequest request = (AbstractServerHttpRequest) exchange.getRequest();
-//        ServerHttpResponse response = exchange.getResponse();
-//        Route route = exchange.getAttribute(ServerWebExchangeUtils.GATEWAY_ROUTE_ATTR);
-//        BaseGatewayContext gatewayContext = getBaseGatewayContext(exchange, route);
-//
-//        DataBufferFactory bufferFactory = response.bufferFactory();
-//        if(((SpringCloudGatewayHttpRequest)gatewayContext.getRequest()).isRequestBodyAutowired()) {
-//            ServerHttpRequestDecorator decorator = new ServerHttpRequestDecorator(request) {
-//                @Override
-//                public Flux<DataBuffer> getBody() {
-//                    if(StringUtils.isBlank(gatewayContext.getRequest().getRequestBody())) return Flux.empty();
-//                    return Flux.just(bufferFactory.wrap(gatewayContext.getRequest().getRequestBody().getBytes(StandardCharsets.UTF_8)));
-//                }
-//            };
-//            return chain.filter(exchange.mutate().request(decorator).build());
-//        } else {
-//            return chain.filter(exchange);
-//        }
-//    }
-
-    private Mono<Void> gatewayDeal(ServerWebExchange exchange, GatewayFilterChain chain, BaseGatewayContext gatewayContext) {
-        SpringCloudGatewayHttpResponse gatewayHttpResponse = (SpringCloudGatewayHttpResponse) gatewayContext.getResponse();
-        if(!SecurityFilter.doFilter(gatewayContext)) {
-            return gatewayHttpResponse.getResponseMono();
-        } else if(gatewayContext.isWebSocketRequest()) {
-            return chain.filter(exchange);
-        }
-        ServiceInstance serviceInstance;
-        try {
-            parser.parse(gatewayContext);
-            if(gatewayHttpResponse.isCommitted()) {
-                return gatewayHttpResponse.getResponseMono();
-            }
-            serviceInstance = router.route(gatewayContext);
-        } catch (Throwable t) {
-            warn("", t);
-            Message message = Message.error(t)
-                    .$less$less(gatewayContext.getRequest().getRequestURI());
-            if(!gatewayContext.isWebSocketRequest()) gatewayHttpResponse.write(Message.response(message));
-            else gatewayHttpResponse.writeWebSocket(Message.response(message));
-            gatewayHttpResponse.sendResponse();
-            return gatewayHttpResponse.getResponseMono();
-        }
-        if(gatewayHttpResponse.isCommitted()) {
-            return gatewayHttpResponse.getResponseMono();
-        }
-        Route route = exchange.getAttribute(ServerWebExchangeUtils.GATEWAY_ROUTE_ATTR);
-        if(serviceInstance != null) {
-            Route realRoute = getRealRoute(route, serviceInstance);
-            exchange.getAttributes().put(ServerWebExchangeUtils.GATEWAY_ROUTE_ATTR, realRoute);
-        } else {
-            RouteDefinition realRd = null;
-            String proxyId = gatewayContext.getGatewayRoute().getParams().get("proxyId");
-            for(RouteDefinition rd : gatewayProperties.getRoutes()){
-                if((realRd == null && rd.getId().equals("dws")) ||
-                        (rd.getId().equals(proxyId))){
-                    realRd = rd;
-                }
-            }
-            String uri = realRd.getUri().toString();
-            if(uri != null){
-                uri = uri + StringUtils.replace(exchange.getRequest().getPath().value(), "/" + realRd.getId() + "/", "");
-                info("Proxy to " + uri);
-                Route realRoute = Route.async().id(route.getId()).filters(route.getFilters()).order(route.getOrder())
-                        .uri(uri).asyncPredicate(route.getPredicate()).build();
-                exchange.getAttributes().put(ServerWebExchangeUtils.GATEWAY_ROUTE_ATTR, realRoute);
-            }
-        }
-        ServerHttpRequest.Builder builder = exchange.getRequest().mutate().headers(SpringCloudHttpUtils::addIgnoreTimeoutSignal);
-        if(!((SpringCloudGatewayHttpRequest) gatewayContext.getRequest()).getAddCookies().isEmpty()) {
-            builder.headers(httpHeaders -> {
-                SpringCloudHttpUtils.addCookies(httpHeaders, ((SpringCloudGatewayHttpRequest) gatewayContext.getRequest()).getAddCookies());
-            });
-        }
-        return chain.filter(exchange.mutate().request(builder.build()).build());
-    }
-
-    @Override
-    public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
-        AbstractServerHttpRequest request = (AbstractServerHttpRequest) exchange.getRequest();
-        Route route = exchange.getAttribute(ServerWebExchangeUtils.GATEWAY_ROUTE_ATTR);
-        BaseGatewayContext gatewayContext = getBaseGatewayContext(exchange, route);
-        if(!gatewayContext.isWebSocketRequest() && parser.shouldContainRequestBody(gatewayContext)) {
-            return new DefaultServerRequest(exchange).bodyToMono(String.class).flatMap(requestBody -> {
-                ((SpringCloudGatewayHttpRequest)gatewayContext.getRequest()).setRequestBody(requestBody);
-                ServerHttpRequestDecorator decorator = new ServerHttpRequestDecorator(request) {
-                    @Override
-                    public Flux<DataBuffer> getBody() {
-                        if(StringUtils.isBlank(requestBody)) return Flux.empty();
-                        DataBufferFactory bufferFactory = exchange.getResponse().bufferFactory();
-                        return Flux.just(bufferFactory.wrap(requestBody.getBytes(StandardCharsets.UTF_8)));
-                    }
-                };
-                return gatewayDeal(exchange.mutate().request(decorator).build(), chain, gatewayContext);
-            });
-        } else {
-            return gatewayDeal(exchange, chain, gatewayContext);
-        }
-    }
-
-    @Override
-    public int getOrder() {
-        return 1;
-    }
-}
diff --git a/gateway/springcloudgateway/src/main/java/com/webank/wedatasphere/linkis/gateway/springcloud/http/SpringCloudHttpUtils.java b/gateway/springcloudgateway/src/main/java/com/webank/wedatasphere/linkis/gateway/springcloud/http/SpringCloudHttpUtils.java
deleted file mode 100644
index f89ac42..0000000
--- a/gateway/springcloudgateway/src/main/java/com/webank/wedatasphere/linkis/gateway/springcloud/http/SpringCloudHttpUtils.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.springcloud.http;
-
-import io.netty.handler.codec.http.websocketx.TextWebSocketFrame;
-import io.netty.handler.codec.http.websocketx.WebSocketFrame;
-import org.springframework.core.io.buffer.DataBuffer;
-import org.springframework.core.io.buffer.NettyDataBufferFactory;
-import org.springframework.http.HttpCookie;
-import org.springframework.http.HttpHeaders;
-import org.springframework.web.reactive.socket.WebSocketMessage;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-import reactor.ipc.netty.NettyPipeline;
-import reactor.ipc.netty.http.websocket.WebsocketOutbound;
-
-import javax.servlet.http.Cookie;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * created by cooperyang on 2019/1/9.
- */
-public class SpringCloudHttpUtils {
-
-    public static Mono<Void> sendWebSocket(WebsocketOutbound out, DataBuffer dataBuffer) {
-        WebSocketMessage webSocketMessage = new WebSocketMessage(WebSocketMessage.Type.TEXT, dataBuffer).retain();
-        TextWebSocketFrame textWebSocketFrame = new TextWebSocketFrame(NettyDataBufferFactory.toByteBuf(webSocketMessage.getPayload()));
-        Flux<WebSocketFrame> frames = Flux.just(textWebSocketFrame);
-        return out.options(NettyPipeline.SendOptions::flushOnEach).sendObject(frames).then();
-    }
-
-    public static void addIgnoreTimeoutSignal(HttpHeaders httpHeaders) {
-        Cookie cookie = com.webank.wedatasphere.linkis.server.security.SecurityFilter.ignoreTimeoutSignal();
-        Map<String, Cookie[]> cookies = new HashMap<>();
-        cookies.put(cookie.getName(), new Cookie[]{cookie});
-        addCookies(httpHeaders, cookies);
-    }
-
-    public static void addCookies(HttpHeaders httpHeaders, Map<String, Cookie[]> cookies) {
-        if(cookies == null || cookies.isEmpty()) {
-            return;
-        }
-        StringBuilder cookieStr = new StringBuilder();
-        for (String cookieName: cookies.keySet()) {
-            Cookie[] cookie = cookies.get(cookieName);
-            if(cookie == null || cookie.length == 0) continue;
-            HttpCookie httpCookie = new HttpCookie(cookie[0].getName(), cookie[0].getValue());
-            cookieStr.append(httpCookie.toString()).append(";");
-        }
-        if(cookieStr.length() > 1) {
-            cookieStr.setLength(cookieStr.length() - 1);
-            if(!httpHeaders.containsKey("Cookie")) {
-                httpHeaders.set("Cookie", cookieStr.toString());
-            } else {
-                httpHeaders.set("Cookie", httpHeaders.getFirst("Cookie") + ";" + cookieStr.toString());
-            }
-        }
-    }
-}
diff --git a/gateway/springcloudgateway/src/main/java/com/webank/wedatasphere/linkis/gateway/springcloud/websocket/SpringCloudGatewayWebsocketFilter.java b/gateway/springcloudgateway/src/main/java/com/webank/wedatasphere/linkis/gateway/springcloud/websocket/SpringCloudGatewayWebsocketFilter.java
deleted file mode 100644
index eeaa909..0000000
--- a/gateway/springcloudgateway/src/main/java/com/webank/wedatasphere/linkis/gateway/springcloud/websocket/SpringCloudGatewayWebsocketFilter.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.springcloud.websocket;
-
-import com.webank.wedatasphere.linkis.common.ServiceInstance;
-import com.webank.wedatasphere.linkis.gateway.http.GatewayContext;
-import com.webank.wedatasphere.linkis.gateway.parser.GatewayParser;
-import com.webank.wedatasphere.linkis.gateway.route.GatewayRouter;
-import com.webank.wedatasphere.linkis.gateway.security.GatewaySSOUtils;
-import com.webank.wedatasphere.linkis.gateway.springcloud.http.SpringCloudGatewayHttpRequest;
-import com.webank.wedatasphere.linkis.gateway.springcloud.http.SpringCloudHttpUtils;
-import com.webank.wedatasphere.linkis.server.Message;
-import com.webank.wedatasphere.linkis.server.socket.controller.ServerEvent;
-import com.webank.wedatasphere.linkis.server.socket.controller.SocketServerEvent;
-import org.springframework.cloud.client.loadbalancer.LoadBalancerClient;
-import org.springframework.cloud.gateway.filter.GatewayFilterChain;
-import org.springframework.cloud.gateway.filter.GlobalFilter;
-import org.springframework.cloud.gateway.filter.WebsocketRoutingFilter;
-import org.springframework.cloud.gateway.filter.headers.HttpHeadersFilter;
-import org.springframework.cloud.gateway.support.ServerWebExchangeUtils;
-import org.springframework.core.Ordered;
-import org.springframework.http.HttpHeaders;
-import org.springframework.util.StringUtils;
-import org.springframework.web.reactive.socket.WebSocketHandler;
-import org.springframework.web.reactive.socket.WebSocketMessage;
-import org.springframework.web.reactive.socket.WebSocketSession;
-import org.springframework.web.reactive.socket.client.WebSocketClient;
-import org.springframework.web.reactive.socket.server.WebSocketService;
-import org.springframework.web.server.ServerWebExchange;
-import org.springframework.web.util.UriComponentsBuilder;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.FluxSink;
-import reactor.core.publisher.Mono;
-
-import java.net.URI;
-import java.util.Arrays;
-import java.util.List;
-import java.util.stream.Collectors;
-
-import static com.webank.wedatasphere.linkis.gateway.springcloud.websocket.SpringCloudGatewayWebsocketUtils.*;
-
-/**
- * created by cooperyang on 2019/1/9.
- */
-public class SpringCloudGatewayWebsocketFilter implements GlobalFilter, Ordered {
-    private WebsocketRoutingFilter websocketRoutingFilter;
-    private WebSocketClient webSocketClient;
-    private WebSocketService webSocketService;
-    private LoadBalancerClient loadBalancer;
-    private GatewayParser parser ;
-    private GatewayRouter router;
-
-    public SpringCloudGatewayWebsocketFilter(WebsocketRoutingFilter websocketRoutingFilter, WebSocketClient webSocketClient,
-                                             WebSocketService webSocketService, LoadBalancerClient loadBalancer,
-                                             GatewayParser parser, GatewayRouter router) {
-        this.websocketRoutingFilter = websocketRoutingFilter;
-        this.webSocketClient = webSocketClient;
-        this.webSocketService = webSocketService;
-        this.loadBalancer = loadBalancer;
-        this.parser = parser;
-        this.router = router;
-    }
-
-    public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
-        changeSchemeIfIsWebSocketUpgrade(websocketRoutingFilter, exchange);
-        URI requestUrl = exchange.getRequiredAttribute(ServerWebExchangeUtils.GATEWAY_REQUEST_URL_ATTR);
-        String scheme = requestUrl.getScheme();
-        if (!ServerWebExchangeUtils.isAlreadyRouted(exchange) && ("ws".equals(scheme) || "wss".equals(scheme))) {
-            ServerWebExchangeUtils.setAlreadyRouted(exchange);
-            HttpHeaders headers = exchange.getRequest().getHeaders();
-            List<String> protocols = headers.get("Sec-WebSocket-Protocol");
-            if (protocols != null) {
-                protocols = (List<String>)protocols.stream().flatMap((header) -> {
-                    return Arrays.stream(StringUtils.commaDelimitedListToStringArray(header));
-                }).map(String::trim).collect(Collectors.toList());
-            }
-            List<String> collectedProtocols = protocols;
-            GatewayContext gatewayContext = getGatewayContext(exchange);
-            return this.webSocketService.handleRequest(exchange, new WebSocketHandler() {
-                public Mono<Void> handle(WebSocketSession webClientSocketSession) {
-                    GatewayWebSocketSessionConnection gatewayWebSocketSession = getGatewayWebSocketSessionConnection(GatewaySSOUtils.getLoginUsername(gatewayContext), webClientSocketSession);
-                    FluxSinkListener fluxSinkListener = new FluxSinkListener<WebSocketMessage>(){
-                        private FluxSink<WebSocketMessage> fluxSink = null;
-                        @Override
-                        public void setFluxSink(FluxSink<WebSocketMessage> fluxSink) {
-                            this.fluxSink = fluxSink;
-                        }
-                        @Override
-                        public void next(WebSocketMessage webSocketMessage) {
-                            if(fluxSink != null) fluxSink.next(webSocketMessage);
-                            GatewaySSOUtils.updateLastAccessTime(gatewayContext);
-                        }
-                        @Override
-                        public void complete() {
-                            if(fluxSink != null) fluxSink.complete();
-                        }
-                    };
-                    Flux<WebSocketMessage> receives = Flux.create(sink -> {
-                        fluxSinkListener.setFluxSink(sink);
-                    });
-                    gatewayWebSocketSession.receive().doOnNext(WebSocketMessage::retain).map(t -> {
-                        String user;
-                        try {
-                            user = GatewaySSOUtils.getLoginUsername(gatewayContext);
-                        } catch (Throwable e) {
-                            if(gatewayWebSocketSession.isAlive()) {
-                                String message = Message.response(Message.noLogin(e.getMessage()).$less$less(gatewayContext.getRequest().getRequestURI()));;
-                                fluxSinkListener.next(getWebSocketMessage(gatewayWebSocketSession.bufferFactory(), message));
-                            }
-                            return gatewayWebSocketSession.close();
-                        }
-                        if(t.getType() == WebSocketMessage.Type.PING || t.getType() == WebSocketMessage.Type.PONG) {
-                            WebSocketMessage pingMsg = new WebSocketMessage(WebSocketMessage.Type.PING, t.getPayload());
-                            gatewayWebSocketSession.heartbeat(pingMsg);
-                            return sendMsg(exchange, gatewayWebSocketSession, pingMsg);
-                        }
-                        String json = t.getPayloadAsText();
-                        t.release();
-                        ServerEvent serverEvent = SocketServerEvent.getServerEvent(json);
-                        ((SpringCloudGatewayHttpRequest) gatewayContext.getRequest()).setRequestBody(SocketServerEvent.getMessageData(serverEvent));
-                        ((SpringCloudGatewayHttpRequest) gatewayContext.getRequest()).setRequestURI(serverEvent.getMethod());
-                        parser.parse(gatewayContext);
-                        if (gatewayContext.getResponse().isCommitted()) {
-                            return sendMsg(exchange, gatewayWebSocketSession, ((WebsocketGatewayHttpResponse) gatewayContext.getResponse()).getWebSocketMsg());
-                        }
-                        ServiceInstance serviceInstance = router.route(gatewayContext);
-                        if (gatewayContext.getResponse().isCommitted()) {
-                            return sendMsg(exchange, gatewayWebSocketSession, ((WebsocketGatewayHttpResponse) gatewayContext.getResponse()).getWebSocketMsg());
-                        }
-                        WebSocketSession webSocketProxySession = getProxyWebSocketSession(gatewayWebSocketSession, serviceInstance);
-                        if (webSocketProxySession != null) {
-                            return sendMsg(exchange, webSocketProxySession, json);
-                        } else {
-                            URI uri = exchange.getRequest().getURI();
-                            Boolean encoded = ServerWebExchangeUtils.containsEncodedParts(uri);
-                            String host;
-                            int port;
-                            if (StringUtils.isEmpty(serviceInstance.getInstance())) {
-                                org.springframework.cloud.client.ServiceInstance service = loadBalancer.choose(serviceInstance.getApplicationName());
-                                host = service.getHost();
-                                port = service.getPort();
-                            } else {
-                                String[] instanceInfo = serviceInstance.getInstance().split(":");
-                                host = instanceInfo[0];
-                                port = Integer.parseInt(instanceInfo[1]);
-                            }
-                            URI requestURI = UriComponentsBuilder.fromUri(requestUrl).host(host).port(port).build(encoded).toUri();
-                            HttpHeaders filtered = HttpHeadersFilter.filterRequest(getHeadersFilters(websocketRoutingFilter), exchange);
-                            SpringCloudHttpUtils.addIgnoreTimeoutSignal(filtered);
-                            return webSocketClient.execute(requestURI, filtered, new WebSocketHandler() {
-                                public Mono<Void> handle(WebSocketSession proxySession) {
-                                    setProxyWebSocketSession(user, serviceInstance, gatewayWebSocketSession, proxySession);
-                                    Mono<Void> proxySessionSend = sendMsg(exchange, proxySession, json);
-                                    proxySessionSend.subscribe();
-                                    return getProxyWebSocketSession(gatewayWebSocketSession, serviceInstance).receive()
-                                            .doOnNext(WebSocketMessage::retain).doOnNext(fluxSinkListener::next).then();
-                                }
-
-                                public List<String> getSubProtocols() {
-                                    return collectedProtocols;
-                                }
-                            });
-                        }
-                    }).doOnComplete(fluxSinkListener::complete).doOnNext(Mono::subscribe).subscribe();
-                    return gatewayWebSocketSession.send(receives);
-                }
-                public List<String> getSubProtocols() {
-                    return collectedProtocols;
-                }
-            });
-        } else {
-            return chain.filter(exchange);
-        }
-    }
-
-    public int getOrder() {
-        return websocketRoutingFilter.getOrder() - 1; 
-    }
-
-    interface FluxSinkListener<T> {
-        void setFluxSink(FluxSink<T> fluxSink);
-        void next(T t);
-        void complete();
-    }
-}
diff --git a/gateway/springcloudgateway/src/main/resources/application.yml b/gateway/springcloudgateway/src/main/resources/application.yml
deleted file mode 100644
index 3af5bcb..0000000
--- a/gateway/springcloudgateway/src/main/resources/application.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-server:
-  port: 9001  #该模块提供服务的端口(必须)
-spring:
-  application:
-    name: DataWorkCloud-Gateway  #模块名,用于做高可用(必须)
-  cloud:
-    gateway:
-      routes:
-        - id: dws
-          uri: locahost
-          predicates:
-          - Path=/dws/
-        - id: dws/vg
-          uri: locahost
-          predicates:
-          - Path=/dws/vg/
-        - id: dws/easyide
-          uri: locahost
-          predicates:
-          - Path=/dws/easyide/
-#指定eureka Server的地址,用于注册(必须)
-eureka:
-  client:
-    serviceUrl:
-      defaultZone: ${eurekaurl}
-    registry-fetch-interval-seconds: 5
-  instance:
-    metadata-map:
-      test: wedatasphere
-#(必须)
-management:
-  endpoints:
-    web:
-      exposure:
-        include: refresh,info
diff --git a/gateway/springcloudgateway/src/main/resources/linkis.properties b/gateway/springcloudgateway/src/main/resources/linkis.properties
deleted file mode 100644
index 28dc7d8..0000000
--- a/gateway/springcloudgateway/src/main/resources/linkis.properties
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-#wds.linkis.test.mode=true
-
-
-wds.linkis.ldap.proxy.url=
-wds.linkis.ldap.proxy.baseDN=
-#wds.linkis.ldap.proxy.userNameFormat=cn=%s@xxx.com,OU=xxx,DC=xxx,DC=com
-
-wds.linkis.server.restful.uri=/
-
-wds.linkis.server.web.session.timeout=1h
-
-wds.linkis.gateway.conf.enable.proxy.user=false
-
-wds.linkis.gateway.conf.url.pass.auth=/dws/
-
-wds.linkis.gateway.admin.user=hadoop
\ No newline at end of file
diff --git a/gateway/springcloudgateway/src/main/resources/token.properties b/gateway/springcloudgateway/src/main/resources/token.properties
deleted file mode 100644
index 136141c..0000000
--- a/gateway/springcloudgateway/src/main/resources/token.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-QML-AUTH=*
-BML-AUTH=*
-WS-AUTH=*
-dss-AUTH=*
-QUALITIS-AUTH=*
\ No newline at end of file
diff --git a/gateway/springcloudgateway/src/main/scala/com/webank/wedatasphere/linkis/gateway/springcloud/SpringCloudGatewayConfiguration.scala b/gateway/springcloudgateway/src/main/scala/com/webank/wedatasphere/linkis/gateway/springcloud/SpringCloudGatewayConfiguration.scala
deleted file mode 100644
index e133d73..0000000
--- a/gateway/springcloudgateway/src/main/scala/com/webank/wedatasphere/linkis/gateway/springcloud/SpringCloudGatewayConfiguration.scala
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.springcloud
-
-import com.netflix.loadbalancer.Server
-import com.webank.wedatasphere.linkis.common.ServiceInstance
-import com.webank.wedatasphere.linkis.common.utils.Logging
-import com.webank.wedatasphere.linkis.gateway.config.GatewaySpringConfiguration
-import com.webank.wedatasphere.linkis.gateway.parser.{DefaultGatewayParser, GatewayParser}
-import com.webank.wedatasphere.linkis.gateway.route.{DefaultGatewayRouter, GatewayRouter}
-import com.webank.wedatasphere.linkis.gateway.springcloud.http.GatewayAuthorizationFilter
-import com.webank.wedatasphere.linkis.gateway.springcloud.websocket.SpringCloudGatewayWebsocketFilter
-import com.webank.wedatasphere.linkis.rpc.Sender
-import com.webank.wedatasphere.linkis.server.conf.ServerConfiguration
-import org.springframework.beans.factory.annotation.Autowired
-import org.springframework.boot.autoconfigure.AutoConfigureAfter
-import org.springframework.cloud.client.loadbalancer.LoadBalancerClient
-import org.springframework.cloud.gateway.config.{GatewayAutoConfiguration, GatewayProperties}
-import org.springframework.cloud.gateway.filter._
-import org.springframework.cloud.gateway.route.builder.{PredicateSpec, RouteLocatorBuilder}
-import org.springframework.cloud.gateway.route.{Route, RouteLocator}
-import org.springframework.cloud.netflix.ribbon.{RibbonLoadBalancerClient, SpringClientFactory}
-import org.springframework.context.annotation.{Bean, Configuration}
-import org.springframework.web.reactive.socket.client.WebSocketClient
-import org.springframework.web.reactive.socket.server.WebSocketService
-
-import scala.collection.JavaConversions._
-
-/**
-  * created by cooperyang on 2019/1/9.
-  */
-@Configuration
-@AutoConfigureAfter(Array(classOf[GatewaySpringConfiguration], classOf[GatewayAutoConfiguration]))
-class SpringCloudGatewayConfiguration {
-  import SpringCloudGatewayConfiguration._
-  @Autowired(required = false)
-  private var gatewayParsers: Array[GatewayParser] = _
-  @Autowired(required = false)
-  private var gatewayRouters: Array[GatewayRouter] = _
-  @Autowired
-  private var gatewayProperties: GatewayProperties = _
-
-  @Bean
-  def authorizationFilter: GlobalFilter = new GatewayAuthorizationFilter(new DefaultGatewayParser(gatewayParsers), new DefaultGatewayRouter(gatewayRouters), gatewayProperties)
-
-  @Bean
-  def websocketFilter(websocketRoutingFilter: WebsocketRoutingFilter,
-                      webSocketClient: WebSocketClient, webSocketService: WebSocketService,
-                      loadBalancer: LoadBalancerClient): GlobalFilter = new SpringCloudGatewayWebsocketFilter(websocketRoutingFilter,
-    webSocketClient, webSocketService, loadBalancer, new DefaultGatewayParser(gatewayParsers), new DefaultGatewayRouter(gatewayRouters))
-
-  @Bean
-  def createRouteLocator(builder: RouteLocatorBuilder): RouteLocator = builder.routes()
-      .route("api", new java.util.function.Function[PredicateSpec, Route.AsyncBuilder] {
-        override def apply(t: PredicateSpec): Route.AsyncBuilder = t.path(API_URL_PREFIX + "**")
-          .uri(ROUTE_URI_FOR_HTTP_HEADER + Sender.getThisServiceInstance.getApplicationName)
-      })
-      .route("dws", new java.util.function.Function[PredicateSpec, Route.AsyncBuilder] {
-        override def apply(t: PredicateSpec): Route.AsyncBuilder = t.path(PROXY_URL_PREFIX + "**")
-          .uri(ROUTE_URI_FOR_HTTP_HEADER + Sender.getThisServiceInstance.getApplicationName)
-      })
-      .route("ws_http", new java.util.function.Function[PredicateSpec, Route.AsyncBuilder] {
-      override def apply(t: PredicateSpec): Route.AsyncBuilder = t.path(SpringCloudGatewayConfiguration.WEBSOCKET_URI + "info/**")
-        .uri(ROUTE_URI_FOR_HTTP_HEADER + Sender.getThisServiceInstance.getApplicationName)
-      })
-      .route("ws", new java.util.function.Function[PredicateSpec, Route.AsyncBuilder] {
-        override def apply(t: PredicateSpec): Route.AsyncBuilder = t.path(SpringCloudGatewayConfiguration.WEBSOCKET_URI + "**")
-          .uri(ROUTE_URI_FOR_WEB_SOCKET_HEADER + Sender.getThisServiceInstance.getApplicationName)
-      }).build()
-
-  @Bean
-  def createLoadBalancerClient(springClientFactory: SpringClientFactory) = new RibbonLoadBalancerClient(springClientFactory) {
-    override def getServer(serviceId: String): Server = if(isMergeModuleInstance(serviceId)) {
-      val serviceInstance = getServiceInstance(serviceId)
-      info("redirect to " + serviceInstance)  //TODO test,wait for delete
-      val lb = this.getLoadBalancer(serviceInstance.getApplicationName)
-      lb.getAllServers.find(_.getHostPort == serviceInstance.getInstance).get
-    } else super.getServer(serviceId)
-  }
-
-}
-object SpringCloudGatewayConfiguration extends Logging {
-  private val MERGE_MODULE_INSTANCE_HEADER = "merge-gw-"
-  val ROUTE_URI_FOR_HTTP_HEADER = "lb://"
-  val ROUTE_URI_FOR_WEB_SOCKET_HEADER = "lb:ws://"
-  val PROXY_URL_PREFIX = "/dws/"
-  val API_URL_PREFIX = "/api/"
-  val PROXY_ID = "proxyId"
-
-  val WEBSOCKET_URI = normalPath(ServerConfiguration.BDP_SERVER_SOCKET_URI.getValue)
-  def normalPath(path: String): String = if(path.endsWith("/")) path else path + "/"
-
-  def isMergeModuleInstance(serviceId: String): Boolean = serviceId.startsWith(MERGE_MODULE_INSTANCE_HEADER)
-
-  private val regex = "(\\d+).+".r
-  def getServiceInstance(serviceId: String): ServiceInstance = {
-    var serviceInstanceString = serviceId.substring(MERGE_MODULE_INSTANCE_HEADER.length)
-    serviceInstanceString match {
-      case regex(num) =>
-        serviceInstanceString = serviceInstanceString.substring(num.length)
-        ServiceInstance(serviceInstanceString.substring(0, num.toInt),
-          serviceInstanceString.substring(num.toInt).replaceAll("---", ":")
-          // app register with ip
-          .replaceAll("--", "."))
-    }
-  }
-
-  def mergeServiceInstance(serviceInstance: ServiceInstance): String = MERGE_MODULE_INSTANCE_HEADER + serviceInstance.getApplicationName.length +
-    serviceInstance.getApplicationName + serviceInstance.getInstance.replaceAll(":", "---")
-    // app register with ip
-    .replaceAll("\\.", "--")
-}
\ No newline at end of file
diff --git a/gateway/springcloudgateway/src/main/scala/com/webank/wedatasphere/linkis/gateway/springcloud/http/SpringCloudGatewayHttpRequest.scala b/gateway/springcloudgateway/src/main/scala/com/webank/wedatasphere/linkis/gateway/springcloud/http/SpringCloudGatewayHttpRequest.scala
deleted file mode 100644
index 3d20c19..0000000
--- a/gateway/springcloudgateway/src/main/scala/com/webank/wedatasphere/linkis/gateway/springcloud/http/SpringCloudGatewayHttpRequest.scala
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.springcloud.http
-
-import java.net.{InetSocketAddress, URI}
-
-import com.webank.wedatasphere.linkis.gateway.http.GatewayHttpRequest
-import com.webank.wedatasphere.linkis.server._
-import javax.servlet.http.Cookie
-import org.apache.commons.lang.StringUtils
-import org.springframework.http.server.reactive.AbstractServerHttpRequest
-
-import scala.collection.JavaConversions
-
-/**
-  * created by cooperyang on 2019/1/9.
-  */
-class SpringCloudGatewayHttpRequest(request: AbstractServerHttpRequest) extends GatewayHttpRequest {
-
-  private val headers = {
-    val headerEntrys = request.getHeaders
-    val header = new JMap[String, Array[String]]
-    headerEntrys.foreach{case (key, value) => if(value != null && value.nonEmpty) header.put(key, value.toArray(new Array[String](value.size())))
-      else header.put(key, Array.empty)
-    }
-    header
-  }
-
-  private val queryParams = {
-    val querys = request.getQueryParams
-    val queryParams = new JMap[String, Array[String]]
-    querys.foreach {case (key, value) => if(value != null && value.nonEmpty) queryParams.put(key, value.toArray(new Array[String](value.size())))
-      else queryParams.put(key, Array.empty)
-    }
-    queryParams
-  }
-
-  private val cookies = {
-    val cookieMap = request.getCookies
-    val cookies = new JMap[String, Array[Cookie]]
-    cookieMap.foreach {case (key, value) => if(value != null && value.nonEmpty) cookies.put(key, value.map(c => new Cookie(c.getName, c.getValue)).toArray)
-    else cookies.put(key, Array.empty)}
-    cookies
-  }
-
-  private val addCookies = new JMap[String, Array[Cookie]]
-
-  private var requestBody: String = _
-  private var requestURI: String = _
-  private var requestAutowired = false
-
-  def setRequestURI(requestURI: String): Unit = this.requestURI = requestURI
-
-  def getRequest = request
-
-  override def getRequestURI: String = if(StringUtils.isNotBlank(requestURI)) requestURI else request.getPath.pathWithinApplication.value
-
-  override def getURI: URI = if(StringUtils.isNotBlank(requestURI)) new URI(requestURI) else request.getURI
-
-  override def getHeaders: JMap[String, Array[String]] = headers
-
-  override def addHeader(headerName: String, headers: Array[String]): Unit =
-    request.getHeaders.addAll(headerName, JavaConversions.seqAsJavaList(headers.toList))
-
-  override def addCookie(cookieName: String, cookies: Array[Cookie]): Unit = {
-    this.cookies.put(cookieName, cookies)
-    addCookies.put(cookieName, cookies)
-  }
-
-  def getAddCookies: JMap[String, Array[Cookie]] = addCookies
-//  override def addCookie(cookieName: String, cookies: Array[Cookie]): Unit = request.getNativeRequest[Any] match {
-//    case httpInfos: HttpInfos =>
-//      httpInfos.cookies().put(cookieName, JavaConversions.setAsJavaSet(cookies.map { c =>
-//        val cookie = new DefaultCookie(c.getName, c.getValue)
-//        cookie.setDomain(c.getDomain)
-//        cookie.setMaxAge(c.getMaxAge)
-//        cookie.setPath(c.getPath)
-//        cookie.setSecure(c.getSecure)
-//        cookie
-//      }.toSet))
-//    case _ => throw new GatewayErrorException(10040, "Not support method: addCookie in GatewayHttpRequest.")
-//  }
-
-  override def getQueryParams: JMap[String, Array[String]] = queryParams
-
-  override def getCookies: JMap[String, Array[Cookie]] = cookies
-
-  override def getRemoteAddress: InetSocketAddress = request.getRemoteAddress
-
-  override def getMethod: String = request.getMethodValue
-
-  def setRequestBody(requestBody: String): Unit = {
-    this.requestBody = requestBody
-    requestAutowired = true
-  }
-  override def getRequestBody: String = requestBody
-
-  def isRequestBodyAutowired: Boolean = requestAutowired
-}
diff --git a/gateway/springcloudgateway/src/main/scala/com/webank/wedatasphere/linkis/gateway/springcloud/http/SpringCloudGatewayHttpResponse.scala b/gateway/springcloudgateway/src/main/scala/com/webank/wedatasphere/linkis/gateway/springcloud/http/SpringCloudGatewayHttpResponse.scala
deleted file mode 100644
index 43d40c8..0000000
--- a/gateway/springcloudgateway/src/main/scala/com/webank/wedatasphere/linkis/gateway/springcloud/http/SpringCloudGatewayHttpResponse.scala
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.springcloud.http
-
-import java.util.function.BiFunction
-
-import com.webank.wedatasphere.linkis.common.conf.Configuration
-import com.webank.wedatasphere.linkis.gateway.http.GatewayHttpResponse
-import javax.servlet.http.Cookie
-import org.reactivestreams.Publisher
-import org.springframework.http.server.reactive.{AbstractServerHttpResponse, ServerHttpResponse}
-import org.springframework.http.{HttpStatus, ResponseCookie}
-import reactor.core.publisher.{Flux, Mono}
-import reactor.ipc.netty.http.server.HttpServerResponse
-import reactor.ipc.netty.http.websocket.{WebsocketInbound, WebsocketOutbound}
-
-/**
-  * created by cooperyang on 2019/1/9.
-  */
-class SpringCloudGatewayHttpResponse(response: ServerHttpResponse) extends GatewayHttpResponse {
-
-  private val cachedHTTPResponseMsg = new StringBuilder
-  private val cachedWebSocketResponseMsg = new StringBuilder
-  private val cachedRedirectUrlMsg = new StringBuilder
-  private var responseMono: Mono[Void] = _
-
-  override def addCookie(cookie: Cookie): Unit = {
-    val responseCookie = ResponseCookie.from(cookie.getName, cookie.getValue)
-    responseCookie.maxAge(cookie.getMaxAge)
-    responseCookie.secure(cookie.getSecure)
-    responseCookie.path(cookie.getPath)
-    responseCookie.domain(cookie.getDomain)
-    responseCookie.httpOnly(cookie.isHttpOnly)
-    response.addCookie(responseCookie.build())
-  }
-
-  override def setHeader(key: String, value: String): Unit = response.getHeaders.add(key, value)
-
-  override def setStatus(status: Int): Unit = response.setStatusCode(HttpStatus.valueOf(status))
-
-  override def write(message: String): Unit = cachedHTTPResponseMsg.append(message)
-
-  override def sendResponse(): Unit = if(responseMono == null) synchronized {
-    if(responseMono != null) return
-    if(cachedRedirectUrlMsg.nonEmpty) {
-      if(response.getStatusCode == null || (response.getStatusCode != null && !response.getStatusCode.is3xxRedirection()))
-        response.setStatusCode(HttpStatus.TEMPORARY_REDIRECT)
-      response.getHeaders.set("Location", cachedRedirectUrlMsg.toString)
-      responseMono = response.setComplete()
-      return
-    }
-    setHeader("Content-Type", "application/json;charset=UTF-8")
-    if(cachedHTTPResponseMsg.nonEmpty) {
-      val dataBuffer = response.bufferFactory().wrap(cachedHTTPResponseMsg.toString.getBytes(Configuration.BDP_ENCODING.getValue))
-      val messageFlux = Flux.just(Array(dataBuffer): _*)
-      responseMono = response.writeWith(messageFlux)
-    } else if(cachedWebSocketResponseMsg.nonEmpty) {
-      response match {
-        case abstractResponse: AbstractServerHttpResponse =>
-          val nativeResponse = abstractResponse.getNativeResponse.asInstanceOf[HttpServerResponse]
-          responseMono = nativeResponse.sendWebsocket(new BiFunction[WebsocketInbound, WebsocketOutbound, Publisher[Void]] {
-            override def apply(in: WebsocketInbound, out: WebsocketOutbound): Publisher[Void] = {
-              val dataBuffer = response.bufferFactory().wrap(cachedWebSocketResponseMsg.toString.getBytes(Configuration.BDP_ENCODING.getValue))
-              SpringCloudHttpUtils.sendWebSocket(out, dataBuffer)
-            }
-          })
-        case _ =>
-      }
-    }
-  }
-
-  override def isCommitted: Boolean = responseMono != null
-
-  def getResponseMono: Mono[Void] = responseMono
-
-  override def writeWebSocket(message: String): Unit = cachedWebSocketResponseMsg.append(message)
-
-  override def redirectTo(url: String): Unit = cachedRedirectUrlMsg.append(url)
-}
diff --git a/gateway/springcloudgateway/src/main/scala/com/webank/wedatasphere/linkis/gateway/springcloud/websocket/SpringCloudGatewayWebSocketSecurityHook.scala b/gateway/springcloudgateway/src/main/scala/com/webank/wedatasphere/linkis/gateway/springcloud/websocket/SpringCloudGatewayWebSocketSecurityHook.scala
deleted file mode 100644
index 0412e68..0000000
--- a/gateway/springcloudgateway/src/main/scala/com/webank/wedatasphere/linkis/gateway/springcloud/websocket/SpringCloudGatewayWebSocketSecurityHook.scala
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.springcloud.websocket
-
-import com.webank.wedatasphere.linkis.gateway.http.GatewayContext
-import com.webank.wedatasphere.linkis.gateway.security.SecurityHook
-import org.springframework.stereotype.Component
-
-/**
-  * created by cooperyang on 2019/1/9.
-  */
-@Component
-class SpringCloudGatewayWebSocketSecurityHook extends SecurityHook {
-  override def preLogout(gatewayContext: GatewayContext): Unit = {
-    val inetAddress = gatewayContext.getRequest.getRemoteAddress
-    SpringCloudGatewayWebsocketUtils.removeGatewayWebSocketSessionConnection(inetAddress)
-  }
-
-  override def postLogin(gatewayContext: GatewayContext): Unit = {}
-}
diff --git a/gateway/springcloudgateway/src/main/scala/com/webank/wedatasphere/linkis/gateway/springcloud/websocket/SpringCloudGatewayWebsocketUtils.scala b/gateway/springcloudgateway/src/main/scala/com/webank/wedatasphere/linkis/gateway/springcloud/websocket/SpringCloudGatewayWebsocketUtils.scala
deleted file mode 100644
index 0e8fa30..0000000
--- a/gateway/springcloudgateway/src/main/scala/com/webank/wedatasphere/linkis/gateway/springcloud/websocket/SpringCloudGatewayWebsocketUtils.scala
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.springcloud.websocket
-
-import java.net.InetSocketAddress
-import java.util
-import java.util.concurrent.{ConcurrentHashMap, TimeUnit}
-
-import com.webank.wedatasphere.linkis.common.ServiceInstance
-import com.webank.wedatasphere.linkis.common.conf.{CommonVars, Configuration, TimeType}
-import com.webank.wedatasphere.linkis.common.utils.{Logging, Utils}
-import com.webank.wedatasphere.linkis.gateway.http.BaseGatewayContext
-import com.webank.wedatasphere.linkis.gateway.springcloud.http.SpringCloudGatewayHttpRequest
-import org.springframework.cloud.gateway.filter.WebsocketRoutingFilter
-import org.springframework.cloud.gateway.filter.headers.HttpHeadersFilter
-import org.springframework.core.io.buffer.DataBufferFactory
-import org.springframework.http.server.reactive.AbstractServerHttpRequest
-import org.springframework.web.reactive.socket.adapter.AbstractWebSocketSession
-import org.springframework.web.reactive.socket.{WebSocketMessage, WebSocketSession}
-import org.springframework.web.server.ServerWebExchange
-import reactor.core.publisher.{Flux, Mono}
-
-import scala.collection.JavaConversions._
-
-/**
-  * created by cooperyang on 2019/1/9.
-  */
-object SpringCloudGatewayWebsocketUtils extends Logging {//(websocketRoutingFilter: WebsocketRoutingFilter,
-//                                        webSocketClient: WebSocketClient,
-//                                        webSocketService: WebSocketService,
-//                                        loadBalancer: LoadBalancerClient,
-//                                        parser: GatewayParser, router: GatewayRouter) extends GlobalFilter with Ordered{
-
-  val SPRING_CLOUD_GATEWAY_WEBSOCKET_HEARTBEAT = CommonVars("wds.linkis.gateway.websocket.heartbeat", new TimeType("5s")).getValue.toLong
-
-  private val changeSchemeMethod = classOf[WebsocketRoutingFilter].getDeclaredMethod("changeSchemeIfIsWebSocketUpgrade", classOf[ServerWebExchange])
-  private[websocket] val getDelegateMethod = classOf[AbstractWebSocketSession[_]].getDeclaredMethod("getDelegate")
-  private val getHeadersFiltersMethod = classOf[WebsocketRoutingFilter].getDeclaredMethod("getHeadersFilters")
-  private val cachedWebSocketSessions = new ConcurrentHashMap[String, GatewayWebSocketSessionConnection]
-  changeSchemeMethod.setAccessible(true)
-  getDelegateMethod.setAccessible(true)
-  getHeadersFiltersMethod.setAccessible(true)
-
-  Utils.defaultScheduler.scheduleAtFixedRate(new Runnable {
-    override def run(): Unit = Utils.tryQuietly {
-      cachedWebSocketSessions.filter{case (_, session) =>
-        session.removeDeadProxySessions()
-        session.canRelease
-      }.foreach{ case (key, session) =>
-        info(s"remove a dead webSocket connection $key from DWC-UI for user ${session.user}.")
-        session.release()
-        cachedWebSocketSessions.remove(key)
-      }
-      cachedWebSocketSessions.foreach(_._2.heartbeat())
-    }
-  }, SPRING_CLOUD_GATEWAY_WEBSOCKET_HEARTBEAT, SPRING_CLOUD_GATEWAY_WEBSOCKET_HEARTBEAT, TimeUnit.MILLISECONDS)
-
-  def removeAllGatewayWebSocketSessionConnection(user: String): Unit = cachedWebSocketSessions.filter(_._2.user == user).values.foreach{ session =>
-    session.release()
-  }
-
-  def removeGatewayWebSocketSessionConnection(inetSocketAddress: InetSocketAddress): Unit = cachedWebSocketSessions
-    .find(_._2.getAddress == inetSocketAddress).foreach{ case (_, session) =>
-      session.release()
-  }
-
-  private def getWebSocketSessionKey(webSocketSession: WebSocketSession): String = webSocketSession match {
-    case gatewaySession: GatewayWebSocketSessionConnection => getWebSocketSessionKey(gatewaySession.webSocketSession)
-    case _ => webSocketSession.getId
-  }
-
-  def getProxyWebSocketSession(webSocketSession: WebSocketSession, serviceInstance: ServiceInstance): WebSocketSession = {
-    val key = getWebSocketSessionKey(webSocketSession)
-    if(cachedWebSocketSessions.containsKey(key)) cachedWebSocketSessions synchronized {
-      val webSocketSession = cachedWebSocketSessions.get(key)
-      if(webSocketSession != null) webSocketSession.getProxyWebSocketSession(serviceInstance).orNull
-      else null
-    } else null
-  }
-
-  def getGatewayWebSocketSessionConnection(user: String, webSocketSession: WebSocketSession): GatewayWebSocketSessionConnection = {
-    val key = getWebSocketSessionKey(webSocketSession)
-    if(!cachedWebSocketSessions.containsKey(key)) cachedWebSocketSessions synchronized {
-      if(!cachedWebSocketSessions.containsKey(key)) {
-        info(s"receive a new webSocket connection $key from DWC-UI for user $user.")
-        cachedWebSocketSessions.put(key, new GatewayWebSocketSessionConnection(webSocketSession, user))
-      }
-    }
-    cachedWebSocketSessions.get(key)
-  }
-
-  def setProxyWebSocketSession(user: String, serviceInstance: ServiceInstance,
-                               webSocketSession: WebSocketSession, proxySession: WebSocketSession): Unit = {
-    getGatewayWebSocketSessionConnection(user, webSocketSession).add(serviceInstance, proxySession)
-  }
-
-  def getHeadersFilters(websocketRoutingFilter: WebsocketRoutingFilter): util.List[HttpHeadersFilter] =
-    getHeadersFiltersMethod.invoke(websocketRoutingFilter).asInstanceOf[util.List[HttpHeadersFilter]]
-
-  def changeSchemeIfIsWebSocketUpgrade(websocketRoutingFilter: WebsocketRoutingFilter, exchange: ServerWebExchange): Unit =
-    changeSchemeMethod.invoke(websocketRoutingFilter, exchange)
-
-  def getGatewayContext(exchange: ServerWebExchange): BaseGatewayContext = {
-    val gatewayContext = new BaseGatewayContext
-    gatewayContext.setWebSocketRequest()
-    val request = new SpringCloudGatewayHttpRequest(exchange.getRequest.asInstanceOf[AbstractServerHttpRequest])
-    gatewayContext.setRequest(request)
-    gatewayContext.setWebSocketRequest()
-    gatewayContext.setResponse(new WebsocketGatewayHttpResponse)
-    gatewayContext
-  }
-
-  def getWebSocketMessage(bufferFactory: DataBufferFactory, message: String): WebSocketMessage = {
-    val dataBuffer = bufferFactory.wrap(message.getBytes(Configuration.BDP_ENCODING.getValue))
-    new WebSocketMessage(WebSocketMessage.Type.TEXT, dataBuffer).retain()
-  }
-
-  def sendMsg(bufferFactory: DataBufferFactory, webSocketSession: WebSocketSession, message: String): Mono[Void] = {
-    val webSocketMessage = getWebSocketMessage(bufferFactory, message)
-    webSocketSession.send(Flux.just(Array(webSocketMessage):_*))
-  }
-
-  def sendMsg(exchange: ServerWebExchange, webSocketSession: WebSocketSession, message: String): Mono[Void] =
-    sendMsg(exchange.getResponse.bufferFactory(), webSocketSession, message)
-
-  def sendMsg(exchange: ServerWebExchange, webSocketSession: WebSocketSession,
-              webSocketMessage: WebSocketMessage): Mono[Void] =
-    webSocketSession.send(Flux.just(Array(webSocketMessage.retain()):_*))
-
-}
\ No newline at end of file
diff --git a/gateway/springcloudgateway/src/main/scala/com/webank/wedatasphere/linkis/gateway/springcloud/websocket/WebsocketGatewayHttpResponse.scala b/gateway/springcloudgateway/src/main/scala/com/webank/wedatasphere/linkis/gateway/springcloud/websocket/WebsocketGatewayHttpResponse.scala
deleted file mode 100644
index 6b7b063..0000000
--- a/gateway/springcloudgateway/src/main/scala/com/webank/wedatasphere/linkis/gateway/springcloud/websocket/WebsocketGatewayHttpResponse.scala
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.springcloud.websocket
-
-import com.webank.wedatasphere.linkis.gateway.http.GatewayHttpResponse
-import javax.servlet.http.Cookie
-
-/**
-  * created by cooperyang on 2019/1/9.
-  */
-class WebsocketGatewayHttpResponse extends GatewayHttpResponse {
-  private val cachedWebSocketResponseMsg = new StringBuilder
-  override def addCookie(cookie: Cookie): Unit = {}
-  override def setHeader(key: String, value: String): Unit = {}
-  override def setStatus(status: Int): Unit = {}
-  override def write(message: String): Unit = {}
-  override def writeWebSocket(message: String): Unit = cachedWebSocketResponseMsg.append(message)
-  override def redirectTo(url: String): Unit = {}
-  override def sendResponse(): Unit = {}
-  def getWebSocketMsg: String = cachedWebSocketResponseMsg.toString()
-  override def isCommitted: Boolean = cachedWebSocketResponseMsg.nonEmpty
-}
diff --git a/gateway/springcloudgateway/src/main/scala/com/webank/wedatasphere/linkis/gateway/springcloud/websocket/WebsocketGatewaySession.scala b/gateway/springcloudgateway/src/main/scala/com/webank/wedatasphere/linkis/gateway/springcloud/websocket/WebsocketGatewaySession.scala
deleted file mode 100644
index 4050162..0000000
--- a/gateway/springcloudgateway/src/main/scala/com/webank/wedatasphere/linkis/gateway/springcloud/websocket/WebsocketGatewaySession.scala
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright 2019 WeBank
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.webank.wedatasphere.linkis.gateway.springcloud.websocket
-
-import java.net.InetSocketAddress
-import java.util.function
-
-import com.webank.wedatasphere.linkis.common.ServiceInstance
-import com.webank.wedatasphere.linkis.common.utils.{Logging, Utils}
-import com.webank.wedatasphere.linkis.gateway.exception.GatewayErrorException
-import com.webank.wedatasphere.linkis.gateway.springcloud.websocket.SpringCloudGatewayWebsocketUtils._
-import com.webank.wedatasphere.linkis.server.conf.ServerConfiguration
-import io.netty.handler.codec.http.websocketx.WebSocketFrame
-import org.springframework.core.io.buffer.NettyDataBufferFactory
-import org.springframework.web.reactive.socket.adapter.ReactorNettyWebSocketSession
-import org.springframework.web.reactive.socket.adapter.ReactorNettyWebSocketSession.WebSocketConnection
-import org.springframework.web.reactive.socket.{CloseStatus, HandshakeInfo, WebSocketMessage, WebSocketSession}
-import reactor.core.publisher.{Flux, Mono}
-import reactor.ipc.netty.http.websocket.{WebsocketInbound, WebsocketOutbound}
-
-import scala.collection.mutable.ArrayBuffer
-
-/**
-  * created by cooperyang on 2019/1/9.
-  */
-class GatewayWebSocketSessionConnection(val webSocketSession: ReactorNettyWebSocketSession, val user: String, startTime: Long)
-  extends GatewayWebSocketSession(webSocketSession) with Logging {
-  def this(webSocketSession: WebSocketSession, user: String) = this(webSocketSession.asInstanceOf[ReactorNettyWebSocketSession], user, System.currentTimeMillis)
-  private val proxySessions = new ArrayBuffer[ProxyGatewayWebSocketSession](5)
-  def add(serviceInstance: ServiceInstance, proxySession: WebSocketSession): Unit = synchronized {
-    if(proxySessions.exists(session => session.serviceInstance.getApplicationName == serviceInstance.getApplicationName && session.isAlive)) {
-      proxySession.close(CloseStatus.SERVER_ERROR)
-      throw new GatewayErrorException(10032, s"Create a WebSocket connection for ${serviceInstance.getApplicationName} repeatedly!(重复地为${serviceInstance.getApplicationName}创建WebSocket连接!)")
-    }
-    proxySession match {
-      case reactorSession: ReactorNettyWebSocketSession =>
-        info(s"create a new ${serviceInstance.getApplicationName}-ProxySession(${proxySession.getId}) for the webSocket connection ${webSocketSession.getId} of user $user.")
-        proxySessions += ProxyGatewayWebSocketSession(reactorSession, serviceInstance, System.currentTimeMillis)
-    }
-  }
-
-  def getAddress: InetSocketAddress = webSocketConnection.getInbound.remoteAddress()
-
-  def getProxyWebSocketSession(serviceInstance: ServiceInstance): Option[ProxyGatewayWebSocketSession] = {
-    val proxySession = proxySessions.find(_.serviceInstance.getApplicationName == serviceInstance.getApplicationName)
-    proxySession.find(p => if(!p.isAlive) {
-      proxySessions synchronized proxySessions -= p
-      false
-    } else true)
-  }
-
-  def heartbeat(pingMsg: WebSocketMessage): Unit = proxySessions.filter(_.isAlive).foreach(_.heartbeat(pingMsg))
-  def heartbeat(): Unit = proxySessions.filter(_.isAlive).foreach(_.heartbeat())
-
-  def removeDeadProxySessions(): Unit = proxySessions synchronized proxySessions.filterNot(_.isAlive).foreach{ proxySession =>
-    info(s"remove a dead ${proxySession.serviceInstance.getApplicationName}-ProxySession(${proxySession.webSocketSession.getId}) for webSocket connection ${webSocketSession.getId}.")
-    proxySessions -= proxySession
-  }
-
-  def canRelease: Boolean = !isAlive && System.currentTimeMillis - startTime > 30000
-
-  def release(): Unit = {
-    proxySessions.filter(_.isAlive).foreach(f => Utils.tryQuietly(f.webSocketSession.close().subscribe()))
-    if(isAlive) Utils.tryQuietly(webSocketSession.close().subscribe())
-  }
-
-  override def close(): Mono[Void] = {
-    proxySessions.filter(_.isAlive).foreach(f => Utils.tryQuietly(f.webSocketSession.close().subscribe()))
-    webSocketSession.close()
-  }
-
-  override def close(status: CloseStatus): Mono[Void] = {
-    proxySessions.filter(_.isAlive).foreach(f => Utils.tryQuietly(f.webSocketSession.close(status).subscribe()))
-    webSocketSession.close(status)
-  }
-}
-case class ProxyGatewayWebSocketSession(webSocketSession: ReactorNettyWebSocketSession, serviceInstance: ServiceInstance, startTime: Long)
-  extends GatewayWebSocketSession(webSocketSession) {
-  private var lastPingTime = System.currentTimeMillis
-  override def equals(obj: scala.Any): Boolean = if(obj == null) false else obj match {
-    case w: ProxyGatewayWebSocketSession => if(w.webSocketSession != null) webSocketSession.getId == w.webSocketSession.getId else false
-    case _ => false
-  }
-  def heartbeat(pingMsg: WebSocketMessage): Unit = if(System.currentTimeMillis - lastPingTime >= SPRING_CLOUD_GATEWAY_WEBSOCKET_HEARTBEAT) {
-    webSocketSession.send(Flux.just(Array(pingMsg.retain()):_*)).subscribe()
-    lastPingTime = System.currentTimeMillis
-  }
-  def heartbeat(): Unit = heartbeat(new WebSocketMessage(WebSocketMessage.Type.PING, webSocketSession.bufferFactory().wrap("".getBytes())))
-}
-import com.webank.wedatasphere.linkis.gateway.springcloud.websocket.GatewayWebSocketSession.getWebSocketConnection
-class GatewayWebSocketSession private(inbound: WebsocketInbound,
-                                               outbound: WebsocketOutbound,
-                                               info: HandshakeInfo,
-                                               bufferFactory: NettyDataBufferFactory)
-  extends ReactorNettyWebSocketSession(inbound, outbound, info, bufferFactory) {
-  def this(webSocketSession: ReactorNettyWebSocketSession) = {
-    this(webSocketSession.getInbound,
-      webSocketSession.getOutbound, webSocketSession.getHandshakeInfo, webSocketSession.bufferFactory())
-    this.webSocketConnection = webSocketSession
-  }
-  protected var webSocketConnection: WebSocketConnection = _
-  def isAlive: Boolean = !webSocketConnection.getInbound.context().isDisposed
-
-  override def receive(): Flux[WebSocketMessage] = webSocketConnection.getInbound
-    .aggregateFrames(ServerConfiguration.BDP_SERVER_SOCKET_TEXT_MESSAGE_SIZE_MAX.getValue.toInt)
-    .receiveFrames.map(new function.Function[WebSocketFrame, WebSocketMessage] {
-    override def apply(t: WebSocketFrame): WebSocketMessage = toMessage(t)
-  })
-}
-object GatewayWebSocketSession {
-  implicit def getWebSocketConnection(webSocketSession: ReactorNettyWebSocketSession): WebSocketConnection = getDelegateMethod.invoke(webSocketSession).asInstanceOf[WebSocketConnection]
-}
\ No newline at end of file
diff --git a/images/en_US/Linkis1.0/architecture/Linkis1.0-architecture.png b/images/en_US/Linkis1.0/architecture/Linkis1.0-architecture.png
new file mode 100644
index 0000000..825672b
--- /dev/null
+++ b/images/en_US/Linkis1.0/architecture/Linkis1.0-architecture.png
Binary files differ
diff --git a/images/zh_CN/Linkis1.0/architecture/Linkis0.X-NewEngine-architecture.png b/images/zh_CN/Linkis1.0/architecture/Linkis0.X-NewEngine-architecture.png
new file mode 100644
index 0000000..57c83b3
--- /dev/null
+++ b/images/zh_CN/Linkis1.0/architecture/Linkis0.X-NewEngine-architecture.png
Binary files differ
diff --git a/images/zh_CN/Linkis1.0/architecture/Linkis1.0-EngineConn-architecture.png b/images/zh_CN/Linkis1.0/architecture/Linkis1.0-EngineConn-architecture.png
new file mode 100644
index 0000000..d95da89
--- /dev/null
+++ b/images/zh_CN/Linkis1.0/architecture/Linkis1.0-EngineConn-architecture.png
Binary files differ
diff --git a/images/zh_CN/Linkis1.0/architecture/Linkis1.0-NewEngine-architecture.png b/images/zh_CN/Linkis1.0/architecture/Linkis1.0-NewEngine-architecture.png
new file mode 100644
index 0000000..b1d60bf
--- /dev/null
+++ b/images/zh_CN/Linkis1.0/architecture/Linkis1.0-NewEngine-architecture.png
Binary files differ
diff --git a/images/zh_CN/Linkis1.0/architecture/Linkis1.0-architecture.png b/images/zh_CN/Linkis1.0/architecture/Linkis1.0-architecture.png
new file mode 100644
index 0000000..c3cb24c
--- /dev/null
+++ b/images/zh_CN/Linkis1.0/architecture/Linkis1.0-architecture.png
Binary files differ
diff --git a/images/zh_CN/Linkis1.0/architecture/Linkis1.0-newEngine-initialization.png b/images/zh_CN/Linkis1.0/architecture/Linkis1.0-newEngine-initialization.png
new file mode 100644
index 0000000..003b38e
--- /dev/null
+++ b/images/zh_CN/Linkis1.0/architecture/Linkis1.0-newEngine-initialization.png
Binary files differ
diff --git a/images/zh_CN/Linkis1.0/installation/Linkis0.X-services-list.png b/images/zh_CN/Linkis1.0/installation/Linkis0.X-services-list.png
new file mode 100644
index 0000000..c669abf
--- /dev/null
+++ b/images/zh_CN/Linkis1.0/installation/Linkis0.X-services-list.png
Binary files differ
diff --git a/images/zh_CN/Linkis1.0/installation/Linkis1.0-services-list.png b/images/zh_CN/Linkis1.0/installation/Linkis1.0-services-list.png
new file mode 100644
index 0000000..f768545
--- /dev/null
+++ b/images/zh_CN/Linkis1.0/installation/Linkis1.0-services-list.png
Binary files differ
diff --git a/k8s/README.MD b/k8s/README.MD
deleted file mode 100644
index f21d236..0000000
--- a/k8s/README.MD
+++ /dev/null
@@ -1,104 +0,0 @@
-Linkis on kubernetes
-
-#重点解决问题
-1.每个人在部署过程中,都会遇到包冲突,操作系统不兼容,openjdk,hotspot jdk兼容问题,docker交付可以从根本上解决这些问题
-
-2.docker基于cgroup资源隔离,共享文件系统,namespace 可以轻量限制计算资源,秒级扩缩容
-
-     例如:限制某个进程只能使用CPU一个核的20%资源
-     cd /sys/fs/cgroup/cpu
-     touch test 
-     $ echo 10000 > cpu.cfs_quota_us 
-     $ echo 50000 > cpu.cfs_period_us
-     启动一个进程,请不要在生产做这样操作!!!!  
-     $ while :; do :; done &
-     记录当前进程Id
-     $ echo pid >> tasks
-
-#部署文档
-    
-##基础镜像及各服务镜像编译方法
-
-  目前所有微服务镜像都上传到dockerhub,https://hub.docker.com/repository/docker/wedatasphere/linkis
-  
-  出于对虚机部署版本的考虑,新增了pom_k8s.xml,默认打包方式跟之前保持一致,如果想要自己编译镜像,需要引用pom_k8s.xml
-  
-    mvn clean package -f  gateway/gateway-ujes-support/pom_k8s.xml
-  
-  一.创建kubernetes  docker secret
-  
-      k8s/registry.yaml 修改对应harbor的账号,密码,镜像仓库地址
-      或者手动创建secret,后续拉取镜像使用,私有docker仓库请修改成私有reposity地址
-      $kubectl create secret docker-registry registry-key \
-       --docker-server=https://hub.docker.com \
-       --docker-username=wedatasphere \
-       --docker-password=***** \
-       --docker-email=wedatasphere@webank.com
-  
-  二.NFS/ceph 搭建
-  
-     搭建NFS或者ceph完成后,publicservice等微服务的deployment需要修改nfs的地址
-  
-  三.基础镜像创建文件(使用官方维护的镜像可以跳过该步骤)
-   自己制作基础镜像方法如下:
-   *  环境变量设置
-   
-        > 设置harbor的地址环境变量
-        ```
-        export HARBOR_LINKIS=
-        ```
-      
-   * 基础镜像编译打包
-        > 打包
-        ```
-        cd Linkis/emr-base
-        docker build -t $HARBOR_LINKIS/linkis:emr-base-spark2.4.4 .
-        ```
-        > 推送
-        ```
-        docker push  $HARBOR_LINKIS/linkis:emr-base-spark2.4.4 
-        ```
-   * 基础依赖包编译
-        ```
-        mvn clean install -Dmaven.test.skip=true
-        ```
-
-   * 替换各个微服务Dockerfile的基础镜像为自己的私服地址
-        ```
-        find . -name Dockerfile | xargs grep -rl "FROM wedatasphere/linkis" | xargs sed -i "" "s?FROM wedatasphere/linkis?FROM $HARBOR_LINKIS/linkis?"
-        find . -name "*.yaml" | xargs grep -rl "image: wedatasphere/linkis" | xargs sed -i "" "s?image: wedatasphere/linkis?image: $HARBOR_LINKIS/linkis?"
-        ```
-   
-   * 编译各微服务镜像
-   
-        > 各个微服务basedir下面有对应 module 的 Dockerfile
-    与公司内部的CI/CD集成,可以通过mvn docker插件直接编译docker镜像
-        ```
-        sh k8s/package.sh
-        sh k8s/build.sh
-        sh k8s/push.sh
-        ```
-     
-  四、K8S部署
-    
-    1.大数据环境配置
-      > 主要涉及 hadoop,hive,spark环境配置,需要将几个组件的配置在k8s各个节点上
-      
-      | 组件 | 版本 |  节点目录 |
-      | ---  | --- |  ---    |
-      | hadoop | 2.7.7 | /opt/hadoop/hadoop-2.7.7 |
-      | hive  | 2.3.6  | /opt/hive/apache-hive-2.3.6-bin |
-      | spark | 2.4    | /opt/spark/spark-2.4.4-bin-hadoop2.7 |   
-      
-    2.启动eureka
-      eureka部署在k8s的任意一个node节点上就可以
-      启动eureka成功后
-      修改Linkis/k8s/linkis-eureka-configmap.yaml中的eurekaUrl
-      
-    3.修改k8s目录下的linkis-*- configmap.yaml
-      特别注意配置文件的正确性,避免后续部署的低级问题出现,如数据库连接不上,hdfs地址不正确等等
-      例如gateway/linkis.properties 复制到k8s/linkis-gateway-configmap.yaml
-      
-    4.运行k8s目录下的 
-      sh init.sh
-      观察eureka上注册的服务,一共22个,都启动成功基本就没有问题
diff --git a/k8s/build.sh b/k8s/build.sh
deleted file mode 100644
index 948ad27..0000000
--- a/k8s/build.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-
-# docker build -t $HARBOR_LINKIS/linkis:emr-base-spark2.4.4 -f emr-base/Dockerfile .
-
-docker build -t $HARBOR_LINKIS/linkis:linkis-bml-0.11.0 -f bml/bmlserver/Dockerfile bml/bmlserver
-
-docker build -t $HARBOR_LINKIS/linkis:linkis-dsm-server-0.11.0 -f datasource/datasourcemanager/server/Dockerfile datasource/datasourcemanager/server
-
-docker build -t $HARBOR_LINKIS/linkis:linkis-mdm-server-0.11.0 -f datasource/metadatamanager/server/Dockerfile datasource/metadatamanager/server
-docker build -t $HARBOR_LINKIS/linkis:linkis-mdm-service-mysql-0.11.0 -f datasource/metadatamanager/service/mysql/Dockerfile datasource/metadatamanager/service/mysql
-docker build -t $HARBOR_LINKIS/linkis:linkis-mdm-service-es-0.11.0 -f datasource/metadatamanager/service/elasticsearch/Dockerfile datasource/metadatamanager/service/elasticsearch
-docker build -t $HARBOR_LINKIS/linkis:linkis-mdm-service-hive-0.11.0 -f datasource/metadatamanager/service/hive/Dockerfile datasource/metadatamanager/service/hive
-
-docker build -t $HARBOR_LINKIS/linkis:linkis-gateway-0.11.0 -f gateway/gateway-ujes-support/Dockerfile gateway/gateway-ujes-support
-
-docker build -t $HARBOR_LINKIS/linkis:linkis-resourcemanager-0.11.0 -f resourceManager/resourcemanagerserver/Dockerfile resourceManager/resourcemanagerserver
-
-docker build -t $HARBOR_LINKIS/linkis:linkis-cs-server-0.11.0 -f contextservice/cs-server/Dockerfile contextservice/cs-server
-
-docker build -t $HARBOR_LINKIS/linkis:linkis-metadata-0.11.0 -f metadata/Dockerfile metadata
-
-docker build -t $HARBOR_LINKIS/linkis:linkis-publicservice-0.11.0 -f publicService/Dockerfile publicService
-
-docker build -t $HARBOR_LINKIS/linkis:linkis-ujes-spark-enginemanager-0.11.0 -f ujes/definedEngines/spark/enginemanager/Dockerfile ujes/definedEngines/spark/enginemanager
-docker build -t $HARBOR_LINKIS/linkis:linkis-ujes-spark-entrance-0.11.0 -f ujes/definedEngines/spark/entrance/Dockerfile ujes/definedEngines/spark/entrance
-
-docker build -t $HARBOR_LINKIS/linkis:linkis-ujes-hive-enginemanager-0.11.0 -f ujes/definedEngines/hive/enginemanager/Dockerfile ujes/definedEngines/hive/enginemanager
-docker build -t $HARBOR_LINKIS/linkis:linkis-ujes-hive-entrance-0.11.0 -f ujes/definedEngines/hive/entrance/Dockerfile ujes/definedEngines/hive/entrance
-
-docker build -t $HARBOR_LINKIS/linkis:linkis-ujes-python-enginemanager-0.11.0 -f ujes/definedEngines/python/enginemanager/Dockerfile ujes/definedEngines/python/enginemanager
-docker build -t $HARBOR_LINKIS/linkis:linkis-ujes-python-entrance-0.11.0 -f ujes/definedEngines/python/entrance/Dockerfile ujes/definedEngines/python/entrance
-
-docker build -t $HARBOR_LINKIS/linkis:linkis-ujes-pipeline-enginemanager-0.11.0 -f ujes/definedEngines/pipeline/enginemanager/Dockerfile ujes/definedEngines/pipeline/enginemanager
-docker build -t $HARBOR_LINKIS/linkis:linkis-ujes-pipeline-entrance-0.11.0 -f ujes/definedEngines/pipeline/entrance/Dockerfile ujes/definedEngines/pipeline/entrance
-
-docker build -t $HARBOR_LINKIS/linkis:linkis-ujes-jdbc-enginemanager-0.11.0 -f ujes/definedEngines/jdbc/entrance/Dockerfile ujes/definedEngines/jdbc/entrance
-
-docker build -t $HARBOR_LINKIS/linkis:linkis-ujes-mlsql-entrance-0.11.0 -f ujes/definedEngines/mlsql/entrance/Dockerfile ujes/definedEngines/mlsql/entrance
-
-docker build -t $HARBOR_LINKIS/linkis:linkis-ujes-shell-enginemanager-0.11.0 -f ujes/definedEngines/shell/entrance/Dockerfile ujes/definedEngines/shell/entrance
-docker build -t $HARBOR_LINKIS/linkis:linkis-ujes-shell-entrance-0.11.0 -f ujes/definedEngines/shell/enginemanager/Dockerfile ujes/definedEngines/shell/enginemanager
-
-
diff --git a/k8s/delete.sh b/k8s/delete.sh
deleted file mode 100644
index e7179f8..0000000
--- a/k8s/delete.sh
+++ /dev/null
@@ -1,54 +0,0 @@
-kubectl delete -f register.yaml
-
-kubectl delete -f linkis-gateway-configmap.yaml
-kubectl delete -f linkis-metadata-configmap.yaml
-kubectl delete -f linkis-publicservice-configmap.yaml
-kubectl delete -f linkis-resourcemanager-configmap.yaml
-kubectl delete -f linkis-bml-configmap.yaml
-kubectl delete -f linkis-ujes-hive-enginemanager-configmap.yaml
-kubectl delete -f linkis-ujes-hive-entrance-configmap.yaml
-kubectl delete -f linkis-ujes-jdbc-entrance-configmap.yaml
-kubectl delete -f linkis-ujes-mlsql-entrance-configmap.yaml
-kubectl delete -f linkis-ujes-pipeline-enginemanager-configmap.yaml
-kubectl delete -f linkis-ujes-pipeline-entrance-configmap.yaml
-kubectl delete -f linkis-ujes-python-enginemanager-configmap.yaml
-kubectl delete -f linkis-ujes-python-entrance-configmap.yaml
-kubectl delete -f linkis-ujes-shell-enginemanager-configmap.yaml
-kubectl delete -f linkis-ujes-shell-entrance-configmap.yaml
-kubectl delete -f linkis-ujes-spark-entrance-configmap.yaml
-kubectl delete -f linkis-ujes-spark-enginemanager-configmap.yaml
-
-kubectl delete -f linkis-dsm-server-configmap.yaml
-kubectl delete -f linkis-mdm-server-configmap.yaml
-kubectl delete -f linkis-mdm-service-es-configmap.yaml
-kubectl delete -f linkis-mdm-service-hive-configmap.yaml
-kubectl delete -f linkis-mdm-service-mysql-configmap.yaml
-
-kubectl delete -f linkis-gateway-deployment.yaml
-kubectl delete -f linkis-bml-deployment.yaml
-kubectl delete -f linkis-metadata-deployment.yaml
-kubectl delete -f linkis-publicservice-deployment.yaml
-kubectl delete -f linkis-resourcemanager-deployment.yaml
-kubectl delete -f linkis-ujes-jdbc-entrance-deployment.yaml
-kubectl delete -f linkis-ujes-hive-entrance-deployment.yaml
-kubectl delete -f linkis-ujes-hive-enginemanager-deployment.yaml
-kubectl delete -f linkis-ujes-mlsql-entrance-deployment.yaml
-kubectl delete -f linkis-ujes-pipeline-entrance-deployment.yaml
-kubectl delete -f linkis-ujes-pipeline-enginemanager-deployment.yaml
-kubectl delete -f linkis-ujes-python-entrance-deployment.yaml
-kubectl delete -f linkis-ujes-python-enginemanager-deployment.yaml
-kubectl delete -f linkis-ujes-shell-entrance-deployment.yaml
-kubectl delete -f linkis-ujes-shell-enginemanager-deployment.yaml
-kubectl delete -f linkis-ujes-spark-entrance-deployment.yaml
-kubectl delete -f linkis-ujes-spark-enginemanager-deployment.yaml
-
-kubectl delete -f linkis-gateway-service.yaml
-
-kubectl delete -f linkis-dsm-server-deployment.yaml
-kubectl delete -f linkis-mdm-server-deployment.yaml
-kubectl delete -f linkis-mdm-service-es-deployment.yaml
-kubectl delete -f linkis-mdm-service-hive-deployment.yaml
-kubectl delete -f linkis-mdm-service-mysql-deployment.yaml
-
-
-
diff --git a/k8s/ingress-nginx-controller.yaml b/k8s/ingress-nginx-controller.yaml
deleted file mode 100644
index 9105310..0000000
--- a/k8s/ingress-nginx-controller.yaml
+++ /dev/null
@@ -1,678 +0,0 @@
-#
-#  Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: Namespace
-metadata:
-  name: ingress-nginx
-  labels:
-    app.kubernetes.io/name: ingress-nginx
-    app.kubernetes.io/instance: ingress-nginx
-
----
-# Source: ingress-nginx/templates/controller-serviceaccount.yaml
-apiVersion: v1
-kind: ServiceAccount
-metadata:
-  labels:
-    helm.sh/chart: ingress-nginx-2.4.0
-    app.kubernetes.io/name: ingress-nginx
-    app.kubernetes.io/instance: ingress-nginx
-    app.kubernetes.io/version: 0.33.0
-    app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/component: controller
-  name: ingress-nginx
-  namespace: ingress-nginx
----
-# Source: ingress-nginx/templates/controller-configmap.yaml
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  labels:
-    helm.sh/chart: ingress-nginx-2.4.0
-    app.kubernetes.io/name: ingress-nginx
-    app.kubernetes.io/instance: ingress-nginx
-    app.kubernetes.io/version: 0.33.0
-    app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/component: controller
-  name: ingress-nginx-controller
-  namespace: ingress-nginx
-data:
----
-# Source: ingress-nginx/templates/clusterrole.yaml
-apiVersion: rbac.authorization.k8s.io/v1
-kind: ClusterRole
-metadata:
-  labels:
-    helm.sh/chart: ingress-nginx-2.4.0
-    app.kubernetes.io/name: ingress-nginx
-    app.kubernetes.io/instance: ingress-nginx
-    app.kubernetes.io/version: 0.33.0
-    app.kubernetes.io/managed-by: Helm
-  name: ingress-nginx
-  namespace: ingress-nginx
-rules:
-  - apiGroups:
-      - ''
-    resources:
-      - configmaps
-      - endpoints
-      - nodes
-      - pods
-      - secrets
-    verbs:
-      - list
-      - watch
-  - apiGroups:
-      - ''
-    resources:
-      - nodes
-    verbs:
-      - get
-  - apiGroups:
-      - ''
-    resources:
-      - services
-    verbs:
-      - get
-      - list
-      - update
-      - watch
-  - apiGroups:
-      - extensions
-      - networking.k8s.io   # k8s 1.14+
-    resources:
-      - ingresses
-    verbs:
-      - get
-      - list
-      - watch
-  - apiGroups:
-      - ''
-    resources:
-      - events
-    verbs:
-      - create
-      - patch
-  - apiGroups:
-      - extensions
-      - networking.k8s.io   # k8s 1.14+
-    resources:
-      - ingresses/status
-    verbs:
-      - update
-  - apiGroups:
-      - networking.k8s.io   # k8s 1.14+
-    resources:
-      - ingressclasses
-    verbs:
-      - get
-      - list
-      - watch
----
-# Source: ingress-nginx/templates/clusterrolebinding.yaml
-apiVersion: rbac.authorization.k8s.io/v1
-kind: ClusterRoleBinding
-metadata:
-  labels:
-    helm.sh/chart: ingress-nginx-2.4.0
-    app.kubernetes.io/name: ingress-nginx
-    app.kubernetes.io/instance: ingress-nginx
-    app.kubernetes.io/version: 0.33.0
-    app.kubernetes.io/managed-by: Helm
-  name: ingress-nginx
-  namespace: ingress-nginx
-roleRef:
-  apiGroup: rbac.authorization.k8s.io
-  kind: ClusterRole
-  name: ingress-nginx
-subjects:
-  - kind: ServiceAccount
-    name: ingress-nginx
-    namespace: ingress-nginx
----
-# Source: ingress-nginx/templates/controller-role.yaml
-apiVersion: rbac.authorization.k8s.io/v1
-kind: Role
-metadata:
-  labels:
-    helm.sh/chart: ingress-nginx-2.4.0
-    app.kubernetes.io/name: ingress-nginx
-    app.kubernetes.io/instance: ingress-nginx
-    app.kubernetes.io/version: 0.33.0
-    app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/component: controller
-  name: ingress-nginx
-  namespace: ingress-nginx
-rules:
-  - apiGroups:
-      - ''
-    resources:
-      - namespaces
-    verbs:
-      - get
-  - apiGroups:
-      - ''
-    resources:
-      - configmaps
-      - pods
-      - secrets
-      - endpoints
-    verbs:
-      - get
-      - list
-      - watch
-  - apiGroups:
-      - ''
-    resources:
-      - services
-    verbs:
-      - get
-      - list
-      - update
-      - watch
-  - apiGroups:
-      - extensions
-      - networking.k8s.io   # k8s 1.14+
-    resources:
-      - ingresses
-    verbs:
-      - get
-      - list
-      - watch
-  - apiGroups:
-      - extensions
-      - networking.k8s.io   # k8s 1.14+
-    resources:
-      - ingresses/status
-    verbs:
-      - update
-  - apiGroups:
-      - networking.k8s.io   # k8s 1.14+
-    resources:
-      - ingressclasses
-    verbs:
-      - get
-      - list
-      - watch
-  - apiGroups:
-      - ''
-    resources:
-      - configmaps
-    resourceNames:
-      - ingress-controller-leader-nginx
-    verbs:
-      - get
-      - update
-  - apiGroups:
-      - ''
-    resources:
-      - configmaps
-    verbs:
-      - create
-  - apiGroups:
-      - ''
-    resources:
-      - endpoints
-    verbs:
-      - create
-      - get
-      - update
-  - apiGroups:
-      - ''
-    resources:
-      - events
-    verbs:
-      - create
-      - patch
----
-# Source: ingress-nginx/templates/controller-rolebinding.yaml
-apiVersion: rbac.authorization.k8s.io/v1
-kind: RoleBinding
-metadata:
-  labels:
-    helm.sh/chart: ingress-nginx-2.4.0
-    app.kubernetes.io/name: ingress-nginx
-    app.kubernetes.io/instance: ingress-nginx
-    app.kubernetes.io/version: 0.33.0
-    app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/component: controller
-  name: ingress-nginx
-  namespace: ingress-nginx
-roleRef:
-  apiGroup: rbac.authorization.k8s.io
-  kind: Role
-  name: ingress-nginx
-subjects:
-  - kind: ServiceAccount
-    name: ingress-nginx
-    namespace: ingress-nginx
----
-# Source: ingress-nginx/templates/controller-service-webhook.yaml
-apiVersion: v1
-kind: Service
-metadata:
-  labels:
-    helm.sh/chart: ingress-nginx-2.4.0
-    app.kubernetes.io/name: ingress-nginx
-    app.kubernetes.io/instance: ingress-nginx
-    app.kubernetes.io/version: 0.33.0
-    app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/component: controller
-  name: ingress-nginx-controller-admission
-  namespace: ingress-nginx
-spec:
-  type: ClusterIP
-  ports:
-    - name: https-webhook
-      port: 443
-      targetPort: webhook
-  selector:
-    app.kubernetes.io/name: ingress-nginx
-    app.kubernetes.io/instance: ingress-nginx
-    app.kubernetes.io/component: controller
----
-# Source: ingress-nginx/templates/controller-service.yaml
-apiVersion: v1
-kind: Service
-metadata:
-  labels:
-    helm.sh/chart: ingress-nginx-2.4.0
-    app.kubernetes.io/name: ingress-nginx
-    app.kubernetes.io/instance: ingress-nginx
-    app.kubernetes.io/version: 0.33.0
-    app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/component: controller
-  name: ingress-nginx-controller
-  namespace: ingress-nginx
-spec:
-  type: NodePort
-  ports:
-    - name: http
-      port: 80
-      protocol: TCP
-      #targetPort: http
-      nodePort: 31234
-    - name: https
-      port: 443
-      protocol: TCP
-      #targetPort: https
-      nodePort: 31235
-  selector:
-    app.kubernetes.io/name: ingress-nginx
-    app.kubernetes.io/instance: ingress-nginx
-    app.kubernetes.io/component: controller
----
-# Source: ingress-nginx/templates/controller-deployment.yaml
-apiVersion: apps/v1
-kind: Deployment
-metadata:
-  labels:
-    helm.sh/chart: ingress-nginx-2.4.0
-    app.kubernetes.io/name: ingress-nginx
-    app.kubernetes.io/instance: ingress-nginx
-    app.kubernetes.io/version: 0.33.0
-    app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/component: controller
-    nginx.ingress.kubernetes.io/proxy-connect-timeout: "600"
-    nginx.ingress.kubernetes.io/proxy-read-timeout: "600"
-    nginx.ingress.kubernetes.io/proxy-send-timeout: "600"
-  name: ingress-nginx-controller
-  namespace: ingress-nginx
-spec:
-  selector:
-    matchLabels:
-      app.kubernetes.io/name: ingress-nginx
-      app.kubernetes.io/instance: ingress-nginx
-      app.kubernetes.io/component: controller
-  revisionHistoryLimit: 10
-  strategy:
-    rollingUpdate:
-      maxUnavailable: 1
-    type: RollingUpdate
-  minReadySeconds: 0
-  template:
-    metadata:
-      labels:
-        app.kubernetes.io/name: ingress-nginx
-        app.kubernetes.io/instance: ingress-nginx
-        app.kubernetes.io/component: controller
-    spec:
-      dnsPolicy: ClusterFirst
-      containers:
-        - name: controller
-          image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.33.0
-          imagePullPolicy: IfNotPresent
-          lifecycle:
-            preStop:
-              exec:
-                command:
-                  - /wait-shutdown
-          args:
-            - /nginx-ingress-controller
-            - --election-id=ingress-controller-leader
-            - --ingress-class=nginx
-            - --configmap=ingress-nginx/ingress-nginx-controller
-            - --validating-webhook=:8443
-            - --validating-webhook-certificate=/usr/local/certificates/cert
-            - --validating-webhook-key=/usr/local/certificates/key
-            - --publish-status-address=localhost
-          securityContext:
-            capabilities:
-              drop:
-                - ALL
-              add:
-                - NET_BIND_SERVICE
-            runAsUser: 101
-            allowPrivilegeEscalation: true
-          env:
-            - name: POD_NAME
-              valueFrom:
-                fieldRef:
-                  fieldPath: metadata.name
-            - name: POD_NAMESPACE
-              valueFrom:
-                fieldRef:
-                  fieldPath: metadata.namespace
-          livenessProbe:
-            httpGet:
-              path: /healthz
-              port: 10254
-              scheme: HTTP
-            initialDelaySeconds: 10
-            periodSeconds: 10
-            timeoutSeconds: 1
-            successThreshold: 1
-            failureThreshold: 3
-          readinessProbe:
-            httpGet:
-              path: /healthz
-              port: 10254
-              scheme: HTTP
-            initialDelaySeconds: 10
-            periodSeconds: 10
-            timeoutSeconds: 1
-            successThreshold: 1
-            failureThreshold: 3
-          ports:
-            - name: http
-              containerPort: 80
-              protocol: TCP
-              hostPort: 80
-            - name: https
-              containerPort: 443
-              protocol: TCP
-              hostPort: 443
-            - name: webhook
-              containerPort: 8443
-              protocol: TCP
-          volumeMounts:
-            - name: webhook-cert
-              mountPath: /usr/local/certificates/
-              readOnly: true
-          resources:
-            requests:
-              cpu: 100m
-              memory: 90Mi
-      nodeSelector:
-        ingress-ready: 'true'
-      tolerations:
-        - effect: NoSchedule
-          key: node-role.kubernetes.io/master
-          operator: Equal
-      serviceAccountName: ingress-nginx
-      terminationGracePeriodSeconds: 0
-      volumes:
-        - name: webhook-cert
-          secret:
-            secretName: ingress-nginx-admission
----
-# Source: ingress-nginx/templates/admission-webhooks/validating-webhook.yaml
-apiVersion: admissionregistration.k8s.io/v1beta1
-kind: ValidatingWebhookConfiguration
-metadata:
-  labels:
-    helm.sh/chart: ingress-nginx-2.4.0
-    app.kubernetes.io/name: ingress-nginx
-    app.kubernetes.io/instance: ingress-nginx
-    app.kubernetes.io/version: 0.33.0
-    app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/component: admission-webhook
-  name: ingress-nginx-admission
-  namespace: ingress-nginx
-webhooks:
-  - name: validate.nginx.ingress.kubernetes.io
-    rules:
-      - apiGroups:
-          - extensions
-          - networking.k8s.io
-        apiVersions:
-          - v1beta1
-        operations:
-          - CREATE
-          - UPDATE
-        resources:
-          - ingresses
-    failurePolicy: Fail
-    clientConfig:
-      service:
-        namespace: ingress-nginx
-        name: ingress-nginx-controller-admission
-        path: /extensions/v1beta1/ingresses
----
-# Source: ingress-nginx/templates/admission-webhooks/job-patch/clusterrole.yaml
-apiVersion: rbac.authorization.k8s.io/v1
-kind: ClusterRole
-metadata:
-  name: ingress-nginx-admission
-  annotations:
-    helm.sh/hook: pre-install,pre-upgrade,post-install,post-upgrade
-    helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
-  labels:
-    helm.sh/chart: ingress-nginx-2.4.0
-    app.kubernetes.io/name: ingress-nginx
-    app.kubernetes.io/instance: ingress-nginx
-    app.kubernetes.io/version: 0.33.0
-    app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/component: admission-webhook
-  namespace: ingress-nginx
-rules:
-  - apiGroups:
-      - admissionregistration.k8s.io
-    resources:
-      - validatingwebhookconfigurations
-    verbs:
-      - get
-      - update
----
-# Source: ingress-nginx/templates/admission-webhooks/job-patch/clusterrolebinding.yaml
-apiVersion: rbac.authorization.k8s.io/v1
-kind: ClusterRoleBinding
-metadata:
-  name: ingress-nginx-admission
-  annotations:
-    helm.sh/hook: pre-install,pre-upgrade,post-install,post-upgrade
-    helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
-  labels:
-    helm.sh/chart: ingress-nginx-2.4.0
-    app.kubernetes.io/name: ingress-nginx
-    app.kubernetes.io/instance: ingress-nginx
-    app.kubernetes.io/version: 0.33.0
-    app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/component: admission-webhook
-  namespace: ingress-nginx
-roleRef:
-  apiGroup: rbac.authorization.k8s.io
-  kind: ClusterRole
-  name: ingress-nginx-admission
-subjects:
-  - kind: ServiceAccount
-    name: ingress-nginx-admission
-    namespace: ingress-nginx
----
-# Source: ingress-nginx/templates/admission-webhooks/job-patch/job-createSecret.yaml
-apiVersion: batch/v1
-kind: Job
-metadata:
-  name: ingress-nginx-admission-create
-  annotations:
-    helm.sh/hook: pre-install,pre-upgrade
-    helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
-  labels:
-    helm.sh/chart: ingress-nginx-2.4.0
-    app.kubernetes.io/name: ingress-nginx
-    app.kubernetes.io/instance: ingress-nginx
-    app.kubernetes.io/version: 0.33.0
-    app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/component: admission-webhook
-  namespace: ingress-nginx
-spec:
-  template:
-    metadata:
-      name: ingress-nginx-admission-create
-      labels:
-        helm.sh/chart: ingress-nginx-2.4.0
-        app.kubernetes.io/name: ingress-nginx
-        app.kubernetes.io/instance: ingress-nginx
-        app.kubernetes.io/version: 0.33.0
-        app.kubernetes.io/managed-by: Helm
-        app.kubernetes.io/component: admission-webhook
-    spec:
-      containers:
-        - name: create
-          image: jettech/kube-webhook-certgen:v1.2.0
-          imagePullPolicy: IfNotPresent
-          args:
-            - create
-            - --host=ingress-nginx-controller-admission,ingress-nginx-controller-admission.ingress-nginx.svc
-            - --namespace=ingress-nginx
-            - --secret-name=ingress-nginx-admission
-      restartPolicy: OnFailure
-      serviceAccountName: ingress-nginx-admission
-      securityContext:
-        runAsNonRoot: true
-        runAsUser: 2000
----
-# Source: ingress-nginx/templates/admission-webhooks/job-patch/job-patchWebhook.yaml
-apiVersion: batch/v1
-kind: Job
-metadata:
-  name: ingress-nginx-admission-patch
-  annotations:
-    helm.sh/hook: post-install,post-upgrade
-    helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
-  labels:
-    helm.sh/chart: ingress-nginx-2.4.0
-    app.kubernetes.io/name: ingress-nginx
-    app.kubernetes.io/instance: ingress-nginx
-    app.kubernetes.io/version: 0.33.0
-    app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/component: admission-webhook
-  namespace: ingress-nginx
-spec:
-  template:
-    metadata:
-      name: ingress-nginx-admission-patch
-      labels:
-        helm.sh/chart: ingress-nginx-2.4.0
-        app.kubernetes.io/name: ingress-nginx
-        app.kubernetes.io/instance: ingress-nginx
-        app.kubernetes.io/version: 0.33.0
-        app.kubernetes.io/managed-by: Helm
-        app.kubernetes.io/component: admission-webhook
-    spec:
-      containers:
-        - name: patch
-          image: jettech/kube-webhook-certgen:v1.2.0
-          imagePullPolicy: IfNotPresent
-          args:
-            - patch
-            - --webhook-name=ingress-nginx-admission
-            - --namespace=ingress-nginx
-            - --patch-mutating=false
-            - --secret-name=ingress-nginx-admission
-            - --patch-failure-policy=Fail
-      restartPolicy: OnFailure
-      serviceAccountName: ingress-nginx-admission
-      securityContext:
-        runAsNonRoot: true
-        runAsUser: 2000
----
-# Source: ingress-nginx/templates/admission-webhooks/job-patch/role.yaml
-apiVersion: rbac.authorization.k8s.io/v1
-kind: Role
-metadata:
-  name: ingress-nginx-admission
-  annotations:
-    helm.sh/hook: pre-install,pre-upgrade,post-install,post-upgrade
-    helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
-  labels:
-    helm.sh/chart: ingress-nginx-2.4.0
-    app.kubernetes.io/name: ingress-nginx
-    app.kubernetes.io/instance: ingress-nginx
-    app.kubernetes.io/version: 0.33.0
-    app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/component: admission-webhook
-  namespace: ingress-nginx
-rules:
-  - apiGroups:
-      - ''
-    resources:
-      - secrets
-    verbs:
-      - get
-      - create
----
-# Source: ingress-nginx/templates/admission-webhooks/job-patch/rolebinding.yaml
-apiVersion: rbac.authorization.k8s.io/v1
-kind: RoleBinding
-metadata:
-  name: ingress-nginx-admission
-  annotations:
-    helm.sh/hook: pre-install,pre-upgrade,post-install,post-upgrade
-    helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
-  labels:
-    helm.sh/chart: ingress-nginx-2.4.0
-    app.kubernetes.io/name: ingress-nginx
-    app.kubernetes.io/instance: ingress-nginx
-    app.kubernetes.io/version: 0.33.0
-    app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/component: admission-webhook
-  namespace: ingress-nginx
-roleRef:
-  apiGroup: rbac.authorization.k8s.io
-  kind: Role
-  name: ingress-nginx-admission
-subjects:
-  - kind: ServiceAccount
-    name: ingress-nginx-admission
-    namespace: ingress-nginx
----
-# Source: ingress-nginx/templates/admission-webhooks/job-patch/serviceaccount.yaml
-apiVersion: v1
-kind: ServiceAccount
-metadata:
-  name: ingress-nginx-admission
-  annotations:
-    helm.sh/hook: pre-install,pre-upgrade,post-install,post-upgrade
-    helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
-  labels:
-    helm.sh/chart: ingress-nginx-2.4.0
-    app.kubernetes.io/name: ingress-nginx
-    app.kubernetes.io/instance: ingress-nginx
-    app.kubernetes.io/version: 0.33.0
-    app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/component: admission-webhook
-  namespace: ingress-nginx
\ No newline at end of file
diff --git a/k8s/ingress.yaml b/k8s/ingress.yaml
deleted file mode 100644
index 6811557..0000000
--- a/k8s/ingress.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-#  Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: extensions/v1beta1
-kind: Ingress
-metadata:
-  name: linkis-gateway-ingress
-spec:
-  rules:
-    - host:
-      http:
-        paths:
-          - path: /api
-            backend:
-              serviceName: linkis-gateway-service
-              servicePort: 14001
-          - path: /ws
-            backend:
-              serviceName: linkis-gateway-service
-              servicePort: 14001
-          - path: /
-            backend:
-              serviceName: scriptis-service
-              servicePort: 80
\ No newline at end of file
diff --git a/k8s/init.sh b/k8s/init.sh
deleted file mode 100644
index 61748af..0000000
--- a/k8s/init.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-kubectl create -f register.yaml
-
-kubectl apply -f linkis-eureka-configmap.yaml
-
-kubectl create -f linkis-gateway-configmap.yaml
-kubectl create -f linkis-metadata-configmap.yaml
-kubectl create -f linkis-publicservice-configmap.yaml
-kubectl create -f linkis-resourcemanager-configmap.yaml
-kubectl create -f linkis-cs-server-configmap.yaml
-kubectl create -f linkis-bml-configmap.yaml
-kubectl create -f linkis-ujes-hive-enginemanager-configmap.yaml
-kubectl create -f linkis-ujes-hive-entrance-configmap.yaml
-kubectl create -f linkis-ujes-jdbc-entrance-configmap.yaml
-kubectl create -f linkis-ujes-mlsql-entrance-configmap.yaml
-kubectl create -f linkis-ujes-pipeline-enginemanager-configmap.yaml
-kubectl create -f linkis-ujes-pipeline-entrance-configmap.yaml
-kubectl create -f linkis-ujes-python-enginemanager-configmap.yaml
-kubectl create -f linkis-ujes-python-entrance-configmap.yaml
-kubectl create -f linkis-ujes-shell-enginemanager-configmap.yaml
-kubectl create -f linkis-ujes-shell-entrance-configmap.yaml
-kubectl create -f linkis-ujes-spark-entrance-configmap.yaml
-kubectl create -f linkis-ujes-spark-enginemanager-configmap.yaml
-
-kubectl create -f linkis-dsm-server-configmap.yaml
-kubectl create -f linkis-mdm-server-configmap.yaml
-kubectl create -f linkis-mdm-service-es-configmap.yaml
-kubectl create -f linkis-mdm-service-hive-configmap.yaml
-kubectl create -f linkis-mdm-service-mysql-configmap.yaml
-
-
-kubectl create -f linkis-gateway-deployment.yaml
-kubectl create -f linkis-bml-deployment.yaml
-kubectl create -f linkis-metadata-deployment.yaml
-kubectl create -f linkis-publicservice-deployment.yaml
-kubectl create -f linkis-resourcemanager-deployment.yaml
-kubectl create -f linkis-cs-server-deployment.yaml
-kubectl create -f linkis-ujes-jdbc-entrance-deployment.yaml
-kubectl create -f linkis-ujes-hive-entrance-deployment.yaml
-kubectl create -f linkis-ujes-hive-enginemanager-deployment.yaml
-kubectl create -f linkis-ujes-mlsql-entrance-deployment.yaml
-kubectl create -f linkis-ujes-pipeline-entrance-deployment.yaml
-kubectl create -f linkis-ujes-pipeline-enginemanager-deployment.yaml
-kubectl create -f linkis-ujes-python-entrance-deployment.yaml
-kubectl create -f linkis-ujes-python-enginemanager-deployment.yaml
-kubectl create -f linkis-ujes-shell-entrance-deployment.yaml
-kubectl create -f linkis-ujes-shell-enginemanager-deployment.yaml
-kubectl create -f linkis-ujes-spark-entrance-deployment.yaml
-kubectl create -f linkis-ujes-spark-enginemanager-deployment.yaml
-
-kubectl create -f linkis-gateway-service.yaml
-
-
-kubectl create -f linkis-dsm-server-deployment.yaml
-kubectl create -f linkis-mdm-server-deployment.yaml
-kubectl create -f linkis-mdm-service-es-deployment.yaml
-kubectl create -f linkis-mdm-service-hive-deployment.yaml
-kubectl create -f linkis-mdm-service-mysql-deployment.yaml
-
diff --git a/k8s/linkis-bml-configmap.yaml b/k8s/linkis-bml-configmap.yaml
deleted file mode 100644
index 0ced165..0000000
--- a/k8s/linkis-bml-configmap.yaml
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-#  Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-data:
-  linkis.properties: |+
-    wds.linkis.server.mybatis.mapperLocations=classpath:com/webank/wedatasphere/linkis/bml/dao/impl/*.xml
-    wds.linkis.server.mybatis.typeAliasesPackage=com.webank.wedatasphere.linkis.bml.dao
-    wds.linkis.server.mybatis.BasePackage=com.webank.wedatasphere.linkis.bml.dao
-    wds.test.mode=true
-    wds.linkis.server.restful.scan.packages=com.webank.wedatasphere.linkis.bml.restful
-
-    #sit
-    wds.linkis.server.mybatis.datasource.url=
-    wds.linkis.server.mybatis.datasource.username=
-    wds.linkis.server.mybatis.datasource.password=
-    wds.linkis.server.version=v1
-
-    #hadoop.config.dir
-
-kind: ConfigMap
-metadata:
-  managedFields:
-  - apiVersion: v1
-    fieldsType: FieldsV1
-    fieldsV1:
-      f:data:
-        .: {}
-        f:linkis-bml.properties: {}
-    manager: kubectl
-    operation: Update
-  name: linkis-bml-config
-  namespace: default
-
diff --git a/k8s/linkis-bml-deployment.yaml b/k8s/linkis-bml-deployment.yaml
deleted file mode 100644
index 390ebd1..0000000
--- a/k8s/linkis-bml-deployment.yaml
+++ /dev/null
@@ -1,111 +0,0 @@
-#
-#  Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: apps/v1
-kind: Deployment
-metadata:
-  name: linkis-bml-deployment
-spec:
-  replicas: 1
-  selector:
-    matchLabels:
-      app: linkis-bml
-      # release: dev
-  strategy:
-    rollingUpdate:
-      maxSurge: 1
-      maxUnavailable: 1
-    type: RollingUpdate
-  
-  template:
-    metadata:
-      labels:
-        app: linkis-bml
-        # release: dev
-    spec:
-      affinity:
-        podAntiAffinity:
-          requiredDuringSchedulingIgnoredDuringExecution:
-            - labelSelector:
-                matchExpressions:
-                  - key: "app"
-                    operator: In
-                    values:
-                      - linkis-bml
-              topologyKey: "kubernetes.io/hostname"
-      containers:
-      - name: linkis-bml
-        image: wedatasphere/linkis:linkis-bml-0.11.0
-        lifecycle:
-            preStop:
-              exec:
-                command: ["sh","/opt/linkis/linkis-bml/bin/stop.sh"]
-        imagePullPolicy: Always
-        ports:
-        - name: http
-          containerPort: 14009
-        livenessProbe:
-            tcpSocket:
-              port: 14009
-            initialDelaySeconds: 15
-            periodSeconds: 20
-        env:
-          - name: EUREKA_URL
-            valueFrom:
-              configMapKeyRef:
-                name: eureka-config
-                key: eurekaUrl
-          - name: SERVER_HEAP_SIZE
-            value: 1024M
-          - name: START_PORT
-            value: "14009"
-        volumeMounts:
-          - name: linkis-bml-config
-            mountPath: /opt/linkis/conf
-          #          - name: resultset
-          #            mountPath: /opt/linkis/data
-          - name: varlog
-            mountPath: /opt/linkis/linkis-bml/logs
-          - name: hadoop-config
-            mountPath: /opt/hadoop/hadoop-2.7.7/etc/hadoop
-          - name: hive-config
-            mountPath: /opt/hive/apache-hive-2.3.6-bin/conf
-          - name: spark-config
-            mountPath: /opt/spark/spark-2.4.4-bin-hadoop2.7/conf
-      imagePullSecrets:
-        - name: registry-key
-      volumes:
-        - name: eureka-config
-          configMap:
-            name: eureka-config
-        - name: linkis-bml-config
-          configMap:
-            name: linkis-bml-config
-        #        - name: resultset
-        #          nfs:
-        #            path: /data/k8s
-        #            server: 10.206.0.12
-        - name: varlog
-          hostPath:
-            path: /var/log
-        - name: hadoop-config
-          hostPath:
-            path: /opt/hadoop/hadoop-2.7.7/etc/hadoop
-        - name: hive-config
-          hostPath:
-            path: /opt/hive/apache-hive-2.3.6-bin/conf
-        - name: spark-config
-          hostPath:
-            path: /opt/spark/spark-2.4.4-bin-hadoop2.7/conf
diff --git a/k8s/linkis-cs-server-configmap.yaml b/k8s/linkis-cs-server-configmap.yaml
deleted file mode 100644
index 4ed3808..0000000
--- a/k8s/linkis-cs-server-configmap.yaml
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-#  Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-apiVersion: v1
-data:
-  linkis.properties: |+
-    #wds.linkis.test.mode=true
-    wds.linkis.server.mybatis.datasource.url=jdbc:mysql://127.0.0.1:3306/ide_gz_bdap_sit_01?characterEncoding=UTF-8
-    wds.linkis.server.mybatis.datasource.username=
-    wds.linkis.server.mybatis.datasource.password=
-    wds.linkis.log.clear=true
-    wds.linkis.server.version=v1
-    ##restful
-    wds.linkis.server.restful.scan.packages=com.webank.wedatasphere.linkis.cs.server.restful
-    ##mybatis
-    wds.linkis.server.mybatis.mapperLocations=classpath*:com\\webank\\wedatasphere\\linkis\\cs\\persistence\\dao\\impl\\*.xml
-    wds.linkis.server.mybatis.typeAliasesPackage=com.webank.wedatasphere.linkis.cs.persistence.entity
-    wds.linkis.server.mybatis.BasePackage=com.webank.wedatasphere.linkis.cs.persistence.dao
-
-kind: ConfigMap
-metadata:
-  managedFields:
-  - apiVersion: v1
-    fieldsType: FieldsV1
-    fieldsV1:
-      f:data:
-        .: {}
-        f:linkis-cs-server.properties: {}
-    manager: kubectl
-    operation: Update
-  name: linkis-cs-server-config
-  namespace: default
-
diff --git a/k8s/linkis-cs-server-deployment.yaml b/k8s/linkis-cs-server-deployment.yaml
deleted file mode 100644
index 1afcd5a..0000000
--- a/k8s/linkis-cs-server-deployment.yaml
+++ /dev/null
@@ -1,115 +0,0 @@
-#
-#  Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: apps/v1
-kind: Deployment
-metadata:
-  name: linkis-cs-server-deployment
-spec:
-  replicas: 1
-  selector:
-    matchLabels:
-      app: linkis-cs-server
-      # release: dev
-  strategy:
-    rollingUpdate:
-      maxSurge: 1
-      maxUnavailable: 1
-    type: RollingUpdate
-  template:
-    metadata:
-      labels:
-        app: linkis-cs-server
-        release: dev
-    spec:
-      affinity:
-          podAntiAffinity:
-            requiredDuringSchedulingIgnoredDuringExecution:
-              - labelSelector:
-                  matchExpressions:
-                    - key: "app"
-                      operator: In
-                      values:
-                        - linkis-cs-server
-                topologyKey: "kubernetes.io/hostname"
-      containers:
-      - name: linkis-cs-server
-        image: wedatasphere/linkis:linkis-cs-server-0.11.0
-        lifecycle:
-            preStop:
-              exec:
-                command: ["sh","/opt/linkis/linkis-cs-server/bin/stop.sh"]
-        imagePullPolicy: Always
-        ports:
-        - name: http
-          containerPort: 14004
-        livenessProbe:
-            tcpSocket:
-              port: 14004
-            initialDelaySeconds: 15
-            periodSeconds: 20
-        env:
-          - name: eurekaurl
-            valueFrom:
-              configMapKeyRef:
-                name: eureka-config
-                key: eurekaUrl
-          - name: EUREKA_URL
-            valueFrom:
-              configMapKeyRef:
-                name: eureka-config
-                key: eurekaUrl
-          - name: SERVER_HEAP_SIZE
-            value: 1024M
-          - name: START_PORT
-            value: "14004"
-        volumeMounts:
-          - name: linkis-cs-server-config
-            mountPath: /opt/linkis/conf
-          #          - name: resultset
-          #            mountPath: /opt/linkis/data
-          - name: varlog
-            mountPath: /opt/linkis/linkis-cs-server/logs
-          - name: hadoop-config
-            mountPath: /opt/hadoop/hadoop-2.7.7/etc/hadoop
-          - name: hive-config
-            mountPath: /opt/hive/apache-hive-2.3.6-bin/conf
-          - name: spark-config
-            mountPath: /opt/spark/spark-2.4.4-bin-hadoop2.7/conf
-      imagePullSecrets:
-        - name: registry-key
-      volumes:
-        - name: linkis-cs-server-config
-          configMap:
-            name: linkis-cs-server-config
-        #        - name: resultset
-        #          nfs:
-        #            path: /data/k8s
-        #            server: 10.206.0.12
-        - name: varlog
-          hostPath:
-            path: /var/log
-        - name: eureka-config
-          configMap:
-            name: eureka-config
-        - name: hadoop-config
-          hostPath:
-            path: /opt/hadoop/hadoop-2.7.7/etc/hadoop
-        - name: hive-config
-          hostPath:
-            path: /opt/hive/apache-hive-2.3.6-bin/conf
-        - name: spark-config
-          hostPath:
-            path: /opt/spark/spark-2.4.4-bin-hadoop2.7/conf
diff --git a/k8s/linkis-dsm-server-configmap.yaml b/k8s/linkis-dsm-server-configmap.yaml
deleted file mode 100644
index 835fdb9..0000000
--- a/k8s/linkis-dsm-server-configmap.yaml
+++ /dev/null
@@ -1,68 +0,0 @@
-#
-#  Copyright 2019 WeBank
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-data:
-  linkis.properties: |+
-    #
-    # Copyright 2019 WeBank
-    # Licensed under the Apache License, Version 2.0 (the "License");
-    #  you may not use this file except in compliance with the License.
-    # You may obtain a copy of the License at
-    # http://www.apache.org/licenses/LICENSE-2.0
-    # Unless required by applicable law or agreed to in writing, software
-    # distributed under the License is distributed on an "AS IS" BASIS,
-    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    # See the License for the specific language governing permissions and
-    # limitations under the License.
-    #
-
-    wds.linkis.server.mybatis.mapperLocations=classpath:com/webank/wedatasphere/linkis/datasourcemanager/core/dao/mapper/*.xml
-    wds.linkis.server.mybatis.typeAliasesPackage=com.webank.wedatasphere.linkis.datasourcemanager.common.domain
-    wds.linkis.server.mybatis.BasePackage=com.webank.wedatasphere.linkis.datasourcemanager.core.dao
-
-    wds.linkis.server.restful.scan.packages=com.webank.wedatasphere.linkis.datasourcemanager.core.restful
-
-    #sit
-    wds.linkis.server.version=v1
-
-    #test
-    wds.linkis.test.mode=true
-    wds.linkis.test.user=
-    wds.linkis.server.mybatis.datasource.url=
-    wds.linkis.server.mybatis.datasource.username=
-    wds.linkis.server.mybatis.datasource.password=
-
-    #dsm
-    wds.linkis.server.dsm.admin.users=
-
-    #bml
-    wds.linkis.gateway.ip=