Tabnine Logo
Mapper$Context.getCredentials
Code IndexAdd Tabnine to your IDE (free)

How to use
getCredentials
method
in
org.apache.hadoop.mapreduce.Mapper$Context

Best Java code snippets using org.apache.hadoop.mapreduce.Mapper$Context.getCredentials (Showing top 4 results out of 315)

origin: org.apache.hadoop/hadoop-mapred-test

throws IOException, InterruptedException {
 Credentials ts = context.getCredentials();
 Collection<Token<? extends TokenIdentifier>> dts = ts.getAllTokens();
origin: org.apache.hadoop/hadoop-mapred-test

 /**
  * attempts to access tokenCache as from client
  */
 @Override
 public void map(IntWritable key, IntWritable value, Context context)
 throws IOException, InterruptedException {
  // get token storage and a key
  Credentials ts = context.getCredentials();
  byte[] key1 = ts.getSecretKey(new Text("alias1"));
  Collection<Token<? extends TokenIdentifier>> dts = ts.getAllTokens();
  int dts_size = 0;
  if(dts != null)
   dts_size = dts.size();
  
  
  if(dts_size != 2) { // one job token and one delegation token
   throw new RuntimeException("tokens are not available"); // fail the test
  }
  
  
  if(key1 == null || ts == null || ts.numberOfSecretKeys() != NUM_OF_KEYS) {
   throw new RuntimeException("secret keys are not available"); // fail the test
  } 
  super.map(key, value, context);
 }
}
origin: ch.cern.hadoop/hadoop-mapreduce-client-jobclient

throws IOException, InterruptedException {
 final Credentials contextCredentials = context.getCredentials();
origin: ch.cern.hadoop/hadoop-mapreduce-client-jobclient

protected void setup(Context context) 
throws IOException, InterruptedException {
 ts = context.getCredentials();
}
org.apache.hadoop.mapreduceMapper$ContextgetCredentials

Popular methods of Mapper$Context

  • write
  • getConfiguration
  • getCounter
  • getInputSplit
  • progress
  • setStatus
  • getTaskAttemptID
  • nextKeyValue
  • getCurrentValue
  • getCurrentKey
  • getNumReduceTasks
  • getJobID
  • getNumReduceTasks,
  • getJobID,
  • getInputFormatClass,
  • getLocalCacheFiles,
  • getOutputCommitter,
  • getLocalCacheArchives,
  • getStatus,
  • getCacheArchives,
  • getCacheFiles

Popular in Java

  • Updating database using SQL prepared statement
  • getExternalFilesDir (Context)
  • setScale (BigDecimal)
  • getSupportFragmentManager (FragmentActivity)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now