客户端接口编写

master
Qin Dong Ming 2024-08-29 20:36:31 +08:00
parent 623bc6615f
commit 3a6361a409
6 changed files with 2820 additions and 0 deletions

View File

@ -0,0 +1,17 @@
package com.bwie.muyu;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* @Authorqdm
* @Packagecom.bwie.muyu
* @Projectcloud-etl-engine
* @nameMuyuApplication
* @Date2024/8/29 20:19
*/
@SpringBootApplication
public class MuyuApplication {
public static void main(String[] args) {
org.springframework.boot.SpringApplication.run(MuyuApplication.class, args);
}
}

View File

@ -0,0 +1,12 @@
package com.bwie.muyu.base;
/**
* @Authorqdm
* @Packagecom.bwie.muyu.base
* @Projectcloud-etl-engine
* @nameBaseEngine
* @Date2024/8/29 20:23
*/
public interface BaseEngine {
}

View File

@ -0,0 +1,21 @@
package com.bwie.muyu.base.hander;
import lombok.Data;
/**
* @Authorqdm
* @Packagecom.bwie.muyu.base.hander
* @Projectcloud-etl-engine
* @nameDataEngineHandler
* @Date2024/8/29 20:26
*/
@Data
public class DataEngineHandler {
public static final ThreadLocal<Object> DataEngineHandler = new ThreadLocal<>();
public static void set(final Object handler){
DataEngineHandler.set(handler);
}
public static <T> T get(){
return (T) DataEngineHandler.get();
}
}

View File

@ -0,0 +1,28 @@
package com.bwie.muyu.base.hander;
/**
* @Authorqdm
* @Packagecom.bwie.muyu.base.hander
* @Projectcloud-etl-engine
* @nameDataEngineValue
* @Date2024/8/29 20:31
*/
public class DataEngineValue {
public static void set(DataEngineValue dataEngineValue){
DataEngineHandler.set(dataEngineValue);
}
public static DataEngineValue get(){
return DataEngineHandler.get();
}
public static Object getValue(){
return get().getValue();
}
public static Integer getIntegerValue(){
return get().getIntegerValue();
}
}

File diff suppressed because it is too large Load Diff

View File

@ -104,3 +104,63 @@
14:26:38.094 [main] INFO c.a.c.n.r.NacosContextRefresher - [registerNacosListener,131] - [Nacos Config] Listening config: dataId=cloud-engine-dev.yml, group=DEFAULT_GROUP
14:26:39.353 [RMI TCP Connection(17)-172.16.0.2] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring DispatcherServlet 'dispatcherServlet'
14:26:50.570 [http-nio-9703-exec-5] INFO o.s.a.AbstractOpenApiResource - [getOpenApi,369] - Init duration for springdoc-openapi is: 397 ms
19:47:38.384 [main] INFO c.m.EngineApplication - [logStartupProfileInfo,660] - The following 1 profile is active: "dev"
19:47:41.720 [main] INFO o.a.c.c.StandardService - [log,173] - Starting service [Tomcat]
19:47:41.720 [main] INFO o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/10.1.24]
19:47:41.818 [main] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext
19:47:44.655 [main] INFO c.a.d.p.DruidDataSource - [init,1002] - {dataSource-1,master} inited
19:47:44.656 [main] INFO c.b.d.d.DynamicRoutingDataSource - [addDataSource,158] - dynamic-datasource - add a datasource named [master] success
19:47:44.656 [main] INFO c.b.d.d.DynamicRoutingDataSource - [afterPropertiesSet,241] - dynamic-datasource initial loaded [1] datasource,primary datasource named [master]
19:47:46.125 [main] INFO c.a.c.s.SentinelWebMvcConfigurer - [addInterceptors,52] - [Sentinel Starter] register SentinelWebInterceptor with urlPatterns: [/**].
19:47:54.211 [main] INFO c.a.n.client.naming - [initNamespaceForNaming,62] - initializer namespace from ans.namespace attribute : null
19:47:54.212 [main] INFO c.a.n.client.naming - [lambda$initNamespaceForNaming$0,66] - initializer namespace from ALIBABA_ALIWARE_NAMESPACE attribute :null
19:47:54.212 [main] INFO c.a.n.client.naming - [lambda$initNamespaceForNaming$1,73] - initializer namespace from namespace attribute :null
19:47:54.219 [main] INFO c.a.n.client.naming - [<init>,74] - FailoverDataSource type is class com.alibaba.nacos.client.naming.backups.datasource.DiskFailoverDataSource
19:47:54.225 [main] INFO c.a.n.p.a.s.c.ClientAuthPluginManager - [init,56] - [ClientAuthPluginManager] Load ClientAuthService com.alibaba.nacos.client.auth.impl.NacosClientAuthServiceImpl success.
19:47:54.225 [main] INFO c.a.n.p.a.s.c.ClientAuthPluginManager - [init,56] - [ClientAuthPluginManager] Load ClientAuthService com.alibaba.nacos.client.auth.ram.RamClientAuthServiceImpl success.
19:47:54.328 [main] INFO c.a.n.c.r.client - [lambda$createClient$0,118] - [RpcClientFactory] create a new rpc client of ec1cff5d-5087-4f09-b9ed-df6f462dec98
19:47:54.330 [main] INFO c.a.n.client.naming - [<init>,109] - Create naming rpc client for uuid->ec1cff5d-5087-4f09-b9ed-df6f462dec98
19:47:54.330 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [ec1cff5d-5087-4f09-b9ed-df6f462dec98] RpcClient init, ServerListFactory = com.alibaba.nacos.client.naming.core.ServerListManager
19:47:54.330 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [ec1cff5d-5087-4f09-b9ed-df6f462dec98] Registry connection listener to current client:com.alibaba.nacos.client.naming.remote.gprc.redo.NamingGrpcRedoService
19:47:54.331 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [ec1cff5d-5087-4f09-b9ed-df6f462dec98] Register server push request handler:com.alibaba.nacos.client.naming.remote.gprc.NamingPushRequestHandler
19:47:54.331 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [ec1cff5d-5087-4f09-b9ed-df6f462dec98] Try to connect to server on start up, server: {serverIp = '47.116.184.54', server main port = 8848}
19:47:54.332 [main] INFO c.a.n.c.r.c.g.GrpcClient - [createNewManagedChannel,210] - grpc client connection server:47.116.184.54 ip,serverPort:9848,grpcTslConfig:{"sslProvider":"","enableTls":false,"mutualAuthEnable":false,"trustAll":false}
19:47:54.374 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [ec1cff5d-5087-4f09-b9ed-df6f462dec98] Success to connect to server [47.116.184.54:8848] on start up, connectionId = 1724932081600_139.224.212.27_62309
19:47:54.374 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [ec1cff5d-5087-4f09-b9ed-df6f462dec98] Register server push request handler:com.alibaba.nacos.common.remote.client.RpcClient$ConnectResetRequestHandler
19:47:54.374 [com.alibaba.nacos.client.remote.worker.0] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [ec1cff5d-5087-4f09-b9ed-df6f462dec98] Notify connected event to listeners.
19:47:54.374 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [ec1cff5d-5087-4f09-b9ed-df6f462dec98] Register server push request handler:com.alibaba.nacos.common.remote.client.RpcClient$$Lambda$575/0x000002205c4d16e8
19:47:54.374 [com.alibaba.nacos.client.remote.worker.0] INFO c.a.n.client.naming - [onConnected,90] - Grpc connection connect
19:47:54.376 [main] INFO c.a.n.client.naming - [registerService,133] - [REGISTER-SERVICE] cloud-2112 registering service cloud-engine with instance Instance{instanceId='null', ip='192.168.52.1', port=9703, weight=1.0, healthy=true, enabled=true, ephemeral=true, clusterName='DEFAULT', serviceName='null', metadata={IPv6=null, preserved.register.source=SPRING_CLOUD}}
19:47:54.396 [main] INFO c.a.c.n.r.NacosServiceRegistry - [register,76] - nacos registry, DEFAULT_GROUP cloud-engine 192.168.52.1:9703 register finished
19:47:55.623 [main] INFO c.m.EngineApplication - [logStarted,56] - Started EngineApplication in 22.898 seconds (process running for 24.043)
19:47:55.633 [main] INFO c.a.n.c.c.i.CacheData - [initNotifyWarnTimeout,72] - config listener notify warn timeout millis use default 60000 millis
19:47:55.633 [main] INFO c.a.n.c.c.i.CacheData - [<clinit>,99] - nacos.cache.data.init.snapshot = true
19:47:55.634 [main] INFO c.a.n.c.c.i.ClientWorker - [addCacheDataIfAbsent,416] - [fixed-cloud-2112-47.116.184.54_8848] [subscribe] cloud-engine.yml+DEFAULT_GROUP+cloud-2112
19:47:55.648 [main] INFO c.a.n.c.c.i.CacheData - [addListener,236] - [fixed-cloud-2112-47.116.184.54_8848] [add-listener] ok, tenant=cloud-2112, dataId=cloud-engine.yml, group=DEFAULT_GROUP, cnt=1
19:47:55.648 [main] INFO c.a.c.n.r.NacosContextRefresher - [registerNacosListener,131] - [Nacos Config] Listening config: dataId=cloud-engine.yml, group=DEFAULT_GROUP
19:47:55.649 [main] INFO c.a.n.c.c.i.ClientWorker - [addCacheDataIfAbsent,416] - [fixed-cloud-2112-47.116.184.54_8848] [subscribe] cloud-engine+DEFAULT_GROUP+cloud-2112
19:47:55.649 [main] INFO c.a.n.c.c.i.CacheData - [addListener,236] - [fixed-cloud-2112-47.116.184.54_8848] [add-listener] ok, tenant=cloud-2112, dataId=cloud-engine, group=DEFAULT_GROUP, cnt=1
19:47:55.649 [main] INFO c.a.c.n.r.NacosContextRefresher - [registerNacosListener,131] - [Nacos Config] Listening config: dataId=cloud-engine, group=DEFAULT_GROUP
19:47:55.651 [main] INFO c.a.n.c.c.i.ClientWorker - [addCacheDataIfAbsent,416] - [fixed-cloud-2112-47.116.184.54_8848] [subscribe] cloud-engine-dev.yml+DEFAULT_GROUP+cloud-2112
19:47:55.651 [main] INFO c.a.n.c.c.i.CacheData - [addListener,236] - [fixed-cloud-2112-47.116.184.54_8848] [add-listener] ok, tenant=cloud-2112, dataId=cloud-engine-dev.yml, group=DEFAULT_GROUP, cnt=1
19:47:55.651 [main] INFO c.a.c.n.r.NacosContextRefresher - [registerNacosListener,131] - [Nacos Config] Listening config: dataId=cloud-engine-dev.yml, group=DEFAULT_GROUP
19:47:55.734 [RMI TCP Connection(5)-10.100.28.5] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring DispatcherServlet 'dispatcherServlet'
19:48:04.272 [http-nio-9703-exec-5] INFO o.s.a.AbstractOpenApiResource - [getOpenApi,369] - Init duration for springdoc-openapi is: 430 ms
19:52:26.155 [lettuce-nioEventLoop-4-1] INFO i.l.c.p.CommandHandler - [log,217] - null Unexpected exception during request: java.net.SocketException: Connection reset
java.net.SocketException: Connection reset
at java.base/sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:394)
at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:426)
at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:255)
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132)
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:356)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:842)
19:52:26.170 [lettuce-eventExecutorLoop-1-1] INFO i.l.c.p.ConnectionWatchdog - [log,171] - Reconnecting, last destination was /172.13.1.1:6379
19:52:31.067 [lettuce-nioEventLoop-4-2] INFO i.l.c.p.ReconnectionHandler - [lambda$null$3,174] - Reconnected to 172.13.1.1/<unresolved>:6379