title_wip

[HDFS Configuration Reference](https://hawq.apache.org/docs/userguide/2.3.0.0-incubating/reference/HDFSConfigurationParameterReference.html) might explain some parameters.

#### ClickHouse extras[​](#clickhouse-extras "Direct link to ClickHouse extras")

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| **parameter** **default value**|  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | | hadoop\_kerberos\_keytab ""|  |  |  |  | | --- | --- | --- | --- | | hadoop\_kerberos\_principal ""|  |  | | --- | --- | | libhdfs3\_conf "" | | | | | | | |

### Limitations[​](#limitations "Direct link to Limitations")

- `hadoop_security_kerberos_ticket_cache_path` and `libhdfs3_conf` can be global only, not user specific

## Kerberos support[​](#kerberos-support "Direct link to Kerberos support")

If the `hadoop_security_authentication` parameter has the value `kerberos`, ClickHouse authenticates via Kerberos.
Parameters are [here](#clickhouse-extras) and `hadoop_security_kerberos_ticket_cache_path` may be of help.
Note that due to libhdfs3 limitations only old-fashioned approach is supported,
datanode communications are not secured by SASL (`HADOOP_SECURE_DN_USER` is a reliable indicator of such
security approach). Use `tests/integration/test_storage_kerberized_hdfs/hdfs_configs/bootstrap.sh` for reference.

If `hadoop_kerberos_keytab`, `hadoop_kerberos_principal` or `hadoop_security_kerberos_ticket_cache_path` are specified, Kerberos authentication will be used. `hadoop_kerberos_keytab` and `hadoop_kerberos_principal` are mandatory in this case.

## HDFS Namenode HA support[​](#namenode-ha "Direct link to HDFS Namenode HA support")

libhdfs3 support HDFS namenode HA.

- Copy `hdfs-site.xml` from an HDFS node to `/etc/clickhouse-server/`.
- Add following piece to ClickHouse config file:

```
  <hdfs>
    <libhdfs3_conf>/etc/clickhouse-server/hdfs-site.xml</libhdfs3_conf>
  </hdfs>
```

- Then use `dfs.nameservices` tag value of `hdfs-site.xml` as the namenode address in the HDFS URI. For example, replace `hdfs://[email protected]:8020/abc/` with `hdfs://appadmin@my_nameservice/abc/`.

## Virtual columns[​](#virtual-columns "Direct link to Virtual columns")

- `_path` — Path to the file. Type: `LowCardinality(String)`.
- `_file` — Name of the file. Type: `LowCardinality(String)`.
- `_size` — Size of the file in bytes. Type: `Nullable(UInt64)`. If the size is unknown, the value is `NULL`.
- `_time` — Last modified time of the file. Type: `Nullable(DateTime)`. If the time is unknown, the value is `NULL`.

## Storage settings[​](#storage-settings "Direct link to Storage settings")

- [hdfs\_truncate\_on\_insert](/docs/operations/settings/settings#hdfs_truncate_on_insert) - allows to truncate file before insert into it. Disabled by default.
- [hdfs\_create\_new\_file\_on\_insert](/docs/operations/settings/settings#hdfs_create_new_file_on_insert) - allows to create a new file on each insert if format has suffix. Disabled by default.
- [hdfs\_skip\_empty\_files](/docs/operations/settings/settings#hdfs_skip_empty_files) - allows to skip empty files while reading. Disabled by default.

**See Also**

- [Virtual columns](/docs/engines/table-engines#table_engines-virtual_columns)

- [Usage](#usage)
  - [PARTITION BY](#partition-by)- [Implementation details](#implementation-details)- [Configuration](#configuration)
      - [Configuration options](#configuration-options)- [Limitations](#limitations)- [Kerberos support](#kerberos-support)- [HDFS Namenode HA support](#namenode-ha)- [Virtual columns](#virtual-columns)- [Storage settings](#storage-settings)

Was this page helpful?