phantom-dsl

    0熱度

    1回答

    我想使用幻像來處理我的卡桑德拉 這是我的例子來學習怎麼用幻影(感謝蒂亞戈) https://github.com/thiagoandrade6/cassandra-phantom 我可以成功運行'SongTest'。 但我在我的scala主對象中運行database.create有些麻煩。 'scalatest'中的相同代碼已成功運行。但在我的Scala主要對象中,它失敗了。 這是我的源代碼 pa

    0熱度

    1回答

    我想插入數據到我的Cassandra表中,然後從列「user_id」而不是完整的ResultSet返回值。這裏是我的代碼片段: def create(user: User): Future[UUID] = { insert .value(_.id, user.id) .value(_.email, user.email) .value(_.name,

    0熱度

    1回答

    Phantom DSL中是否有方法指定每個分區緩存的行數?我可以這樣做: .create.ifNotExists()。 with(緩存方程Cache.RowsOnly()) 但我不能找到辦法如何指定比如緩存條件:所有鍵+每個分區500行。

    0熱度

    1回答

    從 http://outworkers.com/blog/post/a-series-on-phantom-part-1-getting-started-with-phantom 我試圖連接到具有這樣的多個節點集羣卡桑德拉摘自: object Defaults { val hosts = Seq("Cassnode1.company.com", "Cassnode2.company.c

    0熱度

    1回答

    我試圖從外包工phantom維基上的佈局tut。 我使用的是測試模型: case class User (id: String, name: String, friends: List[String]) 有: import com.websudos.phantom.dsl._ class Users extends CassandraTable[Users, User] { ob

    1熱度

    2回答

    以下指南here我嘗試爲嵌入式存儲的Cassandra構建測試套件。但是,當我運行sbt test時出現以下錯誤: Error connecting to localhost/127.0.0.1:9142 (Connection refused: localhost/127.0.0.1:9142)。 因此,這裏是我的代碼(我把所有的拼在一起): case class User( id: S

    0熱度

    1回答

    Cassandra完全新增。嘗試使用phantom-dsl初始化Cassandra中的數據庫。我收到了這個錯誤信息。 *** RUN ABORTED *** java.lang.AssertionError: assertion failed: no symbol could be loaded from class com.datastax.driver.core.Cluster in

    1熱度

    1回答

    這是設置默認(讀寫)一致性水平 val connector: KeySpaceDef = ContactPoints(hosts, port).withClusterBuilder { builder => builder.withQueryOptions(new QueryOptions().setConsistencyLevel(ConsistencyLevel.QUORUM)) }.keyS

    0熱度

    1回答

    我想定義一個新的列/轉換器將一個案例類編組爲一個基元類型,並使用幻影dsl再次回來。 在光滑3.1.1我可以很容易地做到這一點: implicit val idTypeMapper = MappedColumnType.base[Id, Long]( { (v) ⇒ v.value }, { (s) ⇒ Id(s) } ) 這讓我在光滑的查詢中使用Id的任何地方,它會隱式轉

    1熱度

    1回答

    當我們增加一個查詢中每行更新的列數時,cassandra性能會增加還是下降。 說,我們有一個表組(例如FB組),這approches是最好的: 1 /表集團(的groupId詮釋,名稱的字符串,成員地圖(用戶ID - >角色)) 或 2 /表集團(的groupId詮釋,名稱的字符串,管理員設置[INT],主持人設置[INT],simpleMembers設置[INT]) 我們假設一個用戶都可以有主持