Skip to content

Commit

Permalink
Merge pull request #146 from akka/wip-additional_headers-patriknw
Browse files Browse the repository at this point in the history
 Add metadata headers when uploading objects
  • Loading branch information
patriknw authored Jan 13, 2017
2 parents a0dccea + dc18caa commit 6ddca10
Show file tree
Hide file tree
Showing 83 changed files with 331 additions and 251 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
*/
package akka.stream.alpakka.amqp

import akka.stream.stage.{ GraphStage, GraphStageLogic, InHandler }
import akka.stream.{ ActorAttributes, Attributes, Inlet, SinkShape }
import akka.stream.stage.{GraphStage, GraphStageLogic, InHandler}
import akka.stream.{ActorAttributes, Attributes, Inlet, SinkShape}
import akka.util.ByteString
import com.rabbitmq.client.AMQP.BasicProperties
import com.rabbitmq.client._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package akka.stream.alpakka.amqp.javadsl

import akka.NotUsed
import akka.stream.alpakka.amqp.{ AmqpSinkSettings, AmqpSinkStage, OutgoingMessage }
import akka.stream.alpakka.amqp.{AmqpSinkSettings, AmqpSinkStage, OutgoingMessage}
import akka.stream.javadsl.Sink
import akka.util.ByteString

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package akka.stream.alpakka.amqp.javadsl

import akka.NotUsed
import akka.stream.alpakka.amqp.{ AmqpSourceSettings, AmqpSourceStage, IncomingMessage }
import akka.stream.alpakka.amqp.{AmqpSourceSettings, AmqpSourceStage, IncomingMessage}
import akka.stream.javadsl.Source

object AmqpSource {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package akka.stream.alpakka.amqp.scaladsl

import akka.NotUsed
import akka.stream.alpakka.amqp.{ AmqpSinkSettings, AmqpSinkStage, OutgoingMessage }
import akka.stream.alpakka.amqp.{AmqpSinkSettings, AmqpSinkStage, OutgoingMessage}
import akka.stream.scaladsl.Sink
import akka.util.ByteString

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package akka.stream.alpakka.amqp.scaladsl

import akka.NotUsed
import akka.stream.alpakka.amqp.{ AmqpSourceSettings, AmqpSourceStage, IncomingMessage }
import akka.stream.alpakka.amqp.{AmqpSourceSettings, AmqpSourceStage, IncomingMessage}

import akka.stream.scaladsl.Source

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package akka.stream.alpakka.amqp
import akka.actor.ActorSystem
import akka.stream.ActorMaterializer
import org.scalatest.concurrent.ScalaFutures
import org.scalatest.{ BeforeAndAfterAll, Matchers, WordSpec }
import org.scalatest.{BeforeAndAfterAll, Matchers, WordSpec}

abstract class AmqpSpec extends WordSpec with Matchers with BeforeAndAfterAll with ScalaFutures {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package akka.stream.alpakka.amqp.scaladsl
import akka.Done
import akka.stream._
import akka.stream.alpakka.amqp._
import akka.stream.scaladsl.{ GraphDSL, Merge, Sink, Source }
import akka.stream.testkit.{ TestPublisher, TestSubscriber }
import akka.stream.scaladsl.{GraphDSL, Merge, Sink, Source}
import akka.stream.testkit.{TestPublisher, TestSubscriber}
import akka.util.ByteString

import scala.concurrent.Promise
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
package akka.stream.alpakka.cassandra

import akka.stream._
import akka.stream.stage.{ AsyncCallback, GraphStage, GraphStageLogic, OutHandler }
import com.datastax.driver.core.{ ResultSet, Row, Session, Statement }
import akka.stream.stage.{AsyncCallback, GraphStage, GraphStageLogic, OutHandler}
import com.datastax.driver.core.{ResultSet, Row, Session, Statement}

import scala.concurrent.Future
import scala.util.{ Failure, Success, Try }
import scala.util.{Failure, Success, Try}

import akka.stream.alpakka.cassandra.GuavaFutures._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/
package akka.stream.alpakka.cassandra

import com.google.common.util.concurrent.{ FutureCallback, Futures, ListenableFuture }
import com.google.common.util.concurrent.{FutureCallback, Futures, ListenableFuture}

import scala.concurrent.{ Future, Promise }
import scala.concurrent.{Future, Promise}

private[cassandra] object GuavaFutures {
implicit final class GuavaFutureOpts[A](val guavaFut: ListenableFuture[A]) extends AnyVal {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import java.util.function.BiFunction

import akka.Done
import akka.stream.javadsl.Sink
import com.datastax.driver.core.{ BoundStatement, PreparedStatement, Session }
import akka.stream.alpakka.cassandra.scaladsl.{ CassandraSink => ScalaCSink }
import com.datastax.driver.core.{BoundStatement, PreparedStatement, Session}
import akka.stream.alpakka.cassandra.scaladsl.{CassandraSink => ScalaCSink}

import scala.compat.java8.FutureConverters._
import scala.concurrent.ExecutionContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import java.util.concurrent.CompletableFuture
import akka.NotUsed
import akka.stream.alpakka.cassandra.CassandraSourceStage
import akka.stream.javadsl.Source
import com.datastax.driver.core.{ Row, Session, Statement }
import com.datastax.driver.core.{Row, Session, Statement}

import scala.concurrent.Future

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
package akka.stream.alpakka.cassandra.scaladsl

import akka.Done
import akka.stream.scaladsl.{ Flow, Keep, Sink }
import com.datastax.driver.core.{ BoundStatement, PreparedStatement, Session }
import akka.stream.scaladsl.{Flow, Keep, Sink}
import com.datastax.driver.core.{BoundStatement, PreparedStatement, Session}

import scala.concurrent.{ ExecutionContext, Future }
import scala.concurrent.{ExecutionContext, Future}

import akka.stream.alpakka.cassandra.GuavaFutures._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/
package akka.stream.alpakka.cassandra.scaladsl

import akka.{ Done, NotUsed }
import akka.{Done, NotUsed}
import akka.stream.alpakka.cassandra.CassandraSourceStage
import akka.stream.scaladsl.{ Sink, Source }
import akka.stream.scaladsl.{Sink, Source}
import com.datastax.driver.core._

import scala.concurrent.Future
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ package akka.stream.alpakka.cassandra.scaladsl

import akka.actor.ActorSystem
import akka.stream.ActorMaterializer
import akka.stream.scaladsl.{ Sink, Source }
import com.datastax.driver.core.{ Cluster, PreparedStatement, SimpleStatement }
import akka.stream.scaladsl.{Sink, Source}
import com.datastax.driver.core.{Cluster, PreparedStatement, SimpleStatement}
import org.scalatest._
import org.scalatest.concurrent.ScalaFutures

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
package akka.stream.alpakka.file.scaladsl

import java.nio.charset.{ Charset, StandardCharsets }
import java.nio.charset.{Charset, StandardCharsets}
import java.nio.file.Path

import akka.NotUsed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import akka.NotUsed
import akka.actor.ActorSystem
import akka.stream.alpakka.file.scaladsl
import akka.stream.scaladsl.Source
import akka.stream.{ ActorMaterializer, Materializer }
import akka.stream.{ActorMaterializer, Materializer}

import scala.concurrent.duration._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package akka.stream.alpakka.ftp
package impl

import akka.stream.stage.{ GraphStage, OutHandler }
import akka.stream.{ Attributes, Outlet, SourceShape }
import akka.stream.stage.{GraphStage, OutHandler}
import akka.stream.{Attributes, Outlet, SourceShape}
import akka.stream.impl.Stages.DefaultAttributes.IODispatcher

private[ftp] trait FtpBrowserGraphStage[FtpClient, S <: RemoteFileSettings] extends GraphStage[SourceShape[FtpFile]] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package akka.stream.alpakka.ftp
package impl

import akka.stream.stage.GraphStageLogic
import akka.stream.{ Outlet, Shape }
import akka.stream.{Outlet, Shape}
import scala.util.control.NonFatal

private[ftp] abstract class FtpGraphStageLogic[T, FtpClient, S <: RemoteFileSettings](
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
package akka.stream.alpakka.ftp
package impl

import akka.stream.stage.{ GraphStageWithMaterializedValue, OutHandler }
import akka.stream.{ Attributes, IOResult, Outlet, SourceShape }
import akka.stream.stage.{GraphStageWithMaterializedValue, OutHandler}
import akka.stream.{Attributes, IOResult, Outlet, SourceShape}
import akka.stream.impl.Stages.DefaultAttributes.IODispatcher
import akka.util.ByteString
import akka.util.ByteString.ByteString1C
import scala.concurrent.{ Future, Promise }
import scala.concurrent.{Future, Promise}
import scala.util.control.NonFatal
import java.io.InputStream
import java.nio.file.Path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
package akka.stream.alpakka.ftp
package impl

import org.apache.commons.net.ftp.{ FTP, FTPClient }
import org.apache.commons.net.ftp.{FTP, FTPClient}
import scala.collection.immutable
import scala.util.Try
import java.io.{ IOException, InputStream }
import java.io.{IOException, InputStream}
import java.nio.file.Paths

private[ftp] trait FtpOperations { _: FtpLike[FTPClient, FtpFileSettings] =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
*/
package akka.stream.alpakka.ftp.impl

import akka.stream.alpakka.ftp.FtpCredentials.{ AnonFtpCredentials, NonAnonFtpCredentials }
import akka.stream.alpakka.ftp.{ FtpFileSettings, RemoteFileSettings }
import akka.stream.alpakka.ftp.FtpCredentials.{AnonFtpCredentials, NonAnonFtpCredentials}
import akka.stream.alpakka.ftp.{FtpFileSettings, RemoteFileSettings}
import akka.stream.alpakka.ftp.RemoteFileSettings._
import com.jcraft.jsch.JSch
import org.apache.commons.net.ftp.FTPClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package akka.stream.alpakka.ftp
package impl

import akka.stream.alpakka.ftp.RemoteFileSettings.SftpSettings
import com.jcraft.jsch.{ ChannelSftp, JSch }
import com.jcraft.jsch.{ChannelSftp, JSch}
import scala.collection.immutable
import scala.util.Try
import java.io.InputStream
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ package akka.stream.alpakka.ftp.javadsl

import akka.NotUsed
import akka.stream.alpakka.ftp.impl._
import akka.stream.alpakka.ftp.{ FtpFile, RemoteFileSettings }
import akka.stream.alpakka.ftp.impl.{ FtpLike, FtpSourceFactory }
import akka.stream.alpakka.ftp.{FtpFile, RemoteFileSettings}
import akka.stream.alpakka.ftp.impl.{FtpLike, FtpSourceFactory}
import akka.stream.IOResult
import akka.stream.javadsl.Source
import akka.stream.scaladsl.{ Source => ScalaSource }
import akka.stream.scaladsl.{Source => ScalaSource}
import akka.util.ByteString
import com.jcraft.jsch.JSch
import org.apache.commons.net.ftp.FTPClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package akka.stream.alpakka.ftp.scaladsl
import akka.NotUsed
import akka.stream.alpakka.ftp.impl._
import akka.stream.IOResult
import akka.stream.alpakka.ftp.{ FtpFile, RemoteFileSettings }
import akka.stream.alpakka.ftp.impl.{ FtpLike, FtpSourceFactory }
import akka.stream.alpakka.ftp.{FtpFile, RemoteFileSettings}
import akka.stream.alpakka.ftp.impl.{FtpLike, FtpSourceFactory}
import akka.stream.scaladsl.Source
import akka.util.ByteString
import com.jcraft.jsch.JSch
Expand Down
4 changes: 2 additions & 2 deletions ftp/src/test/scala/akka/stream/alpakka/ftp/BaseSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import akka.stream.IOResult
import akka.stream.scaladsl.Source
import akka.util.ByteString
import org.scalatest.concurrent.ScalaFutures
import org.scalatest.{ BeforeAndAfter, BeforeAndAfterAll, Matchers, WordSpecLike }
import scala.concurrent.{ Await, Future }
import org.scalatest.{BeforeAndAfter, BeforeAndAfterAll, Matchers, WordSpecLike}
import scala.concurrent.{Await, Future}
import scala.concurrent.duration.DurationInt

trait BaseSpec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package akka.stream.alpakka.ftp

import akka.stream.IOResult
import akka.stream.scaladsl.{ Keep, Sink }
import akka.stream.scaladsl.{Keep, Sink}
import akka.stream.testkit.scaladsl.TestSink

final class FtpSourceSpec extends BaseFtpSpec with CommonFtpSourceSpec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ package akka.stream.alpakka.hbase.internal
import java.io.Closeable

import akka.stream.stage.StageLogging
import org.apache.hadoop.hbase.{ HColumnDescriptor, HTableDescriptor, TableName }
import org.apache.hadoop.hbase.client.{ Connection, ConnectionFactory, Table }
import org.apache.hadoop.hbase.{HColumnDescriptor, HTableDescriptor, TableName}
import org.apache.hadoop.hbase.client.{Connection, ConnectionFactory, Table}
import org.apache.hadoop.conf.Configuration

import scala.concurrent.duration.DurationInt
import scala.concurrent.{ Await, Future }
import scala.util.{ Failure, Success, Try }
import scala.concurrent.{Await, Future}
import scala.util.{Failure, Success, Try}

import scala.concurrent.ExecutionContext.Implicits.global

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ package akka.stream.alpakka.hbase.javadsl

import akka.stream.alpakka.hbase.HTableSettings
import akka.stream.alpakka.hbase.internal.HBaseFlowStage
import akka.stream.scaladsl.{ Flow, Keep, Sink }
import akka.{ Done, NotUsed }
import akka.stream.scaladsl.{Flow, Keep, Sink}
import akka.{Done, NotUsed}
import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.hbase.TableName
import org.apache.hadoop.hbase.client.Put
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ package akka.stream.alpakka.hbase.scaladsl

import akka.stream.alpakka.hbase.HTableSettings
import akka.stream.alpakka.hbase.internal.HBaseFlowStage
import akka.stream.scaladsl.{ Flow, Keep, Sink }
import akka.{ Done, NotUsed }
import akka.stream.scaladsl.{Flow, Keep, Sink}
import akka.{Done, NotUsed}

import scala.concurrent.Future

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ package akka.stream.alpakka.hbase.scaladsl
import akka.actor.ActorSystem
import akka.stream.ActorMaterializer
import akka.stream.alpakka.hbase.HTableSettings
import akka.stream.scaladsl.{ Sink, Source }
import akka.stream.scaladsl.{Sink, Source}
import org.apache.hadoop.hbase.client.Put
import org.apache.hadoop.hbase.util.Bytes
import org.apache.hadoop.hbase.{ HBaseConfiguration, TableName }
import org.scalatest.{ Matchers, WordSpec }
import org.apache.hadoop.hbase.{HBaseConfiguration, TableName}
import org.scalatest.{Matchers, WordSpec}

import scala.collection.immutable
import scala.concurrent.Await
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.duration.Duration
import scala.language.implicitConversions
import scala.util.{ Failure, Success }
import scala.util.{Failure, Success}

class HBaseStageSpec extends WordSpec with Matchers {

Expand Down
4 changes: 2 additions & 2 deletions jms/src/main/scala/akka/stream/alpakka/jms/JmsConnector.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
package akka.stream.alpakka.jms

import javax.jms
import javax.jms.{ ExceptionListener, JMSException }
import javax.jms.{ExceptionListener, JMSException}

import akka.stream.ActorAttributes.Dispatcher
import akka.stream.ActorMaterializer
import akka.stream.stage.GraphStageLogic

import scala.concurrent.{ ExecutionContext, Future }
import scala.concurrent.{ExecutionContext, Future}

/**
* Internal API
Expand Down
6 changes: 3 additions & 3 deletions jms/src/main/scala/akka/stream/alpakka/jms/JmsSinkStage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
*/
package akka.stream.alpakka.jms

import javax.jms.{ MessageProducer, TextMessage }
import javax.jms.{MessageProducer, TextMessage}

import akka.stream.stage.{ GraphStage, GraphStageLogic, InHandler }
import akka.stream.{ ActorAttributes, Attributes, Inlet, SinkShape }
import akka.stream.stage.{GraphStage, GraphStageLogic, InHandler}
import akka.stream.{ActorAttributes, Attributes, Inlet, SinkShape}

final class JmsSinkStage(settings: JmsSettings) extends GraphStage[SinkShape[String]] {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ package akka.stream.alpakka.jms
import java.util.concurrent.Semaphore
import javax.jms._

import akka.stream.stage.{ GraphStage, GraphStageLogic, OutHandler, StageLogging }
import akka.stream.{ ActorAttributes, Attributes, Outlet, SourceShape }
import akka.stream.stage.{GraphStage, GraphStageLogic, OutHandler, StageLogging}
import akka.stream.{ActorAttributes, Attributes, Outlet, SourceShape}

import scala.collection.mutable
import scala.util.{ Failure, Success }
import scala.util.{Failure, Success}

final class JmsSourceStage(settings: JmsSourceSettings) extends GraphStage[SourceShape[Message]] {

Expand Down
Loading

0 comments on commit 6ddca10

Please sign in to comment.