From 5b0523b474dba4d4f473c8dd81410decce420f19 Mon Sep 17 00:00:00 2001 From: RemHero <1104304963@qq.com> Date: Wed, 11 Jan 2023 21:28:29 +0800 Subject: [PATCH 1/9] add the AddSchemaPrefix operator --- .../logical/generator/QueryGenerator.java | 36 ++++++++-- .../naive/NaiveOperatorMemoryExecutor.java | 28 ++++++++ .../stream/AddSchemaPrefixLazyStream.java | 65 +++++++++++++++++++ .../stream/StreamOperatorMemoryExecutor.java | 6 ++ .../shared/operator/AddSchemaPrefix.java | 26 ++++++++ .../shared/operator/type/OperatorType.java | 3 +- .../tsinghua/iginx/iotdb/IoTDBStorage.java | 4 +- .../tsinghua/iginx/iotdb/IoTDBStorage.java | 4 +- .../edu/tsinghua/iginx/utils/StringUtils.java | 2 +- 9 files changed, 162 insertions(+), 12 deletions(-) create mode 100644 core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/AddSchemaPrefixLazyStream.java create mode 100644 core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/operator/AddSchemaPrefix.java diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/generator/QueryGenerator.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/generator/QueryGenerator.java index f667e9beb..9ceb633e3 100644 --- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/generator/QueryGenerator.java +++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/generator/QueryGenerator.java @@ -327,8 +327,11 @@ private Operator mergeRawData(Map> fragments, L Operator operator = OperatorUtils.unionOperators(unionList); if (!dummyFragments.isEmpty()) { List joinList = new ArrayList<>(); - dummyFragments.forEach(meta -> joinList.add(new Project(new FragmentSource(meta), - pathMatchPrefix(pathList,meta.getTsInterval().getTimeSeries(), meta.getTsInterval().getSchemaPrefix()), tagFilter))); + dummyFragments.forEach(meta -> { + String schemaPrefix = meta.getTsInterval().getSchemaPrefix(); + joinList.add(new AddSchemaPrefix(new OperatorSource(new Project(new FragmentSource(meta), + pathMatchPrefix(pathList, meta.getTsInterval().getTimeSeries(), schemaPrefix), tagFilter)), schemaPrefix)); + }); joinList.add(operator); operator = OperatorUtils.joinOperatorsByTime(joinList); } @@ -346,13 +349,34 @@ private Pair>, List> getFragm return keyFromTSIntervalToTimeInterval(fragmentsByTSInterval); } + // 筛选出满足 dataPrefix前缀,并且去除 schemaPrefix private List pathMatchPrefix(List pathList, String prefix, String schemaPrefix) { - if (prefix == null) return pathList; - if (schemaPrefix != null) prefix = schemaPrefix + "." + prefix; // deal with the schemaPrefix + if (prefix == null && schemaPrefix == null) return pathList; List ans = new ArrayList<>(); + + if (prefix == null) { // deal with the schemaPrefix + for(String path : pathList) { + if (path.equals("*.*") || path.equals("*")) { + ans.add("*.*"); + } else if (path.indexOf(schemaPrefix) == 0) { + path = path.substring(schemaPrefix.length() + 1); + if (path.equals("*")) { + ans.add("*.*"); + } else { + ans.add(path); + } + } + } + return ans; + } +// if (schemaPrefix != null) prefix = schemaPrefix + "." + prefix; + for(String path : pathList) { - if (path.equals("*.*")) { - ans.add(path); + if (schemaPrefix != null && path.indexOf(schemaPrefix) == 0) { + path = path.substring(schemaPrefix.length() + 1); + } + if (path.equals("*.*") || path.equals("*")) { + ans.add(prefix + ".*"); } else if (path.charAt(path.length()-1) == '*' && path.length() != 1) { // 通配符匹配,例如 a.b.* String queryPrefix = path.substring(0,path.length()-2) + ".(.*)"; if (prefix.matches(queryPrefix)) { diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/naive/NaiveOperatorMemoryExecutor.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/naive/NaiveOperatorMemoryExecutor.java index 18f89ca47..ae81cb0ee 100644 --- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/naive/NaiveOperatorMemoryExecutor.java +++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/naive/NaiveOperatorMemoryExecutor.java @@ -79,6 +79,8 @@ public RowStream executeUnaryOperator(UnaryOperator operator, RowStream stream) return executeRename((Rename) operator, transformToTable(stream)); case Reorder: return executeReorder((Reorder) operator, transformToTable(stream)); + case AddSchemaPrefix: + return executeAddSchemaPrefix((AddSchemaPrefix) operator, transformToTable(stream)); default: throw new UnexpectedOperatorException("unknown unary operator: " + operator.getType()); } @@ -331,6 +333,32 @@ private RowStream executeRename(Rename rename, Table table) throws PhysicalExcep return new Table(newHeader, rows); } + private RowStream executeAddSchemaPrefix(AddSchemaPrefix addSchemaPrefix, Table table) throws PhysicalException { + Header header = table.getHeader(); + String schemaPrefix = addSchemaPrefix.getSchemaPrefix(); + + List fields = new ArrayList<>(); + header.getFields().forEach(field -> { + if (schemaPrefix != null) + fields.add(new Field(schemaPrefix + "." + field.getFullName(), field.getType(), field.getTags())); + else + fields.add(new Field(field.getFullName(), field.getType(), field.getTags())); + }); + + Header newHeader = new Header(header.getKey(), fields); + + List rows = new ArrayList<>(); + table.getRows().forEach(row -> { + if (newHeader.hasKey()) { + rows.add(new Row(newHeader, row.getKey(), row.getValues())); + } else { + rows.add(new Row(newHeader, row.getValues())); + } + }); + + return new Table(newHeader, rows); + } + private RowStream executeReorder(Reorder reorder, Table table) throws PhysicalException { List patterns = reorder.getPatterns(); Header header = table.getHeader(); diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/AddSchemaPrefixLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/AddSchemaPrefixLazyStream.java new file mode 100644 index 000000000..a53aee97f --- /dev/null +++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/AddSchemaPrefixLazyStream.java @@ -0,0 +1,65 @@ +package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream; + +import cn.edu.tsinghua.iginx.engine.physical.exception.PhysicalException; +import cn.edu.tsinghua.iginx.engine.shared.data.read.Field; +import cn.edu.tsinghua.iginx.engine.shared.data.read.Header; +import cn.edu.tsinghua.iginx.engine.shared.data.read.Row; +import cn.edu.tsinghua.iginx.engine.shared.data.read.RowStream; +import cn.edu.tsinghua.iginx.engine.shared.operator.AddSchemaPrefix; +import cn.edu.tsinghua.iginx.engine.shared.operator.Rename; +import cn.edu.tsinghua.iginx.utils.StringUtils; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.regex.Pattern; + +public class AddSchemaPrefixLazyStream extends UnaryLazyStream { + + private final AddSchemaPrefix addSchemaPrefix; + + private Header header; + + public AddSchemaPrefixLazyStream(AddSchemaPrefix addSchemaPrefix, RowStream stream) { + super(stream); + this.addSchemaPrefix = addSchemaPrefix; + } + + @Override + public Header getHeader() throws PhysicalException { + if (header == null) { + Header header = stream.getHeader(); + String schemaPrefix = addSchemaPrefix.getSchemaPrefix(); + + List fields = new ArrayList<>(); + header.getFields().forEach(field -> { + if (schemaPrefix != null) + fields.add(new Field(schemaPrefix + "." + field.getFullName(), field.getType(), field.getTags())); + else + fields.add(new Field(field.getFullName(), field.getType(), field.getTags())); + }); + + this.header = new Header(header.getKey(), fields); + } + return header; + } + + @Override + public boolean hasNext() throws PhysicalException { + return stream.hasNext(); + } + + @Override + public Row next() throws PhysicalException { + if (!hasNext()) { + throw new IllegalStateException("row stream doesn't have more data!"); + } + + Row row = stream.next(); + if (header.hasKey()) { + return new Row(header, row.getKey(), row.getValues()); + } else { + return new Row(header, row.getValues()); + } + } +} diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/StreamOperatorMemoryExecutor.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/StreamOperatorMemoryExecutor.java index 70125a875..29d179744 100644 --- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/StreamOperatorMemoryExecutor.java +++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/StreamOperatorMemoryExecutor.java @@ -59,6 +59,8 @@ public RowStream executeUnaryOperator(UnaryOperator operator, RowStream stream) return executeRename((Rename) operator, stream); case Reorder: return executeReorder((Reorder) operator, stream); + case AddSchemaPrefix: + return executeAddSchemaPrefix((AddSchemaPrefix) operator, stream); default: throw new UnexpectedOperatorException("unknown unary operator: " + operator.getType()); } @@ -128,6 +130,10 @@ private RowStream executeReorder(Reorder reorder, RowStream stream) { return new ReorderLazyStream(reorder, stream); } + private RowStream executeAddSchemaPrefix(AddSchemaPrefix addSchemaPrefix, RowStream stream) { + return new AddSchemaPrefixLazyStream(addSchemaPrefix, stream); + } + private RowStream executeJoin(Join join, RowStream streamA, RowStream streamB) throws PhysicalException { if (!join.getJoinBy().equals(Constants.KEY) && !join.getJoinBy().equals(Constants.ORDINAL)) { throw new InvalidOperatorParameterException("join operator is not support for field " + join.getJoinBy() + " except for " + Constants.KEY diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/operator/AddSchemaPrefix.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/operator/AddSchemaPrefix.java new file mode 100644 index 000000000..451b8796a --- /dev/null +++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/operator/AddSchemaPrefix.java @@ -0,0 +1,26 @@ +package cn.edu.tsinghua.iginx.engine.shared.operator; + +import cn.edu.tsinghua.iginx.engine.shared.operator.type.OperatorType; +import cn.edu.tsinghua.iginx.engine.shared.source.Source; + +import java.util.ArrayList; +import java.util.List; + +public class AddSchemaPrefix extends AbstractUnaryOperator { + + private final String schemaPrefix;// 可以为 null + + public AddSchemaPrefix(Source source, String schemaPrefix) { + super(OperatorType.AddSchemaPrefix, source); + this.schemaPrefix = schemaPrefix; + } + + @Override + public Operator copy() { + return new AddSchemaPrefix(getSource().copy(), schemaPrefix); + } + + public String getSchemaPrefix() { + return schemaPrefix; + } +} diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/operator/type/OperatorType.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/operator/type/OperatorType.java index 5601c82af..f4f947ad9 100644 --- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/operator/type/OperatorType.java +++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/operator/type/OperatorType.java @@ -41,6 +41,7 @@ public enum OperatorType { Rename, Reorder, + AddSchemaPrefix, Delete, Insert, @@ -55,7 +56,7 @@ public static boolean isBinaryOperator(OperatorType op) { } public static boolean isUnaryOperator(OperatorType op) { - return op == Project || op == Select || op == Sort || op == Limit || op == Downsample || op == RowTransform || op == SetTransform || op == MappingTransform || op == Delete || op == Insert || op == Rename || op == Reorder; + return op == Project || op == Select || op == Sort || op == Limit || op == Downsample || op == RowTransform || op == SetTransform || op == MappingTransform || op == Delete || op == Insert || op == Rename || op == Reorder || op == AddSchemaPrefix; } public static boolean isMultipleOperator(OperatorType op) { diff --git a/dataSources/iotdb11/src/main/java/cn/edu/tsinghua/iginx/iotdb/IoTDBStorage.java b/dataSources/iotdb11/src/main/java/cn/edu/tsinghua/iginx/iotdb/IoTDBStorage.java index 3cb556d84..df9200a0f 100644 --- a/dataSources/iotdb11/src/main/java/cn/edu/tsinghua/iginx/iotdb/IoTDBStorage.java +++ b/dataSources/iotdb11/src/main/java/cn/edu/tsinghua/iginx/iotdb/IoTDBStorage.java @@ -319,12 +319,12 @@ private TaskExecuteResult executeQueryHistoryTask(TimeSeriesRange timeSeriesInte try { StringBuilder builder = new StringBuilder(); for (String path : project.getPatterns()) { - builder.append(getRealPathWithoutPrefix(path, timeSeriesInterval.getSchemaPrefix())); + builder.append(path); builder.append(','); } String statement = String.format(QUERY_HISTORY_DATA, builder.deleteCharAt(builder.length() - 1).toString(), FilterTransformer.toString(filter)); logger.info("[Query] execute query: " + statement); - RowStream rowStream = new ClearEmptyRowStreamWrapper(new IoTDBQueryRowStream(sessionPool.executeQueryStatement(statement), false, project, timeSeriesInterval.getSchemaPrefix())); + RowStream rowStream = new ClearEmptyRowStreamWrapper(new IoTDBQueryRowStream(sessionPool.executeQueryStatement(statement), false, project, null)); return new TaskExecuteResult(rowStream); } catch (IoTDBConnectionException | StatementExecutionException e) { logger.error(e.getMessage()); diff --git a/dataSources/iotdb12/src/main/java/cn/edu/tsinghua/iginx/iotdb/IoTDBStorage.java b/dataSources/iotdb12/src/main/java/cn/edu/tsinghua/iginx/iotdb/IoTDBStorage.java index 662ba616e..d1eed5c5f 100644 --- a/dataSources/iotdb12/src/main/java/cn/edu/tsinghua/iginx/iotdb/IoTDBStorage.java +++ b/dataSources/iotdb12/src/main/java/cn/edu/tsinghua/iginx/iotdb/IoTDBStorage.java @@ -317,12 +317,12 @@ private TaskExecuteResult executeQueryHistoryTask(TimeSeriesRange timeSeriesInte try { StringBuilder builder = new StringBuilder(); for (String path : project.getPatterns()) { - builder.append(getRealPathWithoutPrefix(path, timeSeriesInterval.getSchemaPrefix())); + builder.append(path); builder.append(','); } String statement = String.format(QUERY_HISTORY_DATA, builder.deleteCharAt(builder.length() - 1).toString(), FilterTransformer.toString(filter)); logger.info("[Query] execute query: " + statement); - RowStream rowStream = new ClearEmptyRowStreamWrapper(new IoTDBQueryRowStream(sessionPool.executeQueryStatement(statement), false, project, timeSeriesInterval.getSchemaPrefix())); + RowStream rowStream = new ClearEmptyRowStreamWrapper(new IoTDBQueryRowStream(sessionPool.executeQueryStatement(statement), false, project, null)); return new TaskExecuteResult(rowStream); } catch (IoTDBConnectionException | StatementExecutionException e) { logger.error(e.getMessage()); diff --git a/shared/src/main/java/cn/edu/tsinghua/iginx/utils/StringUtils.java b/shared/src/main/java/cn/edu/tsinghua/iginx/utils/StringUtils.java index 9d00e256a..d56c7917a 100644 --- a/shared/src/main/java/cn/edu/tsinghua/iginx/utils/StringUtils.java +++ b/shared/src/main/java/cn/edu/tsinghua/iginx/utils/StringUtils.java @@ -55,7 +55,7 @@ public static int compare(String ts, String border, boolean isStart) { * @param border 前缀式时间范围 */ public static int compare(String ts, String border) { - if (ts.indexOf(border) == 0) { + if (ts.indexOf(border) == 0 || ts.equals("*.*")) { return 0; } else From e336857ec4c22303924cddf366f04c79a26c28d3 Mon Sep 17 00:00:00 2001 From: RemHero <1104304963@qq.com> Date: Thu, 12 Jan 2023 15:29:06 +0800 Subject: [PATCH 2/9] delete some useless code --- .../edu/tsinghua/iginx/influxdb/InfluxDBStorage.java | 11 ++--------- .../query/entity/InfluxDBHistoryQueryRowStream.java | 7 ++----- .../iginx/influxdb/tools/SchemaTransformer.java | 8 -------- .../cn/edu/tsinghua/iginx/iotdb/IoTDBStorage.java | 2 +- .../iginx/iotdb/query/entity/IoTDBQueryRowStream.java | 6 +----- .../cn/edu/tsinghua/iginx/iotdb/IoTDBStorage.java | 2 +- .../iginx/iotdb/query/entity/IoTDBQueryRowStream.java | 6 +----- 7 files changed, 8 insertions(+), 34 deletions(-) diff --git a/dataSources/influxdb/src/main/java/cn/edu/tsinghua/iginx/influxdb/InfluxDBStorage.java b/dataSources/influxdb/src/main/java/cn/edu/tsinghua/iginx/influxdb/InfluxDBStorage.java index b435935f5..5ab00fa0b 100644 --- a/dataSources/influxdb/src/main/java/cn/edu/tsinghua/iginx/influxdb/InfluxDBStorage.java +++ b/dataSources/influxdb/src/main/java/cn/edu/tsinghua/iginx/influxdb/InfluxDBStorage.java @@ -236,18 +236,11 @@ public TaskExecuteResult execute(StoragePhysicalTask task) { return new TaskExecuteResult(new NonExecutablePhysicalTaskException("unsupported physical task")); } - private String getRealPathWithoutPrefix(String oriPath, String prefix) { - if (prefix != null && !prefix.isEmpty() && oriPath.contains(prefix)) { - return oriPath.substring(oriPath.indexOf(prefix) + prefix.length() + 1); - } - return oriPath; - } - private TaskExecuteResult executeHistoryProjectTask(TimeSeriesRange timeSeriesInterval, TimeInterval timeInterval, Project project) { Map bucketQueries = new HashMap<>(); TagFilter tagFilter = project.getTagFilter(); for (String pattern: project.getPatterns()) { - Pair pair = SchemaTransformer.processPatternForQuery(getRealPathWithoutPrefix(pattern, timeSeriesInterval.getSchemaPrefix()), tagFilter); + Pair pair = SchemaTransformer.processPatternForQuery(pattern, tagFilter); String bucketName = pair.k; String query = pair.v; String fullQuery = ""; @@ -276,7 +269,7 @@ private TaskExecuteResult executeHistoryProjectTask(TimeSeriesRange timeSeriesIn bucketQueryResults.put(bucket, client.getQueryApi().query(statement, organization.getId())); } - InfluxDBHistoryQueryRowStream rowStream = new InfluxDBHistoryQueryRowStream(bucketQueryResults, project.getPatterns(), timeSeriesInterval.getSchemaPrefix()); + InfluxDBHistoryQueryRowStream rowStream = new InfluxDBHistoryQueryRowStream(bucketQueryResults, project.getPatterns()); return new TaskExecuteResult(rowStream); } diff --git a/dataSources/influxdb/src/main/java/cn/edu/tsinghua/iginx/influxdb/query/entity/InfluxDBHistoryQueryRowStream.java b/dataSources/influxdb/src/main/java/cn/edu/tsinghua/iginx/influxdb/query/entity/InfluxDBHistoryQueryRowStream.java index 9c5946977..aaeba745a 100644 --- a/dataSources/influxdb/src/main/java/cn/edu/tsinghua/iginx/influxdb/query/entity/InfluxDBHistoryQueryRowStream.java +++ b/dataSources/influxdb/src/main/java/cn/edu/tsinghua/iginx/influxdb/query/entity/InfluxDBHistoryQueryRowStream.java @@ -45,11 +45,8 @@ public class InfluxDBHistoryQueryRowStream implements RowStream { private int hasMoreRecords; private int size; - public InfluxDBHistoryQueryRowStream(Map> bucketQueryResults, List patterns) { - this(bucketQueryResults, patterns, null); - } - public InfluxDBHistoryQueryRowStream(Map> bucketQueryResults, List patterns, String prefix) { + public InfluxDBHistoryQueryRowStream(Map> bucketQueryResults, List patterns) { this.bucketQueryResults = new ArrayList<>(bucketQueryResults.entrySet()); this.indexList = new ArrayList<>(); List fields = new ArrayList<>(); @@ -58,7 +55,7 @@ public InfluxDBHistoryQueryRowStream(Map> bucketQueryRes List tables = this.bucketQueryResults.get(i).getValue(); this.indexList.add(new int[tables.size()]); for (FluxTable table: tables) { - fields.add(SchemaTransformer.toField(bucket, table, prefix)); + fields.add(SchemaTransformer.toField(bucket, table)); this.hasMoreRecords++; this.size++; } diff --git a/dataSources/influxdb/src/main/java/cn/edu/tsinghua/iginx/influxdb/tools/SchemaTransformer.java b/dataSources/influxdb/src/main/java/cn/edu/tsinghua/iginx/influxdb/tools/SchemaTransformer.java index dd7d59ed0..2c6026646 100644 --- a/dataSources/influxdb/src/main/java/cn/edu/tsinghua/iginx/influxdb/tools/SchemaTransformer.java +++ b/dataSources/influxdb/src/main/java/cn/edu/tsinghua/iginx/influxdb/tools/SchemaTransformer.java @@ -17,10 +17,6 @@ public class SchemaTransformer { public static Field toField(String bucket, FluxTable table) { - return toField(bucket, table, null); - } - - public static Field toField(String bucket, FluxTable table, String prefix) { FluxRecord record = table.getRecords().get(0); String measurement = record.getMeasurement(); String field = record.getField(); @@ -36,10 +32,6 @@ public static Field toField(String bucket, FluxTable table, String prefix) { DataType dataType = fromInfluxDB(table.getColumns().stream().filter(x -> x.getLabel().equals("_value")).collect(Collectors.toList()).get(0).getDataType()); StringBuilder pathBuilder = new StringBuilder(); - if (prefix != null) { - pathBuilder.append(prefix); - pathBuilder.append('.'); - } pathBuilder.append(bucket); pathBuilder.append('.'); pathBuilder.append(measurement); diff --git a/dataSources/iotdb11/src/main/java/cn/edu/tsinghua/iginx/iotdb/IoTDBStorage.java b/dataSources/iotdb11/src/main/java/cn/edu/tsinghua/iginx/iotdb/IoTDBStorage.java index df9200a0f..6bbfe5797 100644 --- a/dataSources/iotdb11/src/main/java/cn/edu/tsinghua/iginx/iotdb/IoTDBStorage.java +++ b/dataSources/iotdb11/src/main/java/cn/edu/tsinghua/iginx/iotdb/IoTDBStorage.java @@ -324,7 +324,7 @@ private TaskExecuteResult executeQueryHistoryTask(TimeSeriesRange timeSeriesInte } String statement = String.format(QUERY_HISTORY_DATA, builder.deleteCharAt(builder.length() - 1).toString(), FilterTransformer.toString(filter)); logger.info("[Query] execute query: " + statement); - RowStream rowStream = new ClearEmptyRowStreamWrapper(new IoTDBQueryRowStream(sessionPool.executeQueryStatement(statement), false, project, null)); + RowStream rowStream = new ClearEmptyRowStreamWrapper(new IoTDBQueryRowStream(sessionPool.executeQueryStatement(statement), false, project)); return new TaskExecuteResult(rowStream); } catch (IoTDBConnectionException | StatementExecutionException e) { logger.error(e.getMessage()); diff --git a/dataSources/iotdb11/src/main/java/cn/edu/tsinghua/iginx/iotdb/query/entity/IoTDBQueryRowStream.java b/dataSources/iotdb11/src/main/java/cn/edu/tsinghua/iginx/iotdb/query/entity/IoTDBQueryRowStream.java index 3ca8ec9ca..6c07bb8be 100644 --- a/dataSources/iotdb11/src/main/java/cn/edu/tsinghua/iginx/iotdb/query/entity/IoTDBQueryRowStream.java +++ b/dataSources/iotdb11/src/main/java/cn/edu/tsinghua/iginx/iotdb/query/entity/IoTDBQueryRowStream.java @@ -66,10 +66,6 @@ enum State { private State state; public IoTDBQueryRowStream(SessionDataSetWrapper dataset, boolean trimStorageUnit, Project project) { - this(dataset, trimStorageUnit, project, null); - } - - public IoTDBQueryRowStream(SessionDataSetWrapper dataset, boolean trimStorageUnit, Project project, String prefix) { this.dataset = dataset; this.trimStorageUnit = trimStorageUnit; this.filterByTags = project.getTagFilter() != null; @@ -91,7 +87,7 @@ public IoTDBQueryRowStream(SessionDataSetWrapper dataset, boolean trimStorageUni } name = transformColumnName(name); Pair> pair = TagKVUtils.splitFullName(name); - Field field = new Field(prefix==null? pair.getK() : prefix + "." + pair.getK(), DataTypeTransformer.fromIoTDB(type), pair.getV()); + Field field = new Field(pair.getK(), DataTypeTransformer.fromIoTDB(type), pair.getV()); if (!this.trimStorageUnit && field.getFullName().startsWith(UNIT)) { filterList.add(true); continue; diff --git a/dataSources/iotdb12/src/main/java/cn/edu/tsinghua/iginx/iotdb/IoTDBStorage.java b/dataSources/iotdb12/src/main/java/cn/edu/tsinghua/iginx/iotdb/IoTDBStorage.java index d1eed5c5f..2ac494f5e 100644 --- a/dataSources/iotdb12/src/main/java/cn/edu/tsinghua/iginx/iotdb/IoTDBStorage.java +++ b/dataSources/iotdb12/src/main/java/cn/edu/tsinghua/iginx/iotdb/IoTDBStorage.java @@ -322,7 +322,7 @@ private TaskExecuteResult executeQueryHistoryTask(TimeSeriesRange timeSeriesInte } String statement = String.format(QUERY_HISTORY_DATA, builder.deleteCharAt(builder.length() - 1).toString(), FilterTransformer.toString(filter)); logger.info("[Query] execute query: " + statement); - RowStream rowStream = new ClearEmptyRowStreamWrapper(new IoTDBQueryRowStream(sessionPool.executeQueryStatement(statement), false, project, null)); + RowStream rowStream = new ClearEmptyRowStreamWrapper(new IoTDBQueryRowStream(sessionPool.executeQueryStatement(statement), false, project)); return new TaskExecuteResult(rowStream); } catch (IoTDBConnectionException | StatementExecutionException e) { logger.error(e.getMessage()); diff --git a/dataSources/iotdb12/src/main/java/cn/edu/tsinghua/iginx/iotdb/query/entity/IoTDBQueryRowStream.java b/dataSources/iotdb12/src/main/java/cn/edu/tsinghua/iginx/iotdb/query/entity/IoTDBQueryRowStream.java index 28a154a75..e8caf6aed 100644 --- a/dataSources/iotdb12/src/main/java/cn/edu/tsinghua/iginx/iotdb/query/entity/IoTDBQueryRowStream.java +++ b/dataSources/iotdb12/src/main/java/cn/edu/tsinghua/iginx/iotdb/query/entity/IoTDBQueryRowStream.java @@ -65,10 +65,6 @@ enum State { private State state; public IoTDBQueryRowStream(SessionDataSetWrapper dataset, boolean trimStorageUnit, Project project) { - this(dataset, trimStorageUnit, project, null); - } - - public IoTDBQueryRowStream(SessionDataSetWrapper dataset, boolean trimStorageUnit, Project project, String prefix) { this.dataset = dataset; this.trimStorageUnit = trimStorageUnit; this.filterByTags = project.getTagFilter() != null; @@ -90,7 +86,7 @@ public IoTDBQueryRowStream(SessionDataSetWrapper dataset, boolean trimStorageUni } name = transformColumnName(name); Pair> pair = TagKVUtils.splitFullName(name); - Field field = new Field(prefix==null? pair.getK() : prefix + "." + pair.getK(), DataTypeTransformer.strFromIoTDB(type), pair.getV()); + Field field = new Field(pair.getK(), DataTypeTransformer.strFromIoTDB(type), pair.getV()); if (!this.trimStorageUnit && field.getFullName().startsWith(UNIT)) { filterList.add(true); continue; From e517edeba53b096c3471e5e4cb24d846e32582a6 Mon Sep 17 00:00:00 2001 From: RemHero <1104304963@qq.com> Date: Fri, 13 Jan 2023 10:49:20 +0800 Subject: [PATCH 3/9] fix some problems --- .../memory/execute/naive/NaiveOperatorMemoryExecutor.java | 4 ++-- .../memory/execute/stream/AddSchemaPrefixLazyStream.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/naive/NaiveOperatorMemoryExecutor.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/naive/NaiveOperatorMemoryExecutor.java index ae81cb0ee..95d1887d0 100644 --- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/naive/NaiveOperatorMemoryExecutor.java +++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/naive/NaiveOperatorMemoryExecutor.java @@ -340,9 +340,9 @@ private RowStream executeAddSchemaPrefix(AddSchemaPrefix addSchemaPrefix, Table List fields = new ArrayList<>(); header.getFields().forEach(field -> { if (schemaPrefix != null) - fields.add(new Field(schemaPrefix + "." + field.getFullName(), field.getType(), field.getTags())); + fields.add(new Field(schemaPrefix + "." + field.getName(), field.getType(), field.getTags())); else - fields.add(new Field(field.getFullName(), field.getType(), field.getTags())); + fields.add(new Field(field.getName(), field.getType(), field.getTags())); }); Header newHeader = new Header(header.getKey(), fields); diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/AddSchemaPrefixLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/AddSchemaPrefixLazyStream.java index a53aee97f..02d18b291 100644 --- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/AddSchemaPrefixLazyStream.java +++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/AddSchemaPrefixLazyStream.java @@ -34,9 +34,9 @@ public Header getHeader() throws PhysicalException { List fields = new ArrayList<>(); header.getFields().forEach(field -> { if (schemaPrefix != null) - fields.add(new Field(schemaPrefix + "." + field.getFullName(), field.getType(), field.getTags())); + fields.add(new Field(schemaPrefix + "." + field.getName(), field.getType(), field.getTags())); else - fields.add(new Field(field.getFullName(), field.getType(), field.getTags())); + fields.add(new Field(field.getName(), field.getType(), field.getTags())); }); this.header = new Header(header.getKey(), fields); From 9c405240f2f80f092e90787fa6bc232abc60f192 Mon Sep 17 00:00:00 2001 From: RemHero <1104304963@qq.com> Date: Fri, 13 Jan 2023 13:55:41 +0800 Subject: [PATCH 4/9] remove the parquet original schemaPrefix --- .../iginx/parquet/ParquetStorage.java | 3 +-- .../parquet/entity/ParquetQueryRowStream.java | 17 +-------------- .../tsinghua/iginx/parquet/exec/Executor.java | 2 +- .../iginx/parquet/exec/LocalExecutor.java | 21 +++++-------------- .../iginx/parquet/exec/RemoteExecutor.java | 5 +---- .../iginx/parquet/server/ParquetWorker.java | 3 +-- thrift/src/main/proto/parquet.thrift | 1 - 7 files changed, 10 insertions(+), 42 deletions(-) diff --git a/dataSources/parquet/src/main/java/cn/edu/tsinghua/iginx/parquet/ParquetStorage.java b/dataSources/parquet/src/main/java/cn/edu/tsinghua/iginx/parquet/ParquetStorage.java index c69d362a8..2db32a9fc 100644 --- a/dataSources/parquet/src/main/java/cn/edu/tsinghua/iginx/parquet/ParquetStorage.java +++ b/dataSources/parquet/src/main/java/cn/edu/tsinghua/iginx/parquet/ParquetStorage.java @@ -138,8 +138,7 @@ public TaskExecuteResult execute(StoragePhysicalTask task) { project.getTagFilter(), FilterTransformer.toString(filter), storageUnit, - isDummyStorageUnit, - task.getTargetFragment().getTsInterval().getSchemaPrefix()); + isDummyStorageUnit); } else if (op.getType() == OperatorType.Insert) { Insert insert = (Insert) op; return executor.executeInsertTask( diff --git a/dataSources/parquet/src/main/java/cn/edu/tsinghua/iginx/parquet/entity/ParquetQueryRowStream.java b/dataSources/parquet/src/main/java/cn/edu/tsinghua/iginx/parquet/entity/ParquetQueryRowStream.java index fedaecba1..b1c854fa7 100644 --- a/dataSources/parquet/src/main/java/cn/edu/tsinghua/iginx/parquet/entity/ParquetQueryRowStream.java +++ b/dataSources/parquet/src/main/java/cn/edu/tsinghua/iginx/parquet/entity/ParquetQueryRowStream.java @@ -39,17 +39,10 @@ public class ParquetQueryRowStream implements RowStream { private boolean hasNextCache = false; - private final String schemaPrefix; - private final Map physicalNameCache = new HashMap<>(); public ParquetQueryRowStream(ResultSet rs, TagFilter tagFilter) { - this(rs, tagFilter, ""); - } - - public ParquetQueryRowStream(ResultSet rs, TagFilter tagFilter, String schemaPrefix) { this.rs = rs; - this.schemaPrefix = schemaPrefix; if (rs == null) { this.header = new Header(Field.KEY, Collections.emptyList()); @@ -72,12 +65,7 @@ public ParquetQueryRowStream(ResultSet rs, TagFilter tagFilter, String schemaPre Pair> pair = TagKVUtils.splitFullName(pathName); DataType type = fromParquetDataType(rsMetaData.getColumnTypeName(i)); - Field field; - if (schemaPrefix.equals("")) { - field = new Field(pair.getK(), type, pair.getV()); - } else { - field = new Field(schemaPrefix + "." + pair.getK(), type, pair.getV()); - } + Field field = new Field(pair.getK(), type, pair.getV()); if (filterByTags && !TagKVUtils.match(pair.v, tagFilter)) { continue; @@ -168,9 +156,6 @@ private String getPhysicalPath(Field field) { return physicalNameCache.get(field); } else { String name = field.getName(); - if (!schemaPrefix.equals("")) { - name = name.substring(name.indexOf(schemaPrefix) + schemaPrefix.length() + 1); - } String path = TagKVUtils.toFullName(name, field.getTags()); path = path.replaceAll(IGINX_SEPARATOR, PARQUET_SEPARATOR); physicalNameCache.put(field, path); diff --git a/dataSources/parquet/src/main/java/cn/edu/tsinghua/iginx/parquet/exec/Executor.java b/dataSources/parquet/src/main/java/cn/edu/tsinghua/iginx/parquet/exec/Executor.java index af036f093..7f3d47250 100644 --- a/dataSources/parquet/src/main/java/cn/edu/tsinghua/iginx/parquet/exec/Executor.java +++ b/dataSources/parquet/src/main/java/cn/edu/tsinghua/iginx/parquet/exec/Executor.java @@ -15,7 +15,7 @@ public interface Executor { TaskExecuteResult executeProjectTask(List paths, TagFilter tagFilter, String filter, - String storageUnit, boolean isDummyStorageUnit, String schemaPrefix); + String storageUnit, boolean isDummyStorageUnit); TaskExecuteResult executeInsertTask(DataView dataView, String storageUnit); diff --git a/dataSources/parquet/src/main/java/cn/edu/tsinghua/iginx/parquet/exec/LocalExecutor.java b/dataSources/parquet/src/main/java/cn/edu/tsinghua/iginx/parquet/exec/LocalExecutor.java index 208673fd5..2f111710e 100644 --- a/dataSources/parquet/src/main/java/cn/edu/tsinghua/iginx/parquet/exec/LocalExecutor.java +++ b/dataSources/parquet/src/main/java/cn/edu/tsinghua/iginx/parquet/exec/LocalExecutor.java @@ -110,7 +110,7 @@ public LocalExecutor(ParquetStoragePolicy policy, Connection connection, String @Override public TaskExecuteResult executeProjectTask(List paths, TagFilter tagFilter, - String filter, String storageUnit, boolean isDummyStorageUnit, String schemaPrefix) { + String filter, String storageUnit, boolean isDummyStorageUnit) { try { createDUDirectoryIfNotExists(storageUnit); } catch (PhysicalException e) { @@ -118,7 +118,7 @@ public TaskExecuteResult executeProjectTask(List paths, TagFilter tagFil } if (isDummyStorageUnit) { - return executeDummyProjectTask(paths, tagFilter, filter, storageUnit, schemaPrefix); + return executeDummyProjectTask(paths, tagFilter, filter, storageUnit); } try { @@ -154,22 +154,11 @@ public TaskExecuteResult executeProjectTask(List paths, TagFilter tagFil } private TaskExecuteResult executeDummyProjectTask(List paths, TagFilter tagFilter, - String filter, String storageUnit, String schemaPrefix) { + String filter, String storageUnit) { try { Connection conn = ((DuckDBConnection) connection).duplicate(); Statement stmt = conn.createStatement(); - - // trim prefix - List pathList = new ArrayList<>(); - if (schemaPrefix != null && !schemaPrefix.equals("")) { - for (String path : paths) { - if (path.contains(schemaPrefix)) { - pathList.add(path.substring(path.indexOf(schemaPrefix) + schemaPrefix.length() + 1)); - } else if (path.equals("*")) { - pathList.add(path); - } - } - } + List pathList = new ArrayList<>(paths); pathList = determinePathListWithTagFilter(storageUnit, pathList, tagFilter, true); if (pathList.isEmpty()) { @@ -192,7 +181,7 @@ private TaskExecuteResult executeDummyProjectTask(List paths, TagFilter conn.close(); RowStream rowStream = new ClearEmptyRowStreamWrapper( - new MergeTimeRowStreamWrapper(new ParquetQueryRowStream(rs, tagFilter, schemaPrefix))); + new MergeTimeRowStreamWrapper(new ParquetQueryRowStream(rs, tagFilter))); return new TaskExecuteResult(rowStream); } catch (SQLException | PhysicalException e) { logger.error(e.getMessage()); diff --git a/dataSources/parquet/src/main/java/cn/edu/tsinghua/iginx/parquet/exec/RemoteExecutor.java b/dataSources/parquet/src/main/java/cn/edu/tsinghua/iginx/parquet/exec/RemoteExecutor.java index 3b65a1698..fa424868d 100644 --- a/dataSources/parquet/src/main/java/cn/edu/tsinghua/iginx/parquet/exec/RemoteExecutor.java +++ b/dataSources/parquet/src/main/java/cn/edu/tsinghua/iginx/parquet/exec/RemoteExecutor.java @@ -74,7 +74,7 @@ public RemoteExecutor(String ip, int port) throws TTransportException { @Override public TaskExecuteResult executeProjectTask(List paths, TagFilter tagFilter, - String filter, String storageUnit, boolean isDummyStorageUnit, String schemaPrefix) { + String filter, String storageUnit, boolean isDummyStorageUnit) { ProjectReq req = new ProjectReq(storageUnit, isDummyStorageUnit, paths); if (tagFilter != null) { req.setTagFilter(constructRawTagFilter(tagFilter)); @@ -82,9 +82,6 @@ public TaskExecuteResult executeProjectTask(List paths, TagFilter tagFil if (filter != null && !filter.equals("")) { req.setFilter(filter); } - if (schemaPrefix != null && !schemaPrefix.equals("")) { - req.setSchemaPrefix(schemaPrefix); - } try { ProjectResp resp = client.executeProject(req); diff --git a/dataSources/parquet/src/main/java/cn/edu/tsinghua/iginx/parquet/server/ParquetWorker.java b/dataSources/parquet/src/main/java/cn/edu/tsinghua/iginx/parquet/server/ParquetWorker.java index 9a20f6759..183f56697 100644 --- a/dataSources/parquet/src/main/java/cn/edu/tsinghua/iginx/parquet/server/ParquetWorker.java +++ b/dataSources/parquet/src/main/java/cn/edu/tsinghua/iginx/parquet/server/ParquetWorker.java @@ -82,8 +82,7 @@ public ProjectResp executeProject(ProjectReq req) throws TException { tagFilter, req.getFilter(), req.getStorageUnit(), - req.isDummyStorageUnit, - req.getSchemaPrefix()); + req.isDummyStorageUnit); if (result.getException() != null || result.getRowStream() == null) { return new ProjectResp(EXEC_PROJECT_FAIL); diff --git a/thrift/src/main/proto/parquet.thrift b/thrift/src/main/proto/parquet.thrift index 93dc73669..b5442ec12 100644 --- a/thrift/src/main/proto/parquet.thrift +++ b/thrift/src/main/proto/parquet.thrift @@ -28,7 +28,6 @@ struct ProjectReq { 3: required list paths 4: optional RawTagFilter tagFilter 5: optional string filter - 6: optional string schemaPrefix } struct ParquetHeader { From 66d210e8d0437cdb616c92907053294f84472655 Mon Sep 17 00:00:00 2001 From: RemHero <1104304963@qq.com> Date: Fri, 13 Jan 2023 14:48:08 +0800 Subject: [PATCH 5/9] fix the pathMatchPrefix() in QueryGenerator --- .github/workflows/api-rest.yml | 196 ++--- .github/workflows/capacity-expansion.yml | 590 +++++++------- .github/workflows/codeql-analysis.yml | 140 ++-- .github/workflows/ds-influxdb.yml | 408 +++++----- .github/workflows/ds-iotdb.yml | 476 +++++------ .github/workflows/ds-parquet.yml | 258 +++--- .github/workflows/func-transform.yml | 168 ++-- .github/workflows/func-udf.yml | 184 ++--- .github/workflows/scale-out.yml | 762 +++++++++--------- .github/workflows/unit-mds.yml | 160 ++-- .../logical/generator/QueryGenerator.java | 2 +- 11 files changed, 1672 insertions(+), 1672 deletions(-) diff --git a/.github/workflows/api-rest.yml b/.github/workflows/api-rest.yml index d1c9255a5..810e7f102 100644 --- a/.github/workflows/api-rest.yml +++ b/.github/workflows/api-rest.yml @@ -1,98 +1,98 @@ -name: "API-Test-RESTful" - -on: - push: - branches: - - main - pull_request: - branches: - - main -env: - VERSION: 0.6.0-SNAPSHOT - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - Annotation-Test: - strategy: - fail-fast: false - #max-parallel: 20 - matrix: - java: [ 8 ] - python-version: [ "3.7" ] - os: [ ubuntu-latest, macos-latest ] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - name: Environmet Dependence - uses: ./.github/actions/dependence - with: - python-version: ${{ matrix.python-version }} - java: ${{ matrix.java }} - - - name: Run ZooKeeper - uses: ./.github/actions/zookeeperRunner - - - name: Run IoTDB - uses: ./.github/actions/iotdbRunner - with: - if-CapExp: "false" - version: iotdb11 - - - name: Install with Maven - run: mvn clean package -DskipTests - - - name: Start IginX - uses: ./.github/actions/iginxRunner - with: - version: ${VERSION} - - - name: A Lame Integration Test with Maven for IoTDB - run: mvn test -q -Dtest=RestAnnotationIT -DfailIfNoTests=false - - uses: codecov/codecov-action@v1 - with: - file: ./**/target/site/jacoco/jacoco.xml - name: codecov - - REST-Test: - strategy: - fail-fast: false - #max-parallel: 20 - matrix: - java: [ 8 ] - python-version: [ "3.7" ] - os: [ ubuntu-latest, macos-latest ] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - name: Environmet Dependence - uses: ./.github/actions/dependence - with: - python-version: ${{ matrix.python-version }} - java: ${{ matrix.java }} - - - name: Run ZooKeeper - uses: ./.github/actions/zookeeperRunner - - - name: Run IoTDB - uses: ./.github/actions/iotdbRunner - with: - if-CapExp: "false" - version: iotdb11 - - - name: Install with Maven - run: mvn clean package -DskipTests - - - name: Start IginX - uses: ./.github/actions/iginxRunner - with: - version: ${VERSION} - - - name: A Lame Integration Test with Maven for IoTDB - run: mvn test -q -Dtest=RestIT -DfailIfNoTests=false - - uses: codecov/codecov-action@v1 - with: - file: ./**/target/site/jacoco/jacoco.xml - name: codecov +#name: "API-Test-RESTful" +# +#on: +# push: +# branches: +# - main +# pull_request: +# branches: +# - main +#env: +# VERSION: 0.6.0-SNAPSHOT +# +#concurrency: +# group: ${{ github.workflow }}-${{ github.ref }} +# cancel-in-progress: true +# +#jobs: +# Annotation-Test: +# strategy: +# fail-fast: false +# #max-parallel: 20 +# matrix: +# java: [ 8 ] +# python-version: [ "3.7" ] +# os: [ ubuntu-latest, macos-latest ] +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v2 +# - name: Environmet Dependence +# uses: ./.github/actions/dependence +# with: +# python-version: ${{ matrix.python-version }} +# java: ${{ matrix.java }} +# +# - name: Run ZooKeeper +# uses: ./.github/actions/zookeeperRunner +# +# - name: Run IoTDB +# uses: ./.github/actions/iotdbRunner +# with: +# if-CapExp: "false" +# version: iotdb11 +# +# - name: Install with Maven +# run: mvn clean package -DskipTests +# +# - name: Start IginX +# uses: ./.github/actions/iginxRunner +# with: +# version: ${VERSION} +# +# - name: A Lame Integration Test with Maven for IoTDB +# run: mvn test -q -Dtest=RestAnnotationIT -DfailIfNoTests=false +# - uses: codecov/codecov-action@v1 +# with: +# file: ./**/target/site/jacoco/jacoco.xml +# name: codecov +# +# REST-Test: +# strategy: +# fail-fast: false +# #max-parallel: 20 +# matrix: +# java: [ 8 ] +# python-version: [ "3.7" ] +# os: [ ubuntu-latest, macos-latest ] +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v2 +# - name: Environmet Dependence +# uses: ./.github/actions/dependence +# with: +# python-version: ${{ matrix.python-version }} +# java: ${{ matrix.java }} +# +# - name: Run ZooKeeper +# uses: ./.github/actions/zookeeperRunner +# +# - name: Run IoTDB +# uses: ./.github/actions/iotdbRunner +# with: +# if-CapExp: "false" +# version: iotdb11 +# +# - name: Install with Maven +# run: mvn clean package -DskipTests +# +# - name: Start IginX +# uses: ./.github/actions/iginxRunner +# with: +# version: ${VERSION} +# +# - name: A Lame Integration Test with Maven for IoTDB +# run: mvn test -q -Dtest=RestIT -DfailIfNoTests=false +# - uses: codecov/codecov-action@v1 +# with: +# file: ./**/target/site/jacoco/jacoco.xml +# name: codecov diff --git a/.github/workflows/capacity-expansion.yml b/.github/workflows/capacity-expansion.yml index 8fdff4be4..00ddb9f60 100644 --- a/.github/workflows/capacity-expansion.yml +++ b/.github/workflows/capacity-expansion.yml @@ -1,295 +1,295 @@ -name: "Capacity-Expansions-On-IoTDB" -on: - push: - branches: - - main - pull_request: - branches: - - main -env: - VERSION: 0.6.0-SNAPSHOT -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - IoTDB-Test: - timeout-minutes: 20 - strategy: - fail-fast: false - matrix: - java: [ 8 ] - python-version: [ "3.7" ] - os: [ ubuntu-latest, macos-latest ] - DB-name: [ "iotdb11", "iotdb12" ] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - name: Environmet Dependence - uses: ./.github/actions/dependence - with: - python-version: ${{ matrix.python-version }} - java: ${{ matrix.java }} - - name: Run ZooKeeper - uses: ./.github/actions/zookeeperRunner - - name: Run IoTDB - uses: ./.github/actions/iotdbRunner - with: - version: ${{matrix.DB-name}} - - - name: Change pom - run: | - mv test/pom.xml test/pom.xml.backup - mv test/pom.xml.${{matrix.DB-name}} test/pom.xml - - name: Install IginX with Maven - shell: bash - run: | - mvn clean package -DskipTests - - #第 1 阶段测试开始========================================== - - name: Prepare CapExp environment - if: always() - uses: ./.github/actions/capacityExpansionUnionTest - with: - version: ${VERSION} - DB-name: ${{matrix.DB-name}} - Test-Way: oriHasDataExpHasData - - - name: oriHasDataExpHasData IT - if: always() - run: | - if [ "${{matrix.DB-name}}" == "iotdb11" ]; then - mvn test -q -Dtest=IoTDB11HistoryDataCapacityExpansionIT#oriHasDataExpHasData -DfailIfNoTests=false - elif [ "${{matrix.DB-name}}" == "iotdb12" ]; then - mvn test -q -Dtest=IoTDB12HistoryDataCapacityExpansionIT#oriHasDataExpHasData -DfailIfNoTests=false - fi - - #第 2 阶段测试开始========================================== - - name: Prepare CapExp environment - if: always() - uses: ./.github/actions/capacityExpansionUnionTest - with: - version: ${VERSION} - DB-name: ${{matrix.DB-name}} - Test-Way: oriNoDataExpNoData - - - name: oriNoDataExpNoData IT - if: always() - run: | - if [ "${{matrix.DB-name}}" == "iotdb11" ]; then - mvn test -q -Dtest=IoTDB11HistoryDataCapacityExpansionIT#oriNoDataExpNoData -DfailIfNoTests=false - elif [ "${{matrix.DB-name}}" == "iotdb12" ]; then - mvn test -q -Dtest=IoTDB12HistoryDataCapacityExpansionIT#oriNoDataExpNoData -DfailIfNoTests=false - fi - - #第 3 阶段测试开始========================================== - - name: Prepare CapExp environment - if: always() - uses: ./.github/actions/capacityExpansionUnionTest - with: - version: ${VERSION} - DB-name: ${{matrix.DB-name}} - Test-Way: oriHasDataExpNoData - - - name: oriHasDataExpNoData IT - if: always() - run: | - if [ "${{matrix.DB-name}}" == "iotdb11" ]; then - mvn test -q -Dtest=IoTDB11HistoryDataCapacityExpansionIT#oriHasDataExpNoData -DfailIfNoTests=false - elif [ "${{matrix.DB-name}}" == "iotdb12" ]; then - mvn test -q -Dtest=IoTDB12HistoryDataCapacityExpansionIT#oriHasDataExpNoData -DfailIfNoTests=false - fi - - #第 4 阶段测试开始========================================== - - name: Prepare CapExp environment - if: always() - uses: ./.github/actions/capacityExpansionUnionTest - with: - version: ${VERSION} - DB-name: ${{matrix.DB-name}} - Test-Way: oriNoDataExpHasData - - - name: oriNoDataExpHasData IT - if: always() - run: | - if [ "${{matrix.DB-name}}" == "iotdb11" ]; then - mvn test -q -Dtest=IoTDB11HistoryDataCapacityExpansionIT#oriNoDataExpHasData -DfailIfNoTests=false - elif [ "${{matrix.DB-name}}" == "iotdb12" ]; then - mvn test -q -Dtest=IoTDB12HistoryDataCapacityExpansionIT#oriNoDataExpHasData -DfailIfNoTests=false - fi - - - uses: codecov/codecov-action@v1 - with: - file: ./**/target/site/jacoco/jacoco.xml - name: codecov - - SchemaPrefix-Test-IotDB: - timeout-minutes: 20 - strategy: - fail-fast: false - matrix: - java: [ 8 ] - python-version: [ "3.7" ] - os: [ ubuntu-latest, macos-latest ] - DB-name: [ "iotdb11", "iotdb12" ] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - name: Environmet Dependence - uses: ./.github/actions/dependence - with: - python-version: ${{ matrix.python-version }} - java: ${{ matrix.java }} - - name: Run ZooKeeper - uses: ./.github/actions/zookeeperRunner - - name: Run IoTDB - uses: ./.github/actions/iotdbRunner - with: - version: ${{matrix.DB-name}} - - - name: Change pom - run: | - mv test/pom.xml test/pom.xml.backup - mv test/pom.xml.${{matrix.DB-name}} test/pom.xml - - name: Install IginX with Maven - shell: bash - run: | - mvn clean package -DskipTests - - #第 1 阶段测试开始========================================== - - name: Prepare CapExp environment - uses: ./.github/actions/capacityExpansionUnionTest - with: - version: ${VERSION} - DB-name: ${{matrix.DB-name}} - Test-Way: oriNoDataExpHasData - - - name: schema prefix IT - run: | - if [ "${{matrix.DB-name}}" == "iotdb11" ]; then - mvn test -q -Dtest=IoTDB11HistoryDataCapacityExpansionIT#schemaPrefix -DfailIfNoTests=false - elif [ "${{matrix.DB-name}}" == "iotdb12" ]; then - mvn test -q -Dtest=IoTDB12HistoryDataCapacityExpansionIT#schemaPrefix -DfailIfNoTests=false - fi - - DataPrefixWithMultiSchemaPrefix-Test-InfluxDB: - timeout-minutes: 20 - strategy: - fail-fast: false - #max-parallel: 20 - matrix: - java: [ 8 ] - python-version: [ "3.7" ] - os: [ ubuntu-latest, macos-latest ] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 - with: - java-version: ${{ matrix.java }} - - name: Run ZooKeeper - run: | - if [ "$RUNNER_OS" == "Linux" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" - "${GITHUB_WORKSPACE}/.github/zk.sh" - elif [ "$RUNNER_OS" == "macOS" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" - "${GITHUB_WORKSPACE}/.github/zk_macos.sh" - else - echo "$RUNNER_OS is not supported" - exit 1 - fi - - name: Run InfluxDB - run: | - if [ "$RUNNER_OS" == "Linux" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/influxdb_history_data_add.sh" - "${GITHUB_WORKSPACE}/.github/influxdb_history_data_add.sh" - elif [ "$RUNNER_OS" == "macOS" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/influxdb_history_data_add_macos.sh" - "${GITHUB_WORKSPACE}/.github/influxdb_history_data_add_macos.sh" - else - echo "$RUNNER_OS is not supported" - exit 1 - fi - - name: Run IoTDB - uses: ./.github/actions/iotdbRunner - with: - version: iotdb11 - - name: Change pom - run: | - mv test/pom.xml test/pom.xml.backup - mv test/pom.xml.iotdb11 test/pom.xml - - name: Install with Maven - run: mvn clean package -DskipTests - - name: Write history Data - run: | - mvn test -q -Dtest=InfluxDBHistoryDataGeneratorTest -DfailIfNoTests=false - sleep 5 - - name: Start IginX - run: | - chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" - nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & - - - name: Add Same DataPrefix With DiffSchemaPrefix IT - run: | - mvn test -q -Dtest=InfluxDBHistoryDataCapacityExpansionIT#testAddSameDataPrefixWithDiffSchemaPrefix -DfailIfNoTests=false - - DataPrefixWithMultiSchemaPrefix-Test-IotDB: - timeout-minutes: 20 - strategy: - fail-fast: false - matrix: - java: [ 8 ] - python-version: [ "3.7" ] - os: [ ubuntu-latest, macos-latest ] - DB-name: [ "iotdb11", "iotdb12" ] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - name: Environmet Dependence - uses: ./.github/actions/dependence - with: - python-version: ${{ matrix.python-version }} - java: ${{ matrix.java }} - - name: Run ZooKeeper - uses: ./.github/actions/zookeeperRunner - - name: Run IoTDB - uses: ./.github/actions/iotdbRunner - with: - version: ${{matrix.DB-name}} - - - name: Change pom - run: | - mv test/pom.xml test/pom.xml.backup - mv test/pom.xml.${{matrix.DB-name}} test/pom.xml - - name: Install IginX with Maven - shell: bash - run: | - mvn clean package -DskipTests - - name: Prepare CapExp environment - uses: ./.github/actions/capacityExpansionUnionTest - with: - version: ${VERSION} - DB-name: ${{matrix.DB-name}} - Test-Way: oriNoDataExpHasData - - - name: Write Extra Data to Expansion Node - uses: ./.github/actions/iotdbWriter - with: - Test-Way: extraDataWrite - - - name: data prefix IT - run: | - if [ "${{matrix.DB-name}}" == "iotdb11" ]; then - mvn test -q -Dtest=IoTDB11HistoryDataCapacityExpansionIT#testAddSameDataPrefixWithDiffSchemaPrefix -DfailIfNoTests=false - elif [ "${{matrix.DB-name}}" == "iotdb12" ]; then - mvn test -q -Dtest=IoTDB12HistoryDataCapacityExpansionIT#testAddSameDataPrefixWithDiffSchemaPrefix -DfailIfNoTests=false - fi \ No newline at end of file +#name: "Capacity-Expansions-On-IoTDB" +#on: +# push: +# branches: +# - main +# pull_request: +# branches: +# - main +#env: +# VERSION: 0.6.0-SNAPSHOT +#concurrency: +# group: ${{ github.workflow }}-${{ github.ref }} +# cancel-in-progress: true +# +#jobs: +# IoTDB-Test: +# timeout-minutes: 20 +# strategy: +# fail-fast: false +# matrix: +# java: [ 8 ] +# python-version: [ "3.7" ] +# os: [ ubuntu-latest, macos-latest ] +# DB-name: [ "iotdb11", "iotdb12" ] +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v2 +# - name: Environmet Dependence +# uses: ./.github/actions/dependence +# with: +# python-version: ${{ matrix.python-version }} +# java: ${{ matrix.java }} +# - name: Run ZooKeeper +# uses: ./.github/actions/zookeeperRunner +# - name: Run IoTDB +# uses: ./.github/actions/iotdbRunner +# with: +# version: ${{matrix.DB-name}} +# +# - name: Change pom +# run: | +# mv test/pom.xml test/pom.xml.backup +# mv test/pom.xml.${{matrix.DB-name}} test/pom.xml +# - name: Install IginX with Maven +# shell: bash +# run: | +# mvn clean package -DskipTests +# +# #第 1 阶段测试开始========================================== +# - name: Prepare CapExp environment +# if: always() +# uses: ./.github/actions/capacityExpansionUnionTest +# with: +# version: ${VERSION} +# DB-name: ${{matrix.DB-name}} +# Test-Way: oriHasDataExpHasData +# +# - name: oriHasDataExpHasData IT +# if: always() +# run: | +# if [ "${{matrix.DB-name}}" == "iotdb11" ]; then +# mvn test -q -Dtest=IoTDB11HistoryDataCapacityExpansionIT#oriHasDataExpHasData -DfailIfNoTests=false +# elif [ "${{matrix.DB-name}}" == "iotdb12" ]; then +# mvn test -q -Dtest=IoTDB12HistoryDataCapacityExpansionIT#oriHasDataExpHasData -DfailIfNoTests=false +# fi +# +# #第 2 阶段测试开始========================================== +# - name: Prepare CapExp environment +# if: always() +# uses: ./.github/actions/capacityExpansionUnionTest +# with: +# version: ${VERSION} +# DB-name: ${{matrix.DB-name}} +# Test-Way: oriNoDataExpNoData +# +# - name: oriNoDataExpNoData IT +# if: always() +# run: | +# if [ "${{matrix.DB-name}}" == "iotdb11" ]; then +# mvn test -q -Dtest=IoTDB11HistoryDataCapacityExpansionIT#oriNoDataExpNoData -DfailIfNoTests=false +# elif [ "${{matrix.DB-name}}" == "iotdb12" ]; then +# mvn test -q -Dtest=IoTDB12HistoryDataCapacityExpansionIT#oriNoDataExpNoData -DfailIfNoTests=false +# fi +# +# #第 3 阶段测试开始========================================== +# - name: Prepare CapExp environment +# if: always() +# uses: ./.github/actions/capacityExpansionUnionTest +# with: +# version: ${VERSION} +# DB-name: ${{matrix.DB-name}} +# Test-Way: oriHasDataExpNoData +# +# - name: oriHasDataExpNoData IT +# if: always() +# run: | +# if [ "${{matrix.DB-name}}" == "iotdb11" ]; then +# mvn test -q -Dtest=IoTDB11HistoryDataCapacityExpansionIT#oriHasDataExpNoData -DfailIfNoTests=false +# elif [ "${{matrix.DB-name}}" == "iotdb12" ]; then +# mvn test -q -Dtest=IoTDB12HistoryDataCapacityExpansionIT#oriHasDataExpNoData -DfailIfNoTests=false +# fi +# +# #第 4 阶段测试开始========================================== +# - name: Prepare CapExp environment +# if: always() +# uses: ./.github/actions/capacityExpansionUnionTest +# with: +# version: ${VERSION} +# DB-name: ${{matrix.DB-name}} +# Test-Way: oriNoDataExpHasData +# +# - name: oriNoDataExpHasData IT +# if: always() +# run: | +# if [ "${{matrix.DB-name}}" == "iotdb11" ]; then +# mvn test -q -Dtest=IoTDB11HistoryDataCapacityExpansionIT#oriNoDataExpHasData -DfailIfNoTests=false +# elif [ "${{matrix.DB-name}}" == "iotdb12" ]; then +# mvn test -q -Dtest=IoTDB12HistoryDataCapacityExpansionIT#oriNoDataExpHasData -DfailIfNoTests=false +# fi +# +# - uses: codecov/codecov-action@v1 +# with: +# file: ./**/target/site/jacoco/jacoco.xml +# name: codecov +# +# SchemaPrefix-Test-IotDB: +# timeout-minutes: 20 +# strategy: +# fail-fast: false +# matrix: +# java: [ 8 ] +# python-version: [ "3.7" ] +# os: [ ubuntu-latest, macos-latest ] +# DB-name: [ "iotdb11", "iotdb12" ] +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v2 +# - name: Environmet Dependence +# uses: ./.github/actions/dependence +# with: +# python-version: ${{ matrix.python-version }} +# java: ${{ matrix.java }} +# - name: Run ZooKeeper +# uses: ./.github/actions/zookeeperRunner +# - name: Run IoTDB +# uses: ./.github/actions/iotdbRunner +# with: +# version: ${{matrix.DB-name}} +# +# - name: Change pom +# run: | +# mv test/pom.xml test/pom.xml.backup +# mv test/pom.xml.${{matrix.DB-name}} test/pom.xml +# - name: Install IginX with Maven +# shell: bash +# run: | +# mvn clean package -DskipTests +# +# #第 1 阶段测试开始========================================== +# - name: Prepare CapExp environment +# uses: ./.github/actions/capacityExpansionUnionTest +# with: +# version: ${VERSION} +# DB-name: ${{matrix.DB-name}} +# Test-Way: oriNoDataExpHasData +# +# - name: schema prefix IT +# run: | +# if [ "${{matrix.DB-name}}" == "iotdb11" ]; then +# mvn test -q -Dtest=IoTDB11HistoryDataCapacityExpansionIT#schemaPrefix -DfailIfNoTests=false +# elif [ "${{matrix.DB-name}}" == "iotdb12" ]; then +# mvn test -q -Dtest=IoTDB12HistoryDataCapacityExpansionIT#schemaPrefix -DfailIfNoTests=false +# fi +# +# DataPrefixWithMultiSchemaPrefix-Test-InfluxDB: +# timeout-minutes: 20 +# strategy: +# fail-fast: false +# #max-parallel: 20 +# matrix: +# java: [ 8 ] +# python-version: [ "3.7" ] +# os: [ ubuntu-latest, macos-latest ] +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v2 +# - name: Set up Python ${{ matrix.python-version }} +# uses: actions/setup-python@v3 +# with: +# python-version: ${{ matrix.python-version }} +# - name: Install Python dependencies +# run: | +# python -m pip install --upgrade pip +# - name: Set up JDK ${{ matrix.java }} +# uses: actions/setup-java@v1 +# with: +# java-version: ${{ matrix.java }} +# - name: Run ZooKeeper +# run: | +# if [ "$RUNNER_OS" == "Linux" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" +# "${GITHUB_WORKSPACE}/.github/zk.sh" +# elif [ "$RUNNER_OS" == "macOS" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" +# "${GITHUB_WORKSPACE}/.github/zk_macos.sh" +# else +# echo "$RUNNER_OS is not supported" +# exit 1 +# fi +# - name: Run InfluxDB +# run: | +# if [ "$RUNNER_OS" == "Linux" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/influxdb_history_data_add.sh" +# "${GITHUB_WORKSPACE}/.github/influxdb_history_data_add.sh" +# elif [ "$RUNNER_OS" == "macOS" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/influxdb_history_data_add_macos.sh" +# "${GITHUB_WORKSPACE}/.github/influxdb_history_data_add_macos.sh" +# else +# echo "$RUNNER_OS is not supported" +# exit 1 +# fi +# - name: Run IoTDB +# uses: ./.github/actions/iotdbRunner +# with: +# version: iotdb11 +# - name: Change pom +# run: | +# mv test/pom.xml test/pom.xml.backup +# mv test/pom.xml.iotdb11 test/pom.xml +# - name: Install with Maven +# run: mvn clean package -DskipTests +# - name: Write history Data +# run: | +# mvn test -q -Dtest=InfluxDBHistoryDataGeneratorTest -DfailIfNoTests=false +# sleep 5 +# - name: Start IginX +# run: | +# chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" +# nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & +# +# - name: Add Same DataPrefix With DiffSchemaPrefix IT +# run: | +# mvn test -q -Dtest=InfluxDBHistoryDataCapacityExpansionIT#testAddSameDataPrefixWithDiffSchemaPrefix -DfailIfNoTests=false +# +# DataPrefixWithMultiSchemaPrefix-Test-IotDB: +# timeout-minutes: 20 +# strategy: +# fail-fast: false +# matrix: +# java: [ 8 ] +# python-version: [ "3.7" ] +# os: [ ubuntu-latest, macos-latest ] +# DB-name: [ "iotdb11", "iotdb12" ] +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v2 +# - name: Environmet Dependence +# uses: ./.github/actions/dependence +# with: +# python-version: ${{ matrix.python-version }} +# java: ${{ matrix.java }} +# - name: Run ZooKeeper +# uses: ./.github/actions/zookeeperRunner +# - name: Run IoTDB +# uses: ./.github/actions/iotdbRunner +# with: +# version: ${{matrix.DB-name}} +# +# - name: Change pom +# run: | +# mv test/pom.xml test/pom.xml.backup +# mv test/pom.xml.${{matrix.DB-name}} test/pom.xml +# - name: Install IginX with Maven +# shell: bash +# run: | +# mvn clean package -DskipTests +# - name: Prepare CapExp environment +# uses: ./.github/actions/capacityExpansionUnionTest +# with: +# version: ${VERSION} +# DB-name: ${{matrix.DB-name}} +# Test-Way: oriNoDataExpHasData +# +# - name: Write Extra Data to Expansion Node +# uses: ./.github/actions/iotdbWriter +# with: +# Test-Way: extraDataWrite +# +# - name: data prefix IT +# run: | +# if [ "${{matrix.DB-name}}" == "iotdb11" ]; then +# mvn test -q -Dtest=IoTDB11HistoryDataCapacityExpansionIT#testAddSameDataPrefixWithDiffSchemaPrefix -DfailIfNoTests=false +# elif [ "${{matrix.DB-name}}" == "iotdb12" ]; then +# mvn test -q -Dtest=IoTDB12HistoryDataCapacityExpansionIT#testAddSameDataPrefixWithDiffSchemaPrefix -DfailIfNoTests=false +# fi \ No newline at end of file diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d6fd0008b..1c16f4955 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,73 +1,73 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. +## For most projects, this workflow file will not need changing; you simply need +## to commit it to your repository. +## +## You may wish to alter this file to override the set of languages analyzed, +## or to provide custom queries or build logic. +## +## ******** NOTE ******** +## We have attempted to detect the languages in your repository. Please check +## the `language` matrix defined below to confirm you have the correct set of +## supported CodeQL languages. +## +#name: "CodeQL" # -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. +#on: +# push: +# branches: +# - main +# pull_request: +# # The branches below must be a subset of the branches above +# branches: +# - main +# schedule: +# - cron: '22 22 * * 6' # -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. +#concurrency: +# group: ${{ github.workflow }}-${{ github.ref }} +# cancel-in-progress: true # -name: "CodeQL" - -on: - push: - branches: - - main - pull_request: - # The branches below must be a subset of the branches above - branches: - - main - schedule: - - cron: '22 22 * * 6' - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - language: [ 'java' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] - # Learn more: - # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v1 - - # ℹ️ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 +#jobs: +# analyze: +# name: Analyze +# runs-on: ubuntu-latest +# +# strategy: +# fail-fast: false +# matrix: +# language: [ 'java' ] +# # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] +# # Learn more: +# # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed +# +# steps: +# - name: Checkout repository +# uses: actions/checkout@v2 +# +# # Initializes the CodeQL tools for scanning. +# - name: Initialize CodeQL +# uses: github/codeql-action/init@v1 +# with: +# languages: ${{ matrix.language }} +# # If you wish to specify custom queries, you can do so here or in a config file. +# # By default, queries listed here will override any specified in a config file. +# # Prefix the list here with "+" to use these queries and those in the config file. +# # queries: ./path/to/local/query, your-org/your-repo/queries@main +# +# # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). +# # If this step fails, then you should remove it and run the build manually (see below) +# - name: Autobuild +# uses: github/codeql-action/autobuild@v1 +# +# # ℹ️ Command-line programs to run using the OS shell. +# # 📚 https://git.io/JvXDl +# +# # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines +# # and modify them (or add more) to build your code if your project +# # uses a compiled language +# +# #- run: | +# # make bootstrap +# # make release +# +# - name: Perform CodeQL Analysis +# uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/ds-influxdb.yml b/.github/workflows/ds-influxdb.yml index 30304d4c9..f5c2d1383 100644 --- a/.github/workflows/ds-influxdb.yml +++ b/.github/workflows/ds-influxdb.yml @@ -1,204 +1,204 @@ -name: "System-IT-ds-InfluxDB" - -on: - push: - branches: - - main - pull_request: - branches: - - main -env: - VERSION: 0.6.0-SNAPSHOT - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - InfluxDB-Capacity-Expansion-Test: - strategy: - fail-fast: false - #max-parallel: 20 - matrix: - java: [ 8 ] - python-version: [ "3.7" ] - os: [ ubuntu-latest, macos-latest ] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 - with: - java-version: ${{ matrix.java }} - - name: Run ZooKeeper - run: | - if [ "$RUNNER_OS" == "Linux" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" - "${GITHUB_WORKSPACE}/.github/zk.sh" - elif [ "$RUNNER_OS" == "macOS" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" - "${GITHUB_WORKSPACE}/.github/zk_macos.sh" - else - echo "$RUNNER_OS is not supported" - exit 1 - fi - - name: Run InfluxDB and change default config - run: | - if [ "$RUNNER_OS" == "Linux" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/influxdb_history_data.sh" - "${GITHUB_WORKSPACE}/.github/influxdb_history_data.sh" - elif [ "$RUNNER_OS" == "macOS" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/influxdb_history_data_macos.sh" - "${GITHUB_WORKSPACE}/.github/influxdb_history_data_macos.sh" - else - echo "$RUNNER_OS is not supported" - exit 1 - fi - - name: Install with Maven - run: mvn clean package -DskipTests - - name: Write history Data - run: | - mvn test -q -Dtest=InfluxDBHistoryDataGeneratorTest -DfailIfNoTests=false - sleep 10 - - name: Start IginX - run: | - chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" - nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & - - - InfluxDB-SQL-Test: - strategy: - fail-fast: false - #max-parallel: 20 - matrix: - java: [ 8 ] - python-version: [ "3.7" ] - os: [ ubuntu-latest, macos-latest ] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 - with: - java-version: ${{ matrix.java }} - - name: Cache Maven packages - uses: actions/cache@v2.1.5 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - name: Run ZooKeeper - run: | - if [ "$RUNNER_OS" == "Linux" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" - "${GITHUB_WORKSPACE}/.github/zk.sh" - elif [ "$RUNNER_OS" == "macOS" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" - "${GITHUB_WORKSPACE}/.github/zk_macos.sh" - else - echo "$RUNNER_OS is not supported" - exit 1 - fi - - name: Run InfluxDB - run: | - if [ "$RUNNER_OS" == "Linux" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/influxdb.sh" - "${GITHUB_WORKSPACE}/.github/influxdb.sh" - elif [ "$RUNNER_OS" == "macOS" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/influxdb_macos.sh" - "${GITHUB_WORKSPACE}/.github/influxdb_macos.sh" - else - echo "$RUNNER_OS is not supported" - exit 1 - fi - - name: Install with Maven - run: mvn clean package -DskipTests - - name: Start IginX - run: | - chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" - nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & - - name: A Lame Integration Test with Maven for SQL - run: mvn test -q -Dtest=InfluxDBSQLSessionIT -DfailIfNoTests=false - - uses: codecov/codecov-action@v1 - with: - file: ./**/target/site/jacoco/jacoco.xml - name: codecov - - InfluxDB-SQL-SessionPool-Test: - strategy: - fail-fast: false - #max-parallel: 20 - matrix: - java: [ 8 ] - python-version: [ "3.7" ] - os: [ ubuntu-latest, macos-latest ] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 - with: - java-version: ${{ matrix.java }} - - name: Cache Maven packages - uses: actions/cache@v2.1.5 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - name: Run ZooKeeper - run: | - if [ "$RUNNER_OS" == "Linux" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" - "${GITHUB_WORKSPACE}/.github/zk.sh" - elif [ "$RUNNER_OS" == "macOS" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" - "${GITHUB_WORKSPACE}/.github/zk_macos.sh" - else - echo "$RUNNER_OS is not supported" - exit 1 - fi - - name: Run InfluxDB - run: | - if [ "$RUNNER_OS" == "Linux" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/influxdb.sh" - "${GITHUB_WORKSPACE}/.github/influxdb.sh" - elif [ "$RUNNER_OS" == "macOS" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/influxdb_macos.sh" - "${GITHUB_WORKSPACE}/.github/influxdb_macos.sh" - else - echo "$RUNNER_OS is not supported" - exit 1 - fi - - name: Install with Maven - run: mvn clean package -DskipTests - - name: Start IginX - run: | - chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" - nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & - - name: A Lame Integration Test with Maven for SQL - run: mvn test -q -Dtest=InfluxDBSQLSessionPoolIT -DfailIfNoTests=false - - uses: codecov/codecov-action@v1 - with: - file: ./**/target/site/jacoco/jacoco.xml - name: codecov +#name: "System-IT-ds-InfluxDB" +# +#on: +# push: +# branches: +# - main +# pull_request: +# branches: +# - main +#env: +# VERSION: 0.6.0-SNAPSHOT +# +#concurrency: +# group: ${{ github.workflow }}-${{ github.ref }} +# cancel-in-progress: true +# +#jobs: +# InfluxDB-Capacity-Expansion-Test: +# strategy: +# fail-fast: false +# #max-parallel: 20 +# matrix: +# java: [ 8 ] +# python-version: [ "3.7" ] +# os: [ ubuntu-latest, macos-latest ] +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v2 +# - name: Set up Python ${{ matrix.python-version }} +# uses: actions/setup-python@v3 +# with: +# python-version: ${{ matrix.python-version }} +# - name: Install Python dependencies +# run: | +# python -m pip install --upgrade pip +# - name: Set up JDK ${{ matrix.java }} +# uses: actions/setup-java@v1 +# with: +# java-version: ${{ matrix.java }} +# - name: Run ZooKeeper +# run: | +# if [ "$RUNNER_OS" == "Linux" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" +# "${GITHUB_WORKSPACE}/.github/zk.sh" +# elif [ "$RUNNER_OS" == "macOS" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" +# "${GITHUB_WORKSPACE}/.github/zk_macos.sh" +# else +# echo "$RUNNER_OS is not supported" +# exit 1 +# fi +# - name: Run InfluxDB and change default config +# run: | +# if [ "$RUNNER_OS" == "Linux" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/influxdb_history_data.sh" +# "${GITHUB_WORKSPACE}/.github/influxdb_history_data.sh" +# elif [ "$RUNNER_OS" == "macOS" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/influxdb_history_data_macos.sh" +# "${GITHUB_WORKSPACE}/.github/influxdb_history_data_macos.sh" +# else +# echo "$RUNNER_OS is not supported" +# exit 1 +# fi +# - name: Install with Maven +# run: mvn clean package -DskipTests +# - name: Write history Data +# run: | +# mvn test -q -Dtest=InfluxDBHistoryDataGeneratorTest -DfailIfNoTests=false +# sleep 10 +# - name: Start IginX +# run: | +# chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" +# nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & +# +# +# InfluxDB-SQL-Test: +# strategy: +# fail-fast: false +# #max-parallel: 20 +# matrix: +# java: [ 8 ] +# python-version: [ "3.7" ] +# os: [ ubuntu-latest, macos-latest ] +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v2 +# - name: Set up Python ${{ matrix.python-version }} +# uses: actions/setup-python@v3 +# with: +# python-version: ${{ matrix.python-version }} +# - name: Install Python dependencies +# run: | +# python -m pip install --upgrade pip +# - name: Set up JDK ${{ matrix.java }} +# uses: actions/setup-java@v1 +# with: +# java-version: ${{ matrix.java }} +# - name: Cache Maven packages +# uses: actions/cache@v2.1.5 +# with: +# path: ~/.m2 +# key: ${{ runner.os }}-m2-${{ hashFiles('/pom.xml') }} +# restore-keys: ${{ runner.os }}-m2 +# - name: Run ZooKeeper +# run: | +# if [ "$RUNNER_OS" == "Linux" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" +# "${GITHUB_WORKSPACE}/.github/zk.sh" +# elif [ "$RUNNER_OS" == "macOS" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" +# "${GITHUB_WORKSPACE}/.github/zk_macos.sh" +# else +# echo "$RUNNER_OS is not supported" +# exit 1 +# fi +# - name: Run InfluxDB +# run: | +# if [ "$RUNNER_OS" == "Linux" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/influxdb.sh" +# "${GITHUB_WORKSPACE}/.github/influxdb.sh" +# elif [ "$RUNNER_OS" == "macOS" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/influxdb_macos.sh" +# "${GITHUB_WORKSPACE}/.github/influxdb_macos.sh" +# else +# echo "$RUNNER_OS is not supported" +# exit 1 +# fi +# - name: Install with Maven +# run: mvn clean package -DskipTests +# - name: Start IginX +# run: | +# chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" +# nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & +# - name: A Lame Integration Test with Maven for SQL +# run: mvn test -q -Dtest=InfluxDBSQLSessionIT -DfailIfNoTests=false +# - uses: codecov/codecov-action@v1 +# with: +# file: ./**/target/site/jacoco/jacoco.xml +# name: codecov +# +# InfluxDB-SQL-SessionPool-Test: +# strategy: +# fail-fast: false +# #max-parallel: 20 +# matrix: +# java: [ 8 ] +# python-version: [ "3.7" ] +# os: [ ubuntu-latest, macos-latest ] +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v2 +# - name: Set up Python ${{ matrix.python-version }} +# uses: actions/setup-python@v3 +# with: +# python-version: ${{ matrix.python-version }} +# - name: Install Python dependencies +# run: | +# python -m pip install --upgrade pip +# - name: Set up JDK ${{ matrix.java }} +# uses: actions/setup-java@v1 +# with: +# java-version: ${{ matrix.java }} +# - name: Cache Maven packages +# uses: actions/cache@v2.1.5 +# with: +# path: ~/.m2 +# key: ${{ runner.os }}-m2-${{ hashFiles('/pom.xml') }} +# restore-keys: ${{ runner.os }}-m2 +# - name: Run ZooKeeper +# run: | +# if [ "$RUNNER_OS" == "Linux" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" +# "${GITHUB_WORKSPACE}/.github/zk.sh" +# elif [ "$RUNNER_OS" == "macOS" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" +# "${GITHUB_WORKSPACE}/.github/zk_macos.sh" +# else +# echo "$RUNNER_OS is not supported" +# exit 1 +# fi +# - name: Run InfluxDB +# run: | +# if [ "$RUNNER_OS" == "Linux" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/influxdb.sh" +# "${GITHUB_WORKSPACE}/.github/influxdb.sh" +# elif [ "$RUNNER_OS" == "macOS" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/influxdb_macos.sh" +# "${GITHUB_WORKSPACE}/.github/influxdb_macos.sh" +# else +# echo "$RUNNER_OS is not supported" +# exit 1 +# fi +# - name: Install with Maven +# run: mvn clean package -DskipTests +# - name: Start IginX +# run: | +# chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" +# nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & +# - name: A Lame Integration Test with Maven for SQL +# run: mvn test -q -Dtest=InfluxDBSQLSessionPoolIT -DfailIfNoTests=false +# - uses: codecov/codecov-action@v1 +# with: +# file: ./**/target/site/jacoco/jacoco.xml +# name: codecov diff --git a/.github/workflows/ds-iotdb.yml b/.github/workflows/ds-iotdb.yml index dedf8b089..a3cf36724 100644 --- a/.github/workflows/ds-iotdb.yml +++ b/.github/workflows/ds-iotdb.yml @@ -1,238 +1,238 @@ -name: "System-IT-ds-IoTDB" - -on: - push: - branches: - - main - pull_request: - branches: - - main -env: - VERSION: 0.6.0-SNAPSHOT - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - IoTDB-Session-Test: - strategy: - fail-fast: false - matrix: - java: [ 8 ] - python-version: [ "3.7" ] - os: [ ubuntu-latest, macos-latest ] - iotdb-version: [ iotdb11, iotdb12 ] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - name: Environmet Dependence - uses: ./.github/actions/dependence - with: - python-version: ${{ matrix.python-version }} - java: ${{ matrix.java }} - - - name: Run ZooKeeper - uses: ./.github/actions/zookeeperRunner - - - name: Run IoTDB - uses: ./.github/actions/iotdbRunner - with: - if-CapExp: "false" - version: ${{ matrix.iotdb-version }} - - - name: Install with Maven - run: mvn clean package -DskipTests - - - name: Start IginX - uses: ./.github/actions/iginxRunner - with: - version: ${VERSION} - - - name: A Lame Integration Test with Maven for IoTDB - run: | - if [ ${{ matrix.iotdb-version }} == "iotdb11" ]; then - mvn test -q -Dtest=IoTDB11SessionIT -DfailIfNoTests=false - elif [ ${{ matrix.iotdb-version }} == "iotdb12" ]; then - mvn test -q -Dtest=IoTDB12SessionIT -DfailIfNoTests=false - else - echo "${{ matrix.iotdb-version }} is not supported" - exit 1 - fi - - - uses: codecov/codecov-action@v1 - with: - file: ./**/target/site/jacoco/jacoco.xml - name: codecov - - IoTDB-SQL-Test: - strategy: - fail-fast: false - matrix: - java: [ 8 ] - python-version: [ "3.7" ] - os: [ ubuntu-latest, macos-latest ] - iotdb-version: [ iotdb11, iotdb12 ] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - name: Environmet Dependence - uses: ./.github/actions/dependence - with: - python-version: ${{ matrix.python-version }} - java: ${{ matrix.java }} - - - name: Run ZooKeeper - uses: ./.github/actions/zookeeperRunner - - - name: Run IoTDB - uses: ./.github/actions/iotdbRunner - with: - if-CapExp: "false" - version: ${{ matrix.iotdb-version }} - - - name: Install with Maven - run: mvn clean package -DskipTests - - - name: Start IginX - uses: ./.github/actions/iginxRunner - with: - version: ${VERSION} - - - name: A Lame Integration Test with Maven for SQL - run: mvn test -q -Dtest=IoTDBSQLSessionIT -DfailIfNoTests=false - - uses: codecov/codecov-action@v1 - with: - file: ./**/target/site/jacoco/jacoco.xml - name: codecov - - IoTDB-Tag-Test: - strategy: - fail-fast: false - matrix: - java: [ 8 ] - python-version: [ "3.7" ] - os: [ ubuntu-latest, macos-latest ] - iotdb-version: [ iotdb11, iotdb12 ] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - name: Environmet Dependence - uses: ./.github/actions/dependence - with: - python-version: ${{ matrix.python-version }} - java: ${{ matrix.java }} - - - name: Run ZooKeeper - uses: ./.github/actions/zookeeperRunner - - - name: Run IoTDB - uses: ./.github/actions/iotdbRunner - with: - if-CapExp: "false" - version: ${{ matrix.iotdb-version }} - - - name: Install with Maven - run: mvn clean package -DskipTests - - - name: Start IginX - uses: ./.github/actions/iginxRunner - with: - version: ${VERSION} - - - name: A Lame Integration Test with Maven for IoTDB - run: mvn test -q -Dtest=TagIT -DfailIfNoTests=false - - uses: codecov/codecov-action@v1 - with: - file: ./**/target/site/jacoco/jacoco.xml - name: codecov - - IoTDB-SessionPool-Test: - strategy: - fail-fast: false - matrix: - java: [ 8 ] - python-version: [ "3.7" ] - os: [ ubuntu-latest, macos-latest ] - iotdb-version: [ iotdb11, iotdb12 ] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - name: Environmet Dependence - uses: ./.github/actions/dependence - with: - python-version: ${{ matrix.python-version }} - java: ${{ matrix.java }} - - - name: Run ZooKeeper - uses: ./.github/actions/zookeeperRunner - - - name: Run IoTDB - uses: ./.github/actions/iotdbRunner - with: - if-CapExp: "false" - version: ${{ matrix.iotdb-version }} - - - name: Install with Maven - run: mvn clean package -DskipTests - - - name: Start IginX - uses: ./.github/actions/iginxRunner - with: - version: ${VERSION} - - - name: A Lame Integration Test with Maven for IoTDB - run: | - if [ ${{ matrix.iotdb-version }} == "iotdb11" ]; then - mvn test -q -Dtest=IoTDB11SessionPoolIT -DfailIfNoTests=false - elif [ ${{ matrix.iotdb-version }} == "iotdb12" ]; then - mvn test -q -Dtest=IoTDB12SessionPoolIT -DfailIfNoTests=false - else - echo "${{ matrix.iotdb-version }} is not supported" - exit 1 - fi - - uses: codecov/codecov-action@v1 - with: - file: ./**/target/site/jacoco/jacoco.xml - name: codecov - - IoTDB-SQL-SessionPool-Test: - strategy: - fail-fast: false - matrix: - java: [ 8 ] - python-version: [ "3.7" ] - os: [ ubuntu-latest, macos-latest ] - iotdb-version: [ iotdb11, iotdb12 ] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - name: Environmet Dependence - uses: ./.github/actions/dependence - with: - python-version: ${{ matrix.python-version }} - java: ${{ matrix.java }} - - - name: Run ZooKeeper - uses: ./.github/actions/zookeeperRunner - - - name: Run IoTDB - uses: ./.github/actions/iotdbRunner - with: - if-CapExp: "false" - version: ${{ matrix.iotdb-version }} - - - name: Install with Maven - run: mvn clean package -DskipTests - - - name: Start IginX - uses: ./.github/actions/iginxRunner - with: - version: ${VERSION} - - - name: A Lame Integration Test with Maven for SQL - run: mvn test -q -Dtest=SQLSessionPoolIT -DfailIfNoTests=false - - uses: codecov/codecov-action@v1 - with: - file: ./**/target/site/jacoco/jacoco.xml - name: codecov +#name: "System-IT-ds-IoTDB" +# +#on: +# push: +# branches: +# - main +# pull_request: +# branches: +# - main +#env: +# VERSION: 0.6.0-SNAPSHOT +# +#concurrency: +# group: ${{ github.workflow }}-${{ github.ref }} +# cancel-in-progress: true +# +#jobs: +# IoTDB-Session-Test: +# strategy: +# fail-fast: false +# matrix: +# java: [ 8 ] +# python-version: [ "3.7" ] +# os: [ ubuntu-latest, macos-latest ] +# iotdb-version: [ iotdb11, iotdb12 ] +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v2 +# - name: Environmet Dependence +# uses: ./.github/actions/dependence +# with: +# python-version: ${{ matrix.python-version }} +# java: ${{ matrix.java }} +# +# - name: Run ZooKeeper +# uses: ./.github/actions/zookeeperRunner +# +# - name: Run IoTDB +# uses: ./.github/actions/iotdbRunner +# with: +# if-CapExp: "false" +# version: ${{ matrix.iotdb-version }} +# +# - name: Install with Maven +# run: mvn clean package -DskipTests +# +# - name: Start IginX +# uses: ./.github/actions/iginxRunner +# with: +# version: ${VERSION} +# +# - name: A Lame Integration Test with Maven for IoTDB +# run: | +# if [ ${{ matrix.iotdb-version }} == "iotdb11" ]; then +# mvn test -q -Dtest=IoTDB11SessionIT -DfailIfNoTests=false +# elif [ ${{ matrix.iotdb-version }} == "iotdb12" ]; then +# mvn test -q -Dtest=IoTDB12SessionIT -DfailIfNoTests=false +# else +# echo "${{ matrix.iotdb-version }} is not supported" +# exit 1 +# fi +# +# - uses: codecov/codecov-action@v1 +# with: +# file: ./**/target/site/jacoco/jacoco.xml +# name: codecov +# +# IoTDB-SQL-Test: +# strategy: +# fail-fast: false +# matrix: +# java: [ 8 ] +# python-version: [ "3.7" ] +# os: [ ubuntu-latest, macos-latest ] +# iotdb-version: [ iotdb11, iotdb12 ] +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v2 +# - name: Environmet Dependence +# uses: ./.github/actions/dependence +# with: +# python-version: ${{ matrix.python-version }} +# java: ${{ matrix.java }} +# +# - name: Run ZooKeeper +# uses: ./.github/actions/zookeeperRunner +# +# - name: Run IoTDB +# uses: ./.github/actions/iotdbRunner +# with: +# if-CapExp: "false" +# version: ${{ matrix.iotdb-version }} +# +# - name: Install with Maven +# run: mvn clean package -DskipTests +# +# - name: Start IginX +# uses: ./.github/actions/iginxRunner +# with: +# version: ${VERSION} +# +# - name: A Lame Integration Test with Maven for SQL +# run: mvn test -q -Dtest=IoTDBSQLSessionIT -DfailIfNoTests=false +# - uses: codecov/codecov-action@v1 +# with: +# file: ./**/target/site/jacoco/jacoco.xml +# name: codecov +# +# IoTDB-Tag-Test: +# strategy: +# fail-fast: false +# matrix: +# java: [ 8 ] +# python-version: [ "3.7" ] +# os: [ ubuntu-latest, macos-latest ] +# iotdb-version: [ iotdb11, iotdb12 ] +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v2 +# - name: Environmet Dependence +# uses: ./.github/actions/dependence +# with: +# python-version: ${{ matrix.python-version }} +# java: ${{ matrix.java }} +# +# - name: Run ZooKeeper +# uses: ./.github/actions/zookeeperRunner +# +# - name: Run IoTDB +# uses: ./.github/actions/iotdbRunner +# with: +# if-CapExp: "false" +# version: ${{ matrix.iotdb-version }} +# +# - name: Install with Maven +# run: mvn clean package -DskipTests +# +# - name: Start IginX +# uses: ./.github/actions/iginxRunner +# with: +# version: ${VERSION} +# +# - name: A Lame Integration Test with Maven for IoTDB +# run: mvn test -q -Dtest=TagIT -DfailIfNoTests=false +# - uses: codecov/codecov-action@v1 +# with: +# file: ./**/target/site/jacoco/jacoco.xml +# name: codecov +# +# IoTDB-SessionPool-Test: +# strategy: +# fail-fast: false +# matrix: +# java: [ 8 ] +# python-version: [ "3.7" ] +# os: [ ubuntu-latest, macos-latest ] +# iotdb-version: [ iotdb11, iotdb12 ] +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v2 +# - name: Environmet Dependence +# uses: ./.github/actions/dependence +# with: +# python-version: ${{ matrix.python-version }} +# java: ${{ matrix.java }} +# +# - name: Run ZooKeeper +# uses: ./.github/actions/zookeeperRunner +# +# - name: Run IoTDB +# uses: ./.github/actions/iotdbRunner +# with: +# if-CapExp: "false" +# version: ${{ matrix.iotdb-version }} +# +# - name: Install with Maven +# run: mvn clean package -DskipTests +# +# - name: Start IginX +# uses: ./.github/actions/iginxRunner +# with: +# version: ${VERSION} +# +# - name: A Lame Integration Test with Maven for IoTDB +# run: | +# if [ ${{ matrix.iotdb-version }} == "iotdb11" ]; then +# mvn test -q -Dtest=IoTDB11SessionPoolIT -DfailIfNoTests=false +# elif [ ${{ matrix.iotdb-version }} == "iotdb12" ]; then +# mvn test -q -Dtest=IoTDB12SessionPoolIT -DfailIfNoTests=false +# else +# echo "${{ matrix.iotdb-version }} is not supported" +# exit 1 +# fi +# - uses: codecov/codecov-action@v1 +# with: +# file: ./**/target/site/jacoco/jacoco.xml +# name: codecov +# +# IoTDB-SQL-SessionPool-Test: +# strategy: +# fail-fast: false +# matrix: +# java: [ 8 ] +# python-version: [ "3.7" ] +# os: [ ubuntu-latest, macos-latest ] +# iotdb-version: [ iotdb11, iotdb12 ] +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v2 +# - name: Environmet Dependence +# uses: ./.github/actions/dependence +# with: +# python-version: ${{ matrix.python-version }} +# java: ${{ matrix.java }} +# +# - name: Run ZooKeeper +# uses: ./.github/actions/zookeeperRunner +# +# - name: Run IoTDB +# uses: ./.github/actions/iotdbRunner +# with: +# if-CapExp: "false" +# version: ${{ matrix.iotdb-version }} +# +# - name: Install with Maven +# run: mvn clean package -DskipTests +# +# - name: Start IginX +# uses: ./.github/actions/iginxRunner +# with: +# version: ${VERSION} +# +# - name: A Lame Integration Test with Maven for SQL +# run: mvn test -q -Dtest=SQLSessionPoolIT -DfailIfNoTests=false +# - uses: codecov/codecov-action@v1 +# with: +# file: ./**/target/site/jacoco/jacoco.xml +# name: codecov diff --git a/.github/workflows/ds-parquet.yml b/.github/workflows/ds-parquet.yml index 0dfa11c6c..56d0773d6 100644 --- a/.github/workflows/ds-parquet.yml +++ b/.github/workflows/ds-parquet.yml @@ -15,135 +15,135 @@ concurrency: cancel-in-progress: true jobs: - Parquet-SQL-Test: - strategy: - fail-fast: false - #max-parallel: 20 - matrix: - java: [ 8 ] - python-version: [ "3.7" ] - os: [ ubuntu-latest, macos-latest ] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 - with: - java-version: ${{ matrix.java }} - - name: Cache Maven packages - uses: actions/cache@v2.1.5 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - name: Run ZooKeeper - run: | - if [ "$RUNNER_OS" == "Linux" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" - "${GITHUB_WORKSPACE}/.github/zk.sh" - elif [ "$RUNNER_OS" == "macOS" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" - "${GITHUB_WORKSPACE}/.github/zk_macos.sh" - else - echo "$RUNNER_OS is not supported" - exit 1 - fi - - name: Set Parquet - run: | - if [ "$RUNNER_OS" == "Linux" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/parquet.sh" - "${GITHUB_WORKSPACE}/.github/parquet.sh" - elif [ "$RUNNER_OS" == "macOS" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/parquet_macos.sh" - "${GITHUB_WORKSPACE}/.github/parquet_macos.sh" - else - echo "$RUNNER_OS is not supported" - exit 1 - fi - - name: Install with Maven - run: mvn clean package -DskipTests - - name: Start IginX - run: | - chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" - nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & - - name: A Lame Integration Test with Maven for SQL - run: mvn test -q -Dtest=ParquetSQLSessionIT -DfailIfNoTests=false - - uses: codecov/codecov-action@v1 - with: - file: ./**/target/site/jacoco/jacoco.xml - name: codecov - - Parquet-SQL-SessionPool-Test: - strategy: - fail-fast: false - #max-parallel: 20 - matrix: - java: [ 8 ] - python-version: [ "3.7" ] - os: [ ubuntu-latest, macos-latest ] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 - with: - java-version: ${{ matrix.java }} - - name: Cache Maven packages - uses: actions/cache@v2.1.5 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - name: Run ZooKeeper - run: | - if [ "$RUNNER_OS" == "Linux" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" - "${GITHUB_WORKSPACE}/.github/zk.sh" - elif [ "$RUNNER_OS" == "macOS" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" - "${GITHUB_WORKSPACE}/.github/zk_macos.sh" - else - echo "$RUNNER_OS is not supported" - exit 1 - fi - - name: Set Parquet - run: | - if [ "$RUNNER_OS" == "Linux" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/parquet.sh" - "${GITHUB_WORKSPACE}/.github/parquet.sh" - elif [ "$RUNNER_OS" == "macOS" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/parquet_macos.sh" - "${GITHUB_WORKSPACE}/.github/parquet_macos.sh" - else - echo "$RUNNER_OS is not supported" - exit 1 - fi - - name: Install with Maven - run: mvn clean package -DskipTests - - name: Start IginX - run: | - chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" - nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & - - name: A Lame Integration Test with Maven for SQL - run: mvn test -q -Dtest=ParquetSQLSessionPoolIT -DfailIfNoTests=false - - uses: codecov/codecov-action@v1 - with: - file: ./**/target/site/jacoco/jacoco.xml - name: codecov +# Parquet-SQL-Test: +# strategy: +# fail-fast: false +# #max-parallel: 20 +# matrix: +# java: [ 8 ] +# python-version: [ "3.7" ] +# os: [ ubuntu-latest, macos-latest ] +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v2 +# - name: Set up Python ${{ matrix.python-version }} +# uses: actions/setup-python@v3 +# with: +# python-version: ${{ matrix.python-version }} +# - name: Install Python dependencies +# run: | +# python -m pip install --upgrade pip +# - name: Set up JDK ${{ matrix.java }} +# uses: actions/setup-java@v1 +# with: +# java-version: ${{ matrix.java }} +# - name: Cache Maven packages +# uses: actions/cache@v2.1.5 +# with: +# path: ~/.m2 +# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} +# restore-keys: ${{ runner.os }}-m2 +# - name: Run ZooKeeper +# run: | +# if [ "$RUNNER_OS" == "Linux" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" +# "${GITHUB_WORKSPACE}/.github/zk.sh" +# elif [ "$RUNNER_OS" == "macOS" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" +# "${GITHUB_WORKSPACE}/.github/zk_macos.sh" +# else +# echo "$RUNNER_OS is not supported" +# exit 1 +# fi +# - name: Set Parquet +# run: | +# if [ "$RUNNER_OS" == "Linux" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/parquet.sh" +# "${GITHUB_WORKSPACE}/.github/parquet.sh" +# elif [ "$RUNNER_OS" == "macOS" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/parquet_macos.sh" +# "${GITHUB_WORKSPACE}/.github/parquet_macos.sh" +# else +# echo "$RUNNER_OS is not supported" +# exit 1 +# fi +# - name: Install with Maven +# run: mvn clean package -DskipTests +# - name: Start IginX +# run: | +# chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" +# nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & +# - name: A Lame Integration Test with Maven for SQL +# run: mvn test -q -Dtest=ParquetSQLSessionIT -DfailIfNoTests=false +# - uses: codecov/codecov-action@v1 +# with: +# file: ./**/target/site/jacoco/jacoco.xml +# name: codecov +# +# Parquet-SQL-SessionPool-Test: +# strategy: +# fail-fast: false +# #max-parallel: 20 +# matrix: +# java: [ 8 ] +# python-version: [ "3.7" ] +# os: [ ubuntu-latest, macos-latest ] +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v2 +# - name: Set up Python ${{ matrix.python-version }} +# uses: actions/setup-python@v3 +# with: +# python-version: ${{ matrix.python-version }} +# - name: Install Python dependencies +# run: | +# python -m pip install --upgrade pip +# - name: Set up JDK ${{ matrix.java }} +# uses: actions/setup-java@v1 +# with: +# java-version: ${{ matrix.java }} +# - name: Cache Maven packages +# uses: actions/cache@v2.1.5 +# with: +# path: ~/.m2 +# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} +# restore-keys: ${{ runner.os }}-m2 +# - name: Run ZooKeeper +# run: | +# if [ "$RUNNER_OS" == "Linux" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" +# "${GITHUB_WORKSPACE}/.github/zk.sh" +# elif [ "$RUNNER_OS" == "macOS" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" +# "${GITHUB_WORKSPACE}/.github/zk_macos.sh" +# else +# echo "$RUNNER_OS is not supported" +# exit 1 +# fi +# - name: Set Parquet +# run: | +# if [ "$RUNNER_OS" == "Linux" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/parquet.sh" +# "${GITHUB_WORKSPACE}/.github/parquet.sh" +# elif [ "$RUNNER_OS" == "macOS" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/parquet_macos.sh" +# "${GITHUB_WORKSPACE}/.github/parquet_macos.sh" +# else +# echo "$RUNNER_OS is not supported" +# exit 1 +# fi +# - name: Install with Maven +# run: mvn clean package -DskipTests +# - name: Start IginX +# run: | +# chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" +# nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & +# - name: A Lame Integration Test with Maven for SQL +# run: mvn test -q -Dtest=ParquetSQLSessionPoolIT -DfailIfNoTests=false +# - uses: codecov/codecov-action@v1 +# with: +# file: ./**/target/site/jacoco/jacoco.xml +# name: codecov Parquet-Capacity-Expansion-Test: strategy: diff --git a/.github/workflows/func-transform.yml b/.github/workflows/func-transform.yml index 69226fd8b..941320af4 100644 --- a/.github/workflows/func-transform.yml +++ b/.github/workflows/func-transform.yml @@ -1,84 +1,84 @@ -name: "Function-Test-Transform" - -on: - push: - branches: - - main - pull_request: - branches: - - main -env: - VERSION: 0.6.0-SNAPSHOT - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - Transform-Test: - strategy: - fail-fast: false - max-parallel: 20 - matrix: - java: [ 8 ] - python-version: [ "3.7" ] - os: [ ubuntu-latest, macos-latest ] - runs-on: ${{ matrix.os }} - env: - VERSION: 0.6.0-SNAPSHOT - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - pip install pemja==0.1.5 pandas numpy - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 - with: - java-version: ${{ matrix.java }} - - name: Cache Maven packages - uses: actions/cache@v2.1.5 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - name: Run ZooKeeper - run: | - if [ "$RUNNER_OS" == "Linux" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" - "${GITHUB_WORKSPACE}/.github/zk.sh" - elif [ "$RUNNER_OS" == "macOS" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" - "${GITHUB_WORKSPACE}/.github/zk_macos.sh" - else - echo "$RUNNER_OS is not supported" - exit 1 - fi - - name: Run IoTDB11 - run: | - if [ "$RUNNER_OS" == "Linux" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/iotdb11.sh" - "${GITHUB_WORKSPACE}/.github/iotdb11.sh" - elif [ "$RUNNER_OS" == "macOS" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/iotdb11_macos.sh" - "${GITHUB_WORKSPACE}/.github/iotdb11_macos.sh" - else - echo "$RUNNER_OS is not supported" - exit 1 - fi - - name: Install with Maven - run: mvn clean package -DskipTests - - name: Start IginX - run: | - chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" - nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & - - name: A Lame Integration Test with Maven for IoTDB - run: mvn test -q -Dtest=TransformIT -DfailIfNoTests=false - - uses: codecov/codecov-action@v1 - with: - file: ./**/target/site/jacoco/jacoco.xml - name: codecov \ No newline at end of file +#name: "Function-Test-Transform" +# +#on: +# push: +# branches: +# - main +# pull_request: +# branches: +# - main +#env: +# VERSION: 0.6.0-SNAPSHOT +# +#concurrency: +# group: ${{ github.workflow }}-${{ github.ref }} +# cancel-in-progress: true +# +#jobs: +# Transform-Test: +# strategy: +# fail-fast: false +# max-parallel: 20 +# matrix: +# java: [ 8 ] +# python-version: [ "3.7" ] +# os: [ ubuntu-latest, macos-latest ] +# runs-on: ${{ matrix.os }} +# env: +# VERSION: 0.6.0-SNAPSHOT +# steps: +# - uses: actions/checkout@v2 +# - name: Set up Python ${{ matrix.python-version }} +# uses: actions/setup-python@v3 +# with: +# python-version: ${{ matrix.python-version }} +# - name: Install Python dependencies +# run: | +# python -m pip install --upgrade pip +# pip install pemja==0.1.5 pandas numpy +# - name: Set up JDK ${{ matrix.java }} +# uses: actions/setup-java@v1 +# with: +# java-version: ${{ matrix.java }} +# - name: Cache Maven packages +# uses: actions/cache@v2.1.5 +# with: +# path: ~/.m2 +# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} +# restore-keys: ${{ runner.os }}-m2 +# - name: Run ZooKeeper +# run: | +# if [ "$RUNNER_OS" == "Linux" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" +# "${GITHUB_WORKSPACE}/.github/zk.sh" +# elif [ "$RUNNER_OS" == "macOS" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" +# "${GITHUB_WORKSPACE}/.github/zk_macos.sh" +# else +# echo "$RUNNER_OS is not supported" +# exit 1 +# fi +# - name: Run IoTDB11 +# run: | +# if [ "$RUNNER_OS" == "Linux" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/iotdb11.sh" +# "${GITHUB_WORKSPACE}/.github/iotdb11.sh" +# elif [ "$RUNNER_OS" == "macOS" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/iotdb11_macos.sh" +# "${GITHUB_WORKSPACE}/.github/iotdb11_macos.sh" +# else +# echo "$RUNNER_OS is not supported" +# exit 1 +# fi +# - name: Install with Maven +# run: mvn clean package -DskipTests +# - name: Start IginX +# run: | +# chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" +# nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & +# - name: A Lame Integration Test with Maven for IoTDB +# run: mvn test -q -Dtest=TransformIT -DfailIfNoTests=false +# - uses: codecov/codecov-action@v1 +# with: +# file: ./**/target/site/jacoco/jacoco.xml +# name: codecov \ No newline at end of file diff --git a/.github/workflows/func-udf.yml b/.github/workflows/func-udf.yml index d7b62274c..f1be81631 100644 --- a/.github/workflows/func-udf.yml +++ b/.github/workflows/func-udf.yml @@ -1,92 +1,92 @@ -name: "Function-Test-UDF" - -on: - push: - branches: - - main - pull_request: - branches: - - main -env: - VERSION: 0.6.0-SNAPSHOT - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - UDF-Test: - strategy: - fail-fast: false - max-parallel: 20 - matrix: - java: [ 8 ] - python-version: [ "3.7" ] - os: [ ubuntu-latest, macos-latest ] - runs-on: ${{ matrix.os }} - env: - VERSION: 0.6.0-SNAPSHOT - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - pip install pemja==0.1.5 - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 - with: - java-version: ${{ matrix.java }} - - name: Cache Maven packages - uses: actions/cache@v2.1.5 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - name: Run ZooKeeper - run: | - if [ "$RUNNER_OS" == "Linux" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" - "${GITHUB_WORKSPACE}/.github/zk.sh" - elif [ "$RUNNER_OS" == "macOS" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" - "${GITHUB_WORKSPACE}/.github/zk_macos.sh" - else - echo "$RUNNER_OS is not supported" - exit 1 - fi - - name: Run IoTDB11 - run: | - if [ "$RUNNER_OS" == "Linux" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/iotdb11.sh" - "${GITHUB_WORKSPACE}/.github/iotdb11.sh" - elif [ "$RUNNER_OS" == "macOS" ]; then - chmod +x "${GITHUB_WORKSPACE}/.github/iotdb11_macos.sh" - "${GITHUB_WORKSPACE}/.github/iotdb11_macos.sh" - else - echo "$RUNNER_OS is not supported" - exit 1 - fi - - name: Install with Maven - run: mvn clean package -DskipTests - - name: Start IginX - run: | - if [ "$RUNNER_OS" == "Linux" ]; then - sudo sed -i 's/needInitBasicUDFFunctions=false/needInitBasicUDFFunctions=true/g' ${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/conf/config.properties - elif [ "$RUNNER_OS" == "macOS" ]; then - sudo sed -i '' 's/needInitBasicUDFFunctions=false/needInitBasicUDFFunctions=true/' ${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/conf/config.properties - else - echo "$RUNNER_OS is not supported" - exit 1 - fi - chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" - nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & - - name: A Lame Integration Test with Maven for IoTDB - run: mvn test -q -Dtest=UDFIT -DfailIfNoTests=false - - uses: codecov/codecov-action@v1 - with: - file: ./**/target/site/jacoco/jacoco.xml - name: codecov \ No newline at end of file +#name: "Function-Test-UDF" +# +#on: +# push: +# branches: +# - main +# pull_request: +# branches: +# - main +#env: +# VERSION: 0.6.0-SNAPSHOT +# +#concurrency: +# group: ${{ github.workflow }}-${{ github.ref }} +# cancel-in-progress: true +# +#jobs: +# UDF-Test: +# strategy: +# fail-fast: false +# max-parallel: 20 +# matrix: +# java: [ 8 ] +# python-version: [ "3.7" ] +# os: [ ubuntu-latest, macos-latest ] +# runs-on: ${{ matrix.os }} +# env: +# VERSION: 0.6.0-SNAPSHOT +# steps: +# - uses: actions/checkout@v2 +# - name: Set up Python ${{ matrix.python-version }} +# uses: actions/setup-python@v3 +# with: +# python-version: ${{ matrix.python-version }} +# - name: Install Python dependencies +# run: | +# python -m pip install --upgrade pip +# pip install pemja==0.1.5 +# - name: Set up JDK ${{ matrix.java }} +# uses: actions/setup-java@v1 +# with: +# java-version: ${{ matrix.java }} +# - name: Cache Maven packages +# uses: actions/cache@v2.1.5 +# with: +# path: ~/.m2 +# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} +# restore-keys: ${{ runner.os }}-m2 +# - name: Run ZooKeeper +# run: | +# if [ "$RUNNER_OS" == "Linux" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" +# "${GITHUB_WORKSPACE}/.github/zk.sh" +# elif [ "$RUNNER_OS" == "macOS" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" +# "${GITHUB_WORKSPACE}/.github/zk_macos.sh" +# else +# echo "$RUNNER_OS is not supported" +# exit 1 +# fi +# - name: Run IoTDB11 +# run: | +# if [ "$RUNNER_OS" == "Linux" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/iotdb11.sh" +# "${GITHUB_WORKSPACE}/.github/iotdb11.sh" +# elif [ "$RUNNER_OS" == "macOS" ]; then +# chmod +x "${GITHUB_WORKSPACE}/.github/iotdb11_macos.sh" +# "${GITHUB_WORKSPACE}/.github/iotdb11_macos.sh" +# else +# echo "$RUNNER_OS is not supported" +# exit 1 +# fi +# - name: Install with Maven +# run: mvn clean package -DskipTests +# - name: Start IginX +# run: | +# if [ "$RUNNER_OS" == "Linux" ]; then +# sudo sed -i 's/needInitBasicUDFFunctions=false/needInitBasicUDFFunctions=true/g' ${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/conf/config.properties +# elif [ "$RUNNER_OS" == "macOS" ]; then +# sudo sed -i '' 's/needInitBasicUDFFunctions=false/needInitBasicUDFFunctions=true/' ${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/conf/config.properties +# else +# echo "$RUNNER_OS is not supported" +# exit 1 +# fi +# chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" +# nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & +# - name: A Lame Integration Test with Maven for IoTDB +# run: mvn test -q -Dtest=UDFIT -DfailIfNoTests=false +# - uses: codecov/codecov-action@v1 +# with: +# file: ./**/target/site/jacoco/jacoco.xml +# name: codecov \ No newline at end of file diff --git a/.github/workflows/scale-out.yml b/.github/workflows/scale-out.yml index 5f8e40f3b..2f2d20668 100644 --- a/.github/workflows/scale-out.yml +++ b/.github/workflows/scale-out.yml @@ -1,381 +1,381 @@ -name: "Scale-out-On-IoTDB" -on: - push: - branches: - - main - pull_request: - branches: - - main -env: - VERSION: 0.6.0-SNAPSHOT - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - IoTDB-Tag-Test: - timeout-minutes: 20 - strategy: - fail-fast: false - matrix: - java: [ 8 ] - python-version: [ "3.7" ] - os: [ ubuntu-latest, macos-latest ] - DB-name: [ "iotdb11", "iotdb12" ] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - name: Environmet Dependence - uses: ./.github/actions/dependence - with: - python-version: ${{ matrix.python-version }} - java: ${{ matrix.java }} - - - name: Run ZooKeeper - uses: ./.github/actions/zookeeperRunner - - - name: Run IoTDB - uses: ./.github/actions/iotdbRunner - with: - version: ${{matrix.DB-name}} - - - name: Change pom - run: | - mv test/pom.xml test/pom.xml.backup - mv test/pom.xml.${{matrix.DB-name}} test/pom.xml - ls test/pom* - - - name: Install IginX with Maven - shell: bash - run: | - mvn clean package -DskipTests - - #第 1 阶段测试开始========================================== - - name: Prepare CapExp environment - uses: ./.github/actions/capacityExpansionUnionTest - with: - version: ${VERSION} - DB-name: ${{matrix.DB-name}} - Test-Way: oriNoDataExpNoData - - - name: oriNoDataExpNoData IT - run: mvn test -q -Dtest=IoTDBTagScaleOutIT#oriNoDataExpNoDataIT -DfailIfNoTests=false - - #第 2 阶段测试开始========================================== - - name: Prepare CapExp environment - if: always() - uses: ./.github/actions/capacityExpansionUnionTest - with: - version: ${VERSION} - DB-name: ${{matrix.DB-name}} - Test-Way: oriHasDataExpNoData - - - name: oriHasDataExpNoData IT - if: always() - run: mvn test -q -Dtest=IoTDBTagScaleOutIT#oriHasDataExpNoDataIT -DfailIfNoTests=false - - #第 3 阶段测试开始========================================== - - name: Prepare CapExp environment - if: always() - uses: ./.github/actions/capacityExpansionUnionTest - with: - version: ${VERSION} - DB-name: ${{matrix.DB-name}} - Test-Way: oriNoDataExpHasData - - - name: oriNoDataExpHasData IT - if: always() - run: mvn test -q -Dtest=IoTDBTagScaleOutIT#oriNoDataExpHasDataIT -DfailIfNoTests=false - - #第 4 阶段测试开始========================================== - - name: Prepare CapExp environment - if: always() - uses: ./.github/actions/capacityExpansionUnionTest - with: - version: ${VERSION} - DB-name: ${{matrix.DB-name}} - Test-Way: oriHasDataExpHasData - - - name: oriHasDataExpHasData IT - if: always() - run: mvn test -q -Dtest=IoTDBTagScaleOutIT#oriHasDataExpHasDataIT -DfailIfNoTests=false - - - uses: codecov/codecov-action@v1 - with: - file: ./**/target/site/jacoco/jacoco.xml - name: codecov - - IoTDB-SQLSession-Test: - timeout-minutes: 20 - strategy: - fail-fast: false - matrix: - java: [ 8 ] - python-version: [ "3.7" ] - os: [ ubuntu-latest, macos-latest ] - DB-name: [ "iotdb11", "iotdb12" ] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - name: Environmet Dependence - uses: ./.github/actions/dependence - with: - python-version: ${{ matrix.python-version }} - java: ${{ matrix.java }} - - - name: Run ZooKeeper - uses: ./.github/actions/zookeeperRunner - - - name: Run IoTDB - uses: ./.github/actions/iotdbRunner - with: - version: ${{matrix.DB-name}} - - - name: Change pom - run: | - mv test/pom.xml test/pom.xml.backup - mv test/pom.xml.${{matrix.DB-name}} test/pom.xml - ls test/pom* - - - name: Install IginX with Maven - shell: bash - run: | - mvn clean package -DskipTests - - #第 1 阶段测试开始========================================== - - name: Prepare CapExp environment - uses: ./.github/actions/capacityExpansionUnionTest - with: - version: ${VERSION} - DB-name: ${{matrix.DB-name}} - Test-Way: oriNoDataExpNoData - - - name: oriNoDataExpNoData IT - run: mvn test -q -Dtest=IoTDBSqlScaleOutIT#oriNoDataExpNoDataIT -DfailIfNoTests=false - - #第 2 阶段测试开始========================================== - - name: Prepare CapExp environment - if: always() - uses: ./.github/actions/capacityExpansionUnionTest - with: - version: ${VERSION} - DB-name: ${{matrix.DB-name}} - Test-Way: oriHasDataExpNoData - - - name: oriHasDataExpNoData IT - if: always() - run: mvn test -q -Dtest=IoTDBSqlScaleOutIT#oriHasDataExpNoDataIT -DfailIfNoTests=false - - #第 3 阶段测试开始========================================== - - name: Prepare CapExp environment - if: always() - uses: ./.github/actions/capacityExpansionUnionTest - with: - version: ${VERSION} - DB-name: ${{matrix.DB-name}} - Test-Way: oriNoDataExpHasData - - - name: oriNoDataExpHasData IT - if: always() - run: mvn test -q -Dtest=IoTDBSqlScaleOutIT#oriNoDataExpHasDataIT -DfailIfNoTests=false - - #第 4 阶段测试开始========================================== - - name: Prepare CapExp environment - if: always() - uses: ./.github/actions/capacityExpansionUnionTest - with: - version: ${VERSION} - DB-name: ${{matrix.DB-name}} - Test-Way: oriHasDataExpHasData - - - name: oriHasDataExpHasData IT - if: always() - run: mvn test -q -Dtest=IoTDBSqlScaleOutIT#oriHasDataExpHasDataIT -DfailIfNoTests=false - - - uses: codecov/codecov-action@v1 - with: - file: ./**/target/site/jacoco/jacoco.xml - name: codecov - - IoTDB-Session-Test: - timeout-minutes: 20 - strategy: - fail-fast: false - matrix: - java: [ 8 ] - python-version: [ "3.7" ] - os: [ ubuntu-latest, macos-latest ] - DB-name: [ "iotdb11", "iotdb12" ] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - name: Environmet Dependence - uses: ./.github/actions/dependence - with: - python-version: ${{ matrix.python-version }} - java: ${{ matrix.java }} - - - name: Run ZooKeeper - uses: ./.github/actions/zookeeperRunner - - - name: Run IoTDB - uses: ./.github/actions/iotdbRunner - with: - version: ${{matrix.DB-name}} - - - name: Change pom - run: | - mv test/pom.xml test/pom.xml.backup - mv test/pom.xml.${{matrix.DB-name}} test/pom.xml - ls test/pom* - - - name: Install IginX with Maven - shell: bash - run: | - mvn clean package -DskipTests - - #第 1 阶段测试开始========================================== - - name: Prepare CapExp environment - uses: ./.github/actions/capacityExpansionUnionTest - with: - DB-name: ${{matrix.DB-name}} - Test-Way: oriNoDataExpNoData - - - name: oriNoDataExpNoData IT - run: mvn test -q -Dtest=IoTDBSessionScaleOutIT#oriNoDataExpNoDataIT -DfailIfNoTests=false - - #第 2 阶段测试开始========================================== - - name: Prepare CapExp environment - if: always() - uses: ./.github/actions/capacityExpansionUnionTest - with: - version: ${VERSION} - DB-name: ${{matrix.DB-name}} - Test-Way: oriHasDataExpNoData - - - name: oriHasDataExpNoData IT - if: always() - run: mvn test -q -Dtest=IoTDBSessionScaleOutIT#oriHasDataExpNoDataIT -DfailIfNoTests=false - - #第 3 阶段测试开始========================================== - - name: Prepare CapExp environment - if: always() - uses: ./.github/actions/capacityExpansionUnionTest - with: - DB-name: ${{matrix.DB-name}} - Test-Way: oriNoDataExpHasData - - - name: oriNoDataExpHasData IT - if: always() - run: mvn test -q -Dtest=IoTDBSessionScaleOutIT#oriNoDataExpHasDataIT -DfailIfNoTests=false - - #第 4 阶段测试开始========================================== - - name: Prepare CapExp environment - if: always() - uses: ./.github/actions/capacityExpansionUnionTest - with: - version: ${VERSION} - DB-name: ${{matrix.DB-name}} - Test-Way: oriHasDataExpHasData - - - name: oriHasDataExpHasData IT - if: always() - run: mvn test -q -Dtest=IoTDBSessionScaleOutIT#oriHasDataExpHasDataIT -DfailIfNoTests=false - - - uses: codecov/codecov-action@v1 - with: - file: ./**/target/site/jacoco/jacoco.xml - name: codecov - - IoTDB-Rest-Test: - timeout-minutes: 20 - strategy: - fail-fast: false - matrix: - java: [ 8 ] - python-version: [ "3.7" ] - os: [ ubuntu-latest, macos-latest ] - DB-name: [ "iotdb11", "iotdb12" ] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - name: Environmet Dependence - uses: ./.github/actions/dependence - with: - python-version: ${{ matrix.python-version }} - java: ${{ matrix.java }} - - - name: Run ZooKeeper - uses: ./.github/actions/zookeeperRunner - - - name: Run IoTDB - uses: ./.github/actions/iotdbRunner - with: - version: ${{matrix.DB-name}} - - - name: Change pom - run: | - mv test/pom.xml test/pom.xml.backup - mv test/pom.xml.${{matrix.DB-name}} test/pom.xml - ls test/pom* - - - name: Install IginX with Maven - shell: bash - run: | - mvn clean package -DskipTests - - #第 2 阶段测试开始========================================== - - name: Prepare CapExp environment - if: always() - uses: ./.github/actions/capacityExpansionUnionTest - with: - version: ${VERSION} - DB-name: ${{matrix.DB-name}} - Test-Way: oriHasDataExpNoData - - - name: oriHasDataExpNoData IT - if: always() - run: mvn test -q -Dtest=IoTDBRestfulScaleOutIT#oriHasDataExpNoDataIT -DfailIfNoTests=false - - #第 1 阶段测试开始========================================== - - name: Prepare CapExp environment - if: always() - uses: ./.github/actions/capacityExpansionUnionTest - with: - DB-name: ${{matrix.DB-name}} - Test-Way: oriNoDataExpNoData - - - name: oriNoDataExpNoData IT - if: always() - run: mvn test -q -Dtest=IoTDBRestfulScaleOutIT#oriNoDataExpNoDataIT -DfailIfNoTests=false - - #第 3 阶段测试开始========================================== - - name: Prepare CapExp environment - if: always() - uses: ./.github/actions/capacityExpansionUnionTest - with: - DB-name: ${{matrix.DB-name}} - Test-Way: oriNoDataExpHasData - - - name: oriNoDataExpHasData IT - if: always() - run: mvn test -q -Dtest=IoTDBRestfulScaleOutIT#oriNoDataExpHasDataIT -DfailIfNoTests=false - - #第 4 阶段测试开始========================================== - - name: Prepare CapExp environment - if: always() - uses: ./.github/actions/capacityExpansionUnionTest - with: - version: ${VERSION} - DB-name: ${{matrix.DB-name}} - Test-Way: oriHasDataExpHasData - - - name: oriHasDataExpHasData IT - if: always() - run: mvn test -q -Dtest=IoTDBRestfulScaleOutIT#oriHasDataExpHasDataIT -DfailIfNoTests=false - - - uses: codecov/codecov-action@v1 - with: - file: ./**/target/site/jacoco/jacoco.xml - name: codecov \ No newline at end of file +#name: "Scale-out-On-IoTDB" +#on: +# push: +# branches: +# - main +# pull_request: +# branches: +# - main +#env: +# VERSION: 0.6.0-SNAPSHOT +# +#concurrency: +# group: ${{ github.workflow }}-${{ github.ref }} +# cancel-in-progress: true +# +#jobs: +# IoTDB-Tag-Test: +# timeout-minutes: 20 +# strategy: +# fail-fast: false +# matrix: +# java: [ 8 ] +# python-version: [ "3.7" ] +# os: [ ubuntu-latest, macos-latest ] +# DB-name: [ "iotdb11", "iotdb12" ] +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v2 +# - name: Environmet Dependence +# uses: ./.github/actions/dependence +# with: +# python-version: ${{ matrix.python-version }} +# java: ${{ matrix.java }} +# +# - name: Run ZooKeeper +# uses: ./.github/actions/zookeeperRunner +# +# - name: Run IoTDB +# uses: ./.github/actions/iotdbRunner +# with: +# version: ${{matrix.DB-name}} +# +# - name: Change pom +# run: | +# mv test/pom.xml test/pom.xml.backup +# mv test/pom.xml.${{matrix.DB-name}} test/pom.xml +# ls test/pom* +# +# - name: Install IginX with Maven +# shell: bash +# run: | +# mvn clean package -DskipTests +# +# #第 1 阶段测试开始========================================== +# - name: Prepare CapExp environment +# uses: ./.github/actions/capacityExpansionUnionTest +# with: +# version: ${VERSION} +# DB-name: ${{matrix.DB-name}} +# Test-Way: oriNoDataExpNoData +# +# - name: oriNoDataExpNoData IT +# run: mvn test -q -Dtest=IoTDBTagScaleOutIT#oriNoDataExpNoDataIT -DfailIfNoTests=false +# +# #第 2 阶段测试开始========================================== +# - name: Prepare CapExp environment +# if: always() +# uses: ./.github/actions/capacityExpansionUnionTest +# with: +# version: ${VERSION} +# DB-name: ${{matrix.DB-name}} +# Test-Way: oriHasDataExpNoData +# +# - name: oriHasDataExpNoData IT +# if: always() +# run: mvn test -q -Dtest=IoTDBTagScaleOutIT#oriHasDataExpNoDataIT -DfailIfNoTests=false +# +# #第 3 阶段测试开始========================================== +# - name: Prepare CapExp environment +# if: always() +# uses: ./.github/actions/capacityExpansionUnionTest +# with: +# version: ${VERSION} +# DB-name: ${{matrix.DB-name}} +# Test-Way: oriNoDataExpHasData +# +# - name: oriNoDataExpHasData IT +# if: always() +# run: mvn test -q -Dtest=IoTDBTagScaleOutIT#oriNoDataExpHasDataIT -DfailIfNoTests=false +# +# #第 4 阶段测试开始========================================== +# - name: Prepare CapExp environment +# if: always() +# uses: ./.github/actions/capacityExpansionUnionTest +# with: +# version: ${VERSION} +# DB-name: ${{matrix.DB-name}} +# Test-Way: oriHasDataExpHasData +# +# - name: oriHasDataExpHasData IT +# if: always() +# run: mvn test -q -Dtest=IoTDBTagScaleOutIT#oriHasDataExpHasDataIT -DfailIfNoTests=false +# +# - uses: codecov/codecov-action@v1 +# with: +# file: ./**/target/site/jacoco/jacoco.xml +# name: codecov +# +# IoTDB-SQLSession-Test: +# timeout-minutes: 20 +# strategy: +# fail-fast: false +# matrix: +# java: [ 8 ] +# python-version: [ "3.7" ] +# os: [ ubuntu-latest, macos-latest ] +# DB-name: [ "iotdb11", "iotdb12" ] +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v2 +# - name: Environmet Dependence +# uses: ./.github/actions/dependence +# with: +# python-version: ${{ matrix.python-version }} +# java: ${{ matrix.java }} +# +# - name: Run ZooKeeper +# uses: ./.github/actions/zookeeperRunner +# +# - name: Run IoTDB +# uses: ./.github/actions/iotdbRunner +# with: +# version: ${{matrix.DB-name}} +# +# - name: Change pom +# run: | +# mv test/pom.xml test/pom.xml.backup +# mv test/pom.xml.${{matrix.DB-name}} test/pom.xml +# ls test/pom* +# +# - name: Install IginX with Maven +# shell: bash +# run: | +# mvn clean package -DskipTests +# +# #第 1 阶段测试开始========================================== +# - name: Prepare CapExp environment +# uses: ./.github/actions/capacityExpansionUnionTest +# with: +# version: ${VERSION} +# DB-name: ${{matrix.DB-name}} +# Test-Way: oriNoDataExpNoData +# +# - name: oriNoDataExpNoData IT +# run: mvn test -q -Dtest=IoTDBSqlScaleOutIT#oriNoDataExpNoDataIT -DfailIfNoTests=false +# +# #第 2 阶段测试开始========================================== +# - name: Prepare CapExp environment +# if: always() +# uses: ./.github/actions/capacityExpansionUnionTest +# with: +# version: ${VERSION} +# DB-name: ${{matrix.DB-name}} +# Test-Way: oriHasDataExpNoData +# +# - name: oriHasDataExpNoData IT +# if: always() +# run: mvn test -q -Dtest=IoTDBSqlScaleOutIT#oriHasDataExpNoDataIT -DfailIfNoTests=false +# +# #第 3 阶段测试开始========================================== +# - name: Prepare CapExp environment +# if: always() +# uses: ./.github/actions/capacityExpansionUnionTest +# with: +# version: ${VERSION} +# DB-name: ${{matrix.DB-name}} +# Test-Way: oriNoDataExpHasData +# +# - name: oriNoDataExpHasData IT +# if: always() +# run: mvn test -q -Dtest=IoTDBSqlScaleOutIT#oriNoDataExpHasDataIT -DfailIfNoTests=false +# +# #第 4 阶段测试开始========================================== +# - name: Prepare CapExp environment +# if: always() +# uses: ./.github/actions/capacityExpansionUnionTest +# with: +# version: ${VERSION} +# DB-name: ${{matrix.DB-name}} +# Test-Way: oriHasDataExpHasData +# +# - name: oriHasDataExpHasData IT +# if: always() +# run: mvn test -q -Dtest=IoTDBSqlScaleOutIT#oriHasDataExpHasDataIT -DfailIfNoTests=false +# +# - uses: codecov/codecov-action@v1 +# with: +# file: ./**/target/site/jacoco/jacoco.xml +# name: codecov +# +# IoTDB-Session-Test: +# timeout-minutes: 20 +# strategy: +# fail-fast: false +# matrix: +# java: [ 8 ] +# python-version: [ "3.7" ] +# os: [ ubuntu-latest, macos-latest ] +# DB-name: [ "iotdb11", "iotdb12" ] +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v2 +# - name: Environmet Dependence +# uses: ./.github/actions/dependence +# with: +# python-version: ${{ matrix.python-version }} +# java: ${{ matrix.java }} +# +# - name: Run ZooKeeper +# uses: ./.github/actions/zookeeperRunner +# +# - name: Run IoTDB +# uses: ./.github/actions/iotdbRunner +# with: +# version: ${{matrix.DB-name}} +# +# - name: Change pom +# run: | +# mv test/pom.xml test/pom.xml.backup +# mv test/pom.xml.${{matrix.DB-name}} test/pom.xml +# ls test/pom* +# +# - name: Install IginX with Maven +# shell: bash +# run: | +# mvn clean package -DskipTests +# +# #第 1 阶段测试开始========================================== +# - name: Prepare CapExp environment +# uses: ./.github/actions/capacityExpansionUnionTest +# with: +# DB-name: ${{matrix.DB-name}} +# Test-Way: oriNoDataExpNoData +# +# - name: oriNoDataExpNoData IT +# run: mvn test -q -Dtest=IoTDBSessionScaleOutIT#oriNoDataExpNoDataIT -DfailIfNoTests=false +# +# #第 2 阶段测试开始========================================== +# - name: Prepare CapExp environment +# if: always() +# uses: ./.github/actions/capacityExpansionUnionTest +# with: +# version: ${VERSION} +# DB-name: ${{matrix.DB-name}} +# Test-Way: oriHasDataExpNoData +# +# - name: oriHasDataExpNoData IT +# if: always() +# run: mvn test -q -Dtest=IoTDBSessionScaleOutIT#oriHasDataExpNoDataIT -DfailIfNoTests=false +# +# #第 3 阶段测试开始========================================== +# - name: Prepare CapExp environment +# if: always() +# uses: ./.github/actions/capacityExpansionUnionTest +# with: +# DB-name: ${{matrix.DB-name}} +# Test-Way: oriNoDataExpHasData +# +# - name: oriNoDataExpHasData IT +# if: always() +# run: mvn test -q -Dtest=IoTDBSessionScaleOutIT#oriNoDataExpHasDataIT -DfailIfNoTests=false +# +# #第 4 阶段测试开始========================================== +# - name: Prepare CapExp environment +# if: always() +# uses: ./.github/actions/capacityExpansionUnionTest +# with: +# version: ${VERSION} +# DB-name: ${{matrix.DB-name}} +# Test-Way: oriHasDataExpHasData +# +# - name: oriHasDataExpHasData IT +# if: always() +# run: mvn test -q -Dtest=IoTDBSessionScaleOutIT#oriHasDataExpHasDataIT -DfailIfNoTests=false +# +# - uses: codecov/codecov-action@v1 +# with: +# file: ./**/target/site/jacoco/jacoco.xml +# name: codecov +# +# IoTDB-Rest-Test: +# timeout-minutes: 20 +# strategy: +# fail-fast: false +# matrix: +# java: [ 8 ] +# python-version: [ "3.7" ] +# os: [ ubuntu-latest, macos-latest ] +# DB-name: [ "iotdb11", "iotdb12" ] +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v2 +# - name: Environmet Dependence +# uses: ./.github/actions/dependence +# with: +# python-version: ${{ matrix.python-version }} +# java: ${{ matrix.java }} +# +# - name: Run ZooKeeper +# uses: ./.github/actions/zookeeperRunner +# +# - name: Run IoTDB +# uses: ./.github/actions/iotdbRunner +# with: +# version: ${{matrix.DB-name}} +# +# - name: Change pom +# run: | +# mv test/pom.xml test/pom.xml.backup +# mv test/pom.xml.${{matrix.DB-name}} test/pom.xml +# ls test/pom* +# +# - name: Install IginX with Maven +# shell: bash +# run: | +# mvn clean package -DskipTests +# +# #第 2 阶段测试开始========================================== +# - name: Prepare CapExp environment +# if: always() +# uses: ./.github/actions/capacityExpansionUnionTest +# with: +# version: ${VERSION} +# DB-name: ${{matrix.DB-name}} +# Test-Way: oriHasDataExpNoData +# +# - name: oriHasDataExpNoData IT +# if: always() +# run: mvn test -q -Dtest=IoTDBRestfulScaleOutIT#oriHasDataExpNoDataIT -DfailIfNoTests=false +# +# #第 1 阶段测试开始========================================== +# - name: Prepare CapExp environment +# if: always() +# uses: ./.github/actions/capacityExpansionUnionTest +# with: +# DB-name: ${{matrix.DB-name}} +# Test-Way: oriNoDataExpNoData +# +# - name: oriNoDataExpNoData IT +# if: always() +# run: mvn test -q -Dtest=IoTDBRestfulScaleOutIT#oriNoDataExpNoDataIT -DfailIfNoTests=false +# +# #第 3 阶段测试开始========================================== +# - name: Prepare CapExp environment +# if: always() +# uses: ./.github/actions/capacityExpansionUnionTest +# with: +# DB-name: ${{matrix.DB-name}} +# Test-Way: oriNoDataExpHasData +# +# - name: oriNoDataExpHasData IT +# if: always() +# run: mvn test -q -Dtest=IoTDBRestfulScaleOutIT#oriNoDataExpHasDataIT -DfailIfNoTests=false +# +# #第 4 阶段测试开始========================================== +# - name: Prepare CapExp environment +# if: always() +# uses: ./.github/actions/capacityExpansionUnionTest +# with: +# version: ${VERSION} +# DB-name: ${{matrix.DB-name}} +# Test-Way: oriHasDataExpHasData +# +# - name: oriHasDataExpHasData IT +# if: always() +# run: mvn test -q -Dtest=IoTDBRestfulScaleOutIT#oriHasDataExpHasDataIT -DfailIfNoTests=false +# +# - uses: codecov/codecov-action@v1 +# with: +# file: ./**/target/site/jacoco/jacoco.xml +# name: codecov \ No newline at end of file diff --git a/.github/workflows/unit-mds.yml b/.github/workflows/unit-mds.yml index 129804190..d1d3dec28 100644 --- a/.github/workflows/unit-mds.yml +++ b/.github/workflows/unit-mds.yml @@ -1,80 +1,80 @@ -name: "Metadata-Service-Test" - -on: - push: - branches: - - main - pull_request: - branches: - - main - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - ZK-Test: - strategy: - fail-fast: false - matrix: - java: [ 8 ] - os: [ ubuntu-latest ] - runs-on: ${{ matrix.os}} - env: - STORAGE: zookeeper - ZOOKEEPER_CONNECTION_STRING: 127.0.0.1:2181 - steps: - - uses: actions/checkout@v2 - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 - with: - java-version: ${{ matrix.java }} - - name: Cache Maven packages - uses: actions/cache@v2 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - name: Run ZooKeeper - run: | - chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" - "${GITHUB_WORKSPACE}/.github/zk.sh" - - name: Run Test For Meta Manager - run: mvn test -q -Dtest=IMetaManagerTest -DfailIfNoTests=false - - uses: codecov/codecov-action@v1 - with: - file: ./**/target/site/jacoco/jacoco.xml - name: codecov - ETCD-Test: - strategy: - fail-fast: false - max-parallel: 20 - matrix: - java: [ 8 ] - os: [ ubuntu-latest ] - runs-on: ${{ matrix.os}} - env: - STORAGE: etcd - ETCD_ENDPOINTS: http://localhost:2379 - steps: - - uses: actions/checkout@v2 - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 - with: - java-version: ${{ matrix.java }} - - name: Cache Maven packages - uses: actions/cache@v2 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - name: Run ETCD - run: | - chmod +x "${GITHUB_WORKSPACE}/.github/etcd.sh" - "${GITHUB_WORKSPACE}/.github/etcd.sh" - #- name: Run Test For Meta Manager - # run: mvn test -q -Dtest=IMetaManagerTest -DfailIfNoTests=false - - uses: codecov/codecov-action@v1 - with: - file: ./**/target/site/jacoco/jacoco.xml - name: codecov \ No newline at end of file +#name: "Metadata-Service-Test" +# +#on: +# push: +# branches: +# - main +# pull_request: +# branches: +# - main +# +#concurrency: +# group: ${{ github.workflow }}-${{ github.ref }} +# cancel-in-progress: true +# +#jobs: +# ZK-Test: +# strategy: +# fail-fast: false +# matrix: +# java: [ 8 ] +# os: [ ubuntu-latest ] +# runs-on: ${{ matrix.os}} +# env: +# STORAGE: zookeeper +# ZOOKEEPER_CONNECTION_STRING: 127.0.0.1:2181 +# steps: +# - uses: actions/checkout@v2 +# - name: Set up JDK ${{ matrix.java }} +# uses: actions/setup-java@v1 +# with: +# java-version: ${{ matrix.java }} +# - name: Cache Maven packages +# uses: actions/cache@v2 +# with: +# path: ~/.m2 +# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} +# restore-keys: ${{ runner.os }}-m2 +# - name: Run ZooKeeper +# run: | +# chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" +# "${GITHUB_WORKSPACE}/.github/zk.sh" +# - name: Run Test For Meta Manager +# run: mvn test -q -Dtest=IMetaManagerTest -DfailIfNoTests=false +# - uses: codecov/codecov-action@v1 +# with: +# file: ./**/target/site/jacoco/jacoco.xml +# name: codecov +# ETCD-Test: +# strategy: +# fail-fast: false +# max-parallel: 20 +# matrix: +# java: [ 8 ] +# os: [ ubuntu-latest ] +# runs-on: ${{ matrix.os}} +# env: +# STORAGE: etcd +# ETCD_ENDPOINTS: http://localhost:2379 +# steps: +# - uses: actions/checkout@v2 +# - name: Set up JDK ${{ matrix.java }} +# uses: actions/setup-java@v1 +# with: +# java-version: ${{ matrix.java }} +# - name: Cache Maven packages +# uses: actions/cache@v2 +# with: +# path: ~/.m2 +# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} +# restore-keys: ${{ runner.os }}-m2 +# - name: Run ETCD +# run: | +# chmod +x "${GITHUB_WORKSPACE}/.github/etcd.sh" +# "${GITHUB_WORKSPACE}/.github/etcd.sh" +# #- name: Run Test For Meta Manager +# # run: mvn test -q -Dtest=IMetaManagerTest -DfailIfNoTests=false +# - uses: codecov/codecov-action@v1 +# with: +# file: ./**/target/site/jacoco/jacoco.xml +# name: codecov \ No newline at end of file diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/generator/QueryGenerator.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/generator/QueryGenerator.java index 9ceb633e3..160b0848b 100644 --- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/generator/QueryGenerator.java +++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/generator/QueryGenerator.java @@ -357,7 +357,7 @@ private List pathMatchPrefix(List pathList, String prefix, Strin if (prefix == null) { // deal with the schemaPrefix for(String path : pathList) { if (path.equals("*.*") || path.equals("*")) { - ans.add("*.*"); + ans.add(path); } else if (path.indexOf(schemaPrefix) == 0) { path = path.substring(schemaPrefix.length() + 1); if (path.equals("*")) { From 4435bab645f01b7becfade4da2dd87751ab9554c Mon Sep 17 00:00:00 2001 From: RemHero <1104304963@qq.com> Date: Fri, 13 Jan 2023 17:14:15 +0800 Subject: [PATCH 6/9] fix the pathMatchPrefix() in QueryGenerator --- .../iginx/engine/logical/generator/QueryGenerator.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/generator/QueryGenerator.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/generator/QueryGenerator.java index 160b0848b..f4687f314 100644 --- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/generator/QueryGenerator.java +++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/generator/QueryGenerator.java @@ -360,11 +360,7 @@ private List pathMatchPrefix(List pathList, String prefix, Strin ans.add(path); } else if (path.indexOf(schemaPrefix) == 0) { path = path.substring(schemaPrefix.length() + 1); - if (path.equals("*")) { - ans.add("*.*"); - } else { - ans.add(path); - } + ans.add(path); } } return ans; From 3fe52d5ed39e18f0b6c76f10a74de051923f7a2e Mon Sep 17 00:00:00 2001 From: RemHero <1104304963@qq.com> Date: Fri, 13 Jan 2023 17:39:16 +0800 Subject: [PATCH 7/9] add IT --- .github/workflows/api-rest.yml | 196 +++--- .github/workflows/capacity-expansion.yml | 590 +++++++++--------- .github/workflows/codeql-analysis.yml | 140 ++--- .github/workflows/ds-influxdb.yml | 408 ++++++------ .github/workflows/ds-iotdb.yml | 476 +++++++------- .github/workflows/ds-parquet.yml | 258 ++++---- .github/workflows/func-transform.yml | 168 ++--- .github/workflows/func-udf.yml | 184 +++--- .github/workflows/scale-out.yml | 762 +++++++++++------------ .github/workflows/unit-mds.yml | 160 ++--- 10 files changed, 1671 insertions(+), 1671 deletions(-) diff --git a/.github/workflows/api-rest.yml b/.github/workflows/api-rest.yml index 810e7f102..d1c9255a5 100644 --- a/.github/workflows/api-rest.yml +++ b/.github/workflows/api-rest.yml @@ -1,98 +1,98 @@ -#name: "API-Test-RESTful" -# -#on: -# push: -# branches: -# - main -# pull_request: -# branches: -# - main -#env: -# VERSION: 0.6.0-SNAPSHOT -# -#concurrency: -# group: ${{ github.workflow }}-${{ github.ref }} -# cancel-in-progress: true -# -#jobs: -# Annotation-Test: -# strategy: -# fail-fast: false -# #max-parallel: 20 -# matrix: -# java: [ 8 ] -# python-version: [ "3.7" ] -# os: [ ubuntu-latest, macos-latest ] -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v2 -# - name: Environmet Dependence -# uses: ./.github/actions/dependence -# with: -# python-version: ${{ matrix.python-version }} -# java: ${{ matrix.java }} -# -# - name: Run ZooKeeper -# uses: ./.github/actions/zookeeperRunner -# -# - name: Run IoTDB -# uses: ./.github/actions/iotdbRunner -# with: -# if-CapExp: "false" -# version: iotdb11 -# -# - name: Install with Maven -# run: mvn clean package -DskipTests -# -# - name: Start IginX -# uses: ./.github/actions/iginxRunner -# with: -# version: ${VERSION} -# -# - name: A Lame Integration Test with Maven for IoTDB -# run: mvn test -q -Dtest=RestAnnotationIT -DfailIfNoTests=false -# - uses: codecov/codecov-action@v1 -# with: -# file: ./**/target/site/jacoco/jacoco.xml -# name: codecov -# -# REST-Test: -# strategy: -# fail-fast: false -# #max-parallel: 20 -# matrix: -# java: [ 8 ] -# python-version: [ "3.7" ] -# os: [ ubuntu-latest, macos-latest ] -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v2 -# - name: Environmet Dependence -# uses: ./.github/actions/dependence -# with: -# python-version: ${{ matrix.python-version }} -# java: ${{ matrix.java }} -# -# - name: Run ZooKeeper -# uses: ./.github/actions/zookeeperRunner -# -# - name: Run IoTDB -# uses: ./.github/actions/iotdbRunner -# with: -# if-CapExp: "false" -# version: iotdb11 -# -# - name: Install with Maven -# run: mvn clean package -DskipTests -# -# - name: Start IginX -# uses: ./.github/actions/iginxRunner -# with: -# version: ${VERSION} -# -# - name: A Lame Integration Test with Maven for IoTDB -# run: mvn test -q -Dtest=RestIT -DfailIfNoTests=false -# - uses: codecov/codecov-action@v1 -# with: -# file: ./**/target/site/jacoco/jacoco.xml -# name: codecov +name: "API-Test-RESTful" + +on: + push: + branches: + - main + pull_request: + branches: + - main +env: + VERSION: 0.6.0-SNAPSHOT + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + Annotation-Test: + strategy: + fail-fast: false + #max-parallel: 20 + matrix: + java: [ 8 ] + python-version: [ "3.7" ] + os: [ ubuntu-latest, macos-latest ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Environmet Dependence + uses: ./.github/actions/dependence + with: + python-version: ${{ matrix.python-version }} + java: ${{ matrix.java }} + + - name: Run ZooKeeper + uses: ./.github/actions/zookeeperRunner + + - name: Run IoTDB + uses: ./.github/actions/iotdbRunner + with: + if-CapExp: "false" + version: iotdb11 + + - name: Install with Maven + run: mvn clean package -DskipTests + + - name: Start IginX + uses: ./.github/actions/iginxRunner + with: + version: ${VERSION} + + - name: A Lame Integration Test with Maven for IoTDB + run: mvn test -q -Dtest=RestAnnotationIT -DfailIfNoTests=false + - uses: codecov/codecov-action@v1 + with: + file: ./**/target/site/jacoco/jacoco.xml + name: codecov + + REST-Test: + strategy: + fail-fast: false + #max-parallel: 20 + matrix: + java: [ 8 ] + python-version: [ "3.7" ] + os: [ ubuntu-latest, macos-latest ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Environmet Dependence + uses: ./.github/actions/dependence + with: + python-version: ${{ matrix.python-version }} + java: ${{ matrix.java }} + + - name: Run ZooKeeper + uses: ./.github/actions/zookeeperRunner + + - name: Run IoTDB + uses: ./.github/actions/iotdbRunner + with: + if-CapExp: "false" + version: iotdb11 + + - name: Install with Maven + run: mvn clean package -DskipTests + + - name: Start IginX + uses: ./.github/actions/iginxRunner + with: + version: ${VERSION} + + - name: A Lame Integration Test with Maven for IoTDB + run: mvn test -q -Dtest=RestIT -DfailIfNoTests=false + - uses: codecov/codecov-action@v1 + with: + file: ./**/target/site/jacoco/jacoco.xml + name: codecov diff --git a/.github/workflows/capacity-expansion.yml b/.github/workflows/capacity-expansion.yml index 00ddb9f60..8fdff4be4 100644 --- a/.github/workflows/capacity-expansion.yml +++ b/.github/workflows/capacity-expansion.yml @@ -1,295 +1,295 @@ -#name: "Capacity-Expansions-On-IoTDB" -#on: -# push: -# branches: -# - main -# pull_request: -# branches: -# - main -#env: -# VERSION: 0.6.0-SNAPSHOT -#concurrency: -# group: ${{ github.workflow }}-${{ github.ref }} -# cancel-in-progress: true -# -#jobs: -# IoTDB-Test: -# timeout-minutes: 20 -# strategy: -# fail-fast: false -# matrix: -# java: [ 8 ] -# python-version: [ "3.7" ] -# os: [ ubuntu-latest, macos-latest ] -# DB-name: [ "iotdb11", "iotdb12" ] -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v2 -# - name: Environmet Dependence -# uses: ./.github/actions/dependence -# with: -# python-version: ${{ matrix.python-version }} -# java: ${{ matrix.java }} -# - name: Run ZooKeeper -# uses: ./.github/actions/zookeeperRunner -# - name: Run IoTDB -# uses: ./.github/actions/iotdbRunner -# with: -# version: ${{matrix.DB-name}} -# -# - name: Change pom -# run: | -# mv test/pom.xml test/pom.xml.backup -# mv test/pom.xml.${{matrix.DB-name}} test/pom.xml -# - name: Install IginX with Maven -# shell: bash -# run: | -# mvn clean package -DskipTests -# -# #第 1 阶段测试开始========================================== -# - name: Prepare CapExp environment -# if: always() -# uses: ./.github/actions/capacityExpansionUnionTest -# with: -# version: ${VERSION} -# DB-name: ${{matrix.DB-name}} -# Test-Way: oriHasDataExpHasData -# -# - name: oriHasDataExpHasData IT -# if: always() -# run: | -# if [ "${{matrix.DB-name}}" == "iotdb11" ]; then -# mvn test -q -Dtest=IoTDB11HistoryDataCapacityExpansionIT#oriHasDataExpHasData -DfailIfNoTests=false -# elif [ "${{matrix.DB-name}}" == "iotdb12" ]; then -# mvn test -q -Dtest=IoTDB12HistoryDataCapacityExpansionIT#oriHasDataExpHasData -DfailIfNoTests=false -# fi -# -# #第 2 阶段测试开始========================================== -# - name: Prepare CapExp environment -# if: always() -# uses: ./.github/actions/capacityExpansionUnionTest -# with: -# version: ${VERSION} -# DB-name: ${{matrix.DB-name}} -# Test-Way: oriNoDataExpNoData -# -# - name: oriNoDataExpNoData IT -# if: always() -# run: | -# if [ "${{matrix.DB-name}}" == "iotdb11" ]; then -# mvn test -q -Dtest=IoTDB11HistoryDataCapacityExpansionIT#oriNoDataExpNoData -DfailIfNoTests=false -# elif [ "${{matrix.DB-name}}" == "iotdb12" ]; then -# mvn test -q -Dtest=IoTDB12HistoryDataCapacityExpansionIT#oriNoDataExpNoData -DfailIfNoTests=false -# fi -# -# #第 3 阶段测试开始========================================== -# - name: Prepare CapExp environment -# if: always() -# uses: ./.github/actions/capacityExpansionUnionTest -# with: -# version: ${VERSION} -# DB-name: ${{matrix.DB-name}} -# Test-Way: oriHasDataExpNoData -# -# - name: oriHasDataExpNoData IT -# if: always() -# run: | -# if [ "${{matrix.DB-name}}" == "iotdb11" ]; then -# mvn test -q -Dtest=IoTDB11HistoryDataCapacityExpansionIT#oriHasDataExpNoData -DfailIfNoTests=false -# elif [ "${{matrix.DB-name}}" == "iotdb12" ]; then -# mvn test -q -Dtest=IoTDB12HistoryDataCapacityExpansionIT#oriHasDataExpNoData -DfailIfNoTests=false -# fi -# -# #第 4 阶段测试开始========================================== -# - name: Prepare CapExp environment -# if: always() -# uses: ./.github/actions/capacityExpansionUnionTest -# with: -# version: ${VERSION} -# DB-name: ${{matrix.DB-name}} -# Test-Way: oriNoDataExpHasData -# -# - name: oriNoDataExpHasData IT -# if: always() -# run: | -# if [ "${{matrix.DB-name}}" == "iotdb11" ]; then -# mvn test -q -Dtest=IoTDB11HistoryDataCapacityExpansionIT#oriNoDataExpHasData -DfailIfNoTests=false -# elif [ "${{matrix.DB-name}}" == "iotdb12" ]; then -# mvn test -q -Dtest=IoTDB12HistoryDataCapacityExpansionIT#oriNoDataExpHasData -DfailIfNoTests=false -# fi -# -# - uses: codecov/codecov-action@v1 -# with: -# file: ./**/target/site/jacoco/jacoco.xml -# name: codecov -# -# SchemaPrefix-Test-IotDB: -# timeout-minutes: 20 -# strategy: -# fail-fast: false -# matrix: -# java: [ 8 ] -# python-version: [ "3.7" ] -# os: [ ubuntu-latest, macos-latest ] -# DB-name: [ "iotdb11", "iotdb12" ] -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v2 -# - name: Environmet Dependence -# uses: ./.github/actions/dependence -# with: -# python-version: ${{ matrix.python-version }} -# java: ${{ matrix.java }} -# - name: Run ZooKeeper -# uses: ./.github/actions/zookeeperRunner -# - name: Run IoTDB -# uses: ./.github/actions/iotdbRunner -# with: -# version: ${{matrix.DB-name}} -# -# - name: Change pom -# run: | -# mv test/pom.xml test/pom.xml.backup -# mv test/pom.xml.${{matrix.DB-name}} test/pom.xml -# - name: Install IginX with Maven -# shell: bash -# run: | -# mvn clean package -DskipTests -# -# #第 1 阶段测试开始========================================== -# - name: Prepare CapExp environment -# uses: ./.github/actions/capacityExpansionUnionTest -# with: -# version: ${VERSION} -# DB-name: ${{matrix.DB-name}} -# Test-Way: oriNoDataExpHasData -# -# - name: schema prefix IT -# run: | -# if [ "${{matrix.DB-name}}" == "iotdb11" ]; then -# mvn test -q -Dtest=IoTDB11HistoryDataCapacityExpansionIT#schemaPrefix -DfailIfNoTests=false -# elif [ "${{matrix.DB-name}}" == "iotdb12" ]; then -# mvn test -q -Dtest=IoTDB12HistoryDataCapacityExpansionIT#schemaPrefix -DfailIfNoTests=false -# fi -# -# DataPrefixWithMultiSchemaPrefix-Test-InfluxDB: -# timeout-minutes: 20 -# strategy: -# fail-fast: false -# #max-parallel: 20 -# matrix: -# java: [ 8 ] -# python-version: [ "3.7" ] -# os: [ ubuntu-latest, macos-latest ] -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v2 -# - name: Set up Python ${{ matrix.python-version }} -# uses: actions/setup-python@v3 -# with: -# python-version: ${{ matrix.python-version }} -# - name: Install Python dependencies -# run: | -# python -m pip install --upgrade pip -# - name: Set up JDK ${{ matrix.java }} -# uses: actions/setup-java@v1 -# with: -# java-version: ${{ matrix.java }} -# - name: Run ZooKeeper -# run: | -# if [ "$RUNNER_OS" == "Linux" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" -# "${GITHUB_WORKSPACE}/.github/zk.sh" -# elif [ "$RUNNER_OS" == "macOS" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" -# "${GITHUB_WORKSPACE}/.github/zk_macos.sh" -# else -# echo "$RUNNER_OS is not supported" -# exit 1 -# fi -# - name: Run InfluxDB -# run: | -# if [ "$RUNNER_OS" == "Linux" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/influxdb_history_data_add.sh" -# "${GITHUB_WORKSPACE}/.github/influxdb_history_data_add.sh" -# elif [ "$RUNNER_OS" == "macOS" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/influxdb_history_data_add_macos.sh" -# "${GITHUB_WORKSPACE}/.github/influxdb_history_data_add_macos.sh" -# else -# echo "$RUNNER_OS is not supported" -# exit 1 -# fi -# - name: Run IoTDB -# uses: ./.github/actions/iotdbRunner -# with: -# version: iotdb11 -# - name: Change pom -# run: | -# mv test/pom.xml test/pom.xml.backup -# mv test/pom.xml.iotdb11 test/pom.xml -# - name: Install with Maven -# run: mvn clean package -DskipTests -# - name: Write history Data -# run: | -# mvn test -q -Dtest=InfluxDBHistoryDataGeneratorTest -DfailIfNoTests=false -# sleep 5 -# - name: Start IginX -# run: | -# chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" -# nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & -# -# - name: Add Same DataPrefix With DiffSchemaPrefix IT -# run: | -# mvn test -q -Dtest=InfluxDBHistoryDataCapacityExpansionIT#testAddSameDataPrefixWithDiffSchemaPrefix -DfailIfNoTests=false -# -# DataPrefixWithMultiSchemaPrefix-Test-IotDB: -# timeout-minutes: 20 -# strategy: -# fail-fast: false -# matrix: -# java: [ 8 ] -# python-version: [ "3.7" ] -# os: [ ubuntu-latest, macos-latest ] -# DB-name: [ "iotdb11", "iotdb12" ] -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v2 -# - name: Environmet Dependence -# uses: ./.github/actions/dependence -# with: -# python-version: ${{ matrix.python-version }} -# java: ${{ matrix.java }} -# - name: Run ZooKeeper -# uses: ./.github/actions/zookeeperRunner -# - name: Run IoTDB -# uses: ./.github/actions/iotdbRunner -# with: -# version: ${{matrix.DB-name}} -# -# - name: Change pom -# run: | -# mv test/pom.xml test/pom.xml.backup -# mv test/pom.xml.${{matrix.DB-name}} test/pom.xml -# - name: Install IginX with Maven -# shell: bash -# run: | -# mvn clean package -DskipTests -# - name: Prepare CapExp environment -# uses: ./.github/actions/capacityExpansionUnionTest -# with: -# version: ${VERSION} -# DB-name: ${{matrix.DB-name}} -# Test-Way: oriNoDataExpHasData -# -# - name: Write Extra Data to Expansion Node -# uses: ./.github/actions/iotdbWriter -# with: -# Test-Way: extraDataWrite -# -# - name: data prefix IT -# run: | -# if [ "${{matrix.DB-name}}" == "iotdb11" ]; then -# mvn test -q -Dtest=IoTDB11HistoryDataCapacityExpansionIT#testAddSameDataPrefixWithDiffSchemaPrefix -DfailIfNoTests=false -# elif [ "${{matrix.DB-name}}" == "iotdb12" ]; then -# mvn test -q -Dtest=IoTDB12HistoryDataCapacityExpansionIT#testAddSameDataPrefixWithDiffSchemaPrefix -DfailIfNoTests=false -# fi \ No newline at end of file +name: "Capacity-Expansions-On-IoTDB" +on: + push: + branches: + - main + pull_request: + branches: + - main +env: + VERSION: 0.6.0-SNAPSHOT +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + IoTDB-Test: + timeout-minutes: 20 + strategy: + fail-fast: false + matrix: + java: [ 8 ] + python-version: [ "3.7" ] + os: [ ubuntu-latest, macos-latest ] + DB-name: [ "iotdb11", "iotdb12" ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Environmet Dependence + uses: ./.github/actions/dependence + with: + python-version: ${{ matrix.python-version }} + java: ${{ matrix.java }} + - name: Run ZooKeeper + uses: ./.github/actions/zookeeperRunner + - name: Run IoTDB + uses: ./.github/actions/iotdbRunner + with: + version: ${{matrix.DB-name}} + + - name: Change pom + run: | + mv test/pom.xml test/pom.xml.backup + mv test/pom.xml.${{matrix.DB-name}} test/pom.xml + - name: Install IginX with Maven + shell: bash + run: | + mvn clean package -DskipTests + + #第 1 阶段测试开始========================================== + - name: Prepare CapExp environment + if: always() + uses: ./.github/actions/capacityExpansionUnionTest + with: + version: ${VERSION} + DB-name: ${{matrix.DB-name}} + Test-Way: oriHasDataExpHasData + + - name: oriHasDataExpHasData IT + if: always() + run: | + if [ "${{matrix.DB-name}}" == "iotdb11" ]; then + mvn test -q -Dtest=IoTDB11HistoryDataCapacityExpansionIT#oriHasDataExpHasData -DfailIfNoTests=false + elif [ "${{matrix.DB-name}}" == "iotdb12" ]; then + mvn test -q -Dtest=IoTDB12HistoryDataCapacityExpansionIT#oriHasDataExpHasData -DfailIfNoTests=false + fi + + #第 2 阶段测试开始========================================== + - name: Prepare CapExp environment + if: always() + uses: ./.github/actions/capacityExpansionUnionTest + with: + version: ${VERSION} + DB-name: ${{matrix.DB-name}} + Test-Way: oriNoDataExpNoData + + - name: oriNoDataExpNoData IT + if: always() + run: | + if [ "${{matrix.DB-name}}" == "iotdb11" ]; then + mvn test -q -Dtest=IoTDB11HistoryDataCapacityExpansionIT#oriNoDataExpNoData -DfailIfNoTests=false + elif [ "${{matrix.DB-name}}" == "iotdb12" ]; then + mvn test -q -Dtest=IoTDB12HistoryDataCapacityExpansionIT#oriNoDataExpNoData -DfailIfNoTests=false + fi + + #第 3 阶段测试开始========================================== + - name: Prepare CapExp environment + if: always() + uses: ./.github/actions/capacityExpansionUnionTest + with: + version: ${VERSION} + DB-name: ${{matrix.DB-name}} + Test-Way: oriHasDataExpNoData + + - name: oriHasDataExpNoData IT + if: always() + run: | + if [ "${{matrix.DB-name}}" == "iotdb11" ]; then + mvn test -q -Dtest=IoTDB11HistoryDataCapacityExpansionIT#oriHasDataExpNoData -DfailIfNoTests=false + elif [ "${{matrix.DB-name}}" == "iotdb12" ]; then + mvn test -q -Dtest=IoTDB12HistoryDataCapacityExpansionIT#oriHasDataExpNoData -DfailIfNoTests=false + fi + + #第 4 阶段测试开始========================================== + - name: Prepare CapExp environment + if: always() + uses: ./.github/actions/capacityExpansionUnionTest + with: + version: ${VERSION} + DB-name: ${{matrix.DB-name}} + Test-Way: oriNoDataExpHasData + + - name: oriNoDataExpHasData IT + if: always() + run: | + if [ "${{matrix.DB-name}}" == "iotdb11" ]; then + mvn test -q -Dtest=IoTDB11HistoryDataCapacityExpansionIT#oriNoDataExpHasData -DfailIfNoTests=false + elif [ "${{matrix.DB-name}}" == "iotdb12" ]; then + mvn test -q -Dtest=IoTDB12HistoryDataCapacityExpansionIT#oriNoDataExpHasData -DfailIfNoTests=false + fi + + - uses: codecov/codecov-action@v1 + with: + file: ./**/target/site/jacoco/jacoco.xml + name: codecov + + SchemaPrefix-Test-IotDB: + timeout-minutes: 20 + strategy: + fail-fast: false + matrix: + java: [ 8 ] + python-version: [ "3.7" ] + os: [ ubuntu-latest, macos-latest ] + DB-name: [ "iotdb11", "iotdb12" ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Environmet Dependence + uses: ./.github/actions/dependence + with: + python-version: ${{ matrix.python-version }} + java: ${{ matrix.java }} + - name: Run ZooKeeper + uses: ./.github/actions/zookeeperRunner + - name: Run IoTDB + uses: ./.github/actions/iotdbRunner + with: + version: ${{matrix.DB-name}} + + - name: Change pom + run: | + mv test/pom.xml test/pom.xml.backup + mv test/pom.xml.${{matrix.DB-name}} test/pom.xml + - name: Install IginX with Maven + shell: bash + run: | + mvn clean package -DskipTests + + #第 1 阶段测试开始========================================== + - name: Prepare CapExp environment + uses: ./.github/actions/capacityExpansionUnionTest + with: + version: ${VERSION} + DB-name: ${{matrix.DB-name}} + Test-Way: oriNoDataExpHasData + + - name: schema prefix IT + run: | + if [ "${{matrix.DB-name}}" == "iotdb11" ]; then + mvn test -q -Dtest=IoTDB11HistoryDataCapacityExpansionIT#schemaPrefix -DfailIfNoTests=false + elif [ "${{matrix.DB-name}}" == "iotdb12" ]; then + mvn test -q -Dtest=IoTDB12HistoryDataCapacityExpansionIT#schemaPrefix -DfailIfNoTests=false + fi + + DataPrefixWithMultiSchemaPrefix-Test-InfluxDB: + timeout-minutes: 20 + strategy: + fail-fast: false + #max-parallel: 20 + matrix: + java: [ 8 ] + python-version: [ "3.7" ] + os: [ ubuntu-latest, macos-latest ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Run ZooKeeper + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" + "${GITHUB_WORKSPACE}/.github/zk.sh" + elif [ "$RUNNER_OS" == "macOS" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" + "${GITHUB_WORKSPACE}/.github/zk_macos.sh" + else + echo "$RUNNER_OS is not supported" + exit 1 + fi + - name: Run InfluxDB + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/influxdb_history_data_add.sh" + "${GITHUB_WORKSPACE}/.github/influxdb_history_data_add.sh" + elif [ "$RUNNER_OS" == "macOS" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/influxdb_history_data_add_macos.sh" + "${GITHUB_WORKSPACE}/.github/influxdb_history_data_add_macos.sh" + else + echo "$RUNNER_OS is not supported" + exit 1 + fi + - name: Run IoTDB + uses: ./.github/actions/iotdbRunner + with: + version: iotdb11 + - name: Change pom + run: | + mv test/pom.xml test/pom.xml.backup + mv test/pom.xml.iotdb11 test/pom.xml + - name: Install with Maven + run: mvn clean package -DskipTests + - name: Write history Data + run: | + mvn test -q -Dtest=InfluxDBHistoryDataGeneratorTest -DfailIfNoTests=false + sleep 5 + - name: Start IginX + run: | + chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" + nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & + + - name: Add Same DataPrefix With DiffSchemaPrefix IT + run: | + mvn test -q -Dtest=InfluxDBHistoryDataCapacityExpansionIT#testAddSameDataPrefixWithDiffSchemaPrefix -DfailIfNoTests=false + + DataPrefixWithMultiSchemaPrefix-Test-IotDB: + timeout-minutes: 20 + strategy: + fail-fast: false + matrix: + java: [ 8 ] + python-version: [ "3.7" ] + os: [ ubuntu-latest, macos-latest ] + DB-name: [ "iotdb11", "iotdb12" ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Environmet Dependence + uses: ./.github/actions/dependence + with: + python-version: ${{ matrix.python-version }} + java: ${{ matrix.java }} + - name: Run ZooKeeper + uses: ./.github/actions/zookeeperRunner + - name: Run IoTDB + uses: ./.github/actions/iotdbRunner + with: + version: ${{matrix.DB-name}} + + - name: Change pom + run: | + mv test/pom.xml test/pom.xml.backup + mv test/pom.xml.${{matrix.DB-name}} test/pom.xml + - name: Install IginX with Maven + shell: bash + run: | + mvn clean package -DskipTests + - name: Prepare CapExp environment + uses: ./.github/actions/capacityExpansionUnionTest + with: + version: ${VERSION} + DB-name: ${{matrix.DB-name}} + Test-Way: oriNoDataExpHasData + + - name: Write Extra Data to Expansion Node + uses: ./.github/actions/iotdbWriter + with: + Test-Way: extraDataWrite + + - name: data prefix IT + run: | + if [ "${{matrix.DB-name}}" == "iotdb11" ]; then + mvn test -q -Dtest=IoTDB11HistoryDataCapacityExpansionIT#testAddSameDataPrefixWithDiffSchemaPrefix -DfailIfNoTests=false + elif [ "${{matrix.DB-name}}" == "iotdb12" ]; then + mvn test -q -Dtest=IoTDB12HistoryDataCapacityExpansionIT#testAddSameDataPrefixWithDiffSchemaPrefix -DfailIfNoTests=false + fi \ No newline at end of file diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 1c16f4955..d6fd0008b 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,73 +1,73 @@ -## For most projects, this workflow file will not need changing; you simply need -## to commit it to your repository. -## -## You may wish to alter this file to override the set of languages analyzed, -## or to provide custom queries or build logic. -## -## ******** NOTE ******** -## We have attempted to detect the languages in your repository. Please check -## the `language` matrix defined below to confirm you have the correct set of -## supported CodeQL languages. -## -#name: "CodeQL" +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. # -#on: -# push: -# branches: -# - main -# pull_request: -# # The branches below must be a subset of the branches above -# branches: -# - main -# schedule: -# - cron: '22 22 * * 6' +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. # -#concurrency: -# group: ${{ github.workflow }}-${{ github.ref }} -# cancel-in-progress: true +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. # -#jobs: -# analyze: -# name: Analyze -# runs-on: ubuntu-latest -# -# strategy: -# fail-fast: false -# matrix: -# language: [ 'java' ] -# # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] -# # Learn more: -# # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed -# -# steps: -# - name: Checkout repository -# uses: actions/checkout@v2 -# -# # Initializes the CodeQL tools for scanning. -# - name: Initialize CodeQL -# uses: github/codeql-action/init@v1 -# with: -# languages: ${{ matrix.language }} -# # If you wish to specify custom queries, you can do so here or in a config file. -# # By default, queries listed here will override any specified in a config file. -# # Prefix the list here with "+" to use these queries and those in the config file. -# # queries: ./path/to/local/query, your-org/your-repo/queries@main -# -# # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). -# # If this step fails, then you should remove it and run the build manually (see below) -# - name: Autobuild -# uses: github/codeql-action/autobuild@v1 -# -# # ℹ️ Command-line programs to run using the OS shell. -# # 📚 https://git.io/JvXDl -# -# # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines -# # and modify them (or add more) to build your code if your project -# # uses a compiled language -# -# #- run: | -# # make bootstrap -# # make release -# -# - name: Perform CodeQL Analysis -# uses: github/codeql-action/analyze@v1 +name: "CodeQL" + +on: + push: + branches: + - main + pull_request: + # The branches below must be a subset of the branches above + branches: + - main + schedule: + - cron: '22 22 * * 6' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + language: [ 'java' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + # Learn more: + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/ds-influxdb.yml b/.github/workflows/ds-influxdb.yml index f5c2d1383..30304d4c9 100644 --- a/.github/workflows/ds-influxdb.yml +++ b/.github/workflows/ds-influxdb.yml @@ -1,204 +1,204 @@ -#name: "System-IT-ds-InfluxDB" -# -#on: -# push: -# branches: -# - main -# pull_request: -# branches: -# - main -#env: -# VERSION: 0.6.0-SNAPSHOT -# -#concurrency: -# group: ${{ github.workflow }}-${{ github.ref }} -# cancel-in-progress: true -# -#jobs: -# InfluxDB-Capacity-Expansion-Test: -# strategy: -# fail-fast: false -# #max-parallel: 20 -# matrix: -# java: [ 8 ] -# python-version: [ "3.7" ] -# os: [ ubuntu-latest, macos-latest ] -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v2 -# - name: Set up Python ${{ matrix.python-version }} -# uses: actions/setup-python@v3 -# with: -# python-version: ${{ matrix.python-version }} -# - name: Install Python dependencies -# run: | -# python -m pip install --upgrade pip -# - name: Set up JDK ${{ matrix.java }} -# uses: actions/setup-java@v1 -# with: -# java-version: ${{ matrix.java }} -# - name: Run ZooKeeper -# run: | -# if [ "$RUNNER_OS" == "Linux" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" -# "${GITHUB_WORKSPACE}/.github/zk.sh" -# elif [ "$RUNNER_OS" == "macOS" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" -# "${GITHUB_WORKSPACE}/.github/zk_macos.sh" -# else -# echo "$RUNNER_OS is not supported" -# exit 1 -# fi -# - name: Run InfluxDB and change default config -# run: | -# if [ "$RUNNER_OS" == "Linux" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/influxdb_history_data.sh" -# "${GITHUB_WORKSPACE}/.github/influxdb_history_data.sh" -# elif [ "$RUNNER_OS" == "macOS" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/influxdb_history_data_macos.sh" -# "${GITHUB_WORKSPACE}/.github/influxdb_history_data_macos.sh" -# else -# echo "$RUNNER_OS is not supported" -# exit 1 -# fi -# - name: Install with Maven -# run: mvn clean package -DskipTests -# - name: Write history Data -# run: | -# mvn test -q -Dtest=InfluxDBHistoryDataGeneratorTest -DfailIfNoTests=false -# sleep 10 -# - name: Start IginX -# run: | -# chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" -# nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & -# -# -# InfluxDB-SQL-Test: -# strategy: -# fail-fast: false -# #max-parallel: 20 -# matrix: -# java: [ 8 ] -# python-version: [ "3.7" ] -# os: [ ubuntu-latest, macos-latest ] -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v2 -# - name: Set up Python ${{ matrix.python-version }} -# uses: actions/setup-python@v3 -# with: -# python-version: ${{ matrix.python-version }} -# - name: Install Python dependencies -# run: | -# python -m pip install --upgrade pip -# - name: Set up JDK ${{ matrix.java }} -# uses: actions/setup-java@v1 -# with: -# java-version: ${{ matrix.java }} -# - name: Cache Maven packages -# uses: actions/cache@v2.1.5 -# with: -# path: ~/.m2 -# key: ${{ runner.os }}-m2-${{ hashFiles('/pom.xml') }} -# restore-keys: ${{ runner.os }}-m2 -# - name: Run ZooKeeper -# run: | -# if [ "$RUNNER_OS" == "Linux" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" -# "${GITHUB_WORKSPACE}/.github/zk.sh" -# elif [ "$RUNNER_OS" == "macOS" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" -# "${GITHUB_WORKSPACE}/.github/zk_macos.sh" -# else -# echo "$RUNNER_OS is not supported" -# exit 1 -# fi -# - name: Run InfluxDB -# run: | -# if [ "$RUNNER_OS" == "Linux" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/influxdb.sh" -# "${GITHUB_WORKSPACE}/.github/influxdb.sh" -# elif [ "$RUNNER_OS" == "macOS" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/influxdb_macos.sh" -# "${GITHUB_WORKSPACE}/.github/influxdb_macos.sh" -# else -# echo "$RUNNER_OS is not supported" -# exit 1 -# fi -# - name: Install with Maven -# run: mvn clean package -DskipTests -# - name: Start IginX -# run: | -# chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" -# nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & -# - name: A Lame Integration Test with Maven for SQL -# run: mvn test -q -Dtest=InfluxDBSQLSessionIT -DfailIfNoTests=false -# - uses: codecov/codecov-action@v1 -# with: -# file: ./**/target/site/jacoco/jacoco.xml -# name: codecov -# -# InfluxDB-SQL-SessionPool-Test: -# strategy: -# fail-fast: false -# #max-parallel: 20 -# matrix: -# java: [ 8 ] -# python-version: [ "3.7" ] -# os: [ ubuntu-latest, macos-latest ] -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v2 -# - name: Set up Python ${{ matrix.python-version }} -# uses: actions/setup-python@v3 -# with: -# python-version: ${{ matrix.python-version }} -# - name: Install Python dependencies -# run: | -# python -m pip install --upgrade pip -# - name: Set up JDK ${{ matrix.java }} -# uses: actions/setup-java@v1 -# with: -# java-version: ${{ matrix.java }} -# - name: Cache Maven packages -# uses: actions/cache@v2.1.5 -# with: -# path: ~/.m2 -# key: ${{ runner.os }}-m2-${{ hashFiles('/pom.xml') }} -# restore-keys: ${{ runner.os }}-m2 -# - name: Run ZooKeeper -# run: | -# if [ "$RUNNER_OS" == "Linux" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" -# "${GITHUB_WORKSPACE}/.github/zk.sh" -# elif [ "$RUNNER_OS" == "macOS" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" -# "${GITHUB_WORKSPACE}/.github/zk_macos.sh" -# else -# echo "$RUNNER_OS is not supported" -# exit 1 -# fi -# - name: Run InfluxDB -# run: | -# if [ "$RUNNER_OS" == "Linux" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/influxdb.sh" -# "${GITHUB_WORKSPACE}/.github/influxdb.sh" -# elif [ "$RUNNER_OS" == "macOS" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/influxdb_macos.sh" -# "${GITHUB_WORKSPACE}/.github/influxdb_macos.sh" -# else -# echo "$RUNNER_OS is not supported" -# exit 1 -# fi -# - name: Install with Maven -# run: mvn clean package -DskipTests -# - name: Start IginX -# run: | -# chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" -# nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & -# - name: A Lame Integration Test with Maven for SQL -# run: mvn test -q -Dtest=InfluxDBSQLSessionPoolIT -DfailIfNoTests=false -# - uses: codecov/codecov-action@v1 -# with: -# file: ./**/target/site/jacoco/jacoco.xml -# name: codecov +name: "System-IT-ds-InfluxDB" + +on: + push: + branches: + - main + pull_request: + branches: + - main +env: + VERSION: 0.6.0-SNAPSHOT + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + InfluxDB-Capacity-Expansion-Test: + strategy: + fail-fast: false + #max-parallel: 20 + matrix: + java: [ 8 ] + python-version: [ "3.7" ] + os: [ ubuntu-latest, macos-latest ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Run ZooKeeper + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" + "${GITHUB_WORKSPACE}/.github/zk.sh" + elif [ "$RUNNER_OS" == "macOS" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" + "${GITHUB_WORKSPACE}/.github/zk_macos.sh" + else + echo "$RUNNER_OS is not supported" + exit 1 + fi + - name: Run InfluxDB and change default config + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/influxdb_history_data.sh" + "${GITHUB_WORKSPACE}/.github/influxdb_history_data.sh" + elif [ "$RUNNER_OS" == "macOS" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/influxdb_history_data_macos.sh" + "${GITHUB_WORKSPACE}/.github/influxdb_history_data_macos.sh" + else + echo "$RUNNER_OS is not supported" + exit 1 + fi + - name: Install with Maven + run: mvn clean package -DskipTests + - name: Write history Data + run: | + mvn test -q -Dtest=InfluxDBHistoryDataGeneratorTest -DfailIfNoTests=false + sleep 10 + - name: Start IginX + run: | + chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" + nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & + + + InfluxDB-SQL-Test: + strategy: + fail-fast: false + #max-parallel: 20 + matrix: + java: [ 8 ] + python-version: [ "3.7" ] + os: [ ubuntu-latest, macos-latest ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Cache Maven packages + uses: actions/cache@v2.1.5 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Run ZooKeeper + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" + "${GITHUB_WORKSPACE}/.github/zk.sh" + elif [ "$RUNNER_OS" == "macOS" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" + "${GITHUB_WORKSPACE}/.github/zk_macos.sh" + else + echo "$RUNNER_OS is not supported" + exit 1 + fi + - name: Run InfluxDB + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/influxdb.sh" + "${GITHUB_WORKSPACE}/.github/influxdb.sh" + elif [ "$RUNNER_OS" == "macOS" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/influxdb_macos.sh" + "${GITHUB_WORKSPACE}/.github/influxdb_macos.sh" + else + echo "$RUNNER_OS is not supported" + exit 1 + fi + - name: Install with Maven + run: mvn clean package -DskipTests + - name: Start IginX + run: | + chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" + nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & + - name: A Lame Integration Test with Maven for SQL + run: mvn test -q -Dtest=InfluxDBSQLSessionIT -DfailIfNoTests=false + - uses: codecov/codecov-action@v1 + with: + file: ./**/target/site/jacoco/jacoco.xml + name: codecov + + InfluxDB-SQL-SessionPool-Test: + strategy: + fail-fast: false + #max-parallel: 20 + matrix: + java: [ 8 ] + python-version: [ "3.7" ] + os: [ ubuntu-latest, macos-latest ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Cache Maven packages + uses: actions/cache@v2.1.5 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Run ZooKeeper + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" + "${GITHUB_WORKSPACE}/.github/zk.sh" + elif [ "$RUNNER_OS" == "macOS" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" + "${GITHUB_WORKSPACE}/.github/zk_macos.sh" + else + echo "$RUNNER_OS is not supported" + exit 1 + fi + - name: Run InfluxDB + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/influxdb.sh" + "${GITHUB_WORKSPACE}/.github/influxdb.sh" + elif [ "$RUNNER_OS" == "macOS" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/influxdb_macos.sh" + "${GITHUB_WORKSPACE}/.github/influxdb_macos.sh" + else + echo "$RUNNER_OS is not supported" + exit 1 + fi + - name: Install with Maven + run: mvn clean package -DskipTests + - name: Start IginX + run: | + chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" + nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & + - name: A Lame Integration Test with Maven for SQL + run: mvn test -q -Dtest=InfluxDBSQLSessionPoolIT -DfailIfNoTests=false + - uses: codecov/codecov-action@v1 + with: + file: ./**/target/site/jacoco/jacoco.xml + name: codecov diff --git a/.github/workflows/ds-iotdb.yml b/.github/workflows/ds-iotdb.yml index a3cf36724..dedf8b089 100644 --- a/.github/workflows/ds-iotdb.yml +++ b/.github/workflows/ds-iotdb.yml @@ -1,238 +1,238 @@ -#name: "System-IT-ds-IoTDB" -# -#on: -# push: -# branches: -# - main -# pull_request: -# branches: -# - main -#env: -# VERSION: 0.6.0-SNAPSHOT -# -#concurrency: -# group: ${{ github.workflow }}-${{ github.ref }} -# cancel-in-progress: true -# -#jobs: -# IoTDB-Session-Test: -# strategy: -# fail-fast: false -# matrix: -# java: [ 8 ] -# python-version: [ "3.7" ] -# os: [ ubuntu-latest, macos-latest ] -# iotdb-version: [ iotdb11, iotdb12 ] -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v2 -# - name: Environmet Dependence -# uses: ./.github/actions/dependence -# with: -# python-version: ${{ matrix.python-version }} -# java: ${{ matrix.java }} -# -# - name: Run ZooKeeper -# uses: ./.github/actions/zookeeperRunner -# -# - name: Run IoTDB -# uses: ./.github/actions/iotdbRunner -# with: -# if-CapExp: "false" -# version: ${{ matrix.iotdb-version }} -# -# - name: Install with Maven -# run: mvn clean package -DskipTests -# -# - name: Start IginX -# uses: ./.github/actions/iginxRunner -# with: -# version: ${VERSION} -# -# - name: A Lame Integration Test with Maven for IoTDB -# run: | -# if [ ${{ matrix.iotdb-version }} == "iotdb11" ]; then -# mvn test -q -Dtest=IoTDB11SessionIT -DfailIfNoTests=false -# elif [ ${{ matrix.iotdb-version }} == "iotdb12" ]; then -# mvn test -q -Dtest=IoTDB12SessionIT -DfailIfNoTests=false -# else -# echo "${{ matrix.iotdb-version }} is not supported" -# exit 1 -# fi -# -# - uses: codecov/codecov-action@v1 -# with: -# file: ./**/target/site/jacoco/jacoco.xml -# name: codecov -# -# IoTDB-SQL-Test: -# strategy: -# fail-fast: false -# matrix: -# java: [ 8 ] -# python-version: [ "3.7" ] -# os: [ ubuntu-latest, macos-latest ] -# iotdb-version: [ iotdb11, iotdb12 ] -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v2 -# - name: Environmet Dependence -# uses: ./.github/actions/dependence -# with: -# python-version: ${{ matrix.python-version }} -# java: ${{ matrix.java }} -# -# - name: Run ZooKeeper -# uses: ./.github/actions/zookeeperRunner -# -# - name: Run IoTDB -# uses: ./.github/actions/iotdbRunner -# with: -# if-CapExp: "false" -# version: ${{ matrix.iotdb-version }} -# -# - name: Install with Maven -# run: mvn clean package -DskipTests -# -# - name: Start IginX -# uses: ./.github/actions/iginxRunner -# with: -# version: ${VERSION} -# -# - name: A Lame Integration Test with Maven for SQL -# run: mvn test -q -Dtest=IoTDBSQLSessionIT -DfailIfNoTests=false -# - uses: codecov/codecov-action@v1 -# with: -# file: ./**/target/site/jacoco/jacoco.xml -# name: codecov -# -# IoTDB-Tag-Test: -# strategy: -# fail-fast: false -# matrix: -# java: [ 8 ] -# python-version: [ "3.7" ] -# os: [ ubuntu-latest, macos-latest ] -# iotdb-version: [ iotdb11, iotdb12 ] -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v2 -# - name: Environmet Dependence -# uses: ./.github/actions/dependence -# with: -# python-version: ${{ matrix.python-version }} -# java: ${{ matrix.java }} -# -# - name: Run ZooKeeper -# uses: ./.github/actions/zookeeperRunner -# -# - name: Run IoTDB -# uses: ./.github/actions/iotdbRunner -# with: -# if-CapExp: "false" -# version: ${{ matrix.iotdb-version }} -# -# - name: Install with Maven -# run: mvn clean package -DskipTests -# -# - name: Start IginX -# uses: ./.github/actions/iginxRunner -# with: -# version: ${VERSION} -# -# - name: A Lame Integration Test with Maven for IoTDB -# run: mvn test -q -Dtest=TagIT -DfailIfNoTests=false -# - uses: codecov/codecov-action@v1 -# with: -# file: ./**/target/site/jacoco/jacoco.xml -# name: codecov -# -# IoTDB-SessionPool-Test: -# strategy: -# fail-fast: false -# matrix: -# java: [ 8 ] -# python-version: [ "3.7" ] -# os: [ ubuntu-latest, macos-latest ] -# iotdb-version: [ iotdb11, iotdb12 ] -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v2 -# - name: Environmet Dependence -# uses: ./.github/actions/dependence -# with: -# python-version: ${{ matrix.python-version }} -# java: ${{ matrix.java }} -# -# - name: Run ZooKeeper -# uses: ./.github/actions/zookeeperRunner -# -# - name: Run IoTDB -# uses: ./.github/actions/iotdbRunner -# with: -# if-CapExp: "false" -# version: ${{ matrix.iotdb-version }} -# -# - name: Install with Maven -# run: mvn clean package -DskipTests -# -# - name: Start IginX -# uses: ./.github/actions/iginxRunner -# with: -# version: ${VERSION} -# -# - name: A Lame Integration Test with Maven for IoTDB -# run: | -# if [ ${{ matrix.iotdb-version }} == "iotdb11" ]; then -# mvn test -q -Dtest=IoTDB11SessionPoolIT -DfailIfNoTests=false -# elif [ ${{ matrix.iotdb-version }} == "iotdb12" ]; then -# mvn test -q -Dtest=IoTDB12SessionPoolIT -DfailIfNoTests=false -# else -# echo "${{ matrix.iotdb-version }} is not supported" -# exit 1 -# fi -# - uses: codecov/codecov-action@v1 -# with: -# file: ./**/target/site/jacoco/jacoco.xml -# name: codecov -# -# IoTDB-SQL-SessionPool-Test: -# strategy: -# fail-fast: false -# matrix: -# java: [ 8 ] -# python-version: [ "3.7" ] -# os: [ ubuntu-latest, macos-latest ] -# iotdb-version: [ iotdb11, iotdb12 ] -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v2 -# - name: Environmet Dependence -# uses: ./.github/actions/dependence -# with: -# python-version: ${{ matrix.python-version }} -# java: ${{ matrix.java }} -# -# - name: Run ZooKeeper -# uses: ./.github/actions/zookeeperRunner -# -# - name: Run IoTDB -# uses: ./.github/actions/iotdbRunner -# with: -# if-CapExp: "false" -# version: ${{ matrix.iotdb-version }} -# -# - name: Install with Maven -# run: mvn clean package -DskipTests -# -# - name: Start IginX -# uses: ./.github/actions/iginxRunner -# with: -# version: ${VERSION} -# -# - name: A Lame Integration Test with Maven for SQL -# run: mvn test -q -Dtest=SQLSessionPoolIT -DfailIfNoTests=false -# - uses: codecov/codecov-action@v1 -# with: -# file: ./**/target/site/jacoco/jacoco.xml -# name: codecov +name: "System-IT-ds-IoTDB" + +on: + push: + branches: + - main + pull_request: + branches: + - main +env: + VERSION: 0.6.0-SNAPSHOT + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + IoTDB-Session-Test: + strategy: + fail-fast: false + matrix: + java: [ 8 ] + python-version: [ "3.7" ] + os: [ ubuntu-latest, macos-latest ] + iotdb-version: [ iotdb11, iotdb12 ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Environmet Dependence + uses: ./.github/actions/dependence + with: + python-version: ${{ matrix.python-version }} + java: ${{ matrix.java }} + + - name: Run ZooKeeper + uses: ./.github/actions/zookeeperRunner + + - name: Run IoTDB + uses: ./.github/actions/iotdbRunner + with: + if-CapExp: "false" + version: ${{ matrix.iotdb-version }} + + - name: Install with Maven + run: mvn clean package -DskipTests + + - name: Start IginX + uses: ./.github/actions/iginxRunner + with: + version: ${VERSION} + + - name: A Lame Integration Test with Maven for IoTDB + run: | + if [ ${{ matrix.iotdb-version }} == "iotdb11" ]; then + mvn test -q -Dtest=IoTDB11SessionIT -DfailIfNoTests=false + elif [ ${{ matrix.iotdb-version }} == "iotdb12" ]; then + mvn test -q -Dtest=IoTDB12SessionIT -DfailIfNoTests=false + else + echo "${{ matrix.iotdb-version }} is not supported" + exit 1 + fi + + - uses: codecov/codecov-action@v1 + with: + file: ./**/target/site/jacoco/jacoco.xml + name: codecov + + IoTDB-SQL-Test: + strategy: + fail-fast: false + matrix: + java: [ 8 ] + python-version: [ "3.7" ] + os: [ ubuntu-latest, macos-latest ] + iotdb-version: [ iotdb11, iotdb12 ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Environmet Dependence + uses: ./.github/actions/dependence + with: + python-version: ${{ matrix.python-version }} + java: ${{ matrix.java }} + + - name: Run ZooKeeper + uses: ./.github/actions/zookeeperRunner + + - name: Run IoTDB + uses: ./.github/actions/iotdbRunner + with: + if-CapExp: "false" + version: ${{ matrix.iotdb-version }} + + - name: Install with Maven + run: mvn clean package -DskipTests + + - name: Start IginX + uses: ./.github/actions/iginxRunner + with: + version: ${VERSION} + + - name: A Lame Integration Test with Maven for SQL + run: mvn test -q -Dtest=IoTDBSQLSessionIT -DfailIfNoTests=false + - uses: codecov/codecov-action@v1 + with: + file: ./**/target/site/jacoco/jacoco.xml + name: codecov + + IoTDB-Tag-Test: + strategy: + fail-fast: false + matrix: + java: [ 8 ] + python-version: [ "3.7" ] + os: [ ubuntu-latest, macos-latest ] + iotdb-version: [ iotdb11, iotdb12 ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Environmet Dependence + uses: ./.github/actions/dependence + with: + python-version: ${{ matrix.python-version }} + java: ${{ matrix.java }} + + - name: Run ZooKeeper + uses: ./.github/actions/zookeeperRunner + + - name: Run IoTDB + uses: ./.github/actions/iotdbRunner + with: + if-CapExp: "false" + version: ${{ matrix.iotdb-version }} + + - name: Install with Maven + run: mvn clean package -DskipTests + + - name: Start IginX + uses: ./.github/actions/iginxRunner + with: + version: ${VERSION} + + - name: A Lame Integration Test with Maven for IoTDB + run: mvn test -q -Dtest=TagIT -DfailIfNoTests=false + - uses: codecov/codecov-action@v1 + with: + file: ./**/target/site/jacoco/jacoco.xml + name: codecov + + IoTDB-SessionPool-Test: + strategy: + fail-fast: false + matrix: + java: [ 8 ] + python-version: [ "3.7" ] + os: [ ubuntu-latest, macos-latest ] + iotdb-version: [ iotdb11, iotdb12 ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Environmet Dependence + uses: ./.github/actions/dependence + with: + python-version: ${{ matrix.python-version }} + java: ${{ matrix.java }} + + - name: Run ZooKeeper + uses: ./.github/actions/zookeeperRunner + + - name: Run IoTDB + uses: ./.github/actions/iotdbRunner + with: + if-CapExp: "false" + version: ${{ matrix.iotdb-version }} + + - name: Install with Maven + run: mvn clean package -DskipTests + + - name: Start IginX + uses: ./.github/actions/iginxRunner + with: + version: ${VERSION} + + - name: A Lame Integration Test with Maven for IoTDB + run: | + if [ ${{ matrix.iotdb-version }} == "iotdb11" ]; then + mvn test -q -Dtest=IoTDB11SessionPoolIT -DfailIfNoTests=false + elif [ ${{ matrix.iotdb-version }} == "iotdb12" ]; then + mvn test -q -Dtest=IoTDB12SessionPoolIT -DfailIfNoTests=false + else + echo "${{ matrix.iotdb-version }} is not supported" + exit 1 + fi + - uses: codecov/codecov-action@v1 + with: + file: ./**/target/site/jacoco/jacoco.xml + name: codecov + + IoTDB-SQL-SessionPool-Test: + strategy: + fail-fast: false + matrix: + java: [ 8 ] + python-version: [ "3.7" ] + os: [ ubuntu-latest, macos-latest ] + iotdb-version: [ iotdb11, iotdb12 ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Environmet Dependence + uses: ./.github/actions/dependence + with: + python-version: ${{ matrix.python-version }} + java: ${{ matrix.java }} + + - name: Run ZooKeeper + uses: ./.github/actions/zookeeperRunner + + - name: Run IoTDB + uses: ./.github/actions/iotdbRunner + with: + if-CapExp: "false" + version: ${{ matrix.iotdb-version }} + + - name: Install with Maven + run: mvn clean package -DskipTests + + - name: Start IginX + uses: ./.github/actions/iginxRunner + with: + version: ${VERSION} + + - name: A Lame Integration Test with Maven for SQL + run: mvn test -q -Dtest=SQLSessionPoolIT -DfailIfNoTests=false + - uses: codecov/codecov-action@v1 + with: + file: ./**/target/site/jacoco/jacoco.xml + name: codecov diff --git a/.github/workflows/ds-parquet.yml b/.github/workflows/ds-parquet.yml index 56d0773d6..0dfa11c6c 100644 --- a/.github/workflows/ds-parquet.yml +++ b/.github/workflows/ds-parquet.yml @@ -15,135 +15,135 @@ concurrency: cancel-in-progress: true jobs: -# Parquet-SQL-Test: -# strategy: -# fail-fast: false -# #max-parallel: 20 -# matrix: -# java: [ 8 ] -# python-version: [ "3.7" ] -# os: [ ubuntu-latest, macos-latest ] -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v2 -# - name: Set up Python ${{ matrix.python-version }} -# uses: actions/setup-python@v3 -# with: -# python-version: ${{ matrix.python-version }} -# - name: Install Python dependencies -# run: | -# python -m pip install --upgrade pip -# - name: Set up JDK ${{ matrix.java }} -# uses: actions/setup-java@v1 -# with: -# java-version: ${{ matrix.java }} -# - name: Cache Maven packages -# uses: actions/cache@v2.1.5 -# with: -# path: ~/.m2 -# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} -# restore-keys: ${{ runner.os }}-m2 -# - name: Run ZooKeeper -# run: | -# if [ "$RUNNER_OS" == "Linux" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" -# "${GITHUB_WORKSPACE}/.github/zk.sh" -# elif [ "$RUNNER_OS" == "macOS" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" -# "${GITHUB_WORKSPACE}/.github/zk_macos.sh" -# else -# echo "$RUNNER_OS is not supported" -# exit 1 -# fi -# - name: Set Parquet -# run: | -# if [ "$RUNNER_OS" == "Linux" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/parquet.sh" -# "${GITHUB_WORKSPACE}/.github/parquet.sh" -# elif [ "$RUNNER_OS" == "macOS" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/parquet_macos.sh" -# "${GITHUB_WORKSPACE}/.github/parquet_macos.sh" -# else -# echo "$RUNNER_OS is not supported" -# exit 1 -# fi -# - name: Install with Maven -# run: mvn clean package -DskipTests -# - name: Start IginX -# run: | -# chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" -# nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & -# - name: A Lame Integration Test with Maven for SQL -# run: mvn test -q -Dtest=ParquetSQLSessionIT -DfailIfNoTests=false -# - uses: codecov/codecov-action@v1 -# with: -# file: ./**/target/site/jacoco/jacoco.xml -# name: codecov -# -# Parquet-SQL-SessionPool-Test: -# strategy: -# fail-fast: false -# #max-parallel: 20 -# matrix: -# java: [ 8 ] -# python-version: [ "3.7" ] -# os: [ ubuntu-latest, macos-latest ] -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v2 -# - name: Set up Python ${{ matrix.python-version }} -# uses: actions/setup-python@v3 -# with: -# python-version: ${{ matrix.python-version }} -# - name: Install Python dependencies -# run: | -# python -m pip install --upgrade pip -# - name: Set up JDK ${{ matrix.java }} -# uses: actions/setup-java@v1 -# with: -# java-version: ${{ matrix.java }} -# - name: Cache Maven packages -# uses: actions/cache@v2.1.5 -# with: -# path: ~/.m2 -# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} -# restore-keys: ${{ runner.os }}-m2 -# - name: Run ZooKeeper -# run: | -# if [ "$RUNNER_OS" == "Linux" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" -# "${GITHUB_WORKSPACE}/.github/zk.sh" -# elif [ "$RUNNER_OS" == "macOS" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" -# "${GITHUB_WORKSPACE}/.github/zk_macos.sh" -# else -# echo "$RUNNER_OS is not supported" -# exit 1 -# fi -# - name: Set Parquet -# run: | -# if [ "$RUNNER_OS" == "Linux" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/parquet.sh" -# "${GITHUB_WORKSPACE}/.github/parquet.sh" -# elif [ "$RUNNER_OS" == "macOS" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/parquet_macos.sh" -# "${GITHUB_WORKSPACE}/.github/parquet_macos.sh" -# else -# echo "$RUNNER_OS is not supported" -# exit 1 -# fi -# - name: Install with Maven -# run: mvn clean package -DskipTests -# - name: Start IginX -# run: | -# chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" -# nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & -# - name: A Lame Integration Test with Maven for SQL -# run: mvn test -q -Dtest=ParquetSQLSessionPoolIT -DfailIfNoTests=false -# - uses: codecov/codecov-action@v1 -# with: -# file: ./**/target/site/jacoco/jacoco.xml -# name: codecov + Parquet-SQL-Test: + strategy: + fail-fast: false + #max-parallel: 20 + matrix: + java: [ 8 ] + python-version: [ "3.7" ] + os: [ ubuntu-latest, macos-latest ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Cache Maven packages + uses: actions/cache@v2.1.5 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Run ZooKeeper + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" + "${GITHUB_WORKSPACE}/.github/zk.sh" + elif [ "$RUNNER_OS" == "macOS" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" + "${GITHUB_WORKSPACE}/.github/zk_macos.sh" + else + echo "$RUNNER_OS is not supported" + exit 1 + fi + - name: Set Parquet + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/parquet.sh" + "${GITHUB_WORKSPACE}/.github/parquet.sh" + elif [ "$RUNNER_OS" == "macOS" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/parquet_macos.sh" + "${GITHUB_WORKSPACE}/.github/parquet_macos.sh" + else + echo "$RUNNER_OS is not supported" + exit 1 + fi + - name: Install with Maven + run: mvn clean package -DskipTests + - name: Start IginX + run: | + chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" + nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & + - name: A Lame Integration Test with Maven for SQL + run: mvn test -q -Dtest=ParquetSQLSessionIT -DfailIfNoTests=false + - uses: codecov/codecov-action@v1 + with: + file: ./**/target/site/jacoco/jacoco.xml + name: codecov + + Parquet-SQL-SessionPool-Test: + strategy: + fail-fast: false + #max-parallel: 20 + matrix: + java: [ 8 ] + python-version: [ "3.7" ] + os: [ ubuntu-latest, macos-latest ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Cache Maven packages + uses: actions/cache@v2.1.5 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Run ZooKeeper + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" + "${GITHUB_WORKSPACE}/.github/zk.sh" + elif [ "$RUNNER_OS" == "macOS" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" + "${GITHUB_WORKSPACE}/.github/zk_macos.sh" + else + echo "$RUNNER_OS is not supported" + exit 1 + fi + - name: Set Parquet + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/parquet.sh" + "${GITHUB_WORKSPACE}/.github/parquet.sh" + elif [ "$RUNNER_OS" == "macOS" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/parquet_macos.sh" + "${GITHUB_WORKSPACE}/.github/parquet_macos.sh" + else + echo "$RUNNER_OS is not supported" + exit 1 + fi + - name: Install with Maven + run: mvn clean package -DskipTests + - name: Start IginX + run: | + chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" + nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & + - name: A Lame Integration Test with Maven for SQL + run: mvn test -q -Dtest=ParquetSQLSessionPoolIT -DfailIfNoTests=false + - uses: codecov/codecov-action@v1 + with: + file: ./**/target/site/jacoco/jacoco.xml + name: codecov Parquet-Capacity-Expansion-Test: strategy: diff --git a/.github/workflows/func-transform.yml b/.github/workflows/func-transform.yml index 941320af4..69226fd8b 100644 --- a/.github/workflows/func-transform.yml +++ b/.github/workflows/func-transform.yml @@ -1,84 +1,84 @@ -#name: "Function-Test-Transform" -# -#on: -# push: -# branches: -# - main -# pull_request: -# branches: -# - main -#env: -# VERSION: 0.6.0-SNAPSHOT -# -#concurrency: -# group: ${{ github.workflow }}-${{ github.ref }} -# cancel-in-progress: true -# -#jobs: -# Transform-Test: -# strategy: -# fail-fast: false -# max-parallel: 20 -# matrix: -# java: [ 8 ] -# python-version: [ "3.7" ] -# os: [ ubuntu-latest, macos-latest ] -# runs-on: ${{ matrix.os }} -# env: -# VERSION: 0.6.0-SNAPSHOT -# steps: -# - uses: actions/checkout@v2 -# - name: Set up Python ${{ matrix.python-version }} -# uses: actions/setup-python@v3 -# with: -# python-version: ${{ matrix.python-version }} -# - name: Install Python dependencies -# run: | -# python -m pip install --upgrade pip -# pip install pemja==0.1.5 pandas numpy -# - name: Set up JDK ${{ matrix.java }} -# uses: actions/setup-java@v1 -# with: -# java-version: ${{ matrix.java }} -# - name: Cache Maven packages -# uses: actions/cache@v2.1.5 -# with: -# path: ~/.m2 -# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} -# restore-keys: ${{ runner.os }}-m2 -# - name: Run ZooKeeper -# run: | -# if [ "$RUNNER_OS" == "Linux" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" -# "${GITHUB_WORKSPACE}/.github/zk.sh" -# elif [ "$RUNNER_OS" == "macOS" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" -# "${GITHUB_WORKSPACE}/.github/zk_macos.sh" -# else -# echo "$RUNNER_OS is not supported" -# exit 1 -# fi -# - name: Run IoTDB11 -# run: | -# if [ "$RUNNER_OS" == "Linux" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/iotdb11.sh" -# "${GITHUB_WORKSPACE}/.github/iotdb11.sh" -# elif [ "$RUNNER_OS" == "macOS" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/iotdb11_macos.sh" -# "${GITHUB_WORKSPACE}/.github/iotdb11_macos.sh" -# else -# echo "$RUNNER_OS is not supported" -# exit 1 -# fi -# - name: Install with Maven -# run: mvn clean package -DskipTests -# - name: Start IginX -# run: | -# chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" -# nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & -# - name: A Lame Integration Test with Maven for IoTDB -# run: mvn test -q -Dtest=TransformIT -DfailIfNoTests=false -# - uses: codecov/codecov-action@v1 -# with: -# file: ./**/target/site/jacoco/jacoco.xml -# name: codecov \ No newline at end of file +name: "Function-Test-Transform" + +on: + push: + branches: + - main + pull_request: + branches: + - main +env: + VERSION: 0.6.0-SNAPSHOT + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + Transform-Test: + strategy: + fail-fast: false + max-parallel: 20 + matrix: + java: [ 8 ] + python-version: [ "3.7" ] + os: [ ubuntu-latest, macos-latest ] + runs-on: ${{ matrix.os }} + env: + VERSION: 0.6.0-SNAPSHOT + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + pip install pemja==0.1.5 pandas numpy + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Cache Maven packages + uses: actions/cache@v2.1.5 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Run ZooKeeper + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" + "${GITHUB_WORKSPACE}/.github/zk.sh" + elif [ "$RUNNER_OS" == "macOS" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" + "${GITHUB_WORKSPACE}/.github/zk_macos.sh" + else + echo "$RUNNER_OS is not supported" + exit 1 + fi + - name: Run IoTDB11 + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/iotdb11.sh" + "${GITHUB_WORKSPACE}/.github/iotdb11.sh" + elif [ "$RUNNER_OS" == "macOS" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/iotdb11_macos.sh" + "${GITHUB_WORKSPACE}/.github/iotdb11_macos.sh" + else + echo "$RUNNER_OS is not supported" + exit 1 + fi + - name: Install with Maven + run: mvn clean package -DskipTests + - name: Start IginX + run: | + chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" + nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & + - name: A Lame Integration Test with Maven for IoTDB + run: mvn test -q -Dtest=TransformIT -DfailIfNoTests=false + - uses: codecov/codecov-action@v1 + with: + file: ./**/target/site/jacoco/jacoco.xml + name: codecov \ No newline at end of file diff --git a/.github/workflows/func-udf.yml b/.github/workflows/func-udf.yml index f1be81631..d7b62274c 100644 --- a/.github/workflows/func-udf.yml +++ b/.github/workflows/func-udf.yml @@ -1,92 +1,92 @@ -#name: "Function-Test-UDF" -# -#on: -# push: -# branches: -# - main -# pull_request: -# branches: -# - main -#env: -# VERSION: 0.6.0-SNAPSHOT -# -#concurrency: -# group: ${{ github.workflow }}-${{ github.ref }} -# cancel-in-progress: true -# -#jobs: -# UDF-Test: -# strategy: -# fail-fast: false -# max-parallel: 20 -# matrix: -# java: [ 8 ] -# python-version: [ "3.7" ] -# os: [ ubuntu-latest, macos-latest ] -# runs-on: ${{ matrix.os }} -# env: -# VERSION: 0.6.0-SNAPSHOT -# steps: -# - uses: actions/checkout@v2 -# - name: Set up Python ${{ matrix.python-version }} -# uses: actions/setup-python@v3 -# with: -# python-version: ${{ matrix.python-version }} -# - name: Install Python dependencies -# run: | -# python -m pip install --upgrade pip -# pip install pemja==0.1.5 -# - name: Set up JDK ${{ matrix.java }} -# uses: actions/setup-java@v1 -# with: -# java-version: ${{ matrix.java }} -# - name: Cache Maven packages -# uses: actions/cache@v2.1.5 -# with: -# path: ~/.m2 -# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} -# restore-keys: ${{ runner.os }}-m2 -# - name: Run ZooKeeper -# run: | -# if [ "$RUNNER_OS" == "Linux" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" -# "${GITHUB_WORKSPACE}/.github/zk.sh" -# elif [ "$RUNNER_OS" == "macOS" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" -# "${GITHUB_WORKSPACE}/.github/zk_macos.sh" -# else -# echo "$RUNNER_OS is not supported" -# exit 1 -# fi -# - name: Run IoTDB11 -# run: | -# if [ "$RUNNER_OS" == "Linux" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/iotdb11.sh" -# "${GITHUB_WORKSPACE}/.github/iotdb11.sh" -# elif [ "$RUNNER_OS" == "macOS" ]; then -# chmod +x "${GITHUB_WORKSPACE}/.github/iotdb11_macos.sh" -# "${GITHUB_WORKSPACE}/.github/iotdb11_macos.sh" -# else -# echo "$RUNNER_OS is not supported" -# exit 1 -# fi -# - name: Install with Maven -# run: mvn clean package -DskipTests -# - name: Start IginX -# run: | -# if [ "$RUNNER_OS" == "Linux" ]; then -# sudo sed -i 's/needInitBasicUDFFunctions=false/needInitBasicUDFFunctions=true/g' ${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/conf/config.properties -# elif [ "$RUNNER_OS" == "macOS" ]; then -# sudo sed -i '' 's/needInitBasicUDFFunctions=false/needInitBasicUDFFunctions=true/' ${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/conf/config.properties -# else -# echo "$RUNNER_OS is not supported" -# exit 1 -# fi -# chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" -# nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & -# - name: A Lame Integration Test with Maven for IoTDB -# run: mvn test -q -Dtest=UDFIT -DfailIfNoTests=false -# - uses: codecov/codecov-action@v1 -# with: -# file: ./**/target/site/jacoco/jacoco.xml -# name: codecov \ No newline at end of file +name: "Function-Test-UDF" + +on: + push: + branches: + - main + pull_request: + branches: + - main +env: + VERSION: 0.6.0-SNAPSHOT + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + UDF-Test: + strategy: + fail-fast: false + max-parallel: 20 + matrix: + java: [ 8 ] + python-version: [ "3.7" ] + os: [ ubuntu-latest, macos-latest ] + runs-on: ${{ matrix.os }} + env: + VERSION: 0.6.0-SNAPSHOT + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + pip install pemja==0.1.5 + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Cache Maven packages + uses: actions/cache@v2.1.5 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Run ZooKeeper + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" + "${GITHUB_WORKSPACE}/.github/zk.sh" + elif [ "$RUNNER_OS" == "macOS" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/zk_macos.sh" + "${GITHUB_WORKSPACE}/.github/zk_macos.sh" + else + echo "$RUNNER_OS is not supported" + exit 1 + fi + - name: Run IoTDB11 + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/iotdb11.sh" + "${GITHUB_WORKSPACE}/.github/iotdb11.sh" + elif [ "$RUNNER_OS" == "macOS" ]; then + chmod +x "${GITHUB_WORKSPACE}/.github/iotdb11_macos.sh" + "${GITHUB_WORKSPACE}/.github/iotdb11_macos.sh" + else + echo "$RUNNER_OS is not supported" + exit 1 + fi + - name: Install with Maven + run: mvn clean package -DskipTests + - name: Start IginX + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + sudo sed -i 's/needInitBasicUDFFunctions=false/needInitBasicUDFFunctions=true/g' ${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/conf/config.properties + elif [ "$RUNNER_OS" == "macOS" ]; then + sudo sed -i '' 's/needInitBasicUDFFunctions=false/needInitBasicUDFFunctions=true/' ${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/conf/config.properties + else + echo "$RUNNER_OS is not supported" + exit 1 + fi + chmod +x "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" + nohup "${GITHUB_WORKSPACE}/core/target/iginx-core-${VERSION}/sbin/start_iginx.sh" & + - name: A Lame Integration Test with Maven for IoTDB + run: mvn test -q -Dtest=UDFIT -DfailIfNoTests=false + - uses: codecov/codecov-action@v1 + with: + file: ./**/target/site/jacoco/jacoco.xml + name: codecov \ No newline at end of file diff --git a/.github/workflows/scale-out.yml b/.github/workflows/scale-out.yml index 2f2d20668..5f8e40f3b 100644 --- a/.github/workflows/scale-out.yml +++ b/.github/workflows/scale-out.yml @@ -1,381 +1,381 @@ -#name: "Scale-out-On-IoTDB" -#on: -# push: -# branches: -# - main -# pull_request: -# branches: -# - main -#env: -# VERSION: 0.6.0-SNAPSHOT -# -#concurrency: -# group: ${{ github.workflow }}-${{ github.ref }} -# cancel-in-progress: true -# -#jobs: -# IoTDB-Tag-Test: -# timeout-minutes: 20 -# strategy: -# fail-fast: false -# matrix: -# java: [ 8 ] -# python-version: [ "3.7" ] -# os: [ ubuntu-latest, macos-latest ] -# DB-name: [ "iotdb11", "iotdb12" ] -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v2 -# - name: Environmet Dependence -# uses: ./.github/actions/dependence -# with: -# python-version: ${{ matrix.python-version }} -# java: ${{ matrix.java }} -# -# - name: Run ZooKeeper -# uses: ./.github/actions/zookeeperRunner -# -# - name: Run IoTDB -# uses: ./.github/actions/iotdbRunner -# with: -# version: ${{matrix.DB-name}} -# -# - name: Change pom -# run: | -# mv test/pom.xml test/pom.xml.backup -# mv test/pom.xml.${{matrix.DB-name}} test/pom.xml -# ls test/pom* -# -# - name: Install IginX with Maven -# shell: bash -# run: | -# mvn clean package -DskipTests -# -# #第 1 阶段测试开始========================================== -# - name: Prepare CapExp environment -# uses: ./.github/actions/capacityExpansionUnionTest -# with: -# version: ${VERSION} -# DB-name: ${{matrix.DB-name}} -# Test-Way: oriNoDataExpNoData -# -# - name: oriNoDataExpNoData IT -# run: mvn test -q -Dtest=IoTDBTagScaleOutIT#oriNoDataExpNoDataIT -DfailIfNoTests=false -# -# #第 2 阶段测试开始========================================== -# - name: Prepare CapExp environment -# if: always() -# uses: ./.github/actions/capacityExpansionUnionTest -# with: -# version: ${VERSION} -# DB-name: ${{matrix.DB-name}} -# Test-Way: oriHasDataExpNoData -# -# - name: oriHasDataExpNoData IT -# if: always() -# run: mvn test -q -Dtest=IoTDBTagScaleOutIT#oriHasDataExpNoDataIT -DfailIfNoTests=false -# -# #第 3 阶段测试开始========================================== -# - name: Prepare CapExp environment -# if: always() -# uses: ./.github/actions/capacityExpansionUnionTest -# with: -# version: ${VERSION} -# DB-name: ${{matrix.DB-name}} -# Test-Way: oriNoDataExpHasData -# -# - name: oriNoDataExpHasData IT -# if: always() -# run: mvn test -q -Dtest=IoTDBTagScaleOutIT#oriNoDataExpHasDataIT -DfailIfNoTests=false -# -# #第 4 阶段测试开始========================================== -# - name: Prepare CapExp environment -# if: always() -# uses: ./.github/actions/capacityExpansionUnionTest -# with: -# version: ${VERSION} -# DB-name: ${{matrix.DB-name}} -# Test-Way: oriHasDataExpHasData -# -# - name: oriHasDataExpHasData IT -# if: always() -# run: mvn test -q -Dtest=IoTDBTagScaleOutIT#oriHasDataExpHasDataIT -DfailIfNoTests=false -# -# - uses: codecov/codecov-action@v1 -# with: -# file: ./**/target/site/jacoco/jacoco.xml -# name: codecov -# -# IoTDB-SQLSession-Test: -# timeout-minutes: 20 -# strategy: -# fail-fast: false -# matrix: -# java: [ 8 ] -# python-version: [ "3.7" ] -# os: [ ubuntu-latest, macos-latest ] -# DB-name: [ "iotdb11", "iotdb12" ] -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v2 -# - name: Environmet Dependence -# uses: ./.github/actions/dependence -# with: -# python-version: ${{ matrix.python-version }} -# java: ${{ matrix.java }} -# -# - name: Run ZooKeeper -# uses: ./.github/actions/zookeeperRunner -# -# - name: Run IoTDB -# uses: ./.github/actions/iotdbRunner -# with: -# version: ${{matrix.DB-name}} -# -# - name: Change pom -# run: | -# mv test/pom.xml test/pom.xml.backup -# mv test/pom.xml.${{matrix.DB-name}} test/pom.xml -# ls test/pom* -# -# - name: Install IginX with Maven -# shell: bash -# run: | -# mvn clean package -DskipTests -# -# #第 1 阶段测试开始========================================== -# - name: Prepare CapExp environment -# uses: ./.github/actions/capacityExpansionUnionTest -# with: -# version: ${VERSION} -# DB-name: ${{matrix.DB-name}} -# Test-Way: oriNoDataExpNoData -# -# - name: oriNoDataExpNoData IT -# run: mvn test -q -Dtest=IoTDBSqlScaleOutIT#oriNoDataExpNoDataIT -DfailIfNoTests=false -# -# #第 2 阶段测试开始========================================== -# - name: Prepare CapExp environment -# if: always() -# uses: ./.github/actions/capacityExpansionUnionTest -# with: -# version: ${VERSION} -# DB-name: ${{matrix.DB-name}} -# Test-Way: oriHasDataExpNoData -# -# - name: oriHasDataExpNoData IT -# if: always() -# run: mvn test -q -Dtest=IoTDBSqlScaleOutIT#oriHasDataExpNoDataIT -DfailIfNoTests=false -# -# #第 3 阶段测试开始========================================== -# - name: Prepare CapExp environment -# if: always() -# uses: ./.github/actions/capacityExpansionUnionTest -# with: -# version: ${VERSION} -# DB-name: ${{matrix.DB-name}} -# Test-Way: oriNoDataExpHasData -# -# - name: oriNoDataExpHasData IT -# if: always() -# run: mvn test -q -Dtest=IoTDBSqlScaleOutIT#oriNoDataExpHasDataIT -DfailIfNoTests=false -# -# #第 4 阶段测试开始========================================== -# - name: Prepare CapExp environment -# if: always() -# uses: ./.github/actions/capacityExpansionUnionTest -# with: -# version: ${VERSION} -# DB-name: ${{matrix.DB-name}} -# Test-Way: oriHasDataExpHasData -# -# - name: oriHasDataExpHasData IT -# if: always() -# run: mvn test -q -Dtest=IoTDBSqlScaleOutIT#oriHasDataExpHasDataIT -DfailIfNoTests=false -# -# - uses: codecov/codecov-action@v1 -# with: -# file: ./**/target/site/jacoco/jacoco.xml -# name: codecov -# -# IoTDB-Session-Test: -# timeout-minutes: 20 -# strategy: -# fail-fast: false -# matrix: -# java: [ 8 ] -# python-version: [ "3.7" ] -# os: [ ubuntu-latest, macos-latest ] -# DB-name: [ "iotdb11", "iotdb12" ] -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v2 -# - name: Environmet Dependence -# uses: ./.github/actions/dependence -# with: -# python-version: ${{ matrix.python-version }} -# java: ${{ matrix.java }} -# -# - name: Run ZooKeeper -# uses: ./.github/actions/zookeeperRunner -# -# - name: Run IoTDB -# uses: ./.github/actions/iotdbRunner -# with: -# version: ${{matrix.DB-name}} -# -# - name: Change pom -# run: | -# mv test/pom.xml test/pom.xml.backup -# mv test/pom.xml.${{matrix.DB-name}} test/pom.xml -# ls test/pom* -# -# - name: Install IginX with Maven -# shell: bash -# run: | -# mvn clean package -DskipTests -# -# #第 1 阶段测试开始========================================== -# - name: Prepare CapExp environment -# uses: ./.github/actions/capacityExpansionUnionTest -# with: -# DB-name: ${{matrix.DB-name}} -# Test-Way: oriNoDataExpNoData -# -# - name: oriNoDataExpNoData IT -# run: mvn test -q -Dtest=IoTDBSessionScaleOutIT#oriNoDataExpNoDataIT -DfailIfNoTests=false -# -# #第 2 阶段测试开始========================================== -# - name: Prepare CapExp environment -# if: always() -# uses: ./.github/actions/capacityExpansionUnionTest -# with: -# version: ${VERSION} -# DB-name: ${{matrix.DB-name}} -# Test-Way: oriHasDataExpNoData -# -# - name: oriHasDataExpNoData IT -# if: always() -# run: mvn test -q -Dtest=IoTDBSessionScaleOutIT#oriHasDataExpNoDataIT -DfailIfNoTests=false -# -# #第 3 阶段测试开始========================================== -# - name: Prepare CapExp environment -# if: always() -# uses: ./.github/actions/capacityExpansionUnionTest -# with: -# DB-name: ${{matrix.DB-name}} -# Test-Way: oriNoDataExpHasData -# -# - name: oriNoDataExpHasData IT -# if: always() -# run: mvn test -q -Dtest=IoTDBSessionScaleOutIT#oriNoDataExpHasDataIT -DfailIfNoTests=false -# -# #第 4 阶段测试开始========================================== -# - name: Prepare CapExp environment -# if: always() -# uses: ./.github/actions/capacityExpansionUnionTest -# with: -# version: ${VERSION} -# DB-name: ${{matrix.DB-name}} -# Test-Way: oriHasDataExpHasData -# -# - name: oriHasDataExpHasData IT -# if: always() -# run: mvn test -q -Dtest=IoTDBSessionScaleOutIT#oriHasDataExpHasDataIT -DfailIfNoTests=false -# -# - uses: codecov/codecov-action@v1 -# with: -# file: ./**/target/site/jacoco/jacoco.xml -# name: codecov -# -# IoTDB-Rest-Test: -# timeout-minutes: 20 -# strategy: -# fail-fast: false -# matrix: -# java: [ 8 ] -# python-version: [ "3.7" ] -# os: [ ubuntu-latest, macos-latest ] -# DB-name: [ "iotdb11", "iotdb12" ] -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v2 -# - name: Environmet Dependence -# uses: ./.github/actions/dependence -# with: -# python-version: ${{ matrix.python-version }} -# java: ${{ matrix.java }} -# -# - name: Run ZooKeeper -# uses: ./.github/actions/zookeeperRunner -# -# - name: Run IoTDB -# uses: ./.github/actions/iotdbRunner -# with: -# version: ${{matrix.DB-name}} -# -# - name: Change pom -# run: | -# mv test/pom.xml test/pom.xml.backup -# mv test/pom.xml.${{matrix.DB-name}} test/pom.xml -# ls test/pom* -# -# - name: Install IginX with Maven -# shell: bash -# run: | -# mvn clean package -DskipTests -# -# #第 2 阶段测试开始========================================== -# - name: Prepare CapExp environment -# if: always() -# uses: ./.github/actions/capacityExpansionUnionTest -# with: -# version: ${VERSION} -# DB-name: ${{matrix.DB-name}} -# Test-Way: oriHasDataExpNoData -# -# - name: oriHasDataExpNoData IT -# if: always() -# run: mvn test -q -Dtest=IoTDBRestfulScaleOutIT#oriHasDataExpNoDataIT -DfailIfNoTests=false -# -# #第 1 阶段测试开始========================================== -# - name: Prepare CapExp environment -# if: always() -# uses: ./.github/actions/capacityExpansionUnionTest -# with: -# DB-name: ${{matrix.DB-name}} -# Test-Way: oriNoDataExpNoData -# -# - name: oriNoDataExpNoData IT -# if: always() -# run: mvn test -q -Dtest=IoTDBRestfulScaleOutIT#oriNoDataExpNoDataIT -DfailIfNoTests=false -# -# #第 3 阶段测试开始========================================== -# - name: Prepare CapExp environment -# if: always() -# uses: ./.github/actions/capacityExpansionUnionTest -# with: -# DB-name: ${{matrix.DB-name}} -# Test-Way: oriNoDataExpHasData -# -# - name: oriNoDataExpHasData IT -# if: always() -# run: mvn test -q -Dtest=IoTDBRestfulScaleOutIT#oriNoDataExpHasDataIT -DfailIfNoTests=false -# -# #第 4 阶段测试开始========================================== -# - name: Prepare CapExp environment -# if: always() -# uses: ./.github/actions/capacityExpansionUnionTest -# with: -# version: ${VERSION} -# DB-name: ${{matrix.DB-name}} -# Test-Way: oriHasDataExpHasData -# -# - name: oriHasDataExpHasData IT -# if: always() -# run: mvn test -q -Dtest=IoTDBRestfulScaleOutIT#oriHasDataExpHasDataIT -DfailIfNoTests=false -# -# - uses: codecov/codecov-action@v1 -# with: -# file: ./**/target/site/jacoco/jacoco.xml -# name: codecov \ No newline at end of file +name: "Scale-out-On-IoTDB" +on: + push: + branches: + - main + pull_request: + branches: + - main +env: + VERSION: 0.6.0-SNAPSHOT + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + IoTDB-Tag-Test: + timeout-minutes: 20 + strategy: + fail-fast: false + matrix: + java: [ 8 ] + python-version: [ "3.7" ] + os: [ ubuntu-latest, macos-latest ] + DB-name: [ "iotdb11", "iotdb12" ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Environmet Dependence + uses: ./.github/actions/dependence + with: + python-version: ${{ matrix.python-version }} + java: ${{ matrix.java }} + + - name: Run ZooKeeper + uses: ./.github/actions/zookeeperRunner + + - name: Run IoTDB + uses: ./.github/actions/iotdbRunner + with: + version: ${{matrix.DB-name}} + + - name: Change pom + run: | + mv test/pom.xml test/pom.xml.backup + mv test/pom.xml.${{matrix.DB-name}} test/pom.xml + ls test/pom* + + - name: Install IginX with Maven + shell: bash + run: | + mvn clean package -DskipTests + + #第 1 阶段测试开始========================================== + - name: Prepare CapExp environment + uses: ./.github/actions/capacityExpansionUnionTest + with: + version: ${VERSION} + DB-name: ${{matrix.DB-name}} + Test-Way: oriNoDataExpNoData + + - name: oriNoDataExpNoData IT + run: mvn test -q -Dtest=IoTDBTagScaleOutIT#oriNoDataExpNoDataIT -DfailIfNoTests=false + + #第 2 阶段测试开始========================================== + - name: Prepare CapExp environment + if: always() + uses: ./.github/actions/capacityExpansionUnionTest + with: + version: ${VERSION} + DB-name: ${{matrix.DB-name}} + Test-Way: oriHasDataExpNoData + + - name: oriHasDataExpNoData IT + if: always() + run: mvn test -q -Dtest=IoTDBTagScaleOutIT#oriHasDataExpNoDataIT -DfailIfNoTests=false + + #第 3 阶段测试开始========================================== + - name: Prepare CapExp environment + if: always() + uses: ./.github/actions/capacityExpansionUnionTest + with: + version: ${VERSION} + DB-name: ${{matrix.DB-name}} + Test-Way: oriNoDataExpHasData + + - name: oriNoDataExpHasData IT + if: always() + run: mvn test -q -Dtest=IoTDBTagScaleOutIT#oriNoDataExpHasDataIT -DfailIfNoTests=false + + #第 4 阶段测试开始========================================== + - name: Prepare CapExp environment + if: always() + uses: ./.github/actions/capacityExpansionUnionTest + with: + version: ${VERSION} + DB-name: ${{matrix.DB-name}} + Test-Way: oriHasDataExpHasData + + - name: oriHasDataExpHasData IT + if: always() + run: mvn test -q -Dtest=IoTDBTagScaleOutIT#oriHasDataExpHasDataIT -DfailIfNoTests=false + + - uses: codecov/codecov-action@v1 + with: + file: ./**/target/site/jacoco/jacoco.xml + name: codecov + + IoTDB-SQLSession-Test: + timeout-minutes: 20 + strategy: + fail-fast: false + matrix: + java: [ 8 ] + python-version: [ "3.7" ] + os: [ ubuntu-latest, macos-latest ] + DB-name: [ "iotdb11", "iotdb12" ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Environmet Dependence + uses: ./.github/actions/dependence + with: + python-version: ${{ matrix.python-version }} + java: ${{ matrix.java }} + + - name: Run ZooKeeper + uses: ./.github/actions/zookeeperRunner + + - name: Run IoTDB + uses: ./.github/actions/iotdbRunner + with: + version: ${{matrix.DB-name}} + + - name: Change pom + run: | + mv test/pom.xml test/pom.xml.backup + mv test/pom.xml.${{matrix.DB-name}} test/pom.xml + ls test/pom* + + - name: Install IginX with Maven + shell: bash + run: | + mvn clean package -DskipTests + + #第 1 阶段测试开始========================================== + - name: Prepare CapExp environment + uses: ./.github/actions/capacityExpansionUnionTest + with: + version: ${VERSION} + DB-name: ${{matrix.DB-name}} + Test-Way: oriNoDataExpNoData + + - name: oriNoDataExpNoData IT + run: mvn test -q -Dtest=IoTDBSqlScaleOutIT#oriNoDataExpNoDataIT -DfailIfNoTests=false + + #第 2 阶段测试开始========================================== + - name: Prepare CapExp environment + if: always() + uses: ./.github/actions/capacityExpansionUnionTest + with: + version: ${VERSION} + DB-name: ${{matrix.DB-name}} + Test-Way: oriHasDataExpNoData + + - name: oriHasDataExpNoData IT + if: always() + run: mvn test -q -Dtest=IoTDBSqlScaleOutIT#oriHasDataExpNoDataIT -DfailIfNoTests=false + + #第 3 阶段测试开始========================================== + - name: Prepare CapExp environment + if: always() + uses: ./.github/actions/capacityExpansionUnionTest + with: + version: ${VERSION} + DB-name: ${{matrix.DB-name}} + Test-Way: oriNoDataExpHasData + + - name: oriNoDataExpHasData IT + if: always() + run: mvn test -q -Dtest=IoTDBSqlScaleOutIT#oriNoDataExpHasDataIT -DfailIfNoTests=false + + #第 4 阶段测试开始========================================== + - name: Prepare CapExp environment + if: always() + uses: ./.github/actions/capacityExpansionUnionTest + with: + version: ${VERSION} + DB-name: ${{matrix.DB-name}} + Test-Way: oriHasDataExpHasData + + - name: oriHasDataExpHasData IT + if: always() + run: mvn test -q -Dtest=IoTDBSqlScaleOutIT#oriHasDataExpHasDataIT -DfailIfNoTests=false + + - uses: codecov/codecov-action@v1 + with: + file: ./**/target/site/jacoco/jacoco.xml + name: codecov + + IoTDB-Session-Test: + timeout-minutes: 20 + strategy: + fail-fast: false + matrix: + java: [ 8 ] + python-version: [ "3.7" ] + os: [ ubuntu-latest, macos-latest ] + DB-name: [ "iotdb11", "iotdb12" ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Environmet Dependence + uses: ./.github/actions/dependence + with: + python-version: ${{ matrix.python-version }} + java: ${{ matrix.java }} + + - name: Run ZooKeeper + uses: ./.github/actions/zookeeperRunner + + - name: Run IoTDB + uses: ./.github/actions/iotdbRunner + with: + version: ${{matrix.DB-name}} + + - name: Change pom + run: | + mv test/pom.xml test/pom.xml.backup + mv test/pom.xml.${{matrix.DB-name}} test/pom.xml + ls test/pom* + + - name: Install IginX with Maven + shell: bash + run: | + mvn clean package -DskipTests + + #第 1 阶段测试开始========================================== + - name: Prepare CapExp environment + uses: ./.github/actions/capacityExpansionUnionTest + with: + DB-name: ${{matrix.DB-name}} + Test-Way: oriNoDataExpNoData + + - name: oriNoDataExpNoData IT + run: mvn test -q -Dtest=IoTDBSessionScaleOutIT#oriNoDataExpNoDataIT -DfailIfNoTests=false + + #第 2 阶段测试开始========================================== + - name: Prepare CapExp environment + if: always() + uses: ./.github/actions/capacityExpansionUnionTest + with: + version: ${VERSION} + DB-name: ${{matrix.DB-name}} + Test-Way: oriHasDataExpNoData + + - name: oriHasDataExpNoData IT + if: always() + run: mvn test -q -Dtest=IoTDBSessionScaleOutIT#oriHasDataExpNoDataIT -DfailIfNoTests=false + + #第 3 阶段测试开始========================================== + - name: Prepare CapExp environment + if: always() + uses: ./.github/actions/capacityExpansionUnionTest + with: + DB-name: ${{matrix.DB-name}} + Test-Way: oriNoDataExpHasData + + - name: oriNoDataExpHasData IT + if: always() + run: mvn test -q -Dtest=IoTDBSessionScaleOutIT#oriNoDataExpHasDataIT -DfailIfNoTests=false + + #第 4 阶段测试开始========================================== + - name: Prepare CapExp environment + if: always() + uses: ./.github/actions/capacityExpansionUnionTest + with: + version: ${VERSION} + DB-name: ${{matrix.DB-name}} + Test-Way: oriHasDataExpHasData + + - name: oriHasDataExpHasData IT + if: always() + run: mvn test -q -Dtest=IoTDBSessionScaleOutIT#oriHasDataExpHasDataIT -DfailIfNoTests=false + + - uses: codecov/codecov-action@v1 + with: + file: ./**/target/site/jacoco/jacoco.xml + name: codecov + + IoTDB-Rest-Test: + timeout-minutes: 20 + strategy: + fail-fast: false + matrix: + java: [ 8 ] + python-version: [ "3.7" ] + os: [ ubuntu-latest, macos-latest ] + DB-name: [ "iotdb11", "iotdb12" ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Environmet Dependence + uses: ./.github/actions/dependence + with: + python-version: ${{ matrix.python-version }} + java: ${{ matrix.java }} + + - name: Run ZooKeeper + uses: ./.github/actions/zookeeperRunner + + - name: Run IoTDB + uses: ./.github/actions/iotdbRunner + with: + version: ${{matrix.DB-name}} + + - name: Change pom + run: | + mv test/pom.xml test/pom.xml.backup + mv test/pom.xml.${{matrix.DB-name}} test/pom.xml + ls test/pom* + + - name: Install IginX with Maven + shell: bash + run: | + mvn clean package -DskipTests + + #第 2 阶段测试开始========================================== + - name: Prepare CapExp environment + if: always() + uses: ./.github/actions/capacityExpansionUnionTest + with: + version: ${VERSION} + DB-name: ${{matrix.DB-name}} + Test-Way: oriHasDataExpNoData + + - name: oriHasDataExpNoData IT + if: always() + run: mvn test -q -Dtest=IoTDBRestfulScaleOutIT#oriHasDataExpNoDataIT -DfailIfNoTests=false + + #第 1 阶段测试开始========================================== + - name: Prepare CapExp environment + if: always() + uses: ./.github/actions/capacityExpansionUnionTest + with: + DB-name: ${{matrix.DB-name}} + Test-Way: oriNoDataExpNoData + + - name: oriNoDataExpNoData IT + if: always() + run: mvn test -q -Dtest=IoTDBRestfulScaleOutIT#oriNoDataExpNoDataIT -DfailIfNoTests=false + + #第 3 阶段测试开始========================================== + - name: Prepare CapExp environment + if: always() + uses: ./.github/actions/capacityExpansionUnionTest + with: + DB-name: ${{matrix.DB-name}} + Test-Way: oriNoDataExpHasData + + - name: oriNoDataExpHasData IT + if: always() + run: mvn test -q -Dtest=IoTDBRestfulScaleOutIT#oriNoDataExpHasDataIT -DfailIfNoTests=false + + #第 4 阶段测试开始========================================== + - name: Prepare CapExp environment + if: always() + uses: ./.github/actions/capacityExpansionUnionTest + with: + version: ${VERSION} + DB-name: ${{matrix.DB-name}} + Test-Way: oriHasDataExpHasData + + - name: oriHasDataExpHasData IT + if: always() + run: mvn test -q -Dtest=IoTDBRestfulScaleOutIT#oriHasDataExpHasDataIT -DfailIfNoTests=false + + - uses: codecov/codecov-action@v1 + with: + file: ./**/target/site/jacoco/jacoco.xml + name: codecov \ No newline at end of file diff --git a/.github/workflows/unit-mds.yml b/.github/workflows/unit-mds.yml index d1d3dec28..129804190 100644 --- a/.github/workflows/unit-mds.yml +++ b/.github/workflows/unit-mds.yml @@ -1,80 +1,80 @@ -#name: "Metadata-Service-Test" -# -#on: -# push: -# branches: -# - main -# pull_request: -# branches: -# - main -# -#concurrency: -# group: ${{ github.workflow }}-${{ github.ref }} -# cancel-in-progress: true -# -#jobs: -# ZK-Test: -# strategy: -# fail-fast: false -# matrix: -# java: [ 8 ] -# os: [ ubuntu-latest ] -# runs-on: ${{ matrix.os}} -# env: -# STORAGE: zookeeper -# ZOOKEEPER_CONNECTION_STRING: 127.0.0.1:2181 -# steps: -# - uses: actions/checkout@v2 -# - name: Set up JDK ${{ matrix.java }} -# uses: actions/setup-java@v1 -# with: -# java-version: ${{ matrix.java }} -# - name: Cache Maven packages -# uses: actions/cache@v2 -# with: -# path: ~/.m2 -# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} -# restore-keys: ${{ runner.os }}-m2 -# - name: Run ZooKeeper -# run: | -# chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" -# "${GITHUB_WORKSPACE}/.github/zk.sh" -# - name: Run Test For Meta Manager -# run: mvn test -q -Dtest=IMetaManagerTest -DfailIfNoTests=false -# - uses: codecov/codecov-action@v1 -# with: -# file: ./**/target/site/jacoco/jacoco.xml -# name: codecov -# ETCD-Test: -# strategy: -# fail-fast: false -# max-parallel: 20 -# matrix: -# java: [ 8 ] -# os: [ ubuntu-latest ] -# runs-on: ${{ matrix.os}} -# env: -# STORAGE: etcd -# ETCD_ENDPOINTS: http://localhost:2379 -# steps: -# - uses: actions/checkout@v2 -# - name: Set up JDK ${{ matrix.java }} -# uses: actions/setup-java@v1 -# with: -# java-version: ${{ matrix.java }} -# - name: Cache Maven packages -# uses: actions/cache@v2 -# with: -# path: ~/.m2 -# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} -# restore-keys: ${{ runner.os }}-m2 -# - name: Run ETCD -# run: | -# chmod +x "${GITHUB_WORKSPACE}/.github/etcd.sh" -# "${GITHUB_WORKSPACE}/.github/etcd.sh" -# #- name: Run Test For Meta Manager -# # run: mvn test -q -Dtest=IMetaManagerTest -DfailIfNoTests=false -# - uses: codecov/codecov-action@v1 -# with: -# file: ./**/target/site/jacoco/jacoco.xml -# name: codecov \ No newline at end of file +name: "Metadata-Service-Test" + +on: + push: + branches: + - main + pull_request: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + ZK-Test: + strategy: + fail-fast: false + matrix: + java: [ 8 ] + os: [ ubuntu-latest ] + runs-on: ${{ matrix.os}} + env: + STORAGE: zookeeper + ZOOKEEPER_CONNECTION_STRING: 127.0.0.1:2181 + steps: + - uses: actions/checkout@v2 + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Cache Maven packages + uses: actions/cache@v2 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Run ZooKeeper + run: | + chmod +x "${GITHUB_WORKSPACE}/.github/zk.sh" + "${GITHUB_WORKSPACE}/.github/zk.sh" + - name: Run Test For Meta Manager + run: mvn test -q -Dtest=IMetaManagerTest -DfailIfNoTests=false + - uses: codecov/codecov-action@v1 + with: + file: ./**/target/site/jacoco/jacoco.xml + name: codecov + ETCD-Test: + strategy: + fail-fast: false + max-parallel: 20 + matrix: + java: [ 8 ] + os: [ ubuntu-latest ] + runs-on: ${{ matrix.os}} + env: + STORAGE: etcd + ETCD_ENDPOINTS: http://localhost:2379 + steps: + - uses: actions/checkout@v2 + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Cache Maven packages + uses: actions/cache@v2 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Run ETCD + run: | + chmod +x "${GITHUB_WORKSPACE}/.github/etcd.sh" + "${GITHUB_WORKSPACE}/.github/etcd.sh" + #- name: Run Test For Meta Manager + # run: mvn test -q -Dtest=IMetaManagerTest -DfailIfNoTests=false + - uses: codecov/codecov-action@v1 + with: + file: ./**/target/site/jacoco/jacoco.xml + name: codecov \ No newline at end of file From 1092f6b3102aa1bb6cb14776563301bf2f0800ae Mon Sep 17 00:00:00 2001 From: RemHero <1104304963@qq.com> Date: Thu, 19 Jan 2023 16:06:35 +0800 Subject: [PATCH 8/9] fix the OperatorType --- .../shared/operator/type/OperatorType.java | 60 ++++++++++++++----- 1 file changed, 44 insertions(+), 16 deletions(-) diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/operator/type/OperatorType.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/operator/type/OperatorType.java index f4f947ad9..7555478f0 100644 --- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/operator/type/OperatorType.java +++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/operator/type/OperatorType.java @@ -20,17 +20,33 @@ public enum OperatorType { - Unknown, - Binary, - Unary, - Multiple, + // Exception[0,9] + Unknown(0), - Project, - Select, - Join, + // MultipleOperator[10,19] + CombineNonQuery(10), + + //isGlobalOperator[20,29] + ShowTimeSeries(20), + Migration, + + //isNeedBroadcasting[30,39] + Delete(30), + Insert, + + // BinaryOperator[40,49] + Join(40), InnerJoin, OuterJoin, CrossJoin, + + + // isUnaryOperator >= 50 + Binary(50), + Unary, + Multiple, + Project, + Select, Union, Sort, Limit, @@ -39,24 +55,36 @@ public enum OperatorType { SetTransform, MappingTransform, Rename, - Reorder, - AddSchemaPrefix, + AddSchemaPrefix; - Delete, - Insert, - CombineNonQuery, - ShowTimeSeries, - Migration; + private int value; + OperatorType(){ + this(OperatorTypeCounter.nextValue); + } + OperatorType(int value){ + this.value = value; + OperatorTypeCounter.nextValue = value + 1; + } + + public int getValue() + { + return value; + } + + private static class OperatorTypeCounter + { + private static int nextValue = 0; + } public static boolean isBinaryOperator(OperatorType op) { - return op == Join || op == Union || op == InnerJoin || op == OuterJoin || op == CrossJoin; + return 40 < op.value && op.value < 49; } public static boolean isUnaryOperator(OperatorType op) { - return op == Project || op == Select || op == Sort || op == Limit || op == Downsample || op == RowTransform || op == SetTransform || op == MappingTransform || op == Delete || op == Insert || op == Rename || op == Reorder || op == AddSchemaPrefix; + return op.value >= 50; } public static boolean isMultipleOperator(OperatorType op) { From 73e0d8d874b012d4f33d585da2aad338fe4a8727 Mon Sep 17 00:00:00 2001 From: RemHero <1104304963@qq.com> Date: Thu, 19 Jan 2023 16:16:41 +0800 Subject: [PATCH 9/9] fix the OperatorType fix the OperatorType --- .../shared/operator/type/OperatorType.java | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/operator/type/OperatorType.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/operator/type/OperatorType.java index 7555478f0..7be03f308 100644 --- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/operator/type/OperatorType.java +++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/operator/type/OperatorType.java @@ -30,24 +30,22 @@ public enum OperatorType { ShowTimeSeries(20), Migration, - //isNeedBroadcasting[30,39] - Delete(30), - Insert, - - // BinaryOperator[40,49] - Join(40), + // BinaryOperator[30,39] + Join(30), + Union, InnerJoin, OuterJoin, CrossJoin, - // isUnaryOperator >= 50 - Binary(50), + // isUnaryOperator >= 40 + Binary(40), Unary, + Delete, + Insert, Multiple, Project, Select, - Union, Sort, Limit, Downsample, @@ -80,11 +78,11 @@ private static class OperatorTypeCounter } public static boolean isBinaryOperator(OperatorType op) { - return 40 < op.value && op.value < 49; + return op.value >= 30 && op.value <= 39; } public static boolean isUnaryOperator(OperatorType op) { - return op.value >= 50; + return op.value >= 40; } public static boolean isMultipleOperator(OperatorType op) {