├── .asf.yaml
├── .checkstyle
├── .github
├── ISSUE_TEMPLATE
│ ├── bug_report.yml
│ ├── custom.md
│ └── feature_request.yml
├── dependabot.yml
├── pull_request_template.md
└── workflows
│ ├── code-analysis.yml
│ ├── compile-check.yml
│ ├── dependency-check.yml
│ ├── grafana-plugin.yml
│ ├── greetings.yml
│ └── todos-check.yml
├── .gitignore
├── .mvn
├── .gradle-enterprise
│ └── gradle-enterprise-workspace-id
├── extensions.xml
├── gradle-enterprise.xml
└── wrapper
│ └── maven-wrapper.properties
├── Jenkinsfile
├── LICENSE
├── LICENSE-binary
├── NOTICE
├── NOTICE-binary
├── README-zh.md
├── README.md
├── asf.header
├── checkstyle.xml
├── connectors
├── flink-iotdb-connector
│ ├── README.md
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ └── java
│ │ │ └── org
│ │ │ └── apache
│ │ │ └── iotdb
│ │ │ └── flink
│ │ │ ├── DefaultIoTSerializationSchema.java
│ │ │ ├── Event.java
│ │ │ ├── IoTDBSink.java
│ │ │ ├── IoTDBSource.java
│ │ │ ├── IoTSerializationSchema.java
│ │ │ └── options
│ │ │ ├── IoTDBOptions.java
│ │ │ ├── IoTDBSinkOptions.java
│ │ │ └── IoTDBSourceOptions.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── apache
│ │ └── iotdb
│ │ └── flink
│ │ ├── DefaultIoTSerializationSchemaTest.java
│ │ ├── IoTDBSinkBatchInsertTest.java
│ │ ├── IoTDBSinkBatchTimerTest.java
│ │ └── IoTDBSinkInsertTest.java
├── flink-sql-iotdb-connector
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── org
│ │ │ └── apache
│ │ │ └── iotdb
│ │ │ └── flink
│ │ │ └── sql
│ │ │ ├── client
│ │ │ └── IoTDBWebSocketClient.java
│ │ │ ├── common
│ │ │ ├── Options.java
│ │ │ └── Utils.java
│ │ │ ├── exception
│ │ │ ├── IllegalIoTDBPathException.java
│ │ │ ├── IllegalOptionException.java
│ │ │ ├── IllegalSchemaException.java
│ │ │ ├── IllegalUrlPathException.java
│ │ │ └── UnsupportedDataTypeException.java
│ │ │ ├── factory
│ │ │ └── IoTDBDynamicTableFactory.java
│ │ │ ├── function
│ │ │ ├── IoTDBBoundedScanFunction.java
│ │ │ ├── IoTDBCDCSourceFunction.java
│ │ │ ├── IoTDBLookupFunction.java
│ │ │ └── IoTDBSinkFunction.java
│ │ │ ├── provider
│ │ │ ├── IoTDBDynamicTableSink.java
│ │ │ └── IoTDBDynamicTableSource.java
│ │ │ └── wrapper
│ │ │ ├── SchemaWrapper.java
│ │ │ └── TabletWrapper.java
│ │ └── resources
│ │ └── META-INF
│ │ └── services
│ │ └── org.apache.flink.table.factories.Factory
├── flink-tsfile-connector
│ ├── README.md
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ └── java
│ │ │ └── org
│ │ │ └── apache
│ │ │ └── iotdb
│ │ │ └── flink
│ │ │ └── tsfile
│ │ │ ├── RowRecordParser.java
│ │ │ ├── RowRowRecordParser.java
│ │ │ ├── RowTSRecordConverter.java
│ │ │ ├── TSRecordConverter.java
│ │ │ ├── TSRecordOutputFormat.java
│ │ │ ├── TsFileInputFormat.java
│ │ │ ├── TsFileOutputFormat.java
│ │ │ └── util
│ │ │ └── TSFileConfigUtil.java
│ │ └── test
│ │ ├── java
│ │ └── org
│ │ │ └── apache
│ │ │ └── iotdb
│ │ │ └── flink
│ │ │ ├── tsfile
│ │ │ ├── RowTSRecordOutputFormatIntegrationTest.java
│ │ │ ├── RowTSRecordOutputFormatTest.java
│ │ │ ├── RowTsFileConnectorTestBase.java
│ │ │ ├── RowTsFileInputFormatIntegrationTest.java
│ │ │ ├── RowTsFileInputFormatTest.java
│ │ │ ├── RowTsFileInputFormatTestBase.java
│ │ │ └── RowTsFileOutputFormatTestBase.java
│ │ │ └── util
│ │ │ ├── TSFileConfigUtilCompletenessTest.java
│ │ │ └── TsFileWriteUtil.java
│ │ └── resources
│ │ └── log4j.properties
├── grafana-connector
│ ├── img
│ │ ├── add_data_source.png
│ │ ├── add_graph.png
│ │ └── edit_data_source.png
│ ├── pom.xml
│ ├── readme.md
│ ├── readme_zh.md
│ └── src
│ │ ├── main
│ │ ├── java
│ │ │ └── org
│ │ │ │ └── apache
│ │ │ │ └── iotdb
│ │ │ │ └── web
│ │ │ │ └── grafana
│ │ │ │ ├── TsfileWebDemoApplication.java
│ │ │ │ ├── bean
│ │ │ │ └── TimeValues.java
│ │ │ │ ├── conf
│ │ │ │ └── MyConfiguration.java
│ │ │ │ ├── controller
│ │ │ │ └── DatabaseConnectController.java
│ │ │ │ ├── dao
│ │ │ │ ├── BasicDao.java
│ │ │ │ └── impl
│ │ │ │ │ └── BasicDaoImpl.java
│ │ │ │ ├── interceptor
│ │ │ │ └── LoginInterceptor.java
│ │ │ │ └── service
│ │ │ │ ├── DatabaseConnectService.java
│ │ │ │ └── impl
│ │ │ │ └── DatabaseConnectServiceImpl.java
│ │ └── resources
│ │ │ └── application.properties
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── apache
│ │ └── iotdb
│ │ └── web
│ │ └── grafana
│ │ └── dao
│ │ └── impl
│ │ └── BasicDaoImplTest.java
├── grafana-plugin
│ ├── .gitignore
│ ├── .prettierrc.js
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── Magefile.go
│ ├── README.md
│ ├── backend-compile.bat
│ ├── backend-compile.sh
│ ├── go.mod
│ ├── jest.config.js
│ ├── package.json
│ ├── pkg
│ │ ├── main.go
│ │ └── plugin
│ │ │ ├── iotdb_resource_handler.go
│ │ │ └── plugin.go
│ ├── pom.xml
│ ├── src
│ │ ├── ConfigEditor.tsx
│ │ ├── QueryEditor.tsx
│ │ ├── componments
│ │ │ ├── AggregateFun.tsx
│ │ │ ├── ControlValue.tsx
│ │ │ ├── FillValue.tsx
│ │ │ ├── Form.tsx
│ │ │ ├── FromValue.tsx
│ │ │ ├── GroupBy.tsx
│ │ │ ├── SelectValue.tsx
│ │ │ ├── TimeSeries.tsx
│ │ │ └── WhereValue.tsx
│ │ ├── datasource.ts
│ │ ├── functions.ts
│ │ ├── img
│ │ │ ├── addIoTDBDataSource.png
│ │ │ ├── logo.svg
│ │ │ └── showData.png
│ │ ├── module.ts
│ │ ├── plugin.json
│ │ └── types.ts
│ ├── tsconfig.json
│ └── yarn.lock
├── hadoop
│ ├── README.md
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ └── java
│ │ │ └── org
│ │ │ └── apache
│ │ │ └── iotdb
│ │ │ └── hadoop
│ │ │ ├── fileSystem
│ │ │ ├── HDFSConfUtil.java
│ │ │ ├── HDFSFile.java
│ │ │ ├── HDFSInput.java
│ │ │ └── HDFSOutput.java
│ │ │ └── tsfile
│ │ │ ├── IReaderSet.java
│ │ │ ├── TSFHadoopException.java
│ │ │ ├── TSFInputFormat.java
│ │ │ ├── TSFInputSplit.java
│ │ │ ├── TSFOutputFormat.java
│ │ │ ├── TSFRecordReader.java
│ │ │ ├── TSFRecordWriter.java
│ │ │ └── record
│ │ │ └── HDFSTSRecord.java
│ │ └── test
│ │ ├── java
│ │ └── org
│ │ │ └── apache
│ │ │ └── iotdb
│ │ │ └── hadoop
│ │ │ └── tsfile
│ │ │ ├── TSFHadoopTest.java
│ │ │ ├── TSFInputSplitTest.java
│ │ │ ├── TsFileTestHelper.java
│ │ │ └── constant
│ │ │ └── TestConstant.java
│ │ └── resources
│ │ └── logback.xml
├── hive-connector
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ └── java
│ │ │ └── org
│ │ │ └── apache
│ │ │ └── iotdb
│ │ │ └── hive
│ │ │ ├── TSFHiveInputFormat.java
│ │ │ ├── TSFHiveOutputFormat.java
│ │ │ ├── TSFHiveRecordReader.java
│ │ │ ├── TSFHiveRecordWriter.java
│ │ │ ├── TsFileDeserializer.java
│ │ │ ├── TsFileSerDe.java
│ │ │ └── TsFileSerDeException.java
│ │ └── test
│ │ ├── java
│ │ └── org
│ │ │ └── apache
│ │ │ └── iotdb
│ │ │ └── hive
│ │ │ ├── TSFHiveInputFormatTest.java
│ │ │ ├── TSFHiveRecordReaderTest.java
│ │ │ ├── TsFileDeserializerTest.java
│ │ │ ├── TsFileSerDeTest.java
│ │ │ ├── TsFileTestHelper.java
│ │ │ └── constant
│ │ │ └── TestConstant.java
│ │ └── resources
│ │ └── logback.xml
├── pom.xml
├── spark-iotdb-connector
│ ├── pom.xml
│ ├── scala_2.11
│ │ └── pom.xml
│ ├── scala_2.12
│ │ └── pom.xml
│ └── src
│ │ └── main
│ │ └── scala
│ │ └── org
│ │ └── apache
│ │ └── iotdb
│ │ └── spark
│ │ └── db
│ │ ├── Converter.scala
│ │ ├── DataFrameTools.scala
│ │ ├── DefaultSource.scala
│ │ ├── IoTDBOptions.scala
│ │ ├── IoTDBRDD.scala
│ │ ├── IoTDBRelation.scala
│ │ ├── SQLConstant.scala
│ │ ├── Transformer.scala
│ │ └── package.scala
├── spark-iotdb-table-connector
│ ├── iotdb-table-connector-3.3
│ │ ├── pom.xml
│ │ └── src
│ │ │ └── main
│ │ │ ├── resources
│ │ │ └── META-INF
│ │ │ │ └── services
│ │ │ │ └── org.apache.spark.sql.sources.DataSourceRegister
│ │ │ └── scala
│ │ │ └── org
│ │ │ └── apache
│ │ │ └── iotdb
│ │ │ └── spark
│ │ │ └── table
│ │ │ └── db
│ │ │ └── IoTDBTableProvider.scala
│ ├── iotdb-table-connector-3.4
│ │ ├── pom.xml
│ │ └── src
│ │ │ └── main
│ │ │ ├── resources
│ │ │ └── META-INF
│ │ │ │ └── services
│ │ │ │ └── org.apache.spark.sql.sources.DataSourceRegister
│ │ │ └── scala
│ │ │ └── org
│ │ │ └── apache
│ │ │ └── iotdb
│ │ │ └── spark
│ │ │ └── table
│ │ │ └── db
│ │ │ └── IoTDBTableProvider.scala
│ ├── iotdb-table-connector-3.5
│ │ ├── pom.xml
│ │ └── src
│ │ │ └── main
│ │ │ ├── resources
│ │ │ └── META-INF
│ │ │ │ └── services
│ │ │ │ └── org.apache.spark.sql.sources.DataSourceRegister
│ │ │ └── scala
│ │ │ └── org
│ │ │ └── apache
│ │ │ └── iotdb
│ │ │ └── spark
│ │ │ └── table
│ │ │ └── db
│ │ │ └── IoTDBTableProvider.scala
│ ├── pom.xml
│ └── spark-iotdb-table-common
│ │ ├── pom.xml
│ │ └── src
│ │ ├── main
│ │ └── scala
│ │ │ └── org
│ │ │ └── apache
│ │ │ └── iotdb
│ │ │ └── spark
│ │ │ └── table
│ │ │ └── db
│ │ │ ├── AbstractIoTDBTableProvider.scala
│ │ │ ├── IoTDBOptions.scala
│ │ │ ├── IoTDBTable.scala
│ │ │ ├── IoTDBUtils.scala
│ │ │ ├── read
│ │ │ ├── IoTDBExpressionSQLBuilder.scala
│ │ │ ├── IoTDBInputPartition.scala
│ │ │ ├── IoTDBPartitionReader.scala
│ │ │ ├── IoTDBPartitionReaderFactory.scala
│ │ │ ├── IoTDBScan.scala
│ │ │ └── IoTDBScanBuilder.scala
│ │ │ └── write
│ │ │ ├── IoTDBDataWriter.scala
│ │ │ ├── IoTDBWrite.scala
│ │ │ ├── IoTDBWriteBuilder.scala
│ │ │ └── IoTDBWriteFactory.scala
│ │ └── test
│ │ └── scala
│ │ └── org
│ │ └── apache
│ │ └── iotdb
│ │ └── spark
│ │ └── table
│ │ └── db
│ │ ├── UtilsTest.scala
│ │ └── read
│ │ └── PushDownPredicateSQLBuilderTest.scala
├── spark-tsfile
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ ├── java
│ │ │ └── org
│ │ │ │ └── apache
│ │ │ │ └── iotdb
│ │ │ │ └── spark
│ │ │ │ └── tsfile
│ │ │ │ ├── io
│ │ │ │ ├── TsFileOutputFormat.java
│ │ │ │ └── TsFileRecordWriter.java
│ │ │ │ └── qp
│ │ │ │ ├── Executor.java
│ │ │ │ ├── QueryProcessor.java
│ │ │ │ ├── common
│ │ │ │ ├── BasicOperator.java
│ │ │ │ ├── FilterOperator.java
│ │ │ │ ├── Operator.java
│ │ │ │ ├── SQLConstant.java
│ │ │ │ ├── SingleQuery.java
│ │ │ │ └── TSQueryPlan.java
│ │ │ │ ├── exception
│ │ │ │ ├── BasicOperatorException.java
│ │ │ │ ├── DNFOptimizeException.java
│ │ │ │ ├── LogicalOptimizeException.java
│ │ │ │ ├── MergeFilterException.java
│ │ │ │ ├── QueryOperatorException.java
│ │ │ │ ├── QueryProcessorException.java
│ │ │ │ └── RemoveNotException.java
│ │ │ │ └── optimizer
│ │ │ │ ├── DNFFilterOptimizer.java
│ │ │ │ ├── IFilterOptimizer.java
│ │ │ │ ├── MergeSingleFilterOptimizer.java
│ │ │ │ ├── PhysicalOptimizer.java
│ │ │ │ └── RemoveNotOptimizer.java
│ │ └── scala
│ │ │ └── org
│ │ │ └── apache
│ │ │ └── iotdb
│ │ │ └── spark
│ │ │ └── tsfile
│ │ │ ├── Converter.scala
│ │ │ ├── DefaultSource.scala
│ │ │ ├── NarrowConverter.scala
│ │ │ ├── NarrowTsFileOutputWriter.scala
│ │ │ ├── Transformer.scala
│ │ │ ├── TsFileWriterFactory.scala
│ │ │ ├── WideConverter.scala
│ │ │ ├── WideTsFileOutputWriter.scala
│ │ │ └── package.scala
│ │ └── test
│ │ └── scala
│ │ └── org
│ │ └── apache
│ │ └── iotdb
│ │ └── spark
│ │ ├── constant
│ │ └── TestConstant.java
│ │ ├── tool
│ │ ├── TsFileExample.java
│ │ └── TsFileWriteTool.java
│ │ └── tsfile
│ │ ├── ConverterTest.scala
│ │ ├── HDFSInputTest.java
│ │ └── TSFileSuit.scala
└── zeppelin-interpreter
│ ├── IoTDB-Zeppelin-Demo.zpln
│ ├── pom.xml
│ └── src
│ └── main
│ ├── java
│ └── org
│ │ └── apache
│ │ └── zeppelin
│ │ └── iotdb
│ │ └── IoTDBInterpreter.java
│ └── resources
│ └── interpreter-setting.json
├── distributions
├── pom.xml
└── src
│ └── assembly
│ ├── common-files.xml
│ ├── flink-sql-connector.xml
│ ├── grafana-connector.xml
│ ├── grafana-plugin.xml
│ ├── iotdb-spring-boot-starter.xml
│ ├── mybatis-generator-plugin.xml
│ └── spark-connector.xml
├── docker
├── ReadMe.md
└── src
│ └── main
│ ├── DockerCompose
│ ├── GrafanaPlugin
│ │ ├── Dockerfile-0.14.0-iotdb
│ │ └── docker-compose.yml
│ └── docker-compose-grafana.yml
│ ├── Dockerfile-0.12.6-grafana
│ └── Dockerfile-0.13.3-grafana-connector
├── examples
├── flink-sql
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── apache
│ │ └── iotdb
│ │ └── example
│ │ ├── BatchSinkExample.java
│ │ ├── BoundedScanExample.java
│ │ ├── CDCExample.java
│ │ ├── LookupExample.java
│ │ └── StreamingSinkExample.java
├── flink
│ ├── README.md
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── apache
│ │ └── iotdb
│ │ └── flink
│ │ ├── FlinkIoTDBSink.java
│ │ ├── FlinkIoTDBSource.java
│ │ ├── FlinkTsFileBatchSink.java
│ │ ├── FlinkTsFileBatchSource.java
│ │ ├── FlinkTsFileStreamSink.java
│ │ ├── FlinkTsFileStreamSource.java
│ │ └── TsFileUtils.java
├── hadoop
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── apache
│ │ └── iotdb
│ │ └── hadoop
│ │ └── tsfile
│ │ ├── Constant.java
│ │ ├── TSFMRReadExample.java
│ │ ├── TSMRWriteExample.java
│ │ ├── TsFileHelper.java
│ │ └── TsFileWriteToHDFS.java
├── iotdb-spring-boot-start
│ ├── README.md
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ ├── java
│ │ │ └── org
│ │ │ │ └── apache
│ │ │ │ └── iotdb
│ │ │ │ └── iotdbspringbootstartexample
│ │ │ │ ├── IoTDBSpringBootStartApplication.java
│ │ │ │ └── service
│ │ │ │ └── IoTDBService.java
│ │ └── resources
│ │ │ └── application.properties
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── apache
│ │ └── iotdb
│ │ └── iotdbspringbootstartexample
│ │ └── SpringBootIoTDBApplicationTests.java
├── kafka
│ ├── pom.xml
│ ├── readme.md
│ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── apache
│ │ └── iotdb
│ │ └── kafka
│ │ ├── Constant.java
│ │ ├── Consumer.java
│ │ ├── ConsumerThread.java
│ │ └── Producer.java
├── mybatis-generator
│ ├── README.md
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── org
│ │ │ └── apache
│ │ │ └── iotdb
│ │ │ └── mybatis
│ │ │ ├── Main.java
│ │ │ └── plugin
│ │ │ ├── mapper
│ │ │ └── MixMapper.java
│ │ │ ├── model
│ │ │ └── Mix.java
│ │ │ └── xml
│ │ │ └── MixMapper.xml
│ │ └── resources
│ │ ├── generatorConfig.xml
│ │ ├── generatorConfigByExample.xml
│ │ └── mybatis-config.xml
├── mybatisplus-generator
│ ├── README.md
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ ├── java
│ │ │ └── org
│ │ │ │ └── apache
│ │ │ │ └── iotdb
│ │ │ │ ├── Main.java
│ │ │ │ ├── controller
│ │ │ │ ├── Table1Controller.java
│ │ │ │ └── Table2Controller.java
│ │ │ │ ├── entity
│ │ │ │ ├── Table1.java
│ │ │ │ └── Table2.java
│ │ │ │ ├── mapper
│ │ │ │ ├── Table1Mapper.java
│ │ │ │ └── Table2Mapper.java
│ │ │ │ ├── service
│ │ │ │ ├── Table1Service.java
│ │ │ │ ├── Table2Service.java
│ │ │ │ └── impl
│ │ │ │ │ ├── Table1ServiceImpl.java
│ │ │ │ │ └── Table2ServiceImpl.java
│ │ │ │ └── xml
│ │ │ │ ├── Table1Mapper.xml
│ │ │ │ └── Table2Mapper.xml
│ │ └── resources
│ │ │ └── application.yml
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── apache
│ │ └── iotdb
│ │ └── ApplicationTest.java
├── pom.xml
├── pulsar
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── apache
│ │ └── iotdb
│ │ └── pulsar
│ │ ├── Constant.java
│ │ ├── PulsarConsumer.java
│ │ ├── PulsarConsumerThread.java
│ │ └── PulsarProducer.java
├── rabbitmq
│ ├── pom.xml
│ ├── readme.md
│ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── apache
│ │ └── iotdb
│ │ └── rabbitmq
│ │ ├── Constant.java
│ │ ├── RabbitMQChannelUtils.java
│ │ ├── RabbitMQConsumer.java
│ │ └── RabbitMQProducer.java
├── rocketmq
│ ├── pom.xml
│ ├── readme.md
│ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── apache
│ │ └── iotdb
│ │ └── rocketmq
│ │ ├── Constant.java
│ │ ├── RocketMQConsumer.java
│ │ ├── RocketMQProducer.java
│ │ └── Utils.java
└── spark-table
│ ├── README.md
│ ├── pom.xml
│ └── src
│ └── main
│ └── scala
│ └── org
│ └── apache
│ └── iotdb
│ └── spark
│ └── table
│ ├── SparkConnectorReadExample.scala
│ ├── SparkConnectorSQLExample.scala
│ └── SparkConnectorWriteExample.scala
├── helm
├── Chart.yaml
├── README.md
├── README_zh.md
├── templates
│ ├── NOTES.txt
│ ├── _helpers.tpl
│ ├── confignode-cm.yaml
│ ├── confignode.yaml
│ ├── datanode-cm.yaml
│ ├── datanode.yaml
│ └── load-balancer.yaml
└── values.yaml
├── images
├── getpods.png
├── getpvc.png
├── logininner.png
├── select10.png
├── showcluster.png
└── showtimeseries.png
├── iotdb-collector
├── collector-core
│ ├── pom.xml
│ └── src
│ │ ├── assembly
│ │ ├── core.xml
│ │ └── resources
│ │ │ ├── conf
│ │ │ ├── application.properties
│ │ │ └── logback.xml
│ │ │ └── sbin
│ │ │ ├── collector-env.sh
│ │ │ ├── common.sh
│ │ │ ├── start-collector.bat
│ │ │ ├── start-collector.sh
│ │ │ ├── stop-collector.bat
│ │ │ └── stop-collector.sh
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── apache
│ │ └── iotdb
│ │ └── collector
│ │ ├── Application.java
│ │ ├── api
│ │ ├── filter
│ │ │ └── ApiOriginFilter.java
│ │ ├── ping
│ │ │ └── impl
│ │ │ │ └── PingApiServiceImpl.java
│ │ └── v1
│ │ │ ├── plugin
│ │ │ └── impl
│ │ │ │ ├── PluginApiServiceImpl.java
│ │ │ │ └── PluginApiServiceRequestValidationHandler.java
│ │ │ └── task
│ │ │ └── impl
│ │ │ ├── TaskApiServiceImpl.java
│ │ │ └── TaskApiServiceRequestValidationHandler.java
│ │ ├── config
│ │ ├── ApiServiceOptions.java
│ │ ├── Configuration.java
│ │ ├── Options.java
│ │ ├── PipeRuntimeOptions.java
│ │ ├── PluginRuntimeOptions.java
│ │ ├── TaskRuntimeOptions.java
│ │ └── TrimProperties.java
│ │ ├── persistence
│ │ ├── DBConstant.java
│ │ ├── Persistence.java
│ │ ├── PluginPersistence.java
│ │ └── TaskPersistence.java
│ │ ├── plugin
│ │ ├── api
│ │ │ ├── PullSource.java
│ │ │ ├── PushSource.java
│ │ │ ├── customizer
│ │ │ │ ├── CollectorParameters.java
│ │ │ │ ├── CollectorProcessorRuntimeConfiguration.java
│ │ │ │ ├── CollectorRuntimeEnvironment.java
│ │ │ │ ├── CollectorSinkRuntimeConfiguration.java
│ │ │ │ └── CollectorSourceRuntimeConfiguration.java
│ │ │ └── event
│ │ │ │ ├── CollectorEvent.java
│ │ │ │ ├── DemoEvent.java
│ │ │ │ └── PeriodicalEvent.java
│ │ └── builtin
│ │ │ ├── BuiltinPlugin.java
│ │ │ ├── processor
│ │ │ ├── DoNothingProcessor.java
│ │ │ └── SubscriptionProcessor.java
│ │ │ ├── sink
│ │ │ ├── DemoSink.java
│ │ │ ├── client
│ │ │ │ ├── IoTDBClientManager.java
│ │ │ │ ├── IoTDBDataNodeCacheLeaderClientManager.java
│ │ │ │ ├── IoTDBDataNodeSyncClientManager.java
│ │ │ │ ├── IoTDBSyncClient.java
│ │ │ │ ├── IoTDBSyncClientManager.java
│ │ │ │ ├── ThriftClient.java
│ │ │ │ └── ThriftClientProperty.java
│ │ │ ├── compressor
│ │ │ │ ├── PipeCompressor.java
│ │ │ │ ├── PipeCompressorConfig.java
│ │ │ │ ├── PipeCompressorFactory.java
│ │ │ │ ├── PipeGZIPCompressor.java
│ │ │ │ ├── PipeLZ4Compressor.java
│ │ │ │ ├── PipeLZMA2Compressor.java
│ │ │ │ ├── PipeSnappyCompressor.java
│ │ │ │ └── PipeZSTDCompressor.java
│ │ │ ├── constant
│ │ │ │ ├── ColumnHeaderConstant.java
│ │ │ │ ├── PipeConnectorConstant.java
│ │ │ │ └── PipeTransferHandshakeConstant.java
│ │ │ ├── event
│ │ │ │ ├── PipeInsertionEvent.java
│ │ │ │ ├── PipeRawTabletInsertionEvent.java
│ │ │ │ └── PipeTsFileInsertionEvent.java
│ │ │ ├── exception
│ │ │ │ ├── PipeRuntimeConnectorCriticalException.java
│ │ │ │ ├── PipeRuntimeCriticalException.java
│ │ │ │ ├── PipeRuntimeException.java
│ │ │ │ ├── PipeRuntimeExceptionType.java
│ │ │ │ ├── PipeRuntimeMetaVersion.java
│ │ │ │ ├── PipeRuntimeNonCriticalException.java
│ │ │ │ ├── PipeRuntimeOutOfMemoryCriticalException.java
│ │ │ │ └── PipeStatus.java
│ │ │ ├── payload
│ │ │ │ ├── evolvable
│ │ │ │ │ └── batch
│ │ │ │ │ │ ├── PipeTabletEventBatch.java
│ │ │ │ │ │ ├── PipeTabletEventPlainBatch.java
│ │ │ │ │ │ ├── PipeTabletEventTsFileBatch.java
│ │ │ │ │ │ └── PipeTransferBatchReqBuilder.java
│ │ │ │ └── thrift
│ │ │ │ │ ├── request
│ │ │ │ │ ├── IoTDBConnectorRequestVersion.java
│ │ │ │ │ ├── PipeRequestType.java
│ │ │ │ │ ├── PipeTransferCompressedReq.java
│ │ │ │ │ ├── PipeTransferDataNodeHandshakeV1Req.java
│ │ │ │ │ ├── PipeTransferDataNodeHandshakeV2Req.java
│ │ │ │ │ ├── PipeTransferFilePieceReq.java
│ │ │ │ │ ├── PipeTransferFileSealReqV1.java
│ │ │ │ │ ├── PipeTransferFileSealReqV2.java
│ │ │ │ │ ├── PipeTransferHandshakeV1Req.java
│ │ │ │ │ ├── PipeTransferHandshakeV2Req.java
│ │ │ │ │ ├── PipeTransferSchemaSnapshotPieceReq.java
│ │ │ │ │ ├── PipeTransferSchemaSnapshotSealReq.java
│ │ │ │ │ ├── PipeTransferSliceReq.java
│ │ │ │ │ ├── PipeTransferTabletBatchReqV2.java
│ │ │ │ │ ├── PipeTransferTabletBinaryReq.java
│ │ │ │ │ ├── PipeTransferTabletBinaryReqV2.java
│ │ │ │ │ ├── PipeTransferTabletRawReq.java
│ │ │ │ │ ├── PipeTransferTabletRawReqV2.java
│ │ │ │ │ ├── PipeTransferTsFilePieceReq.java
│ │ │ │ │ ├── PipeTransferTsFilePieceWithModReq.java
│ │ │ │ │ └── PipeTransferTsFileSealWithModReq.java
│ │ │ │ │ └── response
│ │ │ │ │ └── PipeTransferFilePieceResp.java
│ │ │ └── protocol
│ │ │ │ ├── IoTDBConnector.java
│ │ │ │ ├── IoTDBDataRegionSyncConnector.java
│ │ │ │ ├── IoTDBSslSyncConnector.java
│ │ │ │ ├── PipeReceiverStatusHandler.java
│ │ │ │ └── session
│ │ │ │ └── IClientSession.java
│ │ │ └── source
│ │ │ ├── HttpPullSource.java
│ │ │ ├── HttpPushSource.java
│ │ │ ├── constant
│ │ │ └── SourceConstant.java
│ │ │ ├── event
│ │ │ └── common
│ │ │ │ ├── PipeBinaryTransformer.java
│ │ │ │ ├── PipeDataTypeTransformer.java
│ │ │ │ ├── PipeResetTabletRow.java
│ │ │ │ ├── PipeRow.java
│ │ │ │ └── PipeRowCollector.java
│ │ │ ├── iotdb
│ │ │ ├── IoTDBPushSource.java
│ │ │ ├── IoTDBPushSourceConstant.java
│ │ │ └── SubDemoEvent.java
│ │ │ └── kafka
│ │ │ ├── KafkaSource.java
│ │ │ └── KafkaSourceConstant.java
│ │ ├── runtime
│ │ ├── plugin
│ │ │ ├── PluginRuntime.java
│ │ │ ├── constructor
│ │ │ ├── load
│ │ │ │ ├── PluginClassLoader.java
│ │ │ │ └── PluginClassLoaderManager.java
│ │ │ └── meta
│ │ │ │ ├── PluginMeta.java
│ │ │ │ └── PluginMetaKeeper.java
│ │ ├── progress
│ │ │ ├── ProgressIndex.java
│ │ │ └── ProgressRuntime.java
│ │ └── task
│ │ │ ├── Task.java
│ │ │ ├── TaskCombiner.java
│ │ │ ├── TaskDispatch.java
│ │ │ ├── TaskRuntime.java
│ │ │ ├── TaskStateEnum.java
│ │ │ ├── event
│ │ │ ├── EventCollector.java
│ │ │ ├── EventContainer.java
│ │ │ └── ProgressReportEvent.java
│ │ │ ├── processor
│ │ │ ├── ProcessorConsumer.java
│ │ │ ├── ProcessorExceptionHandler.java
│ │ │ └── ProcessorTask.java
│ │ │ ├── sink
│ │ │ ├── SinkConsumer.java
│ │ │ ├── SinkExceptionHandler.java
│ │ │ └── SinkTask.java
│ │ │ └── source
│ │ │ ├── SourceTask.java
│ │ │ ├── pull
│ │ │ ├── PullSourceConsumer.java
│ │ │ └── PullSourceTask.java
│ │ │ └── push
│ │ │ └── PushSourceTask.java
│ │ ├── schedule
│ │ ├── ScheduleJob.java
│ │ ├── SchedulePushEventJob.java
│ │ ├── ScheduleReportProgressJob.java
│ │ └── ThreadName.java
│ │ ├── service
│ │ ├── ApiService.java
│ │ ├── IService.java
│ │ ├── PersistenceService.java
│ │ ├── RuntimeService.java
│ │ └── ScheduleService.java
│ │ └── utils
│ │ ├── PathUtil.java
│ │ ├── PipeMemoryWeightUtil.java
│ │ ├── PluginFileUtils.java
│ │ ├── SerializationUtil.java
│ │ ├── Triple.java
│ │ ├── builder
│ │ ├── PipeTableModeTsFileBuilder.java
│ │ ├── PipeTreeModelTsFileBuilder.java
│ │ └── PipeTsFileBuilder.java
│ │ ├── cacher
│ │ └── LeaderCacheUtils.java
│ │ ├── preiodical
│ │ ├── ScheduledExecutorUtil.java
│ │ └── WrappedRunnable.java
│ │ └── sorter
│ │ ├── PipeTableModelTabletEventSorter.java
│ │ ├── PipeTabletEventSorter.java
│ │ └── PipeTreeModelTabletEventSorter.java
├── collector-distribution
│ ├── pom.xml
│ └── src
│ │ └── assembly
│ │ └── collector-core.xml
├── collector-openapi
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── openapi3
│ │ ├── ping
│ │ └── ping.yaml
│ │ └── v1
│ │ ├── plugin.yaml
│ │ └── task.yaml
└── pom.xml
├── iotdb-operator
├── .dockerignore
├── .gitignore
├── .golangci.yml
├── Dockerfile
├── Makefile
├── PROJECT
├── README.md
├── api
│ └── v1
│ │ ├── common_types.go
│ │ ├── confignode_types.go
│ │ ├── confignode_webhook.go
│ │ ├── confignode_webhook_test.go
│ │ ├── datanode_types.go
│ │ ├── datanode_webhook.go
│ │ ├── datanode_webhook_test.go
│ │ ├── groupversion_info.go
│ │ ├── webhook_suite_test.go
│ │ └── zz_generated.deepcopy.go
├── cmd
│ └── main.go
├── config
│ ├── certmanager
│ │ ├── certificate.yaml
│ │ ├── kustomization.yaml
│ │ └── kustomizeconfig.yaml
│ ├── crd
│ │ ├── bases
│ │ │ ├── iotdb.apache.org_confignodes.yaml
│ │ │ └── iotdb.apache.org_datanodes.yaml
│ │ ├── kustomization.yaml
│ │ ├── kustomizeconfig.yaml
│ │ └── patches
│ │ │ ├── cainjection_in_confignodes.yaml
│ │ │ ├── cainjection_in_datanodes.yaml
│ │ │ ├── webhook_in_confignodes.yaml
│ │ │ └── webhook_in_datanodes.yaml
│ ├── default
│ │ ├── kustomization.yaml
│ │ ├── manager_auth_proxy_patch.yaml
│ │ ├── manager_config_patch.yaml
│ │ ├── manager_webhook_patch.yaml
│ │ └── webhookcainjection_patch.yaml
│ ├── manager
│ │ ├── kustomization.yaml
│ │ └── manager.yaml
│ ├── manifests
│ │ └── kustomization.yaml
│ ├── prometheus
│ │ ├── kustomization.yaml
│ │ └── monitor.yaml
│ ├── rbac
│ │ ├── auth_proxy_client_clusterrole.yaml
│ │ ├── auth_proxy_role.yaml
│ │ ├── auth_proxy_role_binding.yaml
│ │ ├── auth_proxy_service.yaml
│ │ ├── confignode_editor_role.yaml
│ │ ├── confignode_viewer_role.yaml
│ │ ├── datanode_editor_role.yaml
│ │ ├── datanode_viewer_role.yaml
│ │ ├── kustomization.yaml
│ │ ├── leader_election_role.yaml
│ │ ├── leader_election_role_binding.yaml
│ │ ├── role.yaml
│ │ ├── role_binding.yaml
│ │ └── service_account.yaml
│ ├── samples
│ │ ├── iotdb_v1_confignode.yaml
│ │ ├── iotdb_v1_datanode.yaml
│ │ ├── kustomization.yaml
│ │ └── pv-example
│ │ │ ├── confignode-pv.yaml
│ │ │ └── datanode-pv.yaml
│ ├── scorecard
│ │ ├── bases
│ │ │ └── config.yaml
│ │ ├── kustomization.yaml
│ │ └── patches
│ │ │ ├── basic.config.yaml
│ │ │ └── olm.config.yaml
│ └── webhook
│ │ ├── kustomization.yaml
│ │ ├── kustomizeconfig.yaml
│ │ ├── manifests.yaml
│ │ └── service.yaml
├── go.mod
├── go.sum
├── hack
│ └── boilerplate.go.txt
├── internal
│ └── controller
│ │ ├── common_name.go
│ │ ├── confignode_controller.go
│ │ ├── confignode_controller_test.go
│ │ ├── datanode_controller.go
│ │ ├── datanode_controller_test.go
│ │ ├── strutil
│ │ └── strutil.go
│ │ └── suite_test.go
└── test
│ ├── e2e
│ ├── e2e_suite_test.go
│ └── e2e_test.go
│ └── utils
│ └── utils.go
├── iotdb-spring-boot-starter
├── README.md
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── org
│ │ └── apache
│ │ └── iotdb
│ │ ├── config
│ │ └── IoTDBSessionProperties.java
│ │ └── session
│ │ └── IoTDBSessionPool.java
│ └── resources
│ └── META-INF
│ └── spring
│ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports
├── jenkins.pom
├── licenses
├── CDDL License 1.1
├── Eclipse Public License 1.0 (EPL-1.0)
├── Eclipse Public License version 2.0 (EPL-2.0)
├── The 2-Clause BSD License
├── The 3-Clause BSD License
├── The MIT License (QOS.ch)
└── The MIT License (progressbar)
├── mvnw
├── mvnw.cmd
├── mybatis-generator
├── .gitignore
├── README-zh.md
├── README.md
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── org
│ │ └── apache
│ │ └── iotdb
│ │ └── mybatis
│ │ └── plugin
│ │ ├── BatchInsertPlugin.java
│ │ ├── LombokPlugin.java
│ │ ├── SerializablePlugin.java
│ │ ├── generator
│ │ ├── CNCommentGenerator.java
│ │ ├── SwaggerCommentGenerator.java
│ │ └── resolver
│ │ │ ├── IoTDBJavaTypeResolver.java
│ │ │ └── JavaTypeResolverSelfImpl.java
│ │ └── util
│ │ └── DateUtil.java
│ └── resources
│ └── generatorConfig.xml
└── pom.xml
/.asf.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | notifications:
21 | issues: reviews@iotdb.apache.org
22 | pullrequests: reviews@iotdb.apache.org
23 |
24 | github:
25 | description: "Apache IoTDB Extras"
26 | homepage: https://iotdb.apache.org/
27 | labels:
28 | - timeseries
29 | - database
30 | - iot
31 | - nosql
32 | - big-data
33 | - java
34 | - tsdb
35 | features:
36 | wiki: true
37 | issues: true
38 | enabled_merge_buttons:
39 | # enable squash button:
40 | squash: true
41 | # enable merge button:
42 | merge: false
43 | # disable rebase button:
44 | rebase: true
45 |
--------------------------------------------------------------------------------
/.checkstyle:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/custom.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Custom issue template
3 | about: Describe this issue template's purpose here.
4 |
5 | ---
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | version: 2
19 |
20 | updates:
21 | - package-ecosystem: maven
22 | directory: "/"
23 | schedule:
24 | interval: monthly
25 | target-branch: "master"
26 | ignore:
27 | - dependency-name: "*"
28 | update-types: [ "version-update:semver-major", "version-update:semver-minor" ]
29 | labels:
30 | - "dependencies"
31 | - "java"
32 |
33 |
34 | - package-ecosystem: "github-actions"
35 | directory: "/"
36 | schedule:
37 | interval: monthly
38 | target-branch: "master"
39 | ignore:
40 | - dependency-name: "*"
41 | update-types: [ "version-update:semver-major", "version-update:semver-minor" ]
42 | labels:
43 | - "dependencies"
44 | - "github_actions"
45 |
46 |
--------------------------------------------------------------------------------
/.github/workflows/code-analysis.yml:
--------------------------------------------------------------------------------
1 | name: Static Code Analysis
2 |
3 | on:
4 | push:
5 | branches:
6 | - master
7 | - "new_*"
8 | paths-ignore:
9 | - "docs/**"
10 | - 'site/**'
11 | pull_request:
12 | branches:
13 | - master
14 | - "new_*"
15 | paths-ignore:
16 | - "docs/**"
17 | - 'site/**'
18 | # allow manually run the action:
19 | workflow_dispatch:
20 |
21 | jobs:
22 | code-analyze:
23 | strategy:
24 | fail-fast: false
25 | matrix:
26 | language: [ 'java', 'go', 'typescript' ]
27 | runs-on: ubuntu-latest
28 |
29 | steps:
30 | - name: Checkout code
31 | uses: actions/checkout@v4
32 |
33 | - name: Initialize CodeQL
34 | uses: github/codeql-action/init@v3
35 | with:
36 | languages: ${{ matrix.language }}
37 | queries: +security-and-quality
38 |
39 | - name: Auto Build
40 | uses: github/codeql-action/autobuild@v3
41 |
42 | - name: Perform CodeQL Analysis
43 | uses: github/codeql-action/analyze@v3
--------------------------------------------------------------------------------
/.github/workflows/compile-check.yml:
--------------------------------------------------------------------------------
1 | # This workflow will compile IoTDB under jdk8 to check for compatibility issues
2 |
3 | name: Compile Check
4 |
5 | on:
6 | push:
7 | branches:
8 | - master
9 | - 'new_*'
10 | paths-ignore:
11 | - 'docs/**'
12 | - 'site/**'
13 | pull_request:
14 | branches:
15 | - master
16 | - "new_*"
17 | paths-ignore:
18 | - 'docs/**'
19 | - 'site/**'
20 | # allow manually run the action:
21 | workflow_dispatch:
22 |
23 | concurrency:
24 | group: ${{ github.workflow }}-${{ github.ref }}
25 | cancel-in-progress: true
26 |
27 | env:
28 | MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
29 | MAVEN_ARGS: --batch-mode --no-transfer-progress
30 | DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
31 |
32 | jobs:
33 | compile-check:
34 | strategy:
35 | fail-fast: false
36 | matrix:
37 | java: [8, 11, 17, 21]
38 | os: [ ubuntu-latest ]
39 | runs-on: ${{ matrix.os }}
40 | steps:
41 | - uses: actions/checkout@v4
42 | - name: Set up JDK ${{ matrix.java }}
43 | uses: actions/setup-java@v4
44 | with:
45 | distribution: liberica
46 | java-version: ${{ matrix.java }}
47 | - name: Compiler Test
48 | shell: bash
49 | run: |
50 | if [ "${{ matrix.java }}" -ge 17 ]; then
51 | mvn clean verify -P with-springboot -ntp
52 | else
53 | mvn clean verify -ntp
54 | fi
55 |
--------------------------------------------------------------------------------
/.github/workflows/greetings.yml:
--------------------------------------------------------------------------------
1 | name: Greetings
2 |
3 | on: [issues, pull_request_target]
4 |
5 | jobs:
6 | greeting:
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/first-interaction@v1.3.0
10 | continue-on-error: true
11 | with:
12 | repo-token: ${{ secrets.GITHUB_TOKEN }}
13 | issue-message: 'Hi, this is your first issue in IoTDB project. Thanks for your report. Welcome to join the community!'
14 | pr-message: 'Hi, this is your first pull request in IoTDB project. Thanks for your contribution! IoTDB will be better because of you.'
15 |
--------------------------------------------------------------------------------
/.github/workflows/todos-check.yml:
--------------------------------------------------------------------------------
1 | name: Check TODOs and FIXMEs in Changed Files
2 |
3 | on:
4 | pull_request:
5 | branches:
6 | - master
7 | - "new_*"
8 | paths-ignore:
9 | - 'docs/**'
10 | - 'site/**'
11 | # allow manually run the action:
12 | workflow_dispatch:
13 |
14 | jobs:
15 | todo-check:
16 | runs-on: ubuntu-latest
17 |
18 | steps:
19 | - name: Checkout code
20 | uses: actions/checkout@v4
21 |
22 | - name: Check for TODOs and FIXMEs in changed files
23 | run: |
24 | # Fetch the target branch
25 | git fetch origin $GITHUB_BASE_REF
26 |
27 | git switch -c check_branch
28 |
29 | # Get the diff of the changes
30 | DIFF=$(git diff origin/$GITHUB_BASE_REF check_branch)
31 |
32 |
33 | # Check the diff for TODOs
34 | if echo "$DIFF" | grep -Eq '^\+.*(TODO|FIXME)'; then
35 | echo "TODO or FIXME found in the changes. Please resolve it before merging."
36 | # exit 1
37 | else
38 | echo "No TODOs found in changed content."
39 | fi
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # Maven related
3 | target/
4 |
5 | # IntelliJ relaged
6 | .idea/
7 | *.iml
8 |
9 | # log
10 | logs/
11 |
12 | .DS_Store
13 | ~/
--------------------------------------------------------------------------------
/.mvn/.gradle-enterprise/gradle-enterprise-workspace-id:
--------------------------------------------------------------------------------
1 | kl7k3ragjregzk2gtxfrzupvie
--------------------------------------------------------------------------------
/.mvn/extensions.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 |
24 | com.gradle
25 | gradle-enterprise-maven-extension
26 | 1.19.2
27 |
28 |
29 | com.gradle
30 | common-custom-user-data-maven-extension
31 | 1.12.4
32 |
33 |
34 |
--------------------------------------------------------------------------------
/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.3/apache-maven-3.9.3-bin.zip
19 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
20 |
--------------------------------------------------------------------------------
/NOTICE:
--------------------------------------------------------------------------------
1 | Apache IoTDB
2 | Copyright 2018-2024 The Apache Software Foundation.
3 |
4 | This product includes software developed at
5 | The Apache Software Foundation (http://www.apache.org/).
6 |
7 | ============================================================================
8 |
9 | IoTDB project uses 4 Chinese Patents:
10 | * 201711384490X
11 | * 201810111712.9
12 | * 201711322631.5
13 | * 201711319331.1
14 |
15 | According to the Apache 2.0 License. The owner of the patents, Tsinghua University,
16 | grant the users the right to the use of patent under the requirement of Apache 2.0 License.
17 |
18 | ============================================================================
19 |
20 | Apache Commons Collections
21 | Copyright 2001-2019 The Apache Software Foundation
22 |
23 | This product includes software developed at
24 | The Apache Software Foundation (http://www.apache.org/).
--------------------------------------------------------------------------------
/NOTICE-binary:
--------------------------------------------------------------------------------
1 | Apache IoTDB
2 | Copyright 2018-2024 The Apache Software Foundation.
3 |
4 | This product includes software developed at
5 | The Apache Software Foundation (http://www.apache.org/).
6 |
7 | ============================================================================
8 |
9 | IoTDB project uses 4 Chinese Patents:
10 | * 201711384490X
11 | * 201810111712.9
12 | * 201711322631.5
13 | * 201711319331.1
14 |
15 | According to the Apache 2.0 License. The owner of the patents, Tsinghua University,
16 | grant the users the right to the use of patent under the requirement of Apache 2.0 License.
17 |
18 | ============================================================================
19 |
20 | Apache Commons Collections
21 | Copyright 2001-2019 The Apache Software Foundation
22 |
23 | This product includes software developed at
24 | The Apache Software Foundation (http://www.apache.org/).
--------------------------------------------------------------------------------
/asf.header:
--------------------------------------------------------------------------------
1 | Licensed to the Apache Software Foundation (ASF) under one
2 | or more contributor license agreements. See the NOTICE file
3 | distributed with this work for additional information
4 | regarding copyright ownership. The ASF licenses this file
5 | to you under the Apache License, Version 2.0 (the
6 | "License"); you may not use this file except in compliance
7 | with the License. You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing,
12 | software distributed under the License is distributed on an
13 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | KIND, either express or implied. See the License for the
15 | specific language governing permissions and limitations
16 | under the License.
17 |
--------------------------------------------------------------------------------
/connectors/flink-iotdb-connector/src/main/java/org/apache/iotdb/flink/IoTSerializationSchema.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.iotdb.flink;
20 |
21 | import java.io.Serializable;
22 |
23 | /**
24 | * IoTSerializationSchema serializes the input tuple data into events for inserting into IoTDB
25 | * server.
26 | *
27 | * @param the input data type
28 | */
29 | public interface IoTSerializationSchema extends Serializable {
30 |
31 | Event serialize(T tuple);
32 | }
33 |
--------------------------------------------------------------------------------
/connectors/flink-sql-iotdb-connector/src/main/java/org/apache/iotdb/flink/sql/exception/IllegalIoTDBPathException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.iotdb.flink.sql.exception;
20 |
21 | public class IllegalIoTDBPathException extends RuntimeException {
22 | public IllegalIoTDBPathException(String s) {
23 | super(s);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/connectors/flink-sql-iotdb-connector/src/main/java/org/apache/iotdb/flink/sql/exception/IllegalOptionException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.iotdb.flink.sql.exception;
20 |
21 | public class IllegalOptionException extends RuntimeException {
22 | public IllegalOptionException(String s) {
23 | super(s);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/connectors/flink-sql-iotdb-connector/src/main/java/org/apache/iotdb/flink/sql/exception/IllegalSchemaException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.iotdb.flink.sql.exception;
20 |
21 | public class IllegalSchemaException extends RuntimeException {
22 | public IllegalSchemaException(String s) {
23 | super(s);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/connectors/flink-sql-iotdb-connector/src/main/java/org/apache/iotdb/flink/sql/exception/IllegalUrlPathException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.iotdb.flink.sql.exception;
20 |
21 | public class IllegalUrlPathException extends RuntimeException {
22 | public IllegalUrlPathException(String s) {
23 | super(s);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/connectors/flink-sql-iotdb-connector/src/main/java/org/apache/iotdb/flink/sql/exception/UnsupportedDataTypeException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.iotdb.flink.sql.exception;
20 |
21 | public class UnsupportedDataTypeException extends RuntimeException {
22 | public UnsupportedDataTypeException(String s) {
23 | super(s);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/connectors/flink-sql-iotdb-connector/src/main/resources/META-INF/services/org.apache.flink.table.factories.Factory:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | org.apache.iotdb.flink.sql.factory.IoTDBDynamicTableFactory
--------------------------------------------------------------------------------
/connectors/flink-tsfile-connector/src/test/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | # Set root logger level to DEBUG and its only appender to A1.
21 | log4j.rootLogger=DEBUG, A1
22 |
23 | # A1 is set to be a ConsoleAppender.
24 | log4j.appender.A1=org.apache.log4j.ConsoleAppender
25 |
26 | # A1 uses PatternLayout.
27 | log4j.appender.A1.layout=org.apache.log4j.PatternLayout
28 | log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
--------------------------------------------------------------------------------
/connectors/grafana-connector/img/add_data_source.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/iotdb-extras/b056464a6bff21fb097d93ef21b05c7789108855/connectors/grafana-connector/img/add_data_source.png
--------------------------------------------------------------------------------
/connectors/grafana-connector/img/add_graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/iotdb-extras/b056464a6bff21fb097d93ef21b05c7789108855/connectors/grafana-connector/img/add_graph.png
--------------------------------------------------------------------------------
/connectors/grafana-connector/img/edit_data_source.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/iotdb-extras/b056464a6bff21fb097d93ef21b05c7789108855/connectors/grafana-connector/img/edit_data_source.png
--------------------------------------------------------------------------------
/connectors/grafana-connector/src/main/java/org/apache/iotdb/web/grafana/TsfileWebDemoApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.iotdb.web.grafana;
20 |
21 | import org.springframework.boot.SpringApplication;
22 | import org.springframework.boot.autoconfigure.SpringBootApplication;
23 |
24 | @SpringBootApplication
25 | public class TsfileWebDemoApplication {
26 |
27 | public static void main(String[] args) {
28 | SpringApplication.run(TsfileWebDemoApplication.class, args);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/connectors/grafana-connector/src/main/java/org/apache/iotdb/web/grafana/bean/TimeValues.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.iotdb.web.grafana.bean;
20 |
21 | /** Created by dell on 2017/7/18. */
22 | public class TimeValues {
23 |
24 | private long time;
25 | private Object value;
26 |
27 | @Override
28 | public String toString() {
29 | return "TimeValues{" + "time=" + time + ", values=" + value + '}';
30 | }
31 |
32 | public long getTime() {
33 | return time;
34 | }
35 |
36 | public void setTime(long time) {
37 | this.time = time;
38 | }
39 |
40 | public Object getValue() {
41 | return value;
42 | }
43 |
44 | public void setValue(Object value) {
45 | this.value = value;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/connectors/grafana-connector/src/main/java/org/apache/iotdb/web/grafana/dao/BasicDao.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.iotdb.web.grafana.dao;
20 |
21 | import org.apache.iotdb.web.grafana.bean.TimeValues;
22 |
23 | import org.apache.tsfile.utils.Pair;
24 |
25 | import java.time.ZonedDateTime;
26 | import java.util.List;
27 |
28 | /** Created by dell on 2017/7/17. */
29 | public interface BasicDao {
30 |
31 | List querySeries(String s, Pair timeRange);
32 |
33 | List getMetaData();
34 | }
35 |
--------------------------------------------------------------------------------
/connectors/grafana-connector/src/main/java/org/apache/iotdb/web/grafana/service/DatabaseConnectService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.iotdb.web.grafana.service;
20 |
21 | import org.apache.iotdb.web.grafana.bean.TimeValues;
22 |
23 | import org.apache.tsfile.utils.Pair;
24 |
25 | import java.time.ZonedDateTime;
26 | import java.util.List;
27 |
28 | public interface DatabaseConnectService {
29 |
30 | List querySeries(String s, Pair timeRange);
31 |
32 | List getMetaData();
33 | }
34 |
--------------------------------------------------------------------------------
/connectors/grafana-plugin/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 |
8 | node_modules/
9 | node/
10 | coverage/
11 |
12 | # Runtime data
13 | pids
14 | *.pid
15 | *.seed
16 | *.pid.lock
17 | *.sum
18 |
19 | # Directory for instrumented libs generated by jscoverage/JSCover
20 | lib-cov
21 |
22 | # Coverage directory used by tools like istanbul
23 | coverage
24 |
25 | # Compiled binary addons (https://nodejs.org/api/addons.html)
26 | dist/
27 | artifacts/
28 | work/
29 | ci/
30 | e2e-results/
31 |
32 | # Editor
33 | .idea
34 |
--------------------------------------------------------------------------------
/connectors/grafana-plugin/.prettierrc.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | module.exports = {
19 | ...require('@grafana/toolkit/src/config/prettier.plugin.config.json'),
20 | };
21 |
--------------------------------------------------------------------------------
/connectors/grafana-plugin/CHANGELOG.md:
--------------------------------------------------------------------------------
1 |
21 |
22 | # Changelog
23 |
24 | See [RELEASE_NOTES.md](../RELEASE_NOTES.md)
--------------------------------------------------------------------------------
/connectors/grafana-plugin/Magefile.go:
--------------------------------------------------------------------------------
1 | //Licensed to the Apache Software Foundation (ASF) under one or more
2 | //contributor license agreements. See the NOTICE file distributed with
3 | //this work for additional information regarding copyright ownership.
4 | //The ASF licenses this file to You under the Apache License, Version 2.0
5 | //(the "License"); you may not use this file except in compliance with
6 | //the License. You may obtain a copy of the License at
7 | //
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 |
16 | //+build mage
17 |
18 | package main
19 |
20 | import (
21 | "fmt"
22 | // mage:import
23 | build "github.com/grafana/grafana-plugin-sdk-go/build"
24 | )
25 |
26 | // Hello prints a message (shows that you can define custom Mage targets).
27 | func Hello() {
28 | fmt.Println("hello plugin developer!")
29 | }
30 |
31 | // Default configures the default target.
32 | var Default = build.BuildAll
33 |
--------------------------------------------------------------------------------
/connectors/grafana-plugin/backend-compile.bat:
--------------------------------------------------------------------------------
1 | @REM
2 | @REM Licensed to the Apache Software Foundation (ASF) under one
3 | @REM or more contributor license agreements. See the NOTICE file
4 | @REM distributed with this work for additional information
5 | @REM regarding copyright ownership. The ASF licenses this file
6 | @REM to you under the Apache License, Version 2.0 (the
7 | @REM "License"); you may not use this file except in compliance
8 | @REM with the License. You may obtain a copy of the License at
9 | @REM
10 | @REM http://www.apache.org/licenses/LICENSE-2.0
11 | @REM
12 | @REM Unless required by applicable law or agreed to in writing,
13 | @REM software distributed under the License is distributed on an
14 | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | @REM KIND, either express or implied. See the License for the
16 | @REM specific language governing permissions and limitations
17 | @REM under the License.
18 | @REM
19 |
20 | @echo off
21 | for /F %%i in ('cd') do ( set pwdpath=%%i)
22 | for /F %%i in ('go env GOPATH') do ( set gopath=%%i)
23 | %gopath:~0,2%
24 | cd /d %gopath%
25 | go get -u github.com/grafana/grafana-plugin-sdk-go@v0.250.0
26 | go mod tidy
27 | git clone https://github.com/magefile/mage
28 | cd mage
29 | go run bootstrap.go
30 | cd /d %pwdpath%
31 | %gopath%\bin\mage -v
32 |
--------------------------------------------------------------------------------
/connectors/grafana-plugin/jest.config.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | // This file is needed because it is used by vscode and other tools that
18 | // call `jest` directly. However, unless you are doing anything special
19 | // do not edit this file
20 |
21 | const standard = require('@grafana/toolkit/src/config/jest.plugin.config');
22 |
23 | // This process will use the same config that `yarn test` is using
24 | module.exports = standard.jestConfig();
25 |
--------------------------------------------------------------------------------
/connectors/grafana-plugin/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "iotdb",
3 | "version": "1.0.1",
4 | "description": "Apache IoTDB",
5 | "scripts": {
6 | "build": "grafana-toolkit plugin:build",
7 | "test": "grafana-toolkit plugin:test",
8 | "dev": "grafana-toolkit plugin:dev",
9 | "watch": "grafana-toolkit plugin:dev --watch",
10 | "sign": "grafana-toolkit plugin:sign",
11 | "start": "yarn watch"
12 | },
13 | "author": "the Apache Software Foundation (ASF)",
14 | "license": "Apache-2.0",
15 | "devDependencies": {
16 | "@grafana/data": "latest",
17 | "@grafana/toolkit": "latest",
18 | "@grafana/ui": "latest",
19 | "@grafana/runtime": "latest",
20 | "@types/lodash": "latest"
21 | },
22 | "resolutions": {
23 | "rxjs": "7.3.0"
24 | },
25 | "engines": {
26 | "node": ">=14"
27 | },
28 | "dependencies": {
29 | "node-sass": "^7.0.1"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/connectors/grafana-plugin/src/componments/ControlValue.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | import React, { FunctionComponent } from 'react';
18 | import { SegmentInput } from '@grafana/ui';
19 |
20 | export interface Props {
21 | control: string;
22 | onChange: (controlStr: string) => void;
23 | }
24 |
25 | export const ControlValue: FunctionComponent = ({ control, onChange }) => (
26 | <>
27 | {
28 | <>
29 | onChange(string.toString())}
34 | />
35 | >
36 | }
37 | >
38 | );
39 |
--------------------------------------------------------------------------------
/connectors/grafana-plugin/src/componments/FillValue.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | import React, { FunctionComponent } from 'react';
18 | import { SegmentInput } from '@grafana/ui';
19 |
20 | export interface Props {
21 | fill: string;
22 | onChange: (fillValue: string) => void;
23 | }
24 |
25 | export const FillValue: FunctionComponent = ({ fill, onChange }) => (
26 | <>
27 | {
28 | <>
29 | onChange(string.toString())}
34 | />
35 | >
36 | }
37 | >
38 | );
39 |
--------------------------------------------------------------------------------
/connectors/grafana-plugin/src/componments/Form.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | import React, { InputHTMLAttributes, FunctionComponent } from 'react';
19 | import { InlineFormLabel } from '@grafana/ui';
20 |
21 | export interface Props extends InputHTMLAttributes {
22 | label: string;
23 | tooltip?: string;
24 | children?: React.ReactNode;
25 | }
26 |
27 | export const QueryField: FunctionComponent> = ({ label, tooltip, children }) => (
28 | <>
29 |
30 | {label}
31 |
32 | {children}
33 | >
34 | );
35 |
36 | export const QueryInlineField: FunctionComponent = ({ ...props }) => {
37 | return (
38 |
39 |
40 |
41 | );
42 | };
43 |
--------------------------------------------------------------------------------
/connectors/grafana-plugin/src/componments/WhereValue.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | import React, { FunctionComponent } from 'react';
19 | import { SegmentInput } from '@grafana/ui';
20 |
21 | export interface Props {
22 | condition: string;
23 | onChange: (conditionStr: string) => void;
24 | }
25 |
26 | export const WhereValue: FunctionComponent = ({ condition, onChange }) => (
27 | <>
28 | {
29 | <>
30 | onChange(string.toString())}
35 | />
36 | >
37 | }
38 | >
39 | );
40 |
--------------------------------------------------------------------------------
/connectors/grafana-plugin/src/functions.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | import { MetricFindValue, SelectableValue } from '@grafana/data';
18 |
19 | export const toOption = (value: string) => ({ label: value, value } as SelectableValue);
20 | export const toMetricFindValue = (data: any) => ({ text: data } as MetricFindValue);
21 |
--------------------------------------------------------------------------------
/connectors/grafana-plugin/src/img/addIoTDBDataSource.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/iotdb-extras/b056464a6bff21fb097d93ef21b05c7789108855/connectors/grafana-plugin/src/img/addIoTDBDataSource.png
--------------------------------------------------------------------------------
/connectors/grafana-plugin/src/img/showData.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/iotdb-extras/b056464a6bff21fb097d93ef21b05c7789108855/connectors/grafana-plugin/src/img/showData.png
--------------------------------------------------------------------------------
/connectors/grafana-plugin/src/module.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | import { DataSourcePlugin } from '@grafana/data';
18 | import { DataSource } from './datasource';
19 | import { ConfigEditor } from './ConfigEditor';
20 | import { QueryEditor } from './QueryEditor';
21 | import { IoTDBQuery, IoTDBOptions } from './types';
22 |
23 | export const plugin = new DataSourcePlugin(DataSource)
24 | .setConfigEditor(ConfigEditor)
25 | .setQueryEditor(QueryEditor);
26 |
--------------------------------------------------------------------------------
/connectors/grafana-plugin/src/plugin.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://raw.githubusercontent.com/grafana/grafana/master/docs/sources/developers/plugins/plugin.schema.json",
3 | "type": "datasource",
4 | "name": "Apache IoTDB",
5 | "id": "apache-iotdb-datasource",
6 | "metrics": true,
7 | "backend": true,
8 | "alerting": true,
9 | "executable": "gpx_apache_iotdb_datasource",
10 | "info": {
11 | "description": "Apache IoTDB",
12 | "author": {
13 | "name": "the Apache Software Foundation (ASF)",
14 | "url": "https://iotdb.apache.org/"
15 | },
16 | "keywords": [
17 | "apache",
18 | "iotdb",
19 | "tsdb",
20 | "timeseries",
21 | "grafana",
22 | "plugin"
23 | ],
24 | "logos": {
25 | "small": "img/logo.svg",
26 | "large": "img/logo.svg"
27 | },
28 | "links": [
29 | {
30 | "name": "Website",
31 | "url": "https://iotdb.apache.org/"
32 | },
33 | {
34 | "name": "Github",
35 | "url": "https://github.com/apache/iotdb"
36 | },
37 | {
38 | "name": "License",
39 | "url": "https://github.com/apache/iotdb/blob/master/LICENSE"
40 | }
41 | ],
42 | "screenshots": [{ "name": "addDataSource", "path": "img/addIoTDBDataSource.png" },{ "name": "showData", "path": "img/showData.png" }],
43 | "version": "%VERSION%",
44 | "updated": "%TODAY%"
45 | },
46 | "dependencies": {
47 | "grafanaDependency": ">=9.3.0",
48 | "plugins": []
49 | }
50 | }
--------------------------------------------------------------------------------
/connectors/grafana-plugin/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./node_modules/@grafana/toolkit/src/config/tsconfig.plugin.json",
3 | "include": ["src", "types"],
4 | "compilerOptions": {
5 | "rootDir": "./src",
6 | "baseUrl": "./src",
7 | "typeRoots": ["./node_modules/@types"]
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/connectors/hadoop/src/main/java/org/apache/iotdb/hadoop/tsfile/IReaderSet.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.iotdb.hadoop.tsfile;
20 |
21 | import org.apache.tsfile.read.TsFileSequenceReader;
22 |
23 | import java.util.List;
24 |
25 | /**
26 | * Unified the interface in TSRecordReader and TSHiveRecordReader used for set some reference
27 | * attribute in the class
28 | */
29 | public interface IReaderSet {
30 |
31 | void setReader(TsFileSequenceReader reader);
32 |
33 | void setMeasurementIds(List measurementIds);
34 |
35 | void setReadDeviceId(boolean isReadDeviceId);
36 |
37 | void setReadTime(boolean isReadTime);
38 | }
39 |
--------------------------------------------------------------------------------
/connectors/hadoop/src/main/java/org/apache/iotdb/hadoop/tsfile/TSFInputSplit.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.iotdb.hadoop.tsfile;
20 |
21 | import org.apache.hadoop.fs.Path;
22 | import org.apache.hadoop.io.Writable;
23 | import org.apache.hadoop.mapred.FileSplit;
24 |
25 | /**
26 | * This is tsfile InputSplit
.
27 | * Each InputSplit
will be processed by individual Mapper
task.
28 | */
29 | public class TSFInputSplit extends FileSplit
30 | implements Writable, org.apache.hadoop.mapred.InputSplit {
31 |
32 | public TSFInputSplit() {
33 | super();
34 | }
35 |
36 | public TSFInputSplit(Path path, String[] hosts, long start, long length) {
37 | super(path, start, length, hosts);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/connectors/hadoop/src/test/java/org/apache/iotdb/hadoop/tsfile/constant/TestConstant.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.hadoop.tsfile.constant;
21 |
22 | import java.io.File;
23 |
24 | public class TestConstant {
25 | public static final String BASE_OUTPUT_PATH = "target".concat(File.separator);
26 | public static final String OUTPUT_DATA_DIR =
27 | BASE_OUTPUT_PATH.concat("data").concat(File.separator);
28 | }
29 |
--------------------------------------------------------------------------------
/connectors/hive-connector/src/main/java/org/apache/iotdb/hive/TsFileSerDeException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.iotdb.hive;
20 |
21 | import org.apache.hadoop.hive.serde2.SerDeException;
22 |
23 | public class TsFileSerDeException extends SerDeException {
24 |
25 | public TsFileSerDeException() {
26 | super();
27 | }
28 |
29 | public TsFileSerDeException(String message) {
30 | super(message);
31 | }
32 |
33 | public TsFileSerDeException(Throwable cause) {
34 | super(cause);
35 | }
36 |
37 | public TsFileSerDeException(String message, Throwable cause) {
38 | super(message, cause);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/connectors/hive-connector/src/test/java/org/apache/iotdb/hive/constant/TestConstant.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.hive.constant;
21 |
22 | import java.io.File;
23 |
24 | public class TestConstant {
25 | public static final String BASE_OUTPUT_PATH = "target".concat(File.separator);
26 | public static final String OUTPUT_DATA_DIR =
27 | BASE_OUTPUT_PATH.concat("data").concat(File.separator);
28 | }
29 |
--------------------------------------------------------------------------------
/connectors/spark-iotdb-connector/src/main/scala/org/apache/iotdb/spark/db/IoTDBOptions.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.spark.db
21 |
22 | class IoTDBOptions(
23 | @transient private val parameters: Map[String, String])
24 | extends Serializable {
25 |
26 | val url = parameters.getOrElse("url", sys.error("Option 'url' not specified"))
27 |
28 | val user = parameters.getOrElse("user", "root")
29 |
30 | val password = parameters.getOrElse("password", "root")
31 |
32 | val sql = parameters.getOrElse("sql", "")
33 |
34 | val numPartition = parameters.getOrElse("numPartition", "1")
35 |
36 | val lowerBound = parameters.getOrElse("lowerBound", "0")
37 |
38 | val upperBound = parameters.getOrElse("upperBound", "0")
39 |
40 | def get(name: String): Unit = {
41 |
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/connectors/spark-iotdb-connector/src/main/scala/org/apache/iotdb/spark/db/SQLConstant.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.spark.db
21 |
22 | object SQLConstant {
23 | val RESERVED_TIME = "time"
24 | val TIMESTAMP_STR = "Time"
25 | val NULL_STR = "null"
26 | val WHERE = "where"
27 | }
28 |
--------------------------------------------------------------------------------
/connectors/spark-iotdb-connector/src/main/scala/org/apache/iotdb/spark/db/package.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.spark
21 |
22 | import org.apache.spark.sql.{DataFrame, DataFrameReader}
23 |
24 | package object db {
25 |
26 | val myPackage = "org.apache.iotdb.spark.db"
27 |
28 | /**
29 | * Adds a method, `iotdb`, to DataFrameReader that allows you to read data from IoTDB using
30 | * the DataFileReade
31 | */
32 | implicit class IoTDBDataFrameReader(reader: DataFrameReader) {
33 | def iotdb: (Map[String, String]) => DataFrame = reader.format(myPackage).options(_).load()
34 | }
35 |
36 | }
--------------------------------------------------------------------------------
/connectors/spark-iotdb-table-connector/iotdb-table-connector-3.3/src/main/resources/META-INF/services/org.apache.spark.sql.sources.DataSourceRegister:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | org.apache.iotdb.spark.table.db.IoTDBTableProvider
19 |
--------------------------------------------------------------------------------
/connectors/spark-iotdb-table-connector/iotdb-table-connector-3.3/src/main/scala/org/apache/iotdb/spark/table/db/IoTDBTableProvider.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.spark.table.db
21 |
22 | import org.apache.spark.sql.sources.DataSourceRegister
23 |
24 |
25 | class IoTDBTableProvider extends AbstractIoTDBTableProvider with DataSourceRegister {
26 |
27 | override def shortName(): String = "iotdb"
28 | }
29 |
--------------------------------------------------------------------------------
/connectors/spark-iotdb-table-connector/iotdb-table-connector-3.4/src/main/resources/META-INF/services/org.apache.spark.sql.sources.DataSourceRegister:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | org.apache.iotdb.spark.table.db.IoTDBTableProvider
19 |
--------------------------------------------------------------------------------
/connectors/spark-iotdb-table-connector/iotdb-table-connector-3.4/src/main/scala/org/apache/iotdb/spark/table/db/IoTDBTableProvider.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.spark.table.db
21 |
22 | import org.apache.spark.sql.sources.DataSourceRegister
23 |
24 |
25 | class IoTDBTableProvider extends AbstractIoTDBTableProvider with DataSourceRegister {
26 |
27 | override def shortName(): String = "iotdb"
28 | }
29 |
--------------------------------------------------------------------------------
/connectors/spark-iotdb-table-connector/iotdb-table-connector-3.5/src/main/resources/META-INF/services/org.apache.spark.sql.sources.DataSourceRegister:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | org.apache.iotdb.spark.table.db.IoTDBTableProvider
19 |
--------------------------------------------------------------------------------
/connectors/spark-iotdb-table-connector/iotdb-table-connector-3.5/src/main/scala/org/apache/iotdb/spark/table/db/IoTDBTableProvider.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.spark.table.db
21 |
22 | import org.apache.spark.sql.sources.DataSourceRegister
23 |
24 |
25 | class IoTDBTableProvider extends AbstractIoTDBTableProvider with DataSourceRegister {
26 |
27 | override def shortName(): String = "iotdb"
28 | }
29 |
--------------------------------------------------------------------------------
/connectors/spark-iotdb-table-connector/spark-iotdb-table-common/src/main/scala/org/apache/iotdb/spark/table/db/read/IoTDBInputPartition.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.spark.table.db.read
21 |
22 | import org.apache.spark.sql.connector.read.InputPartition
23 |
24 | class IoTDBInputPartition(sql: String) extends InputPartition {
25 |
26 | def getSQL: String = sql
27 | }
28 |
--------------------------------------------------------------------------------
/connectors/spark-iotdb-table-connector/spark-iotdb-table-common/src/main/scala/org/apache/iotdb/spark/table/db/read/IoTDBPartitionReaderFactory.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.spark.table.db.read
21 |
22 | import org.apache.iotdb.spark.table.db.IoTDBOptions
23 | import org.apache.spark.sql.catalyst.InternalRow
24 | import org.apache.spark.sql.connector.read.{InputPartition, PartitionReader, PartitionReaderFactory}
25 | import org.apache.spark.sql.types.StructType
26 |
27 | class IoTDBPartitionReaderFactory(schema: StructType, options: IoTDBOptions) extends PartitionReaderFactory{
28 |
29 | override def createReader(partition: InputPartition): PartitionReader[InternalRow] = {
30 | new IoTDBPartitionReader(partition, schema, options)
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/connectors/spark-iotdb-table-connector/spark-iotdb-table-common/src/main/scala/org/apache/iotdb/spark/table/db/write/IoTDBWrite.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.spark.table.db.write
21 |
22 | import org.apache.iotdb.spark.table.db.IoTDBOptions
23 | import org.apache.spark.sql.connector.write._
24 | import org.apache.spark.sql.types.StructType
25 |
26 | class IoTDBWrite(options: IoTDBOptions, writeSchema: StructType, tableSchema: StructType) extends Write with BatchWrite {
27 |
28 | override def toBatch: BatchWrite = this
29 |
30 | override def createBatchWriterFactory(info: PhysicalWriteInfo): DataWriterFactory = new IoTDBWriteFactory(options, writeSchema, tableSchema)
31 |
32 | override def commit(messages: Array[WriterCommitMessage]): Unit = {}
33 |
34 | override def abort(messages: Array[WriterCommitMessage]): Unit = {}
35 | }
36 |
--------------------------------------------------------------------------------
/connectors/spark-iotdb-table-connector/spark-iotdb-table-common/src/main/scala/org/apache/iotdb/spark/table/db/write/IoTDBWriteBuilder.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.spark.table.db.write
21 |
22 | import org.apache.iotdb.spark.table.db.IoTDBOptions
23 | import org.apache.spark.sql.connector.write.{Write, WriteBuilder}
24 | import org.apache.spark.sql.types.StructType
25 |
26 | class IoTDBWriteBuilder(options: IoTDBOptions, writeSchema: StructType, tableSchema: StructType) extends WriteBuilder {
27 | override def build(): Write = new IoTDBWrite(options, writeSchema, tableSchema)
28 | }
29 |
--------------------------------------------------------------------------------
/connectors/spark-iotdb-table-connector/spark-iotdb-table-common/src/main/scala/org/apache/iotdb/spark/table/db/write/IoTDBWriteFactory.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.spark.table.db.write
21 |
22 | import org.apache.iotdb.spark.table.db.IoTDBOptions
23 | import org.apache.spark.sql.catalyst.InternalRow
24 | import org.apache.spark.sql.connector.write.{DataWriter, DataWriterFactory}
25 | import org.apache.spark.sql.types.StructType
26 |
27 | class IoTDBWriteFactory(options: IoTDBOptions, writeSchema: StructType, tableSchema: StructType) extends DataWriterFactory {
28 |
29 | override def createWriter(partitionId: Int, taskId: Long): DataWriter[InternalRow] = {
30 | new IoTDBDataWriter(options, writeSchema, tableSchema)
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/connectors/spark-iotdb-table-connector/spark-iotdb-table-common/src/test/scala/org/apache/iotdb/spark/table/db/UtilsTest.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.spark.table.db
21 |
22 | import org.junit.Assert
23 | import org.scalatest.FunSuite
24 |
25 |
26 | class UtilsTest extends FunSuite {
27 | test("testConvertIdentifier") {
28 | var str = IoTDBUtils.getIoTDBColumnIdentifierInSQL("tag1", false)
29 | Assert.assertEquals("\"tag1\"", str)
30 | str = IoTDBUtils.getIoTDBColumnIdentifierInSQL("`ta``g1`", true)
31 | Assert.assertEquals("\"ta`g1\"", str)
32 | str = IoTDBUtils.getIoTDBColumnIdentifierInSQL("`ta\"g1`", true)
33 | Assert.assertEquals("\"ta\"\"g1\"", str)
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/connectors/spark-tsfile/src/main/java/org/apache/iotdb/spark/tsfile/qp/common/Operator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.iotdb.spark.tsfile.qp.common;
20 |
21 | /** This class is a superclass of all operator. */
22 | public abstract class Operator {
23 |
24 | int tokenIntType;
25 | String tokenSymbol;
26 |
27 | Operator(int tokenIntType) {
28 | this.tokenIntType = tokenIntType;
29 | this.tokenSymbol = SQLConstant.tokenSymbol.get(tokenIntType);
30 | }
31 |
32 | public int getTokenIntType() {
33 | return tokenIntType;
34 | }
35 |
36 | public String getTokenSymbol() {
37 | return tokenSymbol;
38 | }
39 |
40 | @Override
41 | public String toString() {
42 | return tokenSymbol;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/connectors/spark-tsfile/src/main/java/org/apache/iotdb/spark/tsfile/qp/exception/BasicOperatorException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.iotdb.spark.tsfile.qp.exception;
20 |
21 | /** This exception is threw whiling meeting error in BasicOperator */
22 | public class BasicOperatorException extends QueryProcessorException {
23 |
24 | private static final long serialVersionUID = -2163809754074237707L;
25 |
26 | public BasicOperatorException(String msg) {
27 | super(msg);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/connectors/spark-tsfile/src/main/java/org/apache/iotdb/spark/tsfile/qp/exception/DNFOptimizeException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.iotdb.spark.tsfile.qp.exception;
20 |
21 | /** This exception is threw whiling meeting error in */
22 | public class DNFOptimizeException extends LogicalOptimizeException {
23 |
24 | private static final long serialVersionUID = 807384397361662482L;
25 |
26 | public DNFOptimizeException(String msg) {
27 | super(msg);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/connectors/spark-tsfile/src/main/java/org/apache/iotdb/spark/tsfile/qp/exception/LogicalOptimizeException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.iotdb.spark.tsfile.qp.exception;
20 |
21 | /** This exception is threw whiling meeting error in logical optimizer process */
22 | public class LogicalOptimizeException extends QueryProcessorException {
23 |
24 | private static final long serialVersionUID = -7098092782689670064L;
25 |
26 | public LogicalOptimizeException(String msg) {
27 | super(msg);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/connectors/spark-tsfile/src/main/java/org/apache/iotdb/spark/tsfile/qp/exception/MergeFilterException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.iotdb.spark.tsfile.qp.exception;
20 |
21 | public class MergeFilterException extends LogicalOptimizeException {
22 |
23 | private static final long serialVersionUID = 8581594261924961899L;
24 |
25 | public MergeFilterException(String msg) {
26 | super(msg);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/connectors/spark-tsfile/src/main/java/org/apache/iotdb/spark/tsfile/qp/exception/QueryOperatorException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.iotdb.spark.tsfile.qp.exception;
20 |
21 | public class QueryOperatorException extends LogicalOptimizeException {
22 |
23 | private static final long serialVersionUID = 8581594261924961899L;
24 |
25 | public QueryOperatorException(String msg) {
26 | super(msg);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/connectors/spark-tsfile/src/main/java/org/apache/iotdb/spark/tsfile/qp/exception/QueryProcessorException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.iotdb.spark.tsfile.qp.exception;
20 |
21 | /** This exception is threw whiling meeting error in query processor */
22 | public class QueryProcessorException extends Exception {
23 |
24 | private static final long serialVersionUID = -8987915921329335088L;
25 |
26 | private final String errMsg;
27 |
28 | QueryProcessorException(String msg) {
29 | super(msg);
30 | this.errMsg = msg;
31 | }
32 |
33 | @Override
34 | public String getMessage() {
35 | return errMsg;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/connectors/spark-tsfile/src/main/java/org/apache/iotdb/spark/tsfile/qp/exception/RemoveNotException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.iotdb.spark.tsfile.qp.exception;
20 |
21 | /** This exception is threw whiling meeting error in */
22 | public class RemoveNotException extends LogicalOptimizeException {
23 |
24 | private static final long serialVersionUID = -772591029262375715L;
25 |
26 | public RemoveNotException(String msg) {
27 | super(msg);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/connectors/spark-tsfile/src/main/java/org/apache/iotdb/spark/tsfile/qp/optimizer/IFilterOptimizer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.iotdb.spark.tsfile.qp.optimizer;
20 |
21 | import org.apache.iotdb.spark.tsfile.qp.common.FilterOperator;
22 | import org.apache.iotdb.spark.tsfile.qp.exception.DNFOptimizeException;
23 | import org.apache.iotdb.spark.tsfile.qp.exception.MergeFilterException;
24 | import org.apache.iotdb.spark.tsfile.qp.exception.RemoveNotException;
25 |
26 | /** provide a filter operator, optimize it. */
27 | public interface IFilterOptimizer {
28 |
29 | FilterOperator optimize(FilterOperator filter)
30 | throws RemoveNotException, DNFOptimizeException, MergeFilterException;
31 | }
32 |
--------------------------------------------------------------------------------
/connectors/spark-tsfile/src/test/scala/org/apache/iotdb/spark/constant/TestConstant.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.spark.constant;
21 |
22 | import java.io.File;
23 | import java.util.Random;
24 |
25 | public class TestConstant {
26 | public static final String BASE_OUTPUT_PATH = "target".concat(File.separator);
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/distributions/src/assembly/grafana-plugin.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 | grafana-plugin-bin
24 |
25 | dir
26 | zip
27 |
28 | apache-iotdb-${project.version}-grafana-plugin-bin
29 |
30 |
31 | ${maven.multiModuleProjectDirectory}/connectors/grafana-plugin/dist
32 | iotdb-grafana-plugin/${file.separator}
33 |
34 |
35 |
36 | common-files.xml
37 |
38 |
39 |
--------------------------------------------------------------------------------
/examples/hadoop/src/main/java/org/apache/iotdb/hadoop/tsfile/Constant.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.hadoop.tsfile;
21 |
22 | public class Constant {
23 |
24 | private Constant() {}
25 |
26 | static final String DEVICE_1 = "device_1";
27 |
28 | static final String SENSOR_PREFIX = "sensor_";
29 | static final String SENSOR_1 = "sensor_1";
30 | static final String SENSOR_2 = "sensor_2";
31 | static final String SENSOR_3 = "sensor_3";
32 | }
33 |
--------------------------------------------------------------------------------
/examples/iotdb-spring-boot-start/src/main/java/org/apache/iotdb/iotdbspringbootstartexample/IoTDBSpringBootStartApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.iotdb.iotdbspringbootstartexample;
19 |
20 | import org.springframework.boot.SpringApplication;
21 | import org.springframework.boot.autoconfigure.SpringBootApplication;
22 |
23 | @SpringBootApplication
24 | public class IoTDBSpringBootStartApplication {
25 |
26 | public static void main(String[] args) {
27 | SpringApplication.run(IoTDBSpringBootStartApplication.class, args);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/examples/iotdb-spring-boot-start/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 | #
18 |
19 | spring.application.name=iotdb-spring-boot-start
20 |
21 | iotdb.session.node_urls=127.0.0.1:6667
22 | iotdb.session.password=root
23 | iotdb.session.username=root
24 | iotdb.session.database=wind
25 | iotdb.session.sql_dialect=table
26 | iotdb.session.max_size=10
--------------------------------------------------------------------------------
/examples/mybatis-generator/src/main/java/org/apache/iotdb/mybatis/plugin/mapper/MixMapper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.mybatis.plugin.mapper;
21 |
22 | import org.apache.iotdb.mybatis.plugin.model.Mix;
23 |
24 | import org.apache.ibatis.annotations.Param;
25 |
26 | import java.util.Date;
27 | import java.util.List;
28 |
29 | public interface MixMapper {
30 | int deleteByPrimaryKey(@Param("time") Date time, @Param("deviceId") String deviceId);
31 |
32 | int insert(Mix row);
33 |
34 | Mix selectByPrimaryKey(@Param("time") Date time, @Param("deviceId") String deviceId);
35 |
36 | List selectAll();
37 |
38 | int batchInsert(@Param("records") List records);
39 | }
40 |
--------------------------------------------------------------------------------
/examples/mybatisplus-generator/src/main/java/org/apache/iotdb/controller/Table1Controller.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.controller;
21 |
22 | import org.springframework.web.bind.annotation.RequestMapping;
23 | import org.springframework.web.bind.annotation.RestController;
24 |
25 | /**
26 | * 前端控制器
27 | *
28 | * @author IoTDB
29 | * @since 2025-06-24
30 | */
31 | @RestController
32 | @RequestMapping("/table1")
33 | public class Table1Controller {}
34 |
--------------------------------------------------------------------------------
/examples/mybatisplus-generator/src/main/java/org/apache/iotdb/controller/Table2Controller.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.controller;
21 |
22 | import org.springframework.web.bind.annotation.RequestMapping;
23 | import org.springframework.web.bind.annotation.RestController;
24 |
25 | /**
26 | * 前端控制器
27 | *
28 | * @author IoTDB
29 | * @since 2025-06-24
30 | */
31 | @RestController
32 | @RequestMapping("/table2")
33 | public class Table2Controller {}
34 |
--------------------------------------------------------------------------------
/examples/mybatisplus-generator/src/main/java/org/apache/iotdb/mapper/Table1Mapper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.mapper;
21 |
22 | import org.apache.iotdb.entity.Table1;
23 |
24 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
25 |
26 | /**
27 | * Mapper 接口
28 | *
29 | * @author IoTDB
30 | * @since 2025-06-24
31 | */
32 | public interface Table1Mapper extends BaseMapper {}
33 |
--------------------------------------------------------------------------------
/examples/mybatisplus-generator/src/main/java/org/apache/iotdb/mapper/Table2Mapper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.mapper;
21 |
22 | import org.apache.iotdb.entity.Table2;
23 |
24 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
25 |
26 | /**
27 | * Mapper 接口
28 | *
29 | * @author IoTDB
30 | * @since 2025-06-24
31 | */
32 | public interface Table2Mapper extends BaseMapper {}
33 |
--------------------------------------------------------------------------------
/examples/mybatisplus-generator/src/main/java/org/apache/iotdb/service/Table1Service.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.service;
21 |
22 | import org.apache.iotdb.entity.Table1;
23 |
24 | import com.baomidou.mybatisplus.extension.service.IService;
25 |
26 | /**
27 | * 服务类
28 | *
29 | * @author IoTDB
30 | * @since 2025-06-24
31 | */
32 | public interface Table1Service extends IService {}
33 |
--------------------------------------------------------------------------------
/examples/mybatisplus-generator/src/main/java/org/apache/iotdb/service/Table2Service.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.service;
21 |
22 | import org.apache.iotdb.entity.Table2;
23 |
24 | import com.baomidou.mybatisplus.extension.service.IService;
25 |
26 | /**
27 | * 服务类
28 | *
29 | * @author IoTDB
30 | * @since 2025-06-24
31 | */
32 | public interface Table2Service extends IService {}
33 |
--------------------------------------------------------------------------------
/examples/mybatisplus-generator/src/main/java/org/apache/iotdb/service/impl/Table1ServiceImpl.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.service.impl;
21 |
22 | import org.apache.iotdb.entity.Table1;
23 | import org.apache.iotdb.mapper.Table1Mapper;
24 | import org.apache.iotdb.service.Table1Service;
25 |
26 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
27 | import org.springframework.stereotype.Service;
28 |
29 | /**
30 | * 服务实现类
31 | *
32 | * @author IoTDB
33 | * @since 2025-06-24
34 | */
35 | @Service
36 | public class Table1ServiceImpl extends ServiceImpl implements Table1Service {}
37 |
--------------------------------------------------------------------------------
/examples/mybatisplus-generator/src/main/java/org/apache/iotdb/service/impl/Table2ServiceImpl.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.service.impl;
21 |
22 | import org.apache.iotdb.entity.Table2;
23 | import org.apache.iotdb.mapper.Table2Mapper;
24 | import org.apache.iotdb.service.Table2Service;
25 |
26 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
27 | import org.springframework.stereotype.Service;
28 |
29 | /**
30 | * 服务实现类
31 | *
32 | * @author IoTDB
33 | * @since 2025-06-24
34 | */
35 | @Service
36 | public class Table2ServiceImpl extends ServiceImpl implements Table2Service {}
37 |
--------------------------------------------------------------------------------
/examples/mybatisplus-generator/src/main/java/org/apache/iotdb/xml/Table1Mapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
23 |
24 |
--------------------------------------------------------------------------------
/examples/mybatisplus-generator/src/main/java/org/apache/iotdb/xml/Table2Mapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
23 |
24 |
--------------------------------------------------------------------------------
/examples/mybatisplus-generator/src/main/resources/application.yml:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | spring:
19 | datasource:
20 | url: jdbc:iotdb://127.0.0.1:6667/database1?sql_dialect=table
21 | username: root
22 | password: root
23 | driver-class-name: org.apache.iotdb.jdbc.IoTDBDriver
24 |
--------------------------------------------------------------------------------
/examples/mybatisplus-generator/src/test/java/org/apache/iotdb/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb;
21 |
22 | import org.apache.iotdb.service.Table1Service;
23 | import org.apache.iotdb.service.Table2Service;
24 |
25 | import org.junit.jupiter.api.Test;
26 | import org.springframework.beans.factory.annotation.Autowired;
27 | import org.springframework.boot.test.context.SpringBootTest;
28 |
29 | @SpringBootTest
30 | public class ApplicationTest {
31 | @Autowired private Table1Service table1Service;
32 | @Autowired private Table2Service table2Service;
33 |
34 | // @Test
35 | void contextLoads() {
36 | // 启动Spring容器,验证主流程无异常
37 | System.out.println("Table1 查询结果:" + table1Service.list());
38 | System.out.println("Table2 查询结果:" + table2Service.list());
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/examples/rocketmq/src/main/java/org/apache/iotdb/rocketmq/Utils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.rocketmq;
21 |
22 | public class Utils {
23 |
24 | private Utils() {
25 | throw new IllegalStateException("Utility class");
26 | }
27 |
28 | public static int convertStringToInteger(String device) {
29 | int sum = 0;
30 | for (char c : device.toCharArray()) {
31 | sum += c;
32 | }
33 | return sum;
34 | }
35 |
36 | public static String getTimeSeries(String sql) {
37 | return sql.substring(0, sql.indexOf(',')).trim();
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/helm/templates/NOTES.txt:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | This is Apache IoTDB Distribution
21 |
--------------------------------------------------------------------------------
/helm/templates/datanode-cm.yaml:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 | #
18 |
19 | apiVersion: v1
20 | kind: ConfigMap
21 | metadata:
22 | name: {{ .Values.datanode.name }}-cm
23 | namespace: {{ .Release.Namespace }}
24 | data:
25 | iotdb-system.properties: |
26 | dn_rpc_address=.{{ .Values.datanode.name }}-svc.{{ .Release.Namespace }}
27 | dn_internal_address=.{{ .Values.datanode.name }}-svc.{{ .Release.Namespace }}
28 | dn_seed_config_node={{ .Values.confignode.name }}-0.{{ .Values.confignode.name }}-svc.{{ .Release.Namespace }}:10710
29 | enable_rest_service={{ .Values.datanode.enableRestService }}
--------------------------------------------------------------------------------
/helm/templates/load-balancer.yaml:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 | #
18 |
19 | apiVersion: v1
20 | kind: Service
21 | metadata:
22 | namespace: {{ .Values.namespace }}
23 | name: jdbc-balancer
24 | spec:
25 | type: LoadBalancer
26 | ports:
27 | - port: 6667
28 | selector:
29 | app: {{ .Values.datanode.name }}
--------------------------------------------------------------------------------
/images/getpods.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/iotdb-extras/b056464a6bff21fb097d93ef21b05c7789108855/images/getpods.png
--------------------------------------------------------------------------------
/images/getpvc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/iotdb-extras/b056464a6bff21fb097d93ef21b05c7789108855/images/getpvc.png
--------------------------------------------------------------------------------
/images/logininner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/iotdb-extras/b056464a6bff21fb097d93ef21b05c7789108855/images/logininner.png
--------------------------------------------------------------------------------
/images/select10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/iotdb-extras/b056464a6bff21fb097d93ef21b05c7789108855/images/select10.png
--------------------------------------------------------------------------------
/images/showcluster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/iotdb-extras/b056464a6bff21fb097d93ef21b05c7789108855/images/showcluster.png
--------------------------------------------------------------------------------
/images/showtimeseries.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/iotdb-extras/b056464a6bff21fb097d93ef21b05c7789108855/images/showtimeseries.png
--------------------------------------------------------------------------------
/iotdb-collector/collector-core/src/assembly/core.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 | server
24 |
25 | dir
26 | zip
27 |
28 | false
29 |
30 |
31 | lib
32 |
33 |
34 |
35 |
36 | src/assembly/resources
37 | ${file.separator}
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/iotdb-collector/collector-core/src/main/java/org/apache/iotdb/collector/config/ApiServiceOptions.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.collector.config;
21 |
22 | public class ApiServiceOptions extends Options {
23 |
24 | public static final Option PORT =
25 | new Option("api_service_port", 17070) {
26 | @Override
27 | public void setValue(final String valueString) {
28 | value = Integer.parseInt(valueString);
29 | }
30 | };
31 | }
32 |
--------------------------------------------------------------------------------
/iotdb-collector/collector-core/src/main/java/org/apache/iotdb/collector/plugin/api/customizer/CollectorParameters.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.collector.plugin.api.customizer;
21 |
22 | import java.util.Arrays;
23 | import java.util.Collections;
24 | import java.util.HashSet;
25 | import java.util.Set;
26 |
27 | public class CollectorParameters {
28 | private static final Set PARAM_SET =
29 | Collections.unmodifiableSet(new HashSet<>(Arrays.asList("source", "processor", "sink")));
30 |
31 | public static boolean matchAnyParam(final String param) {
32 | return PARAM_SET.contains(param);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/iotdb-collector/collector-core/src/main/java/org/apache/iotdb/collector/plugin/api/event/CollectorEvent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.collector.plugin.api.event;
21 |
22 | import org.apache.iotdb.pipe.api.event.Event;
23 | import org.apache.iotdb.pipe.api.event.dml.insertion.TabletInsertionEvent;
24 |
25 | public abstract class CollectorEvent implements Event {
26 |
27 | public abstract TabletInsertionEvent toTabletInsertionEvent();
28 | }
29 |
--------------------------------------------------------------------------------
/iotdb-collector/collector-core/src/main/java/org/apache/iotdb/collector/plugin/api/event/DemoEvent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.collector.plugin.api.event;
21 |
22 | import org.apache.iotdb.pipe.api.event.Event;
23 |
24 | public class DemoEvent implements Event {
25 |
26 | private final String value;
27 |
28 | public DemoEvent(final String value) {
29 | this.value = value;
30 | }
31 |
32 | public String getValue() {
33 | return value;
34 | }
35 |
36 | @Override
37 | public String toString() {
38 | return "DemoEvent [value = " + value + "]";
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/iotdb-collector/collector-core/src/main/java/org/apache/iotdb/collector/plugin/api/event/PeriodicalEvent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.collector.plugin.api.event;
21 |
22 | import org.apache.iotdb.pipe.api.event.Event;
23 |
24 | public class PeriodicalEvent implements Event {}
25 |
--------------------------------------------------------------------------------
/iotdb-collector/collector-core/src/main/java/org/apache/iotdb/collector/plugin/builtin/sink/compressor/PipeCompressorConfig.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.collector.plugin.builtin.sink.compressor;
21 |
22 | public class PipeCompressorConfig {
23 |
24 | private final String name;
25 | private final int zstdCompressionLevel;
26 |
27 | public PipeCompressorConfig(String name, int zstdCompressionLevel) {
28 | this.name = name;
29 | this.zstdCompressionLevel = zstdCompressionLevel;
30 | }
31 |
32 | public String getName() {
33 | return name;
34 | }
35 |
36 | public int getZstdCompressionLevel() {
37 | return zstdCompressionLevel;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/iotdb-collector/collector-core/src/main/java/org/apache/iotdb/collector/plugin/builtin/sink/constant/ColumnHeaderConstant.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.collector.plugin.builtin.sink.constant;
21 |
22 | public class ColumnHeaderConstant {
23 |
24 | private ColumnHeaderConstant() {
25 | // forbidding instantiation
26 | }
27 |
28 | public static final String DATABASE = "Database";
29 |
30 | public static final String PATH_PATTERN = "PathPattern";
31 |
32 | public static final String TYPE = "Type";
33 |
34 | public static final String TABLE_NAME = "TableName";
35 | }
36 |
--------------------------------------------------------------------------------
/iotdb-collector/collector-core/src/main/java/org/apache/iotdb/collector/plugin/builtin/sink/event/PipeInsertionEvent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.collector.plugin.builtin.sink.event;
21 |
22 | public abstract class PipeInsertionEvent {
23 |
24 | protected Boolean isTableModelEvent;
25 |
26 | protected String treeModelDatabaseName;
27 | protected String tableModelDatabaseName;
28 |
29 | public boolean isTableModelEvent() {
30 | return isTableModelEvent;
31 | }
32 |
33 | public String getTreeModelDatabaseName() {
34 | return treeModelDatabaseName;
35 | }
36 |
37 | public String getTableModelDatabaseName() {
38 | return tableModelDatabaseName;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/iotdb-collector/collector-core/src/main/java/org/apache/iotdb/collector/plugin/builtin/sink/payload/thrift/request/IoTDBConnectorRequestVersion.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.collector.plugin.builtin.sink.payload.thrift.request;
21 |
22 | public enum IoTDBConnectorRequestVersion {
23 | VERSION_1((byte) 1),
24 | VERSION_2((byte) 2),
25 | ;
26 |
27 | private final byte version;
28 |
29 | IoTDBConnectorRequestVersion(byte type) {
30 | this.version = type;
31 | }
32 |
33 | public byte getVersion() {
34 | return version;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/iotdb-collector/collector-core/src/main/java/org/apache/iotdb/collector/plugin/builtin/source/constant/SourceConstant.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.collector.plugin.builtin.source.constant;
21 |
22 | public class SourceConstant {
23 |
24 | public static final String REPORT_TIME_INTERVAL_KEY = "report-time-interval";
25 |
26 | public static final String REPORT_TIME_INTERVAL_DEFAULT_VALUE = "60";
27 | }
28 |
--------------------------------------------------------------------------------
/iotdb-collector/collector-core/src/main/java/org/apache/iotdb/collector/plugin/builtin/source/event/common/PipeBinaryTransformer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.collector.plugin.builtin.source.event.common;
21 |
22 | public class PipeBinaryTransformer {
23 |
24 | public static org.apache.tsfile.utils.Binary transformToBinary(
25 | org.apache.iotdb.pipe.api.type.Binary binary) {
26 | return binary == null ? null : new org.apache.tsfile.utils.Binary(binary.getValues());
27 | }
28 |
29 | public static org.apache.iotdb.pipe.api.type.Binary transformToPipeBinary(
30 | org.apache.tsfile.utils.Binary binary) {
31 | return binary == null ? null : new org.apache.iotdb.pipe.api.type.Binary(binary.getValues());
32 | }
33 |
34 | private PipeBinaryTransformer() {
35 | // util class
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/iotdb-collector/collector-core/src/main/java/org/apache/iotdb/collector/plugin/builtin/source/iotdb/IoTDBPushSourceConstant.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.collector.plugin.builtin.source.iotdb;
21 |
22 | public class IoTDBPushSourceConstant {
23 | public static final String HOST_KEY = "host";
24 | public static final String PORT_KEY = "port";
25 | public static final String TOPIC_KEY = "topic";
26 | public static final String TIMEOUT_KEY = "timeout";
27 | public static final String DEVICE_ID_KEY = "deviceId";
28 |
29 | public static final String HOST_VALUE = "127.0.0.1";
30 | public static final Integer PORT_VALUE = 6668;
31 | public static final String TOPIC_VALUE = "root_all";
32 | public static final Long TIMEOUT_VALUE = 10000L;
33 | public static final String DEVICE_ID_VALUE = "root.test.demo";
34 | }
35 |
--------------------------------------------------------------------------------
/iotdb-collector/collector-core/src/main/java/org/apache/iotdb/collector/runtime/progress/ProgressIndex.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.collector.runtime.progress;
21 |
22 | import java.util.Map;
23 |
24 | public class ProgressIndex {
25 | private final Map progressInfo;
26 | private final Integer instanceIndex;
27 |
28 | public ProgressIndex(final Integer instanceIndex, final Map progressInfo) {
29 | this.instanceIndex = instanceIndex;
30 | this.progressInfo = progressInfo;
31 | }
32 |
33 | public Integer getInstanceIndex() {
34 | return instanceIndex;
35 | }
36 |
37 | public Map getProgressInfo() {
38 | return progressInfo;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/iotdb-collector/collector-core/src/main/java/org/apache/iotdb/collector/runtime/task/TaskStateEnum.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.iotdb.collector.runtime.task;
20 |
21 | public enum TaskStateEnum {
22 | RUNNING(0),
23 | STOPPED(1);
24 |
25 | private final int taskState;
26 |
27 | TaskStateEnum(final int taskState) {
28 | this.taskState = taskState;
29 | }
30 |
31 | public int getTaskState() {
32 | return taskState;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/iotdb-collector/collector-core/src/main/java/org/apache/iotdb/collector/runtime/task/event/EventCollector.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.collector.runtime.task.event;
21 |
22 | import org.apache.iotdb.pipe.api.event.Event;
23 |
24 | import com.lmax.disruptor.RingBuffer;
25 |
26 | import javax.annotation.concurrent.ThreadSafe;
27 |
28 | @ThreadSafe
29 | public class EventCollector implements org.apache.iotdb.pipe.api.collector.EventCollector {
30 |
31 | private final RingBuffer ringBuffer;
32 |
33 | public EventCollector(final RingBuffer ringBuffer) {
34 | this.ringBuffer = ringBuffer;
35 | }
36 |
37 | @Override
38 | public void collect(final Event event) {
39 | ringBuffer.publishEvent((container, sequence, o) -> container.setEvent(event), event);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/iotdb-collector/collector-core/src/main/java/org/apache/iotdb/collector/runtime/task/event/EventContainer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.collector.runtime.task.event;
21 |
22 | import org.apache.iotdb.pipe.api.event.Event;
23 |
24 | public class EventContainer implements Event {
25 |
26 | private Event event;
27 |
28 | public Event getEvent() {
29 | return event;
30 | }
31 |
32 | public void setEvent(final Event event) {
33 | this.event = event;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/iotdb-collector/collector-core/src/main/java/org/apache/iotdb/collector/schedule/ThreadName.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.iotdb.collector.schedule;
20 |
21 | public enum ThreadName {
22 | SCHEDULE_PUSH_EVENT_JOB("Schedule-Push-Event-Job"),
23 | SCHEDULE_REPORT_PROGRESS_JOB("Schedule-Report-ProgressIndex-Job");
24 |
25 | private final String name;
26 |
27 | ThreadName(final String name) {
28 | this.name = name;
29 | }
30 |
31 | public String getName() {
32 | return name;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/iotdb-collector/collector-core/src/main/java/org/apache/iotdb/collector/service/IService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.collector.service;
21 |
22 | public interface IService {
23 |
24 | /** Start the service. */
25 | void start();
26 |
27 | /** Stop the service. */
28 | void stop();
29 |
30 | /**
31 | * Get the name of the service.
32 | *
33 | * @return the name of the service
34 | */
35 | String name();
36 | }
37 |
--------------------------------------------------------------------------------
/iotdb-collector/collector-core/src/main/java/org/apache/iotdb/collector/utils/PathUtil.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.iotdb.collector.utils;
21 |
22 | public class PathUtil {}
23 |
--------------------------------------------------------------------------------
/iotdb-collector/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 | 4.0.0
24 |
25 | org.apache.iotdb
26 | iotdb-extras-parent
27 | 2.0.4-SNAPSHOT
28 |
29 | iotdb-collector
30 | pom
31 | IoTDB: Collector
32 |
33 | collector-openapi
34 | collector-core
35 | collector-distribution
36 |
37 |
38 |
--------------------------------------------------------------------------------
/iotdb-operator/.dockerignore:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | # More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
21 | # Ignore build and test binaries.
22 | bin/
23 |
--------------------------------------------------------------------------------
/iotdb-operator/.gitignore:
--------------------------------------------------------------------------------
1 | # Binaries for programs and plugins
2 | *.exe
3 | *.exe~
4 | *.dll
5 | *.so
6 | *.dylib
7 | bin/*
8 | Dockerfile.cross
9 |
10 | # Test binary, built with `go test -c`
11 | *.test
12 |
13 | # Output of the go coverage tool, specifically when used with LiteIDE
14 | *.out
15 |
16 | # Go workspace file
17 | go.work
18 |
19 | # Kubernetes Generated files - skip generated files, except for vendored files
20 | !vendor/**/zz_generated.*
21 |
22 | # editor and IDE paraphernalia
23 | .idea
24 | .vscode
25 | *.swp
26 | *.swo
27 | *~
28 |
--------------------------------------------------------------------------------
/iotdb-operator/api/v1/common_types.go:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2024.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 |
17 | package v1
18 |
19 | // ServiceSpec defines the attributes that determine how the Service is created
20 | type ServiceSpec struct {
21 | // Type determines how the Service is exposed
22 | Type string `json:"type"`
23 |
24 | // Ports are the map of Service ports
25 | Ports map[string]int32 `json:"ports"`
26 | }
27 |
--------------------------------------------------------------------------------
/iotdb-operator/api/v1/confignode_webhook_test.go:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2024.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 |
17 | package v1
18 |
19 | import (
20 | . "github.com/onsi/ginkgo/v2"
21 | )
22 |
23 | var _ = Describe("ConfigNode Webhook", func() {
24 |
25 | Context("When creating ConfigNode under Defaulting Webhook", func() {
26 | It("Should fill in the default value if a required field is empty", func() {
27 |
28 | // TODO(user): Add your logic here
29 |
30 | })
31 | })
32 |
33 | Context("When creating ConfigNode under Validating Webhook", func() {
34 | It("Should deny if a required field is empty", func() {
35 |
36 | // TODO(user): Add your logic here
37 |
38 | })
39 |
40 | It("Should admit if all required fields are provided", func() {
41 |
42 | // TODO(user): Add your logic here
43 |
44 | })
45 | })
46 |
47 | })
48 |
--------------------------------------------------------------------------------
/iotdb-operator/api/v1/datanode_webhook_test.go:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2024.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 |
17 | package v1
18 |
19 | import (
20 | . "github.com/onsi/ginkgo/v2"
21 | )
22 |
23 | var _ = Describe("DataNode Webhook", func() {
24 |
25 | Context("When creating DataNode under Defaulting Webhook", func() {
26 | It("Should fill in the default value if a required field is empty", func() {
27 |
28 | // TODO(user): Add your logic here
29 |
30 | })
31 | })
32 |
33 | Context("When creating DataNode under Validating Webhook", func() {
34 | It("Should deny if a required field is empty", func() {
35 |
36 | // TODO(user): Add your logic here
37 |
38 | })
39 |
40 | It("Should admit if all required fields are provided", func() {
41 |
42 | // TODO(user): Add your logic here
43 |
44 | })
45 | })
46 |
47 | })
48 |
--------------------------------------------------------------------------------
/iotdb-operator/api/v1/groupversion_info.go:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2024.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 |
17 | // Package v1 contains API Schema definitions for the iotdb v1 API group
18 | // +kubebuilder:object:generate=true
19 | // +groupName=iotdb.apache.org
20 | package v1
21 |
22 | import (
23 | "k8s.io/apimachinery/pkg/runtime/schema"
24 | "sigs.k8s.io/controller-runtime/pkg/scheme"
25 | )
26 |
27 | var (
28 | // GroupVersion is group version used to register these objects
29 | GroupVersion = schema.GroupVersion{Group: "iotdb.apache.org", Version: "v1"}
30 |
31 | // SchemeBuilder is used to add go types to the GroupVersionKind scheme
32 | SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
33 |
34 | // AddToScheme adds the types in this group-version to the given scheme.
35 | AddToScheme = SchemeBuilder.AddToScheme
36 | )
37 |
--------------------------------------------------------------------------------
/iotdb-operator/config/certmanager/kustomization.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | resources:
21 | - certificate.yaml
22 |
23 | configurations:
24 | - kustomizeconfig.yaml
25 |
--------------------------------------------------------------------------------
/iotdb-operator/config/certmanager/kustomizeconfig.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | # This configuration is for teaching kustomize how to update name ref substitution
21 | nameReference:
22 | - kind: Issuer
23 | group: cert-manager.io
24 | fieldSpecs:
25 | - kind: Certificate
26 | group: cert-manager.io
27 | path: spec/issuerRef/name
28 |
--------------------------------------------------------------------------------
/iotdb-operator/config/crd/kustomizeconfig.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | # This file is for teaching kustomize how to substitute name and namespace reference in CRD
21 | nameReference:
22 | - kind: Service
23 | version: v1
24 | fieldSpecs:
25 | - kind: CustomResourceDefinition
26 | version: v1
27 | group: apiextensions.k8s.io
28 | path: spec/conversion/webhook/clientConfig/service/name
29 |
30 | namespace:
31 | - kind: CustomResourceDefinition
32 | version: v1
33 | group: apiextensions.k8s.io
34 | path: spec/conversion/webhook/clientConfig/service/namespace
35 | create: false
36 |
37 | varReference:
38 | - path: metadata/annotations
39 |
--------------------------------------------------------------------------------
/iotdb-operator/config/crd/patches/cainjection_in_confignodes.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | # The following patch adds a directive for certmanager to inject CA into the CRD
21 | apiVersion: apiextensions.k8s.io/v1
22 | kind: CustomResourceDefinition
23 | metadata:
24 | annotations:
25 | cert-manager.io/inject-ca-from: CERTIFICATE_NAMESPACE/CERTIFICATE_NAME
26 | name: confignodes.iotdb.apache.org
27 |
--------------------------------------------------------------------------------
/iotdb-operator/config/crd/patches/cainjection_in_datanodes.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | # The following patch adds a directive for certmanager to inject CA into the CRD
21 | apiVersion: apiextensions.k8s.io/v1
22 | kind: CustomResourceDefinition
23 | metadata:
24 | annotations:
25 | cert-manager.io/inject-ca-from: CERTIFICATE_NAMESPACE/CERTIFICATE_NAME
26 | name: datanodes.iotdb.apache.org
27 |
--------------------------------------------------------------------------------
/iotdb-operator/config/crd/patches/webhook_in_confignodes.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | # The following patch enables a conversion webhook for the CRD
21 | apiVersion: apiextensions.k8s.io/v1
22 | kind: CustomResourceDefinition
23 | metadata:
24 | name: confignodes.iotdb.apache.org
25 | spec:
26 | conversion:
27 | strategy: Webhook
28 | webhook:
29 | clientConfig:
30 | service:
31 | namespace: system
32 | name: webhook-service
33 | path: /convert
34 | conversionReviewVersions:
35 | - v1
36 |
--------------------------------------------------------------------------------
/iotdb-operator/config/crd/patches/webhook_in_datanodes.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | # The following patch enables a conversion webhook for the CRD
21 | apiVersion: apiextensions.k8s.io/v1
22 | kind: CustomResourceDefinition
23 | metadata:
24 | name: datanodes.iotdb.apache.org
25 | spec:
26 | conversion:
27 | strategy: Webhook
28 | webhook:
29 | clientConfig:
30 | service:
31 | namespace: system
32 | name: webhook-service
33 | path: /convert
34 | conversionReviewVersions:
35 | - v1
36 |
--------------------------------------------------------------------------------
/iotdb-operator/config/default/manager_config_patch.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | apiVersion: apps/v1
21 | kind: Deployment
22 | metadata:
23 | name: controller-manager
24 | namespace: system
25 | spec:
26 | template:
27 | spec:
28 | containers:
29 | - name: manager
30 |
--------------------------------------------------------------------------------
/iotdb-operator/config/default/manager_webhook_patch.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | apiVersion: apps/v1
21 | kind: Deployment
22 | metadata:
23 | name: controller-manager
24 | namespace: system
25 | spec:
26 | template:
27 | spec:
28 | containers:
29 | - name: manager
30 | ports:
31 | - containerPort: 9443
32 | name: webhook-server
33 | protocol: TCP
34 | volumeMounts:
35 | - mountPath: /tmp/k8s-webhook-server/serving-certs
36 | name: cert
37 | readOnly: true
38 | volumes:
39 | - name: cert
40 | secret:
41 | defaultMode: 420
42 | secretName: webhook-server-cert
43 |
--------------------------------------------------------------------------------
/iotdb-operator/config/manager/kustomization.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | resources:
21 | - manager.yaml
22 | apiVersion: kustomize.config.k8s.io/v1beta1
23 | kind: Kustomization
24 | images:
25 | - name: controller
26 | newName: iotdb-operator
27 | newTag: v1
28 |
--------------------------------------------------------------------------------
/iotdb-operator/config/prometheus/kustomization.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | resources:
21 | - monitor.yaml
22 |
--------------------------------------------------------------------------------
/iotdb-operator/config/prometheus/monitor.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | # Prometheus Monitor Service (Metrics)
21 | apiVersion: monitoring.coreos.com/v1
22 | kind: ServiceMonitor
23 | metadata:
24 | labels:
25 | control-plane: controller-manager
26 | app.kubernetes.io/name: iotdb-operator
27 | app.kubernetes.io/managed-by: kustomize
28 | name: controller-manager-metrics-monitor
29 | namespace: system
30 | spec:
31 | endpoints:
32 | - path: /metrics
33 | port: https
34 | scheme: https
35 | bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
36 | tlsConfig:
37 | insecureSkipVerify: true
38 | selector:
39 | matchLabels:
40 | control-plane: controller-manager
41 |
--------------------------------------------------------------------------------
/iotdb-operator/config/rbac/auth_proxy_client_clusterrole.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | apiVersion: rbac.authorization.k8s.io/v1
21 | kind: ClusterRole
22 | metadata:
23 | labels:
24 | app.kubernetes.io/name: iotdb-operator
25 | app.kubernetes.io/managed-by: kustomize
26 | name: metrics-reader
27 | rules:
28 | - nonResourceURLs:
29 | - "/metrics"
30 | verbs:
31 | - get
32 |
--------------------------------------------------------------------------------
/iotdb-operator/config/rbac/auth_proxy_role.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | apiVersion: rbac.authorization.k8s.io/v1
21 | kind: ClusterRole
22 | metadata:
23 | labels:
24 | app.kubernetes.io/name: iotdb-operator
25 | app.kubernetes.io/managed-by: kustomize
26 | name: proxy-role
27 | rules:
28 | - apiGroups:
29 | - authentication.k8s.io
30 | resources:
31 | - tokenreviews
32 | verbs:
33 | - create
34 | - apiGroups:
35 | - authorization.k8s.io
36 | resources:
37 | - subjectaccessreviews
38 | verbs:
39 | - create
40 |
--------------------------------------------------------------------------------
/iotdb-operator/config/rbac/auth_proxy_role_binding.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | apiVersion: rbac.authorization.k8s.io/v1
21 | kind: ClusterRoleBinding
22 | metadata:
23 | labels:
24 | app.kubernetes.io/name: iotdb-operator
25 | app.kubernetes.io/managed-by: kustomize
26 | name: proxy-rolebinding
27 | roleRef:
28 | apiGroup: rbac.authorization.k8s.io
29 | kind: ClusterRole
30 | name: proxy-role
31 | subjects:
32 | - kind: ServiceAccount
33 | name: controller-manager
34 | namespace: system
35 |
--------------------------------------------------------------------------------
/iotdb-operator/config/rbac/auth_proxy_service.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | apiVersion: v1
21 | kind: Service
22 | metadata:
23 | labels:
24 | control-plane: controller-manager
25 | app.kubernetes.io/name: iotdb-operator
26 | app.kubernetes.io/managed-by: kustomize
27 | name: controller-manager-metrics-service
28 | namespace: system
29 | spec:
30 | ports:
31 | - name: https
32 | port: 8443
33 | protocol: TCP
34 | targetPort: https
35 | selector:
36 | control-plane: controller-manager
37 |
--------------------------------------------------------------------------------
/iotdb-operator/config/rbac/confignode_editor_role.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | # permissions for end users to edit confignodes.
21 | apiVersion: rbac.authorization.k8s.io/v1
22 | kind: ClusterRole
23 | metadata:
24 | labels:
25 | app.kubernetes.io/name: iotdb-operator
26 | app.kubernetes.io/managed-by: kustomize
27 | name: confignode-editor-role
28 | rules:
29 | - apiGroups:
30 | - iotdb.apache.org
31 | resources:
32 | - confignodes
33 | verbs:
34 | - create
35 | - delete
36 | - get
37 | - list
38 | - patch
39 | - update
40 | - watch
41 | - apiGroups:
42 | - iotdb.apache.org
43 | resources:
44 | - confignodes/status
45 | verbs:
46 | - get
47 |
--------------------------------------------------------------------------------
/iotdb-operator/config/rbac/confignode_viewer_role.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | # permissions for end users to view confignodes.
21 | apiVersion: rbac.authorization.k8s.io/v1
22 | kind: ClusterRole
23 | metadata:
24 | labels:
25 | app.kubernetes.io/name: iotdb-operator
26 | app.kubernetes.io/managed-by: kustomize
27 | name: confignode-viewer-role
28 | rules:
29 | - apiGroups:
30 | - iotdb.apache.org
31 | resources:
32 | - confignodes
33 | verbs:
34 | - get
35 | - list
36 | - watch
37 | - apiGroups:
38 | - iotdb.apache.org
39 | resources:
40 | - confignodes/status
41 | verbs:
42 | - get
43 |
--------------------------------------------------------------------------------
/iotdb-operator/config/rbac/datanode_editor_role.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | # permissions for end users to edit datanodes.
21 | apiVersion: rbac.authorization.k8s.io/v1
22 | kind: ClusterRole
23 | metadata:
24 | labels:
25 | app.kubernetes.io/name: iotdb-operator
26 | app.kubernetes.io/managed-by: kustomize
27 | name: datanode-editor-role
28 | rules:
29 | - apiGroups:
30 | - iotdb.apache.org
31 | resources:
32 | - datanodes
33 | verbs:
34 | - create
35 | - delete
36 | - get
37 | - list
38 | - patch
39 | - update
40 | - watch
41 | - apiGroups:
42 | - iotdb.apache.org
43 | resources:
44 | - datanodes/status
45 | verbs:
46 | - get
47 |
--------------------------------------------------------------------------------
/iotdb-operator/config/rbac/datanode_viewer_role.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | # permissions for end users to view datanodes.
21 | apiVersion: rbac.authorization.k8s.io/v1
22 | kind: ClusterRole
23 | metadata:
24 | labels:
25 | app.kubernetes.io/name: iotdb-operator
26 | app.kubernetes.io/managed-by: kustomize
27 | name: datanode-viewer-role
28 | rules:
29 | - apiGroups:
30 | - iotdb.apache.org
31 | resources:
32 | - datanodes
33 | verbs:
34 | - get
35 | - list
36 | - watch
37 | - apiGroups:
38 | - iotdb.apache.org
39 | resources:
40 | - datanodes/status
41 | verbs:
42 | - get
43 |
--------------------------------------------------------------------------------
/iotdb-operator/config/rbac/leader_election_role.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | # permissions to do leader election.
21 | apiVersion: rbac.authorization.k8s.io/v1
22 | kind: Role
23 | metadata:
24 | labels:
25 | app.kubernetes.io/name: iotdb-operator
26 | app.kubernetes.io/managed-by: kustomize
27 | name: leader-election-role
28 | rules:
29 | - apiGroups:
30 | - ""
31 | resources:
32 | - configmaps
33 | verbs:
34 | - get
35 | - list
36 | - watch
37 | - create
38 | - update
39 | - patch
40 | - delete
41 | - apiGroups:
42 | - coordination.k8s.io
43 | resources:
44 | - leases
45 | verbs:
46 | - get
47 | - list
48 | - watch
49 | - create
50 | - update
51 | - patch
52 | - delete
53 | - apiGroups:
54 | - ""
55 | resources:
56 | - events
57 | verbs:
58 | - create
59 | - patch
60 |
--------------------------------------------------------------------------------
/iotdb-operator/config/rbac/leader_election_role_binding.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | apiVersion: rbac.authorization.k8s.io/v1
21 | kind: RoleBinding
22 | metadata:
23 | labels:
24 | app.kubernetes.io/name: iotdb-operator
25 | app.kubernetes.io/managed-by: kustomize
26 | name: leader-election-rolebinding
27 | roleRef:
28 | apiGroup: rbac.authorization.k8s.io
29 | kind: Role
30 | name: leader-election-role
31 | subjects:
32 | - kind: ServiceAccount
33 | name: controller-manager
34 | namespace: system
35 |
--------------------------------------------------------------------------------
/iotdb-operator/config/rbac/role_binding.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | apiVersion: rbac.authorization.k8s.io/v1
21 | kind: ClusterRoleBinding
22 | metadata:
23 | labels:
24 | app.kubernetes.io/name: iotdb-operator
25 | app.kubernetes.io/managed-by: kustomize
26 | name: manager-rolebinding
27 | roleRef:
28 | apiGroup: rbac.authorization.k8s.io
29 | kind: ClusterRole
30 | name: manager-role
31 | subjects:
32 | - kind: ServiceAccount
33 | name: controller-manager
34 | namespace: system
35 |
--------------------------------------------------------------------------------
/iotdb-operator/config/rbac/service_account.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | apiVersion: v1
21 | kind: ServiceAccount
22 | metadata:
23 | labels:
24 | app.kubernetes.io/name: iotdb-operator
25 | app.kubernetes.io/managed-by: kustomize
26 | name: controller-manager
27 | namespace: system
28 |
--------------------------------------------------------------------------------
/iotdb-operator/config/samples/iotdb_v1_confignode.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | apiVersion: iotdb.apache.org/v1
21 | kind: ConfigNode
22 | metadata:
23 | name: iotdb-confignode
24 | spec:
25 | image: apache/iotdb:1.3.2-confignode
26 | replicas: 1
27 | resources:
28 | requests:
29 | memory: 1Gi
30 | cpu: 500m
31 | limits:
32 | memory: 1Gi
33 | cpu: 500m
34 | envs:
35 | cn_internal_port: "10710"
36 | volumeClaimTemplate:
37 | accessModes: ["ReadWriteOnce"]
38 | storageClassName: ""
39 | resources:
40 | requests:
41 | storage: 1Gi
42 |
--------------------------------------------------------------------------------
/iotdb-operator/config/samples/iotdb_v1_datanode.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | apiVersion: iotdb.apache.org/v1
21 | kind: DataNode
22 | metadata:
23 | name: iotdb-datanode
24 | spec:
25 | image: apache/iotdb:1.3.2-datanode
26 | replicas: 1
27 | resources:
28 | requests:
29 | memory: 1Gi
30 | cpu: 500m
31 | limits:
32 | memory: 1Gi
33 | cpu: 500m
34 | envs:
35 | dn_internal_port: "10730"
36 | service:
37 | type: NodePort
38 | ports:
39 | dn_rpc_port: 30667
40 | volumeClaimTemplate:
41 | accessModes: [ "ReadWriteOnce" ]
42 | storageClassName: ""
43 | resources:
44 | requests:
45 | storage: 1Gi
46 |
--------------------------------------------------------------------------------
/iotdb-operator/config/samples/kustomization.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | ## Append samples of your project ##
21 | resources:
22 | - iotdb_v1_datanode.yaml
23 | - iotdb_v1_confignode.yaml
24 | #+kubebuilder:scaffold:manifestskustomizesamples
25 |
--------------------------------------------------------------------------------
/iotdb-operator/config/samples/pv-example/confignode-pv.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | apiVersion: v1
21 | kind: PersistentVolume
22 | metadata:
23 | name: confignode-storage1
24 | labels:
25 | app: confignode-storage
26 | spec:
27 | capacity:
28 | storage: 1Gi
29 | storageClassName: ""
30 | accessModes:
31 | - ReadWriteOnce
32 | persistentVolumeReclaimPolicy: Retain
33 | hostPath:
34 | path: /data/k8s_iotdb/data/confignode1
35 | type: DirectoryOrCreate
--------------------------------------------------------------------------------
/iotdb-operator/config/samples/pv-example/datanode-pv.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | apiVersion: v1
21 | kind: PersistentVolume
22 | metadata:
23 | name: datanode-storage1
24 | labels:
25 | app: datanode-storage
26 | spec:
27 | capacity:
28 | storage: 1Gi
29 | storageClassName: ""
30 | accessModes:
31 | - ReadWriteOnce
32 | persistentVolumeReclaimPolicy: Retain
33 | hostPath:
34 | path: /data/k8s_iotdb/data/datanode1
35 | type: DirectoryOrCreate
--------------------------------------------------------------------------------
/iotdb-operator/config/scorecard/bases/config.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | apiVersion: scorecard.operatorframework.io/v1alpha3
21 | kind: Configuration
22 | metadata:
23 | name: config
24 | stages:
25 | - parallel: true
26 | tests: []
27 |
--------------------------------------------------------------------------------
/iotdb-operator/config/scorecard/kustomization.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | resources:
21 | - bases/config.yaml
22 | patchesJson6902:
23 | - path: patches/basic.config.yaml
24 | target:
25 | group: scorecard.operatorframework.io
26 | version: v1alpha3
27 | kind: Configuration
28 | name: config
29 | - path: patches/olm.config.yaml
30 | target:
31 | group: scorecard.operatorframework.io
32 | version: v1alpha3
33 | kind: Configuration
34 | name: config
35 | #+kubebuilder:scaffold:patchesJson6902
36 |
--------------------------------------------------------------------------------
/iotdb-operator/config/scorecard/patches/basic.config.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | - op: add
21 | path: /stages/0/tests/-
22 | value:
23 | entrypoint:
24 | - scorecard-test
25 | - basic-check-spec
26 | image: quay.io/operator-framework/scorecard-test:v1.36.1
27 | labels:
28 | suite: basic
29 | test: basic-check-spec-test
30 |
--------------------------------------------------------------------------------
/iotdb-operator/config/webhook/kustomization.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | resources:
21 | - manifests.yaml
22 | - service.yaml
23 |
24 | configurations:
25 | - kustomizeconfig.yaml
26 |
--------------------------------------------------------------------------------
/iotdb-operator/config/webhook/service.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | apiVersion: v1
21 | kind: Service
22 | metadata:
23 | labels:
24 | app.kubernetes.io/name: iotdb-operator
25 | app.kubernetes.io/managed-by: kustomize
26 | name: webhook-service
27 | namespace: system
28 | spec:
29 | ports:
30 | - port: 443
31 | protocol: TCP
32 | targetPort: 9443
33 | selector:
34 | control-plane: controller-manager
35 |
--------------------------------------------------------------------------------
/iotdb-operator/hack/boilerplate.go.txt:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2024.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
--------------------------------------------------------------------------------
/iotdb-operator/internal/controller/common_name.go:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2024.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 |
17 | package controller
18 |
19 | var ConfigNodeName = "iotdb-confignode"
20 | var DataNodeName = "iotdb-datanode"
21 |
--------------------------------------------------------------------------------
/iotdb-operator/internal/controller/strutil/strutil.go:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2024.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 |
17 | package strutil
18 |
19 | import "strings"
20 |
21 | func ToKebabCase(s string) string {
22 | words := strings.Split(s, "_")
23 | for i, word := range words {
24 | words[i] = strings.ToLower(word)
25 | }
26 | return strings.Join(words, "-")
27 | }
28 |
--------------------------------------------------------------------------------
/iotdb-operator/test/e2e/e2e_suite_test.go:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2024.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 |
17 | package e2e
18 |
19 | import (
20 | "fmt"
21 | "testing"
22 |
23 | . "github.com/onsi/ginkgo/v2"
24 | . "github.com/onsi/gomega"
25 | )
26 |
27 | // Run e2e tests using the Ginkgo runner.
28 | func TestE2E(t *testing.T) {
29 | RegisterFailHandler(Fail)
30 | fmt.Fprintf(GinkgoWriter, "Starting iotdb-operator suite\n")
31 | RunSpecs(t, "e2e suite")
32 | }
33 |
--------------------------------------------------------------------------------
/iotdb-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 | #
18 |
19 | org.apache.iotdb.session.IoTDBSessionPool
--------------------------------------------------------------------------------
/licenses/The 2-Clause BSD License:
--------------------------------------------------------------------------------
1 | The 2-Clause BSD License
2 | SPDX short identifier: BSD-2-Clause
3 |
4 | Note: This license has also been called the "Simplified BSD License" and the "FreeBSD License". See also the 3-clause BSD License.
5 |
6 | Copyright 1998 Regents of the University of California
7 |
8 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
9 |
10 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
11 |
12 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
13 |
14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/licenses/The MIT License (QOS.ch):
--------------------------------------------------------------------------------
1 | Copyright (c) 2004-2017 QOS.ch
2 | All rights reserved.
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining
5 | a copy of this software and associated documentation files (the
6 | "Software"), to deal in the Software without restriction, including
7 | without limitation the rights to use, copy, modify, merge, publish,
8 | distribute, sublicense, and/or sell copies of the Software, and to
9 | permit persons to whom the Software is furnished to do so, subject to
10 | the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be
13 | included in all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/licenses/The MIT License (progressbar):
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015--2019 Tongfei Chen
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/mybatis-generator/.gitignore:
--------------------------------------------------------------------------------
1 | target/
2 | .settings/
3 | .classpath
4 | .project
5 | .idea/
6 | *.iml
7 | .DS_Store
8 |
--------------------------------------------------------------------------------
/mybatis-generator/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 4.0.0
4 |
5 | org.apache.iotdb
6 | iotdb-extras-parent
7 | 2.0.4-SNAPSHOT
8 |
9 | org.apache.iotdb
10 | mybatis-generator-plugin
11 | IoTDB Extras: Mybatis Generator Plugin
12 | 2.0.4-SNAPSHOT
13 | jar
14 |
15 |
16 | The Apache Software License, Version 2.0
17 | http://www.apache.org/licenses/LICENSE-2.0.txt
18 | repo
19 |
20 |
21 |
22 |
23 | org.mybatis.generator
24 | mybatis-generator-core
25 | 1.4.2
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/mybatis-generator/src/main/java/org/apache/iotdb/mybatis/plugin/util/DateUtil.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.iotdb.mybatis.plugin.util;
19 |
20 | import java.text.SimpleDateFormat;
21 | import java.util.Date;
22 |
23 | public class DateUtil {
24 |
25 | public static String date2Str(Date date) {
26 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
27 | return sdf.format(date);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------