Object

org.apache.spark.streaming.aliyun.mns

MnsUtils

Related Doc: package mns

Permalink

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
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 createPullingStreamAsBytes(jssc: JavaStreamingContext, queueName: String, endpoint: String, storageLevel: StorageLevel): JavaReceiverInputDStream[Array[Byte]]

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

    Permalink

    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.

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

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

    Permalink

    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.

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

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

    Permalink

    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.

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

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

    Permalink

    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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped