linliu-code commented on code in PR #12866:
URL: https://github.com/apache/hudi/pull/12866#discussion_r1980414612
##########
hudi-io/src/main/java/org/apache/hudi/io/compress/CompressionCodec.java:
##########
@@ -41,4 +41,14 @@ public enum CompressionCodec {
public String getName() {
return name;
}
+
+ public static CompressionCodec findCodecByName(String name) {
+ for (CompressionCodec v : CompressionCodec.values()) {
+ if (v.getName().equals(name.toLowerCase())) {
+ return v;
+ }
+ }
+ throw new IllegalArgumentException(
+ "Cannot find compression codec: " + name);
+ }
Review Comment:
Done.
--
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]