我想将 cloud composer 创建的气流网络服务器的时区从 utc 更改为 jst(亚洲/东京) [英] I want to change the timezone of the airflow webserver created by cloud composer from utc to jst (Asia / Tokyo)

查看:29
本文介绍了我想将 cloud composer 创建的气流网络服务器的时区从 utc 更改为 jst(亚洲/东京)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将 cloud composer 创建的气流网络服务器的时区从 utc 更改为 jst(Asia/Tokyo).

然而,即使webserver-default_ui_timezone ='JST'"由airflow config overwrite设置,webserver的时间不能改变.

即使我将气流中使用的 VM(GKE 节点)的时区从 utc 更改为 jst(Asia/Tokyo),Web 服务器没有变化.

如何将网络服务器和DAG的显示时间和时区更改为jst(Asia/Tokyo)?

解决方案

我了解 default_ui_timezone 是实现您所寻找的正确 Airflow 设置,因此它应该与您的方式有关正在尝试设置该值.此外,此设置不包含在阻止的气流配置列表中.

在 GCloud CLI 中,尝试使用此命令将以下内容替换为您的环境和区域名称:

gcloud composer 环境更新 test-environment \--location you-region-1 \--update-airflow-configs=webserver-default_ui_timezone=JST

来自 Cloud Composer docs:

gcloud composer 环境更新 ENVIRONMENT_NAME \--location 位置 \--update-airflow-configs=KEY=VALUE,KEY=VALUE,...

<块引用>

如果您需要,在上面提供的文档中,还有如何从控制台或 API 设置 Airflow 配置值的示例.祝你好运!

I want to change the timezone of the airflow webserver created by cloud composer from utc to jst (Asia / Tokyo).

However, even if "webserver-default_ui_timezone ='JST'" is set by airflow config overwrite, the time of webserver cannot be changed.

Even if I changed the time zone of the VM (GKE node) used in airflow from utc to jst (Asia / Tokyo), there was no change in the web server.

How can I change the display time and time zone of webserver and DAG to jst (Asia / Tokyo)?

解决方案

I understand that default_ui_timezone is the correct Airflow setting to achieve what you are looking for, so it should be related to the way you are trying to set the value. Besides, this setting is not included in the blocked Airflow configurations list.

From GCloud CLI, try this command replacing the following with your environment and region names:

gcloud composer environments update test-environment \
  --location you-region-1 \
  --update-airflow-configs=webserver-default_ui_timezone=JST

From the Cloud Composer docs:

gcloud composer environments update ENVIRONMENT_NAME \
  --location LOCATION \
  --update-airflow-configs=KEY=VALUE,KEY=VALUE,...

  • ENVIRONMENT_NAME with the name of the environment.
  • LOCATION with the Compute Engine region where the environment is located.
  • KEY with the configuration section and the option name separated by a hyphen, for example, core-print_stats_interval.
  • VALUE with the corresponding value for an option.

In case you need it, in the docs provided above, there are also examples of how to set Airflow configuration values from Console or API. Good luck!

这篇关于我想将 cloud composer 创建的气流网络服务器的时区从 utc 更改为 jst(亚洲/东京)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆