Packages

class BaseMongoSink[T <: AnyRef] extends RichSinkFunction[T]

Mongo sink

T

Type of element that goes into the database

Linear Supertypes
RichSinkFunction[T], SinkFunction[T], AbstractRichFunction, RichFunction, Function, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BaseMongoSink
  2. RichSinkFunction
  3. SinkFunction
  4. AbstractRichFunction
  5. RichFunction
  6. Function
  7. Serializable
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BaseMongoSink(userConfig: Map[String, String])(implicit arg0: Manifest[T], arg1: ClassTag[T])

    userConfig

    User configuration. Properties [server, database, collection]

Value Members

  1. var client: MongoClient
  2. def close(): Unit
    Definition Classes
    BaseMongoSink → AbstractRichFunction → RichFunction
  3. implicit lazy val formats: Formats
  4. def getCollection: MongoCollection[Document]

    Get the mongo collection for the configuration.

    Get the mongo collection for the configuration.

    This is not verified to exist; it will be created upon first use.

    returns

    Mongo Collection

  5. def getIterationRuntimeContext(): IterationRuntimeContext
    Definition Classes
    AbstractRichFunction → RichFunction
  6. def getRuntimeContext(): RuntimeContext
    Definition Classes
    AbstractRichFunction → RichFunction
  7. def invoke(value: T, context: Context[_]): Unit

    Send a value to mongo

    Send a value to mongo

    Convert the value to JSON and then to a BSON document. Then insert it into the collection.

    value

    Element

    context

    Context

    Definition Classes
    BaseMongoSink → SinkFunction
  8. def open(parameters: Configuration): Unit
    Definition Classes
    BaseMongoSink → AbstractRichFunction → RichFunction
  9. def setRuntimeContext(arg0: RuntimeContext): Unit
    Definition Classes
    AbstractRichFunction → RichFunction
  10. val userConfig: Map[String, String]

Deprecated Value Members

  1. def invoke(arg0: T): Unit
    Definition Classes
    SinkFunction
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Exception] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.