0

I am developing a geoserver with geomesa hbase, but when I create a new data store, I have some problems in the bigtable.table.name.

The problem is that the name of all my tables is like this 'published.cityos.fonts', but when I save the store throw me an error like this

Error creating data store, check the parameters. Error message: String index out of range: -1

I duplicated a table to do a test and named like this 'cityos.fonts' and I do not get any error.

Is it possible to solve the problem without having to duplicate and rename 100 tables?

Thank you very much in advance.

Error in console:

WARN [data.store] - Error obtaining new data store java.io.IOExceptionç Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(Unknown Source) at org.locationtech.geomesa.index.metadata.CachedLazyMetadata$.decodeRow(CachedLazyMetadata.scala:137) at org.locationtech.geomesa.index.metadata.CachedLazyMetadata$$anonfun$getFeatureTypes$1.apply(CachedLazyMetadata.scala:57) at org.locationtech.geomesa.index.metadata.CachedLazyMetadata$$anonfun$getFeatureTypes$1.apply(CachedLazyMetadata.scala:57) at scala.collection.Iterator$$anon$11.next(Iterator.scala:370) at org.locationtech.geomesa.utils.collection.CloseableIterator$$anon$2.next(CloseableIterator.scala:36) at scala.collection.Iterator$class.toStream(Iterator.scala:1180) at org.locationtech.geomesa.utils.collection.CloseableIterator$$anon$2.toStream(CloseableIterator.scala:34) at scala.collection.TraversableOnce$class.toSeq(TraversableOnce.scala:296) at org.locationtech.geomesa.utils.collection.CloseableIterator$$anon$2.toSeq(CloseableIterator.scala:34) at org.locationtech.geomesa.index.metadata.CachedLazyMetadata$class.getFeatureTypes(CachedLazyMetadata.scala:57) at org.locationtech.geomesa.hbase.data.HBaseBackedMetadata.getFeatureTypes(HBaseBackedMetadata.scala:19) at org.locationtech.geomesa.index.geotools.GeoMesaDataStore.getTypeNames(GeoMesaDataStore.scala:137) at org.vfny.geoserver.util.DataStoreUtils.getDataAccess(DataStoreUtils.java:97) at org.geoserver.catalog.ResourcePool.getDataStore(ResourcePool.java:649)

Navo
  • 25
  • 5
  • To help narrow down the problem, what version of GeoMesa are you using? I believe that error is coming from the rows in the table, not the table name itself... could you scan the two tables (the one that works and the one that doesn't) in the hbase shell and post the results here? – Emilio Lahr-Vivaz Jan 30 '18 at 14:28

2 Answers2

1

I think that the issue it not due to the table names, but due to the extra data in the first table. GeoMesa expects the catalog table to only contain simple feature type metadata. To determine the simple feature types in a given catalog, GeoMesa scans the table and uses a regex to pull out the type name from the row values. For example, abastament_agbarType~attributes indicates the type name is abastament_agbarType. The original table appears to have a lot of non-GeoMesa rows, which is causing the row regex to fail.

I created a ticket to track the issue here. We can add a try/catch and log a warning on invalid rows. However, even with that fix, having lots of data in the catalog will make getTypeNames very slow, so if possible you should avoid it.

Emilio Lahr-Vivaz
  • 1,439
  • 6
  • 5
  • I put up a PR for the fix [here](https://github.com/locationtech/geomesa/pull/1845), if you want to try applying it to 1.3.5 and building from source. – Emilio Lahr-Vivaz Jan 30 '18 at 19:41
0

Once the changes have been made...

When I try to build from source, and when I get to the part of geomesa-index-api, it stops. I get a compilation error.

[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.2.1:compile (scala-compile-first) on project geomesa-index-api_2.11: wrap: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :geomesa-index-api_2.11

I'm building with this cli command:

mvn clean install -DskipTests -Dcheckstyle.skip

When I build without changes it's building Ok, without any errors

Thanks.

Navo
  • 25
  • 5