By default, Impala uses the OS’s time zone database located in
/usr/share/zoneinfo
. This directory contains the IANA timezone
database in a compiled binary format. The contents of the zoneinfo
directory is controlled by the OS’s package manager.
Use the following start-up flags to customize the time zone definitions.
‑‑hdfs_zone_info_zip
: This flag allows Impala
administrators to specify a custom timezone database. The flag should be set to a
shared (not necessarily HDFS) path that points to a zip archive of a custom IANA
timezone database. The timezone database is expected to be in a compiled binary
format. If the startup flag is set, Impala will use the specified timezone
database instead of the default /usr/share/zoneinfo
database. The
timezone db upgrade process is described in detail below.
‑‑hdfs_zone_alias_conf
: This flag allows Impala
administrators to specify definitions for custom timezone aliases. The flag
should be set to a shared (not necessarily HDFS) path that specifies a config
file containing custom timezone alias definitions. This config file can be used
as a workaround for users who want to keep using their legacy timezone names.
Configuring custom aliases is described in detail below.
git clone https://github.com/eggert/tz
https://www.iana.org/time-zones/repository
cd tz
make TOPDIR=tzdata install
./zic -d ./tzdata/etc/zoneinfo africa antarctica asia australasia backward backzone etcetera europe factory northamerica pacificnew southamerica systemv
pushd ./tzdata/etc
zip -r zoneinfo.zip zoneinfo
popd
hdfs dfs -mkdir -p /tzdb/latest
hdfs dfs -copyFromLocal ./tzdata/etc/zoneinfo.zip /tzdb/latest
‑‑hdfs_zone_info_zip
startup flag to
/tzdb/latest/zoneinfo.zip
as an impalad
safety
valve.
Configuring custom time zone aliases:
tzalias.conf
config file that contains time zone alias
definitions formatted as ALIAS
=
DEFINITION
. For example:
#
# Define aliases for existing timezone names:
#
Universal Coordinated Time = UTC
Mideast/Riyadh89 = Asia/Riyadh
PDT = America/Los_Angeles
#
# Define aliases as UTC offsets in seconds:
#
GMT-01:00 = 3600
GMT+01:00 = -3600
hdfs dfs -mkdir -p /tzdb
hdfs dfs -copyFromLocal tzalias.conf /tzdb
‑‑hdfs_zone_alias_conf
startup flag to
/tzdb/tzalias.conf
as an impalad
safety valve.
Added in: Impala 3.1