You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apex.apache.org by vr...@apache.org on 2017/04/21 05:15:24 UTC

apex-core git commit: APEXCORE-702 Mark plugin interfaces as Evolving, and add them to plugin subpackage.

Repository: apex-core
Updated Branches:
  refs/heads/master e4022674e -> 25e4c4c51


APEXCORE-702 Mark plugin interfaces as Evolving, and add them to plugin subpackage.


Project: http://git-wip-us.apache.org/repos/asf/apex-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/apex-core/commit/25e4c4c5
Tree: http://git-wip-us.apache.org/repos/asf/apex-core/tree/25e4c4c5
Diff: http://git-wip-us.apache.org/repos/asf/apex-core/diff/25e4c4c5

Branch: refs/heads/master
Commit: 25e4c4c51b599e63d746ca207d7557c616162381
Parents: e402267
Author: Tushar R. Gosavi <tu...@apache.org>
Authored: Fri Apr 14 22:50:52 2017 +0530
Committer: Tushar R. Gosavi <tu...@apache.org>
Committed: Fri Apr 21 09:12:05 2017 +0530

----------------------------------------------------------------------
 .../java/org/apache/apex/api/ApexPlugin.java    |  29 ----
 .../org/apache/apex/api/ApexPluginContext.java  |  29 ----
 .../org/apache/apex/api/DAGSetupPlugin.java     | 135 -------------------
 .../apache/apex/api/plugin/DAGSetupPlugin.java  | 134 ++++++++++++++++++
 .../java/org/apache/apex/api/plugin/Plugin.java |  32 +++++
 .../apache/apex/api/plugin/PluginContext.java   |  32 +++++
 .../common/util/BaseDAGSetupPlugin.java         |  76 -----------
 .../apex/common/util/BaseDAGSetupPlugin.java    |  78 +++++++++++
 .../stram/StreamingAppMasterService.java        |   4 +-
 .../stram/StreamingContainerManager.java        |   6 +-
 .../plan/logical/DAGSetupPluginManager.java     |   2 +-
 .../plan/logical/LogicalPlanConfiguration.java  |   2 +-
 .../apex/engine/api/DAGExecutionPlugin.java     |  44 ------
 .../engine/api/DAGExecutionPluginContext.java   |  89 ------------
 .../apache/apex/engine/api/PluginLocator.java   |  39 ------
 .../engine/api/plugin/DAGExecutionPlugin.java   |  43 ++++++
 .../api/plugin/DAGExecutionPluginContext.java   |  92 +++++++++++++
 .../apex/engine/api/plugin/PluginLocator.java   |  39 ++++++
 .../AbstractDAGExecutionPluginContext.java      |   9 +-
 .../engine/plugin/ApexPluginDispatcher.java     |   2 +-
 .../apex/engine/plugin/ApexPluginManager.java   |   8 +-
 .../plugin/DefaultApexPluginDispatcher.java     |   6 +-
 .../engine/plugin/NoOpApexPluginDispatcher.java |   2 +-
 .../plugin/loaders/ChainedPluginLocator.java    |   2 +-
 .../loaders/PropertyBasedPluginLocator.java     |   2 +-
 .../ServiceLoaderBasedPluginLocator.java        |   2 +-
 .../plugin/loaders/StaticPluginLocator.java     |   2 +-
 .../plan/logical/PropertyInjectorVisitor.java   |   2 +-
 .../apache/apex/engine/plugin/DebugPlugin.java  |  12 +-
 .../apache/apex/engine/plugin/NoOpPlugin.java   |   4 +-
 .../apache/apex/engine/plugin/PluginTests.java  |   8 +-
 ...rg.apache.apex.engine.api.DAGExecutionPlugin |  19 ---
 ...he.apex.engine.api.plugin.DAGExecutionPlugin |  19 +++
 33 files changed, 510 insertions(+), 494 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/api/src/main/java/org/apache/apex/api/ApexPlugin.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/apex/api/ApexPlugin.java b/api/src/main/java/org/apache/apex/api/ApexPlugin.java
deleted file mode 100644
index b9a8b78..0000000
--- a/api/src/main/java/org/apache/apex/api/ApexPlugin.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * 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.apex.api;
-
-import com.datatorrent.api.Component;
-
-/**
- * Marker interface for ApexPlugins.
- * @param <T>
- */
-public interface ApexPlugin<T extends ApexPluginContext> extends Component<T>
-{
-}

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/api/src/main/java/org/apache/apex/api/ApexPluginContext.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/apex/api/ApexPluginContext.java b/api/src/main/java/org/apache/apex/api/ApexPluginContext.java
deleted file mode 100644
index 1b72f63..0000000
--- a/api/src/main/java/org/apache/apex/api/ApexPluginContext.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * 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.apex.api;
-
-import com.datatorrent.api.Context;
-
-/**
- * Marker interface for Context used by ApexPlugins. Plugin interfaces with
- * the Apex through the context.
- */
-public interface ApexPluginContext extends Context
-{
-}

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/api/src/main/java/org/apache/apex/api/DAGSetupPlugin.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/apex/api/DAGSetupPlugin.java b/api/src/main/java/org/apache/apex/api/DAGSetupPlugin.java
deleted file mode 100644
index 3fc46bc..0000000
--- a/api/src/main/java/org/apache/apex/api/DAGSetupPlugin.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * 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.apex.api;
-
-import java.io.Serializable;
-import java.util.Collection;
-
-import org.apache.hadoop.classification.InterfaceStability;
-import org.apache.hadoop.conf.Configuration;
-
-import com.datatorrent.api.Attribute;
-import com.datatorrent.api.DAG;
-
-/**
- * DAGSetupPlugin allows user provided code to run at various stages
- * during DAG preparation. Currently following stages are supported
- *
- * <ul>
- *   <li>Before dag is populated</li>
- *   <li>After dag is populated</li>
- *   <li>Before dag is configured</li>
- *   <li>After dag is configured</li>
- *   <li>Before dag is validated</li>
- *   <li>After dag is validated</li>
- * </ul>
- */
-@InterfaceStability.Evolving
-public interface DAGSetupPlugin extends ApexPlugin<DAGSetupPlugin.DAGSetupPluginContext>, Serializable
-{
-
-  /**
-   * This method is called before platform adds operators and streams in the DAG. i.e this method
-   * will get called just before {@link com.datatorrent.api.StreamingApplication#populateDAG(DAG, Configuration)}
-   *
-   * For Application specified using property and json file format, this method will get called
-   * before platform adds operators and streams in the DAG as per specification in the file.
-   */
-  void prePopulateDAG();
-
-  /**
-   * This method is called after platform adds operators and streams in the DAG. i.e this method
-   * will get called just after {@link com.datatorrent.api.StreamingApplication#populateDAG(DAG, Configuration)}
-   * in case application is specified in java.
-   *
-   * For Application specified using property and json file format, this method will get called
-   * after platform has added operators and streams in the DAG as per specification in the file.
-   */
-  void postPopulateDAG();
-
-  /**
-   * This is method is called before DAG is configured, i.e operator and application
-   * properties/attributes are injected from configuration files.
-   */
-  void preConfigureDAG();
-
-  /**
-   * This is method is called after DAG is configured, i.e operator and application
-   * properties/attributes are injected from configuration files.
-   */
-  void postConfigureDAG();
-
-  /**
-   * This method is called just before dag is validated before final job submission.
-   */
-  void preValidateDAG();
-
-  /**
-   * This method is called after dag is validated. If plugin makes in incompatible changes
-   * to the DAG at this stage, then application may get launched incorrectly or application
-   * launch may fail.
-   */
-  void postValidateDAG();
-
-  class DAGSetupPluginContext implements ApexPluginContext
-  {
-    private final DAG dag;
-    private final Configuration conf;
-
-    public DAGSetupPluginContext(DAG dag, Configuration conf)
-    {
-      this.dag = dag;
-      this.conf = conf;
-    }
-
-    public DAG getDAG()
-    {
-      return dag;
-    }
-
-    public Configuration getConfiguration()
-    {
-      return conf;
-    }
-
-    @Override
-    public Attribute.AttributeMap getAttributes()
-    {
-      throw new UnsupportedOperationException("Not supported yet.");
-    }
-
-    @Override
-    public <T> T getValue(Attribute<T> key)
-    {
-      throw new UnsupportedOperationException("Not supported yet.");
-    }
-
-    @Override
-    public void setCounters(Object counters)
-    {
-      throw new UnsupportedOperationException("Not supported yet.");
-    }
-
-    @Override
-    public void sendMetrics(Collection<String> metricNames)
-    {
-      throw new UnsupportedOperationException("Not supported yet.");
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/api/src/main/java/org/apache/apex/api/plugin/DAGSetupPlugin.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/apex/api/plugin/DAGSetupPlugin.java b/api/src/main/java/org/apache/apex/api/plugin/DAGSetupPlugin.java
new file mode 100644
index 0000000..faa6798
--- /dev/null
+++ b/api/src/main/java/org/apache/apex/api/plugin/DAGSetupPlugin.java
@@ -0,0 +1,134 @@
+/**
+ * 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.apex.api.plugin;
+
+import java.util.Collection;
+
+import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.conf.Configuration;
+
+import com.datatorrent.api.Attribute;
+import com.datatorrent.api.DAG;
+
+/**
+ * DAGSetupPlugin allows user provided code to run at various stages
+ * during DAG preparation. Currently following stages are supported
+ *
+ * <ul>
+ *   <li>Before dag is populated</li>
+ *   <li>After dag is populated</li>
+ *   <li>Before dag is configured</li>
+ *   <li>After dag is configured</li>
+ *   <li>Before dag is validated</li>
+ *   <li>After dag is validated</li>
+ * </ul>
+ */
+@InterfaceStability.Evolving
+public interface DAGSetupPlugin extends Plugin<DAGSetupPlugin.DAGSetupPluginContext>
+{
+
+  /**
+   * This method is called before platform adds operators and streams in the DAG. i.e this method
+   * will get called just before {@link com.datatorrent.api.StreamingApplication#populateDAG(DAG, Configuration)}
+   *
+   * For Application specified using property and json file format, this method will get called
+   * before platform adds operators and streams in the DAG as per specification in the file.
+   */
+  void prePopulateDAG();
+
+  /**
+   * This method is called after platform adds operators and streams in the DAG. i.e this method
+   * will get called just after {@link com.datatorrent.api.StreamingApplication#populateDAG(DAG, Configuration)}
+   * in case application is specified in java.
+   *
+   * For Application specified using property and json file format, this method will get called
+   * after platform has added operators and streams in the DAG as per specification in the file.
+   */
+  void postPopulateDAG();
+
+  /**
+   * This is method is called before DAG is configured, i.e operator and application
+   * properties/attributes are injected from configuration files.
+   */
+  void preConfigureDAG();
+
+  /**
+   * This is method is called after DAG is configured, i.e operator and application
+   * properties/attributes are injected from configuration files.
+   */
+  void postConfigureDAG();
+
+  /**
+   * This method is called just before dag is validated before final job submission.
+   */
+  void preValidateDAG();
+
+  /**
+   * This method is called after dag is validated. If plugin makes in incompatible changes
+   * to the DAG at this stage, then application may get launched incorrectly or application
+   * launch may fail.
+   */
+  void postValidateDAG();
+
+  class DAGSetupPluginContext implements PluginContext
+  {
+    private final DAG dag;
+    private final Configuration conf;
+
+    public DAGSetupPluginContext(DAG dag, Configuration conf)
+    {
+      this.dag = dag;
+      this.conf = conf;
+    }
+
+    public DAG getDAG()
+    {
+      return dag;
+    }
+
+    public Configuration getConfiguration()
+    {
+      return conf;
+    }
+
+    @Override
+    public Attribute.AttributeMap getAttributes()
+    {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public <T> T getValue(Attribute<T> key)
+    {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setCounters(Object counters)
+    {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void sendMetrics(Collection<String> metricNames)
+    {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/api/src/main/java/org/apache/apex/api/plugin/Plugin.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/apex/api/plugin/Plugin.java b/api/src/main/java/org/apache/apex/api/plugin/Plugin.java
new file mode 100644
index 0000000..ffe52ea
--- /dev/null
+++ b/api/src/main/java/org/apache/apex/api/plugin/Plugin.java
@@ -0,0 +1,32 @@
+/**
+ * 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.apex.api.plugin;
+
+import org.apache.hadoop.classification.InterfaceStability;
+
+import com.datatorrent.api.Component;
+
+/**
+ * Marker interface for ApexPlugins.
+ * @param <T>
+ */
+@InterfaceStability.Evolving
+public interface Plugin<T extends PluginContext> extends Component<T>
+{
+}

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/api/src/main/java/org/apache/apex/api/plugin/PluginContext.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/apex/api/plugin/PluginContext.java b/api/src/main/java/org/apache/apex/api/plugin/PluginContext.java
new file mode 100644
index 0000000..2bdaf00
--- /dev/null
+++ b/api/src/main/java/org/apache/apex/api/plugin/PluginContext.java
@@ -0,0 +1,32 @@
+/**
+ * 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.apex.api.plugin;
+
+import org.apache.hadoop.classification.InterfaceStability;
+
+import com.datatorrent.api.Context;
+
+/**
+ * Marker interface for Context used by ApexPlugins. Plugin interfaces with
+ * the Apex through the context.
+ */
+@InterfaceStability.Evolving
+public interface PluginContext extends Context
+{
+}

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/common/src/main/java/com/datatorrent/common/util/BaseDAGSetupPlugin.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/com/datatorrent/common/util/BaseDAGSetupPlugin.java b/common/src/main/java/com/datatorrent/common/util/BaseDAGSetupPlugin.java
deleted file mode 100644
index 7d26b89..0000000
--- a/common/src/main/java/com/datatorrent/common/util/BaseDAGSetupPlugin.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * 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 com.datatorrent.common.util;
-
-import org.apache.apex.api.DAGSetupPlugin;
-
-/**
- * Base class for DAGSetupPlugin implementations that provides empty implementations
- * for all interface methods.
- */
-public class BaseDAGSetupPlugin implements DAGSetupPlugin
-{
-  @Override
-  public void setup(DAGSetupPluginContext context)
-  {
-
-  }
-
-  @Override
-  public void prePopulateDAG()
-  {
-
-  }
-
-  @Override
-  public void teardown()
-  {
-
-  }
-
-  @Override
-  public void postPopulateDAG()
-  {
-
-  }
-
-  @Override
-  public void preConfigureDAG()
-  {
-
-  }
-
-  @Override
-  public void postConfigureDAG()
-  {
-
-  }
-
-  @Override
-  public void preValidateDAG()
-  {
-
-  }
-
-  @Override
-  public void postValidateDAG()
-  {
-
-  }
-}

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/common/src/main/java/org/apache/apex/common/util/BaseDAGSetupPlugin.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/apex/common/util/BaseDAGSetupPlugin.java b/common/src/main/java/org/apache/apex/common/util/BaseDAGSetupPlugin.java
new file mode 100644
index 0000000..9bc5d8e
--- /dev/null
+++ b/common/src/main/java/org/apache/apex/common/util/BaseDAGSetupPlugin.java
@@ -0,0 +1,78 @@
+/**
+ * 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.apex.common.util;
+
+import org.apache.apex.api.plugin.DAGSetupPlugin;
+import org.apache.hadoop.classification.InterfaceStability;
+
+/**
+ * Base class for DAGSetupPlugin implementations that provides empty implementations
+ * for all interface methods.
+ */
+@InterfaceStability.Evolving
+public class BaseDAGSetupPlugin implements DAGSetupPlugin
+{
+  @Override
+  public void setup(DAGSetupPluginContext context)
+  {
+
+  }
+
+  @Override
+  public void prePopulateDAG()
+  {
+
+  }
+
+  @Override
+  public void teardown()
+  {
+
+  }
+
+  @Override
+  public void postPopulateDAG()
+  {
+
+  }
+
+  @Override
+  public void preConfigureDAG()
+  {
+
+  }
+
+  @Override
+  public void postConfigureDAG()
+  {
+
+  }
+
+  @Override
+  public void preValidateDAG()
+  {
+
+  }
+
+  @Override
+  public void postValidateDAG()
+  {
+
+  }
+}

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/engine/src/main/java/com/datatorrent/stram/StreamingAppMasterService.java
----------------------------------------------------------------------
diff --git a/engine/src/main/java/com/datatorrent/stram/StreamingAppMasterService.java b/engine/src/main/java/com/datatorrent/stram/StreamingAppMasterService.java
index b15c98f..4e4f501 100644
--- a/engine/src/main/java/com/datatorrent/stram/StreamingAppMasterService.java
+++ b/engine/src/main/java/com/datatorrent/stram/StreamingAppMasterService.java
@@ -42,8 +42,8 @@ import javax.xml.bind.annotation.XmlElement;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.apex.engine.api.DAGExecutionPlugin;
-import org.apache.apex.engine.api.PluginLocator;
+import org.apache.apex.engine.api.plugin.DAGExecutionPlugin;
+import org.apache.apex.engine.api.plugin.PluginLocator;
 import org.apache.apex.engine.plugin.ApexPluginDispatcher;
 import org.apache.apex.engine.plugin.DefaultApexPluginDispatcher;
 import org.apache.apex.engine.plugin.loaders.ChainedPluginLocator;

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/engine/src/main/java/com/datatorrent/stram/StreamingContainerManager.java
----------------------------------------------------------------------
diff --git a/engine/src/main/java/com/datatorrent/stram/StreamingContainerManager.java b/engine/src/main/java/com/datatorrent/stram/StreamingContainerManager.java
index 18d6787..92fce54 100644
--- a/engine/src/main/java/com/datatorrent/stram/StreamingContainerManager.java
+++ b/engine/src/main/java/com/datatorrent/stram/StreamingContainerManager.java
@@ -178,9 +178,9 @@ import com.datatorrent.stram.webapp.StreamInfo;
 import net.engio.mbassy.bus.MBassador;
 import net.engio.mbassy.bus.config.BusConfiguration;
 
-import static org.apache.apex.engine.api.DAGExecutionPluginContext.COMMIT_EVENT;
-import static org.apache.apex.engine.api.DAGExecutionPluginContext.HEARTBEAT;
-import static org.apache.apex.engine.api.DAGExecutionPluginContext.STRAM_EVENT;
+import static org.apache.apex.engine.api.plugin.DAGExecutionPluginContext.COMMIT_EVENT;
+import static org.apache.apex.engine.api.plugin.DAGExecutionPluginContext.HEARTBEAT;
+import static org.apache.apex.engine.api.plugin.DAGExecutionPluginContext.STRAM_EVENT;
 
 /**
  * Tracks topology provisioning/allocation to containers<p>

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/engine/src/main/java/com/datatorrent/stram/plan/logical/DAGSetupPluginManager.java
----------------------------------------------------------------------
diff --git a/engine/src/main/java/com/datatorrent/stram/plan/logical/DAGSetupPluginManager.java b/engine/src/main/java/com/datatorrent/stram/plan/logical/DAGSetupPluginManager.java
index 2f1a904..c7c2767 100644
--- a/engine/src/main/java/com/datatorrent/stram/plan/logical/DAGSetupPluginManager.java
+++ b/engine/src/main/java/com/datatorrent/stram/plan/logical/DAGSetupPluginManager.java
@@ -23,7 +23,7 @@ import java.util.List;
 
 import org.slf4j.Logger;
 
-import org.apache.apex.api.DAGSetupPlugin;
+import org.apache.apex.api.plugin.DAGSetupPlugin;
 import org.apache.apex.engine.plugin.loaders.PropertyBasedPluginLocator;
 import org.apache.hadoop.conf.Configuration;
 

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/engine/src/main/java/com/datatorrent/stram/plan/logical/LogicalPlanConfiguration.java
----------------------------------------------------------------------
diff --git a/engine/src/main/java/com/datatorrent/stram/plan/logical/LogicalPlanConfiguration.java b/engine/src/main/java/com/datatorrent/stram/plan/logical/LogicalPlanConfiguration.java
index 5a9030e..a7fad2a 100644
--- a/engine/src/main/java/com/datatorrent/stram/plan/logical/LogicalPlanConfiguration.java
+++ b/engine/src/main/java/com/datatorrent/stram/plan/logical/LogicalPlanConfiguration.java
@@ -48,7 +48,7 @@ import org.codehaus.jettison.json.JSONObject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.apex.api.DAGSetupPlugin.DAGSetupPluginContext;
+import org.apache.apex.api.plugin.DAGSetupPlugin.DAGSetupPluginContext;
 import org.apache.commons.beanutils.BeanMap;
 import org.apache.commons.beanutils.BeanUtils;
 import org.apache.commons.collections.CollectionUtils;

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/engine/src/main/java/org/apache/apex/engine/api/DAGExecutionPlugin.java
----------------------------------------------------------------------
diff --git a/engine/src/main/java/org/apache/apex/engine/api/DAGExecutionPlugin.java b/engine/src/main/java/org/apache/apex/engine/api/DAGExecutionPlugin.java
deleted file mode 100644
index 5a3b5b9..0000000
--- a/engine/src/main/java/org/apache/apex/engine/api/DAGExecutionPlugin.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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.apex.engine.api;
-
-import org.apache.hadoop.classification.InterfaceStability;
-
-import com.datatorrent.api.Component;
-
-/**
- * An Apex plugin is a user code which runs inside Stram. The interaction
- * between plugin and Stram is managed by DAGExecutionPluginContext. Plugin can register to handle event in interest
- * with callback handler using ${@link DAGExecutionPluginContext#register(DAGExecutionPluginContext.RegistrationType, DAGExecutionPluginContext.Handler)}
- *
- * Following events are supported
- * <ul>
- *   <li>{@see DAGExecutionPluginContext.HEARTBEAT} The heartbeat from a container is delivered to the plugin after it has been handled by stram</li>
- *   <li>{@see DAGExecutionPluginContext.STRAM_EVENT} All the Stram event generated in Stram will be delivered to the plugin</li>
- *   <li>{@see DAGExecutionPluginContext.COMMIT_EVENT} When committedWindowId changes in the platform an event will be delivered to the plugin</li>
- * </ul>
- *
- * A plugin should register a single handler for an event, In case multiple handlers are registered for an event,
- * then the last registered handler will be used. Plugin should cleanup additional resources created by it during shutdown
- * such as helper threads and open files.
- */
-@InterfaceStability.Evolving
-public interface DAGExecutionPlugin extends Component<DAGExecutionPluginContext>
-{
-}

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/engine/src/main/java/org/apache/apex/engine/api/DAGExecutionPluginContext.java
----------------------------------------------------------------------
diff --git a/engine/src/main/java/org/apache/apex/engine/api/DAGExecutionPluginContext.java b/engine/src/main/java/org/apache/apex/engine/api/DAGExecutionPluginContext.java
deleted file mode 100644
index d466b23..0000000
--- a/engine/src/main/java/org/apache/apex/engine/api/DAGExecutionPluginContext.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * 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.apex.engine.api;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Queue;
-
-import org.apache.hadoop.classification.InterfaceStability;
-import org.apache.hadoop.conf.Configuration;
-
-import com.datatorrent.api.Context;
-import com.datatorrent.api.DAG;
-import com.datatorrent.api.StatsListener.BatchedOperatorStats;
-import com.datatorrent.common.util.Pair;
-import com.datatorrent.stram.StramAppContext;
-import com.datatorrent.stram.api.StramEvent;
-import com.datatorrent.stram.api.StreamingContainerUmbilicalProtocol;
-import com.datatorrent.stram.webapp.AppInfo;
-import com.datatorrent.stram.webapp.LogicalOperatorInfo;
-
-/**
- * An Apex plugin is a user code which runs inside Stram. The interaction
- * between plugin and Stram is managed by DAGExecutionPluginContext. Plugin can register to handle event in interest
- * with callback handler using ${@link DAGExecutionPluginContext#register(DAGExecutionPluginContext.RegistrationType, DAGExecutionPluginContext.Handler)}
- *
- * Following events are supported
- * <ul>
- *   <li>{@see DAGExecutionPluginContext.HEARTBEAT} The heartbeat from a container is delivered to the plugin after it has been handled by stram</li>
- *   <li>{@see DAGExecutionPluginContext.STRAM_EVENT} All the Stram event generated in Stram will be delivered to the plugin</li>
- *   <li>{@see DAGExecutionPluginContext.COMMIT_EVENT} When committedWindowId changes in the platform an event will be delivered to the plugin</li>
- * </ul>
- *
- * A plugin should register a single handler for an event, In case multiple handlers are registered for an event,
- * then the last registered handler will be used. Plugin should cleanup additional resources created by it during shutdown
- * such as helper threads and open files.
- */
-@InterfaceStability.Evolving
-public interface DAGExecutionPluginContext extends Context
-{
-  class RegistrationType<T>
-  {
-  }
-
-  RegistrationType<StreamingContainerUmbilicalProtocol.ContainerHeartbeat> HEARTBEAT = new RegistrationType<>();
-  RegistrationType<StramEvent> STRAM_EVENT = new RegistrationType<>();
-  RegistrationType<Long> COMMIT_EVENT = new RegistrationType<>();
-
-  <T> void register(RegistrationType<T> type, Handler<T> handler);
-
-  interface Handler<T>
-  {
-    void handle(T data);
-  }
-
-  StramAppContext getApplicationContext();
-
-  AppInfo.AppStats getApplicationStats();
-
-  Configuration getLaunchConfig();
-
-  DAG getDAG();
-
-  String getOperatorName(int id);
-
-  BatchedOperatorStats getPhysicalOperatorStats(int id);
-
-  List<LogicalOperatorInfo> getLogicalOperatorInfoList();
-
-  Queue<Pair<Long, Map<String, Object>>> getWindowMetrics(String operatorName);
-
-  long windowIdToMillis(long windowId);
-}

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/engine/src/main/java/org/apache/apex/engine/api/PluginLocator.java
----------------------------------------------------------------------
diff --git a/engine/src/main/java/org/apache/apex/engine/api/PluginLocator.java b/engine/src/main/java/org/apache/apex/engine/api/PluginLocator.java
deleted file mode 100644
index e0f70be..0000000
--- a/engine/src/main/java/org/apache/apex/engine/api/PluginLocator.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.apex.engine.api;
-
-import java.util.Collection;
-
-import org.apache.hadoop.classification.InterfaceStability;
-import org.apache.hadoop.conf.Configuration;
-
-/**
- * Interface to discover plugins during Apex Master initialization. This should return collection of
- * objects implementing an interface of type T.
- */
-@InterfaceStability.Evolving
-public interface PluginLocator<T>
-{
-  /**
-   * Discover list of apex plugins.
-   *
-   * @return list of apex plugins.
-   */
-  Collection<T> discoverPlugins(Configuration conf);
-}

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/engine/src/main/java/org/apache/apex/engine/api/plugin/DAGExecutionPlugin.java
----------------------------------------------------------------------
diff --git a/engine/src/main/java/org/apache/apex/engine/api/plugin/DAGExecutionPlugin.java b/engine/src/main/java/org/apache/apex/engine/api/plugin/DAGExecutionPlugin.java
new file mode 100644
index 0000000..060b240
--- /dev/null
+++ b/engine/src/main/java/org/apache/apex/engine/api/plugin/DAGExecutionPlugin.java
@@ -0,0 +1,43 @@
+/**
+ * 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.apex.engine.api.plugin;
+
+import org.apache.apex.api.plugin.Plugin;
+import org.apache.hadoop.classification.InterfaceStability;
+
+/**
+ * An Apex plugin is a user code which runs inside Stram. The interaction
+ * between plugin and Stram is managed by DAGExecutionPluginContext. Plugin can register to handle event in interest
+ * with callback handler using ${@link DAGExecutionPluginContext#register(DAGExecutionPluginContext.RegistrationType, DAGExecutionPluginContext.Handler)}
+ *
+ * Following events are supported
+ * <ul>
+ *   <li>{@see DAGExecutionPluginContext.HEARTBEAT} The heartbeat from a container is delivered to the plugin after it has been handled by stram</li>
+ *   <li>{@see DAGExecutionPluginContext.STRAM_EVENT} All the Stram event generated in Stram will be delivered to the plugin</li>
+ *   <li>{@see DAGExecutionPluginContext.COMMIT_EVENT} When committedWindowId changes in the platform an event will be delivered to the plugin</li>
+ * </ul>
+ *
+ * A plugin should register a single handler for an event, In case multiple handlers are registered for an event,
+ * then the last registered handler will be used. Plugin should cleanup additional resources created by it during shutdown
+ * such as helper threads and open files.
+ */
+@InterfaceStability.Evolving
+public interface DAGExecutionPlugin extends Plugin<DAGExecutionPluginContext>
+{
+}

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/engine/src/main/java/org/apache/apex/engine/api/plugin/DAGExecutionPluginContext.java
----------------------------------------------------------------------
diff --git a/engine/src/main/java/org/apache/apex/engine/api/plugin/DAGExecutionPluginContext.java b/engine/src/main/java/org/apache/apex/engine/api/plugin/DAGExecutionPluginContext.java
new file mode 100644
index 0000000..73da7e6
--- /dev/null
+++ b/engine/src/main/java/org/apache/apex/engine/api/plugin/DAGExecutionPluginContext.java
@@ -0,0 +1,92 @@
+/**
+ * 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.apex.engine.api.plugin;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Queue;
+
+import org.apache.apex.api.plugin.PluginContext;
+import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.conf.Configuration;
+
+import com.datatorrent.api.DAG;
+import com.datatorrent.api.StatsListener.BatchedOperatorStats;
+import com.datatorrent.common.util.Pair;
+import com.datatorrent.stram.StramAppContext;
+import com.datatorrent.stram.api.StramEvent;
+import com.datatorrent.stram.api.StreamingContainerUmbilicalProtocol;
+import com.datatorrent.stram.util.VersionInfo;
+import com.datatorrent.stram.webapp.AppInfo;
+import com.datatorrent.stram.webapp.LogicalOperatorInfo;
+
+/**
+ * An Apex plugin is a user code which runs inside Stram. The interaction
+ * between plugin and Stram is managed by DAGExecutionPluginContext. Plugin can register to handle event in interest
+ * with callback handler using ${@link DAGExecutionPluginContext#register(DAGExecutionPluginContext.RegistrationType, DAGExecutionPluginContext.Handler)}
+ *
+ * Following events are supported
+ * <ul>
+ *   <li>{@see DAGExecutionPluginContext.HEARTBEAT} The heartbeat from a container is delivered to the plugin after it has been handled by stram</li>
+ *   <li>{@see DAGExecutionPluginContext.STRAM_EVENT} All the Stram event generated in Stram will be delivered to the plugin</li>
+ *   <li>{@see DAGExecutionPluginContext.COMMIT_EVENT} When committedWindowId changes in the platform an event will be delivered to the plugin</li>
+ * </ul>
+ *
+ * A plugin should register a single handler for an event, In case multiple handlers are registered for an event,
+ * then the last registered handler will be used. Plugin should cleanup additional resources created by it during shutdown
+ * such as helper threads and open files.
+ */
+@InterfaceStability.Evolving
+public interface DAGExecutionPluginContext extends PluginContext
+{
+  class RegistrationType<T>
+  {
+  }
+
+  RegistrationType<StreamingContainerUmbilicalProtocol.ContainerHeartbeat> HEARTBEAT = new RegistrationType<>();
+  RegistrationType<StramEvent> STRAM_EVENT = new RegistrationType<>();
+  RegistrationType<Long> COMMIT_EVENT = new RegistrationType<>();
+
+  <T> void register(RegistrationType<T> type, Handler<T> handler);
+
+  interface Handler<T>
+  {
+    void handle(T data);
+  }
+
+  VersionInfo getEngineVersion();
+
+  StramAppContext getApplicationContext();
+
+  AppInfo.AppStats getApplicationStats();
+
+  Configuration getLaunchConfig();
+
+  DAG getDAG();
+
+  String getOperatorName(int id);
+
+  BatchedOperatorStats getPhysicalOperatorStats(int id);
+
+  List<LogicalOperatorInfo> getLogicalOperatorInfoList();
+
+  Queue<Pair<Long, Map<String, Object>>> getWindowMetrics(String operatorName);
+
+  long windowIdToMillis(long windowId);
+}

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/engine/src/main/java/org/apache/apex/engine/api/plugin/PluginLocator.java
----------------------------------------------------------------------
diff --git a/engine/src/main/java/org/apache/apex/engine/api/plugin/PluginLocator.java b/engine/src/main/java/org/apache/apex/engine/api/plugin/PluginLocator.java
new file mode 100644
index 0000000..b93d64c
--- /dev/null
+++ b/engine/src/main/java/org/apache/apex/engine/api/plugin/PluginLocator.java
@@ -0,0 +1,39 @@
+/**
+ * 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.apex.engine.api.plugin;
+
+import java.util.Collection;
+
+import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.conf.Configuration;
+
+/**
+ * Interface to discover plugins during Apex Master initialization. This should return collection of
+ * objects implementing an interface of type T.
+ */
+@InterfaceStability.Evolving
+public interface PluginLocator<T>
+{
+  /**
+   * Discover list of apex plugins.
+   *
+   * @return list of apex plugins.
+   */
+  Collection<T> discoverPlugins(Configuration conf);
+}

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/engine/src/main/java/org/apache/apex/engine/plugin/AbstractDAGExecutionPluginContext.java
----------------------------------------------------------------------
diff --git a/engine/src/main/java/org/apache/apex/engine/plugin/AbstractDAGExecutionPluginContext.java b/engine/src/main/java/org/apache/apex/engine/plugin/AbstractDAGExecutionPluginContext.java
index a92b57b..19ef91a 100644
--- a/engine/src/main/java/org/apache/apex/engine/plugin/AbstractDAGExecutionPluginContext.java
+++ b/engine/src/main/java/org/apache/apex/engine/plugin/AbstractDAGExecutionPluginContext.java
@@ -23,7 +23,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Queue;
 
-import org.apache.apex.engine.api.DAGExecutionPluginContext;
+import org.apache.apex.engine.api.plugin.DAGExecutionPluginContext;
 import org.apache.hadoop.conf.Configuration;
 
 import com.datatorrent.api.Attribute;
@@ -33,6 +33,7 @@ import com.datatorrent.common.util.Pair;
 import com.datatorrent.stram.StramAppContext;
 import com.datatorrent.stram.StreamingContainerManager;
 import com.datatorrent.stram.plan.physical.PTOperator;
+import com.datatorrent.stram.util.VersionInfo;
 import com.datatorrent.stram.webapp.AppInfo;
 import com.datatorrent.stram.webapp.LogicalOperatorInfo;
 
@@ -80,6 +81,12 @@ public abstract class AbstractDAGExecutionPluginContext implements DAGExecutionP
   }
 
   @Override
+  public VersionInfo getEngineVersion()
+  {
+    return VersionInfo.APEX_VERSION;
+  }
+
+  @Override
   public Configuration getLaunchConfig()
   {
     return launchConf;

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/engine/src/main/java/org/apache/apex/engine/plugin/ApexPluginDispatcher.java
----------------------------------------------------------------------
diff --git a/engine/src/main/java/org/apache/apex/engine/plugin/ApexPluginDispatcher.java b/engine/src/main/java/org/apache/apex/engine/plugin/ApexPluginDispatcher.java
index 62dd255..c6ef54d 100644
--- a/engine/src/main/java/org/apache/apex/engine/plugin/ApexPluginDispatcher.java
+++ b/engine/src/main/java/org/apache/apex/engine/plugin/ApexPluginDispatcher.java
@@ -18,7 +18,7 @@
  */
 package org.apache.apex.engine.plugin;
 
-import org.apache.apex.engine.api.DAGExecutionPluginContext.RegistrationType;
+import org.apache.apex.engine.api.plugin.DAGExecutionPluginContext.RegistrationType;
 import org.apache.hadoop.service.Service;
 
 public interface ApexPluginDispatcher extends Service

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/engine/src/main/java/org/apache/apex/engine/plugin/ApexPluginManager.java
----------------------------------------------------------------------
diff --git a/engine/src/main/java/org/apache/apex/engine/plugin/ApexPluginManager.java b/engine/src/main/java/org/apache/apex/engine/plugin/ApexPluginManager.java
index 190cb6b..9f070a1 100644
--- a/engine/src/main/java/org/apache/apex/engine/plugin/ApexPluginManager.java
+++ b/engine/src/main/java/org/apache/apex/engine/plugin/ApexPluginManager.java
@@ -28,10 +28,10 @@ import java.util.Map;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.apex.engine.api.DAGExecutionPlugin;
-import org.apache.apex.engine.api.DAGExecutionPluginContext.Handler;
-import org.apache.apex.engine.api.DAGExecutionPluginContext.RegistrationType;
-import org.apache.apex.engine.api.PluginLocator;
+import org.apache.apex.engine.api.plugin.DAGExecutionPlugin;
+import org.apache.apex.engine.api.plugin.DAGExecutionPluginContext.Handler;
+import org.apache.apex.engine.api.plugin.DAGExecutionPluginContext.RegistrationType;
+import org.apache.apex.engine.api.plugin.PluginLocator;
 import org.apache.commons.digester.plugins.PluginContext;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FSDataInputStream;

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/engine/src/main/java/org/apache/apex/engine/plugin/DefaultApexPluginDispatcher.java
----------------------------------------------------------------------
diff --git a/engine/src/main/java/org/apache/apex/engine/plugin/DefaultApexPluginDispatcher.java b/engine/src/main/java/org/apache/apex/engine/plugin/DefaultApexPluginDispatcher.java
index 0c30943..0eee85e 100644
--- a/engine/src/main/java/org/apache/apex/engine/plugin/DefaultApexPluginDispatcher.java
+++ b/engine/src/main/java/org/apache/apex/engine/plugin/DefaultApexPluginDispatcher.java
@@ -28,9 +28,9 @@ import java.util.concurrent.TimeUnit;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.apex.engine.api.DAGExecutionPluginContext.Handler;
-import org.apache.apex.engine.api.DAGExecutionPluginContext.RegistrationType;
-import org.apache.apex.engine.api.PluginLocator;
+import org.apache.apex.engine.api.plugin.DAGExecutionPluginContext.Handler;
+import org.apache.apex.engine.api.plugin.DAGExecutionPluginContext.RegistrationType;
+import org.apache.apex.engine.api.plugin.PluginLocator;
 import org.apache.hadoop.conf.Configuration;
 
 import com.datatorrent.common.util.NameableThreadFactory;

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/engine/src/main/java/org/apache/apex/engine/plugin/NoOpApexPluginDispatcher.java
----------------------------------------------------------------------
diff --git a/engine/src/main/java/org/apache/apex/engine/plugin/NoOpApexPluginDispatcher.java b/engine/src/main/java/org/apache/apex/engine/plugin/NoOpApexPluginDispatcher.java
index 11eb5d1..f3f3382 100644
--- a/engine/src/main/java/org/apache/apex/engine/plugin/NoOpApexPluginDispatcher.java
+++ b/engine/src/main/java/org/apache/apex/engine/plugin/NoOpApexPluginDispatcher.java
@@ -18,7 +18,7 @@
  */
 package org.apache.apex.engine.plugin;
 
-import org.apache.apex.engine.api.DAGExecutionPluginContext.RegistrationType;
+import org.apache.apex.engine.api.plugin.DAGExecutionPluginContext.RegistrationType;
 import org.apache.hadoop.service.AbstractService;
 
 public class NoOpApexPluginDispatcher extends AbstractService implements ApexPluginDispatcher

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/engine/src/main/java/org/apache/apex/engine/plugin/loaders/ChainedPluginLocator.java
----------------------------------------------------------------------
diff --git a/engine/src/main/java/org/apache/apex/engine/plugin/loaders/ChainedPluginLocator.java b/engine/src/main/java/org/apache/apex/engine/plugin/loaders/ChainedPluginLocator.java
index 42d4dc4..df3b50a 100644
--- a/engine/src/main/java/org/apache/apex/engine/plugin/loaders/ChainedPluginLocator.java
+++ b/engine/src/main/java/org/apache/apex/engine/plugin/loaders/ChainedPluginLocator.java
@@ -25,7 +25,7 @@ import java.util.List;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.apex.engine.api.PluginLocator;
+import org.apache.apex.engine.api.plugin.PluginLocator;
 import org.apache.hadoop.conf.Configuration;
 
 public class ChainedPluginLocator<T> implements PluginLocator<T>

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/engine/src/main/java/org/apache/apex/engine/plugin/loaders/PropertyBasedPluginLocator.java
----------------------------------------------------------------------
diff --git a/engine/src/main/java/org/apache/apex/engine/plugin/loaders/PropertyBasedPluginLocator.java b/engine/src/main/java/org/apache/apex/engine/plugin/loaders/PropertyBasedPluginLocator.java
index b9fc2a5..b131109 100644
--- a/engine/src/main/java/org/apache/apex/engine/plugin/loaders/PropertyBasedPluginLocator.java
+++ b/engine/src/main/java/org/apache/apex/engine/plugin/loaders/PropertyBasedPluginLocator.java
@@ -25,7 +25,7 @@ import java.util.List;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.apex.engine.api.PluginLocator;
+import org.apache.apex.engine.api.plugin.PluginLocator;
 import org.apache.hadoop.conf.Configuration;
 
 import com.datatorrent.stram.StramUtils;

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/engine/src/main/java/org/apache/apex/engine/plugin/loaders/ServiceLoaderBasedPluginLocator.java
----------------------------------------------------------------------
diff --git a/engine/src/main/java/org/apache/apex/engine/plugin/loaders/ServiceLoaderBasedPluginLocator.java b/engine/src/main/java/org/apache/apex/engine/plugin/loaders/ServiceLoaderBasedPluginLocator.java
index 3295329..be7dfc4 100644
--- a/engine/src/main/java/org/apache/apex/engine/plugin/loaders/ServiceLoaderBasedPluginLocator.java
+++ b/engine/src/main/java/org/apache/apex/engine/plugin/loaders/ServiceLoaderBasedPluginLocator.java
@@ -23,7 +23,7 @@ import java.util.Collection;
 import java.util.List;
 import java.util.ServiceLoader;
 
-import org.apache.apex.engine.api.PluginLocator;
+import org.apache.apex.engine.api.plugin.PluginLocator;
 import org.apache.hadoop.conf.Configuration;
 
 public class ServiceLoaderBasedPluginLocator<T> implements PluginLocator<T>

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/engine/src/main/java/org/apache/apex/engine/plugin/loaders/StaticPluginLocator.java
----------------------------------------------------------------------
diff --git a/engine/src/main/java/org/apache/apex/engine/plugin/loaders/StaticPluginLocator.java b/engine/src/main/java/org/apache/apex/engine/plugin/loaders/StaticPluginLocator.java
index f6b0dfc..4767196 100644
--- a/engine/src/main/java/org/apache/apex/engine/plugin/loaders/StaticPluginLocator.java
+++ b/engine/src/main/java/org/apache/apex/engine/plugin/loaders/StaticPluginLocator.java
@@ -24,7 +24,7 @@ import java.util.Collection;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.apex.engine.api.PluginLocator;
+import org.apache.apex.engine.api.plugin.PluginLocator;
 import org.apache.hadoop.conf.Configuration;
 
 public class StaticPluginLocator<T> implements PluginLocator<T>

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/engine/src/test/java/com/datatorrent/stram/plan/logical/PropertyInjectorVisitor.java
----------------------------------------------------------------------
diff --git a/engine/src/test/java/com/datatorrent/stram/plan/logical/PropertyInjectorVisitor.java b/engine/src/test/java/com/datatorrent/stram/plan/logical/PropertyInjectorVisitor.java
index d2bd927..4c8b4e5 100644
--- a/engine/src/test/java/com/datatorrent/stram/plan/logical/PropertyInjectorVisitor.java
+++ b/engine/src/test/java/com/datatorrent/stram/plan/logical/PropertyInjectorVisitor.java
@@ -27,7 +27,7 @@ import javax.validation.ValidationException;
 
 import org.slf4j.Logger;
 
-import org.apache.apex.api.DAGSetupPlugin;
+import org.apache.apex.api.plugin.DAGSetupPlugin;
 
 import com.datatorrent.api.DAG;
 import com.datatorrent.api.Operator;

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/engine/src/test/java/org/apache/apex/engine/plugin/DebugPlugin.java
----------------------------------------------------------------------
diff --git a/engine/src/test/java/org/apache/apex/engine/plugin/DebugPlugin.java b/engine/src/test/java/org/apache/apex/engine/plugin/DebugPlugin.java
index 6ad8073..4a64b10 100644
--- a/engine/src/test/java/org/apache/apex/engine/plugin/DebugPlugin.java
+++ b/engine/src/test/java/org/apache/apex/engine/plugin/DebugPlugin.java
@@ -22,16 +22,16 @@ import java.util.concurrent.locks.Condition;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantLock;
 
-import org.apache.apex.engine.api.DAGExecutionPlugin;
-import org.apache.apex.engine.api.DAGExecutionPluginContext;
-import org.apache.apex.engine.api.DAGExecutionPluginContext.Handler;
+import org.apache.apex.engine.api.plugin.DAGExecutionPlugin;
+import org.apache.apex.engine.api.plugin.DAGExecutionPluginContext;
+import org.apache.apex.engine.api.plugin.DAGExecutionPluginContext.Handler;
 
 import com.datatorrent.stram.api.StramEvent;
 import com.datatorrent.stram.api.StreamingContainerUmbilicalProtocol;
 
-import static org.apache.apex.engine.api.DAGExecutionPluginContext.COMMIT_EVENT;
-import static org.apache.apex.engine.api.DAGExecutionPluginContext.HEARTBEAT;
-import static org.apache.apex.engine.api.DAGExecutionPluginContext.STRAM_EVENT;
+import static org.apache.apex.engine.api.plugin.DAGExecutionPluginContext.COMMIT_EVENT;
+import static org.apache.apex.engine.api.plugin.DAGExecutionPluginContext.HEARTBEAT;
+import static org.apache.apex.engine.api.plugin.DAGExecutionPluginContext.STRAM_EVENT;
 
 public class DebugPlugin implements DAGExecutionPlugin
 {

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/engine/src/test/java/org/apache/apex/engine/plugin/NoOpPlugin.java
----------------------------------------------------------------------
diff --git a/engine/src/test/java/org/apache/apex/engine/plugin/NoOpPlugin.java b/engine/src/test/java/org/apache/apex/engine/plugin/NoOpPlugin.java
index 4aad641..786e0d6 100644
--- a/engine/src/test/java/org/apache/apex/engine/plugin/NoOpPlugin.java
+++ b/engine/src/test/java/org/apache/apex/engine/plugin/NoOpPlugin.java
@@ -21,8 +21,8 @@ package org.apache.apex.engine.plugin;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.apex.engine.api.DAGExecutionPlugin;
-import org.apache.apex.engine.api.DAGExecutionPluginContext;
+import org.apache.apex.engine.api.plugin.DAGExecutionPlugin;
+import org.apache.apex.engine.api.plugin.DAGExecutionPluginContext;
 
 public class NoOpPlugin implements DAGExecutionPlugin
 {

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/engine/src/test/java/org/apache/apex/engine/plugin/PluginTests.java
----------------------------------------------------------------------
diff --git a/engine/src/test/java/org/apache/apex/engine/plugin/PluginTests.java b/engine/src/test/java/org/apache/apex/engine/plugin/PluginTests.java
index 4848983..fda607f 100644
--- a/engine/src/test/java/org/apache/apex/engine/plugin/PluginTests.java
+++ b/engine/src/test/java/org/apache/apex/engine/plugin/PluginTests.java
@@ -24,7 +24,7 @@ import java.util.concurrent.TimeUnit;
 import org.junit.Assert;
 import org.junit.Test;
 
-import org.apache.apex.engine.api.DAGExecutionPlugin;
+import org.apache.apex.engine.api.plugin.DAGExecutionPlugin;
 import org.apache.apex.engine.plugin.loaders.ChainedPluginLocator;
 import org.apache.apex.engine.plugin.loaders.ServiceLoaderBasedPluginLocator;
 import org.apache.apex.engine.plugin.loaders.StaticPluginLocator;
@@ -35,9 +35,9 @@ import com.datatorrent.stram.api.StramEvent;
 import com.datatorrent.stram.api.StreamingContainerUmbilicalProtocol;
 import com.datatorrent.stram.support.StramTestSupport;
 
-import static org.apache.apex.engine.api.DAGExecutionPluginContext.COMMIT_EVENT;
-import static org.apache.apex.engine.api.DAGExecutionPluginContext.HEARTBEAT;
-import static org.apache.apex.engine.api.DAGExecutionPluginContext.STRAM_EVENT;
+import static org.apache.apex.engine.api.plugin.DAGExecutionPluginContext.COMMIT_EVENT;
+import static org.apache.apex.engine.api.plugin.DAGExecutionPluginContext.HEARTBEAT;
+import static org.apache.apex.engine.api.plugin.DAGExecutionPluginContext.STRAM_EVENT;
 
 public class PluginTests
 {

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/engine/src/test/resources/META-INF/services/org.apache.apex.engine.api.DAGExecutionPlugin
----------------------------------------------------------------------
diff --git a/engine/src/test/resources/META-INF/services/org.apache.apex.engine.api.DAGExecutionPlugin b/engine/src/test/resources/META-INF/services/org.apache.apex.engine.api.DAGExecutionPlugin
deleted file mode 100644
index cd70a45..0000000
--- a/engine/src/test/resources/META-INF/services/org.apache.apex.engine.api.DAGExecutionPlugin
+++ /dev/null
@@ -1,19 +0,0 @@
-##
-# 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.
-#
-org.apache.apex.engine.plugin.DebugPlugin

http://git-wip-us.apache.org/repos/asf/apex-core/blob/25e4c4c5/engine/src/test/resources/META-INF/services/org.apache.apex.engine.api.plugin.DAGExecutionPlugin
----------------------------------------------------------------------
diff --git a/engine/src/test/resources/META-INF/services/org.apache.apex.engine.api.plugin.DAGExecutionPlugin b/engine/src/test/resources/META-INF/services/org.apache.apex.engine.api.plugin.DAGExecutionPlugin
new file mode 100644
index 0000000..cd70a45
--- /dev/null
+++ b/engine/src/test/resources/META-INF/services/org.apache.apex.engine.api.plugin.DAGExecutionPlugin
@@ -0,0 +1,19 @@
+##
+# 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.
+#
+org.apache.apex.engine.plugin.DebugPlugin