Codota Logo
Mapper$Context.getInputFormatClass
Code IndexAdd Codota to your IDE (free)

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

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

  • Common ways to obtain Mapper$Context
private void myMethod () {
Mapper$Context m =
  • Codota IconWrappedMapper wrappedMapper;new Context(wrappedMapper)
  • Codota IconMockito mockito;mockito.mock(Mapper.Context.class)
  • Smart code suggestions by Codota
}
origin: com.github.jiayuhan-it/hadoop-mapreduce-client-core

public void setup(Context context) 
  throws IOException, InterruptedException {
 Configuration conf = context.getConfiguration();
 this.fieldSeparator = 
  conf.get(FieldSelectionHelper.DATA_FIELD_SEPERATOR, "\t");
 this.mapOutputKeyValueSpec = 
  conf.get(FieldSelectionHelper.MAP_OUTPUT_KEY_VALUE_SPEC, "0-:");
 try {
  this.ignoreInputKey = TextInputFormat.class.getCanonicalName().equals(
   context.getInputFormatClass().getCanonicalName());
 } catch (ClassNotFoundException e) {
  throw new IOException("Input format class not found", e);
 }
 allMapValueFieldsFrom = FieldSelectionHelper.parseOutputKeyValueSpec(
  mapOutputKeyValueSpec, mapOutputKeyFieldList, mapOutputValueFieldList);
 LOG.info(FieldSelectionHelper.specToString(fieldSeparator,
  mapOutputKeyValueSpec, allMapValueFieldsFrom, mapOutputKeyFieldList,
  mapOutputValueFieldList) + "\nignoreInputKey:" + ignoreInputKey);
}
origin: io.hops/hadoop-mapreduce-client-core

public void setup(Context context) 
  throws IOException, InterruptedException {
 Configuration conf = context.getConfiguration();
 this.fieldSeparator = 
  conf.get(FieldSelectionHelper.DATA_FIELD_SEPERATOR, "\t");
 this.mapOutputKeyValueSpec = 
  conf.get(FieldSelectionHelper.MAP_OUTPUT_KEY_VALUE_SPEC, "0-:");
 try {
  this.ignoreInputKey = TextInputFormat.class.getCanonicalName().equals(
   context.getInputFormatClass().getCanonicalName());
 } catch (ClassNotFoundException e) {
  throw new IOException("Input format class not found", e);
 }
 allMapValueFieldsFrom = FieldSelectionHelper.parseOutputKeyValueSpec(
  mapOutputKeyValueSpec, mapOutputKeyFieldList, mapOutputValueFieldList);
 LOG.info(FieldSelectionHelper.specToString(fieldSeparator,
  mapOutputKeyValueSpec, allMapValueFieldsFrom, mapOutputKeyFieldList,
  mapOutputValueFieldList) + "\nignoreInputKey:" + ignoreInputKey);
}
origin: ch.cern.hadoop/hadoop-mapreduce-client-core

public void setup(Context context) 
  throws IOException, InterruptedException {
 Configuration conf = context.getConfiguration();
 this.fieldSeparator = 
  conf.get(FieldSelectionHelper.DATA_FIELD_SEPERATOR, "\t");
 this.mapOutputKeyValueSpec = 
  conf.get(FieldSelectionHelper.MAP_OUTPUT_KEY_VALUE_SPEC, "0-:");
 try {
  this.ignoreInputKey = TextInputFormat.class.getCanonicalName().equals(
   context.getInputFormatClass().getCanonicalName());
 } catch (ClassNotFoundException e) {
  throw new IOException("Input format class not found", e);
 }
 allMapValueFieldsFrom = FieldSelectionHelper.parseOutputKeyValueSpec(
  mapOutputKeyValueSpec, mapOutputKeyFieldList, mapOutputValueFieldList);
 LOG.info(FieldSelectionHelper.specToString(fieldSeparator,
  mapOutputKeyValueSpec, allMapValueFieldsFrom, mapOutputKeyFieldList,
  mapOutputValueFieldList) + "\nignoreInputKey:" + ignoreInputKey);
}
origin: cdapio/cdap

@Override
protected void setup(Context context) throws IOException, InterruptedException {
 // assert that the user gets FileInputSplit (as opposed to the MultiInputTaggedSplit) from the context
 Preconditions.checkArgument(context.getInputSplit() instanceof FileSplit);
 try {
  // assert that the user gets the TextInputFormat, as opposed to the MultiInputFormat from the context
  Preconditions.checkArgument(context.getInputFormatClass() == TextInputFormat.class);
 } catch (ClassNotFoundException e) {
  Throwables.propagate(e);
 }
}
origin: org.apache.hadoop/hadoop-mapred

public void setup(Context context) 
  throws IOException, InterruptedException {
 Configuration conf = context.getConfiguration();
 this.fieldSeparator = 
  conf.get(FieldSelectionHelper.DATA_FIELD_SEPERATOR, "\t");
 this.mapOutputKeyValueSpec = 
  conf.get(FieldSelectionHelper.MAP_OUTPUT_KEY_VALUE_SPEC, "0-:");
 try {
  this.ignoreInputKey = TextInputFormat.class.getCanonicalName().equals(
   context.getInputFormatClass().getCanonicalName());
 } catch (ClassNotFoundException e) {
  throw new IOException("Input format class not found", e);
 }
 allMapValueFieldsFrom = FieldSelectionHelper.parseOutputKeyValueSpec(
  mapOutputKeyValueSpec, mapOutputKeyFieldList, mapOutputValueFieldList);
 LOG.info(FieldSelectionHelper.specToString(fieldSeparator,
  mapOutputKeyValueSpec, allMapValueFieldsFrom, mapOutputKeyFieldList,
  mapOutputValueFieldList) + "\nignoreInputKey:" + ignoreInputKey);
}
origin: io.prestosql.hadoop/hadoop-apache

public void setup(Context context) 
  throws IOException, InterruptedException {
 Configuration conf = context.getConfiguration();
 this.fieldSeparator = 
  conf.get(FieldSelectionHelper.DATA_FIELD_SEPERATOR, "\t");
 this.mapOutputKeyValueSpec = 
  conf.get(FieldSelectionHelper.MAP_OUTPUT_KEY_VALUE_SPEC, "0-:");
 try {
  this.ignoreInputKey = TextInputFormat.class.getCanonicalName().equals(
   context.getInputFormatClass().getCanonicalName());
 } catch (ClassNotFoundException e) {
  throw new IOException("Input format class not found", e);
 }
 allMapValueFieldsFrom = FieldSelectionHelper.parseOutputKeyValueSpec(
  mapOutputKeyValueSpec, mapOutputKeyFieldList, mapOutputValueFieldList);
 LOG.info(FieldSelectionHelper.specToString(fieldSeparator,
  mapOutputKeyValueSpec, allMapValueFieldsFrom, mapOutputKeyFieldList,
  mapOutputValueFieldList) + "\nignoreInputKey:" + ignoreInputKey);
}
org.apache.hadoop.mapreduceMapper$ContextgetInputFormatClass

Popular methods of Mapper$Context

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

Popular in Java

  • Parsing JSON documents to java classes using gson
  • findViewById (Activity)
  • putExtra (Intent)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • DecimalFormat (java.text)
    DecimalFormat is a concrete subclass ofNumberFormat that formats decimal numbers. It has a variety o
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • JTable (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now