Skip to content

Commit

Permalink
fix broken build (#609)
Browse files Browse the repository at this point in the history
* fix broken build

* fix build warning
  • Loading branch information
zishanbilal authored and wrashid committed Sep 18, 2018
1 parent ad8d892 commit 807fa55
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
15 changes: 12 additions & 3 deletions src/main/scala/beam/sim/BeamHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package beam.sim

import java.io.FileOutputStream
import java.nio.file.{Files, Paths, StandardCopyOption}
import java.util
import java.util.Properties

import beam.agentsim.agents.ridehail.RideHailSurgePricingManager
Expand Down Expand Up @@ -266,7 +267,11 @@ trait BeamHelper extends LazyLogging {
)
)
}
Files.copy(Paths.get(configLocation), Paths.get(outputDirectory, "beam.conf"), StandardCopyOption.REPLACE_EXISTING)
Files.copy(
Paths.get(configLocation),
Paths.get(outputDirectory, "beam.conf"),
StandardCopyOption.REPLACE_EXISTING
)
}
}

Expand All @@ -291,7 +296,12 @@ trait BeamHelper extends LazyLogging {
if (isMetricsEnable) Kamon.start(clusterConfig.withFallback(ConfigFactory.defaultReference()))

import akka.actor.{ActorSystem, DeadLetter, PoisonPill, Props}
import akka.cluster.singleton.{ClusterSingletonManager, ClusterSingletonManagerSettings, ClusterSingletonProxy, ClusterSingletonProxySettings}
import akka.cluster.singleton.{
ClusterSingletonManager,
ClusterSingletonManagerSettings,
ClusterSingletonProxy,
ClusterSingletonProxySettings
}
import beam.router.ClusterWorkerRouter
import beam.sim.monitoring.DeadLetterReplayer

Expand Down Expand Up @@ -414,7 +424,6 @@ trait BeamHelper extends LazyLogging {
}
}


}

case class MapStringDouble(data: Map[String, Double])
Expand Down
10 changes: 3 additions & 7 deletions src/main/scala/beam/utils/BashUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,12 @@ object BashUtils {
val runtime = Runtime.getRuntime
try {
val process = runtime.exec(command)
try {
val reader = new BufferedReader(new InputStreamReader(process.getInputStream))
try
reader.readLine
finally if (reader != null) reader.close()
}
val reader = new BufferedReader(new InputStreamReader(process.getInputStream))
try reader.readLine
finally if (reader != null) reader.close()
} catch {
case _: Exception =>
null //for the env where command is not recognized

}
}
}

0 comments on commit 807fa55

Please sign in to comment.