Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[geomesa-users] Upgrading problem for GeoMesa from 1.2.3 to 1.3.1

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


Back to the top