phantom-dsl


Connecting to Cassandra on startup, and monitoring session health


Two related questions
1) Currently, the session to C* is established in a lazy fashion - aka, only on the first any table is accessed.
Instead, we would like to establish a session as soon as the application is started (in case there is a connectivity problem, etc. ). What would be the best way to do that? Should I just get a session object in my startup code?
connector.provider.session
2) How would I then monitor the health of the connection? I could call
connector.provider.session.isClosed()
but I'm not sure it will do the job.
I wouldn't manually rely on that mechanism per say as you may want to get more metrics out of the cluster, for which purpose you have native JMX support, so through the JMX protocol you can look at metrics in more detail.
Now obviously you have OpsCenter which natively leverages this feature, but alternatively you can use a combination of a JMX listener with something like Graphana(just a thought) or whatever supports native compatibility.
In terms of low level methods, yes, you are on the money:
connector.provider.session.isClosed()
But you also have heartbeats that you can log and look at and so on. There's more detail here.

Related Links

Phantom's generated `store` method throws a ClassCastException at runtime
Connecting to Cassandra on startup, and monitoring session health
How do I query an optional column with a secondary index using phantom?
How to clean up RootConnector in phantom-dsl?
Phantom Cassandra batch insert

Categories

HOME
sonarqube
notepad++
go
phpmyadmin
graphics
vscode-extensions
tivoli
cakephp-3.4
babeljs
x264
retrofit2
vert.x
character
barcode
elasticsearch-5
fosrestbundle
pega
siddhi
openbugs
altera
http-post
jersey-1.0
smartclient
ksh
libigl
flask-sqlalchemy
comparator
jboss6.x
itunes
fat
corpus
asymptotic-complexity
nstimer
progress-bar
android-things
comparable
gp
sqlpackage
mockjax
database-comparison
turfjs
quickfixj
biztalk-rule-engine
getpixel
pop3
alphabetical
zoomify
nohup
outputcache
angular-http
stylecop
jboss-4.2.x
builder
activeperl
trojan
filehandle
sundials
reshape
branch-prediction
javafx-css
vcloud-director-rest-api
rocks
ziparchive
xcode-server
lrs
spring-cloud-feign
windows-azure-queues
jodd
refinerycms
tracker-enabled-dbcontext
kiosk
phonertc
google-refine
telepat
aspectj-maven-plugin
cryptographichashfunction
viewer
big-ip
universal-image-loader
terminate
renderer
drupal-nodes
accesscontrolexception
openargs
gtm-oauth2
isqlquery
inappsettingskit
jquery-1.9
mantle
boost-signals
apache-commons-dbutils
agility.js
jquery-tools
drawtobitmap
massive
codebase
interop-domino
httpcookie
wcf-proxy
appliance
netbeans6.1

Resources

Encrypt Message