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);
Java streamingContext object.
The name of MNS queue.
The Aliyun Access Key Id.
The Aliyun Access Key Secret.
The endpoint of MNS service.
Storage level to use for storing the received objects.
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)
StreamingContext.
The name of MNS queue.
The Aliyun Access Key Id.
The Aliyun Access Key Secret.
The endpoint of MNS service.
Storage level to use for storing the received objects.
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);
Java streamingContext object.
The name of MNS queue.
The Aliyun Access Key Id.
The Aliyun Access Key Secret.
The endpoint of MNS service.
Storage level to use for storing the received objects.
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)
StreamingContext.
The name of MNS queue.
The Aliyun Access Key Id.
The Aliyun Access Key Secret.
The endpoint of MNS service.
Storage level to use for storing the received objects.
Various utility classes for working with Aliyun MNS.