diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/audit/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/audit/package-info.java
index 16c224940dd03..a69d422929426 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/audit/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/audit/package-info.java
@@ -19,11 +19,11 @@
/**
* Public classes for adding information to any auditing information
* picked up by filesystem clients.
- *
*/
-@InterfaceAudience.Public
-@InterfaceStability.Unstable
+
+@Public
+@Unstable
package org.apache.hadoop.fs.audit;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
\ No newline at end of file
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
\ No newline at end of file
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/impl/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/impl/package-info.java
index f1cd76c8f8c83..5d1b86a0c07b9 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/impl/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/impl/package-info.java
@@ -41,9 +41,9 @@
* are highly unstable.
*/
-@InterfaceAudience.LimitedPrivate("Filesystems")
-@InterfaceStability.Unstable
+@LimitedPrivate("Filesystems")
+@Unstable
package org.apache.hadoop.fs.impl;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/impl/prefetch/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/impl/prefetch/package-info.java
index 1b26da85d95fb..3069b7a258117 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/impl/prefetch/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/impl/prefetch/package-info.java
@@ -20,9 +20,9 @@
* block caching for use in object store clients.
*/
-@InterfaceAudience.Private
-@InterfaceStability.Unstable
+@Private
+@Unstable
package org.apache.hadoop.fs.impl.prefetch;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
\ No newline at end of file
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
\ No newline at end of file
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/local/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/local/package-info.java
index 48d6644e99b9e..71cecb1f8cc25 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/local/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/local/package-info.java
@@ -15,8 +15,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-@InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"})
-@InterfaceStability.Unstable
+
+@LimitedPrivate({"HDFS", "MapReduce"})
+@Unstable
package org.apache.hadoop.fs.local;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
+
+import org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/package-info.java
index 6cee4eec0b544..5e4718b95840c 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/package-info.java
@@ -18,8 +18,10 @@
/**
* This package provides support for HDFS permission and ACL.
*/
-@InterfaceAudience.Private
-@InterfaceStability.Unstable
+
+@Private
+@Unstable
package org.apache.hadoop.fs.permission;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
+
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/package-info.java
index 92720bff69b16..a139a4631ba4f 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/package-info.java
@@ -15,9 +15,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-@InterfaceAudience.Private
-@InterfaceStability.Unstable
+
+@Private
+@Unstable
package org.apache.hadoop.fs.shell;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
+
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/statistics/impl/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/statistics/impl/package-info.java
index 3ff7dacadce7a..11fc68ceb460a 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/statistics/impl/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/statistics/impl/package-info.java
@@ -23,9 +23,9 @@
* place over minor point releases.
*/
-@InterfaceAudience.LimitedPrivate("Filesystems")
-@InterfaceStability.Unstable
+@LimitedPrivate("Filesystems")
+@Unstable
package org.apache.hadoop.fs.statistics.impl;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/statistics/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/statistics/package-info.java
index bf46b33a516c6..a33d4935b5ff0 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/statistics/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/statistics/package-info.java
@@ -126,9 +126,9 @@
*
*/
-@InterfaceAudience.Public
-@InterfaceStability.Unstable
+@Public
+@Unstable
package org.apache.hadoop.fs.statistics;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/store/audit/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/store/audit/package-info.java
index 98fb5b59c3ac0..ac657fc307926 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/store/audit/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/store/audit/package-info.java
@@ -21,9 +21,10 @@
* use within the hadoop-* modules only. No stability guarantees.
* The public/evolving API is in {@code org.apache.hadoop.fs.audit}.
*/
-@InterfaceAudience.Private
-@InterfaceStability.Unstable
+
+@Private
+@Unstable
package org.apache.hadoop.fs.store.audit;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/store/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/store/package-info.java
index ebe1db479b42f..c77d4f7f3e942 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/store/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/store/package-info.java
@@ -20,9 +20,10 @@
* This package is for classes to be shared across object stores; for internal
* use within the hadoop-* modules only. No stability guarantees.
*/
-@InterfaceAudience.Private
-@InterfaceStability.Unstable
+
+@Private
+@Unstable
package org.apache.hadoop.fs.store;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/package-info.java
index 89986d0e5ef69..b83ef3920310d 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/package-info.java
@@ -18,9 +18,10 @@
/**
* ViewFileSystem and ViewFileSystemOverloadScheme classes.
*/
-@InterfaceAudience.LimitedPrivate({"MapReduce", "HBase", "Hive" })
-@InterfaceStability.Stable
+
+@LimitedPrivate({"MapReduce", "HBase", "Hive"})
+@Stable
package org.apache.hadoop.fs.viewfs;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/package-info.java
index 32bbbf223073a..65e9e7a7e2877 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/package-info.java
@@ -15,8 +15,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-@InterfaceAudience.LimitedPrivate({"HBase", "HDFS", "MapReduce"})
-@InterfaceStability.Unstable
+
+@LimitedPrivate({"HBase", "HDFS", "MapReduce"})
+@Unstable
package org.apache.hadoop.http;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
+
+import org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/bzip2/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/bzip2/package-info.java
index 785170eaf6297..3c0b3503a72b8 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/bzip2/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/bzip2/package-info.java
@@ -15,9 +15,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-@InterfaceAudience.Private
-@InterfaceStability.Unstable
+
+@Private
+@Unstable
package org.apache.hadoop.io.compress.bzip2;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
+
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/lz4/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/lz4/package-info.java
index 11827f1748628..33cffb6981556 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/lz4/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/lz4/package-info.java
@@ -15,9 +15,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-@InterfaceAudience.Private
-@InterfaceStability.Unstable
+
+@Private
+@Unstable
package org.apache.hadoop.io.compress.lz4;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
+
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/snappy/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/snappy/package-info.java
index eedf6550833b1..a59acf614196b 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/snappy/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/snappy/package-info.java
@@ -15,9 +15,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-@InterfaceAudience.Private
-@InterfaceStability.Unstable
+
+@Private
+@Unstable
package org.apache.hadoop.io.compress.snappy;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
+
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zlib/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zlib/package-info.java
index 33d0a8d7cebf8..a6f9280a4c74a 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zlib/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zlib/package-info.java
@@ -15,9 +15,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-@InterfaceAudience.Private
-@InterfaceStability.Unstable
+
+@Private
+@Unstable
package org.apache.hadoop.io.compress.zlib;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
+
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zstd/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zstd/package-info.java
index 9069070f73a45..f91a04b683910 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zstd/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zstd/package-info.java
@@ -15,8 +15,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-@InterfaceAudience.Private
-@InterfaceStability.Unstable
+
+@Private
+@Unstable
package org.apache.hadoop.io.compress.zstd;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
+
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/codec/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/codec/package-info.java
index ddfdd4b75bac8..4002f5f2a69b3 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/codec/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/codec/package-info.java
@@ -7,22 +7,25 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
+ *
+ * Erasure codec framework.
*/
/**
* Erasure codec framework.
*/
-@InterfaceAudience.Private
-@InterfaceStability.Unstable
+
+@Private
+@Unstable
package org.apache.hadoop.io.erasurecode.codec;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/package-info.java
index 8ea40c5ca1b33..c1aeb8445c680 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/coder/package-info.java
@@ -7,22 +7,25 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
+ *
+ * Erasure coders framework.
*/
/**
* Erasure coders framework.
*/
-@InterfaceAudience.Private
-@InterfaceStability.Unstable
+
+@Private
+@Unstable
package org.apache.hadoop.io.erasurecode.coder;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/package-info.java
index 034cdf2e70455..a670fb3f7621d 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/package-info.java
@@ -7,13 +7,26 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
+ *
+ *
+ * Raw erasure coders.
+ *
+ * Raw erasure coder is part of erasure codec framework, where erasure coder is
+ * used to encode/decode a group of blocks (BlockGroup) according to the codec
+ * specific BlockGroup layout and logic. An erasure coder extracts chunks of
+ * data from the blocks and can employ various low level raw erasure coders to
+ * perform encoding/decoding against the chunks.
+ *
+ * To distinguish from erasure coder, here raw erasure coder is used to mean the
+ * low level constructs, since it only takes care of the math calculation with
+ * a group of byte buffers.
*/
/**
@@ -30,9 +43,10 @@
* low level constructs, since it only takes care of the math calculation with
* a group of byte buffers.
*/
-@InterfaceAudience.Private
-@InterfaceStability.Unstable
+
+@Private
+@Unstable
package org.apache.hadoop.io.erasurecode.rawcoder;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
\ No newline at end of file
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
\ No newline at end of file
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/util/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/util/package-info.java
index c2339ac1444a4..7ee9492cad428 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/util/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/util/package-info.java
@@ -7,21 +7,24 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
+ *
+ * General helpers for implementing raw erasure coders.
*/
/**
* General helpers for implementing raw erasure coders.
*/
-@InterfaceAudience.Private
-@InterfaceStability.Unstable
+
+@Private
+@Unstable
package org.apache.hadoop.io.erasurecode.rawcoder.util;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
\ No newline at end of file
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
\ No newline at end of file
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/nativeio/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/nativeio/package-info.java
index 346f895e6507f..3c54585eafc61 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/nativeio/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/nativeio/package-info.java
@@ -15,9 +15,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-@InterfaceAudience.Private
-@InterfaceStability.Unstable
+
+@Private
+@Unstable
package org.apache.hadoop.io.nativeio;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
+
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/package-info.java
index 089cf6f54c7a5..cd71b54bea6fa 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/package-info.java
@@ -20,12 +20,12 @@
* A mechanism for selectively retrying methods that throw exceptions under
* certain circumstances.
* Typical usage is
- * UnreliableImplementation unreliableImpl = new UnreliableImplementation();
- * UnreliableInterface unreliable = (UnreliableInterface)
- * RetryProxy.create(UnreliableInterface.class, unreliableImpl,
- * RetryPolicies.retryUpToMaximumCountWithFixedSleep(4, 10,
- * TimeUnit.SECONDS));
- * unreliable.call();
+ * UnreliableImplementation unreliableImpl = new UnreliableImplementation();
+ * UnreliableInterface unreliable = (UnreliableInterface)
+ * RetryProxy.create(UnreliableInterface.class, unreliableImpl,
+ * RetryPolicies.retryUpToMaximumCountWithFixedSleep(4, 10,
+ * TimeUnit.SECONDS));
+ * unreliable.call();
*
* This will retry any method called on unreliable four times -
* in this case the call() method - sleeping 10 seconds between
@@ -37,8 +37,10 @@
* {@link org.apache.hadoop.io.retry.RetryProxy#create(Class, Object, Map)
* per-method basis}.
*/
-@InterfaceAudience.LimitedPrivate({"HBase", "HDFS", "MapReduce"})
-@InterfaceStability.Evolving
+
+@LimitedPrivate({"HBase", "HDFS", "MapReduce"})
+@Evolving
package org.apache.hadoop.io.retry;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
+
+import org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate;
+import org.apache.hadoop.classification.InterfaceStability.Evolving;
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/metrics/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/metrics/package-info.java
index 262ed0d251a0e..a09a1fdd582eb 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/metrics/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/metrics/package-info.java
@@ -19,8 +19,10 @@
/**
* RPC related metrics.
*/
-@InterfaceAudience.Private
-@InterfaceStability.Evolving
+
+@Private
+@Evolving
package org.apache.hadoop.ipc.metrics;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
+
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceStability.Evolving;
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/package-info.java
index cb35e938483b0..9d8c4d1a51c67 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/package-info.java
@@ -19,8 +19,10 @@
/**
* Tools to help define network clients and servers.
*/
-@InterfaceAudience.LimitedPrivate({"HBase", "HDFS", "MapReduce"})
-@InterfaceStability.Evolving
+@LimitedPrivate({"HBase", "HDFS", "MapReduce"})
+@Evolving
package org.apache.hadoop.ipc;
import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate;
import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.classification.InterfaceStability.Evolving;
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/jmx/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/jmx/package-info.java
index ef227f0b7041c..1fc754571dc25 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/jmx/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/jmx/package-info.java
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,7 +19,8 @@
* This package provides access to JMX primarily through the
* {@link org.apache.hadoop.jmx.JMXJsonServlet} class.
*/
-@InterfaceAudience.Private
+
+@Private
package org.apache.hadoop.jmx;
-import org.apache.hadoop.classification.InterfaceAudience;
\ No newline at end of file
+import org.apache.hadoop.classification.InterfaceAudience.Private;
\ No newline at end of file
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/annotation/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/annotation/package-info.java
index de0f5d0a4e2b5..332a277186042 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/annotation/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/annotation/package-info.java
@@ -19,9 +19,10 @@
/**
* Annotation interfaces for metrics instrumentation
*/
-@InterfaceAudience.Public
-@InterfaceStability.Evolving
+
+@Public
+@Evolving
package org.apache.hadoop.metrics2.annotation;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Evolving;
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/filter/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/filter/package-info.java
index 1fa7f21134724..d38c9bc16e4d9 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/filter/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/filter/package-info.java
@@ -19,9 +19,10 @@
/**
* Builtin metrics filters (to be used in metrics config files)
*/
-@InterfaceAudience.Public
-@InterfaceStability.Evolving
+
+@Public
+@Evolving
package org.apache.hadoop.metrics2.filter;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
\ No newline at end of file
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Evolving;
\ No newline at end of file
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/impl/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/impl/package-info.java
index 82f490bf5adca..661f84bbe238d 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/impl/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/impl/package-info.java
@@ -19,9 +19,10 @@
/**
* A metrics system implementation
*/
-@InterfaceAudience.Private
-@InterfaceStability.Evolving
+
+@Private
+@Evolving
package org.apache.hadoop.metrics2.impl;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
\ No newline at end of file
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceStability.Evolving;
\ No newline at end of file
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/package-info.java
index 52c8104f2a56f..979aaba054171 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/package-info.java
@@ -19,9 +19,10 @@
/**
* A collection of library classes for implementing metrics sources
*/
-@InterfaceAudience.Public
-@InterfaceStability.Evolving
+
+@Public
+@Evolving
package org.apache.hadoop.metrics2.lib;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
\ No newline at end of file
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Evolving;
\ No newline at end of file
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/package-info.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/package-info.java
index 196469be9dce2..4388526d5c864 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/package-info.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/package-info.java
@@ -17,338 +17,339 @@
*/
/**
-
This package provides a framework for metrics instrumentation - and publication. -
- -The framework provides a variety of ways to implement metrics - instrumentation easily via the simple - {@link org.apache.hadoop.metrics2.MetricsSource} interface - or the even simpler and more concise and declarative metrics annotations. - The consumers of metrics just need to implement the simple - {@link org.apache.hadoop.metrics2.MetricsSink} interface. Producers - register the metrics sources with a metrics system, while consumers - register the sinks. A default metrics system is provided to marshal - metrics from sources to sinks based on (per source/sink) configuration - options. All the metrics are also published and queryable via the - standard JMX MBean interface. This document targets the framework users. - Framework developers could also consult the - design - document for architecture and implementation notes. -
-org.apache.hadoop.metrics2.annotationorg.apache.hadoop.metrics2.implorg.apache.hadoop.metrics2.liborg.apache.hadoop.metrics2.filterorg.apache.hadoop.metrics2.sourceorg.apache.hadoop.metrics2.sinkorg.apache.hadoop.metrics2.util| Using annotations | Using MetricsSource interface | -
|---|---|
-
- @Metrics(context="MyContext")
- class MyStat {
-
- @Metric("My metric description")
- public int getMyMetric() {
- return 42;
- }
- } |
-
- class MyStat implements MetricsSource {
-
- @Override
- public void getMetrics(MetricsCollector collector, boolean all) {
- collector.addRecord("MyStat")
- .setContext("MyContext")
- .addGauge(info("MyMetric", "My metric description"), 42);
- }
- }
-
- |
-
In this example we introduced the following:
-Note, the {@link org.apache.hadoop.metrics2.MetricsSource} interface is - more verbose but more flexible, - allowing generated metrics names and multiple records. In fact, the - annotation interface is implemented with the MetricsSource interface - internally.
-
- public class MySink implements MetricsSink {
- public void putMetrics(MetricsRecord record) {
- System.out.print(record);
- }
- public void init(SubsetConfiguration conf) {}
- public void flush() {}
- }
- In this example there are three additional concepts:
-In order to make use our MyMetrics and MySink,
- they need to be hooked up to a metrics system. In this case (and most
- cases), the DefaultMetricsSystem would suffice.
-
- DefaultMetricsSystem.initialize("test"); // called once per application
- DefaultMetricsSystem.register(new MyStat());
- Sinks are usually specified in a configuration file, say, - "hadoop-metrics2-test.properties", as: -
-- test.sink.mysink0.class=com.example.hadoop.metrics.MySink-
The configuration syntax is:
-- [prefix].[source|sink|jmx|].[instance].[option]-
In the previous example, test is the prefix and
- mysink0 is an instance name.
- DefaultMetricsSystem would try to load
- hadoop-metrics2-[prefix].properties first, and if not found,
- try the default hadoop-metrics2.properties in the class path.
- Note, the [instance] is an arbitrary name to uniquely
- identify a particular sink instance. The asterisk (*) can be
- used to specify default options.
-
Consult the metrics instrumentation in jvm, rpc, hdfs and mapred, etc. - for more examples. -
- -One of the features of the default metrics system is metrics filtering - configuration by source, context, record/tags and metrics. The least - expensive way to filter out metrics would be at the source level, e.g., - filtering out source named "MyMetrics". The most expensive way would be - per metric filtering. -
-Here are some examples:
-- test.sink.file0.class=org.apache.hadoop.metrics2.sink.FileSink - test.sink.file0.context=foo-
In this example, we configured one sink instance that would
- accept metrics from context foo only.
-
- *.source.filter.class=org.apache.hadoop.metrics2.filter.GlobFilter - test.*.source.filter.include=foo - test.*.source.filter.exclude=bar-
In this example, we specify a source filter that includes source
- foo and excludes bar. When only include
- patterns are specified, the filter operates in the white listing mode,
- where only matched sources are included. Likewise, when only exclude
- patterns are specified, only matched sources are excluded. Sources that
- are not matched in either patterns are included as well when both patterns
- are present. Note, the include patterns have precedence over the exclude
- patterns.
-
Similarly, you can specify the record.filter and
- metric.filter options, which operate at record and metric
- level, respectively. Filters can be combined to optimize
- the filtering efficiency.
- @Metrics(about="My metrics description", context="MyContext")
- class MyMetrics extends MyInstrumentation {
-
- @Metric("My gauge description") MutableGaugeInt gauge0;
- @Metric("My counter description") MutableCounterLong counter0;
- @Metric("My rate description") MutableRate rate0;
-
- @Override public void setGauge0(int value) { gauge0.set(value); }
- @Override public void incrCounter0() { counter0.incr(); }
- @Override public void addRate0(long elapsed) { rate0.add(elapsed); }
- }
-
-
- Note, in this example we introduced the following:
- snapshot. The MutableRate
- in particular, provides a way to measure latency and throughput of an
- operation. In this particular case, it produces a long counter
- "Rate0NumOps" and double gauge "Rate0AvgTime" when snapshotted.
- Users of the previous metrics system would notice the lack of
- context prefix in the configuration examples. The new
- metrics system decouples the concept for context (for grouping) with the
- implementation where a particular context object does the updating and
- publishing of metrics, which causes problems when you want to have a
- single context to be consumed by multiple backends. You would also have to
- configure an implementation instance per context, even if you have a
- backend that can handle multiple contexts (file, gangalia etc.):
-
| Before | After | -
|---|---|
- context1.class=org.hadoop.metrics.file.FileContext - context2.class=org.hadoop.metrics.file.FileContext - ... - contextn.class=org.hadoop.metrics.file.FileContext- |
- - myprefix.sink.file.class=org.hadoop.metrics2.sink.FileSink- |
-
In the new metrics system, you can simulate the previous behavior by - using the context option in the sink options like the following: -
-| Before | After | -
|---|---|
- context0.class=org.hadoop.metrics.file.FileContext - context0.fileName=context0.out - context1.class=org.hadoop.metrics.file.FileContext - context1.fileName=context1.out - ... - contextn.class=org.hadoop.metrics.file.FileContext - contextn.fileName=contextn.out- |
- - myprefix.sink.*.class=org.apache.hadoop.metrics2.sink.FileSink - myprefix.sink.file0.context=context0 - myprefix.sink.file0.filename=context0.out - myprefix.sink.file1.context=context1 - myprefix.sink.file1.filename=context1.out - ... - myprefix.sink.filen.context=contextn - myprefix.sink.filen.filename=contextn.out- |
-
to send metrics of a particular context to a particular backend. Note,
- myprefix is an arbitrary prefix for configuration groupings,
- typically they are the name of a particular process
- (namenode, jobtracker, etc.)
-
This package provides a framework for metrics instrumentation + * and publication. + *
+ * + *The framework provides a variety of ways to implement metrics + * instrumentation easily via the simple + * {@link org.apache.hadoop.metrics2.MetricsSource} interface + * or the even simpler and more concise and declarative metrics annotations. + * The consumers of metrics just need to implement the simple + * {@link org.apache.hadoop.metrics2.MetricsSink} interface. Producers + * register the metrics sources with a metrics system, while consumers + * register the sinks. A default metrics system is provided to marshal + * metrics from sources to sinks based on (per source/sink) configuration + * options. All the metrics are also published and queryable via the + * standard JMX MBean interface. This document targets the framework users. + * Framework developers could also consult the + * design + * document for architecture and implementation notes. + *
+ *org.apache.hadoop.metrics2.annotationorg.apache.hadoop.metrics2.implorg.apache.hadoop.metrics2.liborg.apache.hadoop.metrics2.filterorg.apache.hadoop.metrics2.sourceorg.apache.hadoop.metrics2.sinkorg.apache.hadoop.metrics2.util| Using annotations | Using MetricsSource interface | + *
|---|---|
+ *
+ * @Metrics(context="MyContext")
+ * class MyStat {
+ *
+ * @Metric("My metric description")
+ * public int getMyMetric() {
+ * return 42;
+ * }
+ * } |
+ *
+ * class MyStat implements MetricsSource {
+ *
+ * @Override
+ * public void getMetrics(MetricsCollector collector, boolean all) {
+ * collector.addRecord("MyStat")
+ * .setContext("MyContext")
+ * .addGauge(info("MyMetric", "My metric description"), 42);
+ * }
+ * }
+ *
+ * |
+ *
In this example we introduced the following:
+ *Note, the {@link org.apache.hadoop.metrics2.MetricsSource} interface is + * more verbose but more flexible, + * allowing generated metrics names and multiple records. In fact, the + * annotation interface is implemented with the MetricsSource interface + * internally.
+ *
+ * public class MySink implements MetricsSink {
+ * public void putMetrics(MetricsRecord record) {
+ * System.out.print(record);
+ * }
+ * public void init(SubsetConfiguration conf) {}
+ * public void flush() {}
+ * }
+ * In this example there are three additional concepts:
+ *In order to make use our MyMetrics and MySink,
+ * they need to be hooked up to a metrics system. In this case (and most
+ * cases), the DefaultMetricsSystem would suffice.
+ *
+ * DefaultMetricsSystem.initialize("test"); // called once per application
+ * DefaultMetricsSystem.register(new MyStat());
+ * Sinks are usually specified in a configuration file, say, + * "hadoop-metrics2-test.properties", as: + *
+ *+ * test.sink.mysink0.class=com.example.hadoop.metrics.MySink+ *
The configuration syntax is:
+ *+ * [prefix].[source|sink|jmx|].[instance].[option]+ *
In the previous example, test is the prefix and
+ * mysink0 is an instance name.
+ * DefaultMetricsSystem would try to load
+ * hadoop-metrics2-[prefix].properties first, and if not found,
+ * try the default hadoop-metrics2.properties in the class path.
+ * Note, the [instance] is an arbitrary name to uniquely
+ * identify a particular sink instance. The asterisk (*) can be
+ * used to specify default options.
+ *
Consult the metrics instrumentation in jvm, rpc, hdfs and mapred, etc. + * for more examples. + *
+ * + *One of the features of the default metrics system is metrics filtering + * configuration by source, context, record/tags and metrics. The least + * expensive way to filter out metrics would be at the source level, e.g., + * filtering out source named "MyMetrics". The most expensive way would be + * per metric filtering. + *
+ *Here are some examples:
+ *+ * test.sink.file0.class=org.apache.hadoop.metrics2.sink.FileSink + * test.sink.file0.context=foo+ *
In this example, we configured one sink instance that would
+ * accept metrics from context foo only.
+ *
+ * .source.filter.class=org.apache.hadoop.metrics2.filter.GlobFilter + * test.*.source.filter.include=foo + * test.*.source.filter.exclude=bar+ *
In this example, we specify a source filter that includes source
+ * foo and excludes bar. When only include
+ * patterns are specified, the filter operates in the white listing mode,
+ * where only matched sources are included. Likewise, when only exclude
+ * patterns are specified, only matched sources are excluded. Sources that
+ * are not matched in either patterns are included as well when both patterns
+ * are present. Note, the include patterns have precedence over the exclude
+ * patterns.
+ *
Similarly, you can specify the record.filter and
+ * metric.filter options, which operate at record and metric
+ * level, respectively. Filters can be combined to optimize
+ * the filtering efficiency.
+ * @Metrics(about="My metrics description", context="MyContext")
+ * class MyMetrics extends MyInstrumentation {
+ *
+ * @Metric("My gauge description") MutableGaugeInt gauge0;
+ * @Metric("My counter description") MutableCounterLong counter0;
+ * @Metric("My rate description") MutableRate rate0;
+ *
+ * @Override public void setGauge0(int value) { gauge0.set(value); }
+ * @Override public void incrCounter0() { counter0.incr(); }
+ * @Override public void addRate0(long elapsed) { rate0.add(elapsed); }
+ * }
+ *
+ *
+ * Note, in this example we introduced the following:
+ * snapshot. The MutableRate
+ * in particular, provides a way to measure latency and throughput of an
+ * operation. In this particular case, it produces a long counter
+ * "Rate0NumOps" and double gauge "Rate0AvgTime" when snapshotted.
+ * Users of the previous metrics system would notice the lack of
+ * context prefix in the configuration examples. The new
+ * metrics system decouples the concept for context (for grouping) with the
+ * implementation where a particular context object does the updating and
+ * publishing of metrics, which causes problems when you want to have a
+ * single context to be consumed by multiple backends. You would also have to
+ * configure an implementation instance per context, even if you have a
+ * backend that can handle multiple contexts (file, gangalia etc.):
+ *
| Before | After | + *
|---|---|
+ * context1.class=org.hadoop.metrics.file.FileContext + * context2.class=org.hadoop.metrics.file.FileContext + * ... + * contextn.class=org.hadoop.metrics.file.FileContext+ * |
+ * + * myprefix.sink.file.class=org.hadoop.metrics2.sink.FileSink+ * |
+ *
In the new metrics system, you can simulate the previous behavior by + * using the context option in the sink options like the following: + *
+ *| Before | After | + *
|---|---|
+ * context0.class=org.hadoop.metrics.file.FileContext + * context0.fileName=context0.out + * context1.class=org.hadoop.metrics.file.FileContext + * context1.fileName=context1.out + * ... + * contextn.class=org.hadoop.metrics.file.FileContext + * contextn.fileName=contextn.out+ * |
+ * + * myprefix.sink.*.class=org.apache.hadoop.metrics2.sink.FileSink + * myprefix.sink.file0.context=context0 + * myprefix.sink.file0.filename=context0.out + * myprefix.sink.file1.context=context1 + * myprefix.sink.file1.filename=context1.out + * ... + * myprefix.sink.filen.context=contextn + * myprefix.sink.filen.filename=contextn.out+ * |
+ *
to send metrics of a particular context to a particular backend. Note,
+ * myprefix is an arbitrary prefix for configuration groupings,
+ * typically they are the name of a particular process
+ * (namenode, jobtracker, etc.)
+ *