Skip to content

v2.9.0

Choose a tag to compare

@github-actions github-actions released this 03 Dec 00:56
· 7 commits to master since this release
fff4e2e

v2.9.0

This release adds support for HDFS encryption zones (transparent data
encryption), opt-in write-pipeline recovery, and HADOOP_USER_NAME, along
with delegation-token and Kerberos fixes.

Highlights

Encryption zones (KMS-backed TDE)

Files inside an HDFS encryption zone can now be read, written and appended
transparently (#281):

  • When the namenode reports a file's FileEncryptionInfo, the client fetches
    the encrypted data encryption key from the KMS named by the cluster's
    dfs.encryption.key.provider.uri, unwraps it, and applies AES-CTR as data
    moves in either direction.
  • Reading, writing, appending, seeking and the CLI (cat, put, get) work
    unchanged on encrypted files. CreateFile negotiates the ENCRYPTION_ZONES
    crypto protocol version.
  • KMS requests authenticate via SPNEGO when a KerberosClient is configured,
    or use user.name on simple-auth clusters. Multiple KMS hosts in the
    provider URI are supported.
  • Only the AES/CTR/NoPadding cipher suite is supported.

Write pipeline recovery (opt-in)

ClientOptions.DatanodeRecovery enables best-effort recovery when a datanode
dies mid-write (#368): the failed
node is dropped from the pipeline, the client reconnects to the remaining
replicas with the streaming-recovery handshake, replays unacknowledged
packets, and continues writing. Recovery is attempted once per remaining
pipeline configuration; when the pipeline is exhausted, the writer fails with
ErrWritePipelineFailed as before.

The default behavior is unchanged: Close fails with ErrWritePipelineFailed
instead of completing a truncated file, and Abandon drops the partially
written block.

HADOOP_USER_NAME

hdfs.New — and therefore the hdfs CLI — now honors HADOOP_USER_NAME under
simple authentication, matching the Java client. This makes it possible to act
as another user (for example the superuser) without changing the local
account. Kerberos and delegation-token paths are unaffected.

Delegation tokens from the public API

Token, Credentials and HDFSDelegationTokenKind are now exported from the
root package as aliases of the internal types, and LoadDelegationTokenFile
loads a Hadoop token file
(#367). Library users can name and
construct tokens without importing internal/security, and
HADOOP_TOKEN_FILE_LOCATION handling now goes through the public loader.

Bug fixes

  • rpc: when a namenode is configured by IP and the Kerberos SPN contains
    the _HOST wildcard, resolve the IP with a forward-confirmed reverse DNS
    lookup before building the SPN, matching Hadoop's behavior
    (#369).
  • transfer: fix connection/handler mispairing in the fault-injection test
    harness.
  • ci: use the JCE AES-CTR codec on runners without a compatible JNI
    OpenSSL, and exercise encrypted zones in the integration matrix.

Documentation and project

  • README documents encryption zones, pipeline recovery/DatanodeRecovery,
    and HADOOP_USER_NAME, with clearer install, platform and compatibility
    guidance.
  • New CONTRIBUTING.md, SECURITY.md, AGENTS.md, and issue/PR templates
    (#370).
  • Package documentation notes the canonical repository while keeping the
    github.com/colinmarc/hdfs/v2 module path.

Upgrade notes

  • github.com/pkg/errors is now correctly listed as a direct dependency.
  • No public API removals or signatures change; existing clients keep working.