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); } }
@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); } }
/** {@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); } }