Comments (6)
Hi,
Did you figure it out how to get the byte messages from Kafka ?
The ReceiverLauncher.launch returns the DStream or JavaDStream (for Java) , and you can call the getPayload on MessageAndMetadata object to get the byte array...
Something like this ..
val tmp_stream = ReceiverLauncher.launch(ssc, props, numberOfReceivers,StorageLevel.MEMORY_ONLY)
//Lets convert the Array[Byte] to String
val stream = tmp_stream.map(x => { val s = new String(x.getPayload); s })
from kafka-spark-consumer.
Hi,
Yes, I figured out few hours ago. I tried to delete the issue but I
couldn't, sorry to bother you.
I did exactly as you said and used the payload. It is working fine.
Thank you so much for creating this receiver, it helped me a lot!
Best,
On Aug 27, 2015 01:28, "Dibyendu Bhattacharya" [email protected]
wrote:
Hi,
Did you figure it out how to get the byte messages from Kafka ?
The ReceiverLauncher.launch returns the DStream or JavaDStream (for Java)
, and you can call the getPayload on MessageAndMetadata object to get the
byte array...Something like this ..
val tmp_stream = ReceiverLauncher.launch(ssc, props,
numberOfReceivers,StorageLevel.MEMORY_ONLY)//Lets convert the Array[Byte] to String
val stream = tmp_stream.map(x => { val s = new String(x.getPayload); s })—
Reply to this email directly or view it on GitHub
#24 (comment)
.
from kafka-spark-consumer.
Hi,
Not an issue. You can raise any issue/question . Its perfectly fine.
Glad to know this receiver is useful to you ..
from kafka-spark-consumer.
hi @fzschornack
I have created a JIRA to track the progress of contributing back this project to Apache Spark.
https://issues.apache.org/jira/browse/SPARK-11045
This project is now presently in spark-packages and I believe this is the correct time to contribute it to Apache Spark Project and give better options to larger community around Kafka Connectivity for Spark Streaming.
kindly Vote for this JIRA.
from kafka-spark-consumer.
Voted!
from kafka-spark-consumer.
thanks
from kafka-spark-consumer.
Related Issues (20)
- Why appear this exception information? HOT 8
- Not working with Spark 2.2.0 HOT 11
- How to use in kerberized context ? HOT 3
- AbstractMethodError with Spark 1.6.0 and Kafka 0.10.2 HOT 9
- Exception: Could not compute split, block not found HOT 6
- Hello, Compilation failed after changing Kafka version 0.10.0.0 HOT 5
- Kafka Headers Support HOT 7
- After long time running, the processing time of "ProcessedOffsetManager.persists(partitonOffset_stream, props)" incresing. HOT 13
- How to recover the failed receiver on a partition which has exception of " Offsets out of range with no configured reset policy for partitions:" HOT 18
- May I have a Scala sample of messageHandler to filter out some playload which includes some strings? HOT 20
- The Spark Streaming can not read kafka message HOT 8
- It works well in local model,but when I submit it in cluster model,the fixed rate is too small HOT 5
- Does this support spark structured streaming HOT 1
- java.lang.NoClassDefFoundError: kafka/api/OffsetRequest HOT 22
- Offset is still updated when exception occurs during processing HOT 28
- Manipulation of offsetRanges in each batch
- example doesn't build HOT 1
- Trying to fetch Multi topic In Local , But It is showing warning like this HOT 2
- Can a higher version of kafka be supported HOT 2
- Can a higher version of Spark be supported? Spark 3.2.0 for example. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kafka-spark-consumer.