You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apex.apache.org by th...@apache.org on 2016/10/10 03:17:26 UTC
apex-core git commit: APEXCORE-475 Making the application type of
apex applications as ApacheApex and we will still keep DataTorrent as the
deprecated tag.
Repository: apex-core
Updated Branches:
refs/heads/master a490ee04d -> a9a90e085
APEXCORE-475 Making the application type of apex applications as ApacheApex and we will still keep DataTorrent as the deprecated tag.
Project: http://git-wip-us.apache.org/repos/asf/apex-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/apex-core/commit/a9a90e08
Tree: http://git-wip-us.apache.org/repos/asf/apex-core/tree/a9a90e08
Diff: http://git-wip-us.apache.org/repos/asf/apex-core/diff/a9a90e08
Branch: refs/heads/master
Commit: a9a90e0856ecd4d7a41fb63664aaeb0b5678d719
Parents: a490ee0
Author: Sandesh Hegde <sa...@gmail.com>
Authored: Wed Oct 5 07:48:36 2016 -0700
Committer: Sandesh Hegde <sa...@gmail.com>
Committed: Fri Oct 7 14:18:13 2016 -0700
----------------------------------------------------------------------
engine/src/main/java/com/datatorrent/stram/StramClient.java | 9 +++++----
engine/src/main/java/com/datatorrent/stram/cli/ApexCli.java | 2 +-
.../java/com/datatorrent/stram/client/StramClientUtils.java | 4 ++--
3 files changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/apex-core/blob/a9a90e08/engine/src/main/java/com/datatorrent/stram/StramClient.java
----------------------------------------------------------------------
diff --git a/engine/src/main/java/com/datatorrent/stram/StramClient.java b/engine/src/main/java/com/datatorrent/stram/StramClient.java
index 5094dee..2009b49 100644
--- a/engine/src/main/java/com/datatorrent/stram/StramClient.java
+++ b/engine/src/main/java/com/datatorrent/stram/StramClient.java
@@ -94,8 +94,9 @@ import com.datatorrent.stram.plan.logical.LogicalPlan;
public class StramClient
{
private static final Logger LOG = LoggerFactory.getLogger(StramClient.class);
- public static final String YARN_APPLICATION_TYPE_DEPRECATED = "DataTorrent";
public static final String YARN_APPLICATION_TYPE = "ApacheApex";
+ @Deprecated
+ public static final String YARN_APPLICATION_TYPE_DEPRECATED = "DataTorrent";
public static final String LIB_JARS_SEP = ",";
@@ -116,7 +117,7 @@ public class StramClient
private long clientTimeout = 600000;
private String originalAppId;
private String queueName;
- private String applicationType = YARN_APPLICATION_TYPE_DEPRECATED;
+ private String applicationType = YARN_APPLICATION_TYPE;
private String archives;
private String files;
private LinkedHashSet<String> resources;
@@ -322,7 +323,7 @@ public class StramClient
{
Class<?>[] defaultClasses;
- if (applicationType.equals(YARN_APPLICATION_TYPE_DEPRECATED)) {
+ if (applicationType.equals(YARN_APPLICATION_TYPE)) {
//TODO restrict the security check to only check if security is enabled for webservices.
if (UserGroupInformation.isSecurityEnabled()) {
defaultClasses = DATATORRENT_SECURITY_CLASSES;
@@ -387,7 +388,7 @@ public class StramClient
// set the application name
appContext.setApplicationName(dag.getValue(LogicalPlan.APPLICATION_NAME));
appContext.setApplicationType(this.applicationType);
- if (YARN_APPLICATION_TYPE_DEPRECATED.equals(this.applicationType)) {
+ if (YARN_APPLICATION_TYPE.equals(this.applicationType)) {
//appContext.setMaxAppAttempts(1); // no retries until Stram is HA
}
http://git-wip-us.apache.org/repos/asf/apex-core/blob/a9a90e08/engine/src/main/java/com/datatorrent/stram/cli/ApexCli.java
----------------------------------------------------------------------
diff --git a/engine/src/main/java/com/datatorrent/stram/cli/ApexCli.java b/engine/src/main/java/com/datatorrent/stram/cli/ApexCli.java
index 235ba58..69af2e3 100644
--- a/engine/src/main/java/com/datatorrent/stram/cli/ApexCli.java
+++ b/engine/src/main/java/com/datatorrent/stram/cli/ApexCli.java
@@ -1593,7 +1593,7 @@ public class ApexCli
private List<ApplicationReport> getApplicationList()
{
try {
- return yarnClient.getApplications(Sets.newHashSet(StramClient.YARN_APPLICATION_TYPE_DEPRECATED, StramClient.YARN_APPLICATION_TYPE));
+ return yarnClient.getApplications(Sets.newHashSet(StramClient.YARN_APPLICATION_TYPE, StramClient.YARN_APPLICATION_TYPE_DEPRECATED));
} catch (Exception e) {
throw new CliException("Error getting application list from resource manager", e);
}
http://git-wip-us.apache.org/repos/asf/apex-core/blob/a9a90e08/engine/src/main/java/com/datatorrent/stram/client/StramClientUtils.java
----------------------------------------------------------------------
diff --git a/engine/src/main/java/com/datatorrent/stram/client/StramClientUtils.java b/engine/src/main/java/com/datatorrent/stram/client/StramClientUtils.java
index c7e3756..7a3b8d4 100644
--- a/engine/src/main/java/com/datatorrent/stram/client/StramClientUtils.java
+++ b/engine/src/main/java/com/datatorrent/stram/client/StramClientUtils.java
@@ -711,7 +711,7 @@ public class StramClientUtils
public static ApplicationReport getStartedAppInstanceByName(YarnClient clientRMService, String appName, String user, String excludeAppId) throws YarnException, IOException
{
- List<ApplicationReport> applications = clientRMService.getApplications(Sets.newHashSet(StramClient.YARN_APPLICATION_TYPE_DEPRECATED, StramClient.YARN_APPLICATION_TYPE), EnumSet.of(YarnApplicationState.RUNNING,
+ List<ApplicationReport> applications = clientRMService.getApplications(Sets.newHashSet(StramClient.YARN_APPLICATION_TYPE, StramClient.YARN_APPLICATION_TYPE_DEPRECATED), EnumSet.of(YarnApplicationState.RUNNING,
YarnApplicationState.ACCEPTED,
YarnApplicationState.NEW,
YarnApplicationState.NEW_SAVING,
@@ -822,7 +822,7 @@ public class StramClientUtils
throws IOException, YarnException
{
List<ApplicationReport> result = new ArrayList<>();
- List<ApplicationReport> applications = clientRMService.getApplications(Sets.newHashSet(StramClient.YARN_APPLICATION_TYPE_DEPRECATED, StramClient.YARN_APPLICATION_TYPE),
+ List<ApplicationReport> applications = clientRMService.getApplications(Sets.newHashSet(StramClient.YARN_APPLICATION_TYPE, StramClient.YARN_APPLICATION_TYPE_DEPRECATED),
EnumSet.of(YarnApplicationState.FAILED, YarnApplicationState.FINISHED, YarnApplicationState.KILLED));
Path appsBasePath = new Path(StramClientUtils.getDTDFSRootDir(fs, conf), StramClientUtils.SUBDIR_APPS);
for (ApplicationReport ar : applications) {