-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from vlmiroshnikov/writes
Writes
- Loading branch information
Showing
31 changed files
with
369 additions
and
312 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
style = defaultWithAlign | ||
|
||
align.tokens = [off] | ||
align.tokens = [{code = "=>", owner = "Case"}] | ||
align.tokens = ["%", "%%"] | ||
danglingParentheses = true | ||
docstrings = JavaDoc | ||
indentOperator = spray | ||
docstrings = ScalaDoc | ||
maxColumn = 120 | ||
rewrite.rules = [RedundantBraces, RedundantParens, SortImports] | ||
rewrite.rules = [RedundantParens, SortImports] | ||
unindentTopLevelOperators = true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ language: scala | |
sudo: false | ||
|
||
scala: | ||
- "2.12.2" | ||
- "2.12.4" | ||
|
||
jdk: | ||
- oraclejdk8 | ||
|
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
name := "aero" | ||
import sbt.Keys._ | ||
|
||
version := "0.1" | ||
scalaVersion := "2.12.3" | ||
lazy val `aero` = project | ||
.in(file(".")) | ||
.settings( | ||
version := "0.1.1", | ||
scalaVersion := "2.12.4", | ||
scalacOptions := Settings.scalacOptions, | ||
libraryDependencies ++= Settings.dependencies, | ||
|
||
|
||
libraryDependencies ++= Seq( | ||
"com.chuusai" %% "shapeless" % "2.3.2", | ||
"com.aerospike" % "aerospike-client" % "4.0.8", | ||
"com.typesafe.akka" %% "akka-stream" % "2.5.6" | ||
) | ||
organization := "org.aero", | ||
bintrayRepository := "aero", | ||
licenses += ("MIT", url("http://opensource.org/licenses/MIT")), | ||
bintrayPackageLabels := Seq("scala", "aerospike") | ||
) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import sbt._ | ||
|
||
object Settings { | ||
|
||
object Versions { | ||
val shapless = "2.3.3" | ||
val aerospike = "4.0.8" | ||
} | ||
|
||
val scalacOptions = Seq( | ||
"-target:jvm-1.8", | ||
"-encoding", | ||
"UTF-8", | ||
"-unchecked", | ||
"-deprecation", | ||
"-Xfuture", | ||
"-Yno-adapted-args", | ||
"-Ywarn-dead-code", | ||
"-Ywarn-numeric-widen", | ||
"-Ywarn-value-discard", | ||
"-Ywarn-unused" | ||
) | ||
|
||
val dependencies = Seq( | ||
"com.chuusai" %% "shapeless" % Versions.shapless, | ||
"com.aerospike" % "aerospike-client" % Versions.aerospike | ||
) | ||
} | ||
|
||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version = 1.0.2 | ||
sbt.version = 1.1.0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.2") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
package org.aero | ||
|
||
import org.aero.impl.reads.{DefaultUnmarshallers, ReadOps, ToNames} | ||
import org.aero.impl.reads.streams.StreamedReadOps | ||
import org.aero.impl.writes.WriteOps | ||
import org.aero.common.DefaultKeyWrappers | ||
import org.aero.writes._ | ||
import org.aero.reads._ | ||
|
||
object AeroOps extends WriteOps with ReadOps with ToNames with DefaultUnmarshallers | ||
|
||
object AeroStreamedOps extends StreamedReadOps | ||
object AeroOps extends WriteOps with ReadOps with ToNames with DefaultDecoders with DefaultEncoders with DefaultKeyWrappers |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package org.aero | ||
|
||
case class Schema(namespace: String, set: String) |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package org.aero.examples | ||
|
||
import scala.concurrent.duration._ | ||
import org.aero.AeroOps._ | ||
import org.aero._ | ||
|
||
import scala.concurrent.Await | ||
import scala.concurrent.ExecutionContext.Implicits.global | ||
|
||
object Main { | ||
def main(args: Array[String]): Unit = { | ||
val host = "localhost" | ||
val port = 3000 | ||
|
||
implicit val schema = Schema("test", "org-os") | ||
implicit val ac = AeroClient(host, port) | ||
|
||
val eventualUnit = for { | ||
_ <- put("002", (WriteBin("key", "002"), WriteBin("string_column", "string"), WriteBin("double_column", 1.1))) | ||
(key, value) <- get("002", ("key".as[String], "double_column".as[Double])) | ||
optionResult <- getOpt("002", "string_column".as[String]) | ||
} yield { | ||
println(s"$key = $value") // print 002 = 1.1 | ||
println(optionResult) // print Some(String) | ||
} | ||
|
||
Await.ready(eventualUnit, Duration.Inf) | ||
|
||
ac.close() | ||
} | ||
} |
18 changes: 0 additions & 18 deletions
18
src/main/scala/org/aero/impl/reads/DefaultUnmarshallers.scala
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
66 changes: 0 additions & 66 deletions
66
src/main/scala/org/aero/impl/reads/streams/SourceStage.scala
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
src/main/scala/org/aero/impl/reads/streams/StreamedReadOps.scala
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.