What are some of the solutions used to get the 'group by' functionality out of data cached in Gemfire given that it does not currently support this?
Alternatives to OQL (select customerId, sum(qty) from /TradeCache group by customerId)
Java heap space occurs by problem with Gemfire Region
Gemfire Authentication - Performance Impact
We enabled authentication in our application and are seeing a drop by 25% in system performance. We have two clients in the DS. One which publishes the data(using putall) and another is only subscriber. As per the documentation below looks like client will get authenticated with a token generated each time.
a) Does it apply to subscriber only as well as publisher?
b)Is it expected performance drop?
c) Also if client gets token each time, when i enabled fine logging, why dont i see the token information?
• Joining peer members are authenticated by the locator to which they connect.
• Clients are authenticated by their server during the connection initialization and for each operation request.
• Servers may be authenticated by their clients during the connection initialization.
• Gateways mutually authenticate each other when they connect.
• For each operation request after the initial connection is established:
o The client sends the request with the unique identifier it received from the server in the last communication.
o The server verifies the identifier and processes the request, then responds with a new randomly generated unique identifier, for the client to include in its next request.
Client Authentication Process
The client authentication process occurs for each connection established by a pool, regardless of whether the pool is configured for process-wide or single user connections. All credentials are checked for each connection between client and server, including the server-to-client notification channel.
Write-behind scenario
We are planning to use a database as the system of record beneath Gemfire 7 with write-behind on any creates or updates in our regions (both partitioned and replicated) and read through on cache misses. A further requirement of our datagrid is that every node be identical in terms of custom code and/or gemfire plugins that we have installed to facilitate easy scaling of the grid (for example we want to be able to have a VM gemfire node image that can essentially be copied and spun up on demand for horizontal scaling. We have done this successfully with gemfire datagrids where we have no write-behind requirement).
My question is what is the best way to accomplish write-behind in this scenario? I have looked at the recommended method for write-behind using the AsyncEventListener but this listener has the constraint that it cannot be installed on every node in the grid. Is it possible to use regular cache listeners to perform write-behind provided that we implement an asynchronous method within the listener? What are the advantages to using the AsyncEventListener instead of the regular cache listeners for write-behind?
InterestRegistrationListener not firing on client cleanup
Hi,
GF: 6.6.4.1.
Use case: durable client, server side ClientSession.registerInterest and making use of InterestRegistrationListener.
It seems that InterestRegistrationListener.unregisterInterest is not called at all upon client disconnect/durable client expiration. On the other hand, InterestRegistrationListener.registerInterest is called no problem when one does server side ClientSession.registerInterest. Seems like a bug. I can see the alert about durable client expiration, but no notifications happen on the listener.
CacheClientProxy[identity(x.x.x.x(:loner):59983:8aa94844:SampleClient,connection=1,durableAttributes=DurableClientAttributes[id=user@host; timeout=60]); port=59995; primary=true] : The expiration task has fired, so this proxy is being terminated.
But no notifications happen on InterestRegistrationListener.
Another question: is there a way in the API to be notified of ClientSession termination?
Thanks!
GemFire Hangs tcServer Startup in SpringTrader
Hello,
I'm trying to get SpringTrader to work in a clustered environment. Changing the bind-address from 127.0.0.1 to the IP of the host results in the below messages in catalina.out. Any ideas? Also the -DgemfirePropertyFile command line parameter didn't work. I had to add the directory containing gemfire.properties to the classpath.
[info 2013/01/18 10:57:35.138 MST Spring Integration GemFire World <localhost-startStop-1> tid=0x14]
---------------------------------------------------------------------------
Copyright (C) 1997-2012 VMware, Inc. All rights reserved. This product is
protected by U.S. and international copyright and intellectual property
laws. VMware products are covered by one or more patents listed at
http://www.vmware.com/go/patents. VMware is a registered trademark or
trademark of VMware, Inc. in the United States and/or other jurisdictions.
All other marks and names mentioned herein may be trademarks of their
respective companies.
---------------------------------------------------------------------------
Java version: 6.6.3 build 35763 06/07/2012 13:53:23 PDT javac 1.6.0_26
Native version: native code unavailable
Source revision: 35763
Source repository: gemfire/trunk
Running on: nanodbserver/192.168.65.132, 1 cpu(s), i386 Linux 2.6.32-279.19.1.el6.i686
Process ID: 20327
User: root
Current dir: /opt/vmware/vfabric-tc-server-standard
Home dir: /root
Class Path:
/opt/vmware/vfabric-tc-server-standard/springtrader/conf
/opt/vmware/vfabric-tc-server-standard/tomcat-7.0.30.A.RELEASE/bin/bootstrap.jar
/opt/vmware/vfabric-tc-server-standard/tomcat-7.0.30.A.RELEASE/bin/tomcat-juli.jar
Library Path:
/usr/java/packages/lib/i386
/lib
/usr/lib
System Properties:
awt.toolkit = sun.awt.X11.XToolkit
base.jmx.port = 6969
base.shutdown.port = -1
bio.http.port = 8080
bio.https.port = 8443
catalina.base = /opt/vmware/vfabric-tc-server-standard/springtrader
catalina.home = /opt/vmware/vfabric-tc-server-standard/tomcat-7.0.30.A.RELEASE
catalina.useNaming = true
com.springsource.tcserver.security.PropertyDecoder.passphrase = springsource
common.loader = ${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar
file.encoding = UTF-8
file.encoding.pkg = sun.io
file.separator = /
java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
java.awt.printerjob = sun.print.PSPrinterJob
java.class.version = 51.0
java.endorsed.dirs = /opt/vmware/vfabric-tc-server-standard/tomcat-7.0.30.A.RELEASE/endorsed
java.ext.dirs = /usr/java/jdk1.7.0_10/jre/lib/ext:/usr/java/packages/lib/ext
java.home = /usr/java/jdk1.7.0_10/jre
java.io.tmpdir = /opt/vmware/vfabric-tc-server-standard/springtrader/temp
java.naming.factory.initial = org.apache.naming.java.javaURLContextFactory
java.naming.factory.url.pkgs = org.apache.naming
java.rmi.server.hostname = 127.0.0.1
java.rmi.server.randomIDs = true
java.runtime.name = Java(TM) SE Runtime Environment
java.runtime.version = 1.7.0_10-b18
java.specification.name = Java Platform API Specification
java.specification.vendor = Oracle Corporation
java.specification.version = 1.7
java.util.logging.config.file = /opt/vmware/vfabric-tc-server-standard/springtrader/conf/logging.properties
java.util.logging.manager = com.springsource.tcserver.serviceability.logging.TcServerLogManager
java.vendor = Oracle Corporation
java.vendor.url = http://java.oracle.com/
java.vendor.url.bug = http://bugreport.sun.com/bugreport/
java.version = 1.7.0_10
java.vm.info = mixed mode, sharing
java.vm.name = Java HotSpot(TM) Client VM
java.vm.specification.name = Java Virtual Machine Specification
java.vm.specification.vendor = Oracle Corporation
java.vm.specification.version = 1.7
java.vm.vendor = Oracle Corporation
java.vm.version = 23.6-b04
line.separator =
org.apache.catalina.startup.EXIT_ON_INIT_FAILURE = true
org.apache.tomcat.util.digester.PROPERTY_SOURCE = com.springsource.tcserver.security.PropertyDecoder
os.version = 2.6.32-279.19.1.el6.i686
p2p.useSSL = false
package.access = sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
package.definition = sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
path.separator = :
server.loader =
shared.loader =
spring.profiles.active = production,jndi
springtrader.springtrader.driverClassName = com.vmware.sqlfire.jdbc.ClientDriver
springtrader.springtrader.password = nanotrader
springtrader.springtrader.url = jdbc:sqlfire://nanodbserver:1527/
springtrader.springtrader.username = nanotrader
springtrader.springtrader.validationQuery = select 1 from nanotrader.hibernate_sequences where sequence_name='ACCOUNT'
sun.arch.data.model = 32
sun.boot.class.path = /usr/java/jdk1.7.0_10/jre/lib/resources.jar:/usr/java/jdk1.7.0_10/jre/lib/rt.jar:/usr/java/jdk1.7.0_10/jre/lib/sunrsasign.jar:/usr/java/jdk1.7.0_10/jre/lib/jsse.jar:/usr/java/jdk1.7.0_10/jre/lib/jce.jar:/usr/java/jdk1.7.0_10/jre/lib/charsets.jar:/usr/java/jdk1.7.0_10/jre/lib/jfr.jar:/usr/java/jdk1.7.0_10/jre/classes
sun.boot.library.path = /usr/java/jdk1.7.0_10/jre/lib/i386
sun.cpu.endian = little
sun.cpu.isalist =
sun.io.unicode.encoding = UnicodeLittle
sun.java.command = org.apache.catalina.startup.Bootstrap start
sun.java.launcher = SUN_STANDARD
sun.jnu.encoding = UTF-8
sun.management.compiler = HotSpot Client Compiler
sun.nio.ch.bugLevel =
sun.os.patch.level = unknown
tomcat.util.buf.StringCache.byte.enabled = true
tomcat.util.scan.DefaultJarScanner.jarsToSkip = annotations-api.jar,ant.jar,apple_provider.jar,AppleScriptEngine.jar,antlr-*.jar,aopalliance-*.jar,asm-*.jar,aspectj*.jar,bootstrap.jar,catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-tribes.jar,cglib-*.jar,com.springsource.org.apache.tomcat.jdbc.jar,commons-beanutils*.jar,commons-codec*.jar,commons-collections*.jar,commons-daemon.jar,commons-dbcp*.jar,commons-digester*.jar,commons-fileupload*.jar,commons-httpclient*.jar,commons-io*.jar,commons-lang*.jar,commons-logging*.jar,commons-math*.jar,commons-pool*.jar,CoreAudio.jar,dom4j-*.jar,dns_sd.jar,dnsns.jar,ecj-*.jar,ehcache-core-*.jar,el-api.jar,freemarker-*.jar,gemfire-*.jar,geronimo-spec-jaxrpc*.jar,groovy-all-*.jar,h2*.jar,hibernate*.jar,httpclient*.jar,insight-*.jar,j3daudio.jar,j3dcore.jar,j3dutils.jar,jackson-*.jar,javassist-*.jar,jai_codec.jar,jai_core.jar,jasper.jar,jasper-el.jar,jcommon-*.jar,jetty-util-*.jar,jfreechart-*.jar,jline-*.jar,jmx.jar,jmx-tools.jar,jsp-api.jar,jstl.jar,jta*.jar,ldapsec.jar,liquibase-core-*.jar,localedata.jar,log4j*.jar,mail*.jar,mlibwrapper_jai.jar,MRJToolkit.jar,servlet-api.jar,slf4j*.jar,spring-aop-*.jar,spring-asm-*.jar,spring-aspects-*.jar,spring-beans-*.jar,spring-context-*.jar,spring-context-support-*.jar,spring-core-*.jar,spring-expression-*.jar,spring-gemfire-*.jar,spring-instrument-tomcat-*.jar,spring-jdbc-*.jar,spring-js-*.jar,spring-orm-*.jar,spring-security-core-*.jar,spring-security-web-*.jar,spring-tx-*.jar,stax-*.jar,sunec.jar,sunjce_provider.jar,sunpkcs11.jar,tcServer.jar,threaddumpwrapper.jar,tiles-api-*.jar,tiles-core-*.jar,tiles-servlet-*.jar,tomcat-api.jar,tomcat-coyote.jar,tomcat-dbcp.jar,tomcat-i18n-en.jar,tomcat-i18n-es.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,tomcat-jdbc.jar,tomcat-juli.jar,tomcat-util.jar,tools.jar,vecmath.jar,wrapper.jar,wsdl4j*.jar,xercesImpl.jar,xml-apis.jar,xmlParserAPIs.jar,xpp3_min-*.jar,xstream-*.jar,zipfs.jar
user.country = US
user.language = en
user.timezone = Navajo
---------------------------------------------------------------------------
[config 2013/01/18 10:57:35.153 MST Spring Integration GemFire World <localhost-startStop-1> tid=0x14] Startup Configuration:
ack-severe-alert-threshold="0"
ack-wait-threshold="15"
archive-disk-space-limit="0"
archive-file-size-limit="0"
async-distribution-timeout="0"
async-max-queue-size="8"
async-queue-timeout="60000"
bind-address="nanodbserver"
cache-xml-file="cache.xml"
conflate-events="server"
conserve-sockets="true"
delta-propagation="true"
departure-correlation-window="120"
disable-tcp="false"
distributed-system-id="-1"
durable-client-id=""
durable-client-timeout="300"
enable-network-partition-detection="false"
enable-time-statistics="false"
enforce-unique-host="false"
license-application-cache="Y14AA-N03EL-18T8H-06AAM-A42PC"
license-data-management=""
license-server-timeout="10000"
license-working-dir=""
locators=""
log-disk-space-limit="0"
log-file=""
log-file-size-limit="0"
log-level="config"
max-num-reconnect-tries="3"
max-wait-time-reconnect="10000"
mcast-address="239.192.81.1"
mcast-flow-control="1048576, 0.25, 5000"
mcast-port="10334"
mcast-recv-buffer-size="1048576"
mcast-send-buffer-size="65535"
mcast-ttl="32"
member-timeout="5000"
membership-port-range="1024-65535"
name="Spring Integration GemFire World"
redundancy-zone=""
remove-unresponsive-client="false"
roles=""
security-=""
security-client-accessor=""
security-client-accessor-pp=""
security-client-auth-init=""
security-client-authenticator=""
security-client-dhalgo=""
security-log-file=""
security-log-level="config"
security-peer-auth-init=""
security-peer-authenticator=""
security-peer-verifymember-timeout="1000"
server-bind-address=""
socket-buffer-size="32768"
socket-lease-time="60000"
ssl-ciphers="any"
ssl-enabled="false"
ssl-protocols="any"
ssl-require-authentication="true"
start-locator=""
statistic-archive-file=""
statistic-sample-rate="1000"
statistic-sampling-enabled="false"
tcp-port="0"
udp-fragment-size="60000"
udp-recv-buffer-size="1048576"
udp-send-buffer-size="65535"
writable-working-dir=""
[info 2013/01/18 10:57:35.158 MST Spring Integration GemFire World <localhost-startStop-1> tid=0x14] Defaulting license-working-dir to current working directory "/opt/vmware/vfabric-tc-server-standard".
[info 2013/01/18 10:57:35.166 MST Spring Integration GemFire World <localhost-startStop-1> tid=0x14] Acquiring Application Cache Node license with serial number "Y14AA-N03EL-18T8H-06AAM-A42PC".
[info 2013/01/18 10:57:35.305 MST Spring Integration GemFire World <localhost-startStop-1> tid=0x14] vFabric Licensing Client activation of license required 137 milliseconds.
[info 2013/01/18 10:57:35.313 MST Spring Integration GemFire World <localhost-startStop-1> tid=0x14] Licensing required 158 milliseconds.
[info 2013/01/18 10:57:35.479 MST Spring Integration GemFire World <localhost-startStop-1> tid=0x14] GemFire P2P Listener started on tcp:///192.168.65.132:54050
[info 2013/01/18 10:57:35.894 MST Spring Integration GemFire World <localhost-startStop-1> tid=0x14] requested unicast receive buffer size of 1,048,576 but got 131,071: This is an operating system limit. If you would like to change it, please see your system administrator.
[info 2013/01/18 10:57:35.895 MST Spring Integration GemFire World <localhost-startStop-1> tid=0x14] requested multicast receive buffer size of 1,048,576 but got 131,071: This is an operating system limit. If you would like to change it, please see your system administrator.
[info 2013/01/18 10:57:35.896 MST Spring Integration GemFire World <localhost-startStop-1> tid=0x14] requested multicast receive buffer size of 1,048,576 but got 131,071: This is an operating system limit. If you would like to change it, please see your system administrator.
[info 2013/01/18 10:57:36.916 MST Spring Integration GemFire World <localhost-startStop-1> tid=0x14] Attempting to join distributed system whose membership coordinator is nanodbserver(4447)<v0>:3891 using membership ID nanodbserver(20327):33105
[info 2013/01/18 10:57:37.132 MST Spring Integration GemFire World <localhost-startStop-1> tid=0x14] Entered into membership in group GF66 with ID nanodbserver(20327)<v33>:33105/54050.
[info 2013/01/18 10:57:37.133 MST Spring Integration GemFire World <localhost-startStop-1> tid=0x14] Starting DistributionManager nanodbserver(20327)<v33>:33105/54050.
[info 2013/01/18 10:57:37.134 MST Spring Integration GemFire World <localhost-startStop-1> tid=0x14] Initial (membershipManager) view = [nanodbserver(4447)<v0>:3891/55414, nanodbserver(20327)<v33>:33105/54050]
[info 2013/01/18 10:57:37.134 MST Spring Integration GemFire World <localhost-startStop-1> tid=0x14] Admitting member <nanodbserver(4447)<v0>:3891/55414>. Now there are 1 non-admin member(s).
[info 2013/01/18 10:57:37.134 MST Spring Integration GemFire World <localhost-startStop-1> tid=0x14] Admitting member <nanodbserver(20327)<v33>:33105/54050>. Now there are 2 non-admin member(s).
[info 2013/01/18 10:57:37.218 MST Spring Integration GemFire World <localhost-startStop-1> tid=0x14] DistributionManager nanodbserver(20327)<v33>:33105/54050 started on nanodbserver[10334]. There were 1 other DMs. others: [nanodbserver(4447)<v0>:3891/55414]
[info 2013/01/18 10:57:37.279 MST Spring Integration GemFire World <localhost-startStop-1> tid=0x14] JNDIInvoker::mapTransactions::NamingException while binding TransactionManager/UserTransaction to GemFire JNDI Tree
[info 2013/01/18 10:57:37.294 MST Spring Integration GemFire World <Thread-6 StatSampler> tid=0x48] Disabling statistic archival.
[severe 2013/01/18 10:57:37.398 MST Spring Integration GemFire World <P2P message reader for nanodbserver(4447)<v0>:3891/55414 SHARED=true ORDERED=false UID=17> tid=0x45] Error deserializing message
java.io.IOException: Unknown header byte: 0
at com.gemstone.gemfire.internal.InternalDataSerializer.basicReadObject(InternalDataSerializer.java:2819)
at com.gemstone.gemfire.DataSerializer.readObject(DataSerializer.java:3217)
at com.gemstone.gemfire.internal.cache.UpdateAttributesProcessor$ProfileReplyMessage.fromData(UpdateAttributesProcessor.java:402)
at com.gemstone.gemfire.internal.DSFIDFactory.readProfileReplyMessage(DSFIDFactory.java:1499)
at com.gemstone.gemfire.internal.DSFIDFactory.create(DSFIDFactory.java:297)
at com.gemstone.gemfire.internal.InternalDataSerializer.readDSFID(InternalDataSerializer.java:2524)
at com.gemstone.gemfire.internal.tcp.Connection.processNIOBuffer(Connection.java:3463)
at com.gemstone.gemfire.internal.tcp.Connection.runNioReader(Connection.java:1773)
at com.gemstone.gemfire.internal.tcp.Connection.run(Connection.java:1654)
at java.lang.Thread.run(Thread.java:722)
[warning 2013/01/18 10:57:52.394 MST Spring Integration GemFire World <localhost-startStop-1> tid=0x14] 15 seconds have elapsed while waiting for replies: <UpdateAttributesProcessor$UpdateAttributesReplyProcessor 2 waiting for 1 replies from [nanodbserver(4447)<v0>:3891/55414]> on nanodbserver(20327)<v33>:33105/54050 whose current membership list is: [[nanodbserver(4447)<v0>:3891/55414, nanodbserver(20327)<v33>:33105/54050]]
Entry destroyed exception
Hi,
In application, When replicated region is used, some of the entries are scheduled to expire in future. Currently ExpirationAttributes used to expire the entry in future. I beleive this attribute also replicated to other members. Entries are expirying as expected. But when these entries are expired, they are also expired in other replicated members (node) at the same time.
But this expiry itself replicated to other members and fails with exception "Entry destroyed". How to handle this scenario?
Thanks
Databrowser on client not able to connect to Gemfire 7
I have successfully installed gemfire 7 on my cache server and able to start the locator process with jmx-manager.i am also able to connect to that jmx-manager through the gfsh console.But with new Databrowser on my local machine , i am not able to connect to the locator.
---------------------------
GemFire DataBrowser - Connection Error
---------------------------
Following error occurred when attempting to connect to the GemFire Distributed System.
Failed to connect to the GemFire Locator/JMX Manager at [HOST:50001]. Please verify if the GemFire Locator/JMX Manager is running.
---------------------------
OK
---------------------------
Please let me know if there is any specific requirements for using Databrowsr on machine other than on which gemfire is installed in Gemfire 7 ?
Delete Overflow files
Hi
I have a region configured to overflow to disk based on memory limits. We're running tight on disk space now and I'm looking for files to delete.
looking at the documentation it appears only the latest overflow file is used by Gemfire, so with that in mind would it be safe to delete files OVERFLOWhistoricalDataInstanceDiskStore_1 and OVERFLOWhistoricalDataInstanceDiskStore_2 whilst the cluster is still running?
Transaction and ALLOW_PERSISTENT_TRANSACTIONS
Hi,
There is not much documentation available about ALLOW_PERSISTENT_TRANSACTIONS. Is it safe to use? can't we use persistence and transaction together?
What is the impact if ALLOW_PERSISTENT_TRANSACTIONS=true, when persistence was already enabled?
Regards
Document about region attribute refid.
Hi,
Where can I find list of all possible values for refid. I came across quite a few attributes like REPLICATE, CACHING_PROXY, PARTITION. But I could n't find list of all possible values and description.
If they are pre-configured attributes, can I find them inside any of the jar file?
Example : RefId
<region-attributes refid="CACHING_PROXY" statistics-enabled="true">
</region-attributes>
Thanks
The function is not registered for function id TopTenListFunction
Hi,
I am trying to get up and running function related sample. Usually it works. But I need to ensure, function always executed strictly in the server. Hence I have two different JVM
1) Server VM
<cache>
<cache-server port="40404" />
<region name="exampleRegion">
<region-attributes refid="REPLICATE">
</region-attributes>
</region>
<function-service>
<function>
<class-name>testcache.TopTenListFunction</class-name>
</function>
</function-service>
</cache>
2) System.out.println("Functions...\n" + Arrays.deepToString(FunctionService.getRegisteredFunctions().keySet().toArray())); - This line in server process confirms that there is function registered in the server with id "testcache.TopTenListFunction"
3) Trying to execute using client cache JVM
<client-cache>
<pool name="client" subscription-enabled="true">
<server host="localhost" port="40404" />
</pool>
<region name="exampleRegion">
<region-attributes refid="PROXY">
</region-attributes>
</region>
</client-cache>
4) Invoking function using..
ClientCache clientCache = new ClientCacheFactory()
.set("name", "ClientWorker")
.set("cache-xml-file", "xml2/FunctionClient.xml").create();
Execution execution = FunctionService.onServer(clientCache)
.withArgs(Boolean.TRUE)
.withCollector(new MyArrayListResultCollector());
ResultCollector rc = execution.execute("nikias.testcache.TopTenListFunction");
But what I get is exception like below..
Exception in thread "main" com.gemstone.gemfire.cache.client.ServerOperationException: The function is not registered for function id testcache.TopTenListFunction
at com.gemstone.gemfire.cache.client.internal.AbstractOp.processObjResponse(AbstractOp.java:281)
at com.gemstone.gemfire.cache.client.internal.GetFunctionAttributeOp$GetFunctionAttributeOpImpl.processResponse(GetFunctionAttributeOp.java:38)
at com.gemstone.gemfire.cache.client.internal.AbstractOp.attemptReadResponse(AbstractOp.java:160)
at com.gemstone.gemfire.cache.client.internal.AbstractOp.attempt(AbstractOp.java:361)
at com.gemstone.gemfire.cache.client.internal.ConnectionImpl.execute(ConnectionImpl.java:233)
at com.gemstone.gemfire.cache.client.internal.pooling.PooledConnection.execute(PooledConnection.java:323)
at com.gemstone.gemfire.cache.client.internal.OpExecutorImpl.executeWithPossibleReAuthentication(OpExecutorImpl.java:894)
at com.gemstone.gemfire.cache.client.internal.OpExecutorImpl.execute(OpExecutorImpl.java:145)
at com.gemstone.gemfire.cache.client.internal.OpExecutorImpl.execute(OpExecutorImpl.java:106)
at com.gemstone.gemfire.cache.client.internal.PoolImpl.execute(PoolImpl.java:623)
at com.gemstone.gemfire.cache.client.internal.GetFunctionAttributeOp.execute(GetFunctionAttributeOp.java:19)
at com.gemstone.gemfire.internal.cache.execute.ServerFunctionExecutor.execute(ServerFunctionExecutor.java:314)
at nikias.testcache.FunctionClient.main(FunctionClient.java:88)
Q1) Is the below line is causing issue? I am passing clientCache instead of server reference? if so, How to pass the reference of the server?
Execution execution = FunctionService.onServer(clientCache)
.withArgs(Boolean.TRUE)
.withCollector(new MyArrayListResultCollector());
ResultCollector rc = execution.execute("testcache.TopTenListFunction");
Q2) if server refid="REPLICATE", what could be my client-cache refid, so I could ensure, function executed on the server?
Q3) How to ensure function executed by CacheServer? i.e, Ensure executed by other than the JVM which invokes the function?
Please note I have one eclipse project on windows, so I can't reduce visibility in the classpath scope
Regards
LIKE query with parameter binding
Using parametr binding with LIKE query returns an empty result set,even if the match should succeed.
Example : SELECT * FROM /people WHERE name LIKE 'alex%'
returns all People whose name start with alex
doing this :
SELECT * FROM /people WHERE name LIKE '$1'
execute(new Object[]{'alex%'})
returns an empty set
gemfire server version is: 7.0.0.2
GemFire Not Reading gemfire.properties As Expected
Hello,
I'm working with the SpringTrader reference application and am having trouble getting it to read the gemfire.properties file.
Environment : CentOS 6.3, tcServer 2.7.2 (tomcat 7), jdk 1.6.0_38
The initial problem was the gemfire.properties contained within a jar in the deployed war took precedence. I had to remove gemfire.propertes from the jar for it to use an external gemfire.properties. This was a pain because the SpringTrader tests use gemfire and without the properties file, the tests fail. So I had to comment out the tests to create a war file.
The only way I could get it to recognize an external gemfire.properties was to specify the directory containing the file on the CLASSPATH. I tried to specify it on the command via -DgemfirePropertyFile=<absolution path to file>/gemfire.properites to no avail. Here the command, an "ls" proving the file exists and the stack trace from the log file indicating the file cannot be found. What am I missing?
root 42417 1 44 09:53 pts/1 00:00:30 /usr/java/latest/bin/java -Djava.util.logging.config.file=/opt/vmware/vfabric-tc-server-standard/springtrader/conf/logging.properties -DgemfirePropertyFile=/opt/vmware/vfabric-tc-server-standard/springtrader/conf/gemfire.properties -Xmx1024m -Xss192K -XX:MaxPermSize=192m -Djava.util.logging.manager=com.springsource.tcserver.serviceability.logging.TcServerLogManager -Djava.endorsed.dirs=/opt/vmware/vfabric-tc-server-standard/tomcat-7.0.30.A.RELEASE/endorsed -classpath /opt/vmware/vfabric-tc-server-standard/tomcat-7.0.30.A.RELEASE/bin/bootstrap.jar:/opt/vmware/vfabric-tc-server-standard/tomcat-7.0.30.A.RELEASE/bin/tomcat-juli.jar -Dcatalina.base=/opt/vmware/vfabric-tc-server-standard/springtrader -Dcatalina.home=/opt/vmware/vfabric-tc-server-standard/tomcat-7.0.30.A.RELEASE -Djava.io.tmpdir=/opt/vmware/vfabric-tc-server-standard/springtrader/temp org.apache.catalina.startup.Bootstrap start
[root@nanodbserver vfabric-tc-server-standard]# ls /opt/vmware/vfabric-tc-server-standard/springtrader/conf/gemfire.properties
/opt/vmware/vfabric-tc-server-standard/springtrader/conf/gemfire.properties
Problem starting Gemfire 7 locator
I'm attempting to start a single Gemfire 7 locator on a CentOS VM and the startup seems to be hanging at some point. I'm using the following command for startup: gemfire start-locator -port=20003 After running this command I never get the Started message that I get when starting a Gemfire 6 locator (on the same VM) and the command never returns to the shell prompt. If I run gemfire status-locator I get the Starting message. I upped the log-level to fine and attached the locator.log. I've also attached my gemfire.properties file (I didn't change much from defaults). Am I missing something?
Detecting existing DS or Cache in VM
There was a thread on this from July but I'm unable to reply to it anymore so here goes.
http://communities.vmware.com/thread/411610
I would also like an answer to this. The problem seems to be with DistributedSystem.connect which can only be called once (or it throws IllegalStateException) but there is no way to check whether it's been called already.
java.lang.IllegalStateException: A connection to a distributed system already exists in this VM. It has the following configuration:
ack-severe-alert-threshold="0"
ack-wait-threshold="15"
What is the proper way to detect an already initialized DS?
Testing a custom PdxSerializer
I've written a custom PdxSerializer implementation to use in my Gemfire cache and I was wondering how I can get Gemfire to invoke my custom serializer in my integration tests. I have a local Gemfire cache set up which has an instance of my custom PdxSerializer but when I do a put into this local cache the serializer is not invoked. I understand that this is because serialization is not guanteed to happen in every scenario but my question is how can I guarantee the serializer being invoked for my tests? I have worked around the issue in the past by setting up an external cache-server and then running my tests with a client-cache with the data-policy set to "empty". This setup invoked the serializer but was not ideal for a self contained test. Is there a configuration that you can recommend where I can achieve a self contained test where my serializer is invoked? Alternatively, is it possible that I could use some of the internal Gemfire API's to artificially invoke the serializer without setting up a cache instance? Thanks!
Gemfire Error -Since a cache already existed a pool should also exist
I am getting the below error on client side while creating a cache object via ClientCacheFactory.
Caused by: java.lang.IllegalStateException: Since a cache already existed a pool should also exist.
at com.gemstone.gemfire.internal.cache.GemFireCacheImpl.determineDefaultPool(GemFireCacheImpl.java:2255)
at com.gemstone.gemfire.cache.client.ClientCacheFactory.basicCreate(ClientCacheFactory.java:194)
at com.gemstone.gemfire.cache.client.ClientCacheFactory.create(ClientCacheFactory.java:161)
Although the error goes away with a sequential restart of cache server and client.Please suggest how to avoid this.
Regards,
GemFire integration with Informatica
Hi,
I am intetersted in hearing any use cases of people integrating GemFire with Informatica. I can imagine it would be used to provide high performance ETL for example. There maybe other use cases out there. Please share if you can.
thanks..
Lawrence.
GemFire 7, PDX and ClassCastException
I'm running a fairly simple region. Or I thought I was...
Key is a Long.
Value is a custom class. Inside value class is a few member variables and a set of attributes modelled as a TreeSet (which is there for ordering).
There are a half dozen possible attributes, each subclassed from a common root. Each implements Comparable<Root>.
Region is PDX serialized.
I implement PdxSerializable in ~all~ the classes that can be in the value.
Regular gets and puts work fine. Region loads fine. All looks good until I start with the OQL....
When I try to execute a query such as the one below (using spring-data and a GemfireTemplate) I'm getting a ClassCastException server side.
Debugging has me in the TreeMap.put<K,V) code @542 - Comparable<? super K> k = (Comparable<? super K>) key;
The query is not complicated: SELECT DISTINCT a.value FROM /(myregion).entries a WHERE a.key = $1; Here $1 is just 1L.
My question(s):
Is there some strangeness with TreeSet and PDX I don't know about?
Or did I misunderstand something?
If so can anyone help me see what?
If not and it is a limitation, is there a workaround?
Clearly this is something silly, but I'm not a PDX expert so I'm not sure what I missed.
Any ideas anyone?