我在Apache Storm中运行Geotools,并且在geotools依赖管理方面有一段时间.当我在本地运行风暴集群(Windows 7笔记本电脑)时,每件事都有效,但当我部署到集群时,我在日志中遇到此异常.
编辑:这是我使用的Java调用此功能
GridCoverage2D image =
new GeoTiffReader(f).read(new GeneralParameterValue[]{policy, gridsize, useJaiRead});
/**
* reproject to WGS84
*/
CoordinateReferenceSystem targetCRS = CRS.decode("EPSG:4326");
GridCoverage2D reprojectedImage = (GridCoverage2D) Operations.DEFAULT.resample(image, targetCRS);
Run Code Online (Sandbox Code Playgroud)
这是我的环境
geotools 11.1
java 7
POM is below
running on windows 7 when in local mode (works perfectly here)
this problem happens on Ubuntu 12.04.5 LTS (GNU/Linux 3.2.0-63-virtual x86_64)
here's the exception from the log
[ERROR] Exception in Bolt org.geotools.data.DataSourceException: GEOTIFF Module Error Report
No code "EPSG:32637" from authority "EPSG" found for …Run Code Online (Sandbox Code Playgroud) 我试图在一个相对简单的工作队列用例中使用ActiveMQ.我有一个队列,并有一个简单的生产者和消费者.我的问题是我做错了什么不断使DB锁定?这是我不断得到的信息:
14/04/05 18:14:13 INFO store.SharedFileLocker: Database activemq-data\localhost\KahaDB\lock is locked... waiting 10 seconds for the database to be unlocked. Reason: java.io.IOException: File 'activemq-data\localhost\KahaDB\lock' could not be locked.
Run Code Online (Sandbox Code Playgroud)
我同时在单独的线程中运行生产者和使用者.最初,我在类级别有连接,所以我认为这是问题所在,但即使从头开始创建连接,每次调用put和get仍会导致锁定.
我做过研究但未能找到解决方案.我在Windows 7上运行ActiveMQ 5.9.0.
这是通过cmd提示启动它时打印出的内容:
C:\activemq\apache-activemq-5.9.0\bin>activemq
Java Runtime: Oracle Corporation 1.7.0_40 C:\Program Files\Java\jre7
Heap sizes: current=1005568k free=995061k max=1005568k
JVM args: -Dcom.sun.management.jmxremote -Xms1G -Xmx1G -Djava.util.logging.config.file=logging.properties -Dhawtio.realm=activemq -Dhawtio.role=admins -Dhawtio.rolePrincipalCla
vemq.jaas.GroupPrincipal -Djava.security.auth.login.config=C:\activemq\apache-activemq-5.9.0\bin\..\conf\login.config -Dactivemq.classpath=C:\activemq\apache-activemq-5.9.0\bin\..\
che-activemq-5.9.0\bin\../conf;C:\activemq\apache-activemq-5.9.0\bin\../conf; -Dactivemq.home=C:\activemq\apache-activemq-5.9.0\bin\.. -Dactivemq.base=C:\activemq\apache-activemq-5
mq.conf=C:\activemq\apache-activemq-5.9.0\bin\..\conf -Dactivemq.data=C:\activemq\apache-activemq-5.9.0\bin\..\data -Djava.io.tmpdir=C:\activemq\apache-activemq-5.9.0\bin\..\data\t
Extensions classpath:
[C:\activemq\apache-activemq-5.9.0\bin\..\lib,C:\activemq\apache-activemq-5.9.0\bin\..\lib\camel,C:\activemq\apache-activemq-5.9.0\bin\..\lib\optional,C:\activemq\apache-activemq
b,C:\activemq\apache-activemq-5.9.0\bin\..\lib\extra]
ACTIVEMQ_HOME: C:\activemq\apache-activemq-5.9.0\bin\..
ACTIVEMQ_BASE: C:\activemq\apache-activemq-5.9.0\bin\..
ACTIVEMQ_CONF: C:\activemq\apache-activemq-5.9.0\bin\..\conf
ACTIVEMQ_DATA: C:\activemq\apache-activemq-5.9.0\bin\..\data
Loading message broker from: xbean:activemq.xml
INFO …Run Code Online (Sandbox Code Playgroud) 我已经google了很多,我有相当不错的阅读理解,但我不明白这个脚本是否可以在我的postgres/postgis框中的多个线程中工作.这是代码:
Do
$do$
DECLARE
x RECORD;
b int;
begin
create temp table geoms (id serial, geom geometry) on commit drop;
for x in select id,geom from asdf loop
truncate table geoms;
insert into geoms (geom) select someGeomfield from sometable where st_intersects(somegeomfield,x.geom);
----do something with the records in geoms here...and insert that data somewhere else
end loop;
end;
$do$
Run Code Online (Sandbox Code Playgroud)
那么,如果我在多个客户端(从Java调用)中运行它,那么geoms临时表的范围会导致问题吗?如果是这样,在PostGres中解决这个问题的任何想法都会有所帮助.
谢谢
我google了很多,似乎无法找到一个简单的解决方案来解决我的简单用例.我在Oracle 12C数据库中有一个json列(当然是一个带有json约束的varchar),在该列中我存储了一个这样的Map表示
{
"a":9.0847,
"b":859.947
}
Run Code Online (Sandbox Code Playgroud)
在plsql中,我想返回一个看起来像这样的结果集
key val
a 9.0847
b 859.947
Run Code Online (Sandbox Code Playgroud)
我已经修改了下面看似无限的变化,并且所有的例子对于我的用例来说都太刻薄了.
select b.* from mytable a,json_table(myJsonCol,'$'
columns ( value varchar2(500) path '$.myjsonkey')) b
Run Code Online (Sandbox Code Playgroud)
但这只返回一个值列表,没有相应的键.json数据总是字符串双键值.
谢谢
编辑为了添加更多的上下文,我在postgres中使用json_each来实现这一点,我正在寻找Oracle中的类似方法.
我有一个用例将数据分布在许多服务器上的许多数据库中,所有数据都在 postgres 表中。从任何给定的服务器/数据库,我可能需要查询另一个服务器/数据库。查询非常基本,标准选择在标准字段上使用 where 子句。
我目前已经实现了 postgres_FDW,(我使用的是 postgres 9.5),但我认为查询没有使用远程数据库上的索引。对于这个用例(一个随机节点可能会查询 N 个其他节点),根据每个底层引擎的实际执行方式,这可能是我的最佳性能选择?
java ×2
dblink ×1
geotools ×1
json ×1
maven ×1
oracle ×1
plpgsql ×1
postgres-fdw ×1
postgresql ×1