From c3258b7273f12b5bf523466f472db3fd10b555a2 Mon Sep 17 00:00:00 2001 From: masaimu Date: Tue, 15 Aug 2023 16:49:55 +0800 Subject: [PATCH] ql detail --- .../ceresdbx/CeresdbxMetricStorage.java | 87 + .../server/extension/MetricStorage.java | 4 +- .../server/extension/NoopMetricStorage.java | 6 + .../server/extension/model/DetailResult.java | 88 + .../common/service/QueryClientService.java | 81 + .../service/query/QueryDetailResponse.java | 26 + .../home/web/controller/QueryFacadeImpl.java | 159 +- .../web/controller/QueryFacadeImplTest.java | 22 +- .../server/query/grpc/QueryProto.java | 4389 ++++++++++++++++- .../server/query/grpc/QueryServiceGrpc.java | 78 +- .../src/main/proto/query_proto.proto | 25 + .../query/server/rpc/QueryGrpcService.java | 12 + .../server/query/service/QueryService.java | 3 + .../service/impl/DefaultQueryServiceImpl.java | 100 +- 14 files changed, 4979 insertions(+), 101 deletions(-) create mode 100644 server/extension/extension-storage/src/main/java/io/holoinsight/server/extension/model/DetailResult.java create mode 100644 server/home/home-common/src/main/java/io/holoinsight/server/home/common/service/query/QueryDetailResponse.java diff --git a/server/extension/extension-storage-ceresdbx/src/main/java/io/holoinsight/server/extension/ceresdbx/CeresdbxMetricStorage.java b/server/extension/extension-storage-ceresdbx/src/main/java/io/holoinsight/server/extension/ceresdbx/CeresdbxMetricStorage.java index 5f77a884d..eb36a0273 100644 --- a/server/extension/extension-storage-ceresdbx/src/main/java/io/holoinsight/server/extension/ceresdbx/CeresdbxMetricStorage.java +++ b/server/extension/extension-storage-ceresdbx/src/main/java/io/holoinsight/server/extension/ceresdbx/CeresdbxMetricStorage.java @@ -4,6 +4,7 @@ package io.holoinsight.server.extension.ceresdbx; import java.util.ArrayList; +import java.util.Arrays; import java.util.Iterator; import java.util.LinkedList; import java.util.List; @@ -18,6 +19,9 @@ import io.ceresdb.common.parser.SqlParser; import io.ceresdb.common.parser.SqlParserFactoryProvider; +import io.holoinsight.server.common.J; +import io.holoinsight.server.extension.model.DetailResult; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -57,6 +61,7 @@ * @author jiwliu * @date 2023/1/13 */ +@Slf4j public class CeresdbxMetricStorage implements MetricStorage { public static final int DEFAULT_BATCH_RECORDS = 200; @@ -214,6 +219,85 @@ public List pqlRangeQuery(PqlParam pqlParam) { return pqlQueryService.queryRange(pqlParam); } + @Override + public DetailResult queryDetail(QueryParam queryParam) { + String sql = queryParam.getQl(); + List tables = null; + if (StringUtils.isNotBlank(sql)) { + SqlParser parser = SqlParserFactoryProvider.getSqlParserFactory().getParser(sql); + tables = parser.tableNames(); + } else { + log.warn("sql is empty for {}", J.toJson(queryParam)); + return DetailResult.empty(); + } + if (CollectionUtils.isEmpty(tables)) { + log.warn("tables is empty for {}", J.toJson(queryParam)); + return DetailResult.empty(); + } + LOGGER.info("queryDetail queryParam:{}, sql:{}", J.toJson(queryParam), sql); + final SqlQueryRequest queryRequest = + SqlQueryRequest.newBuilder().forTables(tables.toArray(new String[0])).sql(sql).build(); + long begin = System.currentTimeMillis(); + try { + CompletableFuture> qf = Context.ROOT.call( + () -> ceresdbxClientManager.getClient(queryParam.getTenant()).sqlQuery(queryRequest)); + final io.ceresdb.models.Result qr = qf.get(); + if (!qr.isOk()) { + LOGGER.error("[CERESDBX_QUERY_DETAIL] failed to exec sql:{}, qr:{}, error:{}", sql, qr, + qr.getErr().getError()); + throw new RuntimeException(qr.getErr().getError()); + } + final List rows = qr.getOk().getRowList(); + if (CollectionUtils.isEmpty(rows)) { + return DetailResult.empty(); + } + String[] header = getHeader(rows.get(0)); + return transToDetailResult(queryParam, header, rows, tables); + } catch (Exception e) { + LOGGER.error("[CERESDBX_QUERY_DETAIL] failed to exec sql:{}, cost:{}", sql, + System.currentTimeMillis() - begin, e); + return DetailResult.empty(); + } + } + + private DetailResult transToDetailResult(QueryParam queryParam, String[] header, List rows, + List tables) { + DetailResult detailResult = DetailResult.empty(); + if (header == null || header.length == 0) { + return detailResult; + } + detailResult.setHeaders(Arrays.asList(header)); + detailResult.setSql(queryParam.getQl()); + detailResult.setTables(tables); + for (Row row : rows) { + DetailResult.DetailRow detailRow = new DetailResult.DetailRow(); + for (String name : header) { + Column column = row.getColumn(name); + Value value = column.getValue(); + switch (value.getDataType()) { + case String: + detailRow.addStringValue(value.getString()); + break; + case Timestamp: + detailRow.addTimestampValue(value.getTimestamp()); + break; + case Boolean: + detailRow.addBooleanValue(value.getBoolean()); + break; + case Varbinary: + log.info("reject unknown data type {}", value.getObject()); + break; + default: + detailRow.addNumValue(value.getObject()); + break; + } + } + detailResult.add(detailRow); + } + log.info("detailResult result {} rows {}", J.toJson(detailResult), J.toJson(rows)); + return detailResult; + } + private void doBatchInsert(Set metrics, String tenant, List oneBatch) { long start = System.currentTimeMillis(); @@ -307,6 +391,9 @@ private Map, Result> getTagsWithResults(QueryParam queryPara } tags.put(name, column.getValue().getString()); } + if (point.getTimestamp() == null) { + point.setTimestamp(0L); + } Result existResult = tagsToResult.get(tags); if (existResult != null) { existResult.getPoints().add(point); diff --git a/server/extension/extension-storage/src/main/java/io/holoinsight/server/extension/MetricStorage.java b/server/extension/extension-storage/src/main/java/io/holoinsight/server/extension/MetricStorage.java index 77c6d08bb..1b5e5a866 100644 --- a/server/extension/extension-storage/src/main/java/io/holoinsight/server/extension/MetricStorage.java +++ b/server/extension/extension-storage/src/main/java/io/holoinsight/server/extension/MetricStorage.java @@ -4,8 +4,8 @@ package io.holoinsight.server.extension; import java.util.List; -import java.util.Map; +import io.holoinsight.server.extension.model.DetailResult; import io.holoinsight.server.extension.model.QueryMetricsParam; import io.holoinsight.server.extension.model.QueryResult.Result; import io.holoinsight.server.extension.model.WriteMetricsParam; @@ -35,4 +35,6 @@ public interface MetricStorage { List pqlRangeQuery(PqlParam pqlParam); + DetailResult queryDetail(QueryParam queryParam); + } diff --git a/server/extension/extension-storage/src/main/java/io/holoinsight/server/extension/NoopMetricStorage.java b/server/extension/extension-storage/src/main/java/io/holoinsight/server/extension/NoopMetricStorage.java index 57487fae4..963d3e20e 100644 --- a/server/extension/extension-storage/src/main/java/io/holoinsight/server/extension/NoopMetricStorage.java +++ b/server/extension/extension-storage/src/main/java/io/holoinsight/server/extension/NoopMetricStorage.java @@ -7,6 +7,7 @@ import java.util.List; import java.util.Map; +import io.holoinsight.server.extension.model.DetailResult; import io.holoinsight.server.extension.model.PqlParam; import io.holoinsight.server.extension.model.QueryMetricsParam; import io.holoinsight.server.extension.model.QueryParam; @@ -60,4 +61,9 @@ public List pqlInstantQuery(PqlParam pqlParam) { public List pqlRangeQuery(PqlParam pqlParam) { return Collections.emptyList(); } + + @Override + public DetailResult queryDetail(QueryParam queryParam) { + return DetailResult.empty(); + } } diff --git a/server/extension/extension-storage/src/main/java/io/holoinsight/server/extension/model/DetailResult.java b/server/extension/extension-storage/src/main/java/io/holoinsight/server/extension/model/DetailResult.java new file mode 100644 index 000000000..86c484568 --- /dev/null +++ b/server/extension/extension-storage/src/main/java/io/holoinsight/server/extension/model/DetailResult.java @@ -0,0 +1,88 @@ +/* + * Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0. + */ +package io.holoinsight.server.extension.model; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author masaimu + * @date 2023/8/11 + */ +@Data +public class DetailResult { + + List tables; + String sql; + List headers; + List points; + + public static DetailResult empty() { + return new DetailResult(); + } + + public boolean isEmpty() { + return this.points == null || this.points.size() == 0; + } + + public void add(DetailRow detailRow) { + if (points == null) { + points = new ArrayList<>(); + } + points.add(detailRow); + } + + @Data + public static class DetailRow { + List values = new ArrayList<>(); + + public void addStringValue(String string) { + Value value = new Value(DetailDataType.String, string); + values.add(value); + } + + public void addTimestampValue(long timestamp) { + Value value = new Value(DetailDataType.Timestamp, timestamp); + values.add(value); + } + + public void addBooleanValue(boolean aBoolean) { + Value value = new Value(DetailDataType.Boolean, aBoolean); + values.add(value); + } + + public void addNumValue(Object object) { + if (object instanceof Number) { + Value value = new Value(DetailDataType.Double, ((Number) object).doubleValue()); + values.add(value); + } + } + } + + @Data + public static class Value { + private final DetailDataType type; + private final Object value; + } + + public enum DetailDataType { + String(String.class), // + Boolean(Boolean.class), // + Double(Double.class), // + Timestamp(Long.class); // + + private final Class javaType; + + DetailDataType(Class javaType) { + this.javaType = javaType; + } + + public Class getJavaType() { + return javaType; + } + } + +} diff --git a/server/home/home-common/src/main/java/io/holoinsight/server/home/common/service/QueryClientService.java b/server/home/home-common/src/main/java/io/holoinsight/server/home/common/service/QueryClientService.java index 36baaff45..8517fea5d 100644 --- a/server/home/home-common/src/main/java/io/holoinsight/server/home/common/service/QueryClientService.java +++ b/server/home/home-common/src/main/java/io/holoinsight/server/home/common/service/QueryClientService.java @@ -14,6 +14,8 @@ import io.holoinsight.server.apm.common.model.specification.sw.Trace; import io.holoinsight.server.common.J; import io.holoinsight.server.home.common.service.query.KeyResult; +import io.holoinsight.server.home.common.service.query.QueryDetailResponse; +import io.holoinsight.server.home.common.service.query.QueryDetailResponse.DetailResult; import io.holoinsight.server.home.common.service.query.QueryResponse; import io.holoinsight.server.home.common.service.query.QuerySchemaResponse; import io.holoinsight.server.home.common.service.query.Result; @@ -89,6 +91,70 @@ public QueryResponse query(QueryProto.QueryRequest request) { return response; } + public QueryDetailResponse queryDetail(QueryProto.QueryRequest request) { + Debugger.print("QueryService", "query, request: " + J.toJson(request)); + long start = System.currentTimeMillis(); + + QueryProto.QueryDetailResponse res = queryServiceBlockingStub.queryDetailData(request); + + log.info("step4 result {}", J.toJson(res)); + + int pointSize = getPointSizeFromResp(res); + log.info("HOME_QUERY_STAT from[API_DETAIL] invoke[1], cost[{}], pointSize[{}]", + System.currentTimeMillis() - start, pointSize); + + Debugger.print("QueryService", "query, response: " + J.toJson(res)); + + QueryDetailResponse response = new QueryDetailResponse(); + List results = new ArrayList<>(); + + Map map = new HashMap<>(); + for (Datasource datasource : request.getDatasourcesList()) { + map.put(datasource.getMetric(), datasource); + } + + for (QueryProto.DetailResult result : res.getResultsList()) { + DetailResult r = new DetailResult(); + r.setTables(result.getTablesList()); + r.setSql(result.getSql()); + r.setHeaders(result.getHeadersList()); + + List values = new ArrayList<>(); + if (CollectionUtils.isEmpty(r.getHeaders())) { + log.warn("headers is empty for {}", J.toJson(result)); + continue; + } + int column = r.getHeaders().size(); + for (QueryProto.DetailRow row : result.getRowsList()) { + Object[] value = new Object[column]; + for (int i = 0; i < column; i++) { + QueryProto.DetailValue detailValue = row.getValues(i); + switch (detailValue.getType()) { + case "String": + value[i] = detailValue.getStrValue(); + break; + case "Timestamp": + value[i] = detailValue.getTimestampValue(); + break; + case "Double": + value[i] = detailValue.getDoubleValue(); + break; + case "Boolean": + value[i] = detailValue.getBoolValue(); + break; + } + } + values.add(value); + } + r.setValues(values); + results.add(r); + } + + response.setResults(results); + + return response; + } + public QueryResponse queryTags(QueryProto.QueryRequest request) { Debugger.print("QueryService", "queryTags, request: " + J.toJson(request)); @@ -394,4 +460,19 @@ private int getPointSizeFromResp(QueryProto.QueryResponse response) { } return size; } + + private int getPointSizeFromResp(QueryProto.QueryDetailResponse response) { + int size = 0; + if (response == null || response.getResultsCount() == 0) { + return size; + } + + List results = response.getResultsList(); + for (QueryProto.DetailResult result : results) { + for (QueryProto.DetailRow row : result.getRowsList()) { + size += row.getValuesCount(); + } + } + return size; + } } diff --git a/server/home/home-common/src/main/java/io/holoinsight/server/home/common/service/query/QueryDetailResponse.java b/server/home/home-common/src/main/java/io/holoinsight/server/home/common/service/query/QueryDetailResponse.java new file mode 100644 index 000000000..eba5f67c7 --- /dev/null +++ b/server/home/home-common/src/main/java/io/holoinsight/server/home/common/service/query/QueryDetailResponse.java @@ -0,0 +1,26 @@ +/* + * Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0. + */ +package io.holoinsight.server.home.common.service.query; + +import lombok.Data; +import java.util.List; + +/** + * @author masaimu + * @version 2023-08-15 12:57:00 + */ +@Data +public class QueryDetailResponse { + + private List results; + + @Data + public static class DetailResult { + private List tables; + private String sql; + private List headers; + private List values; + + } +} diff --git a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/QueryFacadeImpl.java b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/QueryFacadeImpl.java index c6ed32340..afe1fd843 100644 --- a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/QueryFacadeImpl.java +++ b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/QueryFacadeImpl.java @@ -17,6 +17,7 @@ import io.holoinsight.server.home.biz.service.TenantInitService; import io.holoinsight.server.home.common.service.QueryClientService; import io.holoinsight.server.home.common.service.query.KeyResult; +import io.holoinsight.server.home.common.service.query.QueryDetailResponse; import io.holoinsight.server.home.common.service.query.QueryResponse; import io.holoinsight.server.home.common.service.query.QuerySchemaResponse; import io.holoinsight.server.home.common.service.query.Result; @@ -121,6 +122,36 @@ public void doManage() { return result; } + @PostMapping("/detail") + public JsonResult queryDetail(@RequestBody DataQueryRequest request) { + + final JsonResult result = new JsonResult<>(); + + facadeTemplate.manage(result, new ManageCallback() { + @Override + public void checkParameter() { + ParaCheckUtil.checkParaNotNull(request, "request"); + ParaCheckUtil.checkParaNotEmpty(request.datasources, "datasources"); + ParaCheckUtil.checkParaNotBlank(request.datasources.get(0).metric, "metric"); + ParaCheckUtil.checkTimeRange(request.datasources.get(0).start, + request.datasources.get(0).end, "start time must less than end time"); + if (StringUtils.isNotBlank(request.getTenant())) { + ParaCheckUtil.checkEquals(request.getTenant(), RequestContext.getContext().ms.getTenant(), + "tenant is illegal"); + } + } + + @Override + public void doManage() { + QueryDetailResponse response = + queryClientService.queryDetail(convertDetailRequest(request)); + JsonResult.createSuccessResult(result, response); + } + }); + + return result; + } + @PostMapping("/tags") public JsonResult queryTags(@RequestBody DataQueryRequest request) { @@ -479,6 +510,7 @@ public QueryProto.QueryRequest convertRequest(DataQueryRequest request) { if ((System.currentTimeMillis() - d.start) < 80000L) { d.start -= 60000L; } + d.setQl(null); MetricInfo metricInfo = getMetricInfo(d.getMetric()); if (isCeresdb4Storage(metricInfo)) { parseQl(d, metricInfo); @@ -486,7 +518,9 @@ public QueryProto.QueryRequest convertRequest(DataQueryRequest request) { QueryProto.Datasource.Builder datasourceBuilder = QueryProto.Datasource.newBuilder(); Map objMap = J.toMap(J.toJson(d)); - objMap.remove("select"); + if (objMap != null) { + objMap.remove("select"); + } toProtoBean(datasourceBuilder, objMap); Boolean aBoolean = tenantInitService.checkConditions(ms.getTenant(), ms.getWorkspace(), datasourceBuilder.getMetric(), datasourceBuilder.getFiltersList()); @@ -506,12 +540,48 @@ public QueryProto.QueryRequest convertRequest(DataQueryRequest request) { protected void parseQl(QueryDataSource d, MetricInfo metricInfo) { Set tags = new HashSet<>(J.toList(metricInfo.getTags())); StringBuilder select = new StringBuilder("select "); + List selects = new ArrayList<>(); + selects.add("`period`"); + parseSelect(selects, select, d); + + select.append(" from ").append(d.metric); + + parseFilters(select, d, tags); + + List gbList = new ArrayList<>(); + gbList.add("period"); + parseGroupby(select, d, gbList, tags); + + select.append(" order by `period` asc"); + + log.info("parse sql {}", select); + d.setQl(select.toString()); + } + + private void parseGroupby(StringBuilder select, QueryDataSource d, List gbList, + Set tags) { + if (!CollectionUtils.isEmpty(d.groupBy)) { + for (String gb : d.groupBy) { + if (!StringUtils.equals("period", gb) && !tags.contains(gb)) { + continue; + } + gbList.add(gb); + } + } + + if (!CollectionUtils.isEmpty(gbList)) { + select.append(" group by `")// + .append(String.join("` , `", gbList)) // + .append("`"); + } + } + + private void parseSelect(List selects, StringBuilder select, QueryDataSource d) { if (CollectionUtils.isEmpty(d.select)) { selects.add(" count(1) as value "); } else { - for (Map.Entry entry : d.select - .entrySet()) { + for (Entry entry : d.select.entrySet()) { String columnName = entry.getKey(); String expression = entry.getValue(); if (StringUtils.isEmpty(expression)) { @@ -521,9 +591,11 @@ protected void parseQl(QueryDataSource d, MetricInfo metricInfo) { } } } - selects.add("`period`"); + select.append(String.join(" , ", selects)); - select.append(" from ").append(d.metric); + } + + private void parseFilters(StringBuilder select, QueryDataSource d, Set tags) { select.append(" where `period` <= ") // .append(d.end) // .append(" and `period` >= ") // @@ -565,22 +637,6 @@ protected void parseQl(QueryDataSource d, MetricInfo metricInfo) { } } } - List gbList = new ArrayList<>(); - gbList.add("period"); - if (!CollectionUtils.isEmpty(d.groupBy)) { - for (String gb : d.groupBy) { - if (!tags.contains(gb)) { - continue; - } - gbList.add(gb); - } - } - select.append(" group by `")// - .append(String.join("` , `", gbList)) // - .append("`"); - select.append(" order by `period` asc"); - log.info("parse sql {}", select); - d.setQl(select.toString()); } private MetricInfo getMetricInfo(String metric) { @@ -655,4 +711,65 @@ public JsonResult pqlParse(@RequestBody PqlParseRequest request) } return result; } + + public QueryRequest convertDetailRequest(DataQueryRequest request) { + MonitorScope ms = RequestContext.getContext().ms; + QueryRequest.Builder builder = QueryRequest.newBuilder(); + builder.setTenant(tenantInitService.getTsdbTenant(ms.getTenant())); + if (StringUtil.isNotBlank(request.getQuery())) { + builder.setQuery(request.getQuery()); + } + + + request.datasources.forEach(d -> { + // wait data collect + if ((System.currentTimeMillis() - d.end) < 80000L) { + d.end -= 60000L; + } + if ((System.currentTimeMillis() - d.start) < 80000L) { + d.start -= 60000L; + } + d.setQl(null); + MetricInfo metricInfo = getMetricInfo(d.getMetric()); + if (isCeresdb4Storage(metricInfo)) { + parseAnalysisQl(d, metricInfo); + } + + Builder datasourceBuilder = Datasource.newBuilder(); + Map objMap = J.toMap(J.toJson(d)); + if (objMap != null) { + objMap.remove("select"); + } + toProtoBean(datasourceBuilder, objMap); + + datasourceBuilder.setApmMaterialized(false); + builder.addDatasources(datasourceBuilder); + }); + + return builder.build(); + } + + + + protected void parseAnalysisQl(QueryDataSource d, MetricInfo metricInfo) { + Set tags = new HashSet<>(J.toList(metricInfo.getTags())); + StringBuilder select = new StringBuilder("select "); + List selects = new ArrayList<>(); + + parseSelect(selects, select, d); + + select.append(" from ").append(d.metric); + + parseFilters(select, d, tags); + + List gbList = new ArrayList<>(); + parseGroupby(select, d, gbList, tags); + + if (selects.contains("`period`")) { + select.append(" order by `period` desc"); + } + + log.info("parse analysis sql {}", select); + d.setQl(select.toString()); + } } diff --git a/server/home/home-web/src/test/java/io/holoinsight/server/home/web/controller/QueryFacadeImplTest.java b/server/home/home-web/src/test/java/io/holoinsight/server/home/web/controller/QueryFacadeImplTest.java index f57588229..8b641290e 100644 --- a/server/home/home-web/src/test/java/io/holoinsight/server/home/web/controller/QueryFacadeImplTest.java +++ b/server/home/home-web/src/test/java/io/holoinsight/server/home/web/controller/QueryFacadeImplTest.java @@ -32,7 +32,7 @@ public void name() { queryFacade.parseQl(queryDataSource, metricInfo); System.out.println(queryDataSource.ql); Assert.assertTrue(StringUtils.equals( - "select count(1) as value , `period` from k8s_pod_mem_util where `period` <= 1691647903000 and `period` >= 1691644303000 and `app` in ('holoinsight-server','aaaaa') and `应用ID` = '111111111' group by `period` , `app` order by `period` asc", + "select `period` , count(1) as value from k8s_pod_mem_util where `period` <= 1691647903000 and `period` >= 1691644303000 and `app` in ('holoinsight-server','aaaaa') and `应用ID` = '111111111' group by `period` , `app` order by `period` asc", queryDataSource.ql)); json = @@ -44,7 +44,25 @@ public void name() { queryFacade.parseQl(queryDataSource, metricInfo); System.out.println(queryDataSource.ql); Assert.assertTrue(StringUtils.equals( - "select `app` , distinct(`aaa`) as dd , `period` from k8s_pod_mem_util where `period` <= 1691647903000 and `period` >= 1691644303000 and `app` in ('holoinsight-server','aaaaa') and `应用ID` = '111111111' group by `period` , `app` order by `period` asc", + "select `period` , `app` , distinct(`aaa`) as dd from k8s_pod_mem_util where `period` <= 1691647903000 and `period` >= 1691644303000 and `app` in ('holoinsight-server','aaaaa') and `应用ID` = '111111111' group by `period` , `app` order by `period` asc", + queryDataSource.ql)); + + queryFacade.parseAnalysisQl(queryDataSource, metricInfo); + System.out.println(queryDataSource.ql); + Assert.assertTrue(StringUtils.equals( + "select `app` , distinct(`aaa`) as dd from k8s_pod_mem_util where `period` <= 1691647903000 and `period` >= 1691644303000 and `app` in ('holoinsight-server','aaaaa') and `应用ID` = '111111111' group by `app`", + queryDataSource.ql)); + + json = + "{\"start\":1691644303000,\"end\":1691647903000,\"name\":\"a\",\"metric\":\"k8s_pod_mem_util\",\"groupBy\":[\"app\",\"hostname\",\"workspace\",\"pod\",\"ip\",\"namespace\"],\"filters\":[{\"type\":\"literal_or\",\"name\":\"app\",\"value\":\"holoinsight-server|aaaaa\"},{\"type\":\"literal\",\"name\":\"应用ID\",\"value\":\"111111111\"},{\"type\":\"literal\",\"name\":\"fake应用ID\",\"value\":\"22222222\"}],\"select\":{\"app\":null,\"dd\":\"distinct(`aaa`)\", \"period\":null}}"; + queryDataSource = J.fromJson(json, DataQueryRequest.QueryDataSource.class); + metricInfo = new MetricInfo(); + metricInfo.setTags(J.toJson(Arrays.asList("app", "应用ID"))); + queryFacade = new QueryFacadeImpl(); + queryFacade.parseAnalysisQl(queryDataSource, metricInfo); + System.out.println(queryDataSource.ql); + Assert.assertTrue(StringUtils.equals( + "select `app` , distinct(`aaa`) as dd , `period` from k8s_pod_mem_util where `period` <= 1691647903000 and `period` >= 1691644303000 and `app` in ('holoinsight-server','aaaaa') and `应用ID` = '111111111' group by `app` order by `period` desc", queryDataSource.ql)); } } diff --git a/server/query/query-grpc-gen/src/main/java/io/holoinsight/server/query/grpc/QueryProto.java b/server/query/query-grpc-gen/src/main/java/io/holoinsight/server/query/grpc/QueryProto.java index 661f1b1c1..27c90905a 100644 --- a/server/query/query-grpc-gen/src/main/java/io/holoinsight/server/query/grpc/QueryProto.java +++ b/server/query/query-grpc-gen/src/main/java/io/holoinsight/server/query/grpc/QueryProto.java @@ -1,6 +1,3 @@ -/* - * Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: query_proto.proto @@ -50695,6 +50692,4246 @@ public io.holoinsight.server.query.grpc.QueryProto.CommonMapTypeDataList getDefa } + public interface QueryDetailResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:io.holoinsight.server.query.grpc.QueryDetailResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + java.util.List getResultsList(); + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + io.holoinsight.server.query.grpc.QueryProto.DetailResult getResults(int index); + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + int getResultsCount(); + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + java.util.List getResultsOrBuilderList(); + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + io.holoinsight.server.query.grpc.QueryProto.DetailResultOrBuilder getResultsOrBuilder( + int index); + } + /** + * Protobuf type {@code io.holoinsight.server.query.grpc.QueryDetailResponse} + */ + public static final class QueryDetailResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:io.holoinsight.server.query.grpc.QueryDetailResponse) + QueryDetailResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use QueryDetailResponse.newBuilder() to construct. + private QueryDetailResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private QueryDetailResponse() { + results_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new QueryDetailResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private QueryDetailResponse(com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + results_.add(input.readMessage( + io.holoinsight.server.query.grpc.QueryProto.DetailResult.parser(), + extensionRegistry)); + break; + } + default: { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.holoinsight.server.query.grpc.QueryProto.internal_static_io_holoinsight_server_query_grpc_QueryDetailResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return io.holoinsight.server.query.grpc.QueryProto.internal_static_io_holoinsight_server_query_grpc_QueryDetailResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse.class, + io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse.Builder.class); + } + + public static final int RESULTS_FIELD_NUMBER = 1; + private java.util.List results_; + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + @java.lang.Override + public java.util.List getResultsList() { + return results_; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + @java.lang.Override + public java.util.List getResultsOrBuilderList() { + return results_; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + @java.lang.Override + public int getResultsCount() { + return results_.size(); + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + @java.lang.Override + public io.holoinsight.server.query.grpc.QueryProto.DetailResult getResults(int index) { + return results_.get(index); + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + @java.lang.Override + public io.holoinsight.server.query.grpc.QueryProto.DetailResultOrBuilder getResultsOrBuilder( + int index) { + return results_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < results_.size(); i++) { + output.writeMessage(1, results_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + + size = 0; + for (int i = 0; i < results_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, results_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse)) { + return super.equals(obj); + } + io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse other = + (io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse) obj; + + if (!getResultsList().equals(other.getResultsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResultsCount() > 0) { + hash = (37 * hash) + RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getResultsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, + extensionRegistry); + } + + public static io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, + extensionRegistry); + } + + public static io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, + extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code io.holoinsight.server.query.grpc.QueryDetailResponse} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:io.holoinsight.server.query.grpc.QueryDetailResponse) + io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.holoinsight.server.query.grpc.QueryProto.internal_static_io_holoinsight_server_query_grpc_QueryDetailResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return io.holoinsight.server.query.grpc.QueryProto.internal_static_io_holoinsight_server_query_grpc_QueryDetailResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse.class, + io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse.Builder.class); + } + + // Construct using + // io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getResultsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + resultsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return io.holoinsight.server.query.grpc.QueryProto.internal_static_io_holoinsight_server_query_grpc_QueryDetailResponse_descriptor; + } + + @java.lang.Override + public io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse getDefaultInstanceForType() { + return io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse build() { + io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse buildPartial() { + io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse result = + new io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse(this); + int from_bitField0_ = bitField0_; + if (resultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.results_ = results_; + } else { + result.results_ = resultsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse) { + return mergeFrom((io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse other) { + if (other == io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse + .getDefaultInstance()) + return this; + if (resultsBuilder_ == null) { + if (!other.results_.isEmpty()) { + if (results_.isEmpty()) { + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResultsIsMutable(); + results_.addAll(other.results_); + } + onChanged(); + } + } else { + if (!other.results_.isEmpty()) { + if (resultsBuilder_.isEmpty()) { + resultsBuilder_.dispose(); + resultsBuilder_ = null; + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + resultsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getResultsFieldBuilder() + : null; + } else { + resultsBuilder_.addAllMessages(other.results_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse) e + .getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List results_ = + java.util.Collections.emptyList(); + + private void ensureResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + results_ = + new java.util.ArrayList( + results_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 resultsBuilder_; + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + public java.util.List getResultsList() { + if (resultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(results_); + } else { + return resultsBuilder_.getMessageList(); + } + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + public int getResultsCount() { + if (resultsBuilder_ == null) { + return results_.size(); + } else { + return resultsBuilder_.getCount(); + } + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + public io.holoinsight.server.query.grpc.QueryProto.DetailResult getResults(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessage(index); + } + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + public Builder setResults(int index, + io.holoinsight.server.query.grpc.QueryProto.DetailResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.set(index, value); + onChanged(); + } else { + resultsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + public Builder setResults(int index, + io.holoinsight.server.query.grpc.QueryProto.DetailResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.set(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + public Builder addResults(io.holoinsight.server.query.grpc.QueryProto.DetailResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(value); + onChanged(); + } else { + resultsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + public Builder addResults(int index, + io.holoinsight.server.query.grpc.QueryProto.DetailResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(index, value); + onChanged(); + } else { + resultsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + public Builder addResults( + io.holoinsight.server.query.grpc.QueryProto.DetailResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + public Builder addResults(int index, + io.holoinsight.server.query.grpc.QueryProto.DetailResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + public Builder addAllResults( + java.lang.Iterable values) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, results_); + onChanged(); + } else { + resultsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + public Builder clearResults() { + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resultsBuilder_.clear(); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + public Builder removeResults(int index) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.remove(index); + onChanged(); + } else { + resultsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + public io.holoinsight.server.query.grpc.QueryProto.DetailResult.Builder getResultsBuilder( + int index) { + return getResultsFieldBuilder().getBuilder(index); + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + public io.holoinsight.server.query.grpc.QueryProto.DetailResultOrBuilder getResultsOrBuilder( + int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + public java.util.List getResultsOrBuilderList() { + if (resultsBuilder_ != null) { + return resultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(results_); + } + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + public io.holoinsight.server.query.grpc.QueryProto.DetailResult.Builder addResultsBuilder() { + return getResultsFieldBuilder().addBuilder( + io.holoinsight.server.query.grpc.QueryProto.DetailResult.getDefaultInstance()); + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + public io.holoinsight.server.query.grpc.QueryProto.DetailResult.Builder addResultsBuilder( + int index) { + return getResultsFieldBuilder().addBuilder(index, + io.holoinsight.server.query.grpc.QueryProto.DetailResult.getDefaultInstance()); + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailResult results = 1; + */ + public java.util.List getResultsBuilderList() { + return getResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getResultsFieldBuilder() { + if (resultsBuilder_ == null) { + resultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3( + results_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + results_ = null; + } + return resultsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:io.holoinsight.server.query.grpc.QueryDetailResponse) + } + + // @@protoc_insertion_point(class_scope:io.holoinsight.server.query.grpc.QueryDetailResponse) + private static final io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse(); + } + + public static io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryDetailResponse parsePartialFrom(com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new QueryDetailResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DetailResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:io.holoinsight.server.query.grpc.DetailResult) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated string tables = 1; + * + * @return A list containing the tables. + */ + java.util.List getTablesList(); + + /** + * repeated string tables = 1; + * + * @return The count of tables. + */ + int getTablesCount(); + + /** + * repeated string tables = 1; + * + * @param index The index of the element to return. + * @return The tables at the given index. + */ + java.lang.String getTables(int index); + + /** + * repeated string tables = 1; + * + * @param index The index of the value to return. + * @return The bytes of the tables at the given index. + */ + com.google.protobuf.ByteString getTablesBytes(int index); + + /** + * string sql = 2; + * + * @return The sql. + */ + java.lang.String getSql(); + + /** + * string sql = 2; + * + * @return The bytes for sql. + */ + com.google.protobuf.ByteString getSqlBytes(); + + /** + * repeated string headers = 3; + * + * @return A list containing the headers. + */ + java.util.List getHeadersList(); + + /** + * repeated string headers = 3; + * + * @return The count of headers. + */ + int getHeadersCount(); + + /** + * repeated string headers = 3; + * + * @param index The index of the element to return. + * @return The headers at the given index. + */ + java.lang.String getHeaders(int index); + + /** + * repeated string headers = 3; + * + * @param index The index of the value to return. + * @return The bytes of the headers at the given index. + */ + com.google.protobuf.ByteString getHeadersBytes(int index); + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + java.util.List getRowsList(); + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + io.holoinsight.server.query.grpc.QueryProto.DetailRow getRows(int index); + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + int getRowsCount(); + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + java.util.List getRowsOrBuilderList(); + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + io.holoinsight.server.query.grpc.QueryProto.DetailRowOrBuilder getRowsOrBuilder(int index); + } + /** + * Protobuf type {@code io.holoinsight.server.query.grpc.DetailResult} + */ + public static final class DetailResult extends com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:io.holoinsight.server.query.grpc.DetailResult) + DetailResultOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DetailResult.newBuilder() to construct. + private DetailResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DetailResult() { + tables_ = com.google.protobuf.LazyStringArrayList.EMPTY; + sql_ = ""; + headers_ = com.google.protobuf.LazyStringArrayList.EMPTY; + rows_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DetailResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DetailResult(com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + tables_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + tables_.add(s); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + sql_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + headers_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + headers_.add(s); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + rows_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + rows_.add( + input.readMessage(io.holoinsight.server.query.grpc.QueryProto.DetailRow.parser(), + extensionRegistry)); + break; + } + default: { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + tables_ = tables_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + headers_ = headers_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + rows_ = java.util.Collections.unmodifiableList(rows_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.holoinsight.server.query.grpc.QueryProto.internal_static_io_holoinsight_server_query_grpc_DetailResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return io.holoinsight.server.query.grpc.QueryProto.internal_static_io_holoinsight_server_query_grpc_DetailResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.holoinsight.server.query.grpc.QueryProto.DetailResult.class, + io.holoinsight.server.query.grpc.QueryProto.DetailResult.Builder.class); + } + + public static final int TABLES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList tables_; + + /** + * repeated string tables = 1; + * + * @return A list containing the tables. + */ + public com.google.protobuf.ProtocolStringList getTablesList() { + return tables_; + } + + /** + * repeated string tables = 1; + * + * @return The count of tables. + */ + public int getTablesCount() { + return tables_.size(); + } + + /** + * repeated string tables = 1; + * + * @param index The index of the element to return. + * @return The tables at the given index. + */ + public java.lang.String getTables(int index) { + return tables_.get(index); + } + + /** + * repeated string tables = 1; + * + * @param index The index of the value to return. + * @return The bytes of the tables at the given index. + */ + public com.google.protobuf.ByteString getTablesBytes(int index) { + return tables_.getByteString(index); + } + + public static final int SQL_FIELD_NUMBER = 2; + private volatile java.lang.Object sql_; + + /** + * string sql = 2; + * + * @return The sql. + */ + @java.lang.Override + public java.lang.String getSql() { + java.lang.Object ref = sql_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sql_ = s; + return s; + } + } + + /** + * string sql = 2; + * + * @return The bytes for sql. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSqlBytes() { + java.lang.Object ref = sql_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sql_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HEADERS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList headers_; + + /** + * repeated string headers = 3; + * + * @return A list containing the headers. + */ + public com.google.protobuf.ProtocolStringList getHeadersList() { + return headers_; + } + + /** + * repeated string headers = 3; + * + * @return The count of headers. + */ + public int getHeadersCount() { + return headers_.size(); + } + + /** + * repeated string headers = 3; + * + * @param index The index of the element to return. + * @return The headers at the given index. + */ + public java.lang.String getHeaders(int index) { + return headers_.get(index); + } + + /** + * repeated string headers = 3; + * + * @param index The index of the value to return. + * @return The bytes of the headers at the given index. + */ + public com.google.protobuf.ByteString getHeadersBytes(int index) { + return headers_.getByteString(index); + } + + public static final int ROWS_FIELD_NUMBER = 4; + private java.util.List rows_; + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + @java.lang.Override + public java.util.List getRowsList() { + return rows_; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + @java.lang.Override + public java.util.List getRowsOrBuilderList() { + return rows_; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + @java.lang.Override + public int getRowsCount() { + return rows_.size(); + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + @java.lang.Override + public io.holoinsight.server.query.grpc.QueryProto.DetailRow getRows(int index) { + return rows_.get(index); + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + @java.lang.Override + public io.holoinsight.server.query.grpc.QueryProto.DetailRowOrBuilder getRowsOrBuilder( + int index) { + return rows_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < tables_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tables_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sql_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sql_); + } + for (int i = 0; i < headers_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, headers_.getRaw(i)); + } + for (int i = 0; i < rows_.size(); i++) { + output.writeMessage(4, rows_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < tables_.size(); i++) { + dataSize += computeStringSizeNoTag(tables_.getRaw(i)); + } + size += dataSize; + size += 1 * getTablesList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sql_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sql_); + } + { + int dataSize = 0; + for (int i = 0; i < headers_.size(); i++) { + dataSize += computeStringSizeNoTag(headers_.getRaw(i)); + } + size += dataSize; + size += 1 * getHeadersList().size(); + } + for (int i = 0; i < rows_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, rows_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.holoinsight.server.query.grpc.QueryProto.DetailResult)) { + return super.equals(obj); + } + io.holoinsight.server.query.grpc.QueryProto.DetailResult other = + (io.holoinsight.server.query.grpc.QueryProto.DetailResult) obj; + + if (!getTablesList().equals(other.getTablesList())) + return false; + if (!getSql().equals(other.getSql())) + return false; + if (!getHeadersList().equals(other.getHeadersList())) + return false; + if (!getRowsList().equals(other.getRowsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTablesCount() > 0) { + hash = (37 * hash) + TABLES_FIELD_NUMBER; + hash = (53 * hash) + getTablesList().hashCode(); + } + hash = (37 * hash) + SQL_FIELD_NUMBER; + hash = (53 * hash) + getSql().hashCode(); + if (getHeadersCount() > 0) { + hash = (37 * hash) + HEADERS_FIELD_NUMBER; + hash = (53 * hash) + getHeadersList().hashCode(); + } + if (getRowsCount() > 0) { + hash = (37 * hash) + ROWS_FIELD_NUMBER; + hash = (53 * hash) + getRowsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailResult parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailResult parseFrom(byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, + extensionRegistry); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailResult parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, + extensionRegistry); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, + extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + io.holoinsight.server.query.grpc.QueryProto.DetailResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code io.holoinsight.server.query.grpc.DetailResult} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:io.holoinsight.server.query.grpc.DetailResult) + io.holoinsight.server.query.grpc.QueryProto.DetailResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.holoinsight.server.query.grpc.QueryProto.internal_static_io_holoinsight_server_query_grpc_DetailResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return io.holoinsight.server.query.grpc.QueryProto.internal_static_io_holoinsight_server_query_grpc_DetailResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.holoinsight.server.query.grpc.QueryProto.DetailResult.class, + io.holoinsight.server.query.grpc.QueryProto.DetailResult.Builder.class); + } + + // Construct using io.holoinsight.server.query.grpc.QueryProto.DetailResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRowsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + tables_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + sql_ = ""; + + headers_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + if (rowsBuilder_ == null) { + rows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + rowsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return io.holoinsight.server.query.grpc.QueryProto.internal_static_io_holoinsight_server_query_grpc_DetailResult_descriptor; + } + + @java.lang.Override + public io.holoinsight.server.query.grpc.QueryProto.DetailResult getDefaultInstanceForType() { + return io.holoinsight.server.query.grpc.QueryProto.DetailResult.getDefaultInstance(); + } + + @java.lang.Override + public io.holoinsight.server.query.grpc.QueryProto.DetailResult build() { + io.holoinsight.server.query.grpc.QueryProto.DetailResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.holoinsight.server.query.grpc.QueryProto.DetailResult buildPartial() { + io.holoinsight.server.query.grpc.QueryProto.DetailResult result = + new io.holoinsight.server.query.grpc.QueryProto.DetailResult(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + tables_ = tables_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tables_ = tables_; + result.sql_ = sql_; + if (((bitField0_ & 0x00000002) != 0)) { + headers_ = headers_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.headers_ = headers_; + if (rowsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + rows_ = java.util.Collections.unmodifiableList(rows_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.rows_ = rows_; + } else { + result.rows_ = rowsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.holoinsight.server.query.grpc.QueryProto.DetailResult) { + return mergeFrom((io.holoinsight.server.query.grpc.QueryProto.DetailResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.holoinsight.server.query.grpc.QueryProto.DetailResult other) { + if (other == io.holoinsight.server.query.grpc.QueryProto.DetailResult.getDefaultInstance()) + return this; + if (!other.tables_.isEmpty()) { + if (tables_.isEmpty()) { + tables_ = other.tables_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTablesIsMutable(); + tables_.addAll(other.tables_); + } + onChanged(); + } + if (!other.getSql().isEmpty()) { + sql_ = other.sql_; + onChanged(); + } + if (!other.headers_.isEmpty()) { + if (headers_.isEmpty()) { + headers_ = other.headers_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureHeadersIsMutable(); + headers_.addAll(other.headers_); + } + onChanged(); + } + if (rowsBuilder_ == null) { + if (!other.rows_.isEmpty()) { + if (rows_.isEmpty()) { + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureRowsIsMutable(); + rows_.addAll(other.rows_); + } + onChanged(); + } + } else { + if (!other.rows_.isEmpty()) { + if (rowsBuilder_.isEmpty()) { + rowsBuilder_.dispose(); + rowsBuilder_ = null; + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000004); + rowsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRowsFieldBuilder() + : null; + } else { + rowsBuilder_.addAllMessages(other.rows_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + io.holoinsight.server.query.grpc.QueryProto.DetailResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (io.holoinsight.server.query.grpc.QueryProto.DetailResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList tables_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTablesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tables_ = new com.google.protobuf.LazyStringArrayList(tables_); + bitField0_ |= 0x00000001; + } + } + + /** + * repeated string tables = 1; + * + * @return A list containing the tables. + */ + public com.google.protobuf.ProtocolStringList getTablesList() { + return tables_.getUnmodifiableView(); + } + + /** + * repeated string tables = 1; + * + * @return The count of tables. + */ + public int getTablesCount() { + return tables_.size(); + } + + /** + * repeated string tables = 1; + * + * @param index The index of the element to return. + * @return The tables at the given index. + */ + public java.lang.String getTables(int index) { + return tables_.get(index); + } + + /** + * repeated string tables = 1; + * + * @param index The index of the value to return. + * @return The bytes of the tables at the given index. + */ + public com.google.protobuf.ByteString getTablesBytes(int index) { + return tables_.getByteString(index); + } + + /** + * repeated string tables = 1; + * + * @param index The index to set the value at. + * @param value The tables to set. + * @return This builder for chaining. + */ + public Builder setTables(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTablesIsMutable(); + tables_.set(index, value); + onChanged(); + return this; + } + + /** + * repeated string tables = 1; + * + * @param value The tables to add. + * @return This builder for chaining. + */ + public Builder addTables(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTablesIsMutable(); + tables_.add(value); + onChanged(); + return this; + } + + /** + * repeated string tables = 1; + * + * @param values The tables to add. + * @return This builder for chaining. + */ + public Builder addAllTables(java.lang.Iterable values) { + ensureTablesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tables_); + onChanged(); + return this; + } + + /** + * repeated string tables = 1; + * + * @return This builder for chaining. + */ + public Builder clearTables() { + tables_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * repeated string tables = 1; + * + * @param value The bytes of the tables to add. + * @return This builder for chaining. + */ + public Builder addTablesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTablesIsMutable(); + tables_.add(value); + onChanged(); + return this; + } + + private java.lang.Object sql_ = ""; + + /** + * string sql = 2; + * + * @return The sql. + */ + public java.lang.String getSql() { + java.lang.Object ref = sql_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sql_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string sql = 2; + * + * @return The bytes for sql. + */ + public com.google.protobuf.ByteString getSqlBytes() { + java.lang.Object ref = sql_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sql_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string sql = 2; + * + * @param value The sql to set. + * @return This builder for chaining. + */ + public Builder setSql(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sql_ = value; + onChanged(); + return this; + } + + /** + * string sql = 2; + * + * @return This builder for chaining. + */ + public Builder clearSql() { + + sql_ = getDefaultInstance().getSql(); + onChanged(); + return this; + } + + /** + * string sql = 2; + * + * @param value The bytes for sql to set. + * @return This builder for chaining. + */ + public Builder setSqlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sql_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList headers_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureHeadersIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + headers_ = new com.google.protobuf.LazyStringArrayList(headers_); + bitField0_ |= 0x00000002; + } + } + + /** + * repeated string headers = 3; + * + * @return A list containing the headers. + */ + public com.google.protobuf.ProtocolStringList getHeadersList() { + return headers_.getUnmodifiableView(); + } + + /** + * repeated string headers = 3; + * + * @return The count of headers. + */ + public int getHeadersCount() { + return headers_.size(); + } + + /** + * repeated string headers = 3; + * + * @param index The index of the element to return. + * @return The headers at the given index. + */ + public java.lang.String getHeaders(int index) { + return headers_.get(index); + } + + /** + * repeated string headers = 3; + * + * @param index The index of the value to return. + * @return The bytes of the headers at the given index. + */ + public com.google.protobuf.ByteString getHeadersBytes(int index) { + return headers_.getByteString(index); + } + + /** + * repeated string headers = 3; + * + * @param index The index to set the value at. + * @param value The headers to set. + * @return This builder for chaining. + */ + public Builder setHeaders(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadersIsMutable(); + headers_.set(index, value); + onChanged(); + return this; + } + + /** + * repeated string headers = 3; + * + * @param value The headers to add. + * @return This builder for chaining. + */ + public Builder addHeaders(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadersIsMutable(); + headers_.add(value); + onChanged(); + return this; + } + + /** + * repeated string headers = 3; + * + * @param values The headers to add. + * @return This builder for chaining. + */ + public Builder addAllHeaders(java.lang.Iterable values) { + ensureHeadersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, headers_); + onChanged(); + return this; + } + + /** + * repeated string headers = 3; + * + * @return This builder for chaining. + */ + public Builder clearHeaders() { + headers_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * repeated string headers = 3; + * + * @param value The bytes of the headers to add. + * @return This builder for chaining. + */ + public Builder addHeadersBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureHeadersIsMutable(); + headers_.add(value); + onChanged(); + return this; + } + + private java.util.List rows_ = + java.util.Collections.emptyList(); + + private void ensureRowsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + rows_ = + new java.util.ArrayList(rows_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 rowsBuilder_; + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + public java.util.List getRowsList() { + if (rowsBuilder_ == null) { + return java.util.Collections.unmodifiableList(rows_); + } else { + return rowsBuilder_.getMessageList(); + } + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + public int getRowsCount() { + if (rowsBuilder_ == null) { + return rows_.size(); + } else { + return rowsBuilder_.getCount(); + } + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + public io.holoinsight.server.query.grpc.QueryProto.DetailRow getRows(int index) { + if (rowsBuilder_ == null) { + return rows_.get(index); + } else { + return rowsBuilder_.getMessage(index); + } + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + public Builder setRows(int index, + io.holoinsight.server.query.grpc.QueryProto.DetailRow value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.set(index, value); + onChanged(); + } else { + rowsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + public Builder setRows(int index, + io.holoinsight.server.query.grpc.QueryProto.DetailRow.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.set(index, builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + public Builder addRows(io.holoinsight.server.query.grpc.QueryProto.DetailRow value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.add(value); + onChanged(); + } else { + rowsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + public Builder addRows(int index, + io.holoinsight.server.query.grpc.QueryProto.DetailRow value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.add(index, value); + onChanged(); + } else { + rowsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + public Builder addRows( + io.holoinsight.server.query.grpc.QueryProto.DetailRow.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.add(builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + public Builder addRows(int index, + io.holoinsight.server.query.grpc.QueryProto.DetailRow.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.add(index, builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + public Builder addAllRows( + java.lang.Iterable values) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rows_); + onChanged(); + } else { + rowsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + public Builder clearRows() { + if (rowsBuilder_ == null) { + rows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + rowsBuilder_.clear(); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + public Builder removeRows(int index) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.remove(index); + onChanged(); + } else { + rowsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + public io.holoinsight.server.query.grpc.QueryProto.DetailRow.Builder getRowsBuilder( + int index) { + return getRowsFieldBuilder().getBuilder(index); + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + public io.holoinsight.server.query.grpc.QueryProto.DetailRowOrBuilder getRowsOrBuilder( + int index) { + if (rowsBuilder_ == null) { + return rows_.get(index); + } else { + return rowsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + public java.util.List getRowsOrBuilderList() { + if (rowsBuilder_ != null) { + return rowsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rows_); + } + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + public io.holoinsight.server.query.grpc.QueryProto.DetailRow.Builder addRowsBuilder() { + return getRowsFieldBuilder() + .addBuilder(io.holoinsight.server.query.grpc.QueryProto.DetailRow.getDefaultInstance()); + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + public io.holoinsight.server.query.grpc.QueryProto.DetailRow.Builder addRowsBuilder( + int index) { + return getRowsFieldBuilder().addBuilder(index, + io.holoinsight.server.query.grpc.QueryProto.DetailRow.getDefaultInstance()); + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailRow rows = 4; + */ + public java.util.List getRowsBuilderList() { + return getRowsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getRowsFieldBuilder() { + if (rowsBuilder_ == null) { + rowsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3( + rows_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + rows_ = null; + } + return rowsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:io.holoinsight.server.query.grpc.DetailResult) + } + + // @@protoc_insertion_point(class_scope:io.holoinsight.server.query.grpc.DetailResult) + private static final io.holoinsight.server.query.grpc.QueryProto.DetailResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.holoinsight.server.query.grpc.QueryProto.DetailResult(); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetailResult parsePartialFrom(com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DetailResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.holoinsight.server.query.grpc.QueryProto.DetailResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DetailRowOrBuilder extends + // @@protoc_insertion_point(interface_extends:io.holoinsight.server.query.grpc.DetailRow) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + java.util.List getValuesList(); + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + io.holoinsight.server.query.grpc.QueryProto.DetailValue getValues(int index); + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + int getValuesCount(); + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + java.util.List getValuesOrBuilderList(); + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + io.holoinsight.server.query.grpc.QueryProto.DetailValueOrBuilder getValuesOrBuilder(int index); + } + /** + * Protobuf type {@code io.holoinsight.server.query.grpc.DetailRow} + */ + public static final class DetailRow extends com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:io.holoinsight.server.query.grpc.DetailRow) + DetailRowOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DetailRow.newBuilder() to construct. + private DetailRow(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DetailRow() { + values_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DetailRow(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DetailRow(com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + values_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + values_.add(input.readMessage( + io.holoinsight.server.query.grpc.QueryProto.DetailValue.parser(), + extensionRegistry)); + break; + } + default: { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + values_ = java.util.Collections.unmodifiableList(values_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.holoinsight.server.query.grpc.QueryProto.internal_static_io_holoinsight_server_query_grpc_DetailRow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return io.holoinsight.server.query.grpc.QueryProto.internal_static_io_holoinsight_server_query_grpc_DetailRow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.holoinsight.server.query.grpc.QueryProto.DetailRow.class, + io.holoinsight.server.query.grpc.QueryProto.DetailRow.Builder.class); + } + + public static final int VALUES_FIELD_NUMBER = 1; + private java.util.List values_; + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + @java.lang.Override + public java.util.List getValuesList() { + return values_; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + @java.lang.Override + public java.util.List getValuesOrBuilderList() { + return values_; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + @java.lang.Override + public int getValuesCount() { + return values_.size(); + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + @java.lang.Override + public io.holoinsight.server.query.grpc.QueryProto.DetailValue getValues(int index) { + return values_.get(index); + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + @java.lang.Override + public io.holoinsight.server.query.grpc.QueryProto.DetailValueOrBuilder getValuesOrBuilder( + int index) { + return values_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < values_.size(); i++) { + output.writeMessage(1, values_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + + size = 0; + for (int i = 0; i < values_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, values_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.holoinsight.server.query.grpc.QueryProto.DetailRow)) { + return super.equals(obj); + } + io.holoinsight.server.query.grpc.QueryProto.DetailRow other = + (io.holoinsight.server.query.grpc.QueryProto.DetailRow) obj; + + if (!getValuesList().equals(other.getValuesList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailRow parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailRow parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailRow parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailRow parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailRow parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailRow parseFrom(byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailRow parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailRow parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, + extensionRegistry); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailRow parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailRow parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, + extensionRegistry); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailRow parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailRow parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, + extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + io.holoinsight.server.query.grpc.QueryProto.DetailRow prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code io.holoinsight.server.query.grpc.DetailRow} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:io.holoinsight.server.query.grpc.DetailRow) + io.holoinsight.server.query.grpc.QueryProto.DetailRowOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.holoinsight.server.query.grpc.QueryProto.internal_static_io_holoinsight_server_query_grpc_DetailRow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return io.holoinsight.server.query.grpc.QueryProto.internal_static_io_holoinsight_server_query_grpc_DetailRow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.holoinsight.server.query.grpc.QueryProto.DetailRow.class, + io.holoinsight.server.query.grpc.QueryProto.DetailRow.Builder.class); + } + + // Construct using io.holoinsight.server.query.grpc.QueryProto.DetailRow.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getValuesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + valuesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return io.holoinsight.server.query.grpc.QueryProto.internal_static_io_holoinsight_server_query_grpc_DetailRow_descriptor; + } + + @java.lang.Override + public io.holoinsight.server.query.grpc.QueryProto.DetailRow getDefaultInstanceForType() { + return io.holoinsight.server.query.grpc.QueryProto.DetailRow.getDefaultInstance(); + } + + @java.lang.Override + public io.holoinsight.server.query.grpc.QueryProto.DetailRow build() { + io.holoinsight.server.query.grpc.QueryProto.DetailRow result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.holoinsight.server.query.grpc.QueryProto.DetailRow buildPartial() { + io.holoinsight.server.query.grpc.QueryProto.DetailRow result = + new io.holoinsight.server.query.grpc.QueryProto.DetailRow(this); + int from_bitField0_ = bitField0_; + if (valuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + values_ = java.util.Collections.unmodifiableList(values_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.values_ = values_; + } else { + result.values_ = valuesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.holoinsight.server.query.grpc.QueryProto.DetailRow) { + return mergeFrom((io.holoinsight.server.query.grpc.QueryProto.DetailRow) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.holoinsight.server.query.grpc.QueryProto.DetailRow other) { + if (other == io.holoinsight.server.query.grpc.QueryProto.DetailRow.getDefaultInstance()) + return this; + if (valuesBuilder_ == null) { + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + } else { + if (!other.values_.isEmpty()) { + if (valuesBuilder_.isEmpty()) { + valuesBuilder_.dispose(); + valuesBuilder_ = null; + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + valuesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getValuesFieldBuilder() + : null; + } else { + valuesBuilder_.addAllMessages(other.values_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + io.holoinsight.server.query.grpc.QueryProto.DetailRow parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (io.holoinsight.server.query.grpc.QueryProto.DetailRow) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List values_ = + java.util.Collections.emptyList(); + + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + values_ = + new java.util.ArrayList( + values_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 valuesBuilder_; + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + public java.util.List getValuesList() { + if (valuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(values_); + } else { + return valuesBuilder_.getMessageList(); + } + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + public int getValuesCount() { + if (valuesBuilder_ == null) { + return values_.size(); + } else { + return valuesBuilder_.getCount(); + } + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + public io.holoinsight.server.query.grpc.QueryProto.DetailValue getValues(int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessage(index); + } + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + public Builder setValues(int index, + io.holoinsight.server.query.grpc.QueryProto.DetailValue value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + onChanged(); + } else { + valuesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + public Builder setValues(int index, + io.holoinsight.server.query.grpc.QueryProto.DetailValue.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.set(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + public Builder addValues(io.holoinsight.server.query.grpc.QueryProto.DetailValue value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + } else { + valuesBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + public Builder addValues(int index, + io.holoinsight.server.query.grpc.QueryProto.DetailValue value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(index, value); + onChanged(); + } else { + valuesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + public Builder addValues( + io.holoinsight.server.query.grpc.QueryProto.DetailValue.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + public Builder addValues(int index, + io.holoinsight.server.query.grpc.QueryProto.DetailValue.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + public Builder addAllValues( + java.lang.Iterable values) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + onChanged(); + } else { + valuesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + public Builder clearValues() { + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valuesBuilder_.clear(); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + public Builder removeValues(int index) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.remove(index); + onChanged(); + } else { + valuesBuilder_.remove(index); + } + return this; + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + public io.holoinsight.server.query.grpc.QueryProto.DetailValue.Builder getValuesBuilder( + int index) { + return getValuesFieldBuilder().getBuilder(index); + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + public io.holoinsight.server.query.grpc.QueryProto.DetailValueOrBuilder getValuesOrBuilder( + int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + public java.util.List getValuesOrBuilderList() { + if (valuesBuilder_ != null) { + return valuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(values_); + } + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + public io.holoinsight.server.query.grpc.QueryProto.DetailValue.Builder addValuesBuilder() { + return getValuesFieldBuilder().addBuilder( + io.holoinsight.server.query.grpc.QueryProto.DetailValue.getDefaultInstance()); + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + public io.holoinsight.server.query.grpc.QueryProto.DetailValue.Builder addValuesBuilder( + int index) { + return getValuesFieldBuilder().addBuilder(index, + io.holoinsight.server.query.grpc.QueryProto.DetailValue.getDefaultInstance()); + } + + /** + * repeated .io.holoinsight.server.query.grpc.DetailValue values = 1; + */ + public java.util.List getValuesBuilderList() { + return getValuesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getValuesFieldBuilder() { + if (valuesBuilder_ == null) { + valuesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3( + values_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + values_ = null; + } + return valuesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:io.holoinsight.server.query.grpc.DetailRow) + } + + // @@protoc_insertion_point(class_scope:io.holoinsight.server.query.grpc.DetailRow) + private static final io.holoinsight.server.query.grpc.QueryProto.DetailRow DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.holoinsight.server.query.grpc.QueryProto.DetailRow(); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailRow getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetailRow parsePartialFrom(com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DetailRow(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.holoinsight.server.query.grpc.QueryProto.DetailRow getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DetailValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:io.holoinsight.server.query.grpc.DetailValue) + com.google.protobuf.MessageOrBuilder { + + /** + * string type = 1; + * + * @return The type. + */ + java.lang.String getType(); + + /** + * string type = 1; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * optional string strValue = 2; + * + * @return Whether the strValue field is set. + */ + boolean hasStrValue(); + + /** + * optional string strValue = 2; + * + * @return The strValue. + */ + java.lang.String getStrValue(); + + /** + * optional string strValue = 2; + * + * @return The bytes for strValue. + */ + com.google.protobuf.ByteString getStrValueBytes(); + + /** + * optional bool boolValue = 3; + * + * @return Whether the boolValue field is set. + */ + boolean hasBoolValue(); + + /** + * optional bool boolValue = 3; + * + * @return The boolValue. + */ + boolean getBoolValue(); + + /** + * optional double doubleValue = 4; + * + * @return Whether the doubleValue field is set. + */ + boolean hasDoubleValue(); + + /** + * optional double doubleValue = 4; + * + * @return The doubleValue. + */ + double getDoubleValue(); + + /** + * optional int64 timestampValue = 5; + * + * @return Whether the timestampValue field is set. + */ + boolean hasTimestampValue(); + + /** + * optional int64 timestampValue = 5; + * + * @return The timestampValue. + */ + long getTimestampValue(); + } + /** + * Protobuf type {@code io.holoinsight.server.query.grpc.DetailValue} + */ + public static final class DetailValue extends com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:io.holoinsight.server.query.grpc.DetailValue) + DetailValueOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DetailValue.newBuilder() to construct. + private DetailValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DetailValue() { + type_ = ""; + strValue_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DetailValue(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DetailValue(com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + type_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + strValue_ = s; + break; + } + case 24: { + bitField0_ |= 0x00000002; + boolValue_ = input.readBool(); + break; + } + case 33: { + bitField0_ |= 0x00000004; + doubleValue_ = input.readDouble(); + break; + } + case 40: { + bitField0_ |= 0x00000008; + timestampValue_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.holoinsight.server.query.grpc.QueryProto.internal_static_io_holoinsight_server_query_grpc_DetailValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return io.holoinsight.server.query.grpc.QueryProto.internal_static_io_holoinsight_server_query_grpc_DetailValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.holoinsight.server.query.grpc.QueryProto.DetailValue.class, + io.holoinsight.server.query.grpc.QueryProto.DetailValue.Builder.class); + } + + private int bitField0_; + public static final int TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object type_; + + /** + * string type = 1; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + + /** + * string type = 1; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STRVALUE_FIELD_NUMBER = 2; + private volatile java.lang.Object strValue_; + + /** + * optional string strValue = 2; + * + * @return Whether the strValue field is set. + */ + @java.lang.Override + public boolean hasStrValue() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * optional string strValue = 2; + * + * @return The strValue. + */ + @java.lang.Override + public java.lang.String getStrValue() { + java.lang.Object ref = strValue_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + strValue_ = s; + return s; + } + } + + /** + * optional string strValue = 2; + * + * @return The bytes for strValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStrValueBytes() { + java.lang.Object ref = strValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + strValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOOLVALUE_FIELD_NUMBER = 3; + private boolean boolValue_; + + /** + * optional bool boolValue = 3; + * + * @return Whether the boolValue field is set. + */ + @java.lang.Override + public boolean hasBoolValue() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * optional bool boolValue = 3; + * + * @return The boolValue. + */ + @java.lang.Override + public boolean getBoolValue() { + return boolValue_; + } + + public static final int DOUBLEVALUE_FIELD_NUMBER = 4; + private double doubleValue_; + + /** + * optional double doubleValue = 4; + * + * @return Whether the doubleValue field is set. + */ + @java.lang.Override + public boolean hasDoubleValue() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * optional double doubleValue = 4; + * + * @return The doubleValue. + */ + @java.lang.Override + public double getDoubleValue() { + return doubleValue_; + } + + public static final int TIMESTAMPVALUE_FIELD_NUMBER = 5; + private long timestampValue_; + + /** + * optional int64 timestampValue = 5; + * + * @return Whether the timestampValue field is set. + */ + @java.lang.Override + public boolean hasTimestampValue() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * optional int64 timestampValue = 5; + * + * @return The timestampValue. + */ + @java.lang.Override + public long getTimestampValue() { + return timestampValue_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, strValue_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeBool(3, boolValue_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeDouble(4, doubleValue_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeInt64(5, timestampValue_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, strValue_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, boolValue_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(4, doubleValue_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(5, timestampValue_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.holoinsight.server.query.grpc.QueryProto.DetailValue)) { + return super.equals(obj); + } + io.holoinsight.server.query.grpc.QueryProto.DetailValue other = + (io.holoinsight.server.query.grpc.QueryProto.DetailValue) obj; + + if (!getType().equals(other.getType())) + return false; + if (hasStrValue() != other.hasStrValue()) + return false; + if (hasStrValue()) { + if (!getStrValue().equals(other.getStrValue())) + return false; + } + if (hasBoolValue() != other.hasBoolValue()) + return false; + if (hasBoolValue()) { + if (getBoolValue() != other.getBoolValue()) + return false; + } + if (hasDoubleValue() != other.hasDoubleValue()) + return false; + if (hasDoubleValue()) { + if (java.lang.Double.doubleToLongBits(getDoubleValue()) != java.lang.Double + .doubleToLongBits(other.getDoubleValue())) + return false; + } + if (hasTimestampValue() != other.hasTimestampValue()) + return false; + if (hasTimestampValue()) { + if (getTimestampValue() != other.getTimestampValue()) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + if (hasStrValue()) { + hash = (37 * hash) + STRVALUE_FIELD_NUMBER; + hash = (53 * hash) + getStrValue().hashCode(); + } + if (hasBoolValue()) { + hash = (37 * hash) + BOOLVALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBoolValue()); + } + if (hasDoubleValue()) { + hash = (37 * hash) + DOUBLEVALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal + .hashLong(java.lang.Double.doubleToLongBits(getDoubleValue())); + } + if (hasTimestampValue()) { + hash = (37 * hash) + TIMESTAMPVALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTimestampValue()); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailValue parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailValue parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailValue parseFrom(byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailValue parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailValue parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, + extensionRegistry); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailValue parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailValue parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, + extensionRegistry); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, + extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + io.holoinsight.server.query.grpc.QueryProto.DetailValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code io.holoinsight.server.query.grpc.DetailValue} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:io.holoinsight.server.query.grpc.DetailValue) + io.holoinsight.server.query.grpc.QueryProto.DetailValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.holoinsight.server.query.grpc.QueryProto.internal_static_io_holoinsight_server_query_grpc_DetailValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return io.holoinsight.server.query.grpc.QueryProto.internal_static_io_holoinsight_server_query_grpc_DetailValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.holoinsight.server.query.grpc.QueryProto.DetailValue.class, + io.holoinsight.server.query.grpc.QueryProto.DetailValue.Builder.class); + } + + // Construct using io.holoinsight.server.query.grpc.QueryProto.DetailValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = ""; + + strValue_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + boolValue_ = false; + bitField0_ = (bitField0_ & ~0x00000002); + doubleValue_ = 0D; + bitField0_ = (bitField0_ & ~0x00000004); + timestampValue_ = 0L; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return io.holoinsight.server.query.grpc.QueryProto.internal_static_io_holoinsight_server_query_grpc_DetailValue_descriptor; + } + + @java.lang.Override + public io.holoinsight.server.query.grpc.QueryProto.DetailValue getDefaultInstanceForType() { + return io.holoinsight.server.query.grpc.QueryProto.DetailValue.getDefaultInstance(); + } + + @java.lang.Override + public io.holoinsight.server.query.grpc.QueryProto.DetailValue build() { + io.holoinsight.server.query.grpc.QueryProto.DetailValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.holoinsight.server.query.grpc.QueryProto.DetailValue buildPartial() { + io.holoinsight.server.query.grpc.QueryProto.DetailValue result = + new io.holoinsight.server.query.grpc.QueryProto.DetailValue(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.type_ = type_; + if (((from_bitField0_ & 0x00000001) != 0)) { + to_bitField0_ |= 0x00000001; + } + result.strValue_ = strValue_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.boolValue_ = boolValue_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.doubleValue_ = doubleValue_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.timestampValue_ = timestampValue_; + to_bitField0_ |= 0x00000008; + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.holoinsight.server.query.grpc.QueryProto.DetailValue) { + return mergeFrom((io.holoinsight.server.query.grpc.QueryProto.DetailValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.holoinsight.server.query.grpc.QueryProto.DetailValue other) { + if (other == io.holoinsight.server.query.grpc.QueryProto.DetailValue.getDefaultInstance()) + return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + if (other.hasStrValue()) { + bitField0_ |= 0x00000001; + strValue_ = other.strValue_; + onChanged(); + } + if (other.hasBoolValue()) { + setBoolValue(other.getBoolValue()); + } + if (other.hasDoubleValue()) { + setDoubleValue(other.getDoubleValue()); + } + if (other.hasTimestampValue()) { + setTimestampValue(other.getTimestampValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + io.holoinsight.server.query.grpc.QueryProto.DetailValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (io.holoinsight.server.query.grpc.QueryProto.DetailValue) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object type_ = ""; + + /** + * string type = 1; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string type = 1; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + + /** + * string type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + + /** + * string type = 1; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private java.lang.Object strValue_ = ""; + + /** + * optional string strValue = 2; + * + * @return Whether the strValue field is set. + */ + public boolean hasStrValue() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * optional string strValue = 2; + * + * @return The strValue. + */ + public java.lang.String getStrValue() { + java.lang.Object ref = strValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + strValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * optional string strValue = 2; + * + * @return The bytes for strValue. + */ + public com.google.protobuf.ByteString getStrValueBytes() { + java.lang.Object ref = strValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + strValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * optional string strValue = 2; + * + * @param value The strValue to set. + * @return This builder for chaining. + */ + public Builder setStrValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + strValue_ = value; + onChanged(); + return this; + } + + /** + * optional string strValue = 2; + * + * @return This builder for chaining. + */ + public Builder clearStrValue() { + bitField0_ = (bitField0_ & ~0x00000001); + strValue_ = getDefaultInstance().getStrValue(); + onChanged(); + return this; + } + + /** + * optional string strValue = 2; + * + * @param value The bytes for strValue to set. + * @return This builder for chaining. + */ + public Builder setStrValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + bitField0_ |= 0x00000001; + strValue_ = value; + onChanged(); + return this; + } + + private boolean boolValue_; + + /** + * optional bool boolValue = 3; + * + * @return Whether the boolValue field is set. + */ + @java.lang.Override + public boolean hasBoolValue() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * optional bool boolValue = 3; + * + * @return The boolValue. + */ + @java.lang.Override + public boolean getBoolValue() { + return boolValue_; + } + + /** + * optional bool boolValue = 3; + * + * @param value The boolValue to set. + * @return This builder for chaining. + */ + public Builder setBoolValue(boolean value) { + bitField0_ |= 0x00000002; + boolValue_ = value; + onChanged(); + return this; + } + + /** + * optional bool boolValue = 3; + * + * @return This builder for chaining. + */ + public Builder clearBoolValue() { + bitField0_ = (bitField0_ & ~0x00000002); + boolValue_ = false; + onChanged(); + return this; + } + + private double doubleValue_; + + /** + * optional double doubleValue = 4; + * + * @return Whether the doubleValue field is set. + */ + @java.lang.Override + public boolean hasDoubleValue() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * optional double doubleValue = 4; + * + * @return The doubleValue. + */ + @java.lang.Override + public double getDoubleValue() { + return doubleValue_; + } + + /** + * optional double doubleValue = 4; + * + * @param value The doubleValue to set. + * @return This builder for chaining. + */ + public Builder setDoubleValue(double value) { + bitField0_ |= 0x00000004; + doubleValue_ = value; + onChanged(); + return this; + } + + /** + * optional double doubleValue = 4; + * + * @return This builder for chaining. + */ + public Builder clearDoubleValue() { + bitField0_ = (bitField0_ & ~0x00000004); + doubleValue_ = 0D; + onChanged(); + return this; + } + + private long timestampValue_; + + /** + * optional int64 timestampValue = 5; + * + * @return Whether the timestampValue field is set. + */ + @java.lang.Override + public boolean hasTimestampValue() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * optional int64 timestampValue = 5; + * + * @return The timestampValue. + */ + @java.lang.Override + public long getTimestampValue() { + return timestampValue_; + } + + /** + * optional int64 timestampValue = 5; + * + * @param value The timestampValue to set. + * @return This builder for chaining. + */ + public Builder setTimestampValue(long value) { + bitField0_ |= 0x00000008; + timestampValue_ = value; + onChanged(); + return this; + } + + /** + * optional int64 timestampValue = 5; + * + * @return This builder for chaining. + */ + public Builder clearTimestampValue() { + bitField0_ = (bitField0_ & ~0x00000008); + timestampValue_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:io.holoinsight.server.query.grpc.DetailValue) + } + + // @@protoc_insertion_point(class_scope:io.holoinsight.server.query.grpc.DetailValue) + private static final io.holoinsight.server.query.grpc.QueryProto.DetailValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.holoinsight.server.query.grpc.QueryProto.DetailValue(); + } + + public static io.holoinsight.server.query.grpc.QueryProto.DetailValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetailValue parsePartialFrom(com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DetailValue(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.holoinsight.server.query.grpc.QueryProto.DetailValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_io_holoinsight_server_query_grpc_QueryRequest_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_io_holoinsight_server_query_grpc_QueryRequest_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_io_holoinsight_server_query_grpc_QueryMetricsRequest_descriptor; @@ -50793,6 +55030,14 @@ public io.holoinsight.server.query.grpc.QueryProto.CommonMapTypeDataList getDefa private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_io_holoinsight_server_query_grpc_CommonMapTypeData_DataEntry_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_io_holoinsight_server_query_grpc_CommonMapTypeDataList_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_io_holoinsight_server_query_grpc_CommonMapTypeDataList_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_io_holoinsight_server_query_grpc_QueryDetailResponse_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_io_holoinsight_server_query_grpc_QueryDetailResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_io_holoinsight_server_query_grpc_DetailResult_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_io_holoinsight_server_query_grpc_DetailResult_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_io_holoinsight_server_query_grpc_DetailRow_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_io_holoinsight_server_query_grpc_DetailRow_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_io_holoinsight_server_query_grpc_DetailValue_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_io_holoinsight_server_query_grpc_DetailValue_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -50957,57 +55202,70 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "taEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"" + "g\n\025CommonMapTypeDataList\022N\n\021commonMapTyp" + "eData\030\001 \003(\01323.io.holoinsight.server.quer" - + "y.grpc.CommonMapTypeData2\224\024\n\014QueryServic" - + "e\022l\n\tQueryData\022..io.holoinsight.server.q" - + "uery.grpc.QueryRequest\032/.io.holoinsight." - + "server.query.grpc.QueryResponse\022l\n\tQuery" - + "Tags\022..io.holoinsight.server.query.grpc." - + "QueryRequest\032/.io.holoinsight.server.que" - + "ry.grpc.QueryResponse\022t\n\013QuerySchema\022..i" - + "o.holoinsight.server.query.grpc.QueryReq" + "uest\0325.io.holoinsight.server.query.grpc." - + "QuerySchemaResponse\022}\n\014QueryMetrics\0225.io" - + ".holoinsight.server.query.grpc.QueryMetr" + "icsRequest\0326.io.holoinsight.server.query" - + ".grpc.QueryMetricsResponse\022m\n\nDeleteKeys" - + "\022..io.holoinsight.server.query.grpc.Quer" - + "yRequest\032/.io.holoinsight.server.query.g" - + "rpc.QueryResponse\022w\n\017pqlInstantQuery\0223.i" - + "o.holoinsight.server.query.grpc.PqlInsta" + "ntRequest\032/.io.holoinsight.server.query." - + "grpc.QueryResponse\022s\n\rpqlRangeQuery\0221.io" - + ".holoinsight.server.query.grpc.PqlRangeR" + "equest\032/.io.holoinsight.server.query.grp" - + "c.QueryResponse\022u\n\020QueryBasicTraces\0223.io" - + ".holoinsight.server.query.grpc.QueryTrac" + "eRequest\032,.io.holoinsight.server.query.g" - + "rpc.TraceBrief\022j\n\nQueryTrace\0223.io.holoin" - + "sight.server.query.grpc.QueryTraceReques" - + "t\032\'.io.holoinsight.server.query.grpc.Tra" - + "ce\022v\n\016QueryTraceTree\0223.io.holoinsight.se" - + "rver.query.grpc.QueryTraceRequest\032/.io.h" + "oloinsight.server.query.grpc.TraceTreeLi" - + "st\022t\n\014BillingTrace\0223.io.holoinsight.serv" - + "er.query.grpc.QueryTraceRequest\032/.io.hol" + "oinsight.server.query.grpc.StatisticData" - + "\022{\n\020QueryServiceList\0222.io.holoinsight.se" - + "rver.query.grpc.QueryMetaRequest\0323.io.ho" + "loinsight.server.query.grpc.QueryMetaRes" - + "ponse\022|\n\021QueryEndpointList\0222.io.holoinsi" - + "ght.server.query.grpc.QueryMetaRequest\0323" + ".io.holoinsight.server.query.grpc.QueryM" - + "etaResponse\022\203\001\n\030QueryServiceInstanceList" + + "y.grpc.CommonMapTypeData\"V\n\023QueryDetailR" + + "esponse\022?\n\007results\030\001 \003(\0132..io.holoinsigh" + + "t.server.query.grpc.DetailResult\"w\n\014Deta" + + "ilResult\022\016\n\006tables\030\001 \003(\t\022\013\n\003sql\030\002 \001(\t\022\017\n" + + "\007headers\030\003 \003(\t\0229\n\004rows\030\004 \003(\0132+.io.holoin" + + "sight.server.query.grpc.DetailRow\"J\n\tDet" + + "ailRow\022=\n\006values\030\001 \003(\0132-.io.holoinsight." + + "server.query.grpc.DetailValue\"\277\001\n\013Detail" + + "Value\022\014\n\004type\030\001 \001(\t\022\025\n\010strValue\030\002 \001(\tH\000\210" + + "\001\001\022\026\n\tboolValue\030\003 \001(\010H\001\210\001\001\022\030\n\013doubleValu" + + "e\030\004 \001(\001H\002\210\001\001\022\033\n\016timestampValue\030\005 \001(\003H\003\210\001" + + "\001B\013\n\t_strValueB\014\n\n_boolValueB\016\n\014_doubleV" + + "alueB\021\n\017_timestampValue2\216\025\n\014QueryService" + + "\022l\n\tQueryData\022..io.holoinsight.server.qu" + + "ery.grpc.QueryRequest\032/.io.holoinsight.s" + + "erver.query.grpc.QueryResponse\022l\n\tQueryT" + + "ags\022..io.holoinsight.server.query.grpc.Q" + + "ueryRequest\032/.io.holoinsight.server.quer" + + "y.grpc.QueryResponse\022t\n\013QuerySchema\022..io" + + ".holoinsight.server.query.grpc.QueryRequ" + "est\0325.io.holoinsight.server.query.grpc.Q" + + "uerySchemaResponse\022}\n\014QueryMetrics\0225.io." + + "holoinsight.server.query.grpc.QueryMetri" + "csRequest\0326.io.holoinsight.server.query." + + "grpc.QueryMetricsResponse\022m\n\nDeleteKeys\022" + + "..io.holoinsight.server.query.grpc.Query" + "Request\032/.io.holoinsight.server.query.gr" + + "pc.QueryResponse\022w\n\017pqlInstantQuery\0223.io" + + ".holoinsight.server.query.grpc.PqlInstan" + "tRequest\032/.io.holoinsight.server.query.g" + + "rpc.QueryResponse\022s\n\rpqlRangeQuery\0221.io." + + "holoinsight.server.query.grpc.PqlRangeRe" + "quest\032/.io.holoinsight.server.query.grpc" + + ".QueryResponse\022u\n\020QueryBasicTraces\0223.io." + + "holoinsight.server.query.grpc.QueryTrace" + "Request\032,.io.holoinsight.server.query.gr" + + "pc.TraceBrief\022j\n\nQueryTrace\0223.io.holoins" + + "ight.server.query.grpc.QueryTraceRequest" + + "\032\'.io.holoinsight.server.query.grpc.Trac" + + "e\022v\n\016QueryTraceTree\0223.io.holoinsight.ser" + + "ver.query.grpc.QueryTraceRequest\032/.io.ho" + "loinsight.server.query.grpc.TraceTreeLis" + + "t\022t\n\014BillingTrace\0223.io.holoinsight.serve" + + "r.query.grpc.QueryTraceRequest\032/.io.holo" + + "insight.server.query.grpc.StatisticData\022" + + "{\n\020QueryServiceList\0222.io.holoinsight.ser" + + "ver.query.grpc.QueryMetaRequest\0323.io.hol" + "oinsight.server.query.grpc.QueryMetaResp" + + "onse\022|\n\021QueryEndpointList\0222.io.holoinsig" + + "ht.server.query.grpc.QueryMetaRequest\0323." + "io.holoinsight.server.query.grpc.QueryMe" + + "taResponse\022\203\001\n\030QueryServiceInstanceList\022" + + "2.io.holoinsight.server.query.grpc.Query" + "MetaRequest\0323.io.holoinsight.server.quer" + + "y.grpc.QueryMetaResponse\022\211\001\n\022QueryCompon" + + "entList\0222.io.holoinsight.server.query.gr" + + "pc.QueryMetaRequest\032?.io.holoinsight.ser" + "ver.query.grpc.QueryVirtualComponentResp" + + "onse\022x\n\026QueryComponentTraceIds\0222.io.holo" + + "insight.server.query.grpc.QueryMetaReque" + "st\032*.io.holoinsight.server.query.grpc.Tr" + + "aceIds\022s\n\rQueryTopology\0226.io.holoinsight" + + ".server.query.grpc.QueryTopologyRequest\032" + "*.io.holoinsight.server.query.grpc.Topol" + + "ogy\022~\n\020QuerySlowSqlList\0222.io.holoinsight" + + ".server.query.grpc.QueryMetaRequest\0326.io" + ".holoinsight.server.query.grpc.QuerySlow" + + "SqlResponse\022y\n\016StatisticTrace\0222.io.holoi" + + "nsight.server.query.grpc.StatisticReques" + "t\0323.io.holoinsight.server.query.grpc.Sta" + + "tisticDataList\022\204\001\n\025QueryServiceErrorList" + "\0222.io.holoinsight.server.query.grpc.Quer" - + "yMetaRequest\0323.io.holoinsight.server.que" - + "ry.grpc.QueryMetaResponse\022\211\001\n\022QueryCompo" - + "nentList\0222.io.holoinsight.server.query.g" - + "rpc.QueryMetaRequest\032?.io.holoinsight.se" + "rver.query.grpc.QueryVirtualComponentRes" - + "ponse\022x\n\026QueryComponentTraceIds\0222.io.hol" - + "oinsight.server.query.grpc.QueryMetaRequ" + "est\032*.io.holoinsight.server.query.grpc.T" - + "raceIds\022s\n\rQueryTopology\0226.io.holoinsigh" - + "t.server.query.grpc.QueryTopologyRequest" + "\032*.io.holoinsight.server.query.grpc.Topo" - + "logy\022~\n\020QuerySlowSqlList\0222.io.holoinsigh" - + "t.server.query.grpc.QueryMetaRequest\0326.i" + "o.holoinsight.server.query.grpc.QuerySlo" - + "wSqlResponse\022y\n\016StatisticTrace\0222.io.holo" - + "insight.server.query.grpc.StatisticReque" + "st\0323.io.holoinsight.server.query.grpc.St" - + "atisticDataList\022\204\001\n\025QueryServiceErrorLis" - + "t\0222.io.holoinsight.server.query.grpc.Que" - + "ryMetaRequest\0327.io.holoinsight.server.qu" - + "ery.grpc.CommonMapTypeDataList\022\206\001\n\027Query" - + "ServiceErrorDetail\0222.io.holoinsight.serv" - + "er.query.grpc.QueryMetaRequest\0327.io.holo" + "insight.server.query.grpc.CommonMapTypeD" - + "ataListB\"\n io.holoinsight.server.query.g" + "rpcb\006proto3"}; + + "yMetaRequest\0327.io.holoinsight.server.que" + + "ry.grpc.CommonMapTypeDataList\022\206\001\n\027QueryS" + + "erviceErrorDetail\0222.io.holoinsight.serve" + + "r.query.grpc.QueryMetaRequest\0327.io.holoi" + "nsight.server.query.grpc.CommonMapTypeDa" + + "taList\022x\n\017QueryDetailData\022..io.holoinsig" + + "ht.server.query.grpc.QueryRequest\0325.io.h" + "oloinsight.server.query.grpc.QueryDetail" + + "ResponseB\"\n io.holoinsight.server.query." + "grpcb\006proto3"}; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.protobuf.AnyProto.getDescriptor(),}); @@ -51329,6 +55587,31 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_io_holoinsight_server_query_grpc_CommonMapTypeDataList_descriptor, new java.lang.String[] {"CommonMapTypeData",}); + internal_static_io_holoinsight_server_query_grpc_QueryDetailResponse_descriptor = + getDescriptor().getMessageTypes().get(42); + internal_static_io_holoinsight_server_query_grpc_QueryDetailResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_io_holoinsight_server_query_grpc_QueryDetailResponse_descriptor, + new java.lang.String[] {"Results",}); + internal_static_io_holoinsight_server_query_grpc_DetailResult_descriptor = + getDescriptor().getMessageTypes().get(43); + internal_static_io_holoinsight_server_query_grpc_DetailResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_io_holoinsight_server_query_grpc_DetailResult_descriptor, + new java.lang.String[] {"Tables", "Sql", "Headers", "Rows",}); + internal_static_io_holoinsight_server_query_grpc_DetailRow_descriptor = + getDescriptor().getMessageTypes().get(44); + internal_static_io_holoinsight_server_query_grpc_DetailRow_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_io_holoinsight_server_query_grpc_DetailRow_descriptor, + new java.lang.String[] {"Values",}); + internal_static_io_holoinsight_server_query_grpc_DetailValue_descriptor = + getDescriptor().getMessageTypes().get(45); + internal_static_io_holoinsight_server_query_grpc_DetailValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_io_holoinsight_server_query_grpc_DetailValue_descriptor, + new java.lang.String[] {"Type", "StrValue", "BoolValue", "DoubleValue", + "TimestampValue", "StrValue", "BoolValue", "DoubleValue", "TimestampValue",}); com.google.protobuf.AnyProto.getDescriptor(); } diff --git a/server/query/query-grpc-gen/src/main/java/io/holoinsight/server/query/grpc/QueryServiceGrpc.java b/server/query/query-grpc-gen/src/main/java/io/holoinsight/server/query/grpc/QueryServiceGrpc.java index d34d57670..f5ae6c0f3 100644 --- a/server/query/query-grpc-gen/src/main/java/io/holoinsight/server/query/grpc/QueryServiceGrpc.java +++ b/server/query/query-grpc-gen/src/main/java/io/holoinsight/server/query/grpc/QueryServiceGrpc.java @@ -1,6 +1,3 @@ -/* - * Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0. - */ package io.holoinsight.server.query.grpc; import static io.grpc.MethodDescriptor.generateFullMethodName; @@ -662,6 +659,36 @@ public static io.grpc.MethodDescriptor getQueryDetailDataMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "QueryDetailData", + requestType = io.holoinsight.server.query.grpc.QueryProto.QueryRequest.class, + responseType = io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getQueryDetailDataMethod() { + io.grpc.MethodDescriptor getQueryDetailDataMethod; + if ((getQueryDetailDataMethod = QueryServiceGrpc.getQueryDetailDataMethod) == null) { + synchronized (QueryServiceGrpc.class) { + if ((getQueryDetailDataMethod = QueryServiceGrpc.getQueryDetailDataMethod) == null) { + QueryServiceGrpc.getQueryDetailDataMethod = getQueryDetailDataMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "QueryDetailData")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils + .marshaller(io.holoinsight.server.query.grpc.QueryProto.QueryRequest + .getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils + .marshaller(io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse + .getDefaultInstance())) + .setSchemaDescriptor(new QueryServiceMethodDescriptorSupplier("QueryDetailData")) + .build(); + } + } + } + return getQueryDetailDataMethod; + } + /** * Creates a new async stub that supports all call types for the service */ @@ -888,6 +915,14 @@ public void queryServiceErrorDetail( responseObserver); } + /** + */ + public void queryDetailData(io.holoinsight.server.query.grpc.QueryProto.QueryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getQueryDetailDataMethod(), + responseObserver); + } + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) @@ -954,6 +989,9 @@ public final io.grpc.ServerServiceDefinition bindService() { .addMethod(getQueryServiceErrorDetailMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers( this, METHODID_QUERY_SERVICE_ERROR_DETAIL))) + .addMethod(getQueryDetailDataMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers( + this, METHODID_QUERY_DETAIL_DATA))) .build(); } } @@ -1168,6 +1206,15 @@ public void queryServiceErrorDetail( getChannel().newCall(getQueryServiceErrorDetailMethod(), getCallOptions()), request, responseObserver); } + + /** + */ + public void queryDetailData(io.holoinsight.server.query.grpc.QueryProto.QueryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getQueryDetailDataMethod(), getCallOptions()), request, + responseObserver); + } } /** @@ -1351,6 +1398,14 @@ public io.holoinsight.server.query.grpc.QueryProto.CommonMapTypeDataList querySe return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getQueryServiceErrorDetailMethod(), getCallOptions(), request); } + + /** + */ + public io.holoinsight.server.query.grpc.QueryProto.QueryDetailResponse queryDetailData( + io.holoinsight.server.query.grpc.QueryProto.QueryRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getQueryDetailDataMethod(), + getCallOptions(), request); + } } /** @@ -1534,6 +1589,14 @@ public com.google.common.util.concurrent.ListenableFuture queryDetailData( + io.holoinsight.server.query.grpc.QueryProto.QueryRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getQueryDetailDataMethod(), getCallOptions()), request); + } } private static final int METHODID_QUERY_DATA = 0; @@ -1557,6 +1620,7 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1677,6 +1741,11 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.holoinsight.server.query.grpc.QueryProto.QueryMetaRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_QUERY_DETAIL_DATA: + serviceImpl.queryDetailData( + (io.holoinsight.server.query.grpc.QueryProto.QueryRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -1749,7 +1818,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getQueryComponentListMethod()).addMethod(getQueryComponentTraceIdsMethod()) .addMethod(getQueryTopologyMethod()).addMethod(getQuerySlowSqlListMethod()) .addMethod(getStatisticTraceMethod()).addMethod(getQueryServiceErrorListMethod()) - .addMethod(getQueryServiceErrorDetailMethod()).build(); + .addMethod(getQueryServiceErrorDetailMethod()).addMethod(getQueryDetailDataMethod()) + .build(); } } } diff --git a/server/query/query-grpc-gen/src/main/proto/query_proto.proto b/server/query/query-grpc-gen/src/main/proto/query_proto.proto index b53ba3017..e9f819f2d 100644 --- a/server/query/query-grpc-gen/src/main/proto/query_proto.proto +++ b/server/query/query-grpc-gen/src/main/proto/query_proto.proto @@ -336,6 +336,29 @@ message CommonMapTypeDataList { repeated CommonMapTypeData commonMapTypeData = 1; } +message QueryDetailResponse { + repeated DetailResult results = 1; +} + +message DetailResult { + repeated string tables = 1; + string sql = 2; + repeated string headers = 3; + repeated DetailRow rows = 4; +} + +message DetailRow { + repeated DetailValue values = 1; +} + +message DetailValue { + string type = 1; + optional string strValue = 2; + optional bool boolValue = 3; + optional double doubleValue = 4; + optional int64 timestampValue = 5; +} + service QueryService { rpc QueryData(QueryRequest) returns (QueryResponse); @@ -379,4 +402,6 @@ service QueryService { rpc QueryServiceErrorDetail(QueryMetaRequest) returns (CommonMapTypeDataList); + rpc QueryDetailData(QueryRequest) returns (QueryDetailResponse); + } \ No newline at end of file diff --git a/server/query/query-server/src/main/java/io/holoinsight/server/query/server/rpc/QueryGrpcService.java b/server/query/query-server/src/main/java/io/holoinsight/server/query/server/rpc/QueryGrpcService.java index 5ee1f9655..849f10cb5 100644 --- a/server/query/query-server/src/main/java/io/holoinsight/server/query/server/rpc/QueryGrpcService.java +++ b/server/query/query-server/src/main/java/io/holoinsight/server/query/server/rpc/QueryGrpcService.java @@ -34,6 +34,18 @@ public void queryData(QueryProto.QueryRequest request, } } + @Override + public void queryDetailData(QueryProto.QueryRequest request, + StreamObserver responseObserver) { + try { + responseObserver.onNext(queryService.queryDetailData(request)); + responseObserver.onCompleted(); + } catch (Throwable t) { + responseObserver.onError( + Status.INTERNAL.withCause(t).withDescription(t.getMessage()).asRuntimeException()); + } + } + @Override public void queryTags(QueryProto.QueryRequest request, StreamObserver responseObserver) { diff --git a/server/query/query-service/src/main/java/io/holoinsight/server/query/service/QueryService.java b/server/query/query-service/src/main/java/io/holoinsight/server/query/service/QueryService.java index 0379bef58..bf83b34ac 100644 --- a/server/query/query-service/src/main/java/io/holoinsight/server/query/service/QueryService.java +++ b/server/query/query-service/src/main/java/io/holoinsight/server/query/service/QueryService.java @@ -64,4 +64,7 @@ QueryProto.CommonMapTypeDataList queryServiceErrorList(QueryProto.QueryMetaReque QueryProto.CommonMapTypeDataList queryServiceErrorDetail(QueryProto.QueryMetaRequest request) throws QueryException; + + QueryProto.QueryDetailResponse queryDetailData(QueryProto.QueryRequest request) + throws QueryException; } diff --git a/server/query/query-service/src/main/java/io/holoinsight/server/query/service/impl/DefaultQueryServiceImpl.java b/server/query/query-service/src/main/java/io/holoinsight/server/query/service/impl/DefaultQueryServiceImpl.java index 1e4445d33..876b6c3fb 100644 --- a/server/query/query-service/src/main/java/io/holoinsight/server/query/service/impl/DefaultQueryServiceImpl.java +++ b/server/query/query-service/src/main/java/io/holoinsight/server/query/service/impl/DefaultQueryServiceImpl.java @@ -37,9 +37,11 @@ import io.holoinsight.server.apm.common.utils.GsonUtils; import io.holoinsight.server.apm.engine.postcal.MetricDefine; import io.holoinsight.server.common.DurationUtil; +import io.holoinsight.server.common.J; import io.holoinsight.server.common.ProtoJsonUtils; import io.holoinsight.server.common.service.SuperCacheService; import io.holoinsight.server.extension.MetricStorage; +import io.holoinsight.server.extension.model.DetailResult; import io.holoinsight.server.extension.model.PqlParam; import io.holoinsight.server.extension.model.QueryMetricsParam; import io.holoinsight.server.extension.model.QueryParam; @@ -218,8 +220,7 @@ public QueryProto.QueryMetricsResponse queryMetrics(QueryProto.QueryMetricsReque } @Override - public QueryProto.QueryResponse pqlInstantQuery(QueryProto.PqlInstantRequest request) - throws QueryException { + public QueryProto.QueryResponse pqlInstantQuery(PqlInstantRequest request) throws QueryException { QueryProto.QueryResponse.Builder builder = QueryProto.QueryResponse.newBuilder(); List pqlResult = metricStorage.pqlInstantQuery(transToPqlParam(request)); QueryProto.Result.Builder resultBuilder = QueryProto.Result.newBuilder(); @@ -747,6 +748,26 @@ public QueryProto.CommonMapTypeDataList queryServiceErrorDetail( }, "queryServiceErrorDetail", request); } + @Override + public QueryProto.QueryDetailResponse queryDetailData(QueryProto.QueryRequest request) + throws QueryException { + return wrap(() -> { + List datasources = request.getDatasourcesList(); + Assert.notEmpty(datasources, "datasources are empty"); + String tenant = request.getTenant(); + + List rsps = new ArrayList<>(datasources.size()); + for (QueryProto.Datasource datasource : datasources) { + QueryProto.QueryDetailResponse.Builder queryResponseBuilder = + queryDetail(tenant, datasource); + rsps.add(queryResponseBuilder.build()); + } + List results = + rsps.stream().flatMap(rsp -> rsp.getResultsList().stream()).collect(Collectors.toList()); + return QueryProto.QueryDetailResponse.newBuilder().addAllResults(results).build(); + }, "queryDetailData", request); + } + private QueryProto.QueryResponse simpleQuery(QueryProto.QueryRequest request, String tenant, List datasources) throws QueryException { List rsps = new ArrayList<>(datasources.size()); @@ -838,7 +859,7 @@ private List calculate(String queryExpr, }).collect(Collectors.toList()); try { Double rpnResult = rpnResolver.calByInfix(rpnArgs); - QueryProto.Point.Builder pointBuilder = QueryProto.Point.newBuilder(); + Builder pointBuilder = QueryProto.Point.newBuilder(); pointBuilder.setTimestamp(timestamp).setValue(rpnResult); QueryProto.Point point = pointBuilder.build(); resultBuilder.addPoints(point); @@ -1022,18 +1043,16 @@ private Map listApmMetrics(String tenant) { private QueryProto.QueryResponse.Builder queryMetricStore(String tenant, QueryProto.Datasource datasource) { QueryParam param = QueryStorageUtils.convertToQueryParam(tenant, datasource); - List results = - metricStorage.queryData(param); + List results = metricStorage.queryData(param); QueryProto.QueryResponse.Builder builder = QueryProto.QueryResponse.newBuilder(); - for (io.holoinsight.server.extension.model.QueryResult.Result result : results) { + for (Result result : results) { QueryProto.Result.Builder resultBuilder = QueryProto.Result.newBuilder(); resultBuilder.setMetric( StringUtils.isNotEmpty(datasource.getName()) ? datasource.getName() : result.getMetric()) .putAllTags(result.getTags()); - for (io.holoinsight.server.extension.model.QueryResult.Point point : result.getPoints()) { - QueryProto.Point.Builder pointBuilder = - QueryProto.Point.newBuilder().setTimestamp(point.getTimestamp()); + for (Point point : result.getPoints()) { + Builder pointBuilder = QueryProto.Point.newBuilder().setTimestamp(point.getTimestamp()); if (point.getStrValue() != null) { pointBuilder.setStrValue(String.valueOf(point.getStrValue())); @@ -1054,14 +1073,56 @@ private QueryProto.QueryResponse.Builder queryMetricStore(String tenant, return builder; } + private QueryProto.QueryDetailResponse.Builder queryDetail(String tenant, + QueryProto.Datasource datasource) { + QueryParam param = QueryStorageUtils.convertToQueryParam(tenant, datasource); + DetailResult detailResult = metricStorage.queryDetail(param); + QueryProto.QueryDetailResponse.Builder builder = QueryProto.QueryDetailResponse.newBuilder(); + QueryProto.DetailResult.Builder detailResultBuilder = QueryProto.DetailResult.newBuilder(); + if (detailResult == null || detailResult.isEmpty()) { + log.info("detailResult is empty for {}", J.toJson(datasource)); + return builder; + } + detailResultBuilder.addAllHeaders(detailResult.getHeaders()) // + .addAllTables(detailResult.getTables()) // + .setSql(detailResult.getSql()); + for (DetailResult.DetailRow detailRow : detailResult.getPoints()) { + if (CollectionUtils.isEmpty(detailRow.getValues())) { + continue; + } + QueryProto.DetailRow.Builder resultBuilder = QueryProto.DetailRow.newBuilder(); + for (DetailResult.Value value : detailRow.getValues()) { + QueryProto.DetailValue.Builder valueBuilder = QueryProto.DetailValue.newBuilder(); + valueBuilder.setType(value.getType().name()); + switch (value.getType()) { + case String: + valueBuilder.setStrValue((String) value.getValue()); + break; + case Timestamp: + valueBuilder.setTimestampValue(((Number) value.getValue()).longValue()); + break; + case Double: + valueBuilder.setDoubleValue(((Number) value.getValue()).doubleValue()); + break; + case Boolean: + valueBuilder.setBoolValue((Boolean) value.getValue()); + break; + } + resultBuilder.addValues(valueBuilder.build()); + } + detailResultBuilder.addRows(resultBuilder.build()); + } + builder.addResults(detailResultBuilder.build()); + return builder; + } + private QueryProto.QueryResponse.Builder analysis(String tenant, QueryProto.Datasource datasource) { QueryParam queryParam = QueryStorageUtils.convertToQueryParam(tenant, datasource); queryParam.setAggregator("none"); - List results = - metricStorage.queryData(queryParam); + List results = metricStorage.queryData(queryParam); QueryProto.QueryResponse.Builder builder = QueryProto.QueryResponse.newBuilder(); Map, QueryProto.Result.Builder> tagsResults = new HashMap<>(); @@ -1102,8 +1163,8 @@ private QueryProto.QueryResponse.Builder analysis(String tenant, .setMetric(StringUtils.isNotEmpty(datasource.getName()) ? datasource.getName() : datasource.getMetric()) .putAllTags(tags)); - QueryProto.Point.Builder pointBuilder = QueryProto.Point.newBuilder() - .setTimestamp(timestamp).setStrValue(GsonUtils.toJson(vals.get().getRight())); + Builder pointBuilder = QueryProto.Point.newBuilder().setTimestamp(timestamp) + .setStrValue(GsonUtils.toJson(vals.get().getRight())); resultBuilder.addPoints(pointBuilder); }); }); @@ -1114,15 +1175,15 @@ private QueryProto.QueryResponse.Builder analysis(String tenant, private void fillData(QueryProto.QueryResponse.Builder rspBuilder, long start, long end, String downsample, String fillPolicy) { rspBuilder.getResultsBuilderList().forEach(resultBuilder -> { - List pointBuilders = resultBuilder.getPointsBuilderList(); - Map timePointMap = new TreeMap<>(pointBuilders.stream() - .collect(Collectors.toMap(QueryProto.Point.Builder::getTimestamp, Function.identity()))); + List pointBuilders = resultBuilder.getPointsBuilderList(); + Map timePointMap = new TreeMap<>(pointBuilders.stream() + .collect(Collectors.toMap(Builder::getTimestamp, Function.identity()))); long sample = DurationUtil.parse(downsample).toMillis(); for (long period = start % sample == 0 ? start : start / sample * sample + sample; period <= end; period += sample) { if (!timePointMap.containsKey(period)) { - QueryProto.Point.Builder builder = QueryProto.Point.newBuilder().setTimestamp(period); + Builder builder = QueryProto.Point.newBuilder().setTimestamp(period); Object filledVal = QueryStorageUtils.convertFillPolocy(fillPolicy); if (filledVal instanceof Number) { builder.setValue(((Number) filledVal).doubleValue()); @@ -1142,9 +1203,8 @@ protected List searchTags(String tenant, QueryProto.Datasourc try { List pbResults = new ArrayList<>(); QueryParam param = QueryStorageUtils.convertToQueryParam(tenant, datasource); - List results = - metricStorage.queryTags(param); - for (io.holoinsight.server.extension.model.QueryResult.Result result : results) { + List results = metricStorage.queryTags(param); + for (Result result : results) { pbResults.add(QueryStorageUtils.convertToPb(result)); } return pbResults;