You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by lt...@apache.org on 2019/02/25 15:59:17 UTC

[incubator-iotdb] branch add_examples updated: organize the examples into two different projects

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

lta pushed a commit to branch add_examples
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git


The following commit(s) were added to refs/heads/add_examples by this push:
     new 5f20cc6  organize the examples into two different projects
5f20cc6 is described below

commit 5f20cc63608a784e2487afb4f3b8548720bd9ee9
Author: lta <li...@163.com>
AuthorDate: Mon Feb 25 23:58:54 2019 +0800

    organize the examples into two different projects
---
 example/kafka/.gitignore                           | 73 +++++++++++++++++++
 example/kafka/pom.xml                              | 66 ++++++++++++++++++
 example/kafka/readme.md                            | 75 ++++++++++++++++++++
 .../java/org/apache/iotdb/kafka}/Constant.java     |  2 +-
 .../org/apache/iotdb/kafka}/KafkaConsumer.java     |  2 +-
 .../apache/iotdb/kafka}/KafkaConsumerThread.java   |  3 +-
 .../org/apache/iotdb/kafka}/KafkaProducer.java     |  2 +-
 example/pom.xml                                    | 81 ----------------------
 example/rocketmq/.gitignore                        | 73 +++++++++++++++++++
 example/rocketmq/pom.xml                           | 66 ++++++++++++++++++
 example/{ => rocketmq}/readme.md                   | 58 +---------------
 .../java/org/apache/iotdb/example}/Constant.java   |  2 +-
 .../apache/iotdb/example}/RocketMQConsumer.java    |  2 +-
 .../apache/iotdb/example}/RocketMQProducer.java    |  4 +-
 .../main/java/org/apache/iotdb/example/Utils.java  |  0
 pom.xml                                            |  1 -
 16 files changed, 361 insertions(+), 149 deletions(-)

diff --git a/example/kafka/.gitignore b/example/kafka/.gitignore
new file mode 100644
index 0000000..0704784
--- /dev/null
+++ b/example/kafka/.gitignore
@@ -0,0 +1,73 @@
+# Eclipse IDE files
+**/.classpath
+**/.project
+**/.settings/
+# src/main/resources/
+# intellij IDE files
+**/*.iml
+**/.idea/
+**/*.log
+**/*.ipr
+**/*.iws
+# Apple OS X related
+**/.DS_Store
+derby-tsfile-db
+# intellj IDE files
+**/*.iml
+**/.idea/
+
+# Apple OS X related
+**/.DS_Store
+
+# build generated
+**/target/
+**/build/
+
+# intermediately generated locally
+**/logs/
+
+*.jar
+*.gz
+*.tar.gz
+*.tar
+/data/
+#src/test/resources/logback.xml
+
+
+### Maven ###
+grafana/target/
+!grafana/.mvn/wrapper/maven-wrapper.jar
+grafana/.mvn/
+
+grafana/logs/
+*.log
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+
+
+### NetBeans ###
+**/nbproject/private/
+**/build/
+**/nbbuild/
+**/dist/
+**/nbdist/
+**/.nb-gradle/
+grafana/data/
+
+
+**/.DS_Store
+
+**/lib/
+*.jar
+/target/
+*.tsfile
+tsfile/src/test/resources/*.ts
+
+### Apache release ###
+local-snapshots-dir/
diff --git a/example/kafka/pom.xml b/example/kafka/pom.xml
new file mode 100644
index 0000000..9501487
--- /dev/null
+++ b/example/kafka/pom.xml
@@ -0,0 +1,66 @@
+<?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>
+
+  <groupId>org.apache.iotdb.example</groupId>
+  <artifactId>kafka</artifactId>
+  <version>0.8.0-SNAPSHOT</version>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.iotdb</groupId>
+      <artifactId>iotdb-jdbc</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.kafka</groupId>
+      <artifactId>kafka_2.10</artifactId>
+      <version>0.8.2.0</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-api</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-log4j12</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>8</source>
+          <target>8</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
\ No newline at end of file
diff --git a/example/kafka/readme.md b/example/kafka/readme.md
new file mode 100644
index 0000000..60f4e63
--- /dev/null
+++ b/example/kafka/readme.md
@@ -0,0 +1,75 @@
+<!--
+
+    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.
+
+-->
+# Kafka-IoTDB Demo
+## Function
+```
+The example is to show how to send data from localhost to IoTDB through Kafka.
+```
+## Usage
+### Version usage
+IoTDB: 0.8.0-SNAPSHOT  
+Kafka: 0.8.2.0
+### Dependencies with Maven
+
+```
+<dependencies>
+    <dependency>
+    	<groupId>org.apache.kafka</groupId>
+    	<artifactId>kafka_2.10</artifactId>
+    	<version>0.8.2.0</version>
+    </dependency>
+    <dependency>
+	    <groupId>org.apache.iotdb</groupId>
+	    <artifactId>iotdb-jdbc</artifactId>
+	    <version>0.8.0-SNAPSHOT</version>
+    </dependency>
+</dependencies>
+```
+
+### Launch the servers
+
+```
+  Before you run the program, make sure you have launched the servers of Kafka and IoTDB.
+  For details, please refer to http://kafka.apache.org/081/documentation.html#quickstart
+```
+
+### Run KafkaProducer.java
+
+```
+  The class is to send data from localhost to Kafka clusters.
+  Firstly, you have to change the parameter of TOPIC in Constant.java to what you create:(for example : "Kafka-Test")
+  > public final static String TOPIC = "Kafka-Test";
+  The default format of data is "device,timestamp,value ". (for example : "sensor1,2017/10/24 19:30:00,60")
+  Then you need to create data in Constat.ALL_DATA
+  Finally, run KafkaProducer.java
+```
+
+### Run KafkaConsumer.java
+
+```
+  The class is to show how to consume data from kafka through multi-threads.
+  The data is sent by class KafkaProducer.
+  You can set the parameter of CONSUMER_THREAD_NUM in Constant.java to make sure the number of consumer threads:(for example: "5")
+  > private final static int CONSUMER_THREAD_NUM = 5;
+```
+
+#### Notice 
+  If you want to use multiple consumers, please make sure that the number of topic's partition you create is more than 1.
\ No newline at end of file
diff --git a/example/src/main/java/org/apache/iotdb/example/kafkademo/Constant.java b/example/kafka/src/main/java/org/apache/iotdb/kafka/Constant.java
similarity index 98%
rename from example/src/main/java/org/apache/iotdb/example/kafkademo/Constant.java
rename to example/kafka/src/main/java/org/apache/iotdb/kafka/Constant.java
index 18a8158..90ea54c 100644
--- a/example/src/main/java/org/apache/iotdb/example/kafkademo/Constant.java
+++ b/example/kafka/src/main/java/org/apache/iotdb/kafka/Constant.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.iotdb.example.kafkademo;
+package org.apache.iotdb.kafka;
 
 import org.apache.iotdb.jdbc.Config;
 
diff --git a/example/src/main/java/org/apache/iotdb/example/kafkademo/KafkaConsumer.java b/example/kafka/src/main/java/org/apache/iotdb/kafka/KafkaConsumer.java
similarity index 98%
rename from example/src/main/java/org/apache/iotdb/example/kafkademo/KafkaConsumer.java
rename to example/kafka/src/main/java/org/apache/iotdb/kafka/KafkaConsumer.java
index 052f664..194449b 100644
--- a/example/src/main/java/org/apache/iotdb/example/kafkademo/KafkaConsumer.java
+++ b/example/kafka/src/main/java/org/apache/iotdb/kafka/KafkaConsumer.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.iotdb.example.kafkademo;
+package org.apache.iotdb.kafka;
 
 import java.util.HashMap;
 import java.util.List;
diff --git a/example/src/main/java/org/apache/iotdb/example/kafkademo/KafkaConsumerThread.java b/example/kafka/src/main/java/org/apache/iotdb/kafka/KafkaConsumerThread.java
similarity index 98%
rename from example/src/main/java/org/apache/iotdb/example/kafkademo/KafkaConsumerThread.java
rename to example/kafka/src/main/java/org/apache/iotdb/kafka/KafkaConsumerThread.java
index b94a520..3e5d180 100644
--- a/example/src/main/java/org/apache/iotdb/example/kafkademo/KafkaConsumerThread.java
+++ b/example/kafka/src/main/java/org/apache/iotdb/kafka/KafkaConsumerThread.java
@@ -16,11 +16,10 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.iotdb.example.kafkademo;
+package org.apache.iotdb.kafka;
 
 import java.sql.Connection;
 import java.sql.DriverManager;
-import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Statement;
 import kafka.consumer.KafkaStream;
diff --git a/example/src/main/java/org/apache/iotdb/example/kafkademo/KafkaProducer.java b/example/kafka/src/main/java/org/apache/iotdb/kafka/KafkaProducer.java
similarity index 98%
rename from example/src/main/java/org/apache/iotdb/example/kafkademo/KafkaProducer.java
rename to example/kafka/src/main/java/org/apache/iotdb/kafka/KafkaProducer.java
index bab13a0..ec8d8b4 100644
--- a/example/src/main/java/org/apache/iotdb/example/kafkademo/KafkaProducer.java
+++ b/example/kafka/src/main/java/org/apache/iotdb/kafka/KafkaProducer.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.iotdb.example.kafkademo;
+package org.apache.iotdb.kafka;
 
 import java.util.Properties;
 import kafka.javaapi.producer.Producer;
diff --git a/example/pom.xml b/example/pom.xml
deleted file mode 100644
index db552d4..0000000
--- a/example/pom.xml
+++ /dev/null
@@ -1,81 +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">
-    <parent>
-        <artifactId>root</artifactId>
-        <groupId>org.apache.iotdb</groupId>
-        <version>0.8.0-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>example</artifactId>
-    <name>example</name>
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.iotdb</groupId>
-            <artifactId>iotdb-jdbc</artifactId>
-            <version>0.8.0-SNAPSHOT</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>io.netty</groupId>
-                    <artifactId>netty-common</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>io.netty</groupId>
-                    <artifactId>netty-buffer</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.kafka</groupId>
-            <artifactId>kafka_2.10</artifactId>
-            <version>0.8.2.0</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-api</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-log4j12</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.rocketmq</groupId>
-            <artifactId>rocketmq-client</artifactId>
-            <version>4.4.0</version>
-        </dependency>
-    </dependencies>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>8</source>
-                    <target>8</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>
diff --git a/example/rocketmq/.gitignore b/example/rocketmq/.gitignore
new file mode 100644
index 0000000..0704784
--- /dev/null
+++ b/example/rocketmq/.gitignore
@@ -0,0 +1,73 @@
+# Eclipse IDE files
+**/.classpath
+**/.project
+**/.settings/
+# src/main/resources/
+# intellij IDE files
+**/*.iml
+**/.idea/
+**/*.log
+**/*.ipr
+**/*.iws
+# Apple OS X related
+**/.DS_Store
+derby-tsfile-db
+# intellj IDE files
+**/*.iml
+**/.idea/
+
+# Apple OS X related
+**/.DS_Store
+
+# build generated
+**/target/
+**/build/
+
+# intermediately generated locally
+**/logs/
+
+*.jar
+*.gz
+*.tar.gz
+*.tar
+/data/
+#src/test/resources/logback.xml
+
+
+### Maven ###
+grafana/target/
+!grafana/.mvn/wrapper/maven-wrapper.jar
+grafana/.mvn/
+
+grafana/logs/
+*.log
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+
+
+### NetBeans ###
+**/nbproject/private/
+**/build/
+**/nbbuild/
+**/dist/
+**/nbdist/
+**/.nb-gradle/
+grafana/data/
+
+
+**/.DS_Store
+
+**/lib/
+*.jar
+/target/
+*.tsfile
+tsfile/src/test/resources/*.ts
+
+### Apache release ###
+local-snapshots-dir/
diff --git a/example/rocketmq/pom.xml b/example/rocketmq/pom.xml
new file mode 100644
index 0000000..f700ce4
--- /dev/null
+++ b/example/rocketmq/pom.xml
@@ -0,0 +1,66 @@
+<?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>
+
+  <groupId>org.apache.iotdb</groupId>
+  <artifactId>rocketmq</artifactId>
+  <version>0.8.0-SNAPSHOT</version>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.iotdb</groupId>
+      <artifactId>iotdb-jdbc</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <exclusions>
+        <exclusion>
+          <groupId>io.netty</groupId>
+          <artifactId>netty-common</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>io.netty</groupId>
+          <artifactId>netty-buffer</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.rocketmq</groupId>
+      <artifactId>rocketmq-client</artifactId>
+      <version>4.4.0</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>8</source>
+          <target>8</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
\ No newline at end of file
diff --git a/example/readme.md b/example/rocketmq/readme.md
similarity index 70%
rename from example/readme.md
rename to example/rocketmq/readme.md
index d3033b9..0bf25a3 100644
--- a/example/readme.md
+++ b/example/rocketmq/readme.md
@@ -18,63 +18,7 @@
     under the License.
 
 -->
-# 1. Kafka-IoTDB Demo
-## Function
-```
-The example is to show how to send data from localhost to IoTDB through Kafka.
-```
-## Usage
-### Version usage
-IoTDB: 0.8.0-SNAPSHOT  
-Kafka: 0.8.2.0
-### Dependencies with Maven
-
-```
-<dependencies>
-    <dependency>
-    	<groupId>org.apache.kafka</groupId>
-    	<artifactId>kafka_2.10</artifactId>
-    	<version>0.8.2.0</version>
-    </dependency>
-    <dependency>
-	    <groupId>org.apache.iotdb</groupId>
-	    <artifactId>iotdb-jdbc</artifactId>
-	    <version>0.8.0-SNAPSHOT</version>
-    </dependency>
-</dependencies>
-```
-
-### Launch the servers
-
-```
-  Before you run the program, make sure you have launched the servers of Kafka and IoTDB.
-  For details, please refer to http://kafka.apache.org/081/documentation.html#quickstart
-```
-
-### Run KafkaProducer.java
-
-```
-  The class is to send data from localhost to Kafka clusters.
-  Firstly, you have to change the parameter of TOPIC in Constant.java to what you create:(for example : "Kafka-Test")
-  > public final static String TOPIC = "Kafka-Test";
-  The default format of data is "device,timestamp,value ". (for example : "sensor1,2017/10/24 19:30:00,60")
-  Then you need to create data in Constat.ALL_DATA
-  Finally, run KafkaProducer.java
-```
-
-### Run KafkaConsumer.java
-
-```
-  The class is to show how to consume data from kafka through multi-threads.
-  The data is sent by class KafkaProducer.
-  You can set the parameter of CONSUMER_THREAD_NUM in Constant.java to make sure the number of consumer threads:(for example: "5")
-  > private final static int CONSUMER_THREAD_NUM = 5;
-```
-
-#### Notice 
-  If you want to use multiple consumers, please make sure that the number of topic's partition you create is more than 1.
-
-# 2. Rocketmq-IoTDB Demo
+# Rocketmq-IoTDB Demo
 ##Introduction
 This demo shows how to store data into IoTDB via rocketmq
 ##Basic Concept
diff --git a/example/src/main/java/org/apache/iotdb/example/rocketmqdemo/Constant.java b/example/rocketmq/src/main/java/org/apache/iotdb/example/Constant.java
similarity index 98%
rename from example/src/main/java/org/apache/iotdb/example/rocketmqdemo/Constant.java
rename to example/rocketmq/src/main/java/org/apache/iotdb/example/Constant.java
index dc99888..1a29055 100644
--- a/example/src/main/java/org/apache/iotdb/example/rocketmqdemo/Constant.java
+++ b/example/rocketmq/src/main/java/org/apache/iotdb/example/Constant.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.iotdb.example.rocketmqdemo;
+package org.apache.iotdb.example;
 
 import org.apache.iotdb.jdbc.Config;
 
diff --git a/example/src/main/java/org/apache/iotdb/example/rocketmqdemo/RocketMQConsumer.java b/example/rocketmq/src/main/java/org/apache/iotdb/example/RocketMQConsumer.java
similarity index 99%
rename from example/src/main/java/org/apache/iotdb/example/rocketmqdemo/RocketMQConsumer.java
rename to example/rocketmq/src/main/java/org/apache/iotdb/example/RocketMQConsumer.java
index 8b4a363..255a418 100644
--- a/example/src/main/java/org/apache/iotdb/example/rocketmqdemo/RocketMQConsumer.java
+++ b/example/rocketmq/src/main/java/org/apache/iotdb/example/RocketMQConsumer.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.iotdb.example.rocketmqdemo;
+package org.apache.iotdb.example;
 
 import java.sql.Connection;
 import java.sql.DriverManager;
diff --git a/example/src/main/java/org/apache/iotdb/example/rocketmqdemo/RocketMQProducer.java b/example/rocketmq/src/main/java/org/apache/iotdb/example/RocketMQProducer.java
similarity index 96%
rename from example/src/main/java/org/apache/iotdb/example/rocketmqdemo/RocketMQProducer.java
rename to example/rocketmq/src/main/java/org/apache/iotdb/example/RocketMQProducer.java
index ce0f88c..f4c5a07 100644
--- a/example/src/main/java/org/apache/iotdb/example/rocketmqdemo/RocketMQProducer.java
+++ b/example/rocketmq/src/main/java/org/apache/iotdb/example/RocketMQProducer.java
@@ -16,13 +16,11 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.iotdb.example.rocketmqdemo;
+package org.apache.iotdb.example;
 
-import org.apache.iotdb.example.Utils;
 import org.apache.rocketmq.client.exception.MQBrokerException;
 import org.apache.rocketmq.client.exception.MQClientException;
 import org.apache.rocketmq.client.producer.DefaultMQProducer;
-import org.apache.rocketmq.client.producer.MQProducer;
 import org.apache.rocketmq.client.producer.SendResult;
 import org.apache.rocketmq.common.message.Message;
 import org.apache.rocketmq.remoting.common.RemotingHelper;
diff --git a/example/src/main/java/org/apache/iotdb/example/Utils.java b/example/rocketmq/src/main/java/org/apache/iotdb/example/Utils.java
similarity index 100%
rename from example/src/main/java/org/apache/iotdb/example/Utils.java
rename to example/rocketmq/src/main/java/org/apache/iotdb/example/Utils.java
diff --git a/pom.xml b/pom.xml
index 2a2e9ab..5aa9503 100644
--- a/pom.xml
+++ b/pom.xml
@@ -134,7 +134,6 @@
         <module>grafana</module>
         <module>service-rpc</module>
         <module>iotdb-cli</module>
-        <module>example</module>
         <!-- <module>hadoop</module> -->
         <!-- <module>spark</module> -->
     </modules>