Search in sources :

Example 1 with TableStatDO

use of com.alibaba.otter.manager.biz.statistics.table.dal.dataobject.TableStatDO in project otter by alibaba.

the class IbatisTableStatDAO method findTableStatByPipelineIdAndPairId.

@Override
public TableStatDO findTableStatByPipelineIdAndPairId(Long pipelineId, Long dataMediaPairId) {
    TableStatDO tableStat = new TableStatDO();
    tableStat.setPipelineId(pipelineId);
    tableStat.setDataMediaPairId(dataMediaPairId);
    return (TableStatDO) getSqlMapClientTemplate().queryForObject("findTableStatByPipelineIdAndDataMediaPairId", tableStat);
}
Also used : TableStatDO(com.alibaba.otter.manager.biz.statistics.table.dal.dataobject.TableStatDO)

Example 2 with TableStatDO

use of com.alibaba.otter.manager.biz.statistics.table.dal.dataobject.TableStatDO in project otter by alibaba.

the class TableStatServiceImpl method listTableStat.

/**
     * 列出对应同步任务下的统计信息
     */
public List<TableStat> listTableStat(Long pipelineId) {
    Assert.assertNotNull(pipelineId);
    List<TableStatDO> tableStatDOs = tableStatDao.listTableStatsByPipelineId(pipelineId);
    List<TableStat> tableStats = new ArrayList<TableStat>();
    for (TableStatDO tableStatDO : tableStatDOs) {
        tableStats.add(tableStatDOToModel(tableStatDO));
    }
    return tableStats;
}
Also used : TableStatDO(com.alibaba.otter.manager.biz.statistics.table.dal.dataobject.TableStatDO) ArrayList(java.util.ArrayList) TableStat(com.alibaba.otter.shared.common.model.statistics.table.TableStat)

Example 3 with TableStatDO

use of com.alibaba.otter.manager.biz.statistics.table.dal.dataobject.TableStatDO in project otter by alibaba.

the class TableStatServiceImpl method tableStatModelToDo.

/**
     * 用于Model对象转化为DO对象
     * 
     * @param tableStat
     * @return TableStatDO
     */
private TableStatDO tableStatModelToDo(TableStat tableStat) {
    TableStatDO tableStatDO = new TableStatDO();
    tableStatDO.setId(tableStat.getId());
    tableStatDO.setPipelineId(tableStat.getPipelineId());
    tableStatDO.setDataMediaPairId(tableStat.getDataMediaPairId());
    tableStatDO.setFileSize(tableStat.getFileSize());
    tableStatDO.setFileCount(tableStat.getFileCount());
    tableStatDO.setDeleteCount(tableStat.getDeleteCount());
    tableStatDO.setInsertCount(tableStat.getInsertCount());
    tableStatDO.setUpdateCount(tableStat.getUpdateCount());
    tableStatDO.setGmtCreate(tableStat.getGmtCreate());
    tableStatDO.setGmtModified(tableStat.getGmtModified());
    return tableStatDO;
}
Also used : TableStatDO(com.alibaba.otter.manager.biz.statistics.table.dal.dataobject.TableStatDO)

Aggregations

TableStatDO (com.alibaba.otter.manager.biz.statistics.table.dal.dataobject.TableStatDO)3 TableStat (com.alibaba.otter.shared.common.model.statistics.table.TableStat)1 ArrayList (java.util.ArrayList)1