[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [geomesa-users] Upgrading problem for GeoMesa from 1.2.3 to 1.3.1
|
Hi Takashi,
Actually I believe the error is due to specifying z2 instead of xz2,
since z2 doesn't support non-point geometries. When we validate the
enabled indices, we filter out ones that don't support the schema. In
this case, that resulted in zero indices. I'll add an explicit check to
prevent a schema without indices from being created.
Thanks,
Emilio
On 03/13/2017 09:13 AM, Emilio Lahr-Vivaz wrote:
Hi Takashi,
You are right that the XZ2 index would be appropriate for
MultiLineStrings. However, I think the error you're seeing is a bug in
our code. Can you try the following:
simpleFeatureType.getUserData().put("geomesa.indexes.enabled",
"xz2:1:3");
Thanks,
Emilio
On 03/13/2017 03:26 AM, Takashi Sasaki wrote:
Hello,
We use GeoMesa1.2.3 "z2" index with MutiLineString(non-point
geometries).
Perhaps does we need to use the GeoMesa 1.3.1 "xz2" index with
MutiLineString?
http://www.geomesa.org/documentation/user/accumulo/data_management.html
Thanks,
Takashi
2017-03-13 15:27 GMT+09:00 Takashi Sasaki <tsasaki609@xxxxxxxxx>:
Hello,
We tried to upgrade some system from GeoMesa 1.2.3 to 1.3.1, a error
is occered.
Exception in thread "main" scala.MatchError:
[Ljava.lang.String;@6a2c717f (of class [Ljava.lang.String;)
at
org.locationtech.geomesa.utils.geotools.RichSimpleFeatureType$RichSimpleFeatureType$.org$locationtech$geomesa$utils$geotools$RichSimpleFeatureType$RichSimpleFeatureType$$toTuple$1(Conversions.scala:295)
at
org.locationtech.geomesa.utils.geotools.RichSimpleFeatureType$RichSimpleFeatureType$$anonfun$getIndices$extension$1$$anonfun$apply$2.apply(Conversions.scala:298)
at
org.locationtech.geomesa.utils.geotools.RichSimpleFeatureType$RichSimpleFeatureType$$anonfun$getIndices$extension$1$$anonfun$apply$2.apply(Conversions.scala:298)
at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)
at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)
at
scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
at
scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
at
scala.collection.TraversableLike$class.map(TraversableLike.scala:245)
at
scala.collection.mutable.ArrayOps$ofRef.map(ArrayOps.scala:186)
at
org.locationtech.geomesa.utils.geotools.RichSimpleFeatureType$RichSimpleFeatureType$$anonfun$getIndices$extension$1.apply(Conversions.scala:298)
at
org.locationtech.geomesa.utils.geotools.RichSimpleFeatureType$RichSimpleFeatureType$$anonfun$getIndices$extension$1.apply(Conversions.scala:298)
at scala.Option.map(Option.scala:146)
at
org.locationtech.geomesa.utils.geotools.RichSimpleFeatureType$RichSimpleFeatureType$.getIndices$extension(Conversions.scala:298)
at
org.locationtech.geomesa.index.geotools.GeoMesaDataStore$$anonfun$getSchema$1.apply(GeoMesaDataStore.scala:179)
at
org.locationtech.geomesa.index.geotools.GeoMesaDataStore$$anonfun$getSchema$1.apply(GeoMesaDataStore.scala:176)
at scala.Option.foreach(Option.scala:257)
at
org.locationtech.geomesa.index.geotools.GeoMesaDataStore.getSchema(GeoMesaDataStore.scala:176)
at
org.locationtech.geomesa.accumulo.data.AccumuloDataStore.getSchema(AccumuloDataStore.scala:144)
at
org.locationtech.geomesa.index.geotools.GeoMesaDataStore.createSchema(GeoMesaDataStore.scala:148)
at
org.locationtech.geomesa.accumulo.data.AccumuloDataStore.createSchema(AccumuloDataStore.scala:128)
at
org.locationtech.geomesa.accumulo.data.AccumuloDataStore.createSchema(AccumuloDataStore.scala:48)
at
link.spark.AbstractGeoMesaImporter.executeInsert(AbstractGeoMesaImporter.java:137)
at
link.spark.AccumuloDataStoreInitializer.main(AccumuloDataStoreInitializer.java:75)
It is seemed to be schema difinition issue, because
AbstractGeoMesaImporter.java:137 is executing
dataStore.createSchema(simpleFeatureType).
1. failed code
protected SimpleFeatureType createSimpleFeatureType(
String simpleFeatureTypeName) throws SchemaException {
// list the attributes that constitute the feature type
List<String> attributes = Lists.newArrayList(
"*Where:MultiLineString:srid=4326", // the "*" denotes the default
geometry (used for indexing)
"RoadType:String" // you may have as many other attributes as
you like...
);
// create the bare simple-feature type
String simpleFeatureTypeSchema = Joiner.on(",").join(attributes);
SimpleFeatureType simpleFeatureType = SimpleFeatureTypes.createType(
simpleFeatureTypeName, simpleFeatureTypeSchema);
simpleFeatureType.getUserData().put("geomesa.indexes.enabled", "z2");
return simpleFeatureType;
}
2. success code (uncommented withIndexes method, same error occurred)
protected SimpleFeatureType createSimpleFeatureType(
String simpleFeatureTypeName) throws SchemaException {
final SimpleFeatureType simpleFeatureType = new SftBuilder().
stringType("RoadType", false).
multiLineString("Where", true).
//withIndexes(ScalaConvetUtils.list("z2")).
build(simpleFeatureTypeName);
return simpleFeatureType;
}
I don't understand the cause of this error at all.
Please advise me.
Thanks,
Takashi
_______________________________________________
geomesa-users mailing list
geomesa-users@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.locationtech.org/mailman/listinfo/geomesa-users
_______________________________________________
geomesa-users mailing list
geomesa-users@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.locationtech.org/mailman/listinfo/geomesa-users