You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oozie.apache.org by mo...@apache.org on 2012/11/27 23:35:04 UTC
svn commit: r1414446 - in /oozie/trunk:
core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
core/src/main/java/org/apache/oozie/service/HadoopAccessorService.java
release-log.txt
Author: mona
Date: Tue Nov 27 22:35:02 2012
New Revision: 1414446
URL: http://svn.apache.org/viewvc?rev=1414446&view=rev
Log:
OOZIE-1015 HadoopAccessorService jobtracker validation should not have hardcoded conf key (mona)
Modified:
oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
oozie/trunk/core/src/main/java/org/apache/oozie/service/HadoopAccessorService.java
oozie/trunk/release-log.txt
Modified: oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
URL: http://svn.apache.org/viewvc/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java?rev=1414446&r1=1414445&r2=1414446&view=diff
==============================================================================
--- oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java (original)
+++ oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java Tue Nov 27 22:35:02 2012
@@ -79,10 +79,10 @@ import org.apache.hadoop.security.token.
public class JavaActionExecutor extends ActionExecutor {
private static final String HADOOP_USER = "user.name";
- private static final String HADOOP_JOB_TRACKER = "mapred.job.tracker";
- private static final String HADOOP_JOB_TRACKER_2 = "mapreduce.jobtracker.address";
- private static final String HADOOP_YARN_RM = "yarn.resourcemanager.address";
- private static final String HADOOP_NAME_NODE = "fs.default.name";
+ public static final String HADOOP_JOB_TRACKER = "mapred.job.tracker";
+ public static final String HADOOP_JOB_TRACKER_2 = "mapreduce.jobtracker.address";
+ public static final String HADOOP_YARN_RM = "yarn.resourcemanager.address";
+ public static final String HADOOP_NAME_NODE = "fs.default.name";
private static final String HADOOP_JOB_NAME = "mapred.job.name";
public static final String OOZIE_COMMON_LIBDIR = "oozie";
public static final int MAX_EXTERNAL_STATS_SIZE_DEFAULT = Integer.MAX_VALUE;
@@ -711,7 +711,7 @@ public class JavaActionExecutor extends
if (alreadyRunning && !isUserRetry) {
runningJob = jobClient.getJob(JobID.forName(launcherId));
if (runningJob == null) {
- String jobTracker = launcherJobConf.get("mapred.job.tracker");
+ String jobTracker = launcherJobConf.get(HADOOP_JOB_TRACKER);
throw new ActionExecutorException(ActionExecutorException.ErrorType.ERROR, "JA017",
"unknown job [{0}@{1}], cannot recover", launcherId, jobTracker);
}
@@ -720,8 +720,8 @@ public class JavaActionExecutor extends
XLog.getLog(getClass()).debug("Submitting the job through Job Client for action " + action.getId());
// setting up propagation of the delegation token.
- Token<DelegationTokenIdentifier> mrdt = jobClient.getDelegationToken(new Text("mr token"));
- launcherJobConf.getCredentials().addToken(new Text("mr token"), mrdt);
+ Token<DelegationTokenIdentifier> mrdt = jobClient.getDelegationToken(new Text(HadoopAccessorService.MR_DELEGATION_TOKEN));
+ launcherJobConf.getCredentials().addToken(new Text(HadoopAccessorService.MR_DELEGATION_TOKEN), mrdt);
// insert credentials tokens to launcher job conf if needed
if (needInjectCredentials()) {
Modified: oozie/trunk/core/src/main/java/org/apache/oozie/service/HadoopAccessorService.java
URL: http://svn.apache.org/viewvc/oozie/trunk/core/src/main/java/org/apache/oozie/service/HadoopAccessorService.java?rev=1414446&r1=1414445&r2=1414446&view=diff
==============================================================================
--- oozie/trunk/core/src/main/java/org/apache/oozie/service/HadoopAccessorService.java (original)
+++ oozie/trunk/core/src/main/java/org/apache/oozie/service/HadoopAccessorService.java Tue Nov 27 22:35:02 2012
@@ -28,6 +28,7 @@ import org.apache.hadoop.security.UserGr
import org.apache.hadoop.filecache.DistributedCache;
import org.apache.hadoop.security.token.Token;
import org.apache.oozie.ErrorCode;
+import org.apache.oozie.action.hadoop.JavaActionExecutor;
import org.apache.oozie.util.ParamChecker;
import org.apache.oozie.util.XConfiguration;
import org.apache.oozie.util.XLog;
@@ -62,6 +63,7 @@ public class HadoopAccessorService imple
public static final String KERBEROS_AUTH_ENABLED = CONF_PREFIX + "kerberos.enabled";
public static final String KERBEROS_KEYTAB = CONF_PREFIX + "keytab.file";
public static final String KERBEROS_PRINCIPAL = CONF_PREFIX + "kerberos.principal";
+ public static final String MR_DELEGATION_TOKEN = "oozie mr token";
private static final String OOZIE_HADOOP_ACCESSOR_SERVICE_CREATED = "oozie.HadoopAccessorService.created";
@@ -351,7 +353,7 @@ public class HadoopAccessorService imple
if (!conf.getBoolean(OOZIE_HADOOP_ACCESSOR_SERVICE_CREATED, false)) {
throw new HadoopAccessorException(ErrorCode.E0903);
}
- String jobTracker = conf.get("mapred.job.tracker");
+ String jobTracker = conf.get(JavaActionExecutor.HADOOP_JOB_TRACKER);
validateJobTracker(jobTracker);
try {
UserGroupInformation ugi = getUGI(user);
@@ -360,8 +362,8 @@ public class HadoopAccessorService imple
return new JobClient(conf);
}
});
- Token<DelegationTokenIdentifier> mrdt = jobClient.getDelegationToken(new Text("mr token"));
- conf.getCredentials().addToken(new Text("mr token"), mrdt);
+ Token<DelegationTokenIdentifier> mrdt = jobClient.getDelegationToken(new Text(MR_DELEGATION_TOKEN));
+ conf.getCredentials().addToken(new Text(MR_DELEGATION_TOKEN), mrdt);
return jobClient;
}
catch (InterruptedException ex) {
Modified: oozie/trunk/release-log.txt
URL: http://svn.apache.org/viewvc/oozie/trunk/release-log.txt?rev=1414446&r1=1414445&r2=1414446&view=diff
==============================================================================
--- oozie/trunk/release-log.txt (original)
+++ oozie/trunk/release-log.txt Tue Nov 27 22:35:02 2012
@@ -1,5 +1,6 @@
-- Oozie 3.4.0 release (trunk - unreleased)
+OOZIE-1015 HadoopAccessorService jobtracker validation should not have hardcoded conf key (mona)
OOZIE-1078 Help -> Documentation and Help -> Online Help should link to oozie.apache.org/ (jun via mohammad)
OOZIE-1057 Log message for retrying to connect to the JT always says 60,000 milliseconds (jiezhou via rkanter)
OOZIE-1080 Add a dryrun option for workflows (rkanter)
@@ -26,13 +27,11 @@ OOZIE-1017 Add test to make sure old ver
OOZIE-949 Allow the user to set 'mapred.job.name' (jrkinley via tucu)
OOZIE-1009 Documentation pages should use default ports for Oozie/JT/NN (tucu)
OOZIE-669 Deprecate oozie-start.sh, oozie-stop.sh & oozie-run.sh scripts (rkanter via tucu)
-OOZIE-1005 Tests from OOZIE-994 use wrong condition in waitFor (rkanter via virag)
OOZIE-992 Add overall status to test-patch messages and add some color-coding for negative results (tucu)
OOZIE-1003 TestOozieCLI.testSubmitDoAs() should disable anonymous request (tucu)
OOZIE-1004 Oozie client needs to bundle slf4j JARs (tucu)
OOZIE-1000 Remove Yahoo branding from docs, tests, etc (rkanter via virag)
OOZIE-999 XLogStreamer requires log4j.appender.oozie.layout.ConversionPattern to contain a "-" (dash) or streaming logs to web UI and CLI don't work (rkanter via virag)
-OOZIE-994 ActionCheckXCommand does not handle failures properly (rkanter via virag)
OOZIE-998 test-patch doesn't allow lines that are exactly 132 characters (rkanter via tucu)
OOZIE-739 a coord action fails because the uri points to a namenode that is not in whitelist. the E0901 error shows in the oozie.log, but not written to the database (mona,mbattisha via virag)
OOZIE-987 Fix minor bug in one of the uber jar tests (rkanter via tucu)
@@ -51,6 +50,8 @@ OOZIE-944 Implement Workflow Generator U
-- Oozie 3.3.0 release (unreleased)
OOZIE-1089 DistributedCache workaround for Hadoop 2.0.2-alpha (tucu)
+OOZIE-1005 Tests from OOZIE-994 use wrong condition in waitFor (rkanter via virag)
+OOZIE-994 ActionCheckXCommand does not handle failures properly (rkanter via virag)
OOZIE-1058 ACL modify-job should not be hardcoded to group name(mona via mohammad)
OOZIE-1052 HadoopAccessorService.createFileSystem throws exception in map-reduce action, failing workflow.(ryota via mohammad).
OOZIE-1060 bump hadoop 2.X version to 2.0.2-alpha (rvs via tucu)