jojochuang commented on code in PR #10209:
URL: https://github.com/apache/ozone/pull/10209#discussion_r3590207055
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/AbstractOzoneFileSystemTest.java:
##########
@@ -403,6 +404,49 @@ public void testCreateKeyWithECReplicationConfig() throws
Exception {
createKeyWithECReplicationConfig(root, cluster.getConf());
}
+ @Test
+ void testContentSummaryErasureCodingPolicy() throws Exception {
+ String ratisKey = "ratis-ec-policy-key";
+ String ecKey = "ec-policy-key";
+ ECReplicationConfig ecConfig = new ECReplicationConfig("RS-3-2-1024k");
+ Path parentDir = new Path(OZONE_URI_DELIMITER, "ec-policy-mixed-o3fs");
+ Path ratisFile = new Path(parentDir, ratisKey);
+ Path ecFile = new Path(parentDir, ecKey);
+
+ fs.mkdirs(parentDir);
+ String ratisRelKey = "ec-policy-mixed-o3fs/" + ratisKey;
+ String ecRelKey = "ec-policy-mixed-o3fs/" + ecKey;
+ TestDataUtil.createKey(ozoneBucket, ratisRelKey,
+ RatisReplicationConfig.getInstance(HddsProtos.ReplicationFactor.THREE),
+ new byte[]{0});
+ TestDataUtil.createKey(ozoneBucket, ecRelKey, ecConfig,
+ new byte[]{0});
+
+ try {
+ assertEquals("",
+ fs.getContentSummary(ROOT).getErasureCodingPolicy());
+ assertEquals("Replicated",
Review Comment:
Ideally, ContentSummaryComputationContext.REPLICATED is better than
"Replicated"
But wouldn't work with Hadoop 2 so this is fine.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]