Skip to content
Browse files

Classpath additions as well as crack at the upload bug

  • Loading branch information...
1 parent 3415192 commit 66a387e5a0e345b8a70ec2f7a872296fb53c44d8 @rbpark rbpark committed Mar 5, 2010
Showing with 58 additions and 2 deletions.
  1. +33 −0 .classpath
  2. +17 −0 .project
  3. +8 −2 azkaban/src/java/azkaban/web/JobManagerServlet.java
View
33 .classpath
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="azkaban-common/src/java"/>
+ <classpathentry kind="src" path="azkaban/src/java"/>
+ <classpathentry kind="lib" path="lib/log4j-1.2.15.jar"/>
+ <classpathentry kind="lib" path="lib/commons-cli-2.0-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/jetty-5.1.4.jar"/>
+ <classpathentry kind="lib" path="lib/joda-time-1.6.jar"/>
+ <classpathentry kind="lib" path="lib/mail-1.4.1.jar"/>
+ <classpathentry kind="lib" path="lib/servlet-api.jar"/>
+ <classpathentry kind="lib" path="lib/catalina-ant.jar"/>
+ <classpathentry kind="lib" path="lib/commons-logging-1.0.4.jar"/>
+ <classpathentry kind="lib" path="lib/commons-logging-api-1.0.4.jar"/>
+ <classpathentry kind="lib" path="lib/google-collect-1.0-rc2.jar"/>
+ <classpathentry kind="lib" path="lib/commons-collections-3.1.jar"/>
+ <classpathentry kind="lib" path="lib/commons-fileupload-1.2.1.jar"/>
+ <classpathentry kind="lib" path="lib/hadoop-0.20.2-core.jar"/>
+ <classpathentry kind="lib" path="lib/jopt-simple-3.2.jar"/>
+ <classpathentry kind="lib" path="lib/commons-io-1.4.jar"/>
+ <classpathentry kind="lib" path="lib/voldemort-0.70.1.jar"/>
+ <classpathentry kind="lib" path="lib/voldemort-contrib-0.70.1.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="lib" path="lib/velocity-1.6.3.jar"/>
+ <classpathentry kind="lib" path="lib/commons-lang-2.4.jar"/>
+ <classpathentry kind="lib" path="lib/cglib-nodep-2.2.jar"/>
+ <classpathentry kind="lib" path="lib/easymock-2.5.2.jar"/>
+ <classpathentry kind="lib" path="lib/easymockclassextension-2.5.2.jar"/>
+ <classpathentry kind="lib" path="lib/hadoop-0.20.0-core.jar"/>
+ <classpathentry kind="lib" path="lib/junit-4.8.1.jar"/>
+ <classpathentry kind="lib" path="lib/objenesis-1.2.jar"/>
+ <classpathentry kind="lib" path="lib/org-json-2010-02-26.jar"/>
+ <classpathentry kind="output" path="classes"/>
+</classpath>
View
17 .project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>azkaban</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
View
10 azkaban/src/java/azkaban/web/JobManagerServlet.java
@@ -30,7 +30,8 @@
private static final long serialVersionUID = 1;
private static final int DEFAULT_UPLOAD_DISK_SPOOL_SIZE = 20 * 1024 * 1024;
-
+ private static final String TEMP_DIRECTORY = "azkaban_temp";
+
private JobManager _jobManager;
private MultipartParser _multipartParser;
@@ -39,6 +40,11 @@ public void init(ServletConfig config) throws ServletException {
super.init(config);
this._jobManager = this.getApplication().getJobManager();
this._multipartParser = new MultipartParser(DEFAULT_UPLOAD_DISK_SPOOL_SIZE);
+
+ File file = new File(TEMP_DIRECTORY);
+ if (!file.exists()) {
+ file.mkdirs();
+ }
}
@Override
@@ -83,7 +89,7 @@ private File unzipFile(FileItem item) throws ServletException, IOException {
IOUtils.copy(item.getInputStream(), out);
out.close();
ZipFile zipfile = new ZipFile(temp);
- File unzipped = Utils.createTempDir();
+ File unzipped = Utils.createTempDir(new File(TEMP_DIRECTORY));
Utils.unzip(zipfile, unzipped);
temp.delete();
return unzipped;

0 comments on commit 66a387e

Please sign in to comment.
Something went wrong with that request. Please try again.