azkaban-uncached

Details

.classpath 1(+1 -0)

diff --git a/.classpath b/.classpath
index d032477..c81935d 100644
--- a/.classpath
+++ b/.classpath
@@ -31,5 +31,6 @@
 	<classpathentry kind="lib" path="extlib/mysql-connector-java-5.1.16-bin.jar"/>
 	<classpathentry kind="lib" path="lib/commons-pool-1.6.jar"/>
 	<classpathentry kind="lib" path="lib/h2-1.3.170.jar"/>
+	<classpathentry kind="lib" path="lib/commons-jexl-2.1.1.jar"/>
 	<classpathentry kind="output" path="dist/classes"/>
 </classpath>
diff --git a/src/java/azkaban/utils/Emailer.java b/src/java/azkaban/utils/Emailer.java
index 4349bd8..ec75d6a 100644
--- a/src/java/azkaban/utils/Emailer.java
+++ b/src/java/azkaban/utils/Emailer.java
@@ -66,7 +66,12 @@ public class Emailer extends AbstractMailer implements Alerter {
 		EmailMessage.setConnectionTimeout(connectionTimeout);
 		
 		this.clientHostname = props.getString("jetty.hostname", "localhost");
-		this.clientPortNumber = Utils.nonNull(props.getString("jetty.ssl.port"));
+		
+		if (props.getBoolean("jetty.use.ssl", true)) {
+			this.clientPortNumber = props.getString("jetty.ssl.port");
+		} else {
+			this.clientPortNumber = props.getString("jetty.port");
+		}
 		
 		testMode = props.getBoolean("test.mode", false);
 	}
diff --git a/src/java/azkaban/webapp/AzkabanWebServer.java b/src/java/azkaban/webapp/AzkabanWebServer.java
index e066be9..6096b68 100644
--- a/src/java/azkaban/webapp/AzkabanWebServer.java
+++ b/src/java/azkaban/webapp/AzkabanWebServer.java
@@ -1029,14 +1029,36 @@ public class AzkabanWebServer extends AzkabanServer {
 						logger.error(e);
 					}
 				}
+				
+				// Load any external libraries.
 				if (extLibClasspath != null) {
 					for (String extLib : extLibClasspath) {
-						try {
-							File file = new File(pluginDir, extLib);
-							URL url = file.toURI().toURL();
-							urls.add(url);
-						} catch (MalformedURLException e) {
-							logger.error(e);
+						File extLibFile = new File(pluginDir, extLib);
+						if (extLibFile.exists()) {
+							if (extLibFile.isDirectory()) {
+								// extLibFile is a directory; load all the files in the directory.
+								File[] extLibFiles = extLibFile.listFiles();
+								for (int i=0; i < extLibFiles.length; ++i) {
+									try {
+										URL url = extLibFiles[i].toURI().toURL();
+										urls.add(url);
+									} catch (MalformedURLException e) {
+										logger.error(e);
+									}
+								}
+							}
+							else { // extLibFile is a file
+								try {
+									URL url = extLibFile.toURI().toURL();
+									urls.add(url);
+								} catch (MalformedURLException e) {
+									logger.error(e);
+								}
+							}
+						}
+						else {
+							logger.error("External library path " + extLibFile.getAbsolutePath() + " not found.");
+							continue;
 						}
 					}
 				}
@@ -1044,7 +1066,7 @@ public class AzkabanWebServer extends AzkabanServer {
 				urlClassLoader = new URLClassLoader(urls.toArray(new URL[urls.size()]), parentLoader);
 			}
 			else {
-				logger.error("Library path " + propertiesDir + " not found.");
+				logger.error("Library path " + libDir.getAbsolutePath() + " not found.");
 				continue;
 			}
 			
diff --git a/src/sql/database.properties b/src/sql/database.properties
index 8b13789..b68be28 100644
--- a/src/sql/database.properties
+++ b/src/sql/database.properties
@@ -1 +1 @@
-
+version=
diff --git a/src/sql/update.execution_logs.2.1.sql b/src/sql/update.execution_logs.2.1.sql
index 5c2dc0b..1760a4b 100644
--- a/src/sql/update.execution_logs.2.1.sql
+++ b/src/sql/update.execution_logs.2.1.sql
@@ -2,6 +2,5 @@ ALTER TABLE execution_logs ADD COLUMN attempt INT DEFAULT 0;
 ALTER TABLE execution_logs ADD COLUMN upload_time BIGINT DEFAULT 1420099200000;
 UPDATE execution_logs SET upload_time=(UNIX_TIMESTAMP()*1000) WHERE upload_time=1420099200000;
 
-ALTER TABLE execution_logs DROP PRIMARY KEY;
 ALTER TABLE execution_logs ADD PRIMARY KEY(exec_id, name, attempt, start_byte);
-ALTER TABLE execution_logs ADD INDEX ex_log_attempt (exec_id, name, attempt)
+ALTER TABLE execution_logs ADD INDEX ex_log_attempt (exec_id, name, attempt);