This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface Foo { | |
public String bar() { | |
return "bar"; | |
} | |
public String baz(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2012-12-28 16:18:37,080 DEBUG spray.io.IOBridge com-pongr-api-PongrAPI-1 - Reading from connection | |
2012-12-28 16:18:37,083 DEBUG spray.io.IOBridge com-pongr-api-PongrAPI-1 - Read 274 bytes | |
2012-12-28 16:18:37,083 DEBUG spray.io.IOBridge com-pongr-api-PongrAPI-1 - New connection accepted on /0.0.0.0:5555 | |
2012-12-28 16:18:37,083 DEBUG spray.io.IOBridge com-pongr-api-PongrAPI-1 - New connection accepted on /0.0.0.0:5555 | |
2012-12-28 16:18:37,084 DEBUG spray.io.IOBridge com-pongr-api-PongrAPI-1 - Executing command Register(spray.io.ConnectionActors$$anon$1@58e90d6d) | |
2012-12-28 16:18:37,084 DEBUG spray.io.IOBridge com-pongr-api-PongrAPI-1 - Executing command Register(spray.io.ConnectionActors$$anon$1@2c709cb5) | |
2012-12-28 16:18:37,082 DEBUG c.p.api.PongrAPI$$anonfun$1$$anon$1 - GET /ping => 200 OK 'pongr' took 0 msec | |
2012-12-28 16:18:37,085 DEBUG spray.io.IOBridge com-pongr-api-PongrAPI-1 - Executing command Send(spray.io.ConnectionActors$$anon$1@5e9f01e6,List(java.nio.HeapByteBuffer[pos=0 lim=152 cap=160]),None) | |
20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2012-12-28 16:29:52,380 DEBUG spray.io.IOBridge com-pongr-api-PongrAPI-1 - New connection accepted on /0.0.0.0:5555 | |
2012-12-28 16:29:52,381 DEBUG spray.io.IOBridge com-pongr-api-PongrAPI-1 - Executing command Register(spray.io.ConnectionActors$$anon$1@6adb93a2) | |
2012-12-28 16:29:52,381 DEBUG spray.io.IOBridge com-pongr-api-PongrAPI-1 - Reading from connection | |
2012-12-28 16:29:52,381 DEBUG spray.io.IOBridge com-pongr-api-PongrAPI-1 - Closing connection due to PeerClosed | |
2012-12-28 16:29:52,382 DEBUG spray.can.server.HttpServer com-pongr-api-PongrAPI-akka.actor.default-dispatcher-4 - Stopping connection actor, connection was closed due to PeerClosed | |
2012-12-28 16:30:06,693 DEBUG spray.io.IOBridge com-pongr-api-PongrAPI-1 - Reading from connection | |
2012-12-28 16:30:06,694 DEBUG spray.io.IOBridge com-pongr-api-PongrAPI-1 - Closing connection due to PeerClosed | |
2012-12-28 16:30:06,694 DEBUG spray.io.IOBridge com-pongr-api-PongrAPI-1 - New connection accepted on /0.0.0.0:5555 | |
2012-12-28 16:30:06,694 DEBUG spray.can.s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2012-12-28 16:45:44,289 DEBUG spray.io.IOBridge com-pongr-api-PongrAPI-1 - New connection accepted on /0.0.0.0:5555 | |
2012-12-28 16:45:44,290 DEBUG spray.io.IOBridge com-pongr-api-PongrAPI-1 - Executing command Register(spray.io.ConnectionActors$$anon$1@160851e0) | |
2012-12-28 16:45:44,291 DEBUG spray.io.IOBridge com-pongr-api-PongrAPI-1 - Reading from connection | |
2012-12-28 16:45:44,291 DEBUG spray.io.IOBridge com-pongr-api-PongrAPI-1 - Read 175 bytes | |
2012-12-28 16:45:44,294 DEBUG c.p.api.PongrAPI$$anonfun$1$$anon$1 - GET /ping => 200 OK 'pongr' took 1 msec | |
2012-12-28 16:45:44,295 DEBUG spray.io.IOBridge com-pongr-api-PongrAPI-1 - Executing command Send(spray.io.ConnectionActors$$anon$1@160851e0,List(java.nio.HeapByteBuffer[pos=0 lim=152 cap=160]),None) | |
2012-12-28 16:45:44,295 DEBUG spray.io.IOBridge com-pongr-api-PongrAPI-1 - Writing to connection | |
2012-12-28 16:45:44,295 DEBUG spray.io.IOBridge com-pongr-api-PongrAPI-1 - Wrote 152 bytes | |
2012-12-28 16:45:44,355 DEBUG spray.io.IOBridge com-pongr-api-PongrAPI-1 - R |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#http://upstart.ubuntu.com/cookbook/#introduction | |
author "Zach Cox <zcox@pongr.com>" | |
description "Titan+Cassandra+Rexster" | |
version "0.3.1" | |
#2=regular running mode, 3,4,5 are aliases for 2 | |
start on runlevel [2345] | |
#0=shutdown, 1=single-user mode, 6=reboot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.pongr | |
import grizzled.slf4j.Logging | |
import com.tinkerpop.blueprints.Graph | |
import com.tinkerpop.blueprints.impls.rexster.RexsterGraph | |
import java.util.concurrent.CountDownLatch | |
class CreateVertexAndSetProperties(g: Graph, latch: CountDownLatch, id: String, propetyCount: Int) extends Runnable with Logging { | |
override def run() { | |
debug("Starting vertex %s using graph %s..." format (id, g)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val conf = new BaseConfiguration() | |
conf.setProperty("storage.backend","cassandra") | |
conf.setProperty("storage.hostname","127.0.0.1") | |
conf.setProperty("storage.index.search.backend", "elasticsearch") | |
conf.setProperty("storage.index.search.hostname", "127.0.0.1:9200") | |
conf.setProperty("storage.index.search.client-only", true) | |
conf.setProperty("storage.index.search.local-mode", false) | |
val graph = TitanFactory.open(conf) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val conf = new BaseConfiguration() | |
conf.setProperty("storage.backend","cassandra") | |
conf.setProperty("storage.hostname","127.0.0.1") | |
conf.setProperty("storage.index.search.backend", "elasticsearch") | |
conf.setProperty("storage.index.search.hostname", "127.0.0.1") | |
val graph = TitanFactory.open(conf) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val talk = Map( | |
"title" -> "Scala Map Literals are not Syntactic Sugar", | |
"presenter" -> "Zach Cox", | |
"twitter" -> "@zcox", | |
"meetup" -> "iascala", | |
"date" -> "2013-10-09") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
Map<String, Integer> m = new HashMap<String, Integer>(); | |
m.put("a", 1); | |
m.put("b", 2); |