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

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

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

origin: org.apache.hadoop/hadoop-hdfs

@Override
public void close() throws IOException {
 if (buf != null) {
  buf.close();
  buf = null;
 }
}
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: org.apache.hadoop/hadoop-hdfs

doubleBuf.close();
doubleBuf = null;
origin: ch.cern.hadoop/hadoop-hdfs

@Override
public void close() throws IOException {
 if (buf != null) {
  buf.close();
  buf = null;
 }
}
origin: io.prestosql.hadoop/hadoop-apache

@Override
public void close() throws IOException {
 if (buf != null) {
  buf.close();
  buf = 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

@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

@Override
public void close() throws IOException {
 if (fp == null) {
  throw new IOException("Trying to use aborted output stream");
 }
 try {
  // close should have been called after all pending transactions
  // have been flushed & synced.
  // if already closed, just skip
  if (doubleBuf != null) {
   doubleBuf.close();
  }
  
  // remove the last INVALID marker from transaction log.
  if (fc != null && fc.isOpen()) {
   fc.truncate(fc.position());
   fc.close();
  }
  if (fp != null) {
   fp.close();
  }
 } finally {
  IOUtils.cleanup(FSNamesystem.LOG, fc, fp);
  doubleBuf = null;
  fc = null;
  fp = null;
 }
}

origin: ch.cern.hadoop/hadoop-hdfs

doubleBuf.close();
doubleBuf = null;
origin: io.prestosql.hadoop/hadoop-apache

doubleBuf.close();
doubleBuf = null;
origin: ch.cern.hadoop/hadoop-hdfs

 @Test
 public void shouldFailToCloseWhenUnflushed() throws IOException {
  EditsDoubleBuffer buf = new EditsDoubleBuffer(1024);
  buf.writeRaw(new byte[1], 0, 1);
  try {
   buf.close();
   fail("Did not fail to close with unflushed data");
  } catch (IOException ioe) {
   if (!ioe.toString().contains("still to be flushed")) {
    throw ioe;
   }
  }
 }
}
org.apache.hadoop.hdfs.server.namenodeEditsDoubleBufferclose

Popular methods of EditsDoubleBuffer

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

Popular in Java

  • Making http post requests using okhttp
  • getExternalFilesDir (Context)
  • setScale (BigDecimal)
  • compareTo (BigDecimal)
  • String (java.lang)
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • JButton (javax.swing)
  • JPanel (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Best plugins for Eclipse
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