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

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

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

origin: org.apache.hadoop/hadoop-hdfs

@Override // EditLogOutputStream
public void close() throws IOException {
 // close should have been called after all pending transactions 
 // have been flushed & synced.
 int size = doubleBuf.countBufferedBytes();
 if (size != 0) {
  throw new IOException("BackupEditStream has " + size +
            " records still to be flushed and cannot be closed.");
 } 
 RPC.stopProxy(backupNode); // stop the RPC threads
 doubleBuf.close();
 doubleBuf = null;
}
origin: com.facebook.hadoop/hadoop-core

/**
 * Return the size of the current edit log including buffered data.
 */
@Override
long length() throws IOException {
 // file size + size of both buffers
 return fc.size() + doubleBuf.countBufferedBytes();
}
origin: ch.cern.hadoop/hadoop-hdfs

@Override // EditLogOutputStream
public void close() throws IOException {
 // close should have been called after all pending transactions 
 // have been flushed & synced.
 int size = doubleBuf.countBufferedBytes();
 if (size != 0) {
  throw new IOException("BackupEditStream has " + size +
            " records still to be flushed and cannot be closed.");
 } 
 RPC.stopProxy(backupNode); // stop the RPC threads
 doubleBuf.close();
 doubleBuf = null;
}
origin: io.prestosql.hadoop/hadoop-apache

@Override // EditLogOutputStream
public void close() throws IOException {
 // close should have been called after all pending transactions 
 // have been flushed & synced.
 int size = doubleBuf.countBufferedBytes();
 if (size != 0) {
  throw new IOException("BackupEditStream has " + size +
            " records still to be flushed and cannot be closed.");
 } 
 RPC.stopProxy(backupNode); // stop the RPC threads
 doubleBuf.close();
 doubleBuf = null;
}
origin: ch.cern.hadoop/hadoop-hdfs

buf.writeRaw(data, 0, data.length);
assertEquals("Should count new data correctly",
  data.length, buf.countBufferedBytes());
  data.length, buf.countBufferedBytes());
assertFalse(buf.isFlushed());
assertEquals(data.length, outBuf.getLength());
assertTrue(buf.isFlushed());
assertEquals(0, buf.countBufferedBytes());
  data.length, buf.countBufferedBytes());
buf.setReadyToFlush();
buf.flushTo(outBuf);
assertEquals(0, buf.countBufferedBytes());
org.apache.hadoop.hdfs.server.namenodeEditsDoubleBuffercountBufferedBytes

Popular methods of EditsDoubleBuffer

  • <init>
  • close
  • 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
  • getFirstReadyTxId
  • countReadyTxns,
  • getFirstReadyTxId,
  • getReadyBuf

Popular in Java

  • Making http post requests using okhttp
  • setRequestProperty (URLConnection)
  • getExternalFilesDir (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Option (scala)
  • CodeWhisperer alternatives
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