|
@@ -64,7 +64,7 @@ public class TestErasureCodingZones {
|
|
|
fs.mkdir(testDir, FsPermission.getDirDefault());
|
|
|
|
|
|
/* Normal creation of an erasure coding zone */
|
|
|
- fs.getClient().createErasureCodingZone(testDir.toString());
|
|
|
+ fs.getClient().createErasureCodingZone(testDir.toString(), null);
|
|
|
|
|
|
/* Verify files under the zone are striped */
|
|
|
final Path ECFilePath = new Path(testDir, "foo");
|
|
@@ -77,7 +77,7 @@ public class TestErasureCodingZones {
|
|
|
fs.mkdir(notEmpty, FsPermission.getDirDefault());
|
|
|
fs.create(new Path(notEmpty, "foo"));
|
|
|
try {
|
|
|
- fs.getClient().createErasureCodingZone(notEmpty.toString());
|
|
|
+ fs.getClient().createErasureCodingZone(notEmpty.toString(), null);
|
|
|
fail("Erasure coding zone on non-empty dir");
|
|
|
} catch (IOException e) {
|
|
|
assertExceptionContains("erasure coding zone for a non-empty directory", e);
|
|
@@ -87,10 +87,10 @@ public class TestErasureCodingZones {
|
|
|
final Path zone1 = new Path("/zone1");
|
|
|
final Path zone2 = new Path(zone1, "zone2");
|
|
|
fs.mkdir(zone1, FsPermission.getDirDefault());
|
|
|
- fs.getClient().createErasureCodingZone(zone1.toString());
|
|
|
+ fs.getClient().createErasureCodingZone(zone1.toString(), null);
|
|
|
fs.mkdir(zone2, FsPermission.getDirDefault());
|
|
|
try {
|
|
|
- fs.getClient().createErasureCodingZone(zone2.toString());
|
|
|
+ fs.getClient().createErasureCodingZone(zone2.toString(), null);
|
|
|
fail("Nested erasure coding zones");
|
|
|
} catch (IOException e) {
|
|
|
assertExceptionContains("already in an erasure coding zone", e);
|
|
@@ -100,7 +100,7 @@ public class TestErasureCodingZones {
|
|
|
final Path fPath = new Path("/file");
|
|
|
fs.create(fPath);
|
|
|
try {
|
|
|
- fs.getClient().createErasureCodingZone(fPath.toString());
|
|
|
+ fs.getClient().createErasureCodingZone(fPath.toString(), null);
|
|
|
fail("Erasure coding zone on file");
|
|
|
} catch (IOException e) {
|
|
|
assertExceptionContains("erasure coding zone for a file", e);
|
|
@@ -113,8 +113,8 @@ public class TestErasureCodingZones {
|
|
|
final Path dstECDir = new Path("/dstEC");
|
|
|
fs.mkdir(srcECDir, FsPermission.getDirDefault());
|
|
|
fs.mkdir(dstECDir, FsPermission.getDirDefault());
|
|
|
- fs.getClient().createErasureCodingZone(srcECDir.toString());
|
|
|
- fs.getClient().createErasureCodingZone(dstECDir.toString());
|
|
|
+ fs.getClient().createErasureCodingZone(srcECDir.toString(), null);
|
|
|
+ fs.getClient().createErasureCodingZone(dstECDir.toString(), null);
|
|
|
final Path srcFile = new Path(srcECDir, "foo");
|
|
|
fs.create(srcFile);
|
|
|
|
|
@@ -158,7 +158,7 @@ public class TestErasureCodingZones {
|
|
|
// dir ECInfo before creating ec zone
|
|
|
assertNull(fs.getClient().getErasureCodingInfo(src));
|
|
|
// dir ECInfo after creating ec zone
|
|
|
- fs.getClient().createErasureCodingZone(src);
|
|
|
+ fs.getClient().createErasureCodingZone(src, null);
|
|
|
verifyErasureCodingInfo(src);
|
|
|
fs.create(new Path(ecDir, "/child1")).close();
|
|
|
// verify for the files in ec zone
|
|
@@ -182,4 +182,4 @@ public class TestErasureCodingZones {
|
|
|
assertEquals("Default chunkSize should be used",
|
|
|
ECSchema.DEFAULT_CHUNK_SIZE, schema.getChunkSize());
|
|
|
}
|
|
|
-}
|
|
|
+}
|