You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flume.apache.org by hs...@apache.org on 2012/11/06 22:07:21 UTC
git commit: FLUME-1629. Add Audience/Stability annotations
Updated Branches:
refs/heads/trunk c145b2b8c -> e6ad27cb4
FLUME-1629. Add Audience/Stability annotations
(Brock Noland via Hari Shreedharan)
Project: http://git-wip-us.apache.org/repos/asf/flume/repo
Commit: http://git-wip-us.apache.org/repos/asf/flume/commit/e6ad27cb
Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/e6ad27cb
Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/e6ad27cb
Branch: refs/heads/trunk
Commit: e6ad27cb46704c798082a349c3801d8825eb8f32
Parents: c145b2b
Author: Hari Shreedharan <hs...@apache.org>
Authored: Tue Nov 6 12:45:46 2012 -0800
Committer: Hari Shreedharan <hs...@apache.org>
Committed: Tue Nov 6 12:45:46 2012 -0800
----------------------------------------------------------------------
.../org/apache/flume/channel/file/FileChannel.java | 13 +++
.../java/org/apache/flume/channel/file/Log.java | 4 +
.../org/apache/flume/channel/jdbc/JdbcChannel.java | 17 ++++-
.../memory/RecoverableMemoryChannel.java | 4 +
.../src/main/java/org/apache/flume/Channel.java | 4 +
.../main/java/org/apache/flume/NamedComponent.java | 5 +
.../src/main/java/org/apache/flume/Sink.java | 4 +
.../src/main/java/org/apache/flume/Source.java | 4 +
.../flume/annotations/InterfaceAudience.java | 66 +++++++++++++++
.../flume/annotations/InterfaceStability.java | 55 ++++++++++++
.../org/apache/flume/channel/AbstractChannel.java | 4 +
.../flume/channel/BasicChannelSemantics.java | 4 +
.../org/apache/flume/channel/MemoryChannel.java | 17 ++++-
.../java/org/apache/flume/conf/Configurable.java | 4 +
.../org/apache/flume/interceptor/Interceptor.java | 4 +
.../org/apache/flume/lifecycle/LifecycleAware.java | 5 +
.../flume/serialization/EventSerializer.java | 4 +
.../java/org/apache/flume/sink/AbstractSink.java | 4 +
.../org/apache/flume/source/AbstractSource.java | 4 +
19 files changed, 224 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flume/blob/e6ad27cb/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/FileChannel.java
----------------------------------------------------------------------
diff --git a/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/FileChannel.java b/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/FileChannel.java
index 6680a2c..d12ad9e 100644
--- a/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/FileChannel.java
+++ b/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/FileChannel.java
@@ -30,6 +30,8 @@ import org.apache.flume.Channel;
import org.apache.flume.ChannelException;
import org.apache.flume.Context;
import org.apache.flume.Event;
+import org.apache.flume.annotations.InterfaceAudience;
+import org.apache.flume.annotations.InterfaceStability;
import org.apache.flume.channel.BasicChannelSemantics;
import org.apache.flume.channel.BasicTransactionSemantics;
import org.apache.flume.channel.file.Log.Builder;
@@ -53,7 +55,18 @@ import com.google.common.base.Strings;
* specified in the configuration. Additionally, when a commit occurs
* the transaction is synced to disk.
* </p>
+ * <p>
+ * FileChannel is marked
+ * {@link org.apache.flume.annotations.InterfaceAudience.Private} because it
+ * should only be instantiated via a configuration. For example, users should
+ * certainly use FileChannel but not by instantiating FileChannel objects.
+ * Meaning the label Private applies to user-developers not user-operators.
+ * In cases where a Channel is required by instantiated by user-developers
+ * {@link org.apache.flume.channel.MemoryChannel} should be used.
+ * </p>
*/
+@InterfaceAudience.Private
+@InterfaceStability.Stable
public class FileChannel extends BasicChannelSemantics {
private static final Logger LOG = LoggerFactory
http://git-wip-us.apache.org/repos/asf/flume/blob/e6ad27cb/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/Log.java
----------------------------------------------------------------------
diff --git a/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/Log.java b/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/Log.java
index d68a601..6d1cf51 100644
--- a/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/Log.java
+++ b/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/Log.java
@@ -44,6 +44,8 @@ import javax.annotation.Nullable;
import org.apache.flume.ChannelException;
import org.apache.flume.Event;
+import org.apache.flume.annotations.InterfaceAudience;
+import org.apache.flume.annotations.InterfaceStability;
import org.apache.flume.channel.file.encryption.KeyProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -64,6 +66,8 @@ import com.google.common.collect.Maps;
* the operation and any additional modifications of the
* FlumeEventQueue, the Log.unlockShared method should be called.
*/
+@InterfaceAudience.Private
+@InterfaceStability.Unstable
class Log {
public static final String PREFIX = "log-";
private static final Logger LOGGER = LoggerFactory.getLogger(Log.class);
http://git-wip-us.apache.org/repos/asf/flume/blob/e6ad27cb/flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/JdbcChannel.java
----------------------------------------------------------------------
diff --git a/flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/JdbcChannel.java b/flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/JdbcChannel.java
index bca0c50..5da979e 100644
--- a/flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/JdbcChannel.java
+++ b/flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/JdbcChannel.java
@@ -21,12 +21,27 @@ import org.apache.flume.ChannelException;
import org.apache.flume.Context;
import org.apache.flume.Event;
import org.apache.flume.Transaction;
+import org.apache.flume.annotations.InterfaceAudience;
+import org.apache.flume.annotations.InterfaceStability;
import org.apache.flume.channel.AbstractChannel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- * <p>A JDBC based channel implementation.</p>
+ * <p>
+ * A JDBC based channel implementation.
+ * </p>
+ * <p>
+ * JdbcChannel is marked
+ * {@link org.apache.flume.annotations.InterfaceAudience.Private} because it
+ * should only be instantiated via a configuration. For example, users should
+ * certainly use JdbcChannel but not by instantiating JdbcChannel objects.
+ * Meaning the label Private applies to user-developers not user-operators.
+ * In cases where a Channel is required by instantiated by user-developers
+ * {@link org.apache.flume.channel.MemoryChannel} should be used.
+ * <p>
*/
+@InterfaceAudience.Private
+@InterfaceStability.Stable
public class JdbcChannel extends AbstractChannel {
private static final Logger LOG = LoggerFactory.getLogger(JdbcChannel.class);
http://git-wip-us.apache.org/repos/asf/flume/blob/e6ad27cb/flume-ng-channels/flume-recoverable-memory-channel/src/main/java/org/apache/flume/channel/recoverable/memory/RecoverableMemoryChannel.java
----------------------------------------------------------------------
diff --git a/flume-ng-channels/flume-recoverable-memory-channel/src/main/java/org/apache/flume/channel/recoverable/memory/RecoverableMemoryChannel.java b/flume-ng-channels/flume-recoverable-memory-channel/src/main/java/org/apache/flume/channel/recoverable/memory/RecoverableMemoryChannel.java
index 49e7cfd..89296b7 100644
--- a/flume-ng-channels/flume-recoverable-memory-channel/src/main/java/org/apache/flume/channel/recoverable/memory/RecoverableMemoryChannel.java
+++ b/flume-ng-channels/flume-recoverable-memory-channel/src/main/java/org/apache/flume/channel/recoverable/memory/RecoverableMemoryChannel.java
@@ -31,6 +31,8 @@ import org.apache.flume.ChannelException;
import org.apache.flume.Context;
import org.apache.flume.Event;
import org.apache.flume.Transaction;
+import org.apache.flume.annotations.InterfaceAudience;
+import org.apache.flume.annotations.InterfaceStability;
import org.apache.flume.channel.BasicChannelSemantics;
import org.apache.flume.channel.BasicTransactionSemantics;
import org.apache.flume.channel.MemoryChannel;
@@ -56,6 +58,8 @@ import com.google.common.collect.Lists;
*/
@Deprecated
+@InterfaceAudience.Private
+@InterfaceStability.Unstable
public class RecoverableMemoryChannel extends BasicChannelSemantics {
private static final Logger LOG = LoggerFactory
http://git-wip-us.apache.org/repos/asf/flume/blob/e6ad27cb/flume-ng-core/src/main/java/org/apache/flume/Channel.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/Channel.java b/flume-ng-core/src/main/java/org/apache/flume/Channel.java
index 91ea7b6..f1ae724 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/Channel.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/Channel.java
@@ -17,6 +17,8 @@
*/
package org.apache.flume;
+import org.apache.flume.annotations.InterfaceAudience;
+import org.apache.flume.annotations.InterfaceStability;
import org.apache.flume.lifecycle.LifecycleAware;
/**
@@ -51,6 +53,8 @@ import org.apache.flume.lifecycle.LifecycleAware;
* @see org.apache.flume.Sink
* @see org.apache.flume.Transaction
*/
+@InterfaceAudience.Public
+@InterfaceStability.Stable
public interface Channel extends LifecycleAware, NamedComponent {
/**
http://git-wip-us.apache.org/repos/asf/flume/blob/e6ad27cb/flume-ng-core/src/main/java/org/apache/flume/NamedComponent.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/NamedComponent.java b/flume-ng-core/src/main/java/org/apache/flume/NamedComponent.java
index 1ecb8ea..ee70acd 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/NamedComponent.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/NamedComponent.java
@@ -18,10 +18,15 @@
*/
package org.apache.flume;
+import org.apache.flume.annotations.InterfaceAudience;
+import org.apache.flume.annotations.InterfaceStability;
+
/**
* Enables a component to be tagged with a name so that it can be referred
* to uniquely within the configuration system.
*/
+@InterfaceAudience.Public
+@InterfaceStability.Stable
public interface NamedComponent {
public void setName(String name);
http://git-wip-us.apache.org/repos/asf/flume/blob/e6ad27cb/flume-ng-core/src/main/java/org/apache/flume/Sink.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/Sink.java b/flume-ng-core/src/main/java/org/apache/flume/Sink.java
index 2567140..4d977da 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/Sink.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/Sink.java
@@ -19,6 +19,8 @@
package org.apache.flume;
+import org.apache.flume.annotations.InterfaceAudience;
+import org.apache.flume.annotations.InterfaceStability;
import org.apache.flume.lifecycle.LifecycleAware;
/**
@@ -45,6 +47,8 @@ import org.apache.flume.lifecycle.LifecycleAware;
* @see org.apache.flume.SinkProcessor
* @see org.apache.flume.SinkRunner
*/
+@InterfaceAudience.Public
+@InterfaceStability.Stable
public interface Sink extends LifecycleAware, NamedComponent {
/**
* <p>Sets the channel the sink will consume from</p>
http://git-wip-us.apache.org/repos/asf/flume/blob/e6ad27cb/flume-ng-core/src/main/java/org/apache/flume/Source.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/Source.java b/flume-ng-core/src/main/java/org/apache/flume/Source.java
index 4697126..8edce39 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/Source.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/Source.java
@@ -19,6 +19,8 @@
package org.apache.flume;
+import org.apache.flume.annotations.InterfaceAudience;
+import org.apache.flume.annotations.InterfaceStability;
import org.apache.flume.channel.ChannelProcessor;
import org.apache.flume.lifecycle.LifecycleAware;
@@ -41,6 +43,8 @@ import org.apache.flume.lifecycle.LifecycleAware;
* @see org.apache.flume.Channel
* @see org.apache.flume.Sink
*/
+@InterfaceAudience.Public
+@InterfaceStability.Stable
public interface Source extends LifecycleAware, NamedComponent {
/**
http://git-wip-us.apache.org/repos/asf/flume/blob/e6ad27cb/flume-ng-core/src/main/java/org/apache/flume/annotations/InterfaceAudience.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/annotations/InterfaceAudience.java b/flume-ng-core/src/main/java/org/apache/flume/annotations/InterfaceAudience.java
new file mode 100644
index 0000000..ad36f42
--- /dev/null
+++ b/flume-ng-core/src/main/java/org/apache/flume/annotations/InterfaceAudience.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flume.annotations;
+
+import java.lang.annotation.Documented;
+
+/**
+ * Annotation to inform users of a package, class or method's intended audience.
+ * Currently the audience can be {@link Public}, {@link LimitedPrivate} or
+ * {@link Private}. <br>
+ * All public classes must have InterfaceAudience annotation. <br>
+ * <ul>
+ * <li>Public classes that are not marked with this annotation must be
+ * considered by default as {@link Private}.</li>
+ *
+ * <li>External applications must only use classes that are marked
+ * {@link Public}. Avoid using non public classes as these classes
+ * could be removed or change in incompatible ways.</li>
+ *
+ * <li>Flume projects must only use classes that are marked
+ * {@link LimitedPrivate} or {@link Public}</li>
+ *
+ * <li> Methods may have a different annotation that it is more restrictive
+ * compared to the audience classification of the class. Example: A class
+ * might be {@link Public}, but a method may be {@link LimitedPrivate}
+ * </li></ul>
+ */
+@InterfaceAudience.Public
+@InterfaceStability.Evolving
+public class InterfaceAudience {
+ /**
+ * Intended for use by any project or application.
+ */
+ @Documented public @interface Public {};
+
+ /**
+ * Intended only for the project(s) specified in the annotation.
+ * For example, "Common", "HDFS", "MapReduce", "ZooKeeper", "HBase".
+ */
+ @Documented public @interface LimitedPrivate {
+ String[] value();
+ };
+
+ /**
+ * Intended for use only within Flume
+ */
+ @Documented public @interface Private {};
+
+ private InterfaceAudience() {} // Audience can't exist on its own
+}
http://git-wip-us.apache.org/repos/asf/flume/blob/e6ad27cb/flume-ng-core/src/main/java/org/apache/flume/annotations/InterfaceStability.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/annotations/InterfaceStability.java b/flume-ng-core/src/main/java/org/apache/flume/annotations/InterfaceStability.java
new file mode 100644
index 0000000..e946ac7
--- /dev/null
+++ b/flume-ng-core/src/main/java/org/apache/flume/annotations/InterfaceStability.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flume.annotations;
+import java.lang.annotation.Documented;
+
+/**
+ * Annotation to inform users of how much to rely on a particular package,
+ * class or method not changing over time. Currently the stability can be
+ * {@link Stable}, {@link Evolving} or {@link Unstable}. <br>
+ *
+ * <ul><li>All classes that are annotated with {@link Public} or
+ * {@link LimitedPrivate} must have InterfaceStability annotation. </li>
+ * <li>Classes that are {@link Private} are to be considered unstable unless
+ * a different InterfaceStability annotation states otherwise.</li>
+ * <li>Incompatible changes must not be made to classes marked as stable.</li>
+ */
+@InterfaceAudience.Public
+@InterfaceStability.Evolving
+public class InterfaceStability {
+ /**
+ * Can evolve while retaining compatibility for minor release boundaries.;
+ * can break compatibility only at major release (ie. at m.0).
+ */
+ @Documented
+ public @interface Stable {};
+
+ /**
+ * Evolving, but can break compatibility at minor release (i.e. m.x)
+ */
+ @Documented
+ public @interface Evolving {};
+
+ /**
+ * No guarantee is provided as to reliability or stability across any
+ * level of release granularity.
+ */
+ @Documented
+ public @interface Unstable {};
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flume/blob/e6ad27cb/flume-ng-core/src/main/java/org/apache/flume/channel/AbstractChannel.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/channel/AbstractChannel.java b/flume-ng-core/src/main/java/org/apache/flume/channel/AbstractChannel.java
index e662de9..1370e66 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/channel/AbstractChannel.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/channel/AbstractChannel.java
@@ -20,10 +20,14 @@ package org.apache.flume.channel;
import org.apache.flume.Channel;
import org.apache.flume.Context;
+import org.apache.flume.annotations.InterfaceAudience;
+import org.apache.flume.annotations.InterfaceStability;
import org.apache.flume.conf.Configurable;
import org.apache.flume.lifecycle.LifecycleAware;
import org.apache.flume.lifecycle.LifecycleState;
+@InterfaceAudience.Public
+@InterfaceStability.Stable
public abstract class AbstractChannel
implements Channel, LifecycleAware, Configurable {
http://git-wip-us.apache.org/repos/asf/flume/blob/e6ad27cb/flume-ng-core/src/main/java/org/apache/flume/channel/BasicChannelSemantics.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/channel/BasicChannelSemantics.java b/flume-ng-core/src/main/java/org/apache/flume/channel/BasicChannelSemantics.java
index ce00d42..9b2e69c 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/channel/BasicChannelSemantics.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/channel/BasicChannelSemantics.java
@@ -23,6 +23,8 @@ import org.apache.flume.Channel;
import org.apache.flume.ChannelException;
import org.apache.flume.Event;
import org.apache.flume.Transaction;
+import org.apache.flume.annotations.InterfaceAudience;
+import org.apache.flume.annotations.InterfaceStability;
import com.google.common.base.Preconditions;
@@ -33,6 +35,8 @@ import com.google.common.base.Preconditions;
* which is required to extend {@link BasicTransactionSemantics}.
* </p>
*/
+@InterfaceAudience.Public
+@InterfaceStability.Stable
public abstract class BasicChannelSemantics extends AbstractChannel {
private ThreadLocal<BasicTransactionSemantics> currentTransaction
http://git-wip-us.apache.org/repos/asf/flume/blob/e6ad27cb/flume-ng-core/src/main/java/org/apache/flume/channel/MemoryChannel.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/channel/MemoryChannel.java b/flume-ng-core/src/main/java/org/apache/flume/channel/MemoryChannel.java
index 06c90d9..dfc289e 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/channel/MemoryChannel.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/channel/MemoryChannel.java
@@ -27,12 +27,27 @@ import javax.annotation.concurrent.GuardedBy;
import org.apache.flume.ChannelException;
import org.apache.flume.Context;
import org.apache.flume.Event;
+import org.apache.flume.annotations.InterfaceAudience;
+import org.apache.flume.annotations.InterfaceStability;
import org.apache.flume.instrumentation.ChannelCounter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.base.Preconditions;
+/**
+ * <p>
+ * MemoryChannel is the recommended channel to use when speeds which
+ * writing to disk is impractical is required or durability of data is not
+ * required.
+ * </p>
+ * <p>
+ * Additionally, MemoryChannel should be used when a channel is required for
+ * unit testing purposes.
+ * </p>
+ */
+@InterfaceAudience.Public
+@InterfaceStability.Stable
public class MemoryChannel extends BasicChannelSemantics {
private static Logger LOGGER = LoggerFactory.getLogger(MemoryChannel.class);
private static final Integer defaultCapacity = 100;
@@ -43,7 +58,7 @@ public class MemoryChannel extends BasicChannelSemantics {
private static final Integer defaultKeepAlive = 3;
- public class MemoryTransaction extends BasicTransactionSemantics {
+ private class MemoryTransaction extends BasicTransactionSemantics {
private LinkedBlockingDeque<Event> takeList;
private LinkedBlockingDeque<Event> putList;
private final ChannelCounter channelCounter;
http://git-wip-us.apache.org/repos/asf/flume/blob/e6ad27cb/flume-ng-core/src/main/java/org/apache/flume/conf/Configurable.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/conf/Configurable.java b/flume-ng-core/src/main/java/org/apache/flume/conf/Configurable.java
index 1d69112..5b78626 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/conf/Configurable.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/conf/Configurable.java
@@ -20,6 +20,8 @@
package org.apache.flume.conf;
import org.apache.flume.Context;
+import org.apache.flume.annotations.InterfaceAudience;
+import org.apache.flume.annotations.InterfaceStability;
/**
* <p>
@@ -27,6 +29,8 @@ import org.apache.flume.Context;
* sub-configuration passed to it, requesting it configure itself.
* </p>
*/
+@InterfaceAudience.Public
+@InterfaceStability.Stable
public interface Configurable {
/**
* <p>
http://git-wip-us.apache.org/repos/asf/flume/blob/e6ad27cb/flume-ng-core/src/main/java/org/apache/flume/interceptor/Interceptor.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/interceptor/Interceptor.java b/flume-ng-core/src/main/java/org/apache/flume/interceptor/Interceptor.java
index e92e76f..811a82e 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/interceptor/Interceptor.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/interceptor/Interceptor.java
@@ -20,8 +20,12 @@ package org.apache.flume.interceptor;
import java.util.List;
import org.apache.flume.Event;
+import org.apache.flume.annotations.InterfaceAudience;
+import org.apache.flume.annotations.InterfaceStability;
import org.apache.flume.conf.Configurable;
+@InterfaceAudience.Public
+@InterfaceStability.Stable
public interface Interceptor {
/**
* Any initialization / startup needed by the Interceptor.
http://git-wip-us.apache.org/repos/asf/flume/blob/e6ad27cb/flume-ng-core/src/main/java/org/apache/flume/lifecycle/LifecycleAware.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/lifecycle/LifecycleAware.java b/flume-ng-core/src/main/java/org/apache/flume/lifecycle/LifecycleAware.java
index 0fb82fb..d7fe7ac 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/lifecycle/LifecycleAware.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/lifecycle/LifecycleAware.java
@@ -19,6 +19,9 @@
package org.apache.flume.lifecycle;
+import org.apache.flume.annotations.InterfaceAudience;
+import org.apache.flume.annotations.InterfaceStability;
+
/**
* <p>
@@ -80,6 +83,8 @@ package org.apache.flume.lifecycle;
* }
* </code>
*/
+@InterfaceAudience.Public
+@InterfaceStability.Stable
public interface LifecycleAware {
/**
http://git-wip-us.apache.org/repos/asf/flume/blob/e6ad27cb/flume-ng-core/src/main/java/org/apache/flume/serialization/EventSerializer.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/serialization/EventSerializer.java b/flume-ng-core/src/main/java/org/apache/flume/serialization/EventSerializer.java
index 27084dd..a418935 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/serialization/EventSerializer.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/serialization/EventSerializer.java
@@ -22,6 +22,8 @@ import java.io.IOException;
import java.io.OutputStream;
import org.apache.flume.Context;
import org.apache.flume.Event;
+import org.apache.flume.annotations.InterfaceAudience;
+import org.apache.flume.annotations.InterfaceStability;
/**
* <p>
@@ -73,6 +75,8 @@ import org.apache.flume.Event;
*
* </p>
*/
+@InterfaceAudience.Public
+@InterfaceStability.Stable
public interface EventSerializer {
/**
http://git-wip-us.apache.org/repos/asf/flume/blob/e6ad27cb/flume-ng-core/src/main/java/org/apache/flume/sink/AbstractSink.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/sink/AbstractSink.java b/flume-ng-core/src/main/java/org/apache/flume/sink/AbstractSink.java
index 54bf869..1112643 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/sink/AbstractSink.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/sink/AbstractSink.java
@@ -21,11 +21,15 @@ package org.apache.flume.sink;
import org.apache.flume.Channel;
import org.apache.flume.Sink;
+import org.apache.flume.annotations.InterfaceAudience;
+import org.apache.flume.annotations.InterfaceStability;
import org.apache.flume.lifecycle.LifecycleAware;
import org.apache.flume.lifecycle.LifecycleState;
import com.google.common.base.Preconditions;
+@InterfaceAudience.Public
+@InterfaceStability.Stable
abstract public class AbstractSink implements Sink, LifecycleAware {
private Channel channel;
http://git-wip-us.apache.org/repos/asf/flume/blob/e6ad27cb/flume-ng-core/src/main/java/org/apache/flume/source/AbstractSource.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/source/AbstractSource.java b/flume-ng-core/src/main/java/org/apache/flume/source/AbstractSource.java
index 861cc42..0855de3 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/source/AbstractSource.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/source/AbstractSource.java
@@ -20,11 +20,15 @@
package org.apache.flume.source;
import org.apache.flume.Source;
+import org.apache.flume.annotations.InterfaceAudience;
+import org.apache.flume.annotations.InterfaceStability;
import org.apache.flume.channel.ChannelProcessor;
import org.apache.flume.lifecycle.LifecycleState;
import com.google.common.base.Preconditions;
+@InterfaceAudience.Public
+@InterfaceStability.Stable
abstract public class AbstractSource implements Source {
private ChannelProcessor channelProcessor;