adoroszlai commented on code in PR #4162:
URL: https://github.com/apache/ozone/pull/4162#discussion_r1065559985
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/net/NodeSchemaLoader.java:
##########
@@ -227,7 +229,7 @@ private NodeSchemaLoadResult loadSchemaFromYaml(InputStream
schemaFile) {
NodeSchemaLoadResult finalSchema;
try {
- Yaml yaml = new Yaml();
+ Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions()));
Review Comment:
Looks like this causes test failures:
```
Tests run: 5, Failures: 4, Errors: 0, Skipped: 0, Time elapsed: 0.268 s <<<
FAILURE! - in org.apache.hadoop.hdds.scm.net.TestYamlSchemaLoader
```
https://github.com/rohit-kb/ozone/actions/runs/3882072979/jobs/6621790406#step:6:584
Can you please check?
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers/DatanodeIdYaml.java:
##########
@@ -56,7 +59,7 @@ public static void createDatanodeIdFile(DatanodeDetails
datanodeDetails,
DumperOptions options = new DumperOptions();
options.setPrettyFlow(true);
options.setDefaultFlowStyle(DumperOptions.FlowStyle.FLOW);
- Yaml yaml = new Yaml(options);
+ Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions()), new
Representer(options), options);
Review Comment:
```
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers/DatanodeIdYaml.java
62: Line is longer than 80 characters (found 102).
```
https://github.com/rohit-kb/ozone/actions/runs/3882072979/jobs/6621789972#step:6:427
--
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]