Tabnine Logo
EditsDoubleBuffer.getReadyBuf
Code IndexAdd Tabnine to your IDE (free)

How to use
getReadyBuf
method
in
org.apache.hadoop.hdfs.server.namenode.EditsDoubleBuffer

Best Java code snippets using org.apache.hadoop.hdfs.server.namenode.EditsDoubleBuffer.getReadyBuf (Showing top 3 results out of 315)

origin: org.apache.hadoop/hadoop-hdfs

private void preallocate() throws IOException {
 long position = fc.position();
 long size = fc.size();
 int bufSize = doubleBuf.getReadyBuf().getLength();
 long need = bufSize - (size - position);
 if (need <= 0) {
  return;
 }
 long oldSize = size;
 long total = 0;
 long fillCapacity = fill.capacity();
 while (need > 0) {
  fill.position(0);
  IOUtils.writeFully(fc, fill, size);
  need -= fillCapacity;
  size += fillCapacity;
  total += fillCapacity;
 }
 if(LOG.isDebugEnabled()) {
  LOG.debug("Preallocated " + total + " bytes at the end of " +
      "the edit log (offset " + oldSize + ")");
 }
}
origin: ch.cern.hadoop/hadoop-hdfs

private void preallocate() throws IOException {
 long position = fc.position();
 long size = fc.size();
 int bufSize = doubleBuf.getReadyBuf().getLength();
 long need = bufSize - (size - position);
 if (need <= 0) {
  return;
 }
 long oldSize = size;
 long total = 0;
 long fillCapacity = fill.capacity();
 while (need > 0) {
  fill.position(0);
  IOUtils.writeFully(fc, fill, size);
  need -= fillCapacity;
  size += fillCapacity;
  total += fillCapacity;
 }
 if(LOG.isDebugEnabled()) {
  LOG.debug("Preallocated " + total + " bytes at the end of " +
      "the edit log (offset " + oldSize + ")");
 }
}
origin: io.prestosql.hadoop/hadoop-apache

private void preallocate() throws IOException {
 long position = fc.position();
 long size = fc.size();
 int bufSize = doubleBuf.getReadyBuf().getLength();
 long need = bufSize - (size - position);
 if (need <= 0) {
  return;
 }
 long oldSize = size;
 long total = 0;
 long fillCapacity = fill.capacity();
 while (need > 0) {
  fill.position(0);
  IOUtils.writeFully(fc, fill, size);
  need -= fillCapacity;
  size += fillCapacity;
  total += fillCapacity;
 }
 if(LOG.isDebugEnabled()) {
  LOG.debug("Preallocated " + total + " bytes at the end of " +
      "the edit log (offset " + oldSize + ")");
 }
}
org.apache.hadoop.hdfs.server.namenodeEditsDoubleBuffergetReadyBuf

Popular methods of EditsDoubleBuffer

  • <init>
  • close
  • countBufferedBytes
  • flushTo
    Writes the content of the "ready" buffer to the given output stream, and resets it. Does not swap an
  • isFlushed
  • setReadyToFlush
  • getCurrentBuf
  • shouldForceSync
  • writeOp
  • writeRaw
  • countReadyBytes
  • countReadyTxns
  • countReadyBytes,
  • countReadyTxns,
  • getFirstReadyTxId

Popular in Java

  • Making http requests using okhttp
  • compareTo (BigDecimal)
  • onRequestPermissionsResult (Fragment)
  • onCreateOptionsMenu (Activity)
  • Kernel (java.awt.image)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Permission (java.security)
    Legacy security code; do not use.
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top Vim plugins
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