public async Task <IActionResult> Run(
            [HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = "CreateCat")] HttpRequest req)
        {
            cass.ISession session     = _cluster.Connect(_config[Constants.KEYSPACE_NAME]);
            IMapper       mapper      = new Mapper(session);
            IActionResult returnValue = null;

            try
            {
                string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
                var    input       = JsonConvert.DeserializeObject <Cat>(requestBody);

                var cat = new Cat()
                {
                    cat_id   = Guid.NewGuid().ToString(),
                    cat_name = input.cat_name,
                    cat_type = input.cat_type,
                    cat_age  = input.cat_age
                };

                mapper.Insert <Cat>(cat);
                returnValue = new OkObjectResult(cat);
            }
            catch (Exception ex)
            {
                _logger.LogError($"Could not insert new cat. Exception thrown: {ex.Message}");
                returnValue = new StatusCodeResult(StatusCodes.Status500InternalServerError);
            }

            return(returnValue);
        }
Example #2
0
 /// <summary>
 /// Creates the schema that it is going to be used in the samples.
 /// It is grouped into a helper to let the other classes to be cleaner.
 /// </summary>
 public static void CreateSchema(Cluster cluster)
 {
     //This part is not important for the sample purpose.
     //TL;DR
     var session = cluster.Connect();
     CreateKeyspace(session);
     CreateTimeSeriesTable(session);
     CreateForumTables(session);
 }
 public void Connect(String node)
 {
     _cluster = Cluster.Builder()
         .AddContactPoint(node).Build();
     Metadata metadata = _cluster.Metadata;
     Console.WriteLine("Connected to cluster: "
         + metadata.ClusterName.ToString());
     _session = _cluster.Connect();
      
 }
 private ISession GetOrCreateSession(Cluster cluster, string keySpace)
 {
     ISession session;
     if (!_sessions.TryGetValue(cluster, out session))
     {
         session = cluster.Connect(keySpace);
         _sessions.TryAdd(cluster, session);
     }
     return session;
 }
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         _cluster = Cluster.Builder().AddContactPoint("127.0.0.1").Build();
         _session = _cluster.Connect("demo");
         EscribirEnConsola("Conexión establecida correctamente");
     }
     catch(Exception ex)
     {
         EscribirEnConsola("Error al conectar con Cassandra. \n" + ex.Message);
     }
 }
Example #6
0
            private CCMCluster(CCMBridge ccmBridge, Builder builder)
            {
                int tryNo = 0;

                builder.AddContactPoints(Options.Default.IP_PREFIX + "1");
                if (Options.Default.USE_COMPRESSION)
                {
                    builder.WithCompression(CompressionType.Snappy);
                    Console.WriteLine("Using Compression");
                }
                if (Options.Default.USE_NOBUFFERING)
                {
                    builder.WithoutRowSetBuffering();
                    Console.WriteLine("No buffering");
                }

                this.Cluster = builder.Build();
RETRY:
                this.CCMBridge = ccmBridge;
                try
                {
                    this.Session = Cluster.Connect();
                    if (tryNo > 0)
                    {
                        Cluster.RefreshSchema();
                    }
                }
                catch (NoHostAvailableException e)
                {
                    if (tryNo < 10)
                    {
                        Console.WriteLine("CannotConnect to CCM node - give another try");
                        tryNo++;
                        Thread.Sleep(1000);
                        goto RETRY;
                    }
                    foreach (var entry in e.Errors)
                    {
                        Trace.TraceError("Error connecting to " + entry.Key + ": " + entry.Value);
                    }
                    throw new InvalidOperationException(null, e);
                }
            }
Example #7
0
        void InitializeTenant(string tenant)
        {
            if (string.IsNullOrEmpty(tenant))
            {
                throw new ArgumentNullException(nameof(tenant));
            }

            string tenantPrefix = hasTenantsDefined ? $"{tenant}_" : string.Empty;
            var    keyspace     = $"{tenantPrefix}{settings.Keyspace}";

            if (keyspace.Length > 48)
            {
                throw new ArgumentException($"Cassandra keyspace exceeds maximum length of 48. Keyspace: {keyspace}");
            }

            DataStaxCassandra.Cluster cluster = null;
            if (ReferenceEquals(null, settings.Cluster))
            {
                cluster = DataStaxCassandra.Cluster
                          .Builder()
                          .WithReconnectionPolicy(settings.ReconnectionPolicy)
                          .WithRetryPolicy(settings.RetryPolicy)
                          .WithConnectionString(settings.ConnectionString)
                          .Build();
            }
            else
            {
                cluster = settings.Cluster;
            }

            var session        = cluster.Connect();
            var storageManager = new CassandraEventStoreStorageManager(session, keyspace, settings.EventStoreTableNameStrategy, settings.ReplicationStrategy);

            storageManager.CreateStorage();
            session.ChangeKeyspace(keyspace);
            var    serializer = builder.Container.Resolve <ISerializer>();
            string bc         = (this.settings as EventStore.Config.IEventStoreSettings).BoundedContext;
            var    eventStore = new CassandraEventStore(settings.BoundedContext, session, settings.EventStoreTableNameStrategy, serializer, settings.WriteConsistencyLevel, settings.ReadConsistencyLevel);
            var    player     = new CassandraEventStorePlayer(session, settings.EventStoreTableNameStrategy, bc, serializer);

            tenantStores.Add(tenant, eventStore);
            tenantPlayers.Add(tenant, player);
        }
 public static void CreateCluster()
 {
     erroredOut       = false;
     schemaCreated    = false;
     cassandraCluster = CCMBridge.Create("test", 1);
     try
     {
         cluster = Cluster.Builder().AddContactPoints(IP_PREFIX + "1").Build();
         session = cluster.Connect();
     }
     catch (NoHostAvailableException e)
     {
         erroredOut = true;
         foreach (var entry in e.Errors)
         {
             Trace.TraceError("Error connecting to " + entry.Key + ": " + entry.Value);
         }
         throw new InvalidOperationException("", e);
     }
 }
Example #9
0
 public static void CreateCluster()
 {
     erroredOut = false;
     schemaCreated = false;
     cassandraCluster = CCMBridge.Create("test", 1);
     try
     {
         cluster = Cluster.Builder().AddContactPoints(IP_PREFIX + "1").Build();
         session = cluster.Connect();
     }
     catch (NoHostAvailableException e)
     {
         erroredOut = true;
         foreach (var entry in e.Errors)
             Trace.TraceError("Error connecting to " + entry.Key + ": " + entry.Value);
         throw new InvalidOperationException("", e);
     }
 }
Example #10
0
 public CCMCluster(CCMBridge cassandraCluster, Builder builder)
 {
     int tryNo = 0;
     this.Cluster = builder.AddContactPoints(IP_PREFIX + "1").Build();
     RETRY:
     this.CassandraCluster = cassandraCluster;
     try
     {
         this.Session = Cluster.Connect();
         if(tryNo>0)
             Cluster.RefreshSchema();
     }
     catch (NoHostAvailableException e)
     {
         if (tryNo < 10)
         {
             Console.WriteLine("CannotConnect to CCM node - give another try");
             tryNo++;
             Thread.Sleep(1000);
             goto RETRY;
         }
         foreach (var entry in e.Errors)
             Trace.TraceError("Error connecting to " + entry.Key + ": " + entry.Value);
         throw new InvalidOperationException(null, e);
     }
 }
Example #11
0
            public static void CreateCluster()
            {
                erroredOut = false;
                schemaCreated = false;
                cassandraCluster = CCMBridge.Create("test", 1);
                try
                {
                    var builder = Cluster.Builder().AddContactPoints(Options.Default.IP_PREFIX + "1");
                    if (Options.Default.USE_COMPRESSION)
                    {
                        builder.WithCompression(CompressionType.Snappy);
                        Console.WriteLine("Using Compression");
                    }
                    if (Options.Default.USE_NOBUFFERING)
                    {
                        builder.WithoutRowSetBuffering();
                        Console.WriteLine("No buffering");
                    }

                    cluster = builder.Build();
                    session = cluster.Connect();
                }
                catch (NoHostAvailableException e)
                {
                    erroredOut = true;
                    foreach (var entry in e.Errors)
                        Trace.TraceError("Error connecting to " + entry.Key + ": " + entry.Value);
                    throw new InvalidOperationException("", e);
                }
            }
Example #12
0
            private CCMCluster(CCMBridge ccmBridge, Builder builder)
            {
                int tryNo = 0;
                builder.AddContactPoints(Options.Default.IP_PREFIX + "1");
                if (Options.Default.USE_COMPRESSION)
                {
                    builder.WithCompression(CompressionType.Snappy);
                    Console.WriteLine("Using Compression");
                }
                if (Options.Default.USE_NOBUFFERING)
                {
                    builder.WithoutRowSetBuffering();
                    Console.WriteLine("No buffering");
                }

                this.Cluster = builder.Build();
                RETRY:
                this.CCMBridge = ccmBridge;
                try
                {
                    this.Session = Cluster.Connect();
                    if(tryNo>0)
                        Cluster.RefreshSchema();
                }
                catch (NoHostAvailableException e)
                {
                    if (tryNo < 10)
                    {
                        Console.WriteLine("CannotConnect to CCM node - give another try");
                        tryNo++;
                        Thread.Sleep(1000);
                        goto RETRY;
                    }
                    foreach (var entry in e.Errors)
                        Trace.TraceError("Error connecting to " + entry.Key + ": " + entry.Value);
                    throw new InvalidOperationException(null, e);
                }
            }
        public void Open()
        {
            cluster = Cluster.Builder().AddContactPoint("127.0.0.1").Build();
            session = cluster.Connect("filewatch");
Example #14
0
 public void Initialize()
 {
     _cluster = Cluster.Builder().AddContactPoint("127.0.0.1").Build();
     _session = _cluster.Connect("local");
 }
        private int m_ttl = 2592000; //1 month

        #endregion

        #region IApplicationPlugin Members

        public void Initialize(OpenSimBase openSim)
        {
            IConfig config = openSim.ConfigSource.Source.Configs["ChatLogModule"];
            if (config == null) return;

            m_enabled = config.GetBoolean("Enabled", false) && config.GetString("Backend", "") == "Cassandra12Backend";
            m_debug = config.GetBoolean("Debug", m_debug);
            m_ttl = config.GetInt("TTL", m_ttl);

            Q_INS_TTL = Q_INSERT + m_ttl.ToString() + ";";

            if (m_enabled)
            {
                ExtractSeedNodesFromConfig(config);

                var clusterb = Cluster.Builder();

                foreach (string node in m_seedNodes)
                {
                    if (m_debug) m_log.DebugFormat("[CHATLOG.Cassandra]: Adding seed node {0}", node);
                    clusterb.AddContactPoint(node);
                }

                clusterb.WithDefaultKeyspace(KEYSPACE);
                
                m_cluster = clusterb.Build();
                m_session = m_cluster.Connect();

                ProviderRegistry.Instance.RegisterInterface<IChatMessageLogBackend>(this);
            }
        }
Example #16
0
            private CCMCluster(CCMBridge cassandraCluster, Builder builder)
            {
                this.CassandraCluster = cassandraCluster;
                try
                {
                    this.Cluster = builder.AddContactPoints(IP_PREFIX + "1").Build();
                    this.Session = Cluster.Connect();

                }
                catch (NoHostAvailableException e)
                {
                    foreach (var entry in e.Errors)
                        Trace.TraceError("Error connecting to " + entry.Key + ": " + entry.Value);
                    throw new InvalidOperationException(null, e);
                }
            }
Example #17
0
        public static void SetUpKeySpaces(Cluster c)
        {
            try
            {
                Console.WriteLine("====================="); Console.WriteLine("=====================");
                Console.WriteLine("STARTING TO SETUP KEY SPACES");
                Console.WriteLine("====================="); Console.WriteLine("=====================");

                String createkeyspace = "create keyspace if not exists maltmusic WITH replication = {'class':'SimpleStrategy', 'replication_factor':1}";
                String createUserProfile = "CREATE TABLE if not exists maltmusic.userprofiles (\n"
                    + "User_ID text PRIMARY KEY,\n"
                    + "password text,\n"
                    + "bio text,\n"
                    + "first_name text,\n"
                    + "last_name text,\n"
                    + "email text,\n"
                    + "profpic  UUID);";

                String createTracks = "create table if not exists maltmusic.tracks (\n"
                    + "Track_ID UUID, \n"
                    + "track_Name text,\n"
                    + "artist text,\n"
                    + "album text,\n"
                    + "year int, \n"
                    + "length int, \n"
                    + "genre text,\n"
                    + "file_loc text,\n"
                    + "PRIMARY KEY (Track_ID, artist, album, year, genre))";

                String createPlaylist = " create table if not exists maltmusic.playlist(\n"
                    + "Playlist_ID UUID,\n"
                    + "Track_ID UUID,\n"
                    + "Track_Pos int,\n"
                    + "PRIMARY KEY (Playlist_ID, Track_ID))";

                String createVotes = "create table if not exists maltmusic.votecount(\n"
                    + " track_ID UUID Primary Key, \n"
                    + " playcount counter,\n"
                    + "upvotes counter,\n"
                    + "downvotes counter)";

                String createListPlaylist = "create table  if not exists maltmusic.list_playlist(\n"
                    + "playlist_id UUID,\n"
                    + "owner text,\n"
                    + "playlist_name text,"
                    + "PRIMARY KEY (playlist_ID, owner,playlist_name)\n"
                    + ")";

                String createUserVotes = "create table if not exists maltmusic.user_votes(\n"
                    + " track_ID UUID,\n"
                    + " voter text, \n"
                    + " howvoted text,\n"
                    + " Primary Key (track_id, voter)\n"
                    + " ); ";

                String trackTags = "create table if not exists maltmusic.weathertags(\n"
                    + " track_ID UUID Primary Key,\n"
                    + " tags set<text> \n"
                    + " ); ";

                String CreateImage = "CREATE TABLE if not exists maltmusic.images (" +
                " user_id text," +
                " timeadded timestamp," +
                " image blob," +
                " imagelength int," +
                " PRIMARY KEY (user_id,timeadded)" +
                ") WITH CLUSTERING ORDER BY (timeadded DESC);";

                //Cluster cluster = Cluster.Builder().AddContactPoint("127.0.0.1").Build();
                ISession session = c.Connect();

                try {
                    PreparedStatement statement = session.Prepare(createkeyspace);
                    BoundStatement bs = new BoundStatement(statement);
                    RowSet rs = session.Execute(bs);
                     Console.WriteLine("Created Malt ");
                } catch (Exception et) {
                Console.WriteLine("Creation of keyspace broke - " + et);
                }

                try
                {
                    PreparedStatement statement = session.Prepare(CreateImage);
                    BoundStatement bs = new BoundStatement(statement);
                    RowSet rs = session.Execute(bs);
                    Console.WriteLine("Created Image Table ");
                }
                catch (Exception et)
                {
                    Console.WriteLine("Creation of image table broke - " + et);
                }

                try
                {
                    PreparedStatement statement = session.Prepare(createUserProfile);
                    BoundStatement bs = new BoundStatement(statement);
                    RowSet rs = session.Execute(bs);
                    Console.WriteLine("Created user profiles ");
                }
                catch (Exception et)
                {
                    Console.WriteLine("Creation profiles broke - " + et);
                }

                try
                {
                    PreparedStatement statement = session.Prepare(createPlaylist);
                    BoundStatement bs = new BoundStatement(statement);
                    RowSet rs = session.Execute(bs);
                    Console.WriteLine("Created Playlist ");
                }
                catch (Exception et)
                {
                    Console.WriteLine("Creating Playlist broke - " + et);
                }

                try
                {
                    PreparedStatement statement = session.Prepare(createTracks);
                    BoundStatement bs = new BoundStatement(statement);
                    RowSet rs = session.Execute(bs);
                    Console.WriteLine("Created Tracks ");
                }
                catch (Exception et)
                {
                    Console.WriteLine("Creating Tracks broke - " + et);
                }

                try
                {
                    PreparedStatement statement = session.Prepare(createVotes);
                    BoundStatement bs = new BoundStatement(statement);
                    RowSet rs = session.Execute(bs);
                    Console.WriteLine("Created Votes ");
                }
                catch (Exception et)
                {
                    Console.WriteLine("Creating votes broke - " + et);
                }

                try
                {
                    PreparedStatement statement = session.Prepare(createListPlaylist);
                    BoundStatement bs = new BoundStatement(statement);
                    RowSet rs = session.Execute(bs);
                    Console.WriteLine("Created List Playlist ");
                }
                catch (Exception et)
                {
                    Console.WriteLine("Creating List Playlist broke - " + et);
                }

                try
                {
                    PreparedStatement statement = session.Prepare(createUserVotes);
                    BoundStatement bs = new BoundStatement(statement);
                    RowSet rs = session.Execute(bs);
                    Console.WriteLine("Created User Votes ");
                }
                catch (Exception et)
                {
                    Console.WriteLine("Creating User Votes broke - " + et);
                }

                try
                {
                    PreparedStatement statement = session.Prepare(trackTags);
                    BoundStatement bs = new BoundStatement(statement);
                    RowSet rs = session.Execute(bs);
                    Console.WriteLine("Created Track Tags ");
                }
                catch (Exception et)
                {
                    Console.WriteLine("Creating Track Tags broke - " + et);
                }

                //session.End();
                //session.Dispose();
            }
            catch(Exception e)
            {
                Console.WriteLine("Something keyspacey broke - " + e);
            }
        }
        public CQLInventoryStorage(string[] contactPoints)
        {
            _cluster = Cluster.Builder().AddContactPoints(contactPoints).Build();
            _session = _cluster.Connect(KEYSPACE_NAME);

            SKEL_SELECT_STMT = _session.Prepare("SELECT * FROM skeletons WHERE user_id = ?;");
            SKEL_SELECT_STMT.SetConsistencyLevel(ConsistencyLevel.Quorum);

            SKEL_SINGLE_SELECT_STMT = _session.Prepare("SELECT * FROM skeletons WHERE user_id = ? AND folder_id = ?;");
            SKEL_SINGLE_SELECT_STMT.SetConsistencyLevel(ConsistencyLevel.Quorum);

            SKEL_INSERT_STMT
                = _session.Prepare( "INSERT INTO skeletons (user_id, folder_id, folder_name, parent_id, type, level) " +
                                    "VALUES(?, ?, ?, ?, ?, ?);");
            SKEL_INSERT_STMT.SetConsistencyLevel(ConsistencyLevel.Quorum);

            FOLDER_SELECT_STMT = _session.Prepare("SELECT * FROM folder_contents WHERE folder_id = ?;");
            FOLDER_SELECT_STMT.SetConsistencyLevel(ConsistencyLevel.Quorum);

            FOLDER_ATTRIB_SELECT_STMT = _session.Prepare(   "SELECT * FROM folder_contents WHERE folder_id = ? AND item_id = "
                                                            + FOLDER_MAGIC_ENTRY.ToString() + ";");
            FOLDER_ATTRIB_SELECT_STMT.SetConsistencyLevel(ConsistencyLevel.Quorum);

            FOLDER_ATTRIB_INSERT_STMT
                = _session.Prepare( "INSERT INTO folder_contents (folder_id, item_id, name, inv_type, creation_date, owner_id) " +
                                    "VALUES (?, ?, ?, ?, ?, ?);");
            FOLDER_ATTRIB_INSERT_STMT.SetConsistencyLevel(ConsistencyLevel.Quorum);

            FOLDER_ITEM_INSERT_STMT
                = _session.Prepare( "INSERT INTO folder_contents (folder_id, item_id, name, asset_id, asset_type, " +
                                        "base_permissions, creation_date, creator_id, current_permissions, description, " +
                                        "everyone_permissions, flags, group_id, group_owned, group_permissions, " +
                                        "inv_type, next_permissions, owner_id, sale_type) " +
                                    "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);");
            FOLDER_ITEM_INSERT_STMT.SetConsistencyLevel(ConsistencyLevel.Quorum);

            FOLDER_ITEM_UPDATE_STMT
                = _session.Prepare("UPDATE folder_contents SET name = ?, asset_id = ?, asset_type = ?, " +
                                        "base_permissions = ?, creation_date = ?, creator_id = ?, current_permissions= ?, description = ?, " +
                                        "everyone_permissions = ?, flags = ?, group_id = ?, group_owned = ?, group_permissions = ?, " +
                                        "inv_type = ?, next_permissions = ?, sale_type = ? " +
                                    "WHERE folder_id = ? AND item_id = ?;");
            FOLDER_ITEM_UPDATE_STMT.SetConsistencyLevel(ConsistencyLevel.Quorum);

            FOLDER_ITEM_REMOVE_STMT = _session.Prepare("DELETE FROM folder_contents WHERE folder_id = ? AND item_id = ?;");
            FOLDER_ITEM_REMOVE_STMT.SetConsistencyLevel(ConsistencyLevel.Quorum);

            FOLDER_VERSION_INC_STMT
                = _session.Prepare("UPDATE folder_versions SET version = version + 1 WHERE user_id = ? AND folder_id = ?;");
            FOLDER_VERSION_INC_STMT.SetConsistencyLevel(ConsistencyLevel.Quorum);

            FOLDER_VERSION_SELECT_STMT = _session.Prepare("SELECT * FROM folder_versions WHERE user_id = ?;");
            FOLDER_VERSION_SELECT_STMT.SetConsistencyLevel(ConsistencyLevel.Quorum);

            FOLDER_VERSION_SINGLE_SELECT_STMT = _session.Prepare("SELECT * FROM folder_versions WHERE user_id = ? AND folder_id = ?;");
            FOLDER_VERSION_SINGLE_SELECT_STMT.SetConsistencyLevel(ConsistencyLevel.Quorum);

            FOLDER_UPDATE_STMT = _session.Prepare(  "UPDATE folder_contents SET name = ?, inv_type = ? " +
                                                    "WHERE folder_id = ? AND item_id = " + FOLDER_MAGIC_ENTRY.ToString());
            FOLDER_UPDATE_STMT.SetConsistencyLevel(ConsistencyLevel.Quorum);

            SKEL_UPDATE_STMT = _session.Prepare("UPDATE skeletons SET folder_name = ?, type = ? WHERE user_id = ? AND folder_id = ?;");
            SKEL_UPDATE_STMT.SetConsistencyLevel(ConsistencyLevel.Quorum);

            SKEL_MOVE_STMT = _session.Prepare("UPDATE skeletons SET parent_id = ? WHERE user_id = ? AND folder_id = ?;");
            SKEL_MOVE_STMT.SetConsistencyLevel(ConsistencyLevel.Quorum);

            ITEM_OWNERSHIP_INSERT = _session.Prepare("INSERT INTO item_parents(item_id, parent_folder_id) VALUES(?, ?);");
            ITEM_OWNERSHIP_INSERT.SetConsistencyLevel(ConsistencyLevel.Quorum);

            ITEM_OWNERSHIP_UPDATE = _session.Prepare("UPDATE item_parents SET parent_folder_id = ? WHERE item_id = ?;");
            ITEM_OWNERSHIP_UPDATE.SetConsistencyLevel(ConsistencyLevel.Quorum);

            ITEM_OWNERSHIP_REMOVE = _session.Prepare("DELETE FROM item_parents WHERE item_id = ?;");
            ITEM_OWNERSHIP_REMOVE.SetConsistencyLevel(ConsistencyLevel.Quorum);

            ITEM_OWNERSHIP_SELECT = _session.Prepare("SELECT * FROM item_parents WHERE item_id = ?;");
            ITEM_OWNERSHIP_SELECT.SetConsistencyLevel(ConsistencyLevel.Quorum);

            FOLDER_ITEM_SELECT_STMT = _session.Prepare("SELECT * FROM folder_contents WHERE folder_id = ? AND item_id = ?;");
            FOLDER_ITEM_SELECT_STMT.SetConsistencyLevel(ConsistencyLevel.Quorum);

            FOLDER_REMOVE_STMT = _session.Prepare("DELETE FROM folder_contents WHERE folder_id = ?;");
            FOLDER_REMOVE_STMT.SetConsistencyLevel(ConsistencyLevel.Quorum);

            SKEL_REMOVE_STMT = _session.Prepare("DELETE FROM skeletons WHERE user_id = ? AND folder_id = ?;");
            SKEL_REMOVE_STMT.SetConsistencyLevel(ConsistencyLevel.Quorum);

            FOLDER_VERSION_REMOVE_STMT = _session.Prepare("DELETE FROM folder_versions WHERE user_id = ? AND folder_id = ?;");
            FOLDER_VERSION_REMOVE_STMT.SetConsistencyLevel(ConsistencyLevel.Quorum);
        }
Example #19
0
   public CasandraContext()
   {
        cluster = Cluster.Builder().AddContactPoint("127.0.0.1").Build();
        session = cluster.Connect("person");
 
   }