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

crazyhzm 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 0e85a8bae Remove monitor samples
     new 96289a33c Merge pull request #1031 from CrazyHZM/feat/remove_monitor
0e85a8bae is described below

commit 0e85a8bae22edbaba09100fdbf59e7b8a62d6747
Author: crazyhzm <[email protected]>
AuthorDate: Wed Dec 13 16:49:26 2023 +0800

    Remove monitor samples
    
    Signed-off-by: crazyhzm <[email protected]>
---
 .../dubbo-samples-monitor/case-configuration.yml   |  59 ---------
 .../dubbo-samples-monitor/case-versions.conf       |  25 ----
 4-governance/dubbo-samples-monitor/pom.xml         | 145 ---------------------
 .../dubbo/samples/monitor/BasicConsumer.java       |  34 -----
 .../apache/dubbo/samples/monitor/BasicMonitor.java |  33 -----
 .../dubbo/samples/monitor/BasicProvider.java       |  34 -----
 .../dubbo/samples/monitor/api/DemoService.java     |  24 ----
 .../samples/monitor/impl/DemoServiceImpl.java      |  34 -----
 .../samples/monitor/impl/MonitorServiceImpl.java   |  38 ------
 .../src/main/resources/log4j2.xml                  |  29 -----
 .../main/resources/spring/dubbo-demo-consumer.xml  |  33 -----
 .../main/resources/spring/dubbo-demo-monitor.xml   |  35 -----
 .../main/resources/spring/dubbo-demo-provider.xml  |  39 ------
 .../dubbo/samples/monitor/MonitorServiceIT.java    |  88 -------------
 .../src/test/resources/spring/monitor-service.xml  |  35 -----
 4-governance/pom.xml                               |   3 +-
 16 files changed, 1 insertion(+), 687 deletions(-)

diff --git a/4-governance/dubbo-samples-monitor/case-configuration.yml 
b/4-governance/dubbo-samples-monitor/case-configuration.yml
deleted file mode 100644
index 77b07731b..000000000
--- a/4-governance/dubbo-samples-monitor/case-configuration.yml
+++ /dev/null
@@ -1,59 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-services:
-  zookeeper:
-    image: zookeeper:latest
-
-  dubbo-provider:
-    type: app
-    basedir: .
-    mainClass: org.apache.dubbo.samples.monitor.BasicProvider
-    systemProps:
-      - zookeeper.address=zookeeper
-      - zookeeper.port=2181
-    waitPortsBeforeRun:
-      - zookeeper:2181
-    checkPorts:
-      - 20880
-    checkLog: "dubbo service started"
-
-  dubbo-monitor:
-    type: app
-    basedir: .
-    mainClass: org.apache.dubbo.samples.monitor.BasicMonitor
-    systemProps:
-      - zookeeper.address=zookeeper
-      - zookeeper.port=2181
-    waitPortsBeforeRun:
-      - zookeeper:2181
-    checkPorts:
-      - 20881
-    checkLog: "dubbo service started"
-
-  monitor-test:
-    type: test
-    basedir: .
-    tests:
-      - "**/*IT.class"
-    systemProps:
-      - zookeeper.address=zookeeper
-      - zookeeper.port=2181
-    waitPortsBeforeRun:
-      - zookeeper:2181
-    depends_on:
-      - dubbo-provider
-      - dubbo-monitor
diff --git a/4-governance/dubbo-samples-monitor/case-versions.conf 
b/4-governance/dubbo-samples-monitor/case-versions.conf
deleted file mode 100644
index ac83f45c3..000000000
--- a/4-governance/dubbo-samples-monitor/case-versions.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-#
-#   Licensed to the Apache Software Foundation (ASF) under one or more
-#   contributor license agreements.  See the NOTICE file distributed with
-#   this work for additional information regarding copyright ownership.
-#   The ASF licenses this file to You under the Apache License, Version 2.0
-#   (the "License"); you may not use this file except in compliance with
-#   the License.  You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-#
-
-
-# Supported component versions of the test case
-
-# Spring app
-dubbo.version=2.7*,3.*
-spring.version=4.*, 5.*
-java.version= [>= 8]
diff --git a/4-governance/dubbo-samples-monitor/pom.xml 
b/4-governance/dubbo-samples-monitor/pom.xml
deleted file mode 100644
index 9b46df912..000000000
--- a/4-governance/dubbo-samples-monitor/pom.xml
+++ /dev/null
@@ -1,145 +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";>
-    <groupId>org.apache.dubbo</groupId>
-    <version>1.0-SNAPSHOT</version>
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>dubbo-samples-monitor</artifactId>
-    <name>Dubbo Samples Monitor</name>
-    <description>Dubbo Samples Monitor</description>
-
-    <properties>
-        <maven.compiler.source>1.8</maven.compiler.source>
-        <maven.compiler.target>1.8</maven.compiler.target>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-
-        <dubbo.version>3.2.6</dubbo.version>
-        <spring.version>4.3.30.RELEASE</spring.version>
-        <log4j2.version>2.20.0</log4j2.version>
-        <junit.version>4.13.1</junit.version>
-
-        <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.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>
-                <groupId>org.apache.dubbo</groupId>
-                <artifactId>dubbo-bom</artifactId>
-                <version>${dubbo.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.dubbo</groupId>
-                <artifactId>dubbo-dependencies-zookeeper-curator5</artifactId>
-                <version>${dubbo.version}</version>
-                <type>pom</type>
-                <exclusions>
-                    <exclusion>
-                        <artifactId>logback-classic</artifactId>
-                        <groupId>ch.qos.logback</groupId>
-                    </exclusion>
-                    <exclusion>
-                        <artifactId>logback-core</artifactId>
-                        <groupId>ch.qos.logback</groupId>
-                    </exclusion>
-                    <exclusion>
-                        <artifactId>log4j</artifactId>
-                        <groupId>log4j</groupId>
-                    </exclusion>
-                    <exclusion>
-                        <artifactId>slf4j-log4j12</artifactId>
-                        <groupId>org.slf4j</groupId>
-                    </exclusion>
-                </exclusions>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.dubbo</groupId>
-            <artifactId>dubbo</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.dubbo</groupId>
-            <artifactId>dubbo-dependencies-zookeeper-curator5</artifactId>
-            <type>pom</type>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-slf4j-impl</artifactId>
-            <version>${log4j2.version}</version>
-        </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>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <profiles>
-        <!-- For jdk 11 above JavaEE annotation -->
-        <profile>
-            <id>javax.annotation</id>
-            <activation>
-                <jdk>[1.11,)</jdk>
-            </activation>
-            <dependencies>
-                <dependency>
-                    <groupId>javax.annotation</groupId>
-                    <artifactId>javax.annotation-api</artifactId>
-                    <version>1.3.2</version>
-                </dependency>
-            </dependencies>
-        </profile>
-    </profiles>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>${maven-compiler-plugin.version}</version>
-            </plugin>
-        </plugins>
-    </build>
-</project>
diff --git 
a/4-governance/dubbo-samples-monitor/src/main/java/org/apache/dubbo/samples/monitor/BasicConsumer.java
 
b/4-governance/dubbo-samples-monitor/src/main/java/org/apache/dubbo/samples/monitor/BasicConsumer.java
deleted file mode 100644
index f5a3a1915..000000000
--- 
a/4-governance/dubbo-samples-monitor/src/main/java/org/apache/dubbo/samples/monitor/BasicConsumer.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements.  See the NOTICE file distributed with
- *   this work for additional information regarding copyright ownership.
- *   The ASF licenses this file to You under the Apache License, Version 2.0
- *   (the "License"); you may not use this file except in compliance with
- *   the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing, software
- *   distributed under the License is distributed on an "AS IS" BASIS,
- *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *   See the License for the specific language governing permissions and
- *   limitations under the License.
- */
-
-package org.apache.dubbo.samples.monitor;
-
-import org.apache.dubbo.samples.monitor.api.DemoService;
-
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-public class BasicConsumer {
-
-    public static void main(String[] args) {
-        ClassPathXmlApplicationContext context = new 
ClassPathXmlApplicationContext("spring/dubbo-demo-consumer.xml");
-        context.start();
-
-        DemoService demoService = context.getBean("demoService", 
DemoService.class);
-        String hello = demoService.sayHello("world");
-        System.out.println(hello);
-    }
-}
diff --git 
a/4-governance/dubbo-samples-monitor/src/main/java/org/apache/dubbo/samples/monitor/BasicMonitor.java
 
b/4-governance/dubbo-samples-monitor/src/main/java/org/apache/dubbo/samples/monitor/BasicMonitor.java
deleted file mode 100644
index 92cc57c59..000000000
--- 
a/4-governance/dubbo-samples-monitor/src/main/java/org/apache/dubbo/samples/monitor/BasicMonitor.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements.  See the NOTICE file distributed with
- *   this work for additional information regarding copyright ownership.
- *   The ASF licenses this file to You under the Apache License, Version 2.0
- *   (the "License"); you may not use this file except in compliance with
- *   the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing, software
- *   distributed under the License is distributed on an "AS IS" BASIS,
- *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *   See the License for the specific language governing permissions and
- *   limitations under the License.
- */
-
-package org.apache.dubbo.samples.monitor;
-
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-import java.util.concurrent.CountDownLatch;
-
-public class BasicMonitor {
-
-    public static void main(String[] args) throws Exception {
-        ClassPathXmlApplicationContext context = new 
ClassPathXmlApplicationContext("spring/dubbo-demo-monitor.xml");
-        context.start();
-
-        System.out.println("dubbo service started");
-        new CountDownLatch(1).await();
-    }
-}
diff --git 
a/4-governance/dubbo-samples-monitor/src/main/java/org/apache/dubbo/samples/monitor/BasicProvider.java
 
b/4-governance/dubbo-samples-monitor/src/main/java/org/apache/dubbo/samples/monitor/BasicProvider.java
deleted file mode 100644
index d8adf8eba..000000000
--- 
a/4-governance/dubbo-samples-monitor/src/main/java/org/apache/dubbo/samples/monitor/BasicProvider.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements.  See the NOTICE file distributed with
- *   this work for additional information regarding copyright ownership.
- *   The ASF licenses this file to You under the Apache License, Version 2.0
- *   (the "License"); you may not use this file except in compliance with
- *   the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing, software
- *   distributed under the License is distributed on an "AS IS" BASIS,
- *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *   See the License for the specific language governing permissions and
- *   limitations under the License.
- */
-
-package org.apache.dubbo.samples.monitor;
-
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-import java.util.concurrent.CountDownLatch;
-
-public class BasicProvider {
-
-    public static void main(String[] args) throws Exception {
-        ClassPathXmlApplicationContext context = new 
ClassPathXmlApplicationContext("spring/dubbo-demo-provider.xml");
-        context.start();
-
-        System.out.println("dubbo service started");
-        new CountDownLatch(1).await();
-    }
-
-}
diff --git 
a/4-governance/dubbo-samples-monitor/src/main/java/org/apache/dubbo/samples/monitor/api/DemoService.java
 
b/4-governance/dubbo-samples-monitor/src/main/java/org/apache/dubbo/samples/monitor/api/DemoService.java
deleted file mode 100644
index c05c93bf1..000000000
--- 
a/4-governance/dubbo-samples-monitor/src/main/java/org/apache/dubbo/samples/monitor/api/DemoService.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements.  See the NOTICE file distributed with
- *   this work for additional information regarding copyright ownership.
- *   The ASF licenses this file to You under the Apache License, Version 2.0
- *   (the "License"); you may not use this file except in compliance with
- *   the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing, software
- *   distributed under the License is distributed on an "AS IS" BASIS,
- *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *   See the License for the specific language governing permissions and
- *   limitations under the License.
- */
-
-package org.apache.dubbo.samples.monitor.api;
-
-public interface DemoService {
-
-    String sayHello(String name);
-
-}
diff --git 
a/4-governance/dubbo-samples-monitor/src/main/java/org/apache/dubbo/samples/monitor/impl/DemoServiceImpl.java
 
b/4-governance/dubbo-samples-monitor/src/main/java/org/apache/dubbo/samples/monitor/impl/DemoServiceImpl.java
deleted file mode 100644
index efa34f08d..000000000
--- 
a/4-governance/dubbo-samples-monitor/src/main/java/org/apache/dubbo/samples/monitor/impl/DemoServiceImpl.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements.  See the NOTICE file distributed with
- *   this work for additional information regarding copyright ownership.
- *   The ASF licenses this file to You under the Apache License, Version 2.0
- *   (the "License"); you may not use this file except in compliance with
- *   the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing, software
- *   distributed under the License is distributed on an "AS IS" BASIS,
- *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *   See the License for the specific language governing permissions and
- *   limitations under the License.
- */
-
-package org.apache.dubbo.samples.monitor.impl;
-
-import org.apache.dubbo.rpc.RpcContext;
-import org.apache.dubbo.samples.monitor.api.DemoService;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-public class DemoServiceImpl implements DemoService {
-
-    public String sayHello(String name) {
-        System.out.println("[" + new SimpleDateFormat("HH:mm:ss").format(new 
Date()) + "] Hello " + name +
-                ", request from consumer: " + 
RpcContext.getContext().getRemoteAddress());
-        return "Hello " + name + ", response from provider: " + 
RpcContext.getContext().getLocalAddress();
-    }
-
-}
diff --git 
a/4-governance/dubbo-samples-monitor/src/main/java/org/apache/dubbo/samples/monitor/impl/MonitorServiceImpl.java
 
b/4-governance/dubbo-samples-monitor/src/main/java/org/apache/dubbo/samples/monitor/impl/MonitorServiceImpl.java
deleted file mode 100644
index fdd61603c..000000000
--- 
a/4-governance/dubbo-samples-monitor/src/main/java/org/apache/dubbo/samples/monitor/impl/MonitorServiceImpl.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.samples.monitor.impl;
-
-import org.apache.dubbo.common.URL;
-import org.apache.dubbo.monitor.MonitorService;
-
-import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-public class MonitorServiceImpl implements MonitorService {
-    private List<URL> collectedStatistics = new CopyOnWriteArrayList<>();
-
-    @Override
-    public void collect(URL statistics) {
-        collectedStatistics.add(statistics);
-    }
-
-    @Override
-    public List<URL> lookup(URL query) {
-        return collectedStatistics;
-    }
-}
diff --git a/4-governance/dubbo-samples-monitor/src/main/resources/log4j2.xml 
b/4-governance/dubbo-samples-monitor/src/main/resources/log4j2.xml
deleted file mode 100644
index 69e1321d2..000000000
--- a/4-governance/dubbo-samples-monitor/src/main/resources/log4j2.xml
+++ /dev/null
@@ -1,29 +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.
-  -->
-<Configuration status="WARN">
-    <Appenders>
-        <Console name="Console" target="SYSTEM_OUT" follow="true">
-            <PatternLayout pattern="%style{%d{HH:mm:ss.SSS}}{Magenta} 
%style{|-}{White}%highlight{%-5p} [%t] %style{%40.40c}{Cyan}:%style{%-3L}{Blue} 
%style{-|}{White} 
%m%n%rEx{filters(jdk.internal.reflect,java.lang.reflect,sun.reflect)}" 
disableAnsi="false" charset="UTF-8"/>
-        </Console>
-    </Appenders>
-    <Loggers>
-        <Root level="info">
-            <AppenderRef ref="Console"/>
-        </Root>
-    </Loggers>
-</Configuration>
diff --git 
a/4-governance/dubbo-samples-monitor/src/main/resources/spring/dubbo-demo-consumer.xml
 
b/4-governance/dubbo-samples-monitor/src/main/resources/spring/dubbo-demo-consumer.xml
deleted file mode 100644
index 1983c99d7..000000000
--- 
a/4-governance/dubbo-samples-monitor/src/main/resources/spring/dubbo-demo-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"; 
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="demo-consumer"/>
-
-    <dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
-
-    <dubbo:monitor protocol="registry" interval="100"/>
-
-    <dubbo:reference id="demoService" check="false" 
interface="org.apache.dubbo.samples.monitor.api.DemoService"/>
-</beans>
diff --git 
a/4-governance/dubbo-samples-monitor/src/main/resources/spring/dubbo-demo-monitor.xml
 
b/4-governance/dubbo-samples-monitor/src/main/resources/spring/dubbo-demo-monitor.xml
deleted file mode 100644
index 65d1d0be1..000000000
--- 
a/4-governance/dubbo-samples-monitor/src/main/resources/spring/dubbo-demo-monitor.xml
+++ /dev/null
@@ -1,35 +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"; 
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="demo-monitor"/>
-
-    <dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
-
-    <dubbo:protocol name="dubbo" port="20881"/>
-
-    <dubbo:service interface="org.apache.dubbo.monitor.MonitorService" 
ref="monitorService" filter="-monitor"/>
-
-    <bean id="monitorService" 
class="org.apache.dubbo.samples.monitor.impl.MonitorServiceImpl" />
-</beans>
diff --git 
a/4-governance/dubbo-samples-monitor/src/main/resources/spring/dubbo-demo-provider.xml
 
b/4-governance/dubbo-samples-monitor/src/main/resources/spring/dubbo-demo-provider.xml
deleted file mode 100644
index 1a58ef354..000000000
--- 
a/4-governance/dubbo-samples-monitor/src/main/resources/spring/dubbo-demo-provider.xml
+++ /dev/null
@@ -1,39 +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"; 
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="demo-provider"/>
-
-    <dubbo:monitor protocol="registry" interval="100"/>
-
-    <dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
-
-    <dubbo:provider token="true"/>
-
-    <dubbo:protocol name="dubbo" port="20880"/>
-
-    <bean id="demoService" 
class="org.apache.dubbo.samples.monitor.impl.DemoServiceImpl"/>
-
-    <dubbo:service 
interface="org.apache.dubbo.samples.monitor.api.DemoService" ref="demoService"/>
-</beans>
diff --git 
a/4-governance/dubbo-samples-monitor/src/test/java/org/apache/dubbo/samples/monitor/MonitorServiceIT.java
 
b/4-governance/dubbo-samples-monitor/src/test/java/org/apache/dubbo/samples/monitor/MonitorServiceIT.java
deleted file mode 100644
index afeb2c000..000000000
--- 
a/4-governance/dubbo-samples-monitor/src/test/java/org/apache/dubbo/samples/monitor/MonitorServiceIT.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.samples.monitor;
-
-import org.apache.dubbo.common.URL;
-import org.apache.dubbo.config.ReferenceConfig;
-import org.apache.dubbo.config.RegistryConfig;
-import org.apache.dubbo.monitor.MonitorService;
-import org.apache.dubbo.samples.monitor.api.DemoService;
-
-import org.junit.Assert;
-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;
-
-import java.util.List;
-
-
-@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration(locations = 
{"classpath:/spring/dubbo-demo-consumer.xml"})
-public class MonitorServiceIT {
-    private static String zookeeperHost = 
System.getProperty("zookeeper.address", "127.0.0.1");
-
-    @Autowired
-    private DemoService demoService;
-
-    @Test
-    public void test() throws Exception {
-        ReferenceConfig<MonitorService> reference = new ReferenceConfig<>();
-        reference.setRegistry(new RegistryConfig("zookeeper://" + 
zookeeperHost + ":2181"));
-        reference.setInterface(MonitorService.class);
-        reference.setFilter("-monitor");
-        MonitorService service = reference.get();
-
-        for (int i = 0; i < 10; i++) {
-            for (int j = 0; j < 5; j++) {
-                demoService.sayHello("world");
-                Thread.sleep(500);
-            }
-
-            //wait for monitor data post
-            Thread.sleep(1000);
-
-            if (check(service)) {
-                return;
-            }
-        }
-        Assert.fail();
-    }
-
-    private boolean check(MonitorService service) {
-        List<URL> stats = service.lookup(null);
-
-        boolean countProvider = false;
-        boolean countConsumer = false;
-        System.out.println("monitor stats: " + stats.size());
-        for (URL stat : stats) {
-            Assert.assertNotNull(stat);
-            Assert.assertEquals("count", stat.getProtocol());
-            
Assert.assertEquals("org.apache.dubbo.samples.monitor.api.DemoService/sayHello",
 stat.getPath());
-            if (stat.getParameter("application").equals("demo-provider")) {
-                countProvider = true;
-            }
-            if (stat.getParameter("application").equals("demo-consumer")) {
-                countConsumer = true;
-            }
-            System.out.println(stat);
-        }
-        return countConsumer && countProvider;
-    }
-}
diff --git 
a/4-governance/dubbo-samples-monitor/src/test/resources/spring/monitor-service.xml
 
b/4-governance/dubbo-samples-monitor/src/test/resources/spring/monitor-service.xml
deleted file mode 100644
index bdbfffdc1..000000000
--- 
a/4-governance/dubbo-samples-monitor/src/test/resources/spring/monitor-service.xml
+++ /dev/null
@@ -1,35 +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"; 
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="monitor-service"/>
-
-    <dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
-
-    <dubbo:protocol name="dubbo" port="20880"/>
-
-    <bean id="monitorService" 
class="org.apache.dubbo.samples.monitor.impl.MonitorServiceImpl"/>
-
-    <dubbo:service interface="org.apache.dubbo.monitor.MonitorService" 
ref="monitorService"/>
-</beans>
diff --git a/4-governance/pom.xml b/4-governance/pom.xml
index a6c00e1fd..2934f0056 100644
--- a/4-governance/pom.xml
+++ b/4-governance/pom.xml
@@ -33,7 +33,6 @@
         <module>dubbo-samples-metrics</module>
         <module>dubbo-samples-metrics-prometheus</module>
         <module>dubbo-samples-metrics-spring-boot</module>
-        <module>dubbo-samples-monitor</module>
         <module>dubbo-samples-sentinel</module>
         <module>dubbo-samples-servicelevel-override</module>
         <module>dubbo-samples-spring-boot-hystrix</module>
@@ -45,4 +44,4 @@
         <module>dubbo-samples-spring-boot3-tracing</module>
         <module>dubbo-samples-spring-boot-tracing-skywalking</module>
     </modules>
-</project>
\ No newline at end of file
+</project>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


Reply via email to