I am using spark sql with java api.I am trying to broadcast a dataset and use the boradcasted datset. Here is the same peice of code which is causing an issue.
Dataset<Rules> rulesDS= loadTrustRulesAsDataset("Rules.csv");
final Broadcast<Dataset<Rules>> broadcastTrustRulesDS = sqlcontext.broadcast(rulesDS);
Dataset<Rules> ds = broadcastTrustRulesDS.getValue();
ds.show();
As mentioned in the comments section, I have updated code as below
Dataset<Rules> broadcastTrustRulesDS = org.apache.spark.sql.functions.broadcast(rulesDS);
Dataset<Rules> ds = broadcastTrustRulesDS.value();
ds.show();
Is throwing Nullpointer Exception at ds.show()
this ds.show() is not giving any result.
When I run in the eclipse ,below message is being shown in console.
18/05/03 09:51:31 WARN NettyUtil: Found Netty's native epoll transport, but not running on linux-based operating system. Using NIO instead.
18/05/03 09:51:32 INFO Cluster: New Cassandra host localhost/127.0.0.1:9042 added
18/05/03 09:51:32 INFO CassandraConnector: Connected to Cassandra cluster: Test Cluster
[Stage 16:=======================================> (7 + 3) / 10]
[Stage 16:=======================================> (7 + 3) / 10]
[Stage 16:=======================================> (7 + 3) / 10]
[Stage 16:=======================================> (7 + 3) / 10]
[Stage 16:=======================================> (7 + 3) / 10]
[Stage 16:=======================================> (7 + 3) / 10]
[Stage 16:=======================================> (7 + 3) / 10]
[Stage 16:=======================================> (7 + 3) / 10]
[Stage 16:=======================================> (7 + 3) / 10]
[Stage 16:=======================================> (7 + 3) / 10]
[Stage 16:=======================================> (7 + 3) / 10]