Exemple #1
0
        public NColumn <N, V> getColumn <N, V>(string keyspace, Object columnFamily, Object key, N columnName)
        {
            client.set_keyspace(keyspace);
            byte[]     binaryKey = key.ToByteArray();
            ColumnPath cp        = new ColumnPath();

            cp.Column_family = columnFamily.ToString();
            cp.Column        = columnName.ToByteArray();
            var result = ThriftUtility.ToNColumn <N, V>(client.get(binaryKey, cp, consistencyLevel).Column);

            return(result);
        }
        public override void Execute(Apache.Cassandra.Cassandra.Client cassandraClient, ILog logger)
        {
            ColumnOrSuperColumn columnOrSupercolumn = null;
            var columnPath = BuildColumnPath(columnName);

            try
            {
                columnOrSupercolumn = cassandraClient.get(PartitionKey, columnPath, consistencyLevel);
            }
            catch (NotFoundException)
            {
                //ничего не делаем
            }

            Output = columnOrSupercolumn?.Column.FromCassandraColumn();
        }