Codota Logo
FSEditLogOp$Reader
Code IndexAdd Codota 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)

  • Common ways to obtain FSEditLogOp$Reader
private void myMethod () {
FSEditLogOp$Reader f =
  • Codota IconDataInputStream in;StreamLimiter limiter;new FSEditLogOp.Reader(in, limiter, logVersion)
  • Smart code suggestions by Codota
}
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: org.apache.hadoop/hadoop-hdfs

@Override
protected long scanNextOp() throws IOException {
 Preconditions.checkState(state == State.OPEN);
 FSEditLogOp cachedNext = getCachedOp();
 return cachedNext == null ? reader.scanOp() : cachedNext.txid;
}
origin: ch.cern.hadoop/hadoop-hdfs

@Override
protected long scanNextOp() throws IOException {
 Preconditions.checkState(state == State.OPEN);
 FSEditLogOp cachedNext = getCachedOp();
 return cachedNext == null ? reader.scanOp() : cachedNext.txid;
}
origin: io.prestosql.hadoop/hadoop-apache

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

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

@Override
public void setMaxOpSize(int maxOpSize) {
 this.maxOpSize = maxOpSize;
 if (reader != null) {
  reader.setMaxOpSize(maxOpSize);
 }
}
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 long scanNextOp() throws IOException {
 Preconditions.checkState(state == State.OPEN);
 FSEditLogOp cachedNext = getCachedOp();
 return cachedNext == null ? reader.scanOp() : cachedNext.txid;
}
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: 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 {
 return reader.readOp(false);
}
origin: ch.cern.hadoop/hadoop-hdfs

@Override
public void setMaxOpSize(int maxOpSize) {
 reader.setMaxOpSize(maxOpSize);
}
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: com.facebook.hadoop/hadoop-core

@Override
public FSEditLogOp readOp() throws IOException {
 return reader.readOp();
}
origin: com.facebook.hadoop/hadoop-core

@Override
public void refresh(long position) throws IOException {
 fc.position(position);
 BufferedInputStream bin = new BufferedInputStream(fStream);
 tracker = new FSEditLogLoader.PositionTrackingInputStream(bin, position);    
 DataInputStream in = new DataInputStream(tracker); 
 reader = new FSEditLogOp.Reader(in, logVersion);
}

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: io.prestosql.hadoop/hadoop-apache

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

 verifyTerminator();
 return HdfsConstants.INVALID_TXID;
FSEditLogOp op = decodeOp();
return op == null ? HdfsConstants.INVALID_TXID : op.getTransactionId();
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

  • Parsing JSON documents to java classes using gson
  • onRequestPermissionsResult (Fragment)
  • addToBackStack (FragmentTransaction)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now