Mercurial > hg > Members > tatsuki > bbs
diff src/main/java/jp/ac/u_ryukyu/ie/cr/bbs/local/HectorSample.java @ 4:5acde010c6db
add jungle browsing system
author | tatsuki |
---|---|
date | Tue, 28 Jun 2016 19:45:55 +0900 |
parents | 64a72a7a0491 |
children |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/bbs/local/HectorSample.java Mon Jun 27 05:25:48 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/bbs/local/HectorSample.java Tue Jun 28 19:45:55 2016 +0900 @@ -5,7 +5,8 @@ import me.prettyprint.cassandra.service.template.SuperCfUpdater; import me.prettyprint.cassandra.service.template.ThriftSuperCfTemplate; import me.prettyprint.cassandra.utils.TimeUUIDUtils; -import me.prettyprint.hector.api.*; +import me.prettyprint.hector.api.Cluster; +import me.prettyprint.hector.api.Keyspace; import me.prettyprint.hector.api.beans.*; import me.prettyprint.hector.api.factory.HFactory; import me.prettyprint.hector.api.query.QueryResult; @@ -22,6 +23,11 @@ Cluster myCluster = HFactory.getOrCreateCluster("test-cluster","localhost:9160"); Keyspace ksp = HFactory.createKeyspace("cassaBBS",myCluster); + /* + ColumnFamilyDefinition newCF = HFactory.createColumnFamilyDefinition("DEMO","ccc",ComparatorType.UUIDTYPE); + newCF.setColumnType(ColumnType.SUPER); + myCluster.addColumnFamily(newCF); + */ ThriftSuperCfTemplate<String,UUID,String> template = new ThriftSuperCfTemplate<String,UUID,String>(ksp,"boards",StringSerializer.get(),