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
Supposing you've installed spark with brew install spark@1.6 | |
it will place it into /usr/local/opt/apache-spark@1.6 | |
to use spark locally from intellij from your script define following: | |
1. environment variables: | |
PYSPARK_PYTHON=/Users/igorberm/.runtimes/Python34/bin/python3 | |
PYTHONPATH=/usr/local/opt/apache-spark@1.6/libexec/python/lib/pyspark.zip:/usr/local/opt/apache-spark@1.6/libexec/python/lib/py4j-0.9-src.zip | |
PYTHONUNBUFFERED=1 | |
SPARK_HOME=/usr/local/opt/apache-spark@1.6/libexec |
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
//without backpressure: | |
ActorRef myActor = system.actorOf( | |
new akka.routing.ConsistentHashingPool(maxParallelism) | |
.withHashMapper(hashMapper) | |
.props(MyActor.props(blLogic).withDispatcher("my-dispatcher")) | |
, "my-ordered-processor-pool"); | |
final Timeout timeout = Timeout.apply(1000L, TimeUnit.MILLISECONDS); | |
Flow.of(Event.class) |
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.example; | |
import java.util.concurrent.CompletionStage; | |
import java.util.concurrent.TimeUnit; | |
import scala.runtime.BoxedUnit; | |
import scala.util.Try; | |
import akka.Done; | |
import akka.NotUsed; | |
import akka.actor.ActorSystem; |
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 igorprivate; | |
import shaded.parquet.org.slf4j.LoggerFactory; | |
import static org.apache.spark.sql.functions.concat_ws; | |
import static org.apache.spark.sql.functions.date_format; | |
import static org.apache.spark.sql.functions.from_json; | |
import static org.apache.spark.sql.functions.lit; | |
import static org.apache.spark.sql.functions.struct; | |
import static org.apache.spark.sql.functions.sum; | |
import static org.apache.spark.sql.functions.to_json; |
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
require "pghero/version" | |
require "active_record" | |
require "pghero/engine" if defined?(Rails) | |
module PgHero | |
# hack for connection | |
class Connection < ActiveRecord::Base | |
establish_connection ENV["PGHERO_DATABASE_URL"] if ENV["PGHERO_DATABASE_URL"] | |
end |
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.example; | |
import java.util.concurrent.CompletionStage; | |
import scala.concurrent.Await; | |
import scala.concurrent.duration.Duration; | |
import akka.Done; | |
import akka.NotUsed; | |
import akka.actor.ActorSystem; | |
import akka.japi.Pair; |
OlderNewer