You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by il...@apache.org on 2019/07/02 09:12:17 UTC

[dubbo-samples] branch master updated: integration test for dubbo-samples-thrift

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

iluo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-samples.git


The following commit(s) were added to refs/heads/master by this push:
     new b4cf036  integration test for dubbo-samples-thrift
b4cf036 is described below

commit b4cf03681b2a162ca0cad004f2f6516461636dc5
Author: Ian Luo <ia...@gmail.com>
AuthorDate: Tue Jul 2 17:10:27 2019 +0800

    integration test for dubbo-samples-thrift
---
 dubbo-samples-thrift/README.md                     |  51 +++-
 .../dubbo-samples-thrift-api/pom.xml               |  65 +++++
 .../samples/rpc/nativethrift/api/DemoService.java  | 112 ++++++--
 .../src/main/thrift}/DemoService.thrift            |   4 +-
 .../dubbo-samples-thrift-impl/pom.xml              | 149 +++++++++++
 .../samples/rpc/nativethrift/DemoServiceImpl.java  |   4 +-
 .../rpc/nativethrift/EmbeddedZooKeeper.java        | 256 ++++++++++++++++++
 .../samples/rpc/nativethrift/ThriftConsumer.java   |   9 +-
 .../samples/rpc/nativethrift/ThriftProvider.java   |  15 +-
 .../src/main/resources/log4j.properties            |  23 ++
 .../src/main/resources/spring/thrift-consumer.xml  |  33 +++
 .../src/main/resources/spring}/thrift-provider.xml |  15 +-
 .../samples/rpc/nativethrift/DemoServiceIT.java    |  51 ++++
 dubbo-samples-thrift/pom.xml                       | 286 +--------------------
 .../src/main/resources/thrift-consumer.xml         |  33 ---
 .../src/main/scripts/gene-thrift.sh                |   9 -
 16 files changed, 743 insertions(+), 372 deletions(-)

diff --git a/dubbo-samples-thrift/README.md b/dubbo-samples-thrift/README.md
index 709be31..2a7fd79 100644
--- a/dubbo-samples-thrift/README.md
+++ b/dubbo-samples-thrift/README.md
@@ -1,6 +1,47 @@
-A usage of thrift and dubbo
+# Thrift samples
 
-1. Install thrift in your pc
-2. cd dubbo-samples/dubbo-samples-thrift
-3. Run ./src/main/scripts/gene-thrift.sh to generate Java Files
-4. Run demo
\ No newline at end of file
+## How to build
+
+1. Install thrift
+
+Download thrift binary from [here](https://thrift.apache.org/download). If you work on Mac OS, you can simply install it with the following command:
+
+```bash
+brew install thrift
+```
+
+2. Generate DemoService.java
+
+Once you update the location of the thrift binary downloaded just now in pom.xml:
+
+```xml
+<properties>
+    <thrift.path>/usr/local/bin/thrift</thrift.path>
+</properties>
+```
+
+then you can execute the following command to generate *org.apache.dubbo.samples.rpc.nativethrift.api.DemoService* from *thrift/DemoService.thrift*:
+
+```bash
+mvn -Pthrift-gen clean package
+```
+
+Alternatively you can use the following script to achieve the same purpose:
+
+```bash
+#!/usr/bin/env bash
+service_dir="./java/"
+for thrift_file in ./idls/*
+do
+    if test -f ${thrift_file}
+    then
+        thrift --gen java --out ${service_dir} ${thrift_file}
+    fi
+done
+```
+
+Once the *DemoService.java* is generated, you can use the following command for the continuous build:
+
+```bash
+mvn clean package
+```
diff --git a/dubbo-samples-thrift/dubbo-samples-thrift-api/pom.xml b/dubbo-samples-thrift/dubbo-samples-thrift-api/pom.xml
new file mode 100644
index 0000000..1eb2309
--- /dev/null
+++ b/dubbo-samples-thrift/dubbo-samples-thrift-api/pom.xml
@@ -0,0 +1,65 @@
+<?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>dubbo-samples-thrift</artifactId>
+        <groupId>org.apache.dubbo</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>dubbo-samples-thrift-api</artifactId>
+
+    <properties>
+        <maven-thrift-plugin.version>0.1.11</maven-thrift-plugin.version>
+        <thrift.path>/usr/local/bin/thrift</thrift.path>
+    </properties>
+
+    <profiles>
+        <profile>
+            <id>thrift-gen</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.thrift.tools</groupId>
+                        <artifactId>maven-thrift-plugin</artifactId>
+                        <version>${maven-thrift-plugin.version}</version>
+                        <configuration>
+                            <thriftExecutable>${thrift.path}</thriftExecutable>
+                            <generator>java</generator>
+                            <outputDirectory>src/main/java</outputDirectory>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>thrift-sources</id>
+                                <phase>generate-sources</phase>
+                                <goals>
+                                    <goal>compile</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
+</project>
diff --git a/dubbo-samples-thrift/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/api/DemoService.java b/dubbo-samples-thrift/dubbo-samples-thrift-api/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/api/DemoService.java
similarity index 97%
rename from dubbo-samples-thrift/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/api/DemoService.java
rename to dubbo-samples-thrift/dubbo-samples-thrift-api/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/api/DemoService.java
index 47baf52..7931928 100644
--- a/dubbo-samples-thrift/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/api/DemoService.java
+++ b/dubbo-samples-thrift/dubbo-samples-thrift-api/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/api/DemoService.java
@@ -1,5 +1,5 @@
 /**
- * Autogenerated by Thrift Compiler (0.11.0)
+ * Autogenerated by Thrift Compiler (0.12.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
@@ -7,7 +7,7 @@
 package org.apache.dubbo.samples.rpc.nativethrift.api;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)", date = "2018-07-08")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-07-02")
 public class DemoService {
 
   public interface Iface {
@@ -506,7 +506,7 @@ public class DemoService {
       }
 
       @Override
-      protected boolean handleRuntimeExceptions() {
+      protected boolean rethrowUnhandledExceptions() {
         return false;
       }
 
@@ -532,7 +532,7 @@ public class DemoService {
       }
 
       @Override
-      protected boolean handleRuntimeExceptions() {
+      protected boolean rethrowUnhandledExceptions() {
         return false;
       }
 
@@ -558,7 +558,7 @@ public class DemoService {
       }
 
       @Override
-      protected boolean handleRuntimeExceptions() {
+      protected boolean rethrowUnhandledExceptions() {
         return false;
       }
 
@@ -584,7 +584,7 @@ public class DemoService {
       }
 
       @Override
-      protected boolean handleRuntimeExceptions() {
+      protected boolean rethrowUnhandledExceptions() {
         return false;
       }
 
@@ -610,7 +610,7 @@ public class DemoService {
       }
 
       @Override
-      protected boolean handleRuntimeExceptions() {
+      protected boolean rethrowUnhandledExceptions() {
         return false;
       }
 
@@ -636,7 +636,7 @@ public class DemoService {
       }
 
       @Override
-      protected boolean handleRuntimeExceptions() {
+      protected boolean rethrowUnhandledExceptions() {
         return false;
       }
 
@@ -662,7 +662,7 @@ public class DemoService {
       }
 
       @Override
-      protected boolean handleRuntimeExceptions() {
+      protected boolean rethrowUnhandledExceptions() {
         return false;
       }
 
@@ -1156,6 +1156,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches fieldId, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
           case 1: // ARG
@@ -1178,6 +1179,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches name, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByName(java.lang.String name) {
         return byName.get(name);
       }
@@ -1263,7 +1265,7 @@ public class DemoService {
       __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ARG_ISSET_ID, value);
     }
 
-    public void setFieldValue(_Fields field, java.lang.Object value) {
+    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
       switch (field) {
       case ARG:
         if (value == null) {
@@ -1276,6 +1278,7 @@ public class DemoService {
       }
     }
 
+    @org.apache.thrift.annotation.Nullable
     public java.lang.Object getFieldValue(_Fields field) {
       switch (field) {
       case ARG:
@@ -1355,6 +1358,7 @@ public class DemoService {
       return 0;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public _Fields fieldForId(int fieldId) {
       return _Fields.findByThriftId(fieldId);
     }
@@ -1508,6 +1512,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches fieldId, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
           case 0: // SUCCESS
@@ -1530,6 +1535,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches name, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByName(java.lang.String name) {
         return byName.get(name);
       }
@@ -1615,7 +1621,7 @@ public class DemoService {
       __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
     }
 
-    public void setFieldValue(_Fields field, java.lang.Object value) {
+    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
       switch (field) {
       case SUCCESS:
         if (value == null) {
@@ -1628,6 +1634,7 @@ public class DemoService {
       }
     }
 
+    @org.apache.thrift.annotation.Nullable
     public java.lang.Object getFieldValue(_Fields field) {
       switch (field) {
       case SUCCESS:
@@ -1707,6 +1714,7 @@ public class DemoService {
       return 0;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public _Fields fieldForId(int fieldId) {
       return _Fields.findByThriftId(fieldId);
     }
@@ -1868,6 +1876,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches fieldId, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
           case 1: // ARG
@@ -1890,6 +1899,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches name, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByName(java.lang.String name) {
         return byName.get(name);
       }
@@ -1975,7 +1985,7 @@ public class DemoService {
       __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ARG_ISSET_ID, value);
     }
 
-    public void setFieldValue(_Fields field, java.lang.Object value) {
+    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
       switch (field) {
       case ARG:
         if (value == null) {
@@ -1988,6 +1998,7 @@ public class DemoService {
       }
     }
 
+    @org.apache.thrift.annotation.Nullable
     public java.lang.Object getFieldValue(_Fields field) {
       switch (field) {
       case ARG:
@@ -2067,6 +2078,7 @@ public class DemoService {
       return 0;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public _Fields fieldForId(int fieldId) {
       return _Fields.findByThriftId(fieldId);
     }
@@ -2220,6 +2232,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches fieldId, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
           case 0: // SUCCESS
@@ -2242,6 +2255,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches name, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByName(java.lang.String name) {
         return byName.get(name);
       }
@@ -2327,7 +2341,7 @@ public class DemoService {
       __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
     }
 
-    public void setFieldValue(_Fields field, java.lang.Object value) {
+    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
       switch (field) {
       case SUCCESS:
         if (value == null) {
@@ -2340,6 +2354,7 @@ public class DemoService {
       }
     }
 
+    @org.apache.thrift.annotation.Nullable
     public java.lang.Object getFieldValue(_Fields field) {
       switch (field) {
       case SUCCESS:
@@ -2419,6 +2434,7 @@ public class DemoService {
       return 0;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public _Fields fieldForId(int fieldId) {
       return _Fields.findByThriftId(fieldId);
     }
@@ -2580,6 +2596,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches fieldId, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
           case 1: // ARG
@@ -2602,6 +2619,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches name, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByName(java.lang.String name) {
         return byName.get(name);
       }
@@ -2687,7 +2705,7 @@ public class DemoService {
       __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ARG_ISSET_ID, value);
     }
 
-    public void setFieldValue(_Fields field, java.lang.Object value) {
+    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
       switch (field) {
       case ARG:
         if (value == null) {
@@ -2700,6 +2718,7 @@ public class DemoService {
       }
     }
 
+    @org.apache.thrift.annotation.Nullable
     public java.lang.Object getFieldValue(_Fields field) {
       switch (field) {
       case ARG:
@@ -2779,6 +2798,7 @@ public class DemoService {
       return 0;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public _Fields fieldForId(int fieldId) {
       return _Fields.findByThriftId(fieldId);
     }
@@ -2932,6 +2952,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches fieldId, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
           case 0: // SUCCESS
@@ -2954,6 +2975,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches name, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByName(java.lang.String name) {
         return byName.get(name);
       }
@@ -3039,7 +3061,7 @@ public class DemoService {
       __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
     }
 
-    public void setFieldValue(_Fields field, java.lang.Object value) {
+    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
       switch (field) {
       case SUCCESS:
         if (value == null) {
@@ -3052,6 +3074,7 @@ public class DemoService {
       }
     }
 
+    @org.apache.thrift.annotation.Nullable
     public java.lang.Object getFieldValue(_Fields field) {
       switch (field) {
       case SUCCESS:
@@ -3131,6 +3154,7 @@ public class DemoService {
       return 0;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public _Fields fieldForId(int fieldId) {
       return _Fields.findByThriftId(fieldId);
     }
@@ -3292,6 +3316,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches fieldId, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
           case 1: // ARG
@@ -3314,6 +3339,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches name, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByName(java.lang.String name) {
         return byName.get(name);
       }
@@ -3399,7 +3425,7 @@ public class DemoService {
       __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ARG_ISSET_ID, value);
     }
 
-    public void setFieldValue(_Fields field, java.lang.Object value) {
+    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
       switch (field) {
       case ARG:
         if (value == null) {
@@ -3412,6 +3438,7 @@ public class DemoService {
       }
     }
 
+    @org.apache.thrift.annotation.Nullable
     public java.lang.Object getFieldValue(_Fields field) {
       switch (field) {
       case ARG:
@@ -3491,6 +3518,7 @@ public class DemoService {
       return 0;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public _Fields fieldForId(int fieldId) {
       return _Fields.findByThriftId(fieldId);
     }
@@ -3644,6 +3672,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches fieldId, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
           case 0: // SUCCESS
@@ -3666,6 +3695,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches name, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByName(java.lang.String name) {
         return byName.get(name);
       }
@@ -3751,7 +3781,7 @@ public class DemoService {
       __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
     }
 
-    public void setFieldValue(_Fields field, java.lang.Object value) {
+    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
       switch (field) {
       case SUCCESS:
         if (value == null) {
@@ -3764,6 +3794,7 @@ public class DemoService {
       }
     }
 
+    @org.apache.thrift.annotation.Nullable
     public java.lang.Object getFieldValue(_Fields field) {
       switch (field) {
       case SUCCESS:
@@ -3843,6 +3874,7 @@ public class DemoService {
       return 0;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public _Fields fieldForId(int fieldId) {
       return _Fields.findByThriftId(fieldId);
     }
@@ -4004,6 +4036,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches fieldId, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
           case 1: // ARG
@@ -4026,6 +4059,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches name, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByName(java.lang.String name) {
         return byName.get(name);
       }
@@ -4111,7 +4145,7 @@ public class DemoService {
       __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ARG_ISSET_ID, value);
     }
 
-    public void setFieldValue(_Fields field, java.lang.Object value) {
+    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
       switch (field) {
       case ARG:
         if (value == null) {
@@ -4124,6 +4158,7 @@ public class DemoService {
       }
     }
 
+    @org.apache.thrift.annotation.Nullable
     public java.lang.Object getFieldValue(_Fields field) {
       switch (field) {
       case ARG:
@@ -4203,6 +4238,7 @@ public class DemoService {
       return 0;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public _Fields fieldForId(int fieldId) {
       return _Fields.findByThriftId(fieldId);
     }
@@ -4356,6 +4392,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches fieldId, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
           case 0: // SUCCESS
@@ -4378,6 +4415,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches name, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByName(java.lang.String name) {
         return byName.get(name);
       }
@@ -4463,7 +4501,7 @@ public class DemoService {
       __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
     }
 
-    public void setFieldValue(_Fields field, java.lang.Object value) {
+    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
       switch (field) {
       case SUCCESS:
         if (value == null) {
@@ -4476,6 +4514,7 @@ public class DemoService {
       }
     }
 
+    @org.apache.thrift.annotation.Nullable
     public java.lang.Object getFieldValue(_Fields field) {
       switch (field) {
       case SUCCESS:
@@ -4555,6 +4594,7 @@ public class DemoService {
       return 0;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public _Fields fieldForId(int fieldId) {
       return _Fields.findByThriftId(fieldId);
     }
@@ -4716,6 +4756,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches fieldId, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
           case 1: // ARG
@@ -4738,6 +4779,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches name, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByName(java.lang.String name) {
         return byName.get(name);
       }
@@ -4823,7 +4865,7 @@ public class DemoService {
       __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ARG_ISSET_ID, value);
     }
 
-    public void setFieldValue(_Fields field, java.lang.Object value) {
+    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
       switch (field) {
       case ARG:
         if (value == null) {
@@ -4836,6 +4878,7 @@ public class DemoService {
       }
     }
 
+    @org.apache.thrift.annotation.Nullable
     public java.lang.Object getFieldValue(_Fields field) {
       switch (field) {
       case ARG:
@@ -4915,6 +4958,7 @@ public class DemoService {
       return 0;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public _Fields fieldForId(int fieldId) {
       return _Fields.findByThriftId(fieldId);
     }
@@ -5068,6 +5112,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches fieldId, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
           case 0: // SUCCESS
@@ -5090,6 +5135,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches name, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByName(java.lang.String name) {
         return byName.get(name);
       }
@@ -5175,7 +5221,7 @@ public class DemoService {
       __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
     }
 
-    public void setFieldValue(_Fields field, java.lang.Object value) {
+    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
       switch (field) {
       case SUCCESS:
         if (value == null) {
@@ -5188,6 +5234,7 @@ public class DemoService {
       }
     }
 
+    @org.apache.thrift.annotation.Nullable
     public java.lang.Object getFieldValue(_Fields field) {
       switch (field) {
       case SUCCESS:
@@ -5267,6 +5314,7 @@ public class DemoService {
       return 0;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public _Fields fieldForId(int fieldId) {
       return _Fields.findByThriftId(fieldId);
     }
@@ -5411,7 +5459,7 @@ public class DemoService {
     private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new echoString_argsStandardSchemeFactory();
     private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new echoString_argsTupleSchemeFactory();
 
-    public java.lang.String arg; // required
+    public @org.apache.thrift.annotation.Nullable java.lang.String arg; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -5428,6 +5476,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches fieldId, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
           case 1: // ARG
@@ -5450,6 +5499,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches name, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByName(java.lang.String name) {
         return byName.get(name);
       }
@@ -5509,11 +5559,12 @@ public class DemoService {
       this.arg = null;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public java.lang.String getArg() {
       return this.arg;
     }
 
-    public echoString_args setArg(java.lang.String arg) {
+    public echoString_args setArg(@org.apache.thrift.annotation.Nullable java.lang.String arg) {
       this.arg = arg;
       return this;
     }
@@ -5533,7 +5584,7 @@ public class DemoService {
       }
     }
 
-    public void setFieldValue(_Fields field, java.lang.Object value) {
+    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
       switch (field) {
       case ARG:
         if (value == null) {
@@ -5546,6 +5597,7 @@ public class DemoService {
       }
     }
 
+    @org.apache.thrift.annotation.Nullable
     public java.lang.Object getFieldValue(_Fields field) {
       switch (field) {
       case ARG:
@@ -5627,6 +5679,7 @@ public class DemoService {
       return 0;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public _Fields fieldForId(int fieldId) {
       return _Fields.findByThriftId(fieldId);
     }
@@ -5766,7 +5819,7 @@ public class DemoService {
     private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new echoString_resultStandardSchemeFactory();
     private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new echoString_resultTupleSchemeFactory();
 
-    public java.lang.String success; // required
+    public @org.apache.thrift.annotation.Nullable java.lang.String success; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -5783,6 +5836,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches fieldId, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
           case 0: // SUCCESS
@@ -5805,6 +5859,7 @@ public class DemoService {
       /**
        * Find the _Fields constant that matches name, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByName(java.lang.String name) {
         return byName.get(name);
       }
@@ -5864,11 +5919,12 @@ public class DemoService {
       this.success = null;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public java.lang.String getSuccess() {
       return this.success;
     }
 
-    public echoString_result setSuccess(java.lang.String success) {
+    public echoString_result setSuccess(@org.apache.thrift.annotation.Nullable java.lang.String success) {
       this.success = success;
       return this;
     }
@@ -5888,7 +5944,7 @@ public class DemoService {
       }
     }
 
-    public void setFieldValue(_Fields field, java.lang.Object value) {
+    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
       switch (field) {
       case SUCCESS:
         if (value == null) {
@@ -5901,6 +5957,7 @@ public class DemoService {
       }
     }
 
+    @org.apache.thrift.annotation.Nullable
     public java.lang.Object getFieldValue(_Fields field) {
       switch (field) {
       case SUCCESS:
@@ -5982,6 +6039,7 @@ public class DemoService {
       return 0;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public _Fields fieldForId(int fieldId) {
       return _Fields.findByThriftId(fieldId);
     }
diff --git a/dubbo-samples-thrift/src/main/idls/DemoService.thrift b/dubbo-samples-thrift/dubbo-samples-thrift-api/src/main/thrift/DemoService.thrift
similarity index 91%
rename from dubbo-samples-thrift/src/main/idls/DemoService.thrift
rename to dubbo-samples-thrift/dubbo-samples-thrift-api/src/main/thrift/DemoService.thrift
index ddea2ea..4ef1adb 100644
--- a/dubbo-samples-thrift/src/main/idls/DemoService.thrift
+++ b/dubbo-samples-thrift/dubbo-samples-thrift-api/src/main/thrift/DemoService.thrift
@@ -4,11 +4,11 @@ namespace go demo
 /*Here test the 7 kind of data type*/
 service DemoService {
     bool echoBool( 1:required bool arg );
-    byte echoByte( 1:required byte arg );
+    i8 echoByte( 1:required i8 arg );
     i16  echoI16 ( 1:required i16  arg );
     i32  echoI32 ( 1:required i32  arg );
     i64  echoI64 ( 1:required i64  arg );
 
     double echoDouble( 1:required double arg );
     string echoString( 1:required string arg );
-}
\ No newline at end of file
+}
diff --git a/dubbo-samples-thrift/dubbo-samples-thrift-impl/pom.xml b/dubbo-samples-thrift/dubbo-samples-thrift-impl/pom.xml
new file mode 100644
index 0000000..f8d94f9
--- /dev/null
+++ b/dubbo-samples-thrift/dubbo-samples-thrift-impl/pom.xml
@@ -0,0 +1,149 @@
+<?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>dubbo-samples-thrift</artifactId>
+        <groupId>org.apache.dubbo</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>dubbo-samples-thrift-impl</artifactId>
+
+    <properties>
+        <spring.version>4.3.16.RELEASE</spring.version>
+        <junit.version>4.12</junit.version>
+        <docker-maven-plugin.version>0.30.0</docker-maven-plugin.version>
+        <jib-maven-plugin.version>1.2.0</jib-maven-plugin.version>
+        <maven-failsafe-plugin.version>2.21.0</maven-failsafe-plugin.version>
+        <image.name>${artifactId}:${dubbo.version}</image.name>
+        <dubbo.port>2345</dubbo.port>
+        <zookeeper.port>2181</zookeeper.port>
+        <main-class>org.apache.dubbo.samples.rpc.nativethrift.ThriftProvider</main-class>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.dubbo</groupId>
+            <artifactId>dubbo-samples-thrift-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.dubbo</groupId>
+            <artifactId>dubbo</artifactId>
+            <version>${dubbo.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.dubbo</groupId>
+            <artifactId>dubbo-dependencies-zookeeper</artifactId>
+            <version>${dubbo.version}</version>
+            <type>pom</type>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>${junit.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-test</artifactId>
+            <version>${spring.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <profiles>
+        <profile>
+            <id>dubbo-integration-test</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.dubbo</groupId>
+                        <artifactId>dubbo-maven-address-plugin</artifactId>
+                        <version>1.0-SNAPSHOT</version>
+                        <executions>
+                            <execution>
+                                <goals>
+                                    <goal>local-address</goal>
+                                </goals>
+                                <configuration>
+                                    <localAddress>dubbo-local-address</localAddress>
+                                </configuration>
+                                <phase>initialize</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+
+                    <!-- FIXME: thrift protocol cannot run within docker yet -->
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <version>1.6.0</version>
+                        <executions>
+                            <execution>
+                                <phase>pre-integration-test</phase>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <configuration>
+                            <executable>java</executable>
+                            <arguments>
+                                <argument>-DDUBBO_IP_TO_REGISTRY=${dubbo-local-address}</argument>
+                                <argument>-classpath</argument>
+                                <classpath/>
+                                <argument>${main-class}</argument>
+                            </arguments>
+                            <async>true</async>
+                        </configuration>
+                    </plugin>
+
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-failsafe-plugin</artifactId>
+                        <version>${maven-failsafe-plugin.version}</version>
+                        <executions>
+                            <execution>
+                                <goals>
+                                    <goal>integration-test</goal>
+                                    <goal>verify</goal>
+                                </goals>
+                                <configuration>
+                                    <systemPropertyVariables>
+                                        <zookeeper.address>${dubbo-local-address}</zookeeper.address>
+                                    </systemPropertyVariables>
+                                    <includes>
+                                        <include>**/*IT.java</include>
+                                    </includes>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>
diff --git a/dubbo-samples-thrift/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/DemoServiceImpl.java b/dubbo-samples-thrift/dubbo-samples-thrift-impl/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/DemoServiceImpl.java
similarity index 97%
rename from dubbo-samples-thrift/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/DemoServiceImpl.java
rename to dubbo-samples-thrift/dubbo-samples-thrift-impl/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/DemoServiceImpl.java
index b86f537..b053446 100644
--- a/dubbo-samples-thrift/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/DemoServiceImpl.java
+++ b/dubbo-samples-thrift/dubbo-samples-thrift-impl/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/DemoServiceImpl.java
@@ -16,9 +16,9 @@
  */
 package org.apache.dubbo.samples.rpc.nativethrift;
 
-import com.alibaba.dubbo.rpc.RpcContext;
-
+import org.apache.dubbo.rpc.RpcContext;
 import org.apache.dubbo.samples.rpc.nativethrift.api.DemoService;
+
 import org.apache.thrift.TException;
 
 import java.util.Map;
diff --git a/dubbo-samples-thrift/dubbo-samples-thrift-impl/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/EmbeddedZooKeeper.java b/dubbo-samples-thrift/dubbo-samples-thrift-impl/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/EmbeddedZooKeeper.java
new file mode 100644
index 0000000..8c4c8a2
--- /dev/null
+++ b/dubbo-samples-thrift/dubbo-samples-thrift-impl/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/EmbeddedZooKeeper.java
@@ -0,0 +1,256 @@
+/*
+ * 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.dubbo.samples.rpc.nativethrift;
+
+import org.apache.zookeeper.server.ServerConfig;
+import org.apache.zookeeper.server.ZooKeeperServerMain;
+import org.apache.zookeeper.server.quorum.QuorumPeerConfig;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.context.SmartLifecycle;
+import org.springframework.util.ErrorHandler;
+import org.springframework.util.SocketUtils;
+
+import java.io.File;
+import java.lang.reflect.Method;
+import java.util.Properties;
+import java.util.UUID;
+
+/**
+ * from: https://github.com/spring-projects/spring-xd/blob/v1.3.1.RELEASE/spring-xd-dirt/src/main/java/org/springframework/xd/dirt/zookeeper/ZooKeeperUtils.java
+ *
+ * Helper class to start an embedded instance of standalone (non clustered) ZooKeeper.
+ *
+ * NOTE: at least an external standalone server (if not an ensemble) are recommended, even for
+ * {@link org.springframework.xd.dirt.server.singlenode.SingleNodeApplication}
+ *
+ * @author Patrick Peralta
+ * @author Mark Fisher
+ * @author David Turanski
+ */
+public class EmbeddedZooKeeper implements SmartLifecycle {
+
+    /**
+     * Logger.
+     */
+    private static final Logger logger = LoggerFactory.getLogger(EmbeddedZooKeeper.class);
+
+    /**
+     * ZooKeeper client port. This will be determined dynamically upon startup.
+     */
+    private final int clientPort;
+
+    /**
+     * Whether to auto-start. Default is true.
+     */
+    private boolean autoStartup = true;
+
+    /**
+     * Lifecycle phase. Default is 0.
+     */
+    private int phase = 0;
+
+    /**
+     * Thread for running the ZooKeeper server.
+     */
+    private volatile Thread zkServerThread;
+
+    /**
+     * ZooKeeper server.
+     */
+    private volatile ZooKeeperServerMain zkServer;
+
+    /**
+     * {@link ErrorHandler} to be invoked if an Exception is thrown from the ZooKeeper server thread.
+     */
+    private ErrorHandler errorHandler;
+
+    private boolean daemon = true;
+
+    /**
+     * Construct an EmbeddedZooKeeper with a random port.
+     */
+    public EmbeddedZooKeeper() {
+        clientPort = SocketUtils.findAvailableTcpPort();
+    }
+
+    /**
+     * Construct an EmbeddedZooKeeper with the provided port.
+     *
+     * @param clientPort  port for ZooKeeper server to bind to
+     */
+    public EmbeddedZooKeeper(int clientPort, boolean daemon) {
+        this.clientPort = clientPort;
+        this.daemon = daemon;
+    }
+
+    /**
+     * Returns the port that clients should use to connect to this embedded server.
+     *
+     * @return dynamically determined client port
+     */
+    public int getClientPort() {
+        return this.clientPort;
+    }
+
+    /**
+     * Specify whether to start automatically. Default is true.
+     *
+     * @param autoStartup whether to start automatically
+     */
+    public void setAutoStartup(boolean autoStartup) {
+        this.autoStartup = autoStartup;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean isAutoStartup() {
+        return this.autoStartup;
+    }
+
+    /**
+     * Specify the lifecycle phase for the embedded server.
+     *
+     * @param phase the lifecycle phase
+     */
+    public void setPhase(int phase) {
+        this.phase = phase;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public int getPhase() {
+        return this.phase;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean isRunning() {
+        return (zkServerThread != null);
+    }
+
+    /**
+     * Start the ZooKeeper server in a background thread.
+     * <p>
+     * Register an error handler via {@link #setErrorHandler} in order to handle
+     * any exceptions thrown during startup or execution.
+     */
+    @Override
+    public synchronized void start() {
+        if (zkServerThread == null) {
+            zkServerThread = new Thread(new ServerRunnable(), "ZooKeeper Server Starter");
+            zkServerThread.setDaemon(daemon);
+            zkServerThread.start();
+        }
+    }
+
+    /**
+     * Shutdown the ZooKeeper server.
+     */
+    @Override
+    public synchronized void stop() {
+        if (zkServerThread != null) {
+            // The shutdown method is protected...thus this hack to invoke it.
+            // This will log an exception on shutdown; see
+            // https://issues.apache.org/jira/browse/ZOOKEEPER-1873 for details.
+            try {
+                Method shutdown = ZooKeeperServerMain.class.getDeclaredMethod("shutdown");
+                shutdown.setAccessible(true);
+                shutdown.invoke(zkServer);
+            }
+
+            catch (Exception e) {
+                throw new RuntimeException(e);
+            }
+
+            // It is expected that the thread will exit after
+            // the server is shutdown; this will block until
+            // the shutdown is complete.
+            try {
+                zkServerThread.join(5000);
+                zkServerThread = null;
+            }
+            catch (InterruptedException e) {
+                Thread.currentThread().interrupt();
+                logger.warn("Interrupted while waiting for embedded ZooKeeper to exit");
+                // abandoning zk thread
+                zkServerThread = null;
+            }
+        }
+    }
+
+    /**
+     * Stop the server if running and invoke the callback when complete.
+     */
+    @Override
+    public void stop(Runnable callback) {
+        stop();
+        callback.run();
+    }
+
+    /**
+     * Provide an {@link ErrorHandler} to be invoked if an Exception is thrown from the ZooKeeper server thread. If none
+     * is provided, only error-level logging will occur.
+     *
+     * @param errorHandler the {@link ErrorHandler} to be invoked
+     */
+    public void setErrorHandler(ErrorHandler errorHandler) {
+        this.errorHandler = errorHandler;
+    }
+
+    /**
+     * Runnable implementation that starts the ZooKeeper server.
+     */
+    private class ServerRunnable implements Runnable {
+
+        @Override
+        public void run() {
+            try {
+                Properties properties = new Properties();
+                File file = new File(System.getProperty("java.io.tmpdir")
+                    + File.separator + UUID.randomUUID());
+                file.deleteOnExit();
+                properties.setProperty("dataDir", file.getAbsolutePath());
+                properties.setProperty("clientPort", String.valueOf(clientPort));
+
+                QuorumPeerConfig quorumPeerConfig = new QuorumPeerConfig();
+                quorumPeerConfig.parseProperties(properties);
+
+                zkServer = new ZooKeeperServerMain();
+                ServerConfig configuration = new ServerConfig();
+                configuration.readFrom(quorumPeerConfig);
+
+                zkServer.runFromConfig(configuration);
+            }
+            catch (Exception e) {
+                if (errorHandler != null) {
+                    errorHandler.handleError(e);
+                }
+                else {
+                    logger.error("Exception running embedded ZooKeeper", e);
+                }
+            }
+        }
+    }
+
+}
diff --git a/dubbo-samples-thrift/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/ThriftConsumer.java b/dubbo-samples-thrift/dubbo-samples-thrift-impl/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/ThriftConsumer.java
similarity index 88%
rename from dubbo-samples-thrift/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/ThriftConsumer.java
rename to dubbo-samples-thrift/dubbo-samples-thrift-impl/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/ThriftConsumer.java
index d50788c..ba669ee 100644
--- a/dubbo-samples-thrift/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/ThriftConsumer.java
+++ b/dubbo-samples-thrift/dubbo-samples-thrift-impl/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/ThriftConsumer.java
@@ -16,17 +16,18 @@
  */
 package org.apache.dubbo.samples.rpc.nativethrift;
 
-import com.alibaba.dubbo.rpc.RpcContext;
 
+import org.apache.dubbo.rpc.RpcContext;
 import org.apache.dubbo.samples.rpc.nativethrift.api.DemoService;
 
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 public class ThriftConsumer {
     public static void main(String[] args) throws Exception {
-        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("thrift-consumer.xml");
+        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring/thrift-consumer.xml");
         context.start();
-        DemoService.Iface demo = (DemoService.Iface) context.getBean("demoService");
+
+        DemoService.Iface demo = context.getBean("demoService", DemoService.Iface.class);
         for (int i = 0; i < 10; i++) {
             RpcContext.getContext().setAttachment("parm", "hehe" + i);
             System.out.println(demo.echoI32(i + 1));
@@ -34,4 +35,4 @@ public class ThriftConsumer {
         }
         context.close();
     }
-}
\ No newline at end of file
+}
diff --git a/dubbo-samples-thrift/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/ThriftProvider.java b/dubbo-samples-thrift/dubbo-samples-thrift-impl/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/ThriftProvider.java
similarity index 82%
rename from dubbo-samples-thrift/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/ThriftProvider.java
rename to dubbo-samples-thrift/dubbo-samples-thrift-impl/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/ThriftProvider.java
index cc3f6e7..882bedf 100644
--- a/dubbo-samples-thrift/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/ThriftProvider.java
+++ b/dubbo-samples-thrift/dubbo-samples-thrift-impl/src/main/java/org/apache/dubbo/samples/rpc/nativethrift/ThriftProvider.java
@@ -18,15 +18,16 @@ package org.apache.dubbo.samples.rpc.nativethrift;
 
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
+import java.util.concurrent.CountDownLatch;
+
 public class ThriftProvider {
-    /**
-     * thrift provider
-     */
     public static void main(String[] args) throws Exception {
-        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("thrift-provider.xml");
+        new EmbeddedZooKeeper(2181, false).start();
+
+        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring/thrift-provider.xml");
         context.start();
-        System.out.println("context started");
-        System.in.read();
-    }
 
+        System.out.println("dubbo service started");
+        new CountDownLatch(1).await();
+    }
 }
diff --git a/dubbo-samples-thrift/dubbo-samples-thrift-impl/src/main/resources/log4j.properties b/dubbo-samples-thrift/dubbo-samples-thrift-impl/src/main/resources/log4j.properties
new file mode 100644
index 0000000..2e299bb
--- /dev/null
+++ b/dubbo-samples-thrift/dubbo-samples-thrift-impl/src/main/resources/log4j.properties
@@ -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.
+#
+#
+log4j.rootLogger=info, stdout
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.Target=System.out
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=[%d{dd/MM/yy hh:mm:ss:sss z}] %t %5p %c{2}: %m%n
diff --git a/dubbo-samples-thrift/dubbo-samples-thrift-impl/src/main/resources/spring/thrift-consumer.xml b/dubbo-samples-thrift/dubbo-samples-thrift-impl/src/main/resources/spring/thrift-consumer.xml
new file mode 100644
index 0000000..ec0e270
--- /dev/null
+++ b/dubbo-samples-thrift/dubbo-samples-thrift-impl/src/main/resources/spring/thrift-consumer.xml
@@ -0,0 +1,33 @@
+<?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.
+  -->
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:dubbo="http://dubbo.apache.org/schema/dubbo"
+       xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+    http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
+    <context:property-placeholder/>
+
+    <dubbo:application name="thrift-consumer"/>
+
+    <dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
+
+    <dubbo:protocol name="native-thrift"/>
+
+    <dubbo:reference id="demoService" interface="org.apache.dubbo.samples.rpc.nativethrift.api.DemoService$Iface"
+                     version="1.0.0"/>
+</beans>
diff --git a/dubbo-samples-thrift/src/main/resources/thrift-provider.xml b/dubbo-samples-thrift/dubbo-samples-thrift-impl/src/main/resources/spring/thrift-provider.xml
similarity index 68%
rename from dubbo-samples-thrift/src/main/resources/thrift-provider.xml
rename to dubbo-samples-thrift/dubbo-samples-thrift-impl/src/main/resources/spring/thrift-provider.xml
index ccda93a..7fe43e9 100644
--- a/dubbo-samples-thrift/src/main/resources/thrift-provider.xml
+++ b/dubbo-samples-thrift/dubbo-samples-thrift-impl/src/main/resources/spring/thrift-provider.xml
@@ -17,19 +17,20 @@
   -->
 <beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:dubbo="http://dubbo.apache.org/schema/dubbo"
-       xmlns="http://www.springframework.org/schema/beans"
+       xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-    http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd">
+    http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
+    <context:property-placeholder/>
 
     <dubbo:application name="thrift-provider"/>
 
-    <dubbo:registry address="zookeeper://127.0.0.1:2181"/>
+    <dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
 
-    <dubbo:protocol name="nthrift" id="nthrift" port="2345"/>
+    <dubbo:protocol name="native-thrift" id="native-thrift" port="2345"/>
 
     <bean id="demoService" class="org.apache.dubbo.samples.rpc.nativethrift.DemoServiceImpl"/>
 
-    <dubbo:service protocol="nthrift" interface="org.apache.dubbo.samples.rpc.nativethrift.api.DemoService$Iface"
-                   ref="demoService" version="1.0.0"/>
+    <dubbo:service interface="org.apache.dubbo.samples.rpc.nativethrift.api.DemoService$Iface" ref="demoService"
+                   version="1.0.0"/>
 
-</beans>
\ No newline at end of file
+</beans>
diff --git a/dubbo-samples-thrift/dubbo-samples-thrift-impl/src/test/java/org/apache/dubbo/samples/rpc/nativethrift/DemoServiceIT.java b/dubbo-samples-thrift/dubbo-samples-thrift-impl/src/test/java/org/apache/dubbo/samples/rpc/nativethrift/DemoServiceIT.java
new file mode 100644
index 0000000..c860328
--- /dev/null
+++ b/dubbo-samples-thrift/dubbo-samples-thrift-impl/src/test/java/org/apache/dubbo/samples/rpc/nativethrift/DemoServiceIT.java
@@ -0,0 +1,51 @@
+/*
+ * 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.dubbo.samples.rpc.nativethrift;
+
+import org.apache.dubbo.samples.rpc.nativethrift.api.DemoService;
+
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration(locations = {"classpath:/spring/thrift-consumer.xml"})
+public class DemoServiceIT {
+    @Autowired
+    private DemoService.Iface demoService;
+
+    @BeforeClass
+    public static void sleep() throws Exception {
+        Thread.sleep(5000);
+    }
+
+    @Test
+    public void test() throws Exception {
+        Assert.assertTrue(demoService.echoBool(true));
+        Assert.assertEquals((byte) 0x1b, demoService.echoByte((byte) 0x1b));
+        Assert.assertEquals(2, demoService.echoDouble(2d), 0);
+        Assert.assertEquals(3, demoService.echoI16((short) 3));
+        Assert.assertEquals(4, demoService.echoI32(4));
+        Assert.assertEquals(5, demoService.echoI64(5));
+        Assert.assertEquals("hello", demoService.echoString("hello"));
+    }
+}
diff --git a/dubbo-samples-thrift/pom.xml b/dubbo-samples-thrift/pom.xml
index a3ab32a..9819e05 100644
--- a/dubbo-samples-thrift/pom.xml
+++ b/dubbo-samples-thrift/pom.xml
@@ -20,321 +20,55 @@
          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">
     <groupId>org.apache.dubbo</groupId>
+    <packaging>pom</packaging>
     <version>1.0-SNAPSHOT</version>
 
+    <modules>
+        <module>dubbo-samples-thrift-api</module>
+        <module>dubbo-samples-thrift-impl</module>
+    </modules>
+
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>dubbo-samples-thrift</artifactId>
 
     <properties>
+        <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
+        <dubbo.version>2.7.2</dubbo.version>
         <source.level>1.8</source.level>
         <target.level>1.8</target.level>
-        <spring.version>4.3.16.RELEASE</spring.version>
-        <dubbo.version>2.7.0</dubbo.version>
-        <dubbo.rpc.version>2.7.0</dubbo.rpc.version>
-        <zookeeper.version>3.4.13</zookeeper.version>
-        <curator.version>4.0.1</curator.version>
-        <validation-api.version>1.1.0.Final</validation-api.version>
-        <hibernate-validator.version>4.2.0.Final</hibernate-validator.version>
-        <resteasy.version>3.0.19.Final</resteasy.version>
-        <curator-client.version>4.0.1</curator-client.version>
-        <swagger.version>1.5.19</swagger.version>
-        <tomcat.version>7.0.88</tomcat.version>
-        <servlet.version>3.0.1</servlet.version>
-        <maven_checkstyle_version>3.0.0</maven_checkstyle_version>
-        <apache-rat-plugin.version>0.12</apache-rat-plugin.version>
-        <spring-boot.version>1.5.13.RELEASE</spring-boot.version>
-        <dubbo-rpc-native-thrift.version>2.7.2</dubbo-rpc-native-thrift.version>
-        <libthrift.version>0.11.0</libthrift.version>
-        <javax.annotation-api.version>1.3.2</javax.annotation-api.version>
     </properties>
 
     <dependencyManagement>
         <dependencies>
             <dependency>
-                <groupId>org.springframework</groupId>
-                <artifactId>spring-framework-bom</artifactId>
-                <version>${spring.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-            <dependency>
-                <!-- Import dependency management from Spring Boot -->
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-dependencies</artifactId>
-                <version>${spring-boot.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-            <dependency>
-                <groupId>io.netty</groupId>
-                <artifactId>netty-all</artifactId>
-                <version>4.1.16.Final</version>
-            </dependency>
-            <dependency>
                 <groupId>org.apache.dubbo</groupId>
-                <artifactId>dubbo-bom</artifactId>
+                <artifactId>dubbo-dependencies-bom</artifactId>
                 <version>${dubbo.version}</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
-            <dependency>
-                <groupId>org.apache.dubbo</groupId>
-                <artifactId>dubbo</artifactId>
-                <version>${dubbo.version}</version>
-                <exclusions>
-                    <exclusion>
-                        <groupId>org.apache.thrift</groupId>
-                        <artifactId>libthrift</artifactId>
-                    </exclusion>
-                </exclusions>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.dubbo</groupId>
-                <artifactId>dubbo-rpc-rest</artifactId>
-                <version>${dubbo.rpc.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.zookeeper</groupId>
-                <artifactId>zookeeper</artifactId>
-                <version>${zookeeper.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.curator</groupId>
-                <artifactId>curator-framework</artifactId>
-                <version>${curator.version}</version>
-                <exclusions>
-                    <exclusion>
-                        <groupId>org.apache.zookeeper</groupId>
-                        <artifactId>zookeeper</artifactId>
-                    </exclusion>
-                </exclusions>
-            </dependency>
-            <dependency>
-                <groupId>javax.validation</groupId>
-                <artifactId>validation-api</artifactId>
-                <version>${validation-api.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.hibernate</groupId>
-                <artifactId>hibernate-validator</artifactId>
-                <version>${hibernate-validator.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.jboss.resteasy</groupId>
-                <artifactId>resteasy-jackson-provider</artifactId>
-                <version>${resteasy.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.curator</groupId>
-                <artifactId>curator-client</artifactId>
-                <version>${curator-client.version}</version>
-                <exclusions>
-                    <exclusion>
-                        <groupId>org.apache.zookeeper</groupId>
-                        <artifactId>zookeeper</artifactId>
-                    </exclusion>
-                </exclusions>
-            </dependency>
-            <dependency>
-                <groupId>javax.servlet</groupId>
-                <artifactId>javax.servlet-api</artifactId>
-                <version>${servlet.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.tomcat.embed</groupId>
-                <artifactId>tomcat-embed-core</artifactId>
-                <version>${tomcat.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.tomcat.embed</groupId>
-                <artifactId>tomcat-embed-logging-juli</artifactId>
-                <version>${tomcat.version}</version>
-            </dependency>
-            <!-- swagger -->
-            <dependency>
-                <groupId>io.swagger</groupId>
-                <artifactId>swagger-annotations</artifactId>
-                <version>${swagger.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>io.swagger</groupId>
-                <artifactId>swagger-jaxrs</artifactId>
-                <version>${swagger.version}</version>
-            </dependency>
         </dependencies>
     </dependencyManagement>
 
     <dependencies>
         <dependency>
-            <groupId>org.apache.curator</groupId>
-            <artifactId>curator-framework</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>io.netty</groupId>
-                    <artifactId>netty</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.apache.zookeeper</groupId>
-                    <artifactId>zookeeper</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.zookeeper</groupId>
-            <artifactId>zookeeper</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.dubbo</groupId>
-            <artifactId>dubbo</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.dubbo</groupId>
-            <artifactId>dubbo-configcenter-zookeeper</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>io.netty</groupId>
-            <artifactId>netty-all</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-simple</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-context</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.dubbo</groupId>
-            <artifactId>dubbo-rpc-native-thrift</artifactId>
-            <version>${dubbo-rpc-native-thrift.version}</version>
-        </dependency>
-        <dependency>
             <groupId>org.apache.thrift</groupId>
             <artifactId>libthrift</artifactId>
-            <version>${libthrift.version}</version>
         </dependency>
-        <dependency>
-            <groupId>javax.annotation</groupId>
-            <artifactId>javax.annotation-api</artifactId>
-            <version>${javax.annotation-api.version}</version>
-        </dependency>
-
     </dependencies>
 
     <build>
-        <pluginManagement>
-            <plugins>
-                <plugin>
-                    <groupId>org.springframework.boot</groupId>
-                    <artifactId>spring-boot-maven-plugin</artifactId>
-                    <version>${spring-boot.version}</version>
-                </plugin>
-            </plugins>
-        </pluginManagement>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.7.0</version>
+                <version>${maven-compiler-plugin.version}</version>
                 <configuration>
                     <source>${source.level}</source>
                     <target>${target.level}</target>
                 </configuration>
             </plugin>
-            <plugin>
-                <groupId>org.apache.rat</groupId>
-                <artifactId>apache-rat-plugin</artifactId>
-                <version>${apache-rat-plugin.version}</version>
-                <executions>
-                    <execution>
-                        <id>verify.rat</id>
-                        <phase>verify</phase>
-                        <goals>
-                            <goal>check</goal>
-                        </goals>
-                        <configuration>
-                            <excludes>
-                                <exclude>**/*.versionsBackup</exclude>
-                                <exclude>**/.idea/</exclude>
-                                <exclude>**/*.iml</exclude>
-                                <exclude>**/*.txt</exclude>
-                                <exclude>**/*.load</exclude>
-                                <exclude>**/*.flex</exclude>
-                                <exclude>**/*.fc</exclude>
-                                <exclude>**/*.javascript</exclude>
-                                <exclude>**/*.properties</exclude>
-                                <exclude>**/*.thrift</exclude>
-                                <exclude>**/*.sh</exclude>
-                                <exclude>**/*.bat</exclude>
-                                <exclude>**/*.md</exclude>
-                                <exclude>.git/</exclude>
-                                <exclude>.gitignore</exclude>
-                                <!-- ASF jenkins box puts the Maven repo in our root directory. -->
-                                <exclude>.repository/</exclude>
-                                <exclude>**/.settings/*</exclude>
-                                <exclude>**/.classpath</exclude>
-                                <exclude>**/.project</exclude>
-                                <exclude>**/target/**</exclude>
-                                <exclude>**/*.log</exclude>
-                                <exclude>CODE_OF_CONDUCT.md</exclude>
-                                <exclude>.codecov.yml</exclude>
-                                <exclude>.travis.yml</exclude>
-                                <exclude>PULL_REQUEST_TEMPLATE.md</exclude>
-                                <exclude>CONTRIBUTING.md</exclude>
-                                <exclude>README.md</exclude>
-                                <exclude>**/codestyle/*</exclude>
-                                <exclude>**/resources/META-INF/**</exclude>
-                                <exclude>**/webapp/swagger/**</exclude>
-                                <exclude>**/org/apache/dubbo/samples/rpc/nativethrift/api/DemoService.java</exclude>
-                            </excludes>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
         </plugins>
     </build>
-
-    <profiles>
-        <profile>
-            <id>checkstyle</id>
-            <activation>
-                <jdk>[1.8,)</jdk>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-checkstyle-plugin</artifactId>
-                        <version>${maven_checkstyle_version}</version>
-                        <dependencies>
-                            <dependency>
-                                <groupId>com.puppycrawl.tools</groupId>
-                                <artifactId>checkstyle</artifactId>
-                                <version>8.9</version>
-                            </dependency>
-                        </dependencies>
-                        <executions>
-                            <execution>
-                                <id>checkstyle-validation</id>
-                                <phase>validate</phase>
-                                <configuration>
-                                    <configLocation>../codestyle/checkstyle.xml</configLocation>
-                                    <suppressionsLocation>../codestyle/checkstyle-suppressions.xml
-                                    </suppressionsLocation>
-                                    <encoding>UTF-8</encoding>
-                                    <consoleOutput>true</consoleOutput>
-                                    <failOnViolation>true</failOnViolation>
-                                </configuration>
-                                <goals>
-                                    <goal>check</goal>
-                                </goals>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
-
 </project>
diff --git a/dubbo-samples-thrift/src/main/resources/thrift-consumer.xml b/dubbo-samples-thrift/src/main/resources/thrift-consumer.xml
deleted file mode 100644
index b207219..0000000
--- a/dubbo-samples-thrift/src/main/resources/thrift-consumer.xml
+++ /dev/null
@@ -1,33 +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.
-  -->
-<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:dubbo="http://dubbo.apache.org/schema/dubbo"
-       xmlns="http://www.springframework.org/schema/beans"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-    http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd">
-
-    <dubbo:application name="thrift-consumer"/>
-
-    <dubbo:registry address="zookeeper://127.0.0.1:2181"/>
-
-    <dubbo:protocol name="nthrift"/>
-
-    <dubbo:reference id="demoService" interface="org.apache.dubbo.samples.rpc.nativethrift.api.DemoService$Iface"
-                     version="1.0.0"/>
-
-</beans>
\ No newline at end of file
diff --git a/dubbo-samples-thrift/src/main/scripts/gene-thrift.sh b/dubbo-samples-thrift/src/main/scripts/gene-thrift.sh
deleted file mode 100755
index 44cf7fc..0000000
--- a/dubbo-samples-thrift/src/main/scripts/gene-thrift.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env bash
-service_dir="./java/"
-for thrift_file in ./idls/*
-do
-    if test -f $file
-    then
-        thrift --gen java --out ${service_dir} ${thrift_file}
-    fi
-done
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org