Object

org.apache.spark.streaming.aliyun.dts

DtsUtils

Related Doc: package dts

Permalink

object DtsUtils extends Logging

Various utility classes for working with Aliyun DTS.

Linear Supertypes
Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DtsUtils
  2. Logging
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def createStream(jssc: JavaStreamingContext, accessKeyId: String, accessKeySecret: String, guid: String, storageLevel: StorageLevel, usePublicIp: Boolean): JavaReceiverInputDStream[String]

    Permalink

    Create an input stream that pulls message from a Aliyun DTS stream.

    Create an input stream that pulls message from a Aliyun DTS stream.

    JavaStreamingContext jssc = ...;
    String accessKeyId = "kj7aY*******UYx6";
    String accessKeySecret = "AiNMAlxz*************1PxaPaL8t";
    String guid = "dts-guid-name";
    
    JavaReceiverInputDStream<String> dtsStream = DtsUtils.createStream(
        ssc,
        accessKeyId,
        accessKeySecret,
        guid,
        StorageLevel.MEMORY_AND_DISK_2,
        false);
    
    dtsStream.foreachRDD(rdd => {
        ...
    });
    jssc

    Java streamingContext object.

    accessKeyId

    Aliyun Access Key ID.

    accessKeySecret

    Aliyun Access Key Secret.

    guid

    Aliyun DTS guid name.

    storageLevel

    Storage level to use for storing the received objects. StorageLevel.MEMORY_AND_DISK_2 is recommended.

    usePublicIp

    use public ip or not.

    Annotations
    @Experimental()
  7. def createStream(jssc: JavaStreamingContext, accessKeyId: String, accessKeySecret: String, guid: String, func: Function[ClusterMessage, String], storageLevel: StorageLevel, usePublicIp: Boolean): JavaReceiverInputDStream[String]

    Permalink

    Create an input stream that pulls message from a Aliyun DTS stream.

    Create an input stream that pulls message from a Aliyun DTS stream.

    JavaStreamingContext jssc = ...;
    String accessKeyId = "kj7aY*******UYx6";
    String accessKeySecret = "AiNMAlxz*************1PxaPaL8t";
    String guid = "dts-guid-name";
    
    static class ReadMessage implements Function<ClusterMessage, String> {
        @Override
        public String call(ClusterMessage msg) {
            return msg.getRecord.toString;
        }
    }
    
    JavaReceiverInputDStream<String> dtsStream = DtsUtils.createStream(
        ssc,
        accessKeyId,
        accessKeySecret,
        guid,
        ReadMessage,
        StorageLevel.MEMORY_AND_DISK_2,
        false);
    
    dtsStream.foreachRDD(rdd => {
        ...
    });
    jssc

    Java streamingContext object.

    accessKeyId

    Aliyun Access Key ID.

    accessKeySecret

    Aliyun Access Key Secret.

    guid

    Aliyun DTS guid name.

    func

    Extract information from DTS record message.

    storageLevel

    Storage level to use for storing the received objects. StorageLevel.MEMORY_AND_DISK_2 is recommended.

    usePublicIp

    use public ip or not.

    Annotations
    @Experimental()
  8. def createStream(ssc: StreamingContext, accessKeyId: String, accessKeySecret: String, guid: String, storageLevel: StorageLevel, usePublicIp: Boolean): ReceiverInputDStream[String]

    Permalink

    Create an input stream that pulls message from a Aliyun DTS stream.

    Create an input stream that pulls message from a Aliyun DTS stream.

    val ssc: StreamingSparkContext = ...
    val accessKeyId = "kj7aY*******UYx6"
    val accessKeySecret = "AiNMAlxz*************1PxaPaL8t"
    val guid = "dts-guid-name"
    
    val dtsStream = DtsUtils.createStream(
      ssc,
      accessKeyId,
      accessKeySecret,
      guid,
      StorageLevel.MEMORY_AND_DISK_2,
      false)
    
    dtsStream.foreachRDD(rdd => {
      ...
    })
    ssc

    StreamingContext object.

    accessKeyId

    Aliyun Access Key ID.

    accessKeySecret

    Aliyun Access Key Secret.

    guid

    Aliyun DTS guid name.

    storageLevel

    Storage level to use for storing the received objects. StorageLevel.MEMORY_AND_DISK_2 is recommended.

    usePublicIp

    use public ip or not.

    Annotations
    @Experimental()
  9. def createStream(ssc: StreamingContext, accessKeyId: String, accessKeySecret: String, guid: String, func: (ClusterMessage) ⇒ String, storageLevel: StorageLevel, usePublicIp: Boolean): ReceiverInputDStream[String]

    Permalink

    Create an input stream that pulls message from a Aliyun DTS stream.

    Create an input stream that pulls message from a Aliyun DTS stream.

    val ssc: StreamingSparkContext = ...
    val accessKeyId = "kj7aY*******UYx6"
    val accessKeySecret = "AiNMAlxz*************1PxaPaL8t"
    val guid = "dts-guid-name"
    
    def func: ClusterMessage => String = msg => msg.getRecord.toString
    
    val dtsStream = DtsUtils.createStream(
      ssc,
      accessKeyId,
      accessKeySecret,
      guid,
      func,
      StorageLevel.MEMORY_AND_DISK_2,
      false)
    
    dtsStream.foreachRDD(rdd => {
      ...
    })
    ssc

    StreamingContext object.

    accessKeyId

    Aliyun Access Key ID.

    accessKeySecret

    Aliyun Access Key Secret.

    guid

    Aliyun DTS guid name.

    func

    Extract information from DTS record message.

    storageLevel

    Storage level to use for storing the received objects. StorageLevel.MEMORY_AND_DISK_2 is recommended.

    usePublicIp

    use public ip or not.

    Annotations
    @Experimental()
  10. def defaultMessageFunc(message: ClusterMessage): String

    Permalink
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  17. def initializeLogIfNecessary(isInterpreter: Boolean): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. def isTraceEnabled(): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  20. def log: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  21. def logDebug(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  22. def logDebug(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  23. def logError(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  24. def logError(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  25. def logInfo(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  26. def logInfo(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  27. def logName: String

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  28. def logTrace(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  29. def logTrace(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  30. def logWarning(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  31. def logWarning(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  32. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  33. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  34. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  35. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  36. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  37. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped