Since Mavericks stopped using the deprecated ipfw (as of Mountain Lion), we'll be using pf to allow port forwarding.
####1. anchor file
Create an anchor file under /etc/pf.anchors/<anchor file> with your redirection rule like:
| trait IO { | |
| case class Chunk(length: Int, bytes: Array[Byte]) | |
| def rxReadFilePath(filePath: String, bufferSize: Int):Observable[Chunk] = Observable.create { obs => | |
| var continue = true | |
| val stream = fileContentStream(new FileInputStream(filePath), bufferSize) takeWhile { chunk => | |
| chunk.length > 0 && continue } | |
| stream filter { chunk => chunk.length > 0 && continue } foreach {chunk => obs.onNext(chunk) } | |
| Subscription { def unsubscribe = continue = false } | |
| } |
| al mb = 1024*1024 | |
| val runtime = Runtime.getRuntime | |
| println("** Used Memory: " + (runtime.totalMemory - runtime.freeMemory) / mb) | |
| println("** Free Memory: " + runtime.freeMemory / mb) | |
| println("** Total Memory: " + runtime.totalMemory / mb) | |
| println("** Max Memory: " + runtime.maxMemory / mb) |
| val mondrianConnection = olapConnection.unwrap(classOf[mondrian.olap.Connection]) |