public void When_I_Scan_with_a_ColumnPaginationFilter_I_get_the_expected_results() { // only grabbing the LineNumber Column with (1, 1) var expectedRecords = (from r in _allExpectedRecords select r.WithAValue(null).WithBValue(null)).ToList(); var client = new HBaseClient(RequestOptionsFactory.GetDefaultOptions()); var scanner = new Scanner(); var filter = new ColumnPaginationFilter(1, 1); scanner.Filter = filter.ToEncodedString(); ScannerInformation scanInfo = null; try { scanInfo = client.CreateScannerAsync(_tableName, scanner).Result; var actualRecords = RetrieveResults(scanInfo).ToList(); actualRecords.ShouldContainOnly(expectedRecords); } finally { if (scanInfo != null) { client.DeleteScannerAsync(_tableName, scanInfo).Wait(); } } }
public void When_I_Scan_with_a_ColumnPaginationFilter_I_get_the_expected_results() { // only grabbing the LineNumber column with (1, 1) List <FilterTestRecord> expectedRecords = (from r in _allExpectedRecords select r.WithAValue(null).WithBValue(null)).ToList(); var client = new HBaseClient(_credentials); var scanner = new Scanner(); var filter = new ColumnPaginationFilter(1, 1); scanner.filter = filter.ToEncodedString(); ScannerInformation scanInfo = client.CreateScanner(_tableName, scanner); List <FilterTestRecord> actualRecords = RetrieveResults(scanInfo).ToList(); actualRecords.ShouldContainOnly(expectedRecords); }