提交 a7493f7a 编写于 作者: R Robert Metzger

Various minor fixes:

- better exceptions for faulty temporary directories
- better exception if client can not connect to JobManager
上级 80ab5309
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>log4j</groupId> <groupId>log4j</groupId>
<artifactId>log4j</artifactId> <artifactId>log4j</artifactId>
<version>1.2.16</version> <version>1.2.16</version>
...@@ -234,64 +234,62 @@ ...@@ -234,64 +234,62 @@
</pluginManagement> </pluginManagement>
</build> </build>
</profile> </profile>
<profile> <profile>
<id>jdk8</id> <id>jdk8</id>
<activation> <activation>
<activeByDefault>false</activeByDefault> <activeByDefault>false</activeByDefault>
<jdk>1.8</jdk> <jdk>1.8</jdk>
</activation> </activation>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version> <version>2.9.1</version>
<configuration> <configuration>
<quiet>true</quiet> <quiet>true</quiet>
</configuration> </configuration>
<executions> <executions>
<execution> <execution>
<id>attach-javadocs</id> <id>attach-javadocs</id>
<goals> <goals>
<goal>jar</goal> <goal>jar</goal>
</goals> </goals>
<configuration> <configuration>
<additionalparam>-Xdoclint:none</additionalparam> <additionalparam>-Xdoclint:none</additionalparam>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
</profile> </profile>
</profiles> </profiles>
<dependencyManagement> <dependencyManagement>
<!-- this section defines the module versions that are used if nothing else is specified. --> <!-- this section defines the module versions that are used if nothing else is specified. -->
<dependencies> <dependencies>
<!-- Managed dependency required for HBase in pact-hbase --> <!-- Managed dependency required for HBase in pact-hbase -->
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId> <artifactId>slf4j-api</artifactId>
<version>1.4.3</version> <version>1.4.3</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId> <artifactId>slf4j-log4j12</artifactId>
<version>1.4.3</version> <version>1.4.3</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.javassist</groupId> <groupId>org.javassist</groupId>
<artifactId>javassist</artifactId> <artifactId>javassist</artifactId>
<version>3.18.1-GA</version> <version>3.18.1-GA</version>
</dependency> </dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
<reporting> <reporting>
<plugins> <plugins>
<!-- execution of Unit Tests --> <!-- execution of Unit Tests -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
...@@ -319,43 +317,43 @@ ...@@ -319,43 +317,43 @@
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.rat</groupId> <groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId> <artifactId>apache-rat-plugin</artifactId>
<version>0.10</version> <version>0.10</version>
<executions> <executions>
<execution> <execution>
<phase>verify</phase> <phase>verify</phase>
<goals> <goals>
<goal>check</goal> <goal>check</goal>
</goals> </goals>
</execution> </execution>
</executions> </executions>
<configuration> <configuration>
<excludeSubProjects>false</excludeSubProjects> <excludeSubProjects>false</excludeSubProjects>
<numUnapprovedLicenses>0</numUnapprovedLicenses> <numUnapprovedLicenses>0</numUnapprovedLicenses>
<excludes> <excludes>
<!-- Additional files like .gitignore etc.--> <!-- Additional files like .gitignore etc.-->
<exclude>**/.*</exclude> <exclude>**/.*</exclude>
<exclude>**/*.prefs</exclude> <exclude>**/*.prefs</exclude>
<!-- Resource files which have values. --> <!-- Resource files which have values. -->
<exclude>**/resources/**</exclude> <exclude>**/resources/**</exclude>
<!-- Configuration Files. --> <!-- Configuration Files. -->
<exclude>**/stratosphere-bin/conf/slaves</exclude> <exclude>**/stratosphere-bin/conf/slaves</exclude>
<!-- Administrative files in the main trunk. --> <!-- Administrative files in the main trunk. -->
<exclude>README.md</exclude> <exclude>README.md</exclude>
<exclude>CHANGELOG</exclude> <exclude>CHANGELOG</exclude>
<exclude>**/*.creole</exclude> <exclude>**/*.creole</exclude>
<exclude>CONTRIBUTORS</exclude> <exclude>CONTRIBUTORS</exclude>
<!-- Build fiels --> <!-- Build fiels -->
<exclude>**/pom.xml</exclude> <exclude>**/pom.xml</exclude>
<exclude>**/pom.hadoop2.xml</exclude> <exclude>**/pom.hadoop2.xml</exclude>
<exclude>**/*.iml</exclude> <exclude>**/*.iml</exclude>
<!-- Generated content --> <!-- Generated content -->
<exclude>**/target/**</exclude> <exclude>**/target/**</exclude>
</excludes> </excludes>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
<!-- just define the Java version to be used for compiling and plugins --> <!-- just define the Java version to be used for compiling and plugins -->
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
...@@ -440,8 +438,8 @@ ...@@ -440,8 +438,8 @@
<configuration> <configuration>
<rules> <rules>
<requireMavenVersion> <requireMavenVersion>
<version>(,2.1.0),(2.1.0,2.2.0),(2.2.0,)</version> <!-- enforce at least mvn version 3.0.3 -->
<message>Maven 2.1.0 and 2.2.0 produce incorrect GPG signatures and checksums respectively.</message> <version>[3.0.3,)</version>
</requireMavenVersion> </requireMavenVersion>
</rules> </rules>
</configuration> </configuration>
......
...@@ -1549,7 +1549,9 @@ public class PactCompiler { ...@@ -1549,7 +1549,9 @@ public class PactCompiler {
throw new CompilerException(e.getMessage()); throw new CompilerException(e.getMessage());
} }
catch (Throwable t) { catch (Throwable t) {
throw new CompilerException("Error while connecting to the job manager: " + t.getMessage(), t); throw new CompilerException("Cannot connect to the JobManager to determine the available TaskManagers. "
+ "Check if the JobManager is running (using the web interface or log files). Reason: " +
t.getMessage(), t);
} }
// determine which type to run on // determine which type to run on
......
...@@ -934,15 +934,15 @@ public class TaskManager implements TaskOperationProtocol { ...@@ -934,15 +934,15 @@ public class TaskManager implements TaskOperationProtocol {
final File f = new File(dir); final File f = new File(dir);
if (!f.exists()) { if (!f.exists()) {
throw new Exception("Temporary file directory #" + (i + 1) + " does not exist."); throw new Exception("Temporary file directory '" + f.getAbsolutePath() + "' does not exist.");
} }
if (!f.isDirectory()) { if (!f.isDirectory()) {
throw new Exception("Temporary file directory #" + (i + 1) + " is not a directory."); throw new Exception("Temporary file directory '" + f.getAbsolutePath() + "' is not a directory.");
} }
if (!f.canWrite()) { if (!f.canWrite()) {
throw new Exception("Temporary file directory #" + (i + 1) + " is not writable."); throw new Exception("Temporary file directory '" + f.getAbsolutePath() + "' is not writable.");
} }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册