Exemplo n.º 1
0
        public string ConvertCells(IEnumerable <Cell> cells)
        {
            if (_converter != null)
            {
                return(_converter.ConvertCells(cells));
            }

            throw new NotImplementedException();
        }
Exemplo n.º 2
0
        T WriteCellsInternal <T>(CellSet cells, Func <Method, string, string, string, string, HttpStatusCode[], T> action)
        {
            string contentType     = Options.ContentType;
            var    tableIdentifier = new Identifier {
                Table = cells.Table
            };
            string resource = ResourceBuilder.BuildBatchInsert(tableIdentifier);

            return(action(Method.POST, resource, contentType, contentType, Converter.ConvertCells(cells), new[] { HttpStatusCode.OK }));
        }
Exemplo n.º 3
0
        /// <summary>
        ///   Writes the cells to HBase.
        /// </summary>
        /// <param name="cells">The cells.</param>
        public virtual void WriteCells(CellSet cells)
        {
            string contentType     = Options.ContentType;
            var    tableIdentifier = new Identifier {
                Table = cells.Table
            };
            string        resource = ResourceBuilder.BuildBatchInsert(tableIdentifier);
            IRestResponse response = SendRequest(Method.POST, resource, contentType, contentType, Converter.ConvertCells(cells));

            ErrorProvider.ThrowIfStatusMismatch(response, HttpStatusCode.OK);
        }