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

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

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

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: org.apache.hadoop/hadoop-hdfs

void setBytes(byte[] newBytes, int version) throws IOException {
 inner.setData(newBytes);
 tracker = new FSEditLogLoader.PositionTrackingInputStream(inner);
 in = new DataInputStream(tracker);
 this.version = version;
 reader = FSEditLogOp.Reader.create(in, tracker, version);
}
origin: org.apache.hadoop/hadoop-hdfs

reader = FSEditLogOp.Reader.create(dataIn, tracker, logVersion);
reader.setMaxOpSize(maxOpSize);
state = State.OPEN;
org.apache.hadoop.hdfs.server.namenodeFSEditLogOp$Readercreate

Popular methods of FSEditLogOp$Reader

  • readOp
    Read an operation from the input stream. Note that the objects returned from this method may be re-u
  • <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
  • getChecksum

Popular in Java

  • Finding current android device location
  • getSystemService (Context)
  • findViewById (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • From CI to AI: The AI layer in your organization
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