congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ProcedureWALFormat.readEntry
Code IndexAdd Tabnine to your IDE (free)

How to use
readEntry
method
in
org.apache.hadoop.hbase.procedure2.store.wal.ProcedureWALFormat

Best Java code snippets using org.apache.hadoop.hbase.procedure2.store.wal.ProcedureWALFormat.readEntry (Showing top 11 results out of 315)

origin: apache/hbase

public void processProcedureWALFile(ProcedureWALFile log) throws IOException {
 log.open();
 ProcedureWALHeader header = log.getHeader();
 printHeader(header);
 FSDataInputStream stream = log.getStream();
 try {
  boolean hasMore = true;
  while (hasMore) {
   ProcedureWALEntry entry = ProcedureWALFormat.readEntry(stream);
   if (entry == null) {
    out.println("No more entry, exiting with missing EOF");
    hasMore = false;
    break;
   }
   switch (entry.getType()) {
    case PROCEDURE_WAL_EOF:
     hasMore = false;
     break;
    default:
     printEntry(entry);
   }
  }
 } catch (IOException e) {
  out.println("got an exception while reading the procedure WAL " + e.getMessage());
 }
 finally {
  log.close();
 }
}
origin: apache/hbase

public static ProcedureWALTrailer readTrailer(FSDataInputStream stream, long startPos, long size)
  throws IOException {
 // Beginning of the Trailer Jump. 17 = 1 byte version + 8 byte magic + 8 byte offset
 long trailerPos = size - 17;
 if (trailerPos < startPos) {
  throw new InvalidWALDataException("Missing trailer: size=" + size + " startPos=" + startPos);
 }
 stream.seek(trailerPos);
 int version = stream.read();
 if (version != TRAILER_VERSION) {
  throw new InvalidWALDataException("Invalid Trailer version. got " + version +
    " expected " + TRAILER_VERSION);
 }
 long magic = StreamUtils.readLong(stream);
 if (magic != TRAILER_MAGIC) {
  throw new InvalidWALDataException("Invalid Trailer magic. got " + magic +
    " expected " + TRAILER_MAGIC);
 }
 long trailerOffset = StreamUtils.readLong(stream);
 stream.seek(trailerOffset);
 ProcedureWALEntry entry = readEntry(stream);
 if (entry.getType() != ProcedureWALEntry.Type.PROCEDURE_WAL_EOF) {
  throw new InvalidWALDataException("Invalid Trailer begin");
 }
 ProcedureWALTrailer trailer = ProcedureWALTrailer.newBuilder()
  .setVersion(version)
  .setTrackerPos(stream.getPos())
  .build();
 return trailer;
}
origin: apache/hbase

boolean hasMore = true;
while (hasMore) {
 ProcedureWALEntry entry = ProcedureWALFormat.readEntry(stream);
 if (entry == null) {
  LOG.warn("Nothing left to decode. Exiting with missing EOF, log={}", log);
origin: org.apache.hbase/hbase-procedure

public void processProcedureWALFile(ProcedureWALFile log) throws IOException {
 log.open();
 ProcedureWALHeader header = log.getHeader();
 printHeader(header);
 FSDataInputStream stream = log.getStream();
 try {
  boolean hasMore = true;
  while (hasMore) {
   ProcedureWALEntry entry = ProcedureWALFormat.readEntry(stream);
   if (entry == null) {
    out.println("No more entry, exiting with missing EOF");
    hasMore = false;
    break;
   }
   switch (entry.getType()) {
    case PROCEDURE_WAL_EOF:
     hasMore = false;
     break;
    default:
     printEntry(entry);
   }
  }
 } catch (IOException e) {
  out.println("got an exception while reading the procedure WAL " + e.getMessage());
 }
 finally {
  log.close();
 }
}
origin: com.aliyun.hbase/alihbase-procedure

public void processProcedureWALFile(ProcedureWALFile log) throws IOException {
 log.open();
 ProcedureWALHeader header = log.getHeader();
 printHeader(header);
 FSDataInputStream stream = log.getStream();
 try {
  boolean hasMore = true;
  while (hasMore) {
   ProcedureWALEntry entry = ProcedureWALFormat.readEntry(stream);
   if (entry == null) {
    out.println("No more entry, exiting with missing EOF");
    hasMore = false;
    break;
   }
   switch (entry.getType()) {
    case PROCEDURE_WAL_EOF:
     hasMore = false;
     break;
    default:
     printEntry(entry);
   }
  }
 } catch (IOException e) {
  out.println("got an exception while reading the procedure WAL " + e.getMessage());
 }
 finally {
  log.close();
 }
}
origin: com.aliyun.hbase/alihbase-procedure

public static ProcedureWALTrailer readTrailer(FSDataInputStream stream, long startPos, long size)
  throws IOException {
 // Beginning of the Trailer Jump. 17 = 1 byte version + 8 byte magic + 8 byte offset
 long trailerPos = size - 17;
 if (trailerPos < startPos) {
  throw new InvalidWALDataException("Missing trailer: size=" + size + " startPos=" + startPos);
 }
 stream.seek(trailerPos);
 int version = stream.read();
 if (version != TRAILER_VERSION) {
  throw new InvalidWALDataException("Invalid Trailer version. got " + version +
    " expected " + TRAILER_VERSION);
 }
 long magic = StreamUtils.readLong(stream);
 if (magic != TRAILER_MAGIC) {
  throw new InvalidWALDataException("Invalid Trailer magic. got " + magic +
    " expected " + TRAILER_MAGIC);
 }
 long trailerOffset = StreamUtils.readLong(stream);
 stream.seek(trailerOffset);
 ProcedureWALEntry entry = readEntry(stream);
 if (entry.getType() != ProcedureWALEntry.Type.PROCEDURE_WAL_EOF) {
  throw new InvalidWALDataException("Invalid Trailer begin");
 }
 ProcedureWALTrailer trailer = ProcedureWALTrailer.newBuilder()
  .setVersion(version)
  .setTrackerPos(stream.getPos())
  .build();
 return trailer;
}
origin: org.apache.hbase/hbase-procedure

public static ProcedureWALTrailer readTrailer(FSDataInputStream stream, long startPos, long size)
  throws IOException {
 // Beginning of the Trailer Jump. 17 = 1 byte version + 8 byte magic + 8 byte offset
 long trailerPos = size - 17;
 if (trailerPos < startPos) {
  throw new InvalidWALDataException("Missing trailer: size=" + size + " startPos=" + startPos);
 }
 stream.seek(trailerPos);
 int version = stream.read();
 if (version != TRAILER_VERSION) {
  throw new InvalidWALDataException("Invalid Trailer version. got " + version +
    " expected " + TRAILER_VERSION);
 }
 long magic = StreamUtils.readLong(stream);
 if (magic != TRAILER_MAGIC) {
  throw new InvalidWALDataException("Invalid Trailer magic. got " + magic +
    " expected " + TRAILER_MAGIC);
 }
 long trailerOffset = StreamUtils.readLong(stream);
 stream.seek(trailerOffset);
 ProcedureWALEntry entry = readEntry(stream);
 if (entry.getType() != ProcedureWALEntry.Type.PROCEDURE_WAL_EOF) {
  throw new InvalidWALDataException("Invalid Trailer begin");
 }
 ProcedureWALTrailer trailer = ProcedureWALTrailer.newBuilder()
  .setVersion(version)
  .setTrackerPos(stream.getPos())
  .build();
 return trailer;
}
origin: harbby/presto-connectors

public static ProcedureWALTrailer readTrailer(FSDataInputStream stream, long startPos, long size)
  throws IOException {
 long trailerPos = size - 17; // Beginning of the Trailer Jump
 if (trailerPos < startPos) {
  throw new InvalidWALDataException("Missing trailer: size=" + size + " startPos=" + startPos);
 }
 stream.seek(trailerPos);
 int version = stream.read();
 if (version != TRAILER_VERSION) {
  throw new InvalidWALDataException("Invalid Trailer version. got " + version +
    " expected " + TRAILER_VERSION);
 }
 long magic = StreamUtils.readLong(stream);
 if (magic != TRAILER_MAGIC) {
  throw new InvalidWALDataException("Invalid Trailer magic. got " + magic +
    " expected " + TRAILER_MAGIC);
 }
 long trailerOffset = StreamUtils.readLong(stream);
 stream.seek(trailerOffset);
 ProcedureWALEntry entry = readEntry(stream);
 if (entry.getType() != ProcedureWALEntry.Type.EOF) {
  throw new InvalidWALDataException("Invalid Trailer begin");
 }
 ProcedureWALTrailer trailer = ProcedureWALTrailer.newBuilder()
  .setVersion(version)
  .setTrackerPos(stream.getPos())
  .build();
 return trailer;
}
origin: org.apache.hbase/hbase-procedure

boolean hasMore = true;
while (hasMore) {
 ProcedureWALEntry entry = ProcedureWALFormat.readEntry(stream);
 if (entry == null) {
  LOG.warn("Nothing left to decode. Exiting with missing EOF, log={}", log);
origin: com.aliyun.hbase/alihbase-procedure

boolean hasMore = true;
while (hasMore) {
 ProcedureWALEntry entry = ProcedureWALFormat.readEntry(stream);
 if (entry == null) {
  LOG.warn("Nothing left to decode. Exiting with missing EOF, log=" + log);
origin: harbby/presto-connectors

boolean hasMore = true;
while (hasMore) {
 ProcedureWALEntry entry = ProcedureWALFormat.readEntry(stream);
 if (entry == null) {
  LOG.warn("nothing left to decode. exiting with missing EOF");
org.apache.hadoop.hbase.procedure2.store.walProcedureWALFormatreadEntry

Popular methods of ProcedureWALFormat

  • load
    Load all the procedures in these ProcedureWALFiles, and rebuild the given tracker if needed, i.e, th
  • readHeader
  • readTrailer
  • writeDelete
  • writeEntry
  • writeHeader
  • writeInsert
  • writeTrailer
  • writeUpdate

Popular in Java

  • Making http post requests using okhttp
  • getResourceAsStream (ClassLoader)
  • putExtra (Intent)
  • getSupportFragmentManager (FragmentActivity)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • JFrame (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now