Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check class description #1638

Merged
merged 5 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
the description of the class in the collect module.
  • Loading branch information
东风 committed Mar 13, 2024
commit d5e13836002ad073c9dae218f4f7242a93555e74
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@
import java.util.List;

/**
*
*
* prometheus parse abstract class
* todo: string类型 和 scalar类型 响应格式解析
*/
public abstract class AbstractPrometheusParse {

/**
* 下游节点
* Downstream node
*/
private AbstractPrometheusParse prometheusParse;

Expand All @@ -43,15 +42,15 @@ public AbstractPrometheusParse setInstance(AbstractPrometheusParse prometheusPar
}

/**
* prom响应类型校验:stringmatrixvectorscalar
* prom response type check: string, matrix, vector, scalar
* todo:string、scalar类型响应未实现
* @param responseStr 返回字符串
* @return return
*/
abstract Boolean checkType(String responseStr);

/**
* 解析prom接口响应数据
* Parse the prom interface response data
* @param resp 返回数据
* @param aliasFields alias fields
* @param http httpProtocol
Expand All @@ -61,7 +60,7 @@ abstract void parse(String resp, List<String> aliasFields, HttpProtocol http,
CollectRep.MetricsData.Builder builder);

/**
* 处理prom接口响应数据
* Processing prom interface response data
* @param resp resp
* @param aliasFields alias fields
* @param http http
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package org.dromara.hertzbeat.collector.collect.http.promethus;

/**
*
* Parse Exception
*
*/
public class ParseException extends RuntimeException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import java.util.List;

/**
*
* Prometheus Last Parser
*
*/
@Slf4j
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
/**
*
*
* 处理prometheus返回类型为“matrix”的响应格式
* Processing prometheus returns a response format of type "matrix"
*/
@NoArgsConstructor
public class PrometheusMatrixParser extends AbstractPrometheusParse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.springframework.stereotype.Component;

/**
*
* prometheus parse creater
*
*/
@Slf4j
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
/**
*
*
* 处理prometheus返回类型为“vector”的响应格式
* Processing prometheus returns a response format of type "vector"
*/
@NoArgsConstructor
public class PrometheusVectorParser extends AbstractPrometheusParse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
/**
*
*
* 解析prometheus的exporter接口传递的数据 http:xxx/metrics
* 参考: prometheus的text_parse.go的代码, 入口: TextToMetricFamilies
* Resolves the data passed by prometheus's exporter interface http:xxx/metrics
* Reference: prometheus text_parse.go code, entry: TextToMetricFamilies
*/
@Slf4j
public class ExporterParser {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.util.List;

/**
*
* DiscoveryClient interface
*/
public interface DiscoveryClient extends AutoCloseable {
ConnectConfig buildConnectConfig(HttpsdProtocol httpsdProtocol);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import java.util.Objects;

/**
*
* Discovery Client Management
*/
public class DiscoveryClientManagement {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import lombok.NoArgsConstructor;

/**
*
* Server Info
*/
@Data
@Builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import lombok.Data;

/**
*
* Service Instance
*/
@Data
@Builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import java.util.Objects;

/**
*
* memcached collect
*/
@Slf4j
public class MemcachedCollectImpl extends AbstractCollect {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@


/**
*
* NebulaGraph collect
*/
@Slf4j
public class NebulaGraphCollectImpl extends AbstractCollect {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
import java.util.Objects;

/**
*
* ntp collect
*/
@Slf4j
public class NtpCollectImpl extends AbstractCollect {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
/**
*
*
* 解析prometheus的exporter接口传递的数据 http:xxx/metrics
* 参考: prometheus的text_parse.go的代码, 入口: TextToMetricFamilies
* Resolves the data passed by prometheus's exporter interface http:xxx/metrics
* Reference: prometheus text_parse.go code, entry: TextToMetricFamilies
*/
@Slf4j
public class TextParser {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import java.util.Objects;

/**
*
* smtp collect
*/
@Slf4j
public class SmtpCollectImpl extends AbstractCollect {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
import java.util.Objects;

/**
*
* Websocket Collect
*/
@Slf4j
public class WebsocketCollectImpl extends AbstractCollect {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.springframework.context.annotation.ComponentScan;

/**
*
* Collector Auto Configuration
* @version 2.1
* Created by Musk.Chen on 2023/1/14
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

/**
* handle collector close message
* 注: 这里会关闭采集任务, 同时断开与Manager的连接
* Note: The collection task is closed and the connection to Manager is disconnected
*/
@Slf4j
public class GoCloseProcessor implements NettyRemotingProcessor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

/**
* handle collector offline message
* 注: 这里不关闭与Manager的连接, 只是关闭采集功能
* Note: The connection to Manager is not closed here, only the capture function is turned off
*/
@Slf4j
public class GoOfflineProcessor implements NettyRemotingProcessor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

/**
* handle collector online message
* 注: 这里不是重新打开与Manager的连接, 也做不到, 只是重新开启采集功能
* Note: This is not to re-open the connection with Manager, nor can it be done, just to re-open the collection function
*/
@Slf4j
public class GoOnlineProcessor implements NettyRemotingProcessor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

/**
* the interface of unit convert
* 单位转换的接口类,处理 org.dromara.hertzbeat.common.entity.job.Metrics#units
* Unit conversion interface classes and deal with mon. Org.dromara.hertzbeat.com entity. The job. The Metrics# units
*
*
*/
Expand Down