HDFS-4639. startFileInternal() should not increment generation stamp. Contributed by Plamen Jeliazkov.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1467534 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5e94420456
commit
242028a3fb
@ -503,6 +503,9 @@ Release 2.0.5-beta - UNRELEASED
|
|||||||
|
|
||||||
HDFS-4643. Fix flakiness in TestQuorumJournalManager. (todd)
|
HDFS-4643. Fix flakiness in TestQuorumJournalManager. (todd)
|
||||||
|
|
||||||
|
HDFS-4639. startFileInternal() should not increment generation stamp.
|
||||||
|
(Plamen Jeliazkov via shv)
|
||||||
|
|
||||||
Release 2.0.4-alpha - UNRELEASED
|
Release 2.0.4-alpha - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -235,8 +235,7 @@ INodeFileUnderConstruction addFile(String path,
|
|||||||
long preferredBlockSize,
|
long preferredBlockSize,
|
||||||
String clientName,
|
String clientName,
|
||||||
String clientMachine,
|
String clientMachine,
|
||||||
DatanodeDescriptor clientNode,
|
DatanodeDescriptor clientNode)
|
||||||
long generationStamp)
|
|
||||||
throws FileAlreadyExistsException, QuotaExceededException,
|
throws FileAlreadyExistsException, QuotaExceededException,
|
||||||
UnresolvedLinkException {
|
UnresolvedLinkException {
|
||||||
waitForReady();
|
waitForReady();
|
||||||
|
@ -1907,9 +1907,8 @@ private LocatedBlock startFileInternal(FSPermissionChecker pc, String src,
|
|||||||
checkFsObjectLimit();
|
checkFsObjectLimit();
|
||||||
|
|
||||||
// increment global generation stamp
|
// increment global generation stamp
|
||||||
long genstamp = nextGenerationStamp();
|
|
||||||
INodeFileUnderConstruction newNode = dir.addFile(src, permissions,
|
INodeFileUnderConstruction newNode = dir.addFile(src, permissions,
|
||||||
replication, blockSize, holder, clientMachine, clientNode, genstamp);
|
replication, blockSize, holder, clientMachine, clientNode);
|
||||||
if (newNode == null) {
|
if (newNode == null) {
|
||||||
throw new IOException("DIR* NameSystem.startFile: " +
|
throw new IOException("DIR* NameSystem.startFile: " +
|
||||||
"Unable to add file to namespace.");
|
"Unable to add file to namespace.");
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
*/
|
*/
|
||||||
public class TestDFSUpgrade {
|
public class TestDFSUpgrade {
|
||||||
|
|
||||||
private static final int EXPECTED_TXID = 49;
|
private static final int EXPECTED_TXID = 45;
|
||||||
private static final Log LOG = LogFactory.getLog(TestDFSUpgrade.class.getName());
|
private static final Log LOG = LogFactory.getLog(TestDFSUpgrade.class.getName());
|
||||||
private Configuration conf;
|
private Configuration conf;
|
||||||
private int testCounter = 0;
|
private int testCounter = 0;
|
||||||
|
@ -1129,7 +1129,7 @@ public void testSaveNamespace() throws IOException {
|
|||||||
throw new IOException(e);
|
throw new IOException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
final int EXPECTED_TXNS_FIRST_SEG = 12;
|
final int EXPECTED_TXNS_FIRST_SEG = 11;
|
||||||
|
|
||||||
// the following steps should have happened:
|
// the following steps should have happened:
|
||||||
// edits_inprogress_1 -> edits_1-12 (finalized)
|
// edits_inprogress_1 -> edits_1-12 (finalized)
|
||||||
|
Loading…
Reference in New Issue
Block a user