|
@@ -36,6 +36,7 @@ import org.apache.hadoop.fs.FileAlreadyExistsException;
|
|
|
import org.apache.hadoop.fs.FileSystem;
|
|
|
import org.apache.hadoop.fs.Path;
|
|
|
import org.apache.hadoop.hdfs.protocol.AlreadyBeingCreatedException;
|
|
|
+import org.apache.hadoop.hdfs.protocol.FSConstants;
|
|
|
import org.apache.hadoop.hdfs.protocol.LocatedBlocks;
|
|
|
import org.apache.hadoop.hdfs.server.common.HdfsConstants;
|
|
|
import org.apache.hadoop.hdfs.server.datanode.DataNode;
|
|
@@ -316,6 +317,9 @@ public class TestLeaseRecovery2 {
|
|
|
u2g_map.put(fakeUsername, new String[] {fakeGroup});
|
|
|
DFSTestUtil.updateConfWithFakeGroupMapping(conf, u2g_map);
|
|
|
|
|
|
+ // Reset default lease periods
|
|
|
+ cluster.setLeasePeriod(FSConstants.LEASE_SOFTLIMIT_PERIOD,
|
|
|
+ FSConstants.LEASE_HARDLIMIT_PERIOD);
|
|
|
//create a file
|
|
|
// create a random file name
|
|
|
String filestr = "/foo" + AppendTestUtil.nextInt();
|