public abstract class AbstractS3ATokenIdentifier
extends org.apache.hadoop.security.token.delegation.web.DelegationTokenIdentifier
/META-INF/services/org.apache.hadoop.security.token.TokenIdentifier
| Modifier and Type | Field and Description |
|---|---|
protected static int |
MAX_TEXT_LENGTH
The maximum string length supported for text fields.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractS3ATokenIdentifier(org.apache.hadoop.io.Text kind)
For subclasses to use in their own empty-constructors.
|
protected |
AbstractS3ATokenIdentifier(org.apache.hadoop.io.Text kind,
org.apache.hadoop.io.Text owner,
org.apache.hadoop.io.Text renewer,
org.apache.hadoop.io.Text realUser,
URI uri)
Constructor.
|
protected |
AbstractS3ATokenIdentifier(org.apache.hadoop.io.Text kind,
org.apache.hadoop.security.token.Token<AbstractS3ATokenIdentifier> token)
Build from a token.
|
protected |
AbstractS3ATokenIdentifier(org.apache.hadoop.io.Text kind,
URI uri,
org.apache.hadoop.io.Text owner,
org.apache.hadoop.io.Text renewer,
String origin,
EncryptionSecrets encryptionSecrets)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
createDefaultOriginMessage()
Create the default origin text message with local hostname and
timestamp.
|
boolean |
equals(Object o)
Equality check is on superclass and UUID only.
|
String |
getBucket() |
long |
getCreated() |
EncryptionSecrets |
getEncryptionSecrets()
Get the encryption secrets.
|
long |
getExpiryTime()
Return the expiry time in seconds since 1970-01-01.
|
String |
getOrigin() |
URI |
getUri() |
String |
getUuid()
Get the UUID of this token identifier.
|
int |
hashCode() |
void |
readFields(DataInput in)
Read state.
|
void |
setOrigin(String origin) |
String |
toString() |
void |
validate()
Validate the token by looking at its fields.
|
void |
write(DataOutput out)
Write state.
|
getKindgetIssueDate, getMasterKeyId, getMaxDate, getOwner, getRealUser, getRenewer, getSequenceNumber, getUser, isEqual, setIssueDate, setMasterKeyId, setMaxDate, setOwner, setRealUser, setRenewer, setSequenceNumber, toStringStableprotected static final int MAX_TEXT_LENGTH
protected AbstractS3ATokenIdentifier(org.apache.hadoop.io.Text kind,
URI uri,
org.apache.hadoop.io.Text owner,
org.apache.hadoop.io.Text renewer,
String origin,
EncryptionSecrets encryptionSecrets)
kind - token kind.uri - filesystem URI.owner - token owner.renewer - token renewer.origin - origin text for diagnostics.encryptionSecrets - encryption secrets to set.protected AbstractS3ATokenIdentifier(org.apache.hadoop.io.Text kind,
org.apache.hadoop.io.Text owner,
org.apache.hadoop.io.Text renewer,
org.apache.hadoop.io.Text realUser,
URI uri)
kind - token kind.owner - token ownerrenewer - token renewerrealUser - token real useruri - filesystem URI.protected AbstractS3ATokenIdentifier(org.apache.hadoop.io.Text kind,
org.apache.hadoop.security.token.Token<AbstractS3ATokenIdentifier> token)
throws IOException
kind - token kind.token - to to build fromIOException - failure to build the identifier.protected AbstractS3ATokenIdentifier(org.apache.hadoop.io.Text kind)
kind - token kind.public String getBucket()
public URI getUri()
public String getOrigin()
public void setOrigin(String origin)
public long getCreated()
public void write(DataOutput out) throws IOException
Writable.write(DataOutput).write in interface org.apache.hadoop.io.Writablewrite in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifierout - destinationIOException - failurepublic void readFields(DataInput in) throws DelegationTokenIOException, IOException
Writable.readFields(DataInput).
Note: this operation gets called in toString() operations on tokens, so
must either always succeed, or throw an IOException to trigger the
catch and downgrade. RuntimeExceptions (e.g. Preconditions checks) are
not to be used here for this reason.)readFields in interface org.apache.hadoop.io.WritablereadFields in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifierin - input streamDelegationTokenIOException - if the token binding is wrong.IOException - IO problems.public void validate()
throws IOException
IOException - on failure.public String toString()
toString in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifierpublic boolean equals(Object o)
equals in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifiero - other.public int hashCode()
hashCode in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifierpublic long getExpiryTime()
public String getUuid()
public EncryptionSecrets getEncryptionSecrets()
public static String createDefaultOriginMessage()
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.