# Greptime 双周精选 （8.14-8.27）｜支持使用 KubeBlocks 启动 GreptimeDB 集群

Source: https://greptime.cn/blogs/2023-08-30-biweekly

## 内容概述

作为一个成长中的开源项目，GreptimeDB 的进展离不开来自全球的社区贡献者们，感谢各位！

过去两周，我们所有项目中共有 **112** 个 PR 被合并，以下是这段时间较为重要的 PR 总结：

- 支持使用 KubeBlocks 启动 GreptimeDB 集群；

- 丰富了 sqlness 测试场景

- 支持 gRPC 行格式写入协议

- 优化了 DESC TABLE 的体验

## 社区贡献者名单

在过去的两周里，共有 **2 位独立贡献者**，累计 **4 个 PR 被成功合并**，还有很多待合并的 PR。

祝贺以下各位在过去 2 周内成为我们活跃的贡献者：

- [@NiwakaDev](https://github.com/NiwakaDev) ([db#2150](https://github.com/GreptimeTeam/greptimedb/pull/2150) [db#2209](https://github.com/GreptimeTeam/greptimedb/pull/2209))

- [@Taylor-lagrange](https://github.com/Taylor-lagrange) ([db#2138](https://github.com/GreptimeTeam/greptimedb/pull/2138) [db#2229](https://github.com/GreptimeTeam/greptimedb/pull/2229))

同时衷心感谢我们所有的成员和贡献者！是你们的付出让我们的项目得以成功，也是你们让 GreptimeDB 成为一个更优质的产品。让我们一起努力，建立一个更棒的社区！

## PR 亮点

### [db#4822](https://github.com/GreptimeTeam/greptimedb/pull/4822) 支持使用 KubeBlocks 启动 GreptimeDB 集群

我们现在支持了使用 KubeBlocks 启动 GreptimeDB 集群。

### [db#2073](https://github.com/GreptimeTeam/greptimedb/pull/2073) 丰富了 sqlness 测试场景

我们丰富了 sqlness 测试场景，增加以下三个数据类型的 test case：时间戳(timestamp)、浮点(float)、字符串(String)，参考了 DuckDB 的 test case。

### [db#2188](https://github.com/GreptimeTeam/greptimedb/pull/2188) 支持 gRPC 行格式写入协议

一直以来，GreptimeDB 仅提供对列格式的 gRPC 协议的支持。相较于行格式，构建列格式数据对客户端（SDK）的友好程度较低，此举对跨多语言 SDK 的研发工作构成了额外负担。同时，GreptimeDB 兼容的 InfluxDB Line Protocol 和 Prometheus Write Protocol 也都是基于“行”构建数据的。基于这些因素，我们决定引入对 gRPC 行格式写入协议的支持。在保证性能不受影响的前提下，我们将提供一个更加友好的数据格式。相关的 PR 还包括 [db#2189](https://github.com/GreptimeTeam/greptimedb/pull/2189), [db#2231](https://github.com/GreptimeTeam/greptimedb/pull/2231) 和 [db#2263](https://github.com/GreptimeTeam/greptimedb/pull/2263)。

### [db#2256](https://github.com/GreptimeTeam/greptimedb/pull/2256) 优化了 DESC TABLE 的体验

我们在 [db#2256](https://github.com/GreptimeTeam/greptimedb/pull/2256) 和 [db#2272](https://github.com/GreptimeTeam/greptimedb/pull/2272) 中优化了 DESC TABLE 的体验优化：

- 增加一列 “Key” 来描述主键信息（Tag 与 Timestamp 均被视为主键）

当前的输出，主键信息存储在 Semantic Type 列中，与 gRPC Protocol 中的 Semantic Type（Tag, Field, Timestamp）不一致，优化后单独提出一列 Key 来描述主键，Semantic Type 列保持与 gRPC 协议中的一致。

Before:

```rust
+-----------+----------------------+------+---------+---------------+
| Field     | Type                 | Null | Default | Semantic Type |
+-----------+----------------------+------+---------+---------------+
| ts        | TimestampMillisecond | NO   |         | TIME INDEX    |
| collector | String               | YES  |         | PRIMARY KEY   |
| host      | String               | YES  |         | PRIMARY KEY   |
| val       | Float64              | YES  |         | FIELD         |
+-----------+----------------------+------+---------+---------------+
```

After:

```rust
+-----------+----------------------+-----+------+---------+---------------+
| Field     | Type                 | Key | Null | Default | Semantic Type |
+-----------+----------------------+-----+------+---------+---------------+
| ts        | TimestampMillisecond | PRI | NO   |         | TIMESTAMP     |
| collector | String               | PRI | YES  |         | TAG           |
| host      | String               | PRI | YES  |         | TAG           |
| val       | Float64              |     | YES  |         | FIELD         |
+-----------+----------------------+-----+------+---------+---------------+
```

- Field 改为 Column

在 DESC TABLE 的输出中，我们使用了 Field 这个名称（遵循了 MySQL 的规范），但是我们的时间序列数据模型也包含 Field（Tag, Field, Timestamp），这可能会让用户感到困惑，所以我们改成了 Column。

Before:

```rust
+-----------+----------------------+-----+------+---------+---------------+
| Field     | Type                 | Key | Null | Default | Semantic Type |
+-----------+----------------------+-----+------+---------+---------------+
| ts        | TimestampMillisecond | PRI | NO   |         | TIMESTAMP     |
| collector | String               | PRI | YES  |         | TAG           |
| host      | String               | PRI | YES  |         | TAG           |
| val       | Float64              |     | YES  |         | FIELD         |
+-----------+----------------------+-----+------+---------+---------------+
```

After:

```rust
+-----------+----------------------+-----+------+---------+---------------+
| Column    | Type                 | Key | Null | Default | Semantic Type |
+-----------+----------------------+-----+------+---------+---------------+
| ts        | TimestampMillisecond | PRI | NO   |         | TIMESTAMP     |
| collector | String               | PRI | YES  |         | TAG           |
| host      | String               | PRI | YES  |         | TAG           |
| val       | Float64              |     | YES  |         | FIELD         |
+-----------+----------------------+-----+------+---------+---------------+
```

## 新鲜事

### Vector v0.32 发布

现在内置的 GreptimeDB sink 可以使用了，更多详情请访问 https://vector.dev/releases/0.32.0/ 查看。

### GreptimeDB 在 GitHub 正式获得 3000 stars

我们的 GreptimeDB 已经在 GitHub 上拥有了 3000 个 stars 以及 191 个 forks，这是一个重要的里程碑！在过去的几个月时间里，GreptimeDB 发布了 v0.1 到 v0.3 三个版本，并即将迎来 v0.4 的发布，GreptimeCloud 也正式宣布了公测，并即将迎来更新版的发布。我们还拥有了两位外部 committer，所有的成就都离不开团队成员的努力和外部贡献者的支持，我们再次对大家的付出表示诚挚的感谢！

## 关于 Greptime

[Greptime 格睿科技](https://greptime.cn/)专注于为可观测、物联网及车联网等领域提供实时、高效的数据存储和分析服务，帮助客户挖掘数据的深层价值。目前基于云原生的时序数据库 [GreptimeDB](https://github.com/GreptimeTeam/greptimedb) 已经衍生出多款适合不同用户的解决方案，更多信息或 demo 展示请联系下方小助手（微信号：greptime）。

欢迎对开源感兴趣的朋友们参与贡献和讨论，从带有 good first issue 标签的 issue 开始你的开源之旅吧～期待在开源社群里遇见你！添加小助手微信即可加入“技术交流群”与志同道合的朋友们面对面交流哦~

Star us on GitHub Now: https://github.com/GreptimeTeam/greptimedb

官网：https://greptime.cn/

文档：https://docs.greptime.cn/

Twitter: https://twitter.com/Greptime

Slack: https://greptime.com/slack

LinkedIn: https://www.linkedin.com/company/greptime/
