You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "cnauroth (via GitHub)" <gi...@apache.org> on 2023/04/13 23:42:48 UTC

[GitHub] [hadoop] cnauroth commented on a diff in pull request #5520: HDFS-16965. Add switch to decide whether to enable native codec.

cnauroth commented on code in PR #5520:
URL: https://github.com/apache/hadoop/pull/5520#discussion_r1166128382


##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/CodecUtil.java:
##########
@@ -170,8 +174,14 @@ private static String[] getRawCoderNames(
 
   private static RawErasureEncoder createRawEncoderWithFallback(
       Configuration conf, String codecName, ErasureCoderOptions coderOptions) {
+    boolean ISALEnabled = conf.getBoolean(IO_ERASURECODE_CODEC_NATIVE_ENABLED_KEY,
+        IO_ERASURECODE_CODEC_NATIVE_ENABLED_DEFAULT);
     String[] rawCoderNames = getRawCoderNames(conf, codecName);
     for (String rawCoderName : rawCoderNames) {
+      if (!ISALEnabled && rawCoderName.contains("native")) {
+        LOG.info("Disable the encoder with ISA-L.");

Review Comment:
   Is this more appropriate as debug-level logging? I'm wondering if at info level there could be problems of 1) the message accidentally leaking to user-facing output if this code path is triggered as part of commands like `hdfs dfs -cat` on erasure-coded files, and 2) excessive logging if this is triggered many times.



##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/CodecUtil.java:
##########
@@ -192,8 +202,14 @@ private static RawErasureEncoder createRawEncoderWithFallback(
 
   private static RawErasureDecoder createRawDecoderWithFallback(
       Configuration conf, String codecName, ErasureCoderOptions coderOptions) {
+    boolean ISALEnabled = conf.getBoolean(IO_ERASURECODE_CODEC_NATIVE_ENABLED_KEY,
+        IO_ERASURECODE_CODEC_NATIVE_ENABLED_DEFAULT);
     String[] coders = getRawCoderNames(conf, codecName);
     for (String rawCoderName : coders) {
+      if (!ISALEnabled && rawCoderName.contains("native")) {
+        LOG.info("Disable the decoder with ISA-L.");

Review Comment:
   Same comment here.



-- 
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: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org