You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by me...@apache.org on 2022/07/11 16:53:11 UTC

[shardingsphere] branch master updated: Remove FileRepository (#19040)

This is an automated email from the ASF dual-hosted git repository.

menghaoran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 05748c49714 Remove FileRepository (#19040)
05748c49714 is described below

commit 05748c49714df255dc948f7c8e5b25357060406e
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Tue Jul 12 00:52:59 2022 +0800

    Remove FileRepository (#19040)
---
 docs/blog/content/material/proxyIntroduce.cn.md    |   4 +-
 .../builtin-algorithm/metadata-repository.cn.md    |   8 +-
 .../builtin-algorithm/metadata-repository.en.md    |  12 ++-
 .../spring-namespace/mode.cn.md                    |   8 +-
 .../spring-namespace/mode.en.md                    |   8 +-
 .../spring-namespace/config/standalone-file.ftl    |   6 +-
 .../template/proxy/mode/standalone-file.ftl        |   4 +-
 .../resources/META-INF/sharding-databases.yaml     |   2 +-
 .../shardingsphere-jdbc-core/pom.xml               |   5 -
 .../pom.xml                                        |   5 -
 .../spring/standalone-application-context.xml      |   6 +-
 .../pom.xml                                        |   1 -
 .../pom.xml                                        |  36 -------
 .../repository/standalone/file/FileRepository.java | 116 ---------------------
 .../file/FileRepositoryDeleteVisitor.java          |  53 ----------
 .../standalone/file/FileRepositoryProperties.java  |  31 ------
 .../standalone/file/FileRepositoryPropertyKey.java |  38 -------
 ...pository.standalone.StandalonePersistRepository |  18 ----
 .../standalone/file/FileRepositoryTest.java        |  70 -------------
 .../shardingsphere-proxy-backend/pom.xml           |   5 -
 .../shardingsphere-proxy-bootstrap/pom.xml         |   5 -
 21 files changed, 22 insertions(+), 419 deletions(-)

diff --git a/docs/blog/content/material/proxyIntroduce.cn.md b/docs/blog/content/material/proxyIntroduce.cn.md
index 80c8d86562a..7df1a9f2dbf 100644
--- a/docs/blog/content/material/proxyIntroduce.cn.md
+++ b/docs/blog/content/material/proxyIntroduce.cn.md
@@ -106,9 +106,9 @@ server.yaml 配置中默认集群运行模式,这里提供一份单机的运
 mode:
  type: Standalone # 单机模式
  repository:
-   type: File
+   type: H2
    props:
-     path: /Users/xxx/software/apache-shardingsphere-5.1.0-shardingsphere-proxy/file # 元数据配置等持久化文件路径
+     jdbcUrl: jdbc:h2:file:~/config_data # 元数据持久化数据库连接 URL
  overwrite: false # 是否覆盖已存在的元数据
 
 rules: # 认证信息
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/metadata-repository.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/metadata-repository.cn.md
index a07910fcf51..a333ef6bf9a 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/metadata-repository.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/metadata-repository.cn.md
@@ -3,9 +3,9 @@ title = "元数据持久化仓库"
 weight = 1
 +++
 
-## 文件持久化
+## H2 数据库持久化
 
-类型:File
+类型:H2
 
 适用模式:Standalone
 
@@ -13,7 +13,9 @@ weight = 1
 
 | *名称*                        | *数据类型* | *说明*            | *默认值*         |
 | ---------------------------- | --------- | ---------------- | --------------- |
-| path                         | String    | 元数据存储路径      | .shardingsphere |
+| jdbcUrl                      | String    | 连接数据库的 URL   | jdbc:h2:mem:config;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL |
+| user                         | String    | 访问数据库的用户名  | sa                                                                      |
+| password                     | String    | 访问数据库的密码    |                                                                         |
 
 ## ZooKeeper 持久化
 
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/metadata-repository.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/metadata-repository.en.md
index 369a29e36cf..daebd3582bf 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/metadata-repository.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/metadata-repository.en.md
@@ -3,17 +3,19 @@ title = "Metadata Repository"
 weight = 1
 +++
 
-## File Repository
+## H2 Repository
 
-Type: File
+Type: H2
 
 Mode: Standalone
 
 Attributes:
 
-| *Name*                       | *Type* | *Description*                     | *Default Value* |
-| ---------------------------- | ------ | --------------------------------- | --------------- |
-| path                         | String | Path for metadata persist         | .shardingsphere |
+| *Name*                       | *Type* | *Description*                     | *Default Value*                                                         |
+| ---------------------------- | ------ | --------------------------------- | ----------------------------------------------------------------------- |
+| jdbcUrl                      | String | Database access URL               | jdbc:h2:mem:config;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL |
+| user                         | String | Database access username          | sa                                                                      |
+| password                     | String | Database access password          |                                                                         |
 
 ## ZooKeeper Repository
 
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/spring-namespace/mode.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/spring-namespace/mode.cn.md
index d048c8b8953..73e24b5434a 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/spring-namespace/mode.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/spring-namespace/mode.cn.md
@@ -63,12 +63,8 @@ weight = 1
                            http://shardingsphere.apache.org/schema/shardingsphere/datasource/datasource.xsd
                            http://shardingsphere.apache.org/schema/shardingsphere/mode-repository/standalone
                            http://shardingsphere.apache.org/schema/shardingsphere/mode-repository/standalone/repository.xsd">
-    <standalone:repository id="standaloneRepository" type="File">
-        <props>
-            <prop key="path">target</prop>
-        </props>
-    </standalone:repository>
-
+    <standalone:repository id="standaloneRepository" type="H2" />
+    
     <shardingsphere:data-source id="ds" database-name="foo_schema" data-source-names="..." rule-refs="..." >
         <shardingsphere:mode type="Standalone" repository-ref="standaloneRepository" overwrite="true" />
     </shardingsphere:data-source>
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/spring-namespace/mode.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/spring-namespace/mode.en.md
index de0e3f3f3ac..b1716267ab7 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/spring-namespace/mode.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/spring-namespace/mode.en.md
@@ -63,12 +63,8 @@ Namespace: [http://shardingsphere.apache.org/schema/shardingsphere/mode-reposito
                            http://shardingsphere.apache.org/schema/shardingsphere/datasource/datasource.xsd
                            http://shardingsphere.apache.org/schema/shardingsphere/mode-repository/standalone
                            http://shardingsphere.apache.org/schema/shardingsphere/mode-repository/standalone/repository.xsd">
-    <standalone:repository id="standaloneRepository" type="File">
-        <props>
-            <prop key="path">target</prop>
-        </props>
-    </standalone:repository>
-
+    <standalone:repository id="standaloneRepository" type="H2" />
+    
     <shardingsphere:data-source id="ds" database-name="foo_schema" data-source-names="..." rule-refs="..." >
         <shardingsphere:mode type="Standalone" repository-ref="standaloneRepository" overwrite="true" />
     </shardingsphere:data-source>
diff --git a/examples/shardingsphere-example-generator/src/main/resources/template/jdbc/resources/mode/spring-namespace/config/standalone-file.ftl b/examples/shardingsphere-example-generator/src/main/resources/template/jdbc/resources/mode/spring-namespace/config/standalone-file.ftl
index cf452747bab..0c34f2efe55 100644
--- a/examples/shardingsphere-example-generator/src/main/resources/template/jdbc/resources/mode/spring-namespace/config/standalone-file.ftl
+++ b/examples/shardingsphere-example-generator/src/main/resources/template/jdbc/resources/mode/spring-namespace/config/standalone-file.ftl
@@ -15,8 +15,4 @@
   ~ limitations under the License.
   -->
 
-<standalone:repository id="standaloneRepository" type="File">
-    <props>
-        <prop key="path">generator_demo</prop>
-    </props>
-</standalone:repository>
+<standalone:repository id="standaloneRepository" type="H2" />
diff --git a/examples/shardingsphere-example-generator/src/main/resources/template/proxy/mode/standalone-file.ftl b/examples/shardingsphere-example-generator/src/main/resources/template/proxy/mode/standalone-file.ftl
index ebfc8d7f579..373f6cab075 100644
--- a/examples/shardingsphere-example-generator/src/main/resources/template/proxy/mode/standalone-file.ftl
+++ b/examples/shardingsphere-example-generator/src/main/resources/template/proxy/mode/standalone-file.ftl
@@ -18,7 +18,5 @@
 mode:
   type: Standalone
   repository:
-    type: file
-    props:
-      path: demo_yaml
+    type: H2
   overwrite: false
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/sharding-example/sharding-raw-jdbc-example/src/main/resources/META-INF/sharding-databases.yaml b/examples/shardingsphere-jdbc-example/single-feature-example/sharding-example/sharding-raw-jdbc-example/src/main/resources/META-INF/sharding-databases.yaml
index f5398366a58..7fb78dd018d 100644
--- a/examples/shardingsphere-jdbc-example/single-feature-example/sharding-example/sharding-raw-jdbc-example/src/main/resources/META-INF/sharding-databases.yaml
+++ b/examples/shardingsphere-jdbc-example/single-feature-example/sharding-example/sharding-raw-jdbc-example/src/main/resources/META-INF/sharding-databases.yaml
@@ -18,7 +18,7 @@
 mode:
   type: Standalone
   repository:
-    type: File
+    type: H2
   overwrite: true
 
 dataSources:
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/pom.xml b/shardingsphere-jdbc/shardingsphere-jdbc-core/pom.xml
index 03e93181556..34c7936c641 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/pom.xml
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/pom.xml
@@ -93,11 +93,6 @@
             <artifactId>shardingsphere-standalone-mode-core</artifactId>
             <version>${project.version}</version>
         </dependency>
-        <dependency>
-            <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>shardingsphere-standalone-mode-repository-file</artifactId>
-            <version>${project.version}</version>
-        </dependency>
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
             <artifactId>shardingsphere-standalone-mode-repository-h2</artifactId>
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-core-spring/shardingsphere-jdbc-core-spring-namespace/pom.xml b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-core-spring/shardingsphere-jdbc-core-spring-namespace/pom.xml
index 469e43eeef7..d15baef983b 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-core-spring/shardingsphere-jdbc-core-spring-namespace/pom.xml
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-core-spring/shardingsphere-jdbc-core-spring-namespace/pom.xml
@@ -38,11 +38,6 @@
             <artifactId>shardingsphere-standalone-mode-core</artifactId>
             <version>${project.version}</version>
         </dependency>
-        <dependency>
-            <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>shardingsphere-standalone-mode-repository-file</artifactId>
-            <version>${project.version}</version>
-        </dependency>
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
             <artifactId>shardingsphere-standalone-mode-repository-h2</artifactId>
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-core-spring/shardingsphere-jdbc-core-spring-namespace/src/test/resources/spring/standalone-application-context.xml b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-core-spring/shardingsphere-jdbc-core-spring-namespace/src/test/resources/spring/standalone-application-context.xml
index 53328fc9a1a..795be6f85e5 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-core-spring/shardingsphere-jdbc-core-spring-namespace/src/test/resources/spring/standalone-application-context.xml
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-core-spring/shardingsphere-jdbc-core-spring-namespace/src/test/resources/spring/standalone-application-context.xml
@@ -35,11 +35,7 @@
     <import resource="included/data-sources-context.xml" />
     <import resource="included/rules-context.xml" />
     
-    <standalone:repository id="fileRepository" type="File" >
-        <props>
-            <prop key="path">target</prop>
-        </props>
-    </standalone:repository>
+    <standalone:repository id="fileRepository" type="H2" />
     
     <shardingsphere:data-source id="dataSource" data-source-names="ds_0_write,ds_0_read_0,ds_0_read_1,ds_1_write,ds_1_read_0,ds_1_read_1" rule-refs="shardingRule, readWriteSplittingRule, encryptRule, sqlParseRule">
         <shardingsphere:mode type="Standalone" repository-ref="fileRepository" overwrite="true" />
diff --git a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/pom.xml b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/pom.xml
index 36a0b766df0..a18f9937f4f 100644
--- a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/pom.xml
+++ b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/pom.xml
@@ -29,7 +29,6 @@
     <name>${project.artifactId}</name>
     
     <modules>
-        <module>shardingsphere-standalone-mode-repository-file</module>
         <module>shardingsphere-standalone-mode-repository-h2</module>
     </modules>
 </project>
diff --git a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/shardingsphere-standalone-mode-repository-file/pom.xml b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/shardingsphere-standalone-mode-repository-file/pom.xml
deleted file mode 100644
index c9c15db9efa..00000000000
--- a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/shardingsphere-standalone-mode-repository-file/pom.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~     http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT 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>
-        <groupId>org.apache.shardingsphere</groupId>
-        <artifactId>shardingsphere-standalone-mode-repository-provider</artifactId>
-        <version>5.1.3-SNAPSHOT</version>
-    </parent>
-    <artifactId>shardingsphere-standalone-mode-repository-file</artifactId>
-    
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>shardingsphere-standalone-mode-repository-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-</project>
diff --git a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/shardingsphere-standalone-mode-repository-file/src/main/java/org/apache/shardingsphere/mode/repository/standalone/file/FileRepository.java b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/s [...]
deleted file mode 100644
index 3386b2b49ad..00000000000
--- a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/shardingsphere-standalone-mode-repository-file/src/main/java/org/apache/shardingsphere/mode/repository/standalone/file/FileRepository.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.mode.repository.standalone.file;
-
-import com.google.common.base.Strings;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.shardingsphere.mode.repository.standalone.StandalonePersistRepository;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Optional;
-import java.util.Properties;
-import java.util.stream.Collectors;
-
-/**
- * File repository.
- */
-@Slf4j
-public final class FileRepository implements StandalonePersistRepository {
-    
-    private static final String DEFAULT_PERSIST_DIRECTORY = ".shardingsphere";
-    
-    private String path;
-    
-    @Override
-    public void init(final Properties props) {
-        FileRepositoryProperties localRepositoryProps = new FileRepositoryProperties(props);
-        path = Optional.ofNullable(
-                Strings.emptyToNull(localRepositoryProps.getValue(FileRepositoryPropertyKey.PATH))).orElseGet(() -> String.join("/", System.getProperty("user.home"), DEFAULT_PERSIST_DIRECTORY));
-    }
-    
-    @Override
-    public String get(final String key) {
-        if (!Files.exists(Paths.get(path, key))) {
-            return "";
-        }
-        try {
-            Collection<String> lines = Files.readAllLines(Paths.get(path, key));
-            if (!lines.isEmpty()) {
-                return lines.size() == 1 ? lines.iterator().next() : lines.stream().map(each -> each + System.lineSeparator()).collect(Collectors.joining());
-            }
-        } catch (final IOException ex) {
-            log.error("Get file data by key: {} failed", key, ex);
-        }
-        return "";
-    }
-    
-    @Override
-    public List<String> getChildrenKeys(final String key) {
-        File file = new File(path, key);
-        if (!file.exists()) {
-            return Collections.emptyList();
-        }
-        File[] files = file.listFiles();
-        return null == files ? Collections.emptyList() : Arrays.stream(files).map(File::getName).collect(Collectors.toList());
-    }
-    
-    @SuppressWarnings("ResultOfMethodCallIgnored")
-    @Override
-    public void persist(final String key, final String value) {
-        File file = new File(path, key);
-        if (Strings.isNullOrEmpty(value)) {
-            file.mkdirs();
-            return;
-        }
-        if (!file.exists()) {
-            file.getParentFile().mkdirs();
-        }
-        try (BufferedWriter bufferedWriter = Files.newBufferedWriter(Paths.get(path, key))) {
-            bufferedWriter.write(value);
-            bufferedWriter.flush();
-        } catch (final IOException ex) {
-            log.error("Persist file data to key: {} failed", key, ex);
-        }
-    }
-    
-    @Override
-    public void delete(final String key) {
-        try {
-            Files.walkFileTree(Paths.get(path, key), new FileRepositoryDeleteVisitor());
-        } catch (final IOException ex) {
-            log.error("Delete file data by key: {} failed", key, ex);
-        }
-    }
-    
-    @Override
-    public void close() {
-    }
-    
-    @Override
-    public String getType() {
-        return "File";
-    }
-}
diff --git a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/shardingsphere-standalone-mode-repository-file/src/main/java/org/apache/shardingsphere/mode/repository/standalone/file/FileRepositoryDeleteVisitor.java b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-reposito [...]
deleted file mode 100644
index 5d7e71bd2b3..00000000000
--- a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/shardingsphere-standalone-mode-repository-file/src/main/java/org/apache/shardingsphere/mode/repository/standalone/file/FileRepositoryDeleteVisitor.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.mode.repository.standalone.file;
-
-import java.io.IOException;
-import java.nio.file.FileVisitResult;
-import java.nio.file.FileVisitor;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.attribute.BasicFileAttributes;
-
-/**
- * File repository delete visitor.
- */
-public final class FileRepositoryDeleteVisitor implements FileVisitor<Path> {
-    
-    @Override
-    public FileVisitResult preVisitDirectory(final Path dir, final BasicFileAttributes attrs) {
-        return FileVisitResult.CONTINUE;
-    }
-    
-    @Override
-    public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs) throws IOException {
-        Files.deleteIfExists(file);
-        return FileVisitResult.CONTINUE;
-    }
-    
-    @Override
-    public FileVisitResult visitFileFailed(final Path file, final IOException exc) {
-        return FileVisitResult.CONTINUE;
-    }
-    
-    @Override
-    public FileVisitResult postVisitDirectory(final Path dir, final IOException exc) throws IOException {
-        Files.deleteIfExists(dir);
-        return FileVisitResult.CONTINUE;
-    }
-}
diff --git a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/shardingsphere-standalone-mode-repository-file/src/main/java/org/apache/shardingsphere/mode/repository/standalone/file/FileRepositoryProperties.java b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository- [...]
deleted file mode 100644
index 95838ac3c9b..00000000000
--- a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/shardingsphere-standalone-mode-repository-file/src/main/java/org/apache/shardingsphere/mode/repository/standalone/file/FileRepositoryProperties.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.mode.repository.standalone.file;
-
-import org.apache.shardingsphere.infra.properties.TypedProperties;
-import java.util.Properties;
-
-/**
- * File repository properties.
- */
-public final class FileRepositoryProperties extends TypedProperties<FileRepositoryPropertyKey> {
-    
-    public FileRepositoryProperties(final Properties props) {
-        super(FileRepositoryPropertyKey.class, props);
-    }
-}
diff --git a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/shardingsphere-standalone-mode-repository-file/src/main/java/org/apache/shardingsphere/mode/repository/standalone/file/FileRepositoryPropertyKey.java b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository [...]
deleted file mode 100644
index 73e5d37b3bf..00000000000
--- a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/shardingsphere-standalone-mode-repository-file/src/main/java/org/apache/shardingsphere/mode/repository/standalone/file/FileRepositoryPropertyKey.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.mode.repository.standalone.file;
-
-import lombok.Getter;
-import lombok.RequiredArgsConstructor;
-import org.apache.shardingsphere.infra.properties.TypedPropertyKey;
-
-/**
- * File repository property key.
- */
-@RequiredArgsConstructor
-@Getter
-public enum FileRepositoryPropertyKey implements TypedPropertyKey {
-    
-    PATH("path", "", String.class);
-    
-    private final String key;
-    
-    private final String defaultValue;
-    
-    private final Class<?> type;
-}
diff --git a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/shardingsphere-standalone-mode-repository-file/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.repository.standalone.StandalonePersistRepository b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone- [...]
deleted file mode 100644
index 46e8450437d..00000000000
--- a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/shardingsphere-standalone-mode-repository-file/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.repository.standalone.StandalonePersistRepository
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-org.apache.shardingsphere.mode.repository.standalone.file.FileRepository
diff --git a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/shardingsphere-standalone-mode-repository-file/src/test/java/org/apache/shardingsphere/mode/repository/standalone/file/FileRepositoryTest.java b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provid [...]
deleted file mode 100644
index 3262e87aaf7..00000000000
--- a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/shardingsphere-standalone-mode-repository-file/src/test/java/org/apache/shardingsphere/mode/repository/standalone/file/FileRepositoryTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.mode.repository.standalone.file;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import java.io.File;
-import java.util.Properties;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertThat;
-
-public final class FileRepositoryTest {
-    
-    private final FileRepository fileRepository = new FileRepository();
-    
-    @Before
-    public void setUp() {
-        Properties props = new Properties();
-        props.setProperty("path", "target");
-        fileRepository.init(props);
-    }
-    
-    @Test
-    public void assertPersistAndGet() {
-        fileRepository.persist(getFilePath(), "test1_content");
-        assertThat(fileRepository.get(getFilePath()), is("test1_content"));
-        fileRepository.persist(getFilePath(), "modify_content");
-        assertThat(fileRepository.get(getFilePath()), is("modify_content"));
-    }
-    
-    @Test
-    public void assertPersistAndGetChildrenKeys() {
-        fileRepository.persist(getFilePath(), "");
-        assertThat(fileRepository.getChildrenKeys("testDir").get(0), is("test1"));
-    }
-    
-    @Test
-    public void assertDelete() {
-        fileRepository.delete("testDir");
-        assertFalse((new File(getFilePath())).exists());
-    }
-    
-    private String getFilePath() {
-        return String.join(File.separator, "testDir", "test1");
-    }
-    
-    @After
-    public void stop() {
-        fileRepository.close();
-    }
-}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/pom.xml b/shardingsphere-proxy/shardingsphere-proxy-backend/pom.xml
index d403363a4c4..2a789595e87 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/pom.xml
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/pom.xml
@@ -78,11 +78,6 @@
             <artifactId>shardingsphere-standalone-mode-core</artifactId>
             <version>${project.version}</version>
         </dependency>
-        <dependency>
-            <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>shardingsphere-standalone-mode-repository-file</artifactId>
-            <version>${project.version}</version>
-        </dependency>
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
             <artifactId>shardingsphere-standalone-mode-repository-h2</artifactId>
diff --git a/shardingsphere-proxy/shardingsphere-proxy-bootstrap/pom.xml b/shardingsphere-proxy/shardingsphere-proxy-bootstrap/pom.xml
index f5db49db319..78473b01fc7 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-bootstrap/pom.xml
+++ b/shardingsphere-proxy/shardingsphere-proxy-bootstrap/pom.xml
@@ -83,11 +83,6 @@
             <artifactId>shardingsphere-standalone-mode-core</artifactId>
             <version>${project.version}</version>
         </dependency>
-        <dependency>
-            <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>shardingsphere-standalone-mode-repository-file</artifactId>
-            <version>${project.version}</version>
-        </dependency>
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
             <artifactId>shardingsphere-standalone-mode-repository-h2</artifactId>