A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://hadoop.apache.org/docs/r1.2.1/api/org/apache/hadoop/security/Credentials.html below:

Credentials (Hadoop 1.2.1 API)

org.apache.hadoop.security
Class Credentials
java.lang.Object
  org.apache.hadoop.security.Credentials
All Implemented Interfaces:
Writable
public class Credentials
extends Object
implements Writable

A class that provides the facilities of reading and writing secret keys and Tokens.

    Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait   Credentials
public Credentials()
getSecretKey
public byte[] getSecretKey(Text alias)
Returns the key bytes for the alias
Parameters:
alias - the alias for the key
Returns:
key for this alias
getToken
public Token<? extends TokenIdentifier> getToken(Text alias)
Returns the Token object for the alias
Parameters:
alias - the alias for the Token
Returns:
token for this alias
addToken
public void addToken(Text alias,
                     Token<? extends TokenIdentifier> t)
Add a token in the storage (in memory)
Parameters:
alias - the alias for the key
t - the token object
getAllTokens
public Collection<Token<? extends TokenIdentifier>> getAllTokens()
Return all the tokens in the in-memory map
numberOfTokens
public int numberOfTokens()
Returns:
number of Tokens in the in-memory map
numberOfSecretKeys
public int numberOfSecretKeys()
Returns:
number of keys in the in-memory map
addSecretKey
public void addSecretKey(Text alias,
                         byte[] key)
Set the key for an alias
Parameters:
alias - the alias for the key
key - the key bytes
readTokenStorageFile
public static Credentials readTokenStorageFile(Path filename,
                                               Configuration conf)
                                        throws IOException
Convenience method for reading a token storage file, and loading the Tokens therein in the passed UGI
Parameters:
filename -
conf -
Throws:
IOException
readTokenStorageStream
public void readTokenStorageStream(DataInputStream in)
                            throws IOException
Convenience method for reading a token storage file directly from a datainputstream
Throws:
IOException
writeTokenStorageToStream
public void writeTokenStorageToStream(DataOutputStream os)
                               throws IOException
Throws:
IOException
writeTokenStorageFile
public void writeTokenStorageFile(Path filename,
                                  Configuration conf)
                           throws IOException
Throws:
IOException
write
public void write(DataOutput out)
           throws IOException
Stores all the keys to DataOutput
Specified by:
write in interface Writable
Parameters:
out -
Throws:
IOException
readFields
public void readFields(DataInput in)
                throws IOException
Loads all the keys
Specified by:
readFields in interface Writable
Parameters:
in -
Throws:
IOException
addAll
public void addAll(Credentials other)
Copy all of the credentials from one credential object into another.
Parameters:
other - the credentials to copy
Copyright © 2009 The Apache Software Foundation

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4