Hey,
I´m trying to retrieve a RDD using the GeomesaSpark class.
Unfortunately a NullPointerException is thrown during execution of
this method:
GeoMesaSpark.rdd(conf, sparkContext, ds,
query1);
It says SimpleFeatureType.encodeType throws this
exception. Is something wrong with my datatore or my arguments?
Here is my code:
Map<String, String> map =
new
HashMap<String,
String>();
map.put(
"instanceId", "accumulo"
);
map.put(
"zookeepers", "node1-scads02:2181"
);
map.put(
"user", "user"
);
map.put(
"password",
"password"
);
map.put(
"tableName", "gdelt"
);
map.put(
"featureName",
"event"
);
AccumuloDataStore ds = (AccumuloDataStore)
DataStoreFinder.getDataStore(map);
SparkConf sc =
new
SparkConf(
true
);
sc.set(
"spark.serializer"
,
"org.apache.spark.serializer.KryoSerializer"
);
sc.set(
"spark.kryo.serializer.buffer.mb"
,
"24"
);
Configuration conf =
new
Configuration();
SparkConf sc2 = GeoMesaSpark.init(sc, ds);
SparkContext sparkContext =
new
SparkContext(
"spark://node1-scads02:7077"
,
"countryWithMostEvent"
, sc2);
Filter f = Filter.INCLUDE;
Query query1 =
new
Query(
"gdelt"
,
f,
new
String[]{
"Actor1CountryCode"
,
"Actor2CountryCode"
});
RDD<SimpleFeature> actorResultRDD =
GeoMesaSpark.rdd(conf, sparkContext, ds, query1);
Thanks again.
ps: It would be great when anybody could post a working
GeomesaSpark example in Java including a RDD transformation.
Best regards
Marcel Jacob.
_______________________________________________
geomesa-users mailing list
geomesa-users@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
http://www.locationtech.org/mailman/listinfo/geomesa-users