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

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

Best Java code snippets using org.apache.hadoop.mapreduce.Mapper$Context.setStatus (Showing top 20 results out of 369)

  • 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: apache/incubator-druid

 @Override
 protected void cleanup(
   Context context
 ) throws IOException
 {
  final String tmpDirLoc = context.getConfiguration().get(TMP_FILE_LOC_KEY);
  final File tmpDir = Paths.get(tmpDirLoc).toFile();
  FileUtils.deleteDirectory(tmpDir);
  context.progress();
  context.setStatus("Clean");
 }
}
origin: apache/hbase

context.setStatus("Emitting Put " + count);
origin: apache/incubator-druid

context.setStatus("DOWNLOADING");
context.progress();
final Path inPath = new Path(JobHelper.getURIFromSegment(segment));
context.getCounter(COUNTER_GROUP, COUNTER_LOADED).increment(inSize);
context.setStatus("CONVERTING");
context.progress();
final File outDir = new File(tmpDir, "out");
 context.setStatus("Validating");
 HadoopDruidConverterConfig.INDEX_IO.validateTwoSegments(inDir, outDir);
context.setStatus("Starting PUSH");
final Path baseOutputPath = new Path(config.getSegmentOutputPath());
final FileSystem outputFS = baseOutputPath.getFileSystem(context.getConfiguration());
);
context.progress();
context.setStatus("Finished PUSH");
final String finalSegmentString = HadoopDruidConverterConfig.jsonMapper.writeValueAsString(finalSegment);
context.getConfiguration().set(ConvertingOutputFormat.PUBLISHED_SEGMENT_KEY, finalSegmentString);
context.setStatus("Ready To Commit");
origin: apache/hbase

context.setStatus("Written " + i + "/" + recordsToWrite + " records");
context.progress();
origin: apache/hbase

  context.setStatus(String.format(statusMessage,
           StringUtils.humanReadableInt(totalBytesWritten),
           (totalBytesWritten/(float)inputFileSize) * 100.0f) +
context.setStatus(String.format(statusMessage,
         StringUtils.humanReadableInt(totalBytesWritten),
         (totalBytesWritten/(float)inputFileSize) * 100.0f) +
origin: apache/giraph

 @Override
 public void setStatus(String status) {
  workerContext.getContext().setStatus(status);
 }
}
origin: org.apache.hadoop/hadoop-distcp

private void updateContextStatus(long totalBytesRead, Mapper.Context context,
                 CopyListingFileStatus source2) {
 StringBuilder message = new StringBuilder(DistCpUtils.getFormatter()
       .format(totalBytesRead * 100.0f / source2.getLen()));
 message.append("% ")
     .append(description).append(" [")
     .append(DistCpUtils.getStringDescriptionFor(totalBytesRead))
     .append('/')
   .append(DistCpUtils.getStringDescriptionFor(source2.getLen()))
     .append(']');
 context.setStatus(message.toString());
}
origin: alexholmes/hadoop-book

 protected void processError(Context c, Throwable t, Text k, Text v) {
  log.error("Caught exception processing key[" + k + "], value[" + v + "]", t);
  c.getCounter(Counters.FAILED_RECORDS).increment(1);
  c.setStatus("Records with failures = " + (++failedRecords));
 }
}
origin: ch.cern.hadoop/hadoop-gridmix

@Override
public void map(LongWritable key, LongWritable value, Context context)
throws IOException, InterruptedException {
 context.setStatus("Sleeping... " + value.get() + " ms left");
 long now = System.currentTimeMillis();
 if (now < key.get()) {
  TimeUnit.MILLISECONDS.sleep(key.get() - now);
 }
}
origin: alexholmes/hadoop-book

 protected void processError(Context c, Throwable t, Text k, Text v) {
  log.error("Caught exception processing key[" + k + "], value[" + v + "]", t);
  c.getCounter(Counters.FAILED_RECORDS).increment(1);
  c.setStatus("Records with failures = " + (++failedRecords));
 }
}
origin: pl.edu.icm.coansys/coansys-io-output

@Override
protected void map(Text key, BytesWritable value, Context context)
    throws IOException, InterruptedException {
  PersonProtos.PersonWrapper dw = PersonProtos.PersonWrapper.parseFrom(ByteString
      .copyFrom(value.copyBytes()));
  context.setStatus("Processing doc with id: " + dw.getRowId());
  String rdfAsString = CoansysTransformers.CTF.getWriter(
      CoansysTransformersConstants.PERSON_PROTO_MODEL,
      CoansysTransformersConstants.RDF_N_TRIPLES).write(dw);
  context.write(getMapOutputKey(), new Text(rdfAsString));
}
origin: apache/hbase

output.setStatus("Count " + count);
origin: ch.cern.hadoop/hadoop-mapreduce-client-jobclient

 @Override
 protected void setup(Context context) throws IOException {
  context.setStatus(myStatus);
  assertEquals(myStatus, context.getStatus());
 }
}
origin: apache/hbase

@Override
protected void map(NullWritable key, NullWritable value, Context context) throws IOException,
  InterruptedException {
 String suffix = "/" + shortTaskId;
 int BLOCK_SIZE = (int) (recordsToWrite / 100);
 for (long i = 0; i < recordsToWrite;) {
  for (long idx = 0; idx < BLOCK_SIZE && i < recordsToWrite; idx++, i++) {
   int expIdx = rand.nextInt(BLOCK_SIZE) % VISIBILITY_EXPS_COUNT;
   String exp = VISIBILITY_EXPS[expIdx];
   byte[] row = Bytes.add(Bytes.toBytes(i), Bytes.toBytes(suffix), Bytes.toBytes(exp));
   Put p = new Put(row);
   p.addColumn(TEST_FAMILY, TEST_QUALIFIER, HConstants.EMPTY_BYTE_ARRAY);
   p.setCellVisibility(new CellVisibility(exp));
   getCounter(expIdx).increment(1);
   mutator.mutate(p);
   if (i % 100 == 0) {
    context.setStatus("Written " + i + "/" + recordsToWrite + " records");
    context.progress();
   }
  }
  // End of block, flush all of them before we start writing anything
  // pointing to these!
  mutator.flush();
 }
}
origin: com.aliyun.hbase/alihbase-mapreduce

 @Override
 public void setStatus(String msg) {
   context.setStatus(msg);
 }
};
origin: apache/hbase

 @Override
 public void setStatus(String msg) {
   context.setStatus(msg);
 }
};
origin: io.druid/druid-indexing-hadoop

 @Override
 protected void cleanup(
   Context context
 ) throws IOException, InterruptedException
 {
  final String tmpDirLoc = context.getConfiguration().get(TMP_FILE_LOC_KEY);
  final File tmpDir = Paths.get(tmpDirLoc).toFile();
  FileUtils.deleteDirectory(tmpDir);
  context.progress();
  context.setStatus("Clean");
 }
}
origin: apache/hbase

 @Override
 public void setStatus(String msg) {
   context.setStatus(msg);
 }
};
origin: uk.bl.wa.discovery/warc-hadoop-recordreaders

@Override
protected void cleanup(Mapper<Text, Text, Text, Text>.Context context)
    throws IOException, InterruptedException {
  super.cleanup(context);
  tcs.close();
  context.setStatus("Seen " + tcs.getTotalRecords() + " records...");
}
origin: apache/giraph

 @Override
 public void setStatus(String status) {
  worker.getContext().setStatus(status);
 }
}
org.apache.hadoop.mapreduceMapper$ContextsetStatus

Popular methods of Mapper$Context

  • write
  • getConfiguration
  • getCounter
  • getInputSplit
  • progress
  • getTaskAttemptID
  • nextKeyValue
  • getCurrentValue
  • getCurrentKey
  • getNumReduceTasks
  • getJobID
  • getInputFormatClass
  • getJobID,
  • getInputFormatClass,
  • 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