public void Execute() { var client = _pool.GetClient(); if (_descriptors.Count > 0) { var mutations = _descriptors.Select(x => new Mutation { Column = x.GetBytes(), IsDelete = true }).ToList(); var batches = _entities.Select(x => new BatchMutation { Row = RowkeyProcessor.ExtractFromEntity(x, _map.RowKey).GetBytes(), Mutations = mutations }).ToList(); batches.Split(_batchSize).ForEach(x => client.mutateRows(_tableName, x, null)); } else { _entities.ForEach(x => client.deleteAllRow(_tableName, RowkeyProcessor.ExtractFromEntity(x, _map.RowKey).GetBytes(), null)); } _pool.ReleaseClient(client); }
public IList <HBaseCell> Serialize(ClassMap map, TEntity entity, IList <string> descriptors) { var accessor = ObjectAccessor.Create(entity); var key = RowkeyProcessor.ExtractFromEntity(entity, map.RowKey, accessor); return(ProcessMap(map, accessor, key, descriptors)); }