コード例 #1
0
 private static bool CellMatchesTestValue(Cell cell, TestCell testCell)
 {
     return cell.Identifier.Row == testCell.Row
         && cell.Identifier.CellDescriptor != null
         && cell.Identifier.CellDescriptor.Column == testCell.Column
         && cell.Identifier.CellDescriptor.Qualifier == testCell.Qualifier
         && cell.Identifier.Timestamp == testCell.Timestamp
         && cell.Value == testCell.Value;
 }
コード例 #2
0
        public string ConvertCell(Cell cell)
        {
            if (_converter != null)
            {
                return _converter.ConvertCell(cell);
            }

            throw new NotImplementedException();
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: sixeyed/hbase-succinctly
        private static void DemonstrateWriting(IStargate stargate)
        {
            // update a single cell value:
            stargate.WriteValue("100", "access-logs", "elton|jericho|201510", "t", "2908");
            Console.WriteLine("Updated single cell");

            // set multiple cell values:
            var update = new Cell(new Identifier
            {
                Row = "elton|jericho|201510",
                CellDescriptor = new HBaseCellDescriptor
                {
                    Column = "t",
                    Qualifier = "2908"
                }
            }, "120");

            var insert = new Cell(new Identifier
            {
                Row = "elijah|jericho|201511",
                CellDescriptor = new HBaseCellDescriptor
                {
                    Column = "t",
                    Qualifier = "1117"
                }
            }, "360");

            var cells = new CellSet(new Cell[] { update, insert });
            cells.Table = "access-logs";

            stargate.WriteCells(cells);
            Console.WriteLine("Updated multiple cells");
        }