use of io.hetu.core.plugin.hbase.metadata.HBaseConnectorMetadata in project hetu-core by openlookeng.
the class TestHBase method testGetNullSchemaTableMeta.
/**
* testGetNullSchemaTableMeta
*
* @throws TableNotFoundException
*/
@Test
public void testGetNullSchemaTableMeta() {
try {
ConnectorTableHandle table2 = TestUtils.createHBaseTableHandle("default", "table1");
HBaseConnectorMetadata hBcm = new HBaseConnectorMetadata(hconn);
hBcm.getTableMetadata(session, table2);
} catch (TableNotFoundException e) {
assertEquals(e.getMessage(), format(("Table '%s' not found"), "default.table1"));
}
}
use of io.hetu.core.plugin.hbase.metadata.HBaseConnectorMetadata 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.metadata.HBaseConnectorMetadata in project hetu-core by openlookeng.
the class HBaseConnector method rollback.
@Override
public void rollback(ConnectorTransactionHandle transactionHandle) {
HBaseConnectorMetadata metadata = transactions.remove(transactionHandle);
checkArgument(metadata != null, Constants.ERROR_MESSAGE_TEMPLATE, transactionHandle);
metadata.rollback();
}
use of io.hetu.core.plugin.hbase.metadata.HBaseConnectorMetadata 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());
}
use of io.hetu.core.plugin.hbase.metadata.HBaseConnectorMetadata in project hetu-core by openlookeng.
the class TestHBase method testGetNullTableMeta.
/**
* testGetNullTableMeta
*
* @throws TableNotFoundException
*/
@Test
public void testGetNullTableMeta() {
try {
ConnectorTableHandle table2 = TestUtils.createHBaseTableHandle("hbase", "table1");
HBaseConnectorMetadata hBcm = new HBaseConnectorMetadata(hconn);
hBcm.getTableMetadata(session, table2);
} catch (TableNotFoundException e) {
assertEquals(e.getMessage(), format(("Table '%s' not found"), "hbase.table1"));
}
}
Aggregations