Skip to content

Commit

Permalink
0.2.2: Bump quasar-version to 52.0.2
Browse files Browse the repository at this point in the history
(Merge branch 'jsantos17-bump-quasar-52')
  • Loading branch information
jsantos17 committed Jul 18, 2018
2 parents fc7564b + ec2c5ee commit 6ea49c8
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ import quasar.Data
import quasar.api.ResourceError
import quasar.api.ResourceError.{CommonError, ReadError}
import quasar.api.ResourcePath.{Leaf, Root}
import quasar.api.{DataSourceType, ResourceName, ResourcePath, ResourcePathType}
import quasar.connector.datasource.LightweightDataSource
import quasar.api.datasource.DatasourceType
import quasar.api.{ResourceName, ResourcePath, ResourcePathType}
import quasar.connector.datasource.LightweightDatasource
import quasar.contrib.cats.effect._
import quasar.contrib.pathy.APath

Expand All @@ -44,9 +45,9 @@ final class S3DataSource[F[_]: Effect, G[_]: Async] (
client: Client[F],
bucket: Uri,
s3JsonParsing: S3JsonParsing)(ec: ExecutionContext)
extends LightweightDataSource[F, Stream[G, ?], Stream[G, Data]] {
extends LightweightDatasource[F, Stream[G, ?], Stream[G, Data]] {

def kind: DataSourceType = s3.datasourceKind
def kind: DatasourceType = s3.datasourceKind

val shutdown: F[Unit] = client.shutdown

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ package quasar.physical.s3


import quasar.Data
import quasar.api.{DataSourceType, ResourcePath}
import quasar.connector.{DataSource, LightweightDataSourceModule}
import quasar.api.DataSourceError.{InitializationError, MalformedConfiguration}
import quasar.api.datasource.DatasourceError.{InitializationError, MalformedConfiguration}
import quasar.api.ResourcePath
import quasar.api.datasource.DatasourceType
import quasar.connector.Datasource
import quasar.connector.LightweightDatasourceModule

import scala.concurrent.ExecutionContext.Implicits.global

Expand All @@ -34,18 +36,18 @@ import slamdata.Predef.{Stream => _, _}
import org.http4s.client.blaze.Http1Client
import shims._

object S3DataSourceModule extends LightweightDataSourceModule {
def kind: DataSourceType = s3.datasourceKind
object S3DataSourceModule extends LightweightDatasourceModule {
def kind: DatasourceType = s3.datasourceKind

def lightweightDataSource[
def lightweightDatasource[
F[_]: ConcurrentEffect: Timer,
G[_]: ConcurrentEffect: Timer](
config: Json)
: F[InitializationError[Json] \/ DataSource[F, Stream[G, ?], ResourcePath, Stream[G, Data]]] = {
: F[InitializationError[Json] \/ Datasource[F, Stream[G, ?], ResourcePath, Stream[G, Data]]] = {
config.as[S3Config].result match {
case Right(s3Config) => {
Http1Client[F]() map { client =>
val ds: DataSource[F, Stream[G, ?], ResourcePath, Stream[G, Data]] =
val ds: Datasource[F, Stream[G, ?], ResourcePath, Stream[G, Data]] =
new S3DataSource[F, G](client, s3Config.bucket, s3Config.parsing)(global)

ds.right[InitializationError[Json]]
Expand All @@ -54,7 +56,7 @@ object S3DataSourceModule extends LightweightDataSourceModule {

case Left((msg, _)) =>
(MalformedConfiguration(kind, config, msg): InitializationError[Json])
.left[DataSource[F, Stream[G, ?], ResourcePath, Stream[G, Data]]].point[F]
.left[Datasource[F, Stream[G, ?], ResourcePath, Stream[G, Data]]].point[F]
}
}
}
4 changes: 2 additions & 2 deletions datasource/src/main/scala/quasar/physical/s3/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package quasar.physical.s3

import quasar.api.DataSourceType
import quasar.api.datasource.DatasourceType

import eu.timepit.refined.auto._

Expand All @@ -28,5 +28,5 @@ object S3JsonParsing {
}

package object s3 {
val datasourceKind: DataSourceType = DataSourceType("s3", 1L)
val datasourceKind: DatasourceType = DatasourceType("s3", 1L)
}
2 changes: 1 addition & 1 deletion quasar-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
49.0.3
52.0.2
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "0.2.1"
version in ThisBuild := "0.2.2"

0 comments on commit 6ea49c8

Please sign in to comment.