Hi all,
I'm new to Cassandra and Hector, and I have a doubt about managing clusters.
I have installed a test environment in windows and executed the Datastax installer.
Cassandra starts and works perfectly, I also run opsCenter, and I can see that the Cluster is named "Test Cluster".
Now I do the following (in a java class):
cluster = HFactory.getOrCreateCluster("My Cluster", "localhost:9160");
logger.log(Level.INFO, "Found Cluster named: {0}", cluster.getName());
I thought that Hector would thrown an error, as I'm trying to open a cluster with the wrong name. But, unexpectedly (at least for me), everything works fine, and the name reported in the log is "My Cluster".
This behavior is not clear to me, in particular, if it works like that, why should we pass the cluster name to the getOrCreateCluter function?
I'm rather confused, any help is appreciated.
Thanks in advance,
Giorgio
