use of io.hetu.core.plugin.hbase.query.HBaseRecordSetProvider in project hetu-core by openlookeng.
the class TestHBase method testGetSRecordSet.
/**
* testGetSRecordSet
*/
@Test
public void testGetSRecordSet() {
List<HostAddress> hostAddressList = new ArrayList<>(1);
Map<Integer, List<Range>> ranges = new HashMap<>();
HBaseSplit split = new HBaseSplit("rowkey", TestUtils.createHBaseTableHandle(), hostAddressList, null, null, ranges, 0, false, null);
HBaseRecordSetProvider hrsp = new HBaseRecordSetProvider(hconn);
RecordSet rs = hrsp.getRecordSet(new HBaseTransactionHandle(), session, split, TestUtils.createHBaseTableHandle(), hconn.getTable("hbase.test_table").getColumns());
assertEquals(5, rs.getColumnTypes().size());
}
use of io.hetu.core.plugin.hbase.query.HBaseRecordSetProvider in project hetu-core by openlookeng.
the class TestHBase method setUp.
/**
* setUp
*/
@BeforeClass
public void setUp() {
hCConf.setZkClientPort("2181");
hCConf.setZkQuorum("zk1");
hetuMetastore = new TestingHetuMetastore();
table = TestUtils.createHBaseTableHandle();
schemaTableName = new SchemaTableName("hbase", "test_table");
hconn = new TestHBaseClientConnection(hCConf, hetuMetastore.getHetuMetastore());
hconn.createConnection();
session = new TestingConnectorSession("root");
hcm = new HBaseConnectorMetadata(hconn);
hConnector = new HBaseConnector(new HBaseConnectorMetadataFactory(hconn, hCConf), new HBaseSplitManager(hconn), new HBasePageSinkProvider(hconn), new HBasePageSourceProvider(new HBaseRecordSetProvider(hconn), hconn), Optional.empty(), null);
}
use of io.hetu.core.plugin.hbase.query.HBaseRecordSetProvider in project hetu-core by openlookeng.
the class TestHBaseConnector method setUp.
/**
* setUp
*/
@BeforeClass
public void setUp() {
hCConf.setZkClientPort("2181");
hCConf.setZkQuorum("zk1");
hetuMetastore = new TestingHetuMetastore();
schemaTableName = new SchemaTableName("hbase", "test_table");
hconn = new TestHBaseClientConnection(hCConf, hetuMetastore.getHetuMetastore());
hconn.createConnection();
session = new TestingConnectorSession("root");
hcm = new HBaseConnectorMetadata(hconn);
hConnector = new HBaseConnector(new HBaseConnectorMetadataFactory(hconn, hCConf), new HBaseSplitManager(hconn), new HBasePageSinkProvider(hconn), new HBasePageSourceProvider(new HBaseRecordSetProvider(hconn), hconn), Optional.empty(), new HBaseTableProperties());
}
Aggregations