congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
FSEditLogOp$Reader.readOp
Code IndexAdd Tabnine to your IDE (free)

How to use
readOp
method
in
org.apache.hadoop.hdfs.server.namenode.FSEditLogOp$Reader

Best Java code snippets using org.apache.hadoop.hdfs.server.namenode.FSEditLogOp$Reader.readOp (Showing top 12 results out of 315)

origin: org.apache.hadoop/hadoop-hdfs

@Override
protected FSEditLogOp nextValidOp() {
 try {
  return reader.readOp(true);
 } catch (IOException e) {
  throw new RuntimeException("got unexpected IOException " + e, e);
 }
}
origin: org.apache.hadoop/hadoop-hdfs

@Override
protected FSEditLogOp nextOp() throws IOException {
 Preconditions.checkState(reader != null,
   "Must call setBytes() before readOp()");
 return reader.readOp(false);
}
origin: org.apache.hadoop/hadoop-hdfs

 private void dumpRemainingEditLogs() {
  byte[] buf = this.getData();
  byte[] remainingRawEdits = Arrays.copyOfRange(buf, 0, this.size());
  ByteArrayInputStream bis = new ByteArrayInputStream(remainingRawEdits);
  DataInputStream dis = new DataInputStream(bis);
  FSEditLogLoader.PositionTrackingInputStream tracker =
    new FSEditLogLoader.PositionTrackingInputStream(bis);
  FSEditLogOp.Reader reader = FSEditLogOp.Reader.create(dis, tracker,
    NameNodeLayoutVersion.CURRENT_LAYOUT_VERSION);
  FSEditLogOp op;
  LOG.warn("The edits buffer is " + size() + " bytes long with " + numTxns +
    " unflushed transactions. " +
    "Below is the list of unflushed transactions:");
  int numTransactions = 0;
  try {
   while ((op = reader.readOp(false)) != null) {
    LOG.warn("Unflushed op [" + numTransactions + "]: " + op);
    numTransactions++;
   }
  } catch (IOException ioe) {
   // If any exceptions, print raw bytes and stop.
   LOG.warn("Unable to dump remaining ops. Remaining raw bytes: " +
     Hex.encodeHexString(remainingRawEdits), ioe);
  }
 }
}
origin: ch.cern.hadoop/hadoop-hdfs

 return nextOpImpl(skipBrokenEdits);
case OPEN:
 op = reader.readOp(skipBrokenEdits);
 if ((op != null) && (op.hasTransactionId())) {
  long txId = op.getTransactionId();
origin: io.prestosql.hadoop/hadoop-apache

 return nextOpImpl(skipBrokenEdits);
case OPEN:
 op = reader.readOp(skipBrokenEdits);
 if ((op != null) && (op.hasTransactionId())) {
  long txId = op.getTransactionId();
origin: com.facebook.hadoop/hadoop-core

@Override
public FSEditLogOp readOp() throws IOException {
 return reader.readOp();
}
origin: ch.cern.hadoop/hadoop-hdfs

@Override
protected FSEditLogOp nextOp() throws IOException {
 return reader.readOp(false);
}
origin: ch.cern.hadoop/hadoop-hdfs

@Override
protected FSEditLogOp nextOp() throws IOException {
 Preconditions.checkState(reader != null,
   "Must call setBytes() before readOp()");
 return reader.readOp(false);
}
origin: ch.cern.hadoop/hadoop-hdfs

@Override
protected FSEditLogOp nextValidOp() {
 try {
  return reader.readOp(true);
 } catch (IOException e) {
  throw new RuntimeException("got unexpected IOException " + e, e);
 }
}
origin: io.prestosql.hadoop/hadoop-apache

@Override
protected FSEditLogOp nextValidOp() {
 try {
  return reader.readOp(true);
 } catch (IOException e) {
  throw new RuntimeException("got unexpected IOException " + e, e);
 }
}
origin: io.prestosql.hadoop/hadoop-apache

@Override
protected FSEditLogOp nextOp() throws IOException {
 Preconditions.checkState(reader != null,
   "Must call setBytes() before readOp()");
 return reader.readOp(false);
}
origin: org.apache.hadoop/hadoop-hdfs

 return nextOpImpl(skipBrokenEdits);
case OPEN:
 op = reader.readOp(skipBrokenEdits);
 if ((op != null) && (op.hasTransactionId())) {
  long txId = op.getTransactionId();
org.apache.hadoop.hdfs.server.namenodeFSEditLogOp$ReaderreadOp

Javadoc

Read an operation from the input stream. Note that the objects returned from this method may be re-used by future calls to the same method.

Popular methods of FSEditLogOp$Reader

  • <init>
    Construct the reader
  • setMaxOpSize
  • decodeOp
    Read an opcode from the input stream.
  • scanOp
    Similar to decodeOp(), but we only retrieve the transaction ID of the Op rather than reading it. If
  • validateChecksum
    Validate a transaction's checksum
  • verifyTerminator
  • create
  • getChecksum

Popular in Java

  • Updating database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • notifyDataSetChanged (ArrayAdapter)
  • setRequestProperty (URLConnection)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Permission (java.security)
    Legacy security code; do not use.
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JTextField (javax.swing)
  • 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