org.apache.spark.streaming.aliyun.mns

MnsUtils

object MnsUtils

Various utility classes for working with Aliyun MNS.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MnsUtils
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def createPullingStreamAsBytes(jssc: JavaStreamingContext, queueName: String, endpoint: String, storageLevel: StorageLevel): JavaReceiverInputDStream[Array[Byte]]

    Annotations
    @Experimental()
  9. def createPullingStreamAsBytes(jssc: JavaStreamingContext, queueName: String, accessKeyId: String, accessKeySecret: String, endpoint: String, storageLevel: StorageLevel): JavaReceiverInputDStream[Array[Byte]]

    String queuename = "queueSample";
    String accessKeyId = "kj7aY*******UYx6";
    String accessKeySecret = "AiNMAlxz*************1PxaPaL8t";
    String endpoint = "http://184*********815.mns-test.aliyuncs.com:1234";
    
    JavaStreamingContext jssc = ...;
    JavaReceiverInputDStream<Byte[]> mnsStream = MnsUtils
      .createPullingStreamAsBytes(
        jssc,
        queuename,
        accesskeyId,
        accessKeySecret,
        endpoint,
        StorageLevel.MEMORY_AND_DISK_2);
    jssc

    Java streamingContext object.

    queueName

    The name of MNS queue.

    accessKeyId

    The Aliyun Access Key Id.

    accessKeySecret

    The Aliyun Access Key Secret.

    endpoint

    The endpoint of MNS service.

    storageLevel

    Storage level to use for storing the received objects.

    returns

  10. def createPullingStreamAsBytes(ssc: StreamingContext, queueName: String, endpoint: String, storageLevel: StorageLevel): ReceiverInputDStream[Array[Byte]]

    Annotations
    @Experimental()
  11. def createPullingStreamAsBytes(ssc: StreamingContext, queueName: String, accessKeyId: String, accessKeySecret: String, endpoint: String, storageLevel: StorageLevel): ReceiverInputDStream[Array[Byte]]

    val queuename = "queueSample"
    val accessKeyId = "kj7aY*******UYx6"
    val accessKeySecret = "AiNMAlxz*************1PxaPaL8t"
    val endpoint = "http://184*********815.mns-test.aliyuncs.com:1234"
    
    val conf = new SparkConf().setAppName("Test MNS")
    val ssc = new StreamingContext(conf, Milliseconds(2000))
    val mnsStream = MnsUtils.createPullingStreamAsBytes(ssc, queuename,
      accessKeyId, accessKeySecret, endpoint, StorageLevel.MEMORY_ONLY)
    ssc

    StreamingContext.

    queueName

    The name of MNS queue.

    accessKeyId

    The Aliyun Access Key Id.

    accessKeySecret

    The Aliyun Access Key Secret.

    endpoint

    The endpoint of MNS service.

    storageLevel

    Storage level to use for storing the received objects.

    returns

  12. def createPullingStreamAsRawBytes(jssc: JavaStreamingContext, queueName: String, endpoint: String, storageLevel: StorageLevel): JavaReceiverInputDStream[Array[Byte]]

    Annotations
    @Experimental()
  13. def createPullingStreamAsRawBytes(jssc: JavaStreamingContext, queueName: String, accessKeyId: String, accessKeySecret: String, endpoint: String, storageLevel: StorageLevel): JavaReceiverInputDStream[Array[Byte]]

    String queuename = "queueSample";
    String accessKeyId = "kj7aY*******UYx6";
    String accessKeySecret = "AiNMAlxz*************1PxaPaL8t";
    String endpoint = "http://184*********815.mns-test.aliyuncs.com:1234";
    
    JavaStreamingContext jssc = ...;
    JavaReceiverInputDStream<Byte[]> mnsStream = MnsUtils
      .createPullingStreamAsRawBytes(
        jssc,
        queuename,
        accesskeyId,
        accessKeySecret,
        endpoint,
        StorageLevel.MEMORY_AND_DISK_2);
    jssc

    Java streamingContext object.

    queueName

    The name of MNS queue.

    accessKeyId

    The Aliyun Access Key Id.

    accessKeySecret

    The Aliyun Access Key Secret.

    endpoint

    The endpoint of MNS service.

    storageLevel

    Storage level to use for storing the received objects.

    returns

  14. def createPullingStreamAsRawBytes(ssc: StreamingContext, queueName: String, endpoint: String, storageLevel: StorageLevel): ReceiverInputDStream[Array[Byte]]

    Annotations
    @Experimental()
  15. def createPullingStreamAsRawBytes(ssc: StreamingContext, queueName: String, accessKeyId: String, accessKeySecret: String, endpoint: String, storageLevel: StorageLevel): ReceiverInputDStream[Array[Byte]]

    val queuename = "queueSample"
    val accessKeyId = "kj7aY*******UYx6"
    val accessKeySecret = "AiNMAlxz*************1PxaPaL8t"
    val endpoint = "http://184*********815.mns-test.aliyuncs.com:1234"
    
    val conf = new SparkConf().setAppName("Test MNS")
    val ssc = new StreamingContext(conf, Milliseconds(2000))
    val mnsStream = MnsUtils.createPullingStreamAsRawBytes(ssc, queuename,
      accessKeyId, accessKeySecret, endpoint, StorageLevel.MEMORY_ONLY)
    ssc

    StreamingContext.

    queueName

    The name of MNS queue.

    accessKeyId

    The Aliyun Access Key Id.

    accessKeySecret

    The Aliyun Access Key Secret.

    endpoint

    The endpoint of MNS service.

    storageLevel

    Storage level to use for storing the received objects.

    returns

  16. final def eq(arg0: AnyRef): Boolean

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

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

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

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

    Definition Classes
    AnyRef → Any
  21. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

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

    Definition Classes
    AnyRef
  26. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped