Repository navigation
v2.9.0
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.CreateFilenegotiates theENCRYPTION_ZONES
crypto protocol version. - KMS requests authenticate via SPNEGO when a
KerberosClientis configured,
or useuser.nameon simple-auth clusters. Multiple KMS hosts in the
provider URI are supported. - Only the
AES/CTR/NoPaddingcipher 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_HOSTwildcard, 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,
andHADOOP_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/v2module path.
Upgrade notes
github.com/pkg/errorsis now correctly listed as a direct dependency.- No public API removals or signatures change; existing clients keep working.