You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by he...@apache.org on 2023/05/10 07:39:08 UTC

[iotdb] branch tiered_storage updated: add object storage module

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

heiming pushed a commit to branch tiered_storage
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/tiered_storage by this push:
     new fb024ce719 add object storage module
fb024ce719 is described below

commit fb024ce7199c1395cc8371593c8b3f7497f05462
Author: HeimingZ <zh...@qq.com>
AuthorDate: Wed May 10 15:38:51 2023 +0800

    add object storage module
---
 object-storage/README.md                           |  21 +++
 object-storage/pom.xml                             | 187 +++++++++++++++++++++
 .../java/org/apache/iotdb/os/cache/CacheEntry.java |  28 +++
 .../org/apache/iotdb/os/cache/CacheManger.java     |  22 +++
 .../org/apache/iotdb/os/cache/PersistentCache.java |  33 ++++
 .../apache/iotdb/os/conf/ObjectStorageConfig.java  |  39 +++++
 .../iotdb/os/conf/ObjectStorageDescriptor.java     |  23 +++
 .../org/apache/iotdb/os/fileSystem/OSFile.java     |  44 +++++
 .../org/apache/iotdb/os/fileSystem/OSInput.java    |  96 +++++++++++
 .../org/apache/iotdb/os/fileSystem/OSOutput.java   |  70 ++++++++
 .../apache/iotdb/os/io/ObjectStorageConnector.java |  22 +++
 .../java/org/apache/iotdb/os/io/S3Connector.java   |  23 +++
 .../apache/iotdb/os/utils/ObjectStorageType.java   |  23 +++
 object-storage/src/test/resources/logback.xml      |  41 +++++
 pom.xml                                            |   1 +
 15 files changed, 673 insertions(+)

diff --git a/object-storage/README.md b/object-storage/README.md
new file mode 100644
index 0000000000..2d6f52d4a0
--- /dev/null
+++ b/object-storage/README.md
@@ -0,0 +1,21 @@
+<!--
+
+    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.
+
+-->
+# TsFile-ObjectStorage-Connector
\ No newline at end of file
diff --git a/object-storage/pom.xml b/object-storage/pom.xml
new file mode 100644
index 0000000000..ab51022631
--- /dev/null
+++ b/object-storage/pom.xml
@@ -0,0 +1,187 @@
+<?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.iotdb</groupId>
+        <artifactId>iotdb-parent</artifactId>
+        <version>1.2.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <artifactId>os-tsfile</artifactId>
+    <packaging>jar</packaging>
+    <name>IoTDB ObjectStorage-Tsfile</name>
+    <url>http://maven.apache.org</url>
+    <properties>
+        <os.test.skip>false</os.test.skip>
+        <os.it.skip>${os.test.skip}</os.it.skip>
+        <os.ut.skip>${os.test.skip}</os.ut.skip>
+    </properties>
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>software.amazon.awssdk</groupId>
+                <artifactId>bom</artifactId>
+                <version>2.16.1</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.iotdb</groupId>
+            <artifactId>tsfile</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.github.ben-manes.caffeine</groupId>
+            <artifactId>caffeine</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>software.amazon.awssdk</groupId>
+            <artifactId>s3</artifactId>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <!--
+        Generate an OSGI compatible MANIFEST file.
+      -->
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <version>${felix.version}</version>
+                <executions>
+                    <execution>
+                        <id>bundle-manifest</id>
+                        <phase>process-classes</phase>
+                        <goals>
+                            <goal>manifest</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <exportScr>true</exportScr>
+                    <instructions>
+                        <_include>-bnd.bnd</_include>
+                        <_removeheaders>Bnd-LastModified,Built-By</_removeheaders>
+                        <Embed-Dependency>dependencies</Embed-Dependency>
+                    </instructions>
+                </configuration>
+            </plugin>
+            <!--
+              Use the MANIFEST file generated by the maven-bundle-plugin.
+            -->
+            <plugin>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
+                    </archive>
+                </configuration>
+            </plugin>
+            <!--using `mvn test` to run UT, `mvn verify` to run ITs
+            Reference: https://antoniogoncalves.org/2012/12/13/lets-turn-integration-tests-with-maven-to-a-first-class-citizen/-->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <skipTests>${os.ut.skip}</skipTests>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-failsafe-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>run-integration-tests</id>
+                        <phase>integration-test</phase>
+                        <goals>
+                            <goal>integration-test</goal>
+                            <goal>verify</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <skipTests>${os.test.skip}</skipTests>
+                    <skipITs>${os.it.skip}</skipITs>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    <profiles>
+        <profile>
+            <id>skipObjectStorageTests</id>
+            <activation>
+                <property>
+                    <name>skipTests</name>
+                    <value>true</value>
+                </property>
+            </activation>
+            <properties>
+                <os.test.skip>true</os.test.skip>
+                <os.ut.skip>true</os.ut.skip>
+                <os.it.skip>true</os.it.skip>
+            </properties>
+        </profile>
+        <profile>
+            <id>skipUT_ObjectStorageTests</id>
+            <activation>
+                <property>
+                    <name>skipUTs</name>
+                    <value>true</value>
+                </property>
+            </activation>
+            <properties>
+                <os.ut.skip>true</os.ut.skip>
+            </properties>
+        </profile>
+        <profile>
+            <id>get-jar-with-dependencies</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-assembly-plugin</artifactId>
+                        <version>${maven.assembly.version}</version>
+                        <configuration>
+                            <descriptorRefs>
+                                <descriptorRef>jar-with-dependencies</descriptorRef>
+                            </descriptorRefs>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>make-assembly</id>
+                                <!-- this is used for inheritance merges -->
+                                <phase>package</phase>
+                                <!-- bind to the packaging phase -->
+                                <goals>
+                                    <goal>single</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>
diff --git a/object-storage/src/main/java/org/apache/iotdb/os/cache/CacheEntry.java b/object-storage/src/main/java/org/apache/iotdb/os/cache/CacheEntry.java
new file mode 100644
index 0000000000..c9ffdc5cbe
--- /dev/null
+++ b/object-storage/src/main/java/org/apache/iotdb/os/cache/CacheEntry.java
@@ -0,0 +1,28 @@
+/*
+ * 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.iotdb.os.cache;
+
+import java.io.File;
+
+public class CacheEntry {
+  private File cacheFile;
+  private long position;
+  private int size;
+  private byte[] value;
+}
diff --git a/object-storage/src/main/java/org/apache/iotdb/os/cache/CacheManger.java b/object-storage/src/main/java/org/apache/iotdb/os/cache/CacheManger.java
new file mode 100644
index 0000000000..f967b14290
--- /dev/null
+++ b/object-storage/src/main/java/org/apache/iotdb/os/cache/CacheManger.java
@@ -0,0 +1,22 @@
+/*
+ * 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.iotdb.os.cache;
+
+public class CacheManger {
+}
diff --git a/object-storage/src/main/java/org/apache/iotdb/os/cache/PersistentCache.java b/object-storage/src/main/java/org/apache/iotdb/os/cache/PersistentCache.java
new file mode 100644
index 0000000000..a812d79147
--- /dev/null
+++ b/object-storage/src/main/java/org/apache/iotdb/os/cache/PersistentCache.java
@@ -0,0 +1,33 @@
+/*
+ * 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.iotdb.os.cache;
+
+import org.apache.iotdb.tsfile.file.metadata.ChunkMetadata;
+
+import com.github.benmanes.caffeine.cache.LoadingCache;
+
+import java.io.File;
+
+public class PersistentCache {
+  private File cacheFile;
+
+  private LoadingCache<ChunkMetadata, CacheEntry> lruCache;
+
+
+}
diff --git a/object-storage/src/main/java/org/apache/iotdb/os/conf/ObjectStorageConfig.java b/object-storage/src/main/java/org/apache/iotdb/os/conf/ObjectStorageConfig.java
new file mode 100644
index 0000000000..df6564f453
--- /dev/null
+++ b/object-storage/src/main/java/org/apache/iotdb/os/conf/ObjectStorageConfig.java
@@ -0,0 +1,39 @@
+/*
+ * 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.iotdb.os.conf;
+
+import java.io.File;
+import org.apache.iotdb.os.utils.ObjectStorageType;
+
+public class ObjectStorageConfig {
+  private ObjectStorageType osType = ObjectStorageType.S3;
+
+  private String osEndpoiont= "yourEndpoint";
+
+  private String osAccessKey="yourAccessKey";
+  private String osAccessSecret="yourAccessSecret";
+
+  private String[] cacheDirs = {"data" + File.separator + "datanode" + File.separator + "data" + File.separator + "cache"};
+
+  private long cacheSizeThreshold = 10 * 1024 * 1024 * 1024;
+
+  ObjectStorageConfig() {
+
+  }
+}
diff --git a/object-storage/src/main/java/org/apache/iotdb/os/conf/ObjectStorageDescriptor.java b/object-storage/src/main/java/org/apache/iotdb/os/conf/ObjectStorageDescriptor.java
new file mode 100644
index 0000000000..7fcdeca567
--- /dev/null
+++ b/object-storage/src/main/java/org/apache/iotdb/os/conf/ObjectStorageDescriptor.java
@@ -0,0 +1,23 @@
+/*
+ * 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.iotdb.os.conf;
+
+public class ObjectStorageDescriptor {
+  private final ObjectStorageConfig conf = new ObjectStorageConfig();
+}
diff --git a/object-storage/src/main/java/org/apache/iotdb/os/fileSystem/OSFile.java b/object-storage/src/main/java/org/apache/iotdb/os/fileSystem/OSFile.java
new file mode 100644
index 0000000000..35244876fd
--- /dev/null
+++ b/object-storage/src/main/java/org/apache/iotdb/os/fileSystem/OSFile.java
@@ -0,0 +1,44 @@
+/*
+ * 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.iotdb.os.fileSystem;
+
+import java.io.File;
+import java.net.URI;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class OSFile extends File {
+  private static final Logger logger = LoggerFactory.getLogger(OSFile.class);
+
+  public OSFile(String pathname) {
+    super(pathname);
+  }
+
+  public OSFile(String parent, String child) {
+    super(parent, child);
+  }
+
+  public OSFile(File parent, String child) {
+    super(parent, child);
+  }
+
+  public OSFile(URI uri) {
+    super(uri);
+  }
+}
diff --git a/object-storage/src/main/java/org/apache/iotdb/os/fileSystem/OSInput.java b/object-storage/src/main/java/org/apache/iotdb/os/fileSystem/OSInput.java
new file mode 100644
index 0000000000..f19943f452
--- /dev/null
+++ b/object-storage/src/main/java/org/apache/iotdb/os/fileSystem/OSInput.java
@@ -0,0 +1,96 @@
+/*
+ * 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.iotdb.os.fileSystem;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.ByteBuffer;
+import java.nio.channels.FileChannel;
+import org.apache.iotdb.tsfile.read.reader.TsFileInput;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class OSInput implements TsFileInput {
+  private static final Logger logger = LoggerFactory.getLogger(OSInput.class);
+
+  @Override
+  public long size() throws IOException {
+    return 0;
+  }
+
+  @Override
+  public long position() throws IOException {
+    return 0;
+  }
+
+  @Override
+  public TsFileInput position(long newPosition) throws IOException {
+    return null;
+  }
+
+  @Override
+  public int read(ByteBuffer dst) throws IOException {
+    return 0;
+  }
+
+  @Override
+  public int read(ByteBuffer dst, long position) throws IOException {
+    return 0;
+  }
+
+  @Override
+  public int read() throws IOException {
+    return 0;
+  }
+
+  @Override
+  public int read(byte[] b, int off, int len) throws IOException {
+    return 0;
+  }
+
+  @Override
+  public FileChannel wrapAsFileChannel() throws IOException {
+    return null;
+  }
+
+  @Override
+  public InputStream wrapAsInputStream() throws IOException {
+    return null;
+  }
+
+  @Override
+  public void close() throws IOException {
+
+  }
+
+  @Override
+  public int readInt() throws IOException {
+    return 0;
+  }
+
+  @Override
+  public String readVarIntString(long offset) throws IOException {
+    return null;
+  }
+
+  @Override
+  public String getFilePath() {
+    return null;
+  }
+}
diff --git a/object-storage/src/main/java/org/apache/iotdb/os/fileSystem/OSOutput.java b/object-storage/src/main/java/org/apache/iotdb/os/fileSystem/OSOutput.java
new file mode 100644
index 0000000000..9916f28139
--- /dev/null
+++ b/object-storage/src/main/java/org/apache/iotdb/os/fileSystem/OSOutput.java
@@ -0,0 +1,70 @@
+/*
+ * 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.iotdb.os.fileSystem;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.nio.ByteBuffer;
+import org.apache.iotdb.tsfile.write.writer.TsFileOutput;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class OSOutput implements TsFileOutput {
+  private static final Logger logger = LoggerFactory.getLogger(OSOutput.class);
+
+  @Override
+  public void write(byte[] b) throws IOException {
+    throw new UnsupportedOperationException();
+  }
+
+  @Override
+  public void write(byte b) throws IOException {
+    throw new UnsupportedOperationException();
+  }
+
+  @Override
+  public void write(ByteBuffer b) throws IOException {
+    throw new UnsupportedOperationException();
+  }
+
+  @Override
+  public long getPosition() throws IOException {
+    throw new UnsupportedOperationException();
+  }
+
+  @Override
+  public void close() throws IOException {
+    throw new UnsupportedOperationException();
+  }
+
+  @Override
+  public OutputStream wrapAsStream() throws IOException {
+    throw new UnsupportedOperationException();
+  }
+
+  @Override
+  public void flush() throws IOException {
+    throw new UnsupportedOperationException();
+  }
+
+  @Override
+  public void truncate(long size) throws IOException {
+    throw new UnsupportedOperationException();
+  }
+}
diff --git a/object-storage/src/main/java/org/apache/iotdb/os/io/ObjectStorageConnector.java b/object-storage/src/main/java/org/apache/iotdb/os/io/ObjectStorageConnector.java
new file mode 100644
index 0000000000..96c3b90573
--- /dev/null
+++ b/object-storage/src/main/java/org/apache/iotdb/os/io/ObjectStorageConnector.java
@@ -0,0 +1,22 @@
+/*
+ * 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.iotdb.os.io;
+
+public interface ObjectStorageConnector {
+}
diff --git a/object-storage/src/main/java/org/apache/iotdb/os/io/S3Connector.java b/object-storage/src/main/java/org/apache/iotdb/os/io/S3Connector.java
new file mode 100644
index 0000000000..b4cd3800f7
--- /dev/null
+++ b/object-storage/src/main/java/org/apache/iotdb/os/io/S3Connector.java
@@ -0,0 +1,23 @@
+/*
+ * 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.iotdb.os.io;
+
+public class S3Connector implements ObjectStorageConnector {
+
+}
diff --git a/object-storage/src/main/java/org/apache/iotdb/os/utils/ObjectStorageType.java b/object-storage/src/main/java/org/apache/iotdb/os/utils/ObjectStorageType.java
new file mode 100644
index 0000000000..4eb644d695
--- /dev/null
+++ b/object-storage/src/main/java/org/apache/iotdb/os/utils/ObjectStorageType.java
@@ -0,0 +1,23 @@
+/*
+ * 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.iotdb.os.utils;
+
+public enum ObjectStorageType {
+  S3,
+}
diff --git a/object-storage/src/test/resources/logback.xml b/object-storage/src/test/resources/logback.xml
new file mode 100644
index 0000000000..ac3fcb3a7f
--- /dev/null
+++ b/object-storage/src/test/resources/logback.xml
@@ -0,0 +1,41 @@
+<?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.
+
+-->
+<configuration debug="false">
+    <property name="LOG_PATH" value="target/logs"/>
+    <!-- prevent logback from outputting its own status at the start of every log -->
+    <statusListener class="ch.qos.logback.core.status.NopStatusListener"/>
+    <appender class="ch.qos.logback.core.ConsoleAppender" name="stdout">
+        <Target>System.out</Target>
+        <encoder>
+            <pattern>%-5p [%d] [%thread] %C:%L - %m %n</pattern>
+            <charset>utf-8</charset>
+        </encoder>
+        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+            <level>DEBUG</level>
+        </filter>
+    </appender>
+    <!--<logger name="org.apache.iotdb.db.utils.OpenFileNumUtil" level="debug" />-->
+    <!--<logger name="org.apache.iotdb.db.utils.OpenFileNumUtilTest" level="debug" />-->
+    <root level="WARN">
+        <appender-ref ref="stdout"/>
+    </root>
+</configuration>
diff --git a/pom.xml b/pom.xml
index 107c8ba14d..32cc024bee 100644
--- a/pom.xml
+++ b/pom.xml
@@ -127,6 +127,7 @@
         <module>mlnode</module>
         <module>pipe-api</module>
         <module>subscription-api</module>
+        <module>object-storage</module>
     </modules>
     <!-- Properties Management -->
     <properties>