From 66e2cfa1a0285f2b4f62a4ffb4d5c1ee54f76156 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Wed, 7 Oct 2015 18:12:26 -0700 Subject: [PATCH] HDFS-8632. Add InterfaceAudience annotation to the erasure coding classes. Contributed by Rakesh R. --- .../java/org/apache/hadoop/io/erasurecode/CodecUtil.java | 2 ++ .../main/java/org/apache/hadoop/io/erasurecode/ECBlock.java | 3 +++ .../java/org/apache/hadoop/io/erasurecode/ECBlockGroup.java | 3 +++ .../main/java/org/apache/hadoop/io/erasurecode/ECChunk.java | 3 +++ .../main/java/org/apache/hadoop/io/erasurecode/ECSchema.java | 5 +++++ .../hadoop/io/erasurecode/codec/AbstractErasureCodec.java | 2 ++ .../org/apache/hadoop/io/erasurecode/codec/ErasureCodec.java | 2 ++ .../apache/hadoop/io/erasurecode/codec/RSErasureCodec.java | 2 ++ .../apache/hadoop/io/erasurecode/codec/XORErasureCodec.java | 2 ++ .../hadoop/io/erasurecode/coder/AbstractErasureCoder.java | 2 ++ .../io/erasurecode/coder/AbstractErasureCodingStep.java | 2 ++ .../hadoop/io/erasurecode/coder/AbstractErasureDecoder.java | 2 ++ .../hadoop/io/erasurecode/coder/AbstractErasureEncoder.java | 2 ++ .../org/apache/hadoop/io/erasurecode/coder/ErasureCoder.java | 2 ++ .../hadoop/io/erasurecode/coder/ErasureCodingStep.java | 2 ++ .../hadoop/io/erasurecode/coder/ErasureDecodingStep.java | 2 ++ .../hadoop/io/erasurecode/coder/ErasureEncodingStep.java | 2 ++ .../apache/hadoop/io/erasurecode/coder/RSErasureDecoder.java | 2 ++ .../apache/hadoop/io/erasurecode/coder/RSErasureEncoder.java | 2 ++ .../hadoop/io/erasurecode/coder/XORErasureDecoder.java | 2 ++ .../hadoop/io/erasurecode/coder/XORErasureEncoder.java | 2 ++ .../apache/hadoop/io/erasurecode/grouper/BlockGrouper.java | 2 ++ .../io/erasurecode/rawcoder/AbstractRawErasureCoder.java | 3 ++- .../io/erasurecode/rawcoder/AbstractRawErasureDecoder.java | 2 ++ .../io/erasurecode/rawcoder/AbstractRawErasureEncoder.java | 2 ++ .../apache/hadoop/io/erasurecode/rawcoder/RSRawDecoder.java | 2 ++ .../apache/hadoop/io/erasurecode/rawcoder/RSRawEncoder.java | 2 ++ .../io/erasurecode/rawcoder/RSRawErasureCoderFactory.java | 3 +++ .../hadoop/io/erasurecode/rawcoder/RawErasureCoder.java | 2 ++ .../io/erasurecode/rawcoder/RawErasureCoderFactory.java | 3 +++ .../hadoop/io/erasurecode/rawcoder/RawErasureDecoder.java | 2 ++ .../hadoop/io/erasurecode/rawcoder/RawErasureEncoder.java | 2 ++ .../apache/hadoop/io/erasurecode/rawcoder/XORRawDecoder.java | 3 +++ .../apache/hadoop/io/erasurecode/rawcoder/XORRawEncoder.java | 3 +++ .../io/erasurecode/rawcoder/XORRawErasureCoderFactory.java | 3 +++ .../apache/hadoop/io/erasurecode/rawcoder/util/DumpUtil.java | 2 ++ .../hadoop/io/erasurecode/rawcoder/util/GaloisField.java | 3 +++ .../apache/hadoop/io/erasurecode/rawcoder/util/RSUtil.java | 3 +++ .../java/org/apache/hadoop/hdfs/DFSStripedInputStream.java | 2 ++ .../java/org/apache/hadoop/hdfs/StripedDataStreamer.java | 2 ++ .../org/apache/hadoop/hdfs/protocol/ErasureCodingPolicy.java | 4 ++++ hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../hadoop/hdfs/server/blockmanagement/BlockInfoStriped.java | 2 ++ .../hdfs/server/blockmanagement/BlockPlacementPolicies.java | 2 ++ .../server/datanode/erasurecode/ErasureCodingWorker.java | 2 ++ .../java/org/apache/hadoop/hdfs/tools/erasurecode/ECCli.java | 2 ++ 46 files changed, 108 insertions(+), 1 deletion(-) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/CodecUtil.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/CodecUtil.java index 027d58b026..87bedf86f5 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/CodecUtil.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/CodecUtil.java @@ -17,6 +17,7 @@ */ package org.apache.hadoop.io.erasurecode; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.CommonConfigurationKeys; import org.apache.hadoop.io.erasurecode.rawcoder.*; @@ -24,6 +25,7 @@ /** * A codec & coder utility to help create raw coders conveniently. */ +@InterfaceAudience.Private public final class CodecUtil { private CodecUtil() { } diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/ECBlock.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/ECBlock.java index 5c0a16006f..a3f24c8ff8 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/ECBlock.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/ECBlock.java @@ -17,12 +17,15 @@ */ package org.apache.hadoop.io.erasurecode; +import org.apache.hadoop.classification.InterfaceAudience; + /** * A wrapper of block level data source/output that {@link ECChunk}s can be * extracted from. For HDFS, it can be an HDFS block (250MB). Note it only cares * about erasure coding specific logic thus avoids coupling with any HDFS block * details. We can have something like HdfsBlock extend it. */ +@InterfaceAudience.Private public class ECBlock { private boolean isParity; diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/ECBlockGroup.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/ECBlockGroup.java index 91e4fb8f51..c52d9471bd 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/ECBlockGroup.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/ECBlockGroup.java @@ -17,9 +17,12 @@ */ package org.apache.hadoop.io.erasurecode; +import org.apache.hadoop.classification.InterfaceAudience; + /** * A group of blocks or {@link ECBlock} incurred in an erasure coding task. */ +@InterfaceAudience.Private public class ECBlockGroup { private ECBlock[] dataBlocks; diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/ECChunk.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/ECChunk.java index d0120d849c..cd7c6be1b3 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/ECChunk.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/ECChunk.java @@ -19,9 +19,12 @@ import java.nio.ByteBuffer; +import org.apache.hadoop.classification.InterfaceAudience; + /** * A wrapper for ByteBuffer or bytes array for an erasure code chunk. */ +@InterfaceAudience.Private public class ECChunk { private ByteBuffer chunkBuffer; diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/ECSchema.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/ECSchema.java index 0d5bf8f068..1be653b100 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/ECSchema.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/ECSchema.java @@ -21,9 +21,14 @@ import java.util.HashMap; import java.util.Map; +import org.apache.hadoop.classification.InterfaceAudience; +import org.apache.hadoop.classification.InterfaceStability; + /** * Erasure coding schema to housekeeper relevant information. */ +@InterfaceAudience.Public +@InterfaceStability.Evolving public final class ECSchema { public static final String NUM_DATA_UNITS_KEY = "numDataUnits"; public static final String NUM_PARITY_UNITS_KEY = "numParityUnits"; diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/codec/AbstractErasureCodec.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/codec/AbstractErasureCodec.java index 0cacfbcacd..e2fb2cb9b3 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/codec/AbstractErasureCodec.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/codec/AbstractErasureCodec.java @@ -17,6 +17,7 @@ */ package org.apache.hadoop.io.erasurecode.codec; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.conf.Configured; import org.apache.hadoop.io.erasurecode.ECSchema; import org.apache.hadoop.io.erasurecode.grouper.BlockGrouper; @@ -24,6 +25,7 @@ /** * Abstract Erasure Codec that implements {@link ErasureCodec}. */ +@InterfaceAudience.Private public abstract class AbstractErasureCodec extends Configured implements ErasureCodec { diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/codec/ErasureCodec.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/codec/ErasureCodec.java index 9aa3db265e..a2ea865911 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/codec/ErasureCodec.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/codec/ErasureCodec.java @@ -17,6 +17,7 @@ */ package org.apache.hadoop.io.erasurecode.codec; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.conf.Configurable; import org.apache.hadoop.io.erasurecode.coder.ErasureCoder; import org.apache.hadoop.io.erasurecode.grouper.BlockGrouper; @@ -26,6 +27,7 @@ * Currently it cares only block grouper and erasure coder. In future we may * add more aspects here to make the behaviors customizable. */ +@InterfaceAudience.Private public interface ErasureCodec extends Configurable { /** diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/codec/RSErasureCodec.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/codec/RSErasureCodec.java index 6edd638dc5..7a5786e6ae 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/codec/RSErasureCodec.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/codec/RSErasureCodec.java @@ -17,6 +17,7 @@ */ package org.apache.hadoop.io.erasurecode.codec; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.io.erasurecode.ECSchema; import org.apache.hadoop.io.erasurecode.coder.ErasureCoder; import org.apache.hadoop.io.erasurecode.coder.RSErasureDecoder; @@ -25,6 +26,7 @@ /** * A Reed-Solomon erasure codec. */ +@InterfaceAudience.Private public class RSErasureCodec extends AbstractErasureCodec { public RSErasureCodec(ECSchema schema) { diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/codec/XORErasureCodec.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/codec/XORErasureCodec.java index e2dcfa7983..9c38fc2786 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/codec/XORErasureCodec.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/codec/XORErasureCodec.java @@ -17,6 +17,7 @@ */ package org.apache.hadoop.io.erasurecode.codec; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.io.erasurecode.ECSchema; import org.apache.hadoop.io.erasurecode.coder.ErasureCoder; import org.apache.hadoop.io.erasurecode.coder.XORErasureDecoder; @@ -25,6 +26,7 @@ /** * A XOR erasure codec. */ +@InterfaceAudience.Private public class XORErasureCodec extends AbstractErasureCodec { public XORErasureCodec(ECSchema schema) { diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/AbstractErasureCoder.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/AbstractErasureCoder.java index 5cd0ee8c18..1d1641f2a2 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/AbstractErasureCoder.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/AbstractErasureCoder.java @@ -17,6 +17,7 @@ */ package org.apache.hadoop.io.erasurecode.coder; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.conf.Configured; import org.apache.hadoop.io.erasurecode.ECSchema; @@ -25,6 +26,7 @@ * * It implements the {@link ErasureCoder} interface. */ +@InterfaceAudience.Private public abstract class AbstractErasureCoder extends Configured implements ErasureCoder { diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/AbstractErasureCodingStep.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/AbstractErasureCodingStep.java index c429d49a36..ccff92d239 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/AbstractErasureCodingStep.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/AbstractErasureCodingStep.java @@ -17,6 +17,7 @@ */ package org.apache.hadoop.io.erasurecode.coder; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.io.erasurecode.ECBlock; /** @@ -25,6 +26,7 @@ * * It implements {@link ErasureEncodingStep}. */ +@InterfaceAudience.Private public abstract class AbstractErasureCodingStep implements ErasureCodingStep { private ECBlock[] inputBlocks; diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/AbstractErasureDecoder.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/AbstractErasureDecoder.java index 3ea9311d19..6fdae9369e 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/AbstractErasureDecoder.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/AbstractErasureDecoder.java @@ -17,6 +17,7 @@ */ package org.apache.hadoop.io.erasurecode.coder; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.io.erasurecode.ECBlock; import org.apache.hadoop.io.erasurecode.ECBlockGroup; import org.apache.hadoop.io.erasurecode.ECSchema; @@ -26,6 +27,7 @@ * * It implements the {@link ErasureCoder} interface. */ +@InterfaceAudience.Private public abstract class AbstractErasureDecoder extends AbstractErasureCoder { public AbstractErasureDecoder(int numDataUnits, int numParityUnits) { diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/AbstractErasureEncoder.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/AbstractErasureEncoder.java index 7c887e8e2c..5ec6b4e697 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/AbstractErasureEncoder.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/AbstractErasureEncoder.java @@ -17,6 +17,7 @@ */ package org.apache.hadoop.io.erasurecode.coder; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.io.erasurecode.ECBlock; import org.apache.hadoop.io.erasurecode.ECBlockGroup; import org.apache.hadoop.io.erasurecode.ECSchema; @@ -26,6 +27,7 @@ * * It implements the {@link ErasureCoder} interface. */ +@InterfaceAudience.Private public abstract class AbstractErasureEncoder extends AbstractErasureCoder { public AbstractErasureEncoder(int numDataUnits, int numParityUnits) { diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/ErasureCoder.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/ErasureCoder.java index f05ea41746..49cc8dd3c0 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/ErasureCoder.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/ErasureCoder.java @@ -17,6 +17,7 @@ */ package org.apache.hadoop.io.erasurecode.coder; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.conf.Configurable; import org.apache.hadoop.io.erasurecode.ECBlockGroup; @@ -34,6 +35,7 @@ * of multiple coding steps. * */ +@InterfaceAudience.Private public interface ErasureCoder extends Configurable { /** diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/ErasureCodingStep.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/ErasureCodingStep.java index a3b177f2d2..991eb56b3e 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/ErasureCodingStep.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/ErasureCodingStep.java @@ -17,12 +17,14 @@ */ package org.apache.hadoop.io.erasurecode.coder; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.io.erasurecode.ECBlock; import org.apache.hadoop.io.erasurecode.ECChunk; /** * Erasure coding step that's involved in encoding/decoding of a block group. */ +@InterfaceAudience.Private public interface ErasureCodingStep { /** diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/ErasureDecodingStep.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/ErasureDecodingStep.java index 980c5805de..b319cfac65 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/ErasureDecodingStep.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/ErasureDecodingStep.java @@ -17,6 +17,7 @@ */ package org.apache.hadoop.io.erasurecode.coder; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.io.erasurecode.ECBlock; import org.apache.hadoop.io.erasurecode.ECChunk; import org.apache.hadoop.io.erasurecode.rawcoder.RawErasureDecoder; @@ -25,6 +26,7 @@ * Erasure decoding step, a wrapper of all the necessary information to perform * a decoding step involved in the whole process of decoding a block group. */ +@InterfaceAudience.Private public class ErasureDecodingStep extends AbstractErasureCodingStep { private int[] erasedIndexes; private RawErasureDecoder rawDecoder; diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/ErasureEncodingStep.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/ErasureEncodingStep.java index bd7587fa3c..311de214d8 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/ErasureEncodingStep.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/ErasureEncodingStep.java @@ -17,6 +17,7 @@ */ package org.apache.hadoop.io.erasurecode.coder; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.io.erasurecode.ECBlock; import org.apache.hadoop.io.erasurecode.ECChunk; import org.apache.hadoop.io.erasurecode.rawcoder.RawErasureEncoder; @@ -25,6 +26,7 @@ * Erasure encoding step, a wrapper of all the necessary information to perform * an encoding step involved in the whole process of encoding a block group. */ +@InterfaceAudience.Private public class ErasureEncodingStep extends AbstractErasureCodingStep { private RawErasureEncoder rawEncoder; diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/RSErasureDecoder.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/RSErasureDecoder.java index f56674d32c..6728945bfb 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/RSErasureDecoder.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/RSErasureDecoder.java @@ -17,6 +17,7 @@ */ package org.apache.hadoop.io.erasurecode.coder; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.io.erasurecode.CodecUtil; import org.apache.hadoop.io.erasurecode.ECBlock; import org.apache.hadoop.io.erasurecode.ECBlockGroup; @@ -28,6 +29,7 @@ * * It implements {@link ErasureCoder}. */ +@InterfaceAudience.Private public class RSErasureDecoder extends AbstractErasureDecoder { private RawErasureDecoder rsRawDecoder; diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/RSErasureEncoder.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/RSErasureEncoder.java index 3ed3e2091d..7784573c5d 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/RSErasureEncoder.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/RSErasureEncoder.java @@ -17,6 +17,7 @@ */ package org.apache.hadoop.io.erasurecode.coder; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.io.erasurecode.CodecUtil; import org.apache.hadoop.io.erasurecode.ECBlock; import org.apache.hadoop.io.erasurecode.ECBlockGroup; @@ -28,6 +29,7 @@ * * It implements {@link ErasureCoder}. */ +@InterfaceAudience.Private public class RSErasureEncoder extends AbstractErasureEncoder { private RawErasureEncoder rawEncoder; diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/XORErasureDecoder.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/XORErasureDecoder.java index a84741824e..a61bafd5c3 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/XORErasureDecoder.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/XORErasureDecoder.java @@ -17,6 +17,7 @@ */ package org.apache.hadoop.io.erasurecode.coder; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.io.erasurecode.CodecUtil; import org.apache.hadoop.io.erasurecode.ECBlock; import org.apache.hadoop.io.erasurecode.ECBlockGroup; @@ -28,6 +29,7 @@ * * It implements {@link ErasureCoder}. */ +@InterfaceAudience.Private public class XORErasureDecoder extends AbstractErasureDecoder { public XORErasureDecoder(int numDataUnits, int numParityUnits) { diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/XORErasureEncoder.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/XORErasureEncoder.java index 5c4bcddb51..3f222477bf 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/XORErasureEncoder.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/XORErasureEncoder.java @@ -17,6 +17,7 @@ */ package org.apache.hadoop.io.erasurecode.coder; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.io.erasurecode.CodecUtil; import org.apache.hadoop.io.erasurecode.ECBlock; import org.apache.hadoop.io.erasurecode.ECBlockGroup; @@ -28,6 +29,7 @@ * * It implements {@link ErasureCoder}. */ +@InterfaceAudience.Private public class XORErasureEncoder extends AbstractErasureEncoder { public XORErasureEncoder(int numDataUnits, int numParityUnits) { diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/grouper/BlockGrouper.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/grouper/BlockGrouper.java index bdc1624788..3f1b0c2294 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/grouper/BlockGrouper.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/grouper/BlockGrouper.java @@ -17,6 +17,7 @@ */ package org.apache.hadoop.io.erasurecode.grouper; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.io.erasurecode.ECBlock; import org.apache.hadoop.io.erasurecode.ECBlockGroup; import org.apache.hadoop.io.erasurecode.ECSchema; @@ -25,6 +26,7 @@ * As part of a codec, to handle how to form a block group for encoding * and provide instructions on how to recover erased blocks from a block group */ +@InterfaceAudience.Private public class BlockGrouper { private ECSchema schema; diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/AbstractRawErasureCoder.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/AbstractRawErasureCoder.java index 4b7461e118..0ace085279 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/AbstractRawErasureCoder.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/AbstractRawErasureCoder.java @@ -18,16 +18,17 @@ package org.apache.hadoop.io.erasurecode.rawcoder; import org.apache.hadoop.HadoopIllegalArgumentException; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.conf.Configured; import java.nio.ByteBuffer; -import java.util.Arrays; /** * A common class of basic facilities to be shared by encoder and decoder * * It implements the {@link RawErasureCoder} interface. */ +@InterfaceAudience.Private public abstract class AbstractRawErasureCoder extends Configured implements RawErasureCoder { diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/AbstractRawErasureDecoder.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/AbstractRawErasureDecoder.java index 931cda1ce7..a99730df19 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/AbstractRawErasureDecoder.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/AbstractRawErasureDecoder.java @@ -18,6 +18,7 @@ package org.apache.hadoop.io.erasurecode.rawcoder; import org.apache.hadoop.HadoopIllegalArgumentException; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.io.erasurecode.ECChunk; import java.nio.ByteBuffer; @@ -28,6 +29,7 @@ * * It implements the {@link RawErasureDecoder} interface. */ +@InterfaceAudience.Private public abstract class AbstractRawErasureDecoder extends AbstractRawErasureCoder implements RawErasureDecoder { diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/AbstractRawErasureEncoder.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/AbstractRawErasureEncoder.java index a0b3cfef2a..99c754e95e 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/AbstractRawErasureEncoder.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/AbstractRawErasureEncoder.java @@ -18,6 +18,7 @@ package org.apache.hadoop.io.erasurecode.rawcoder; import org.apache.hadoop.HadoopIllegalArgumentException; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.io.erasurecode.ECChunk; import java.nio.ByteBuffer; @@ -27,6 +28,7 @@ * * It implements the {@link RawErasureEncoder} interface. */ +@InterfaceAudience.Private public abstract class AbstractRawErasureEncoder extends AbstractRawErasureCoder implements RawErasureEncoder { diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RSRawDecoder.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RSRawDecoder.java index 57e6957435..69ce3e8748 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RSRawDecoder.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RSRawDecoder.java @@ -18,6 +18,7 @@ package org.apache.hadoop.io.erasurecode.rawcoder; import org.apache.hadoop.HadoopIllegalArgumentException; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.io.erasurecode.rawcoder.util.RSUtil; import java.nio.ByteBuffer; @@ -31,6 +32,7 @@ * unnecessarily due to the underlying implementation limit in GF. This will be * addressed in HADOOP-11871. */ +@InterfaceAudience.Private public class RSRawDecoder extends AbstractRawErasureDecoder { // To describe and calculate the needed Vandermonde matrix private int[] errSignature; diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RSRawEncoder.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RSRawEncoder.java index efeee9030c..813a312b9b 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RSRawEncoder.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RSRawEncoder.java @@ -17,6 +17,7 @@ */ package org.apache.hadoop.io.erasurecode.rawcoder; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.io.erasurecode.rawcoder.util.RSUtil; import java.nio.ByteBuffer; @@ -26,6 +27,7 @@ * isn't available in some environment. Please always use native implementations * when possible. */ +@InterfaceAudience.Private public class RSRawEncoder extends AbstractRawErasureEncoder { private int[] generatingPolynomial; diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RSRawErasureCoderFactory.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RSRawErasureCoderFactory.java index 5db49e388f..b034cbf7f5 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RSRawErasureCoderFactory.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RSRawErasureCoderFactory.java @@ -17,9 +17,12 @@ */ package org.apache.hadoop.io.erasurecode.rawcoder; +import org.apache.hadoop.classification.InterfaceAudience; + /** * A raw coder factory for raw Reed-Solomon coder in Java. */ +@InterfaceAudience.Private public class RSRawErasureCoderFactory implements RawErasureCoderFactory { @Override diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RawErasureCoder.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RawErasureCoder.java index 0ddb460345..082c9c3639 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RawErasureCoder.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RawErasureCoder.java @@ -17,6 +17,7 @@ */ package org.apache.hadoop.io.erasurecode.rawcoder; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.conf.Configurable; /** @@ -33,6 +34,7 @@ * low level constructs, since it only takes care of the math calculation with * a group of byte buffers. */ +@InterfaceAudience.Private public interface RawErasureCoder extends Configurable { /** diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RawErasureCoderFactory.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RawErasureCoderFactory.java index 280daf3119..8a12106c99 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RawErasureCoderFactory.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RawErasureCoderFactory.java @@ -17,11 +17,14 @@ */ package org.apache.hadoop.io.erasurecode.rawcoder; +import org.apache.hadoop.classification.InterfaceAudience; + /** * Raw erasure coder factory that can be used to create raw encoder and decoder. * It helps in configuration since only one factory class is needed to be * configured. */ +@InterfaceAudience.Private public interface RawErasureCoderFactory { /** diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RawErasureDecoder.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RawErasureDecoder.java index e2d01d9c6f..fa747d8f10 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RawErasureDecoder.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RawErasureDecoder.java @@ -17,6 +17,7 @@ */ package org.apache.hadoop.io.erasurecode.rawcoder; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.io.erasurecode.ECChunk; import java.nio.ByteBuffer; @@ -28,6 +29,7 @@ * * It extends the {@link RawErasureCoder} interface. */ +@InterfaceAudience.Private public interface RawErasureDecoder extends RawErasureCoder { /** diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RawErasureEncoder.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RawErasureEncoder.java index 7571f095ca..d451eb911e 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RawErasureEncoder.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RawErasureEncoder.java @@ -17,6 +17,7 @@ */ package org.apache.hadoop.io.erasurecode.rawcoder; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.io.erasurecode.ECChunk; import java.nio.ByteBuffer; @@ -28,6 +29,7 @@ * * It extends the {@link RawErasureCoder} interface. */ +@InterfaceAudience.Private public interface RawErasureEncoder extends RawErasureCoder { /** diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/XORRawDecoder.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/XORRawDecoder.java index e20e543422..f11dd9fd5c 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/XORRawDecoder.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/XORRawDecoder.java @@ -19,6 +19,8 @@ import java.nio.ByteBuffer; +import org.apache.hadoop.classification.InterfaceAudience; + /** * A raw decoder in XOR code scheme in pure Java, adapted from HDFS-RAID. * @@ -26,6 +28,7 @@ * used in advanced codes, like HitchHiker and LRC, though itself is rarely * deployed independently. */ +@InterfaceAudience.Private public class XORRawDecoder extends AbstractRawErasureDecoder { public XORRawDecoder(int numDataUnits, int numParityUnits) { diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/XORRawEncoder.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/XORRawEncoder.java index f4d242eefb..bc1ae9052d 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/XORRawEncoder.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/XORRawEncoder.java @@ -19,6 +19,8 @@ import java.nio.ByteBuffer; +import org.apache.hadoop.classification.InterfaceAudience; + /** * A raw encoder in XOR code scheme in pure Java, adapted from HDFS-RAID. * @@ -26,6 +28,7 @@ * used in advanced codes, like HitchHiker and LRC, though itself is rarely * deployed independently. */ +@InterfaceAudience.Private public class XORRawEncoder extends AbstractRawErasureEncoder { public XORRawEncoder(int numDataUnits, int numParityUnits) { diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/XORRawErasureCoderFactory.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/XORRawErasureCoderFactory.java index de20c950eb..312369034d 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/XORRawErasureCoderFactory.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/XORRawErasureCoderFactory.java @@ -17,9 +17,12 @@ */ package org.apache.hadoop.io.erasurecode.rawcoder; +import org.apache.hadoop.classification.InterfaceAudience; + /** * A raw coder factory for raw XOR coder. */ +@InterfaceAudience.Private public class XORRawErasureCoderFactory implements RawErasureCoderFactory { @Override diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/util/DumpUtil.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/util/DumpUtil.java index c8f133f765..785539cbee 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/util/DumpUtil.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/util/DumpUtil.java @@ -17,12 +17,14 @@ */ package org.apache.hadoop.io.erasurecode.rawcoder.util; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.io.erasurecode.ECChunk; /** * A dump utility class for debugging data erasure coding/decoding issues. Don't * suggest they are used in runtime production codes. */ +@InterfaceAudience.Private public final class DumpUtil { private static final String HEX_CHARS_STR = "0123456789ABCDEF"; private static final char[] HEX_CHARS = HEX_CHARS_STR.toCharArray(); diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/util/GaloisField.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/util/GaloisField.java index 03683b03de..fdb47be9c9 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/util/GaloisField.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/util/GaloisField.java @@ -21,10 +21,13 @@ import java.util.HashMap; import java.util.Map; +import org.apache.hadoop.classification.InterfaceAudience; + /** * Implementation of Galois field arithmetic with 2^p elements. The input must * be unsigned integers. It's ported from HDFS-RAID, slightly adapted. */ +@InterfaceAudience.Private public class GaloisField { // Field size 256 is good for byte based system diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/util/RSUtil.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/util/RSUtil.java index 8badf021d2..d6a10a4dc0 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/util/RSUtil.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/util/RSUtil.java @@ -17,9 +17,12 @@ */ package org.apache.hadoop.io.erasurecode.rawcoder.util; +import org.apache.hadoop.classification.InterfaceAudience; + /** * Some utilities for Reed-Solomon coding. */ +@InterfaceAudience.Private public class RSUtil { // We always use the byte system (with symbol size 8, field size 256, diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSStripedInputStream.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSStripedInputStream.java index 826509014d..5dadd82b6c 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSStripedInputStream.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSStripedInputStream.java @@ -18,6 +18,7 @@ package org.apache.hadoop.hdfs; import com.google.common.base.Preconditions; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.fs.ChecksumException; import org.apache.hadoop.fs.ReadOption; import org.apache.hadoop.hdfs.protocol.DatanodeInfo; @@ -61,6 +62,7 @@ /** * DFSStripedInputStream reads from striped block groups */ +@InterfaceAudience.Private public class DFSStripedInputStream extends DFSInputStream { private static class ReaderRetryPolicy { diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/StripedDataStreamer.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/StripedDataStreamer.java index f74edc830f..ebd04d67a1 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/StripedDataStreamer.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/StripedDataStreamer.java @@ -21,6 +21,7 @@ import java.io.IOException; import java.util.concurrent.atomic.AtomicReference; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.fs.StorageType; import org.apache.hadoop.hdfs.DFSStripedOutputStream.Coordinator; import org.apache.hadoop.hdfs.protocol.DatanodeInfo; @@ -41,6 +42,7 @@ * sends an rpc call to the namenode and then populates the result for the * other streamers. */ +@InterfaceAudience.Private public class StripedDataStreamer extends DataStreamer { private final Coordinator coordinator; private final int index; diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ErasureCodingPolicy.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ErasureCodingPolicy.java index c976538ae7..068156da42 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ErasureCodingPolicy.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ErasureCodingPolicy.java @@ -17,11 +17,15 @@ */ package org.apache.hadoop.hdfs.protocol; +import org.apache.hadoop.classification.InterfaceAudience; +import org.apache.hadoop.classification.InterfaceStability; import org.apache.hadoop.io.erasurecode.ECSchema; /** * A policy about how to write/read/code an erasure coding file. */ +@InterfaceAudience.Public +@InterfaceStability.Evolving public final class ErasureCodingPolicy { private final String name; diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index bd539ab7a2..ee6d19dda2 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -173,6 +173,9 @@ Trunk (Unreleased) HDFS-9182. Cleanup the findbugs and other issues after HDFS EC merged to trunk. (umamahesh) + HDFS-8632. Add InterfaceAudience annotation to the erasure coding classes. + (Rakesh R via wang) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockInfoStriped.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockInfoStriped.java index d1067b3e03..d65329e6bd 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockInfoStriped.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockInfoStriped.java @@ -17,6 +17,7 @@ */ package org.apache.hadoop.hdfs.server.blockmanagement; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.hdfs.protocol.Block; import org.apache.hadoop.hdfs.server.common.HdfsServerConstants.BlockUCState; import org.apache.hadoop.hdfs.util.StripedBlockUtil; @@ -35,6 +36,7 @@ * array's size can be larger than (m+k). Thus currently we use an extra byte * array to record the block index for each triplet. */ +@InterfaceAudience.Private public class BlockInfoStriped extends BlockInfo { private final ErasureCodingPolicy ecPolicy; /** diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicies.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicies.java index 622b2581fd..6687e07550 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicies.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicies.java @@ -17,11 +17,13 @@ */ package org.apache.hadoop.hdfs.server.blockmanagement; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdfs.DFSConfigKeys; import org.apache.hadoop.net.NetworkTopology; import org.apache.hadoop.util.ReflectionUtils; +@InterfaceAudience.Private public class BlockPlacementPolicies{ private final BlockPlacementPolicy replicationPolicy; diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/erasurecode/ErasureCodingWorker.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/erasurecode/ErasureCodingWorker.java index 0637c18e37..d7140d8f78 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/erasurecode/ErasureCodingWorker.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/erasurecode/ErasureCodingWorker.java @@ -45,6 +45,7 @@ import java.util.concurrent.atomic.AtomicInteger; import org.apache.commons.logging.Log; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.StorageType; import org.apache.hadoop.hdfs.BlockReader; @@ -86,6 +87,7 @@ * response. BPOfferService delegates the work to this class for handling EC * commands. */ +@InterfaceAudience.Private public final class ErasureCodingWorker { private static final Log LOG = DataNode.LOG; diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/erasurecode/ECCli.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/erasurecode/ECCli.java index 4ed9d0ae85..c7ce714421 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/erasurecode/ECCli.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/erasurecode/ECCli.java @@ -16,6 +16,7 @@ */ package org.apache.hadoop.hdfs.tools.erasurecode; +import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FsShell; import org.apache.hadoop.fs.shell.CommandFactory; @@ -25,6 +26,7 @@ /** * CLI for the erasure code encoding operations. */ +@InterfaceAudience.Private public class ECCli extends FsShell { private final static String usagePrefix =