feature(web): 迁移接口调用到 forest 公共模块

This commit is contained in:
2023-05-01 16:48:55 +08:00
parent 8731f641ea
commit 243e162917
19 changed files with 29 additions and 189 deletions

View File

@@ -0,0 +1,13 @@
package com.lanyuanxiaoyao.service.forest.service;
import com.dtflys.forest.annotation.BaseRequest;
/**
* Yarn 信息
*
* @author lanyuanxiaoyao
* @date 2023-04-21
*/
@BaseRequest(baseURL = "http://service-yarn-query-b1e11")
public interface CompactionYarnService extends YarnService {
}

View File

@@ -1,7 +1,6 @@
package com.lanyuanxiaoyao.service.forest.service;
import com.dtflys.forest.annotation.BaseRequest;
import com.dtflys.forest.annotation.ForestClient;
import com.dtflys.forest.annotation.Get;
import com.dtflys.forest.annotation.Query;
import com.eshore.odcp.hudi.connector.entity.FlinkJob;
@@ -19,7 +18,6 @@ import org.eclipse.collections.api.list.ImmutableList;
* @author lanyuanxiaoyao
* @date 2023-04-24
*/
@ForestClient
@BaseRequest(baseURL = "http://service-info-query")
public interface InfoService {
@Get("/info/job_id_alias")

View File

@@ -0,0 +1,36 @@
package com.lanyuanxiaoyao.service.forest.service;
import com.dtflys.forest.annotation.BaseRequest;
import com.dtflys.forest.annotation.Get;
import com.dtflys.forest.annotation.Query;
import com.lanyuanxiaoyao.service.configuration.entity.pulsar.PulsarNamespace;
import com.lanyuanxiaoyao.service.configuration.entity.pulsar.PulsarTenant;
import com.lanyuanxiaoyao.service.configuration.entity.pulsar.PulsarTopic;
import org.eclipse.collections.api.list.ImmutableList;
/**
* Pulsar
*
* @author lanyuanxiaoyao
* @date 2023-04-28
*/
@BaseRequest(baseURL = "http://service-pulsar-query")
public interface PulsarService {
@Get("/pulsar/name")
String name(@Query("pulsar_url") String pulsarUrl);
@Get("/pulsar/names")
ImmutableList<String> names();
@Get("/pulsar/tenants")
ImmutableList<PulsarTenant> tenants(@Query("name") String name);
@Get("/pulsar/namespaces")
ImmutableList<PulsarNamespace> namespaces(@Query("name") String name, @Query("tenant") String tenant);
@Get("/pulsar/topic")
PulsarTopic topic(@Query("name") String name, @Query("topic") String topic);
@Get("/pulsar/topics")
ImmutableList<PulsarTopic> topics(@Query("name") String name, @Query("namespace") String namespace);
}

View File

@@ -0,0 +1,13 @@
package com.lanyuanxiaoyao.service.forest.service;
import com.dtflys.forest.annotation.BaseRequest;
/**
* Yarn 信息
*
* @author lanyuanxiaoyao
* @date 2023-04-21
*/
@BaseRequest(baseURL = "http://service-yarn-query-b2s119")
public interface SyncYarnService extends YarnService {
}

View File

@@ -0,0 +1,38 @@
package com.lanyuanxiaoyao.service.forest.service;
import com.dtflys.forest.annotation.Get;
import com.dtflys.forest.annotation.Query;
import com.lanyuanxiaoyao.service.configuration.entity.yarn.YarnApplication;
import com.lanyuanxiaoyao.service.configuration.entity.yarn.YarnQueue;
import com.lanyuanxiaoyao.service.configuration.entity.yarn.YarnRootQueue;
import org.eclipse.collections.api.list.ImmutableList;
/**
* @author lanyuanxiaoyao
* @date 2023-04-23
*/
public interface YarnService {
@Get("/job/list")
ImmutableList<YarnApplication> jobList();
@Get("/job/list")
ImmutableList<YarnApplication> jobListEquals(@Query("name") String name);
@Get("/job/list")
ImmutableList<YarnApplication> jobListLike(@Query("text") String text);
@Get("/job/kill")
void jobKill(@Query("application_id") String applicationId);
@Get("/job/detail")
YarnApplication jobDetail(@Query("application_id") String applicationId);
@Get("/queue/list")
ImmutableList<YarnQueue> queueList();
@Get("/queue/detail")
YarnQueue queueDetail(@Query("name") String name);
@Get("/cluster/info")
YarnRootQueue cluster();
}