[ 
https://issues.apache.org/jira/browse/TEZ-1664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14185570#comment-14185570
 ] 

Bikas Saha commented on TEZ-1664:
---------------------------------

version info check has static. Does this mean that a long lived user client 
cannot use a different version of tez because the static would have the 
previous version set? Lets say the client accepts tez conf and submits jobs for 
multiple users.
Can the tez version object be created locally here and passed to the the 
replace method? Is the static used because version info creation is expensive? 
Can we cache in a map?
{code}+
+    addVersionInfoToEnv(environment);{code}

extra space
{code}+  public TezApiVersionInfo() {
+    super("tez-api");
+
+  }{code}

why is this under version info check?
{code}-    String maxAppAttemptsEnv = System.getenv(
-        ApplicationConstants.MAX_APP_ATTEMPTS_ENV);
-    if (maxAppAttemptsEnv != null) {
-      maxAppAttempts = Integer.valueOf(maxAppAttemptsEnv);
+    if (!versionMismatch) {
+      String maxAppAttemptsEnv = System.getenv(
+          ApplicationConstants.MAX_APP_ATTEMPTS_ENV);
+      if (maxAppAttemptsEnv != null) {
+        maxAppAttempts = Integer.valueOf(maxAppAttemptsEnv);
+      }{code}

re-ordering intentional? related?
{code}-    this.aclManager = new ACLManager(appMasterUgi.getShortUserName(), 
this.amConf);
+    addIfService(dispatcher, false);
 
+    this.aclManager = new ACLManager(appMasterUgi.getShortUserName(), 
this.amConf);
     clientHandler = new DAGClientHandler(this);
 
-    addIfService(dispatcher, false);{code}

The patch is making some changes to init etc. to handle RM notifications. IMO, 
this error should be rare enough that we could get away with not doing this and 
letting the AM be restarted a couple of times if that happens. In fact, we 
should look at changing am-retries to 1 because the RM already has code in 2.6 
to not count machine related failures (bad disk) against the AM's retry count. 
The extra change in init inside Tez is probably not worth the complications for 
the this case IMO.

> Add checks to ensure that the client and AM are compatible 
> -----------------------------------------------------------
>
>                 Key: TEZ-1664
>                 URL: https://issues.apache.org/jira/browse/TEZ-1664
>             Project: Apache Tez
>          Issue Type: Bug
>            Reporter: Hitesh Shah
>            Assignee: Hitesh Shah
>         Attachments: TEZ-1664.1.wip.patch, TEZ-1664.2.patch
>
>
> There is a potential chance that a client is misconfigured wrongly to point 
> to an incompatible tez tar ball on HDFS.
> Until we end up supporting either compatibility across various versions or 
> uploading the tez tarball if not configured, we should do a version 
> compatibility check and fail the AM if it was launched by an incompatible 
> client. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to