You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oozie.apache.org by tu...@apache.org on 2012/03/12 23:55:43 UTC
svn commit: r1299919 [2/2] - in /incubator/oozie/trunk: ./
core/src/main/java/org/apache/oozie/action/hadoop/
core/src/main/java/org/apache/oozie/action/oozie/
core/src/main/java/org/apache/oozie/command/bundle/
core/src/main/java/org/apache/oozie/comm...
Modified: incubator/oozie/trunk/core/src/test/java/org/apache/oozie/command/wf/TestReRunXCommand.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/command/wf/TestReRunXCommand.java?rev=1299919&r1=1299918&r2=1299919&view=diff
==============================================================================
--- incubator/oozie/trunk/core/src/test/java/org/apache/oozie/command/wf/TestReRunXCommand.java (original)
+++ incubator/oozie/trunk/core/src/test/java/org/apache/oozie/command/wf/TestReRunXCommand.java Mon Mar 12 22:55:41 2012
@@ -62,7 +62,7 @@ public class TestReRunXCommand extends X
Properties conf = wfClient.createConfiguration();
conf.setProperty(OozieClient.APP_PATH, getTestCaseDir() + File.separator + "workflow.xml");
conf.setProperty(OozieClient.USER_NAME, getTestUser());
- injectKerberosInfo(conf);
+
conf.setProperty("nnbase", path.toString());
conf.setProperty("base", path.toUri().getPath());
@@ -116,7 +116,7 @@ public class TestReRunXCommand extends X
Properties conf = wfClient.createConfiguration();
conf.setProperty(OozieClient.APP_PATH, getTestCaseDir() + File.separator + "workflow.xml");
conf.setProperty(OozieClient.USER_NAME, getTestUser());
- injectKerberosInfo(conf);
+
conf.setProperty("nnbase", path.toString());
conf.setProperty("base", conf.getProperty("nnbase"));
@@ -159,7 +159,7 @@ public class TestReRunXCommand extends X
Properties conf = wfClient.createConfiguration();
conf.setProperty(OozieClient.APP_PATH, getTestCaseDir() + File.separator + "workflow.xml");
conf.setProperty(OozieClient.USER_NAME, getTestUser());
- injectKerberosInfo(conf);
+
conf.setProperty("nnbase", path.toString());
conf.setProperty("base", path.toUri().getPath());
@@ -195,7 +195,7 @@ public class TestReRunXCommand extends X
Properties conf = wfClient.createConfiguration();
conf.setProperty(OozieClient.APP_PATH, getTestCaseDir() + File.separator + "workflow.xml");
conf.setProperty(OozieClient.USER_NAME, getTestUser());
- injectKerberosInfo(conf);
+
conf.setProperty("inPath", getFsTestCaseDir().toString());
conf.setProperty("checkDir", getFsTestCaseDir().toString() + "/check");
Modified: incubator/oozie/trunk/core/src/test/java/org/apache/oozie/command/wf/TestSubmitXCommand.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/command/wf/TestSubmitXCommand.java?rev=1299919&r1=1299918&r2=1299919&view=diff
==============================================================================
--- incubator/oozie/trunk/core/src/test/java/org/apache/oozie/command/wf/TestSubmitXCommand.java (original)
+++ incubator/oozie/trunk/core/src/test/java/org/apache/oozie/command/wf/TestSubmitXCommand.java Mon Mar 12 22:55:41 2012
@@ -74,7 +74,7 @@ public class TestSubmitXCommand extends
writeToFile(appXml, appPath + "/workflow.xml");
conf.set(OozieClient.APP_PATH, appPath);
conf.set(OozieClient.USER_NAME, getTestUser());
- injectKerberosInfo(conf);
+
SubmitXCommand sc = new SubmitXCommand(conf, "UNIT_TESTING");
try {
@@ -94,7 +94,7 @@ public class TestSubmitXCommand extends
writeToFile(appXml, appPath + "/workflow.xml");
conf.set(OozieClient.APP_PATH, appPath + "/workflow.xml");
conf.set(OozieClient.USER_NAME, getTestUser());
- injectKerberosInfo(conf);
+
SubmitXCommand sc = new SubmitXCommand(conf, "UNIT_TESTING");
try {
@@ -114,7 +114,7 @@ public class TestSubmitXCommand extends
writeToFile(appXml, appPath + "/test.xml");
conf.set(OozieClient.APP_PATH, appPath + "/test.xml");
conf.set(OozieClient.USER_NAME, getTestUser());
- injectKerberosInfo(conf);
+
SubmitXCommand sc = new SubmitXCommand(conf, "UNIT_TESTING");
try {
Modified: incubator/oozie/trunk/core/src/test/java/org/apache/oozie/coord/TestCoordELEvaluator.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/coord/TestCoordELEvaluator.java?rev=1299919&r1=1299918&r2=1299919&view=diff
==============================================================================
--- incubator/oozie/trunk/core/src/test/java/org/apache/oozie/coord/TestCoordELEvaluator.java (original)
+++ incubator/oozie/trunk/core/src/test/java/org/apache/oozie/coord/TestCoordELEvaluator.java Mon Mar 12 22:55:41 2012
@@ -166,7 +166,7 @@ public class TestCoordELEvaluator extend
// XConfiguration(IOUtils.getResourceAsReader("org/apache/oozie/coord/conf.xml",
// -1));
Configuration conf = new XConfiguration(new StringReader(getConfString()));
- injectKerberosInfo(conf);
+
Date actualTime = DateUtils.parseDateUTC("2009-09-01T01:00Z");
Date nominalTime = DateUtils.parseDateUTC("2009-09-01T00:00Z");
String dataEvntXML = "<data-in name=\"A\" dataset=\"a\"><uris>file:///tmp/coord/US/2009/1/30|file:///tmp/coord/US/2009/1/31</uris>";
Modified: incubator/oozie/trunk/core/src/test/java/org/apache/oozie/coord/TestCoordELFunctions.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/coord/TestCoordELFunctions.java?rev=1299919&r1=1299918&r2=1299919&view=diff
==============================================================================
--- incubator/oozie/trunk/core/src/test/java/org/apache/oozie/coord/TestCoordELFunctions.java (original)
+++ incubator/oozie/trunk/core/src/test/java/org/apache/oozie/coord/TestCoordELFunctions.java Mon Mar 12 22:55:41 2012
@@ -680,7 +680,7 @@ public class TestCoordELFunctions extend
init("coord-action-start");
String expr = "${coord:latest(0)}";
Configuration conf = new Configuration();
- injectKerberosInfo(conf);
+
// TODO:Set hadoop properties
eval.setVariable(CoordELFunctions.CONFIGURATION, conf);
String testDir = getTestCaseDir();
@@ -745,7 +745,7 @@ public class TestCoordELFunctions extend
init("coord-action-start");
Configuration conf = new Configuration();
- injectKerberosInfo(conf);
+
// TODO:Set hadoop properties
eval.setVariable(CoordELFunctions.CONFIGURATION, conf);
String testDir = getTestCaseDir();
Modified: incubator/oozie/trunk/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobsGetForPurgeJPAExecutor.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobsGetForPurgeJPAExecutor.java?rev=1299919&r1=1299918&r2=1299919&view=diff
==============================================================================
--- incubator/oozie/trunk/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobsGetForPurgeJPAExecutor.java (original)
+++ incubator/oozie/trunk/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobsGetForPurgeJPAExecutor.java Mon Mar 12 22:55:41 2012
@@ -151,7 +151,7 @@ public class TestCoordJobsGetForPurgeJPA
conf.setProperty("wfAppPath", wfAppPath.toString());
conf.remove("user.name");
conf.setProperty("user.name", getTestUser());
- injectKerberosInfo(conf);
+
return conf;
}
}
Modified: incubator/oozie/trunk/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobsToBeMaterializedJPAExecutor.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobsToBeMaterializedJPAExecutor.java?rev=1299919&r1=1299918&r2=1299919&view=diff
==============================================================================
--- incubator/oozie/trunk/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobsToBeMaterializedJPAExecutor.java (original)
+++ incubator/oozie/trunk/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobsToBeMaterializedJPAExecutor.java Mon Mar 12 22:55:41 2012
@@ -172,7 +172,7 @@ public class TestCoordJobsToBeMaterializ
conf.setProperty("wfAppPath", wfAppPath.toString());
conf.remove("user.name");
conf.setProperty("user.name", getTestUser());
- injectKerberosInfo(conf);
+
return conf;
}
}
Modified: incubator/oozie/trunk/core/src/test/java/org/apache/oozie/executor/jpa/TestWorkflowIdGetForExternalIdJPAExecutor.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/executor/jpa/TestWorkflowIdGetForExternalIdJPAExecutor.java?rev=1299919&r1=1299918&r2=1299919&view=diff
==============================================================================
--- incubator/oozie/trunk/core/src/test/java/org/apache/oozie/executor/jpa/TestWorkflowIdGetForExternalIdJPAExecutor.java (original)
+++ incubator/oozie/trunk/core/src/test/java/org/apache/oozie/executor/jpa/TestWorkflowIdGetForExternalIdJPAExecutor.java Mon Mar 12 22:55:41 2012
@@ -71,7 +71,7 @@ public class TestWorkflowIdGetForExterna
conf.set(OozieClient.APP_PATH, "testPath");
conf.set(OozieClient.LOG_TOKEN, "testToken");
conf.set(OozieClient.USER_NAME, getTestUser());
- injectKerberosInfo(conf);
+
WorkflowJobBean wfBean = createWorkflow(app, conf, "auth", jobStatus, instanceStatus);
wfBean.setExternalId("external-id");
Modified: incubator/oozie/trunk/core/src/test/java/org/apache/oozie/executor/jpa/TestWorkflowJobsGetForPurgeJPAExecutor.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/executor/jpa/TestWorkflowJobsGetForPurgeJPAExecutor.java?rev=1299919&r1=1299918&r2=1299919&view=diff
==============================================================================
--- incubator/oozie/trunk/core/src/test/java/org/apache/oozie/executor/jpa/TestWorkflowJobsGetForPurgeJPAExecutor.java (original)
+++ incubator/oozie/trunk/core/src/test/java/org/apache/oozie/executor/jpa/TestWorkflowJobsGetForPurgeJPAExecutor.java Mon Mar 12 22:55:41 2012
@@ -77,7 +77,7 @@ public class TestWorkflowJobsGetForPurge
conf.set(OozieClient.APP_PATH, appUri.toString());
conf.set(OozieClient.LOG_TOKEN, "testToken");
conf.set(OozieClient.USER_NAME, getTestUser());
- injectKerberosInfo(conf);
+
WorkflowJobBean wfBean = createWorkflow(app, conf, "auth", jobStatus, instanceStatus);
Timestamp startTS = new Timestamp(System.currentTimeMillis() - (3 * DAY_IN_MS));
Timestamp endTS = new Timestamp(System.currentTimeMillis() - (2 * DAY_IN_MS));
Modified: incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestActionCheckerService.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestActionCheckerService.java?rev=1299919&r1=1299918&r2=1299919&view=diff
==============================================================================
--- incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestActionCheckerService.java (original)
+++ incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestActionCheckerService.java Mon Mar 12 22:55:41 2012
@@ -87,8 +87,7 @@ public class TestActionCheckerService ex
Configuration conf = new XConfiguration();
conf.set(OozieClient.APP_PATH, getTestCaseDir() + File.separator + "workflow.xml");
conf.set(WorkflowAppService.HADOOP_USER, getTestUser());
- conf.set(WorkflowAppService.HADOOP_UGI, getTestUser() + "," + getTestGroup());
- injectKerberosInfo(conf);
+
conf.set(OozieClient.LOG_TOKEN, "t");
conf.set("external-status", "ok");
@@ -145,8 +144,7 @@ public class TestActionCheckerService ex
conf.set(OozieClient.APP_PATH, getTestCaseDir() + File.separator + "workflow.xml");
conf.setStrings(WorkflowAppService.HADOOP_USER, getTestUser());
conf.setStrings(OozieClient.GROUP_NAME, getTestGroup());
- conf.setStrings(WorkflowAppService.HADOOP_UGI, getTestUser() + "," + getTestGroup());
- injectKerberosInfo(conf);
+
conf.set(OozieClient.LOG_TOKEN, "t");
conf.set("external-status", "ok");
Modified: incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestAuthorizationService.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestAuthorizationService.java?rev=1299919&r1=1299918&r2=1299919&view=diff
==============================================================================
--- incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestAuthorizationService.java (original)
+++ incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestAuthorizationService.java Mon Mar 12 22:55:41 2012
@@ -126,7 +126,7 @@ public class TestAuthorizationService ex
else {
jobConf.set(OozieClient.GROUP_NAME, getTestGroup() + ",foo");
}
- injectKerberosInfo(jobConf);
+
jobConf.set(OozieClient.LOG_TOKEN, "t");
jobConf.set("external-status", "ok");
@@ -233,7 +233,7 @@ public class TestAuthorizationService ex
AuthorizationService as = services.get(AuthorizationService.class);
Configuration conf = new Configuration();
- injectKerberosInfo(conf);
+
HadoopAccessorService has = Services.get().get(HadoopAccessorService.class);
URI uri = getFileSystem().getUri();
Configuration fsConf = has.createJobConf(uri.getAuthority());
Modified: incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestHadoopAccessorService.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestHadoopAccessorService.java?rev=1299919&r1=1299918&r2=1299919&view=diff
==============================================================================
--- incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestHadoopAccessorService.java (original)
+++ incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestHadoopAccessorService.java Mon Mar 12 22:55:41 2012
@@ -67,7 +67,7 @@ public class TestHadoopAccessorService e
JobConf conf = has.createJobConf(getJobTrackerUri());
conf.set("mapred.job.tracker", getJobTrackerUri());
conf.set("fs.default.name", getNameNodeUri());
- injectKerberosInfo(conf);
+
URI uri = new URI(getNameNodeUri());
//valid user
Modified: incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestLiteWorkflowAppService.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestLiteWorkflowAppService.java?rev=1299919&r1=1299918&r2=1299919&view=diff
==============================================================================
--- incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestLiteWorkflowAppService.java (original)
+++ incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestLiteWorkflowAppService.java Mon Mar 12 22:55:41 2012
@@ -85,7 +85,7 @@ public class TestLiteWorkflowAppService
IOUtils.copyCharStream(reader, writer);
Configuration conf = new XConfiguration();
- injectKerberosInfo(conf);
+
WorkflowAppService wps = services.get(WorkflowAppService.class);
String wfDef = wps.readDefinition("file://" + getTestCaseDir() + File.separator + "workflow.xml",
getTestUser(), "authToken", conf);
@@ -124,7 +124,7 @@ public class TestLiteWorkflowAppService
Configuration jobConf = new XConfiguration();
jobConf.set(OozieClient.APP_PATH, "file://" + getTestCaseDir() + File.separator + "workflow.xml");
jobConf.set(OozieClient.USER_NAME, getTestUser());
- injectKerberosInfo(jobConf);
+
WorkflowApp app = wps.parseDef(jobConf, "authToken");
assertNotNull(app);
@@ -164,7 +164,7 @@ public class TestLiteWorkflowAppService
Configuration jobConf = new XConfiguration();
jobConf.set(OozieClient.APP_PATH, "file://" + getTestCaseDir() + File.separator + "workflow.xml");
jobConf.set(OozieClient.USER_NAME, getTestUser());
- injectKerberosInfo(jobConf);
+
LiteWorkflowApp app = (LiteWorkflowApp) wps.parseDef(jobConf, "authToken");
assertNotNull(app);
@@ -202,7 +202,7 @@ public class TestLiteWorkflowAppService
Configuration jobConf = new XConfiguration();
jobConf.set(OozieClient.APP_PATH, "file://" + getTestCaseDir() + File.separator + "workflow.xml");
jobConf.set(OozieClient.USER_NAME, getTestUser());
- injectKerberosInfo(jobConf);
+
try {
LiteWorkflowApp app = (LiteWorkflowApp) wps.parseDef(jobConf, "authToken");
@@ -231,7 +231,7 @@ public class TestLiteWorkflowAppService
Configuration jobConf = new XConfiguration();
jobConf.set(OozieClient.APP_PATH, "file://" + getTestCaseDir() + File.separator + "workflow.xml");
jobConf.set(OozieClient.USER_NAME, getTestUser());
- injectKerberosInfo(jobConf);
+
LiteWorkflowApp app = (LiteWorkflowApp) wps.parseDef(jobConf, "authToken");
assertNotNull(app);
@@ -286,7 +286,7 @@ public class TestLiteWorkflowAppService
Configuration jobConf = new XConfiguration();
jobConf.set(OozieClient.APP_PATH, "file://" + getTestCaseDir() + File.separator + "workflow.xml");
jobConf.set(OozieClient.USER_NAME, getTestUser());
- injectKerberosInfo(jobConf);
+
Configuration protoConf = wps.createProtoActionConf(jobConf, "authToken", true);
assertEquals(getTestUser(), protoConf.get(OozieClient.USER_NAME));
@@ -328,7 +328,7 @@ public class TestLiteWorkflowAppService
jobConf.set(OozieClient.APP_PATH, "file://" + getTestCaseDir() + "/workflow.xml");
jobConf.set(OozieClient.LIBPATH, "file://" + getTestCaseDir() + "/libx");
jobConf.set(OozieClient.USER_NAME, getTestUser());
- injectKerberosInfo(jobConf);
+
Configuration protoConf = wps.createProtoActionConf(jobConf, "authToken", true);
assertEquals(getTestUser(), protoConf.get(OozieClient.USER_NAME));
@@ -387,7 +387,7 @@ public class TestLiteWorkflowAppService
jobConf.setStrings(OozieClient.LIBPATH, "file://" + getTestCaseDir() + "/libx",
"file://" + getTestCaseDir() + "/liby", "file://" + getTestCaseDir() + "/libz");
jobConf.set(OozieClient.USER_NAME, getTestUser());
- injectKerberosInfo(jobConf);
+
Configuration protoConf = wps.createProtoActionConf(jobConf, "authToken", true);
assertEquals(getTestUser(), protoConf.get(OozieClient.USER_NAME));
@@ -438,7 +438,7 @@ public class TestLiteWorkflowAppService
jobConf.set(OozieClient.APP_PATH, "file://" + getTestCaseDir() + File.separator + "workflow.xml");
jobConf.set(OozieClient.USER_NAME, getTestUser());
jobConf.set(WorkflowAppService.APP_LIB_PATH_LIST, "parentdependency1.jar");
- injectKerberosInfo(jobConf);
+
Configuration protoConf = wps.createProtoActionConf(jobConf, "authToken", true);
assertEquals(getTestUser(), protoConf.get(OozieClient.USER_NAME));
@@ -488,7 +488,7 @@ public class TestLiteWorkflowAppService
Configuration jobConf = new XConfiguration();
jobConf.set(OozieClient.APP_PATH, "file://" + getTestCaseDir() + File.separator + "workflow.xml");
jobConf.set(OozieClient.USER_NAME, getTestUser());
- injectKerberosInfo(jobConf);
+
Configuration protoConf = wps.createProtoActionConf(jobConf, "authToken", true);
assertEquals(getTestUser(), protoConf.get(OozieClient.USER_NAME));
Modified: incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestPurgeService.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestPurgeService.java?rev=1299919&r1=1299918&r2=1299919&view=diff
==============================================================================
--- incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestPurgeService.java (original)
+++ incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestPurgeService.java Mon Mar 12 22:55:41 2012
@@ -98,7 +98,7 @@ public class TestPurgeService extends XD
conf.set(OozieClient.APP_PATH, getTestCaseDir() + File.separator + "workflow.xml");
conf.setStrings(OozieClient.USER_NAME, getTestUser());
conf.setStrings(OozieClient.GROUP_NAME, getTestGroup());
- injectKerberosInfo(conf);
+
conf.set(OozieClient.LOG_TOKEN, "t");
conf.set("external-status", "ok");
Modified: incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestRecoveryService.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestRecoveryService.java?rev=1299919&r1=1299918&r2=1299919&view=diff
==============================================================================
--- incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestRecoveryService.java (original)
+++ incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestRecoveryService.java Mon Mar 12 22:55:41 2012
@@ -109,7 +109,7 @@ public class TestRecoveryService extends
Configuration conf = new XConfiguration();
conf.set(OozieClient.APP_PATH, getTestCaseDir() + File.separator + "workflow.xml");
conf.set(OozieClient.USER_NAME, getTestUser());
- injectKerberosInfo(conf);
+
conf.set(OozieClient.LOG_TOKEN, "t");
conf.set("external-status", "ok");
@@ -569,7 +569,7 @@ public class TestRecoveryService extends
createdConf += "</configuration> ";
XConfiguration conf = new XConfiguration(new StringReader(createdConf));
- injectKerberosInfo(conf);
+
createdConf = conf.toXmlString(false);
action.setCreatedConf(createdConf);
Modified: incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestStatusTransitService.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestStatusTransitService.java?rev=1299919&r1=1299918&r2=1299919&view=diff
==============================================================================
--- incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestStatusTransitService.java (original)
+++ incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestStatusTransitService.java Mon Mar 12 22:55:41 2012
@@ -753,7 +753,7 @@ public class TestStatusTransitService ex
conf.set(OozieClient.APP_PATH, appUri.toString());
conf.set(OozieClient.LOG_TOKEN, "testToken");
conf.set(OozieClient.USER_NAME, getTestUser());
- injectKerberosInfo(conf);
+
WorkflowJobBean wfBean = createWorkflow(app, conf, "auth", jobStatus, instanceStatus);
wfBean.setId(wfId);
try {
Modified: incubator/oozie/trunk/core/src/test/java/org/apache/oozie/servlet/TestJobsServlet.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/servlet/TestJobsServlet.java?rev=1299919&r1=1299918&r2=1299919&view=diff
==============================================================================
--- incubator/oozie/trunk/core/src/test/java/org/apache/oozie/servlet/TestJobsServlet.java (original)
+++ incubator/oozie/trunk/core/src/test/java/org/apache/oozie/servlet/TestJobsServlet.java Mon Mar 12 22:55:41 2012
@@ -72,7 +72,7 @@ public class TestJobsServlet extends Dag
Configuration jobConf = new XConfiguration();
jobConf.set(OozieClient.USER_NAME, getTestUser());
jobConf.set(OozieClient.APP_PATH, appPath);
- injectKerberosInfo(jobConf);
+
Map<String, String> params = new HashMap<String, String>();
URL url = createURL("", params);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
@@ -90,7 +90,7 @@ public class TestJobsServlet extends Dag
jobConf = new XConfiguration();
jobConf.set(OozieClient.USER_NAME, getTestUser());
jobConf.set(OozieClient.APP_PATH, appPath);
- injectKerberosInfo(jobConf);
+
params = new HashMap<String, String>();
params.put(RestConstants.ACTION_PARAM, RestConstants.JOB_ACTION_START);
url = createURL("", params);
Modified: incubator/oozie/trunk/core/src/test/java/org/apache/oozie/servlet/TestV0JobServlet.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/servlet/TestV0JobServlet.java?rev=1299919&r1=1299918&r2=1299919&view=diff
==============================================================================
--- incubator/oozie/trunk/core/src/test/java/org/apache/oozie/servlet/TestV0JobServlet.java (original)
+++ incubator/oozie/trunk/core/src/test/java/org/apache/oozie/servlet/TestV0JobServlet.java Mon Mar 12 22:55:41 2012
@@ -117,7 +117,7 @@ public class TestV0JobServlet extends Da
getFileSystem().mkdirs(appPath);
getFileSystem().create(new Path(appPath, "workflow.xml")).close();
conf.set(OozieClient.APP_PATH, appPath.toString());
- injectKerberosInfo(conf);
+
_testAction(RestConstants.JOB_ACTION_RERUN, conf);
}
Modified: incubator/oozie/trunk/core/src/test/java/org/apache/oozie/servlet/TestV1JobsServlet.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/servlet/TestV1JobsServlet.java?rev=1299919&r1=1299918&r2=1299919&view=diff
==============================================================================
--- incubator/oozie/trunk/core/src/test/java/org/apache/oozie/servlet/TestV1JobsServlet.java (original)
+++ incubator/oozie/trunk/core/src/test/java/org/apache/oozie/servlet/TestV1JobsServlet.java Mon Mar 12 22:55:41 2012
@@ -70,7 +70,7 @@ public class TestV1JobsServlet extends D
Configuration jobConf = new XConfiguration();
jobConf.set(OozieClient.USER_NAME, getTestUser());
jobConf.set(OozieClient.APP_PATH, appPath);
- injectKerberosInfo(jobConf);
+
Map<String, String> params = new HashMap<String, String>();
URL url = createURL("", params);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
@@ -88,7 +88,7 @@ public class TestV1JobsServlet extends D
jobConf = new XConfiguration();
jobConf.set(OozieClient.USER_NAME, getTestUser());
jobConf.set(OozieClient.APP_PATH, appPath);
- injectKerberosInfo(jobConf);
+
params = new HashMap<String, String>();
params.put(RestConstants.ACTION_PARAM, RestConstants.JOB_ACTION_START);
url = createURL("", params);
Modified: incubator/oozie/trunk/core/src/test/java/org/apache/oozie/store/TestDBWorkflowStore.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/store/TestDBWorkflowStore.java?rev=1299919&r1=1299918&r2=1299919&view=diff
==============================================================================
--- incubator/oozie/trunk/core/src/test/java/org/apache/oozie/store/TestDBWorkflowStore.java (original)
+++ incubator/oozie/trunk/core/src/test/java/org/apache/oozie/store/TestDBWorkflowStore.java Mon Mar 12 22:55:41 2012
@@ -126,16 +126,12 @@ public class TestDBWorkflowStore extends
conf1.set(OozieClient.APP_PATH, "testPath");
conf1.set(OozieClient.LOG_TOKEN, "testToken");
conf1.set(OozieClient.USER_NAME, "testUser1");
- conf1.set(WorkflowAppService.HADOOP_JT_KERBEROS_NAME, "JT");
- conf1.set(WorkflowAppService.HADOOP_NN_KERBEROS_NAME, "NN");
wfBean1 = createWorkflow(app, conf1, "auth");
Configuration conf2 = new Configuration();
conf2.set(OozieClient.APP_PATH, "testPath");
conf2.set(OozieClient.LOG_TOKEN, "testToken");
conf2.set(OozieClient.USER_NAME, "testUser2");
- conf2.set(WorkflowAppService.HADOOP_JT_KERBEROS_NAME, "JT");
- conf2.set(WorkflowAppService.HADOOP_NN_KERBEROS_NAME, "NN");
wfBean2 = createWorkflow(app, conf2, "auth");
store.insertWorkflow(wfBean1);
@@ -466,8 +462,6 @@ public class TestDBWorkflowStore extends
conf2.set(OozieClient.APP_PATH, "testPath");
conf2.set(OozieClient.LOG_TOKEN, "testToken");
conf2.set(OozieClient.USER_NAME, "testUser2");
- conf2.set(WorkflowAppService.HADOOP_JT_KERBEROS_NAME, "JT");
- conf2.set(WorkflowAppService.HADOOP_NN_KERBEROS_NAME, "NN");
WorkflowJobBean wfBean3 = createWorkflow(app, conf2, "auth");
store.insertWorkflow(wfBean3);
Modified: incubator/oozie/trunk/core/src/test/java/org/apache/oozie/test/XDataTestCase.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/test/XDataTestCase.java?rev=1299919&r1=1299918&r2=1299919&view=diff
==============================================================================
--- incubator/oozie/trunk/core/src/test/java/org/apache/oozie/test/XDataTestCase.java (original)
+++ incubator/oozie/trunk/core/src/test/java/org/apache/oozie/test/XDataTestCase.java Mon Mar 12 22:55:41 2012
@@ -545,7 +545,7 @@ public abstract class XDataTestCase exte
conf.set(OozieClient.APP_PATH, appUri.toString());
conf.set(OozieClient.LOG_TOKEN, "testToken");
conf.set(OozieClient.USER_NAME, getTestUser());
- injectKerberosInfo(conf);
+
WorkflowJobBean wfBean = createWorkflow(app, conf, "auth", jobStatus, instanceStatus);
try {
@@ -858,7 +858,7 @@ public abstract class XDataTestCase exte
jobConf.set("jobTracker", getJobTrackerUri());
jobConf.set("nameNode", getNameNodeUri());
jobConf.set("wfAppPath", wfAppPath.toString());
- injectKerberosInfo(jobConf);
+
String content = "<workflow-app xmlns='uri:oozie:workflow:0.1' xmlns:sla='uri:oozie:sla:0.1' name='no-op-wf'>";
content += "<start to='end' />";
@@ -1006,7 +1006,7 @@ public abstract class XDataTestCase exte
conf.set(OozieClient.USER_NAME, getTestUser());
conf.set("jobTracker", getJobTrackerUri());
conf.set("nameNode", getNameNodeUri());
- injectKerberosInfo(conf);
+
BundleJobBean bundle = new BundleJobBean();
bundle.setId(Services.get().get(UUIDService.class).generateId(ApplicationType.BUNDLE));
@@ -1061,7 +1061,7 @@ public abstract class XDataTestCase exte
conf.set(OozieClient.USER_NAME, getTestUser());
conf.set("jobTracker", getJobTrackerUri());
conf.set("nameNode", getNameNodeUri());
- injectKerberosInfo(conf);
+
BundleJobBean bundle = new BundleJobBean();
bundle.setId(Services.get().get(UUIDService.class).generateId(ApplicationType.BUNDLE));
Modified: incubator/oozie/trunk/core/src/test/java/org/apache/oozie/test/XFsTestCase.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/test/XFsTestCase.java?rev=1299919&r1=1299918&r2=1299919&view=diff
==============================================================================
--- incubator/oozie/trunk/core/src/test/java/org/apache/oozie/test/XFsTestCase.java (original)
+++ incubator/oozie/trunk/core/src/test/java/org/apache/oozie/test/XFsTestCase.java Mon Mar 12 22:55:41 2012
@@ -62,7 +62,7 @@ public abstract class XFsTestCase extend
conf.set("oozie.service.HadoopAccessorService.keytab.file", getKeytabFile());
conf.set("oozie.service.HadoopAccessorService.kerberos.principal", getOoziePrincipal());
conf.set("local.realm", getRealm());
- injectKerberosInfo(conf);
+
conf.set("oozie.service.HadoopAccessorService.hadoop.configurations", "*=hadoop-conf");
@@ -139,7 +139,7 @@ public abstract class XFsTestCase extend
JobConf conf = has.createJobConf(getJobTrackerUri());
conf.set("mapred.job.tracker", getJobTrackerUri());
conf.set("fs.default.name", getNameNodeUri());
- injectKerberosInfo(conf);
+
return has.createJobClient(getTestUser(), conf);
}
Modified: incubator/oozie/trunk/core/src/test/java/org/apache/oozie/test/XTestCase.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/test/XTestCase.java?rev=1299919&r1=1299918&r2=1299919&view=diff
==============================================================================
--- incubator/oozie/trunk/core/src/test/java/org/apache/oozie/test/XTestCase.java (original)
+++ incubator/oozie/trunk/core/src/test/java/org/apache/oozie/test/XTestCase.java Mon Mar 12 22:55:41 2012
@@ -549,25 +549,6 @@ public abstract class XTestCase extends
getOozieUser() + "/localhost") + "@" + getRealm();
}
- public String getJobTrackerPrincipal() {
- return System.getProperty("oozie.test.kerberos.jobtracker.principal", "mapred/_HOST") + "@" + getRealm();
- }
-
- public String getNamenodePrincipal() {
- return System.getProperty("oozie.test.kerberos.namenode.principal", "hdfs/_HOST") + "@" + getRealm();
- }
-
- public <C extends Configuration> C injectKerberosInfo(C conf) {
- conf.set(WorkflowAppService.HADOOP_JT_KERBEROS_NAME, getJobTrackerPrincipal());
- conf.set(WorkflowAppService.HADOOP_NN_KERBEROS_NAME, getNamenodePrincipal());
- return conf;
- }
-
- public void injectKerberosInfo(Properties conf) {
- conf.setProperty(WorkflowAppService.HADOOP_JT_KERBEROS_NAME, getJobTrackerPrincipal());
- conf.setProperty(WorkflowAppService.HADOOP_NN_KERBEROS_NAME, getNamenodePrincipal());
- }
-
//TODO Fix this
/**
* Clean up database schema
Modified: incubator/oozie/trunk/minitest/src/test/java/org/apache/oozie/test/WorkflowTest.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/minitest/src/test/java/org/apache/oozie/test/WorkflowTest.java?rev=1299919&r1=1299918&r2=1299919&view=diff
==============================================================================
--- incubator/oozie/trunk/minitest/src/test/java/org/apache/oozie/test/WorkflowTest.java (original)
+++ incubator/oozie/trunk/minitest/src/test/java/org/apache/oozie/test/WorkflowTest.java Mon Mar 12 22:55:41 2012
@@ -69,7 +69,7 @@ public class WorkflowTest extends MiniOo
conf.setProperty(OozieClient.APP_PATH, appPath.toString() + File.separator + "workflow.xml");
conf.setProperty(OozieClient.USER_NAME, getTestUser());
conf.setProperty(OozieClient.GROUP_NAME, getTestGroup());
- injectKerberosInfo(conf);
+
final String jobId = wc.submit(conf);
assertNotNull(jobId);
@@ -116,7 +116,7 @@ public class WorkflowTest extends MiniOo
conf.setProperty("nnbase", path.toString());
conf.setProperty("base", path.toUri().getPath());
- injectKerberosInfo(conf);
+
final String jobId = wc.submit(conf);
assertNotNull(jobId);
Modified: incubator/oozie/trunk/release-log.txt
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/release-log.txt?rev=1299919&r1=1299918&r2=1299919&view=diff
==============================================================================
--- incubator/oozie/trunk/release-log.txt (original)
+++ incubator/oozie/trunk/release-log.txt Mon Mar 12 22:55:41 2012
@@ -1,5 +1,6 @@
-- Oozie 3.2.0 release
+OOZIE-755 remove hadoop.job.ugi and kerberos principal hardcoded injections (tucu)
OOZIE-754 remove use of group from HadoopAccessor (tucu)
OOZIE-752 if group.name/oozie.job.acl is not defined in job.properties job submission fails (tucu)
OOZIE-753 default hadoop config file does not endup in the distro and hadoop config doc typo (tucu)