aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreshujiushiwo <378013446@qq.com>2016-11-28 15:01:04 +0800
committerGitHub <noreply@github.com>2016-11-28 15:01:04 +0800
commit809aa028ec7be5c6f19945d81d3b3456780b2bc2 (patch)
tree68821f8c0754c7f262d6e70baa056adc0c5aa319
parent89ccb6be05a82631377ddbdbe117df51958bbbf1 (diff)
downloadseaweedfs-809aa028ec7be5c6f19945d81d3b3456780b2bc2.tar.xz
seaweedfs-809aa028ec7be5c6f19945d81d3b3456780b2bc2.zip
fix the connection of cassandra
fix the connection of cassandra ,let filer can connect to multi cassandra nodes which are in the one cluster
-rw-r--r--weed/filer/cassandra_store/cassandra_store.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/weed/filer/cassandra_store/cassandra_store.go b/weed/filer/cassandra_store/cassandra_store.go
index 3005fead9..0431872fa 100644
--- a/weed/filer/cassandra_store/cassandra_store.go
+++ b/weed/filer/cassandra_store/cassandra_store.go
@@ -2,7 +2,7 @@ package cassandra_store
import (
"fmt"
-
+ "strings"
"github.com/chrislusf/seaweedfs/weed/filer"
"github.com/chrislusf/seaweedfs/weed/glog"
@@ -34,11 +34,8 @@ func NewCassandraStore(keyspace string, hosts ...string) (c *CassandraStore, err
c = &CassandraStore{}
s := strings.Split(hosts, ",")
if len(s) == 1 {
- fmt.Println("000")
c.cluster = gocql.NewCluster(hosts...)
} else if len(s) > 1 {
- fmt.Println("111",s[0])
- fmt.Println("222",s[1])
c.cluster = gocql.NewCluster(s[0], s[1])
}
c.cluster.Keyspace = keyspace