table 名称错误 geomesa-hbase/geoserver

Error in table names geomesa-hbase/geoserver

我正在使用 geomesa hbase 开发一个地理服务器,但是当我创建一个新的数据存储时,我在 bigtable.table.name.

中遇到了一些问题

问题是我所有的 table 的名字都是这样的 'published.cityos.fonts',但是当我保存商店时给我一个这样的错误

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

我复制了一个 table 来做测试并命名为 'cityos.fonts' 我没有收到任何错误。

是否可以在不复制和重命名 100 table 的情况下解决问题?

非常感谢您。

控制台错误:

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.apply(CachedLazyMetadata.scala:57) at org.locationtech.geomesa.index.metadata.CachedLazyMetadata$$anonfun$getFeatureTypes.apply(CachedLazyMetadata.scala:57) at scala.collection.Iterator$$anon.next(Iterator.scala:370) at org.locationtech.geomesa.utils.collection.CloseableIterator$$anon.next(CloseableIterator.scala:36) at scala.collection.Iterator$class.toStream(Iterator.scala:1180) at org.locationtech.geomesa.utils.collection.CloseableIterator$$anon.toStream(CloseableIterator.scala:34) at scala.collection.TraversableOnce$class.toSeq(TraversableOnce.scala:296) at org.locationtech.geomesa.utils.collection.CloseableIterator$$anon.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)

我认为问题不是 table 名称引起的,而是第一个 table 中的额外数据引起的。 GeoMesa 期望目录 table 仅包含简单的要素类型元数据。为了确定给定目录中的简单要素类型,GeoMesa 扫描 table 并使用正则表达式从行值中提取类型名称。例如,abastament_agbarType~attributes表示类型名称为abastament_agbarType。原来的 table 似乎有很多非 GeoMesa 行,这导致行正则表达式失败。

我创建了一个工单来跟踪问题 here。我们可以添加 try/catch 并在无效行上记录警告。然而,即使有了这个修复,目录中的大量数据也会使 getTypeNames 非常慢,所以如果可能你应该避免它。

更改完成后...

当我尝试从源代码构建时,当我到达 geomesa-index-api 的部分时,它停止了。我收到编译错误。

[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

我正在使用此 cli 命令进行构建:

mvn clean install -DskipTests -Dcheckstyle.skip

当我在没有更改的情况下构建时,它正在构建,没有任何错误

谢谢。