This is an automated email from the ASF dual-hosted git repository.
xiaoyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 4143bf2 remove control-panel SPI
new 0565d35 Merge pull request #7131 from kimmking/CP1
4143bf2 is described below
commit 4143bf278f9cf3686804dfd54541da6478eaaacc
Author: kimmking <[email protected]>
AuthorDate: Fri Aug 28 18:04:30 2020 +0800
remove control-panel SPI
---
shardingsphere-control-panel/pom.xml | 1 -
.../shardingsphere-control-panel-spi/pom.xml | 38 --------------
.../panel/spi/ControlPanelConfiguration.java | 24 ---------
.../control/panel/spi/ControlPanelFacade.java | 33 ------------
.../panel/spi/engine/ControlPanelFacadeEngine.java | 59 ----------------------
.../spi/opentracing/OpenTracingConfiguration.java | 26 ----------
.../spi/engine/ControlPanelFacadeEngineTest.java | 41 ---------------
.../spi/fixture/TestControlPanelConfiguration.java | 24 ---------
.../panel/spi/fixture/TestControlPanelFacade.java | 42 ---------------
...dingsphere.control.panel.spi.ControlPanelFacade | 18 -------
.../shardingsphere-tracing-opentracing/pom.xml | 5 --
.../tracing/opentracing/OpenTracingTracer.java | 19 +------
.../tracing/opentracing/OpenTracingTracerTest.java | 6 +--
.../org/apache/shardingsphere/proxy/Bootstrap.java | 14 ++---
.../shardingsphere-proxy-common/pom.xml | 5 --
15 files changed, 6 insertions(+), 349 deletions(-)
diff --git a/shardingsphere-control-panel/pom.xml
b/shardingsphere-control-panel/pom.xml
index 65e77cb..96edc05 100644
--- a/shardingsphere-control-panel/pom.xml
+++ b/shardingsphere-control-panel/pom.xml
@@ -31,6 +31,5 @@
<modules>
<module>shardingsphere-orchestration</module>
- <module>shardingsphere-control-panel-spi</module>
</modules>
</project>
diff --git
a/shardingsphere-control-panel/shardingsphere-control-panel-spi/pom.xml
b/shardingsphere-control-panel/shardingsphere-control-panel-spi/pom.xml
deleted file mode 100644
index b876761..0000000
--- a/shardingsphere-control-panel/shardingsphere-control-panel-spi/pom.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <artifactId>shardingsphere-control-panel</artifactId>
- <groupId>org.apache.shardingsphere</groupId>
- <version>5.0.0-RC1-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>shardingsphere-control-panel-spi</artifactId>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-infra-common</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-</project>
diff --git
a/shardingsphere-control-panel/shardingsphere-control-panel-spi/src/main/java/org/apache/shardingsphere/control/panel/spi/ControlPanelConfiguration.java
b/shardingsphere-control-panel/shardingsphere-control-panel-spi/src/main/java/org/apache/shardingsphere/control/panel/spi/ControlPanelConfiguration.java
deleted file mode 100644
index 1bd3d41..0000000
---
a/shardingsphere-control-panel/shardingsphere-control-panel-spi/src/main/java/org/apache/shardingsphere/control/panel/spi/ControlPanelConfiguration.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.shardingsphere.control.panel.spi;
-
-/**
- * Control panel configuration.
- */
-public interface ControlPanelConfiguration {
-}
diff --git
a/shardingsphere-control-panel/shardingsphere-control-panel-spi/src/main/java/org/apache/shardingsphere/control/panel/spi/ControlPanelFacade.java
b/shardingsphere-control-panel/shardingsphere-control-panel-spi/src/main/java/org/apache/shardingsphere/control/panel/spi/ControlPanelFacade.java
deleted file mode 100644
index e6e8741..0000000
---
a/shardingsphere-control-panel/shardingsphere-control-panel-spi/src/main/java/org/apache/shardingsphere/control/panel/spi/ControlPanelFacade.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.shardingsphere.control.panel.spi;
-
-import org.apache.shardingsphere.infra.spi.order.OrderedSPI;
-
-/**
- * Control panel facade.
- */
-public interface ControlPanelFacade<T extends ControlPanelConfiguration>
extends OrderedSPI<T> {
-
- /**
- * Initialize facade.
- *
- * @param configuration configuration
- */
- void init(T configuration);
-}
diff --git
a/shardingsphere-control-panel/shardingsphere-control-panel-spi/src/main/java/org/apache/shardingsphere/control/panel/spi/engine/ControlPanelFacadeEngine.java
b/shardingsphere-control-panel/shardingsphere-control-panel-spi/src/main/java/org/apache/shardingsphere/control/panel/spi/engine/ControlPanelFacadeEngine.java
deleted file mode 100644
index 02e7e77..0000000
---
a/shardingsphere-control-panel/shardingsphere-control-panel-spi/src/main/java/org/apache/shardingsphere/control/panel/spi/engine/ControlPanelFacadeEngine.java
+++ /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.
- */
-
-package org.apache.shardingsphere.control.panel.spi.engine;
-
-import org.apache.shardingsphere.control.panel.spi.ControlPanelConfiguration;
-import org.apache.shardingsphere.control.panel.spi.ControlPanelFacade;
-import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
-import org.apache.shardingsphere.infra.spi.order.OrderedSPIRegistry;
-
-import java.util.Collection;
-import java.util.Map.Entry;
-import java.util.stream.Collectors;
-
-/**
- * Control panel facade engine.
- */
-public final class ControlPanelFacadeEngine {
-
- static {
- ShardingSphereServiceLoader.register(ControlPanelFacade.class);
- }
-
- /**
- * Initialize control panel facade.
- *
- * @param controlPanelConfigs control panel configurations
- */
- @SuppressWarnings("rawtypes")
- public void init(final Collection<ControlPanelConfiguration>
controlPanelConfigs) {
- Collection<Class<?>> controlPanelConfigClass =
controlPanelConfigs.stream().map(ControlPanelConfiguration::getClass).collect(Collectors.toList());
- for (Entry<Class<?>, ControlPanelFacade> entry :
OrderedSPIRegistry.getRegisteredServicesByClass(controlPanelConfigClass,
ControlPanelFacade.class).entrySet()) {
- init(controlPanelConfigs, entry.getKey(), entry.getValue());
- }
- }
-
- @SuppressWarnings({"unchecked", "rawtypes"})
- private void init(final Collection<ControlPanelConfiguration>
controlPanelConfigs, final Class<?> controlPanelConfigClass, final
ControlPanelFacade facade) {
- for (ControlPanelConfiguration each : controlPanelConfigs) {
- if (each.getClass().equals(controlPanelConfigClass)) {
- facade.init(each);
- }
- }
- }
-}
diff --git
a/shardingsphere-control-panel/shardingsphere-control-panel-spi/src/main/java/org/apache/shardingsphere/control/panel/spi/opentracing/OpenTracingConfiguration.java
b/shardingsphere-control-panel/shardingsphere-control-panel-spi/src/main/java/org/apache/shardingsphere/control/panel/spi/opentracing/OpenTracingConfiguration.java
deleted file mode 100644
index c40634c..0000000
---
a/shardingsphere-control-panel/shardingsphere-control-panel-spi/src/main/java/org/apache/shardingsphere/control/panel/spi/opentracing/OpenTracingConfiguration.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.control.panel.spi.opentracing;
-
-import org.apache.shardingsphere.control.panel.spi.ControlPanelConfiguration;
-
-/**
- * Open tracing configuration.
- */
-public final class OpenTracingConfiguration implements
ControlPanelConfiguration {
-}
diff --git
a/shardingsphere-control-panel/shardingsphere-control-panel-spi/src/test/java/org/apache/shardingsphere/control/panel/spi/engine/ControlPanelFacadeEngineTest.java
b/shardingsphere-control-panel/shardingsphere-control-panel-spi/src/test/java/org/apache/shardingsphere/control/panel/spi/engine/ControlPanelFacadeEngineTest.java
deleted file mode 100644
index 059fe64..0000000
---
a/shardingsphere-control-panel/shardingsphere-control-panel-spi/src/test/java/org/apache/shardingsphere/control/panel/spi/engine/ControlPanelFacadeEngineTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.control.panel.spi.engine;
-
-import org.apache.shardingsphere.control.panel.spi.ControlPanelConfiguration;
-import
org.apache.shardingsphere.control.panel.spi.fixture.TestControlPanelConfiguration;
-import
org.apache.shardingsphere.control.panel.spi.fixture.TestControlPanelFacade;
-import org.junit.Test;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public final class ControlPanelFacadeEngineTest {
-
- @Test
- public void init() {
- TestControlPanelConfiguration testConfiguration = new
TestControlPanelConfiguration();
- Collection<ControlPanelConfiguration> controlPanelConfigs = new
ArrayList<>();
- controlPanelConfigs.add(testConfiguration);
- new ControlPanelFacadeEngine().init(controlPanelConfigs);
- assertThat(TestControlPanelFacade.getConfiguration(),
is(testConfiguration));
- }
-}
diff --git
a/shardingsphere-control-panel/shardingsphere-control-panel-spi/src/test/java/org/apache/shardingsphere/control/panel/spi/fixture/TestControlPanelConfiguration.java
b/shardingsphere-control-panel/shardingsphere-control-panel-spi/src/test/java/org/apache/shardingsphere/control/panel/spi/fixture/TestControlPanelConfiguration.java
deleted file mode 100644
index fab9251..0000000
---
a/shardingsphere-control-panel/shardingsphere-control-panel-spi/src/test/java/org/apache/shardingsphere/control/panel/spi/fixture/TestControlPanelConfiguration.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.shardingsphere.control.panel.spi.fixture;
-
-import org.apache.shardingsphere.control.panel.spi.ControlPanelConfiguration;
-
-public final class TestControlPanelConfiguration implements
ControlPanelConfiguration {
-
-}
diff --git
a/shardingsphere-control-panel/shardingsphere-control-panel-spi/src/test/java/org/apache/shardingsphere/control/panel/spi/fixture/TestControlPanelFacade.java
b/shardingsphere-control-panel/shardingsphere-control-panel-spi/src/test/java/org/apache/shardingsphere/control/panel/spi/fixture/TestControlPanelFacade.java
deleted file mode 100644
index 9e7a9d9..0000000
---
a/shardingsphere-control-panel/shardingsphere-control-panel-spi/src/test/java/org/apache/shardingsphere/control/panel/spi/fixture/TestControlPanelFacade.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.control.panel.spi.fixture;
-
-import lombok.Getter;
-import org.apache.shardingsphere.control.panel.spi.ControlPanelFacade;
-
-public final class TestControlPanelFacade implements
ControlPanelFacade<TestControlPanelConfiguration> {
-
- @Getter
- private static TestControlPanelConfiguration configuration;
-
- @Override
- public void init(final TestControlPanelConfiguration configuration) {
- this.configuration = configuration;
- }
-
- @Override
- public int getOrder() {
- return 0;
- }
-
- @Override
- public Class<TestControlPanelConfiguration> getTypeClass() {
- return TestControlPanelConfiguration.class;
- }
-}
diff --git
a/shardingsphere-control-panel/shardingsphere-control-panel-spi/src/test/resources/META-INF/services/org.apache.shardingsphere.control.panel.spi.ControlPanelFacade
b/shardingsphere-control-panel/shardingsphere-control-panel-spi/src/test/resources/META-INF/services/org.apache.shardingsphere.control.panel.spi.ControlPanelFacade
deleted file mode 100644
index 033945f..0000000
---
a/shardingsphere-control-panel/shardingsphere-control-panel-spi/src/test/resources/META-INF/services/org.apache.shardingsphere.control.panel.spi.ControlPanelFacade
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-org.apache.shardingsphere.control.panel.spi.fixture.TestControlPanelFacade
diff --git
a/shardingsphere-observability/shardingsphere-tracing/shardingsphere-tracing-opentracing/pom.xml
b/shardingsphere-observability/shardingsphere-tracing/shardingsphere-tracing-opentracing/pom.xml
index fe1ff9a..0e6695f 100644
---
a/shardingsphere-observability/shardingsphere-tracing/shardingsphere-tracing-opentracing/pom.xml
+++
b/shardingsphere-observability/shardingsphere-tracing/shardingsphere-tracing-opentracing/pom.xml
@@ -33,11 +33,6 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-control-panel-spi</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
<groupId>io.opentracing</groupId>
<artifactId>opentracing-util</artifactId>
</dependency>
diff --git
a/shardingsphere-observability/shardingsphere-tracing/shardingsphere-tracing-opentracing/src/main/java/org/apache/shardingsphere/tracing/opentracing/OpenTracingTracer.java
b/shardingsphere-observability/shardingsphere-tracing/shardingsphere-tracing-opentracing/src/main/java/org/apache/shardingsphere/tracing/opentracing/OpenTracingTracer.java
index afecc53..3a52e08 100644
---
a/shardingsphere-observability/shardingsphere-tracing/shardingsphere-tracing-opentracing/src/main/java/org/apache/shardingsphere/tracing/opentracing/OpenTracingTracer.java
+++
b/shardingsphere-observability/shardingsphere-tracing/shardingsphere-tracing-opentracing/src/main/java/org/apache/shardingsphere/tracing/opentracing/OpenTracingTracer.java
@@ -20,22 +20,15 @@ package org.apache.shardingsphere.tracing.opentracing;
import com.google.common.base.Preconditions;
import io.opentracing.Tracer;
import io.opentracing.util.GlobalTracer;
-import org.apache.shardingsphere.control.panel.spi.ControlPanelFacade;
import org.apache.shardingsphere.infra.exception.ShardingSphereException;
-import
org.apache.shardingsphere.control.panel.spi.opentracing.OpenTracingConfiguration;
/**
* OpenTracing tracer object container.
*/
-public final class OpenTracingTracer implements
ControlPanelFacade<OpenTracingConfiguration> {
+public final class OpenTracingTracer {
public static final String OPENTRACING_TRACER_CLASS_NAME =
"org.apache.shardingsphere.tracing.opentracing.tracer.class";
- @Override
- public void init(final OpenTracingConfiguration configuration) {
- doInit();
- }
-
/**
* Initialize sharding tracer.
*/
@@ -63,16 +56,6 @@ public final class OpenTracingTracer implements
ControlPanelFacade<OpenTracingCo
return GlobalTracer.get();
}
- @Override
- public int getOrder() {
- return 0;
- }
-
- @Override
- public Class<OpenTracingConfiguration> getTypeClass() {
- return OpenTracingConfiguration.class;
- }
-
private static void doInit() {
String tracerClassName =
System.getProperty(OPENTRACING_TRACER_CLASS_NAME);
Preconditions.checkNotNull(tracerClassName, "Can not find opentracing
tracer implementation class via system property `%s`",
OPENTRACING_TRACER_CLASS_NAME);
diff --git
a/shardingsphere-observability/shardingsphere-tracing/shardingsphere-tracing-opentracing/src/test/java/org/apache/shardingsphere/tracing/opentracing/OpenTracingTracerTest.java
b/shardingsphere-observability/shardingsphere-tracing/shardingsphere-tracing-opentracing/src/test/java/org/apache/shardingsphere/tracing/opentracing/OpenTracingTracerTest.java
index 114836e..33c90d6 100644
---
a/shardingsphere-observability/shardingsphere-tracing/shardingsphere-tracing-opentracing/src/test/java/org/apache/shardingsphere/tracing/opentracing/OpenTracingTracerTest.java
+++
b/shardingsphere-observability/shardingsphere-tracing/shardingsphere-tracing-opentracing/src/test/java/org/apache/shardingsphere/tracing/opentracing/OpenTracingTracerTest.java
@@ -21,8 +21,6 @@ import io.opentracing.NoopTracerFactory;
import io.opentracing.Tracer;
import io.opentracing.util.GlobalTracer;
import lombok.SneakyThrows;
-import
org.apache.shardingsphere.control.panel.spi.engine.ControlPanelFacadeEngine;
-import
org.apache.shardingsphere.control.panel.spi.opentracing.OpenTracingConfiguration;
import org.apache.shardingsphere.infra.exception.ShardingSphereException;
import org.apache.shardingsphere.tracing.opentracing.fixture.FooTracer;
import org.junit.After;
@@ -30,7 +28,6 @@ import org.junit.Before;
import org.junit.Test;
import java.lang.reflect.Field;
-import java.util.Collections;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.isA;
@@ -71,8 +68,7 @@ public final class OpenTracingTracerTest {
@Test
public void assertTracerSpiLoad() {
- OpenTracingConfiguration openTracingConfiguration = new
OpenTracingConfiguration();
- new
ControlPanelFacadeEngine().init(Collections.singleton(openTracingConfiguration));
+ OpenTracingTracer.init();
assertThat((GlobalTracer) OpenTracingTracer.get(),
isA(GlobalTracer.class));
assertTrue(GlobalTracer.isRegistered());
assertThat(OpenTracingTracer.get(), is(OpenTracingTracer.get()));
diff --git
a/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/java/org/apache/shardingsphere/proxy/Bootstrap.java
b/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/java/org/apache/shardingsphere/proxy/Bootstrap.java
index 7d762b0..112ff94 100644
---
a/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/java/org/apache/shardingsphere/proxy/Bootstrap.java
+++
b/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/java/org/apache/shardingsphere/proxy/Bootstrap.java
@@ -20,9 +20,6 @@ package org.apache.shardingsphere.proxy;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
-import org.apache.shardingsphere.control.panel.spi.ControlPanelConfiguration;
-import
org.apache.shardingsphere.control.panel.spi.engine.ControlPanelFacadeEngine;
-import
org.apache.shardingsphere.control.panel.spi.opentracing.OpenTracingConfiguration;
import org.apache.shardingsphere.db.protocol.mysql.constant.MySQLServerInfo;
import
org.apache.shardingsphere.infra.config.properties.ConfigurationPropertyKey;
import org.apache.shardingsphere.kernel.context.SchemaContexts;
@@ -39,12 +36,11 @@ import
org.apache.shardingsphere.proxy.db.DatabaseServerInfo;
import org.apache.shardingsphere.proxy.frontend.bootstrap.ShardingSphereProxy;
import org.apache.shardingsphere.proxy.orchestration.OrchestrationBootstrap;
import
org.apache.shardingsphere.proxy.orchestration.schema.ProxyOrchestrationSchemaContexts;
+import org.apache.shardingsphere.tracing.opentracing.OpenTracingTracer;
import javax.sql.DataSource;
import java.io.IOException;
import java.sql.SQLException;
-import java.util.Collection;
-import java.util.LinkedList;
import java.util.Optional;
/**
@@ -76,7 +72,7 @@ public final class Bootstrap {
private static void init(final ProxyConfiguration proxyConfig, final int
port, final boolean orchestrationEnabled) throws SQLException {
initSchemaContexts(proxyConfig, orchestrationEnabled);
- initControlPanelFacade();
+ initOpenTracing();
setDatabaseServerInfo();
ShardingSphereProxy.getInstance().start(port);
}
@@ -92,12 +88,10 @@ public final class Bootstrap {
return orchestrationEnabled ? new
ProxyOrchestrationSchemaContexts(schemaContexts,
OrchestrationFacade.getInstance()) : schemaContexts;
}
- private static void initControlPanelFacade() {
- Collection<ControlPanelConfiguration> controlPanelConfigs = new
LinkedList<>();
+ private static void initOpenTracing() {
if
(ProxySchemaContexts.getInstance().getSchemaContexts().getProps().<Boolean>getValue(ConfigurationPropertyKey.PROXY_OPENTRACING_ENABLED))
{
- controlPanelConfigs.add(new OpenTracingConfiguration());
+ OpenTracingTracer.init();
}
- new ControlPanelFacadeEngine().init(controlPanelConfigs);
}
private static void setDatabaseServerInfo() {
diff --git a/shardingsphere-proxy/shardingsphere-proxy-common/pom.xml
b/shardingsphere-proxy/shardingsphere-proxy-common/pom.xml
index c9efd30..af68bf2 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-common/pom.xml
+++ b/shardingsphere-proxy/shardingsphere-proxy-common/pom.xml
@@ -39,11 +39,6 @@
</dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-control-panel-spi</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-kernel-context</artifactId>
<version>${project.version}</version>
</dependency>