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 })); }
/// <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); }