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

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

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

origin: org.apache.hadoop/hadoop-hdfs

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

 reader = FSEditLogOp.Reader.create(dataIn, tracker, logVersion);
 reader.setMaxOpSize(maxOpSize);
 state = State.OPEN;
} finally {
origin: org.apache.hadoop/hadoop-hdfs

while (true) {
 try {
  return decodeOp();
 } catch (IOException e) {
  in.reset();
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: io.prestosql.hadoop/hadoop-apache

while (true) {
 try {
  return decodeOp();
 } catch (IOException e) {
  in.reset();
origin: ch.cern.hadoop/hadoop-hdfs

 verifyTerminator();
 return null;
validateChecksum(in, checksum, op.txid);
return op;
origin: ch.cern.hadoop/hadoop-hdfs

while (true) {
 try {
  return decodeOp();
 } catch (IOException e) {
  in.reset();
origin: io.prestosql.hadoop/hadoop-apache

 verifyTerminator();
 return null;
validateChecksum(in, checksum, op.txid);
return op;
origin: com.facebook.hadoop/hadoop-core

if (checksum != null)
 readChecksum = checksum.getValue();
validateChecksum(in, checksum, op.txid);
return op;
origin: ch.cern.hadoop/hadoop-hdfs

 reader = new FSEditLogOp.Reader(dataIn, tracker, logVersion);
 reader.setMaxOpSize(maxOpSize);
 state = State.OPEN;
} finally {
origin: io.prestosql.hadoop/hadoop-apache

 verifyTerminator();
 return HdfsConstants.INVALID_TXID;
FSEditLogOp op = decodeOp();
return op == null ? HdfsConstants.INVALID_TXID : op.getTransactionId();
origin: io.prestosql.hadoop/hadoop-apache

 reader = new FSEditLogOp.Reader(dataIn, tracker, logVersion);
 reader.setMaxOpSize(maxOpSize);
 state = State.OPEN;
} finally {
origin: ch.cern.hadoop/hadoop-hdfs

 verifyTerminator();
 return HdfsConstants.INVALID_TXID;
FSEditLogOp op = decodeOp();
return op == null ? HdfsConstants.INVALID_TXID : op.getTransactionId();
origin: com.facebook.hadoop/hadoop-core

/**
 * Open an EditLogInputStream for the given file.
 * @param name filename to open
 * @param firstTxId first transaction found in file
 * @param lastTxId last transaction id found in file
 * @throws LogHeaderCorruptException if the header is either missing or
 *         appears to be corrupt/truncated
 * @throws IOException if an actual IO error occurs while reading the
 *         header
 */
EditLogFileInputStream(File name, long firstTxId, long lastTxId)
  throws LogHeaderCorruptException, IOException {
 file = name;
 rp = new RandomAccessFile(file, "r");    
 fStream = new FileInputStream(rp.getFD());
 fc = rp.getChannel();
 BufferedInputStream bin = new BufferedInputStream(fStream);  
 tracker = new FSEditLogLoader.PositionTrackingInputStream(bin);  
 DataInputStream in = new DataInputStream(tracker);
 try {
  logVersion = readLogVersion(in);
 } catch (EOFException eofe) {
  throw new LogHeaderCorruptException("No header found in log");
 }
 reader = new FSEditLogOp.Reader(in, logVersion);
 this.firstTxId = firstTxId;
 this.lastTxId = lastTxId;
}
origin: com.facebook.hadoop/hadoop-core

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

@Override
public void setMaxOpSize(int maxOpSize) {
 reader.setMaxOpSize(maxOpSize);
}
origin: ch.cern.hadoop/hadoop-hdfs

@Override
protected FSEditLogOp nextOp() throws IOException {
 return reader.readOp(false);
}
origin: io.prestosql.hadoop/hadoop-apache

@Override
public void setMaxOpSize(int maxOpSize) {
 reader.setMaxOpSize(maxOpSize);
}
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);
}
org.apache.hadoop.hdfs.server.namenodeFSEditLogOp$Reader

Javadoc

Class for reading editlog ops from a stream

Most used methods

  • 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
  • create
  • getChecksum

Popular in Java

  • Creating JSON documents from java classes using gson
  • putExtra (Intent)
  • getResourceAsStream (ClassLoader)
  • getContentResolver (Context)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Best IntelliJ 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