[
https://issues.apache.org/jira/browse/SPARK-21471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lê Văn Thanh updated SPARK-21471:
---------------------------------
Description:
My client using GZIPOutputStream to compressed the data and push to my server.
When I using binaryRecordsStream method to stream/read data and I got a message
like :
!http://sv1.upsieutoc.com/2017/07/19/error.png!
My code :
{code:java}
SparkConf conf = new
SparkConf().setAppName("SparkStream").setMaster("local[*]").set("spark.executor.memory",
"1g");
JavaStreamingContext streamingContext = new JavaStreamingContext(conf,
Seconds.apply(10));
JavaDStream<byte[]> javaDStream =
streamingContext.binaryRecordsStream("hdfs://localhost:9000/user/data/", 10);
javaDStream.foreachRDD(x -> {
List<byte[]> bytes = x.collect();
System.out.println(bytes);
});
{code}
Can you tell me how to fix this issue .
was:
My client using GZIPOutputStream to compressed the data . When I using
binaryRecordsStream method to stream/read data and I got a message like :
!http://sv1.upsieutoc.com/2017/07/19/error.png!
My code :
{code:java}
SparkConf conf = new
SparkConf().setAppName("SparkStream").setMaster("local[*]").set("spark.executor.memory",
"1g");
JavaStreamingContext streamingContext = new JavaStreamingContext(conf,
Seconds.apply(10));
JavaDStream<byte[]> javaDStream =
streamingContext.binaryRecordsStream("hdfs://localhost:9000/user/data/", 10);
javaDStream.foreachRDD(x -> {
List<byte[]> bytes = x.collect();
System.out.println(bytes);
});
{code}
Can you tell me how to fix this issue .
> Read binary file error in Spark Streaming
> -----------------------------------------
>
> Key: SPARK-21471
> URL: https://issues.apache.org/jira/browse/SPARK-21471
> Project: Spark
> Issue Type: Bug
> Components: Java API, Spark Core
> Affects Versions: 2.2.0
> Environment: <groupId>org.apache.spark</groupId>
> <artifactId>spark-streaming_2.11</artifactId>
> <version>2.2.0</version>
> Ubuntu - 16.10
> Hadoop - 2.7.3
> Reporter: Lê Văn Thanh
>
> My client using GZIPOutputStream to compressed the data and push to my
> server. When I using binaryRecordsStream method to stream/read data and I got
> a message like :
> !http://sv1.upsieutoc.com/2017/07/19/error.png!
> My code :
> {code:java}
> SparkConf conf = new
> SparkConf().setAppName("SparkStream").setMaster("local[*]").set("spark.executor.memory",
> "1g");
> JavaStreamingContext streamingContext = new JavaStreamingContext(conf,
> Seconds.apply(10));
> JavaDStream<byte[]> javaDStream =
> streamingContext.binaryRecordsStream("hdfs://localhost:9000/user/data/", 10);
> javaDStream.foreachRDD(x -> {
> List<byte[]> bytes = x.collect();
> System.out.println(bytes);
> });
> {code}
> Can you tell me how to fix this issue .
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]