示例#1
0
 public SlicePredicate(SliceRange sliceRange)
 {
     SliceRange = sliceRange;
 }
        public IDictionary<string, SuperColumn> MultigetSuperColumn(IList<string> keys, ColumnPath columnPath, bool reversed, int size)
        {
            AssertSuperColumnPath(columnPath);

            var result = new Dictionary<string, SuperColumn>();

            // only can get supercolumn by multigetSuperSlice
            var clp = new ColumnParent(columnPath.ColumnFamily, columnPath.SuperColumn);
            var sr = new SliceRange(reversed, size);
            var sp = new SlicePredicate(sr);
            var sclist = MultigetSuperSlice(keys, clp, sp);

            if (sclist == null || sclist.Count == 0)
                return result;

            foreach (var sc in sclist)
                if (sc.Value.Count > 0)
                    result.Add(sc.Key, sc.Value[0]);

            return result;
        }
示例#3
0
 public SlicePredicate(IList<string> columnNames, SliceRange sliceRange)
     : this(sliceRange)
 {
     ColumnNames = columnNames;
 }