remove unused time range query parameter. (#3730)
This commit is contained in:
parent
b3da85b526
commit
852f03d1db
|
|
@ -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 ");
|
||||
|
|
|
|||
Loading…
Reference in New Issue