Queue patches.

Fixed Queue bug with bad localhost addresses.
Spaces in job names, while fine in GridEngine 6, break in (Son of) GE8.
This commit is contained in:
Khalid Shakir 2014-10-23 22:59:19 +08:00
parent 7dc8638ca4
commit ac33eda231
2 changed files with 12 additions and 4 deletions

View File

@ -36,7 +36,7 @@ import org.ggf.drmaa.Session
class GridEngineJobRunner(session: Session, function: CommandLineFunction) extends DrmaaJobRunner(session, function) with Logging {
// Grid Engine disallows certain characters from being in job names.
// This replaces all illegal characters with underscores
protected override val jobNameFilter = """[\n\t\r/:,@\\*?]"""
protected override val jobNameFilter = """[\s/:,@\\*?]"""
protected override val minRunnerPriority = -1023
protected override val maxRunnerPriority = 0

View File

@ -33,14 +33,22 @@ import io.Source
* A collection of various system utilities.
*/
object SystemUtils extends Logging {
val inetAddress = InetAddress.getLocalHost.getHostAddress
val canonicalHostName = InetAddress.getLocalHost.getCanonicalHostName
private val localAddress = {
try {
InetAddress.getLocalHost
} catch {
case e: Exception =>
InetAddress.getLoopbackAddress
}
}
val inetAddress = localAddress.getHostAddress
val canonicalHostName = localAddress.getCanonicalHostName
val hostName = {
if (canonicalHostName != inetAddress)
canonicalHostName
else
InetAddress.getLocalHost.getHostName
localAddress.getHostName
}
val mailName = {