未验证 提交 852f03d1 编写于 作者: J Jared Tan 提交者: GitHub

remove unused time range query parameter. (#3730)

上级 b3da85b5
......@@ -66,10 +66,10 @@ public class MetadataQueryService implements org.apache.skywalking.oap.server.li
public ClusterBrief getGlobalBrief(final long startTimestamp, final long endTimestamp) throws IOException {
ClusterBrief clusterBrief = new ClusterBrief();
clusterBrief.setNumOfService(getMetadataQueryDAO().numOfService(startTimestamp, endTimestamp));
clusterBrief.setNumOfEndpoint(getMetadataQueryDAO().numOfEndpoint(startTimestamp, endTimestamp));
clusterBrief.setNumOfDatabase(getMetadataQueryDAO().numOfConjectural(startTimestamp, endTimestamp, NodeType.Database.value()));
clusterBrief.setNumOfCache(getMetadataQueryDAO().numOfConjectural(startTimestamp, endTimestamp, NodeType.Cache.value()));
clusterBrief.setNumOfMQ(getMetadataQueryDAO().numOfConjectural(startTimestamp, endTimestamp, NodeType.MQ.value()));
clusterBrief.setNumOfEndpoint(getMetadataQueryDAO().numOfEndpoint());
clusterBrief.setNumOfDatabase(getMetadataQueryDAO().numOfConjectural(NodeType.Database.value()));
clusterBrief.setNumOfCache(getMetadataQueryDAO().numOfConjectural(NodeType.Cache.value()));
clusterBrief.setNumOfMQ(getMetadataQueryDAO().numOfConjectural(NodeType.MQ.value()));
return clusterBrief;
}
......
......@@ -30,9 +30,9 @@ public interface IMetadataQueryDAO extends DAO {
int numOfService(final long startTimestamp, final long endTimestamp) throws IOException;
int numOfEndpoint(final long startTimestamp, final long endTimestamp) throws IOException;
int numOfEndpoint() throws IOException;
int numOfConjectural(final long startTimestamp, final long endTimestamp, final int nodeTypeValue) throws IOException;
int numOfConjectural(final int nodeTypeValue) throws IOException;
List<Service> getAllServices(final long startTimestamp, final long endTimestamp) throws IOException;
......
......@@ -84,7 +84,7 @@ public class MetadataQueryEsDAO extends EsDAO implements IMetadataQueryDAO {
return (int)response.getHits().getTotalHits();
}
@Override public int numOfEndpoint(long startTimestamp, long endTimestamp) throws IOException {
@Override public int numOfEndpoint() throws IOException {
SearchSourceBuilder sourceBuilder = SearchSourceBuilder.searchSource();
BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();
......@@ -99,7 +99,7 @@ public class MetadataQueryEsDAO extends EsDAO implements IMetadataQueryDAO {
}
@Override
public int numOfConjectural(long startTimestamp, long endTimestamp, int nodeTypeValue) throws IOException {
public int numOfConjectural(int nodeTypeValue) throws IOException {
SearchSourceBuilder sourceBuilder = SearchSourceBuilder.searchSource();
sourceBuilder.query(QueryBuilders.termQuery(ServiceInventory.NODE_TYPE, nodeTypeValue));
......
......@@ -86,7 +86,7 @@ public class H2MetadataQueryDAO implements IMetadataQueryDAO {
}
@Override
public int numOfEndpoint(long startTimestamp, long endTimestamp) throws IOException {
public int numOfEndpoint() throws IOException {
StringBuilder sql = new StringBuilder();
List<Object> condition = new ArrayList<>(5);
sql.append("select count(*) num from ").append(EndpointInventory.INDEX_NAME).append(" where ");
......@@ -106,8 +106,7 @@ public class H2MetadataQueryDAO implements IMetadataQueryDAO {
}
@Override
public int numOfConjectural(long startTimestamp, long endTimestamp,
int nodeTypeValue) throws IOException {
public int numOfConjectural(int nodeTypeValue) throws IOException {
StringBuilder sql = new StringBuilder();
List<Object> condition = new ArrayList<>(5);
sql.append("select count(*) num from ").append(ServiceInventory.INDEX_NAME).append(" where ");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册