This is an automated email from the ASF dual-hosted git repository. tanjian pushed a commit to branch remove_time in repository https://gitbox.apache.org/repos/asf/skywalking.git
commit 5cb852416b5ef1f0e26a26954e47cd9ee583660d Author: Jared.Tan <jian....@daocloud.io> AuthorDate: Mon Oct 28 21:32:31 2019 +0800 remove unused time range query parameter. --- .../skywalking/oap/server/core/query/MetadataQueryService.java | 8 ++++---- .../oap/server/core/storage/query/IMetadataQueryDAO.java | 4 ++-- .../storage/plugin/elasticsearch/query/MetadataQueryEsDAO.java | 4 ++-- .../oap/server/storage/plugin/jdbc/h2/dao/H2MetadataQueryDAO.java | 5 ++--- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/MetadataQueryService.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/MetadataQueryService.java index f6aaf68..1b72297 100644 --- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/MetadataQueryService.java +++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/MetadataQueryService.java @@ -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; } diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/query/IMetadataQueryDAO.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/query/IMetadataQueryDAO.java index d277d6f..7e4aa7c 100644 --- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/query/IMetadataQueryDAO.java +++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/query/IMetadataQueryDAO.java @@ -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; diff --git a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/MetadataQueryEsDAO.java b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/MetadataQueryEsDAO.java index 93f05a8..0d3ca13 100644 --- a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/MetadataQueryEsDAO.java +++ b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/MetadataQueryEsDAO.java @@ -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)); diff --git a/oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetadataQueryDAO.java b/oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetadataQueryDAO.java index 8a152d7..e8d38e4 100644 --- a/oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetadataQueryDAO.java +++ b/oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetadataQueryDAO.java @@ -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 ");