Java Code Examples for org.apache.hadoop.hdfs.DFSConfigKeys#DFS_NAMENODE_MAX_OP_SIZE_DEFAULT

The following examples show how to use org.apache.hadoop.hdfs.DFSConfigKeys#DFS_NAMENODE_MAX_OP_SIZE_DEFAULT . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FSEditLogOp.java    From hadoop with Apache License 2.0 6 votes vote down vote up
/**
 * Construct the reader
 * @param in The stream to read from.
 * @param logVersion The version of the data coming from the stream.
 */
public Reader(DataInputStream in, StreamLimiter limiter, int logVersion) {
  this.logVersion = logVersion;
  if (NameNodeLayoutVersion.supports(
      LayoutVersion.Feature.EDITS_CHESKUM, logVersion)) {
    this.checksum = DataChecksum.newCrc32();
  } else {
    this.checksum = null;
  }
  // It is possible that the logVersion is actually a future layoutversion
  // during the rolling upgrade (e.g., the NN gets upgraded first). We
  // assume future layout will also support length of editlog op.
  this.supportEditLogLength = NameNodeLayoutVersion.supports(
      NameNodeLayoutVersion.Feature.EDITLOG_LENGTH, logVersion)
      || logVersion < NameNodeLayoutVersion.CURRENT_LAYOUT_VERSION;

  if (this.checksum != null) {
    this.in = new DataInputStream(
        new CheckedInputStream(in, this.checksum));
  } else {
    this.in = in;
  }
  this.limiter = limiter;
  this.cache = new OpInstanceCache();
  this.maxOpSize = DFSConfigKeys.DFS_NAMENODE_MAX_OP_SIZE_DEFAULT;
}
 
Example 2
Source File: FSEditLogOp.java    From big-c with Apache License 2.0 6 votes vote down vote up
/**
 * Construct the reader
 * @param in The stream to read from.
 * @param logVersion The version of the data coming from the stream.
 */
public Reader(DataInputStream in, StreamLimiter limiter, int logVersion) {
  this.logVersion = logVersion;
  if (NameNodeLayoutVersion.supports(
      LayoutVersion.Feature.EDITS_CHESKUM, logVersion)) {
    this.checksum = DataChecksum.newCrc32();
  } else {
    this.checksum = null;
  }
  // It is possible that the logVersion is actually a future layoutversion
  // during the rolling upgrade (e.g., the NN gets upgraded first). We
  // assume future layout will also support length of editlog op.
  this.supportEditLogLength = NameNodeLayoutVersion.supports(
      NameNodeLayoutVersion.Feature.EDITLOG_LENGTH, logVersion)
      || logVersion < NameNodeLayoutVersion.CURRENT_LAYOUT_VERSION;

  if (this.checksum != null) {
    this.in = new DataInputStream(
        new CheckedInputStream(in, this.checksum));
  } else {
    this.in = in;
  }
  this.limiter = limiter;
  this.cache = new OpInstanceCache();
  this.maxOpSize = DFSConfigKeys.DFS_NAMENODE_MAX_OP_SIZE_DEFAULT;
}
 
Example 3
Source File: EditLogFileInputStream.java    From hadoop with Apache License 2.0 5 votes vote down vote up
private EditLogFileInputStream(LogSource log,
    long firstTxId, long lastTxId,
    boolean isInProgress) {
    
  this.log = log;
  this.firstTxId = firstTxId;
  this.lastTxId = lastTxId;
  this.isInProgress = isInProgress;
  this.maxOpSize = DFSConfigKeys.DFS_NAMENODE_MAX_OP_SIZE_DEFAULT;
}
 
Example 4
Source File: EditLogFileInputStream.java    From big-c with Apache License 2.0 5 votes vote down vote up
private EditLogFileInputStream(LogSource log,
    long firstTxId, long lastTxId,
    boolean isInProgress) {
    
  this.log = log;
  this.firstTxId = firstTxId;
  this.lastTxId = lastTxId;
  this.isInProgress = isInProgress;
  this.maxOpSize = DFSConfigKeys.DFS_NAMENODE_MAX_OP_SIZE_DEFAULT;
}
 
Example 5
Source File: TestNameNodeRecovery.java    From hadoop with Apache License 2.0 4 votes vote down vote up
/**
 * Return the maximum opcode size we will use for input.
 */
public int getMaxOpSize() {
  return DFSConfigKeys.DFS_NAMENODE_MAX_OP_SIZE_DEFAULT;
}
 
Example 6
Source File: TestNameNodeRecovery.java    From big-c with Apache License 2.0 4 votes vote down vote up
/**
 * Return the maximum opcode size we will use for input.
 */
public int getMaxOpSize() {
  return DFSConfigKeys.DFS_NAMENODE_MAX_OP_SIZE_DEFAULT;
}