Java 类org.apache.hadoop.hdfs.server.namenode.FSNamesystem.CompleteFileStatus 实例源码

项目:hadoop-EAR    文件:NameNode.java   
private boolean completeInternal(String src, String clientName, long fileLen,
    Block lastBlock) throws IOException {
  if (stateChangeLog.isDebugEnabled()) {
    stateChangeLog.debug("*DIR* NameNode.complete: " + src + " for " + clientName);
  }
  CompleteFileStatus returnCode = namesystem.completeFile(src, clientName,
      fileLen, lastBlock);
  if (returnCode == CompleteFileStatus.STILL_WAITING) {
    return false;
  } else if (returnCode == CompleteFileStatus.COMPLETE_SUCCESS) {
    myMetrics.numCompleteFile.inc();
    return true;
  } else {
    // do not change message in this exception
    // failover client relies on this message
    throw new IOException("Could not complete write to file " + src + " by " + clientName);
  }
}
项目:RDFS    文件:NameNode.java   
@Override
public boolean complete(String src, String clientName, long fileLen, Block lastBlock)
    throws IOException {
  if (stateChangeLog.isDebugEnabled()) {
    stateChangeLog.debug("*DIR* NameNode.complete: " + src + " for " + clientName);
  }
  CompleteFileStatus returnCode = namesystem.completeFile(src, clientName,
      fileLen, lastBlock);
  if (returnCode == CompleteFileStatus.STILL_WAITING) {
    return false;
  } else if (returnCode == CompleteFileStatus.COMPLETE_SUCCESS) {
    myMetrics.numCompleteFile.inc();
    return true;
  } else {
    throw new IOException("Could not complete write to file " + src + " by " + clientName);
  }
}
项目:hadoop-on-lustre    文件:NameNode.java   
/** {@inheritDoc} */
public boolean complete(String src, String clientName) throws IOException {
  stateChangeLog.debug("*DIR* NameNode.complete: " + src + " for " + clientName);
  CompleteFileStatus returnCode = namesystem.completeFile(src, clientName);
  if (returnCode == CompleteFileStatus.STILL_WAITING) {
    return false;
  } else if (returnCode == CompleteFileStatus.COMPLETE_SUCCESS) {
    return true;
  } else {
    throw new IOException("Could not complete write to file " + src + " by " + clientName);
  }
}
项目:hadoop-0.20    文件:NameNode.java   
/** {@inheritDoc} */
public boolean complete(String src, String clientName) throws IOException {
  stateChangeLog.debug("*DIR* NameNode.complete: " + src + " for " + clientName);
  CompleteFileStatus returnCode = namesystem.completeFile(src, clientName);
  if (returnCode == CompleteFileStatus.STILL_WAITING) {
    return false;
  } else if (returnCode == CompleteFileStatus.COMPLETE_SUCCESS) {
    return true;
  } else {
    throw new IOException("Could not complete write to file " + src + " by " + clientName);
  }
}
项目:hortonworks-extension    文件:NameNode.java   
/** {@inheritDoc} */
public boolean complete(String src, String clientName) throws IOException {
  stateChangeLog.debug("*DIR* NameNode.complete: " + src + " for " + clientName);
  CompleteFileStatus returnCode = namesystem.completeFile(src, clientName);
  if (returnCode == CompleteFileStatus.STILL_WAITING) {
    return false;
  } else if (returnCode == CompleteFileStatus.COMPLETE_SUCCESS) {
    return true;
  } else {
    throw new IOException("Could not complete write to file " + src + " by " + clientName);
  }
}
项目:hortonworks-extension    文件:NameNode.java   
/** {@inheritDoc} */
public boolean complete(String src, String clientName) throws IOException {
  stateChangeLog.debug("*DIR* NameNode.complete: " + src + " for " + clientName);
  CompleteFileStatus returnCode = namesystem.completeFile(src, clientName);
  if (returnCode == CompleteFileStatus.STILL_WAITING) {
    return false;
  } else if (returnCode == CompleteFileStatus.COMPLETE_SUCCESS) {
    return true;
  } else {
    throw new IOException("Could not complete write to file " + src + " by " + clientName);
  }
}
项目:hadoop-gpu    文件:NameNode.java   
/** {@inheritDoc} */
public boolean complete(String src, String clientName) throws IOException {
  stateChangeLog.debug("*DIR* NameNode.complete: " + src + " for " + clientName);
  CompleteFileStatus returnCode = namesystem.completeFile(src, clientName);
  if (returnCode == CompleteFileStatus.STILL_WAITING) {
    return false;
  } else if (returnCode == CompleteFileStatus.COMPLETE_SUCCESS) {
    return true;
  } else {
    throw new IOException("Could not complete write to file " + src + " by " + clientName);
  }
}