public final class DockerClientConfigHandler
extends java.lang.Object
FileSystem.Token and Credentials objects.ContainerLaunchContext as a
ByteBuffer, extract the Credentials.| Modifier and Type | Method | Description |
|---|---|---|
static org.apache.hadoop.security.Credentials |
getCredentialsFromTokensByteBuffer(java.nio.ByteBuffer tokens) |
Convert the Token ByteBuffer to the appropriate Credentials object.
|
static org.apache.hadoop.security.Credentials |
readCredentialsFromConfigFile(org.apache.hadoop.fs.Path configFile,
org.apache.hadoop.conf.Configuration conf,
java.lang.String applicationId) |
Read the Docker client configuration and extract the auth tokens into
Credentials.
|
static boolean |
writeDockerCredentialsToPath(java.io.File outConfigFile,
org.apache.hadoop.security.Credentials credentials) |
Extract the Docker related tokens from the Credentials and write the Docker
client configuration to the supplied File.
|
public static org.apache.hadoop.security.Credentials readCredentialsFromConfigFile(org.apache.hadoop.fs.Path configFile,
org.apache.hadoop.conf.Configuration conf,
java.lang.String applicationId)
throws java.io.IOException
configFile - the Path to the Docker client configuration.conf - the Configuration object, needed by the FileSystem.applicationId - the application ID to associate the Credentials with.java.io.IOException - if the file can not be read.public static org.apache.hadoop.security.Credentials getCredentialsFromTokensByteBuffer(java.nio.ByteBuffer tokens)
throws java.io.IOException
tokens - the Tokens from the ContainerLaunchContext.java.io.IOException - io error occur.public static boolean writeDockerCredentialsToPath(java.io.File outConfigFile,
org.apache.hadoop.security.Credentials credentials)
throws java.io.IOException
outConfigFile - the File to write the Docker client configuration to.credentials - the populated Credentials object.java.io.IOException - if the write fails.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.