Geomesa 未连接

问题描述 投票:0回答:1

我在同一服务器上安装了完整的accumulo (2.1.1)/geomesa (2.13) 和VDI。它具有以下配置(但仅使用第一个动物园管理员)

zookeeper1 192.168.2.31
zookeeper2 192.168.2.32
zookeeper3 192.168.2.33
namenode   192.168.2.34
datanode1  192.168.2.35
datanode2  192.168.3.36
acc-master 192.168.2.37
acc-tserver 192.168.2.38

我正在尝试与此建立连接:

Map<String, String> parameters = new HashMap<>();
parameters.put("accumulo.instance.name", "myInstance");
parameters.put("accumulo.zookeepers", "127.0.0.1:9997");
parameters.put("accumulo.user", "keith");
parameters.put("accumulo.password", "accumulo2.1");
parameters.put("accumulo.catalog", "myNamespace.keithCatalog");
try {
    store = DataStoreFinder.getDataStore(parameters);
} catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
}

当我尝试连接时,它永远不会返回。没有错误,什么都没有。只是果酱。

架构是这样创建的:

/opt/geomesa-accumulo_2.12-4.0.1/bin/geomesa-accumulo create-schema -c myNamespace.keithCatalog -s source:String,sensor:String,type:String,date:Date -f testSchema

我可以通过以下方式从 acc-master 框中看到测试模式:

sudo /opt/geomesa-accumulo_2.12-4.0.1/bin/geomesa-accumulo describe-schema -c myNamespace.keithCalog -f testSchema
INFO  Describing attributes of feature 'testSchema'
source | String
sensor | String
type   | String
date   | Date


User data:
  geomesa.index.dtg    | date
  geomesa.indices      | id:4:3:
  geomesa.stats.enable | true

如果我遗漏了目录,它自然会出错。如果我在那里放了错误的目录,它仍然不会返回。

在我的代码中,如果我通过 DataStoreFinder.getAllDataStores() 获取可用的数据存储,我会得到这个,所以它看起来就在那里:

org.locationtech.geomesa.accumulo.data.AccumuloDataStoreFactory@18e36d14
 Info:
  accumulo.instance.name=java.lang.String Accumulo Instance Name
  accumulo.zookeepers=java.lang.String Zookeepers
  accumulo.catalog=java.lang.String REQUIRED Accumulo catalog table name, including Accumulo namespace (if any) separated with a period
  accumulo.user=java.lang.String Accumulo user
  accumulo.password=java.lang.String Accumulo password
  accumulo.keytab.path=java.lang.String Path to keytab file
  geomesa.query.threads=java.lang.Integer The number of threads to use per query
  accumulo.query.record-threads=java.lang.Integer The number of threads to use for record retrieval
  accumulo.write.threads=java.lang.Integer The number of threads to use for writing records
  geomesa.query.timeout=java.lang.String The max time a query will be allowed to run before being killed, e.g. '60 seconds'
  accumulo.zookeepers.timeout=java.lang.String The timeout used for connections to Zookeeper
  accumulo.remote.arrow.enable=java.lang.Boolean Process Arrow encoding in Accumulo tablets servers as a distributed call
  accumulo.remote.bin.enable=java.lang.Boolean Process binary encoding in Accumulo tablets servers as a distributed call
  accumulo.remote.density.enable=java.lang.Boolean Process heatmap encoding in Accumulo tablets servers as a distributed call
  accumulo.remote.stats.enable=java.lang.Boolean Process statistical calculations in Accumulo tablets servers as a distributed call
  geomesa.stats.enable=java.lang.Boolean Generate and persist data statistics for new feature types
  geomesa.query.audit=java.lang.Boolean Audit queries being run
  geomesa.query.loose-bounding-box=java.lang.Boolean Use loose bounding boxes - queries will be faster but may return extraneous results
  geomesa.partition.scan.parallel=java.lang.Boolean Run scans in parallel for partitioned stores
  geomesa.security.auths=java.lang.String Super-set of authorizations that will be used for queries. The actual authorizations might differ, depending on the authorizations provider, but will be outside this set. Comma-delimited.
  geomesa.security.auths.force-empty=java.lang.Boolean Default to using no authorizations during queries, instead of using the connection user's authorizations
  namespace=java.lang.String Namespace
  password=java.lang.String 

任何帮助将不胜感激。

预计恢复数据存储

geotools accumulo geomesa
1个回答
0
投票

我相信你的数据存储参数是错误的,它正在尝试连接到zookeeper并挂起。使用

geomesa-accumulo
命令行工具时,GeoMesa 可能会从您的 Accumulo 安装中获取
accumulo-client.properties
文件,这将使其进行连接。您可以简单地将该文件放在应用程序的类路径上,而不是传入实例/zookeepers/用户/密码。否则,您需要修复数据存储参数。特别是,
127.0.0.1:9997
看起来不正确,正如你所说,zookeeper位于
192.168.2.31
32
33
,并且zookeeper通常侦听端口
2181
(不是
9997
,这是Accumulo端口)用于与平板电脑服务器通信)。

© www.soinside.com 2019 - 2024. All rights reserved.