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
depth
rsa
youtube-data-api-v3
battery
mstest
shiro
knitr
nsbundle
simulink
rds
x264
retrofit2
p2p
g++
jquery-ui-sortable
watson-conversation
windows-ce
scrolltop
gruntfile
keytool
forgot-password
ios10.2
postscript
beta
motion-detection
exchangewebservices
openmdao
user-defined-functions
uitapgesturerecognizer
winpe
sqsh
finagle
autolisp
jwplayer6
hivemq
playframework-2.1
dm-script
reactivekit
flatmap
password-protection
gdata
css-position
metawidget
kill
watchface
apriori
datacachefactory
plr
logback-groovy
facebook-social-plugins
jide
jboss-4.2.x
netbeans6.8
opengl-4
git-flow
check-mk
oozie-coordinator
objectscript
android-instrumentation
google-cloud-console
refinerycms
omniauth-facebook
kiosk
qbxml
asyncdisplaykit
character-replacement
ons-api
lasso
wso2greg
entity-framework-4.3
rrule
umlgraph
java-security
cryptographichashfunction
viewer
ssis-data-flow
rickshaw
genymotion-call
named-parameters
xml-dsig
functional-java
mutual-authentication
terminate
renderer
extjs2
menubar
ecslidingviewcontroller
spring-3
ora-06550
scriptaculous
gd-graph
http-patch
dtmf
neos-server
mvc-editor-templates
font-awesome-4.0.0
wp7test
sentestingkit
xcode3.2
veracity
subproject
database-create
predicatebuilder
node-redis
saxparseexception
massive
cdonts
message-passing
opml
echo3
interop-domino
fail-fast-fail-early
fdf
int64

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile