|
@@ -82,6 +82,9 @@ public class TestQuota {
|
|
// Space quotas
|
|
// Space quotas
|
|
final int DEFAULT_BLOCK_SIZE = 512;
|
|
final int DEFAULT_BLOCK_SIZE = 512;
|
|
conf.setLong(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, DEFAULT_BLOCK_SIZE);
|
|
conf.setLong(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, DEFAULT_BLOCK_SIZE);
|
|
|
|
+ // Make it relinquish locks. When run serially, the result should
|
|
|
|
+ // be identical.
|
|
|
|
+ conf.setInt(DFSConfigKeys.DFS_CONTENT_SUMMARY_LIMIT_KEY, 2);
|
|
conf.setBoolean("dfs.support.append", true);
|
|
conf.setBoolean("dfs.support.append", true);
|
|
final MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(2).build();
|
|
final MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(2).build();
|
|
final FileSystem fs = cluster.getFileSystem();
|
|
final FileSystem fs = cluster.getFileSystem();
|
|
@@ -359,6 +362,9 @@ public class TestQuota {
|
|
@Test
|
|
@Test
|
|
public void testNamespaceCommands() throws Exception {
|
|
public void testNamespaceCommands() throws Exception {
|
|
final Configuration conf = new HdfsConfiguration();
|
|
final Configuration conf = new HdfsConfiguration();
|
|
|
|
+ // Make it relinquish locks. When run serially, the result should
|
|
|
|
+ // be identical.
|
|
|
|
+ conf.setInt(DFSConfigKeys.DFS_CONTENT_SUMMARY_LIMIT_KEY, 2);
|
|
final MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(2).build();
|
|
final MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(2).build();
|
|
final FileSystem fs = cluster.getFileSystem();
|
|
final FileSystem fs = cluster.getFileSystem();
|
|
assertTrue("Not a HDFS: "+fs.getUri(),
|
|
assertTrue("Not a HDFS: "+fs.getUri(),
|
|
@@ -532,6 +538,9 @@ public class TestQuota {
|
|
// diskspace quotas
|
|
// diskspace quotas
|
|
conf.set(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, "512");
|
|
conf.set(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, "512");
|
|
conf.setBoolean("dfs.support.append", true);
|
|
conf.setBoolean("dfs.support.append", true);
|
|
|
|
+ // Make it relinquish locks. When run serially, the result should
|
|
|
|
+ // be identical.
|
|
|
|
+ conf.setInt(DFSConfigKeys.DFS_CONTENT_SUMMARY_LIMIT_KEY, 2);
|
|
final MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(2).build();
|
|
final MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(2).build();
|
|
final FileSystem fs = cluster.getFileSystem();
|
|
final FileSystem fs = cluster.getFileSystem();
|
|
assertTrue("Not a HDFS: "+fs.getUri(),
|
|
assertTrue("Not a HDFS: "+fs.getUri(),
|
|
@@ -786,6 +795,9 @@ public class TestQuota {
|
|
final int BLOCK_SIZE = 6 * 1024;
|
|
final int BLOCK_SIZE = 6 * 1024;
|
|
conf.setInt(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, BLOCK_SIZE);
|
|
conf.setInt(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, BLOCK_SIZE);
|
|
conf.setBoolean(DFSConfigKeys.DFS_WEBHDFS_ENABLED_KEY, true);
|
|
conf.setBoolean(DFSConfigKeys.DFS_WEBHDFS_ENABLED_KEY, true);
|
|
|
|
+ // Make it relinquish locks. When run serially, the result should
|
|
|
|
+ // be identical.
|
|
|
|
+ conf.setInt(DFSConfigKeys.DFS_CONTENT_SUMMARY_LIMIT_KEY, 2);
|
|
MiniDFSCluster cluster =
|
|
MiniDFSCluster cluster =
|
|
new MiniDFSCluster.Builder(conf).numDataNodes(3).build();
|
|
new MiniDFSCluster.Builder(conf).numDataNodes(3).build();
|
|
cluster.waitActive();
|
|
cluster.waitActive();
|
|
@@ -848,6 +860,9 @@ public class TestQuota {
|
|
final int BLOCK_SIZE = 6 * 1024;
|
|
final int BLOCK_SIZE = 6 * 1024;
|
|
conf.setInt(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, BLOCK_SIZE);
|
|
conf.setInt(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, BLOCK_SIZE);
|
|
conf.setBoolean(DFSConfigKeys.DFS_WEBHDFS_ENABLED_KEY, true);
|
|
conf.setBoolean(DFSConfigKeys.DFS_WEBHDFS_ENABLED_KEY, true);
|
|
|
|
+ // Make it relinquish locks. When run serially, the result should
|
|
|
|
+ // be identical.
|
|
|
|
+ conf.setInt(DFSConfigKeys.DFS_CONTENT_SUMMARY_LIMIT_KEY, 2);
|
|
MiniDFSCluster cluster =
|
|
MiniDFSCluster cluster =
|
|
new MiniDFSCluster.Builder(conf).numDataNodes(3).build();
|
|
new MiniDFSCluster.Builder(conf).numDataNodes(3).build();
|
|
cluster.waitActive();
|
|
cluster.waitActive();
|