當前位置: 首頁>>代碼示例>>Java>>正文


Java TableName類代碼示例

本文整理匯總了Java中com.goldengate.atg.datasource.meta.TableName的典型用法代碼示例。如果您正苦於以下問題:Java TableName類的具體用法?Java TableName怎麽用?Java TableName使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


TableName類屬於com.goldengate.atg.datasource.meta包,在下文中一共展示了TableName類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: trainSimpleOpMock

import com.goldengate.atg.datasource.meta.TableName; //導入依賴的package包/類
private void trainSimpleOpMock() {
    TableName tableName = mock(TableName.class);
    when(tableName.getSchemaName()).thenReturn(SCHEMA_NAME);
    when(tableName.getShortName()).thenReturn(TABLE_NAME);
    when(op.getTableName()).thenReturn(tableName);

    when(op.getOperationType()).thenReturn(DsOperation.OpType.DO_INSERT);
    when(op.getRba()).thenReturn(1L);
    when(op.getTxState()).thenReturn(TxState.END);
    when(op.iterator()).thenReturn(Collections.EMPTY_LIST.listIterator());
}
 
開發者ID:MonsantoCo,項目名稱:goldengate-kafka-adapter,代碼行數:12,代碼來源:JsonEncoder_UT.java

示例2: testWriteOp

import com.goldengate.atg.datasource.meta.TableName; //導入依賴的package包/類
@Test(testName = "測試寫入op")
public void testWriteOp(){
    ArrayList<ColumnMetaData> columnMetaDatas = new ArrayList<ColumnMetaData>();

    ColumnMetaData columnMetaData = new ColumnMetaData("c1", 1);
    columnMetaDatas.add(columnMetaData);
    columnMetaData = new ColumnMetaData("c2", 2);
    columnMetaDatas.add(columnMetaData);
    columnMetaData = new ColumnMetaData("c3", 3);
    columnMetaDatas.add(columnMetaData);
    columnMetaData = new ColumnMetaData("c4", 4);
    columnMetaDatas.add(columnMetaData);
    columnMetaData = new ColumnMetaData("c5", 5);
    columnMetaDatas.add(columnMetaData);



    TableName tableName = new TableName("ogg_test.t_person");

    TableMetaData tableMetaData = new TableMetaData(tableName, columnMetaDatas);

    DsMetaData dsMetaData = new DsMetaData();
    dsMetaData.setTableMetaData(tableMetaData);
    DsColumn[] columns = new DsColumn[5];
    columns[0] = new DsColumnAfterValue("testNormal");
    columns[1] = new DsColumnAfterValue("2");
    columns[2] = new DsColumnAfterValue("3");
    columns[3] = new DsColumnAfterValue("2016-05-20 09:00:00");
    columns[4] = new DsColumnAfterValue("6");


    DsRecord dsRecord = new DsRecord(columns);

    DsOperation dsOperation = new DsOperation(tableName, DsOperation.OpType.DO_INSERT, "2016-05-13 19:15:15.010",0l, 0l, dsRecord);

    Op op = new Op(dsOperation, tableMetaData, null);

    BadOperateWriter.write(op,
            "ogg_test.t_person",
            "t_person",
            "op.txt",
            10000,
            "op error");

    FileUtils.deleteQuietly(new File("op.txt"));
}
 
開發者ID:aliyun,項目名稱:aliyun-maxcompute-data-collectors,代碼行數:47,代碼來源:BadOperateWriterTest.java

示例3: getConfigurationForTable

import com.goldengate.atg.datasource.meta.TableName; //導入依賴的package包/類
protected Optional<TableConfiguration> getConfigurationForTable(TableName tableName) {
    return configuration.getTableConfiguration(tableName.getSchemaName(),tableName.getShortName());
}
 
開發者ID:MonsantoCo,項目名稱:goldengate-kafka-adapter,代碼行數:4,代碼來源:AbstractMessageEncoder.java

示例4: processOpImpl

import com.goldengate.atg.datasource.meta.TableName; //導入依賴的package包/類
protected void processOpImpl(Tx currentTx, Op op) {

		TableName tname = op.getTableName();
		//TableMetaData tMeta = getMetaData().getTableMetaData(tname);
		handler.processOp(op);

	}
 
開發者ID:rogers,項目名稱:change-data-capture,代碼行數:8,代碼來源:KafkaHandler.java

示例5: init

import com.goldengate.atg.datasource.meta.TableName; //導入依賴的package包/類
@BeforeClass
public void init() throws DocumentException {
    datahubHandler = new DatahubHandler();

    datahubHandler.setState(DataSourceListener.State.READY);

    configure = ConfigureReader.reader("src/test/resources/configure.xml");

    datahubHandler.setConfigure(configure);

    RecordBuilder.init(configure);

    DataHubWriter.init(configure);

    OperationHandlerManager.init();

    ArrayList<ColumnMetaData> columnMetaDatas = new ArrayList<ColumnMetaData>();

    ColumnMetaData columnMetaData = new ColumnMetaData("c1", 1);
    columnMetaDatas.add(columnMetaData);
    columnMetaData = new ColumnMetaData("c2", 2);
    columnMetaDatas.add(columnMetaData);
    columnMetaData = new ColumnMetaData("c3", 3);
    columnMetaDatas.add(columnMetaData);
    columnMetaData = new ColumnMetaData("c4", 4);
    columnMetaDatas.add(columnMetaData);
    columnMetaData = new ColumnMetaData("c5", 5);
    columnMetaDatas.add(columnMetaData);



    tableName = new TableName("ogg_test.t_person");

    TableMetaData tableMetaData = new TableMetaData(tableName, columnMetaDatas);

    DsMetaData dsMetaData = new DsMetaData();
    dsMetaData.setTableMetaData(tableMetaData);


    GGTranID ggTranID = GGTranID.getID(0l, 0l);
    dsTransaction = new DsTransaction(ggTranID);

    e = new DsEventManager.TxEvent(dsTransaction, dsMetaData, "");
}
 
開發者ID:aliyun,項目名稱:aliyun-maxcompute-data-collectors,代碼行數:45,代碼來源:DatahubHandlerTest.java


注:本文中的com.goldengate.atg.datasource.meta.TableName類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。