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
ID: DatabaseConsumer | |
_schema-version: "3.1" | |
version: 0.0.1 | |
modules: | |
- name: DatabaseConsumer-srv | |
type: nodejs | |
path: srv | |
parameters: | |
memory: 512M | |
disk-quota: 512M |
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
ID: com.mta.DatabaseProvider | |
_schema-version: "3.1" | |
version: 0.0.1 | |
modules: | |
- name: DatabaseProvider-db | |
type: hdb | |
path: db | |
parameters: | |
memory: 256M | |
disk-quota: 512M |
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
class ActorTest extends Actor { | |
def receive = { | |
case MessageType1 => | |
aFuture.flatMap { ok => | |
saveStateOnDb() | |
}.recover { case ex=> | |
logException(ex) | |
// Interrupt here to prevent another call - anotherCall1 and anotherCall2 | |
// throw exception an let to supervisor? | |
// Stop actor? |
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
CREARE TABLE power_consumption(date_met string, | |
time_met string, | |
global_active_power float, | |
global_reactive_power float, | |
voltage float, | |
global_intensity float, | |
sub_metering_1 float, | |
sub_metering_2 float, | |
sub_metering_3 float) | |
ROW FORMAT DELIMITED FIELDS TERMINATED by ';' stored as textfile location '/user/cloudera/power_consumption'; |
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
CREATE SCHEMA stdemo; | |
DROP TABLE IF EXISTS stdemo.power_consumption; | |
CREATE TABLE stdemo.power_consumption( | |
date TEXT, | |
time TEXT, | |
global_active_power TEXT, | |
global_reactive_power TEXT, | |
voltage TEXT, | |
global_intensity TEXT, | |
sub_metering_1 TEXT, |
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
// This is the SalesOrder Structure | |
public class SalesOrder | |
{ | |
// SalesOrder properties | |
private String SalesOrderID; | |
private Float NetSum; | |
private Float Tax; | |
private String Currency; | |
private Date ChangedAt; | |
private String Note; |
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 akka.actor.Actor | |
class EchoActor extends Actor { | |
def receive = { | |
case msg => sender ! msg | |
} | |
} | |
import org.scalatest.matchers.ShouldMatchers |
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 akka.actor.Actor | |
class EchoActor extends Actor { | |
def receive = { | |
case msg => self.reply(msg) | |
} | |
} | |
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
scala> nestedNumbers.flatMap(x => x.map(_ * 2)) | |
res0: List[Int] = List(2, 4, 6, 8) | |
instead | |
scala> nestedNumbers.flatMap(x: List[Int] => x.map(_ * 2)) | |
res0: List[Int] = List(2, 4, 6, 8) | |
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
2011-05-02 23:50:44.197:INFO::Extract file:/home/isaias/servers/jetty-6.1.22/webapps/vraptor-blank-project-scala_2.8.1-1.0.war to /tmp/Jetty_0_0_0_0_8080_vraptor.blank.project.scala_2.8.1.1.0.war__vraptor.blank.project.scala_2.8.1.1.0__.bwnni1/webapp | |
23:50:46,533 INFO [BasicConfiguration ] Using class br.com.caelum.vraptor.ioc.spring.SpringProvider as Container Provider | |
23:50:46,557 INFO [DefaultSpringLocator] No application context found | |
23:50:46,649 INFO [WebAppBootstrapFactory] No static WebAppBootstrap found. | |
23:50:46,649 INFO [BasicConfiguration ] br.com.caelum.vraptor.scanning = null | |
2011-05-02 23:50:46.764:WARN::failed vraptor: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getClassLoader()Ljava/lang/ClassLoader; | |
2011-05-02 23:50:46.764:WARN::failed org.mortbay.jetty.webapp.WebAppContext@7df44ec7{/vraptor-blank-project-scala_2.8.1-1.0,file:/home/isaias/servers/jetty-6.1.22/webapps/vraptor-blank-project-scala_2.8.1-1.0.war}: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getC |
NewerOlder