public PerformanceChecksManager(IHBaseClient hBaseClient,string tableName, ItemMapper itemMapper, ItemsGenerator itemsGenerator, int numOfThreads, int requestsPerThread) { _hBaseClient = hBaseClient; _tableName = tableName; _itemMapper = itemMapper; _itemsGenerator = itemsGenerator; _numOfThreads = numOfThreads; _requestsPerThread = requestsPerThread; _exceptions = new ConcurrentBag<string>(); }
public void StoreTestData(IHBaseClient hbaseClient) { // we are going to insert the keys 0 to 100 and then do some range queries on that const string testValue = "the force is strong in this column"; var set = new CellSet(); for (int i = 0; i < 100; i++) { var row = new CellSet.Row { key = BitConverter.GetBytes(i) }; var value = new Cell { column = Encoding.UTF8.GetBytes("d:starwars"), data = Encoding.UTF8.GetBytes(testValue) }; row.values.Add(value); set.rows.Add(row); } hbaseClient.StoreCellsAsync(testTableName, set).Wait(); }
private void StoreTestData(IHBaseClient hbaseClient) { // we are going to insert the keys 0 to 100 and then do some range queries on that const string testValue = "the force is strong in this column"; var set = new CellSet(); for (var i = 0; i < 100; i++) { var row = new CellSet.Types.Row { Key = ByteString.CopyFrom(BitConverter.GetBytes(i)) }; var value = new Cell { Column = ByteString.CopyFromUtf8("d:starwars"), Data = ByteString.CopyFromUtf8(testValue) }; row.Values.Add(value); set.Rows.Add(row); } hbaseClient.StoreCellsAsync(TestTableName, set).Wait(); }
private void StoreStatelessScannerTestData(IHBaseClient hBaseClient) { const string testValue = "I will fulfill our destiny. "; var set = new CellSet(); for (int i = 1; i <= 3; i++) { var row = new CellSet.Row { key = Encoding.UTF8.GetBytes("testrow" + i) }; row.values.Add(new Cell { column = Encoding.UTF8.GetBytes("a:1"), data = Encoding.UTF8.GetBytes(testValue + "a" + i) }); set.rows.Add(row); row = new CellSet.Row { key = Encoding.UTF8.GetBytes("testrow" + i) }; row.values.Add(new Cell { column = Encoding.UTF8.GetBytes("b:1"), data = Encoding.UTF8.GetBytes(testValue + "b" + i) }); set.rows.Add(row); } hBaseClient.StoreCells(_testTableName, set); }