Examples of ExportTargetTableBean


Examples of com.asakusafw.bulkloader.bean.ExportTargetTableBean

        prop.setProperty(Constants.PROP_KEY_EXP_COPY_MAX_RECORD, "1");
        ConfigurationLoader.setProperty(prop);

        // ExportBeanを生成
        Map<String, ExportTargetTableBean> targetTable = new LinkedHashMap<String, ExportTargetTableBean>();
        ExportTargetTableBean table1 = new ExportTargetTableBean();
        table1.setDuplicateCheck(true);
        table1.setExportTempTableName("TEMP_IMPORT_TARGET1");
        table1.setDuplicateFlagTableName("TEMP_IMPORT_TARGET1_DF");
        table1.setExportTableColumns(Arrays.asList(new String[]{"TEXTDATA1", "INTDATA1", "DATEDATA1"}));
        table1.setErrorTableName("IMPORT_TARGET1_ERROR");
        table1.setErrorTableColumns(Arrays.asList(new String[]{"TEXTDATA1", "INTDATA1", "DATEDATA1"}));
        table1.setErrorCodeColumn("ERROR_CODE");
        table1.setErrorCode("ERR01");
        targetTable.put("IMPORT_TARGET1", table1);
        ExporterBean bean = new ExporterBean();
        bean.setExportTargetTable(targetTable);
        bean.setJobflowSid("11");
        bean.setJobflowId(jobflowId);
View Full Code Here

Examples of com.asakusafw.bulkloader.bean.ExportTargetTableBean

        prop.setProperty(Constants.PROP_KEY_EXP_COPY_MAX_RECORD, "1");
        ConfigurationLoader.setProperty(prop);

        // ExportBeanを生成
        Map<String, ExportTargetTableBean> targetTable = new LinkedHashMap<String, ExportTargetTableBean>();
        ExportTargetTableBean table1 = new ExportTargetTableBean();
        table1.setDuplicateCheck(true);
        table1.setExportTempTableName("TEMP_IMPORT_TARGET1");
        table1.setDuplicateFlagTableName("TEMP_IMPORT_TARGET1_DF");
        table1.setExportTableColumns(Arrays.asList(new String[]{"TEXTDATA1", "INTDATA1", "DATEDATA1"}));
        table1.setErrorTableName("IMPORT_TARGET1_ERROR");
        table1.setErrorTableColumns(Arrays.asList(new String[]{"TEXTDATA1", "INTDATA1", "DATEDATA1"}));
        table1.setErrorCodeColumn("ERROR_CODE");
        table1.setErrorCode("ERR01");
        targetTable.put("IMPORT_TARGET1", table1);
        ExporterBean bean = new ExporterBean();
        bean.setExportTargetTable(targetTable);
        bean.setJobflowSid("11");
        bean.setJobflowId(jobflowId);
View Full Code Here

Examples of com.asakusafw.bulkloader.bean.ExportTargetTableBean

        }

        boolean result = false;
        for (ExportTempTableBean tempTable : tempBean) {
            // Exportテンポラリテーブル名をセット
            ExportTargetTableBean tableBean = exporterBean.getExportTargetTable(tempTable.getExportTableName());
            if (tableBean != null) {
                tableBean.setExportTempTableName(tempTable.getTemporaryTableName());
                tableBean.setDuplicateFlagTableName(tempTable.getDuplicateFlagTableName());
            }

            // ExportファイルをエクスポートテンポラリテーブルにLoad中のため、ロールバック可能と判断する
            if (tempTable.getTempTableStatus() == null
                    || tempTable.getTempTableStatus().equals(ExportTempTableStatus.LOAD_EXIT)) {
View Full Code Here

Examples of com.asakusafw.bulkloader.bean.ExportTargetTableBean

        prop.setProperty(Constants.PROP_KEY_EXP_COPY_MAX_RECORD, "1");
        ConfigurationLoader.setProperty(prop);

        // ExportBeanを生成
        Map<String, ExportTargetTableBean> targetTable = new LinkedHashMap<String, ExportTargetTableBean>();
        ExportTargetTableBean table1 = new ExportTargetTableBean();
        table1.setDuplicateCheck(true);
        table1.setExportTempTableName("TEMP_IMPORT_TARGET1");
        table1.setDuplicateFlagTableName("TEMP_IMPORT_TARGET1_DF");
        table1.setExportTableColumns(Arrays.asList(new String[]{"TEXTDATA1", "INTDATA1", "DATEDATA1"}));
        table1.setErrorTableName("IMPORT_TARGET1_ERROR");
        table1.setErrorTableColumns(Arrays.asList(new String[]{"TEXTDATA1", "INTDATA1", "DATEDATA1"}));
        table1.setErrorCodeColumn("ERROR_CODE");
        table1.setErrorCode("ERR01");
        targetTable.put("IMPORT_TARGET1", table1);
        ExporterBean bean = new ExporterBean();
        bean.setExportTargetTable(targetTable);
        bean.setJobflowSid("11");
        bean.setJobflowId(jobflowId);
View Full Code Here

Examples of com.asakusafw.bulkloader.bean.ExportTargetTableBean

        // テストデータをセット
        util.storeToDatabase(false);

        // ExportBeanを生成
        Map<String, ExportTargetTableBean> targetTable = new LinkedHashMap<String, ExportTargetTableBean>();
        ExportTargetTableBean table1 = new ExportTargetTableBean();
        table1.setDuplicateCheck(true);
        table1.setExportTempTableName("TEMP_IMPORT_TARGET1");
        table1.setDuplicateFlagTableName("TEMP_IMPORT_TARGET1_DF");
        table1.setExportTableColumns(Arrays.asList(new String[]{"TEXTDATA1", "INTDATA1"}));
        table1.setErrorTableName("IMPORT_TARGET1_ERROR");
        table1.setErrorTableColumns(Arrays.asList(new String[]{"TEXTDATA1", "INTDATA1", "DATEDATA1"}));
        table1.setErrorCodeColumn("ERROR_CODE");
        table1.setErrorCode("ERR01");
        targetTable.put("IMPORT_TARGET1", table1);
        ExportTargetTableBean table2 = new ExportTargetTableBean();
        table2.setDuplicateCheck(true);
        table2.setExportTempTableName("TEMP_IMPORT_TARGET2");
        table2.setDuplicateFlagTableName("TEMP_IMPORT_TARGET2_DF");
        table2.setExportTableColumns(Arrays.asList(new String[]{"TEXTDATA2", "INTDATA2", "DATEDATA2"}));
        table2.setErrorTableName("IMPORT_TARGET2_ERROR");
        table2.setErrorTableColumns(Arrays.asList(new String[]{"TEXTDATA2", "INTDATA2", "DATEDATA2"}));
        table2.setErrorCodeColumn("ERROR_CODE");
        table2.setErrorCode("ERR02");
        targetTable.put("IMPORT_TARGET3", table2);
        ExporterBean bean = new ExporterBean();
        bean.setExportTargetTable(targetTable);
        bean.setJobflowSid("11");
        bean.setJobflowId(jobflowId);
View Full Code Here

Examples of com.asakusafw.bulkloader.bean.ExportTargetTableBean

     */
    public void deleteFile(ExporterBean bean) {
        // Export対象ファイルを削除
        List<String> list = bean.getExportTargetTableList();
        for (String tableName : list) {
            ExportTargetTableBean targetTable = bean.getExportTargetTable(tableName);
            List<File> files = targetTable.getExportFiles();
            for (File file : files) {
                // ファイルが存在する場合は削除する
                if (file != null && file.exists()) {
                    if (!file.delete()) {
                        LOG.warn("TG-EXPORTER-05001", file.getPath());
View Full Code Here

Examples of com.asakusafw.bulkloader.bean.ExportTargetTableBean

            boolean deleteTempTableForce,
            Connection conn) throws BulkLoaderSystemException {
        List<String> list = bean.getExportTargetTableList();
        TempTableDelete delete = createTempTableDelete();
        for (String tableName : list) {
            ExportTargetTableBean table = bean.getExportTargetTable(tableName);
            String tempTable = table.getExportTempTableName();
            String dupTalbe = table.getDuplicateFlagTableName();
            if (tempTable != null) {
                delete.deleteTempTable(tempTable, dupTalbe, deleteTempTableForce, conn);
            }
        }
    }
View Full Code Here

Examples of com.asakusafw.bulkloader.bean.ExportTargetTableBean

     */
    @Test
    public void sendExportFileTest01() throws Exception {
        // ExportBeanを生成
        Map<String, ExportTargetTableBean> targetTable = new LinkedHashMap<String, ExportTargetTableBean>();
        ExportTargetTableBean table1 = new ExportTargetTableBean();
        List<String> list1 = new ArrayList<String>();
        list1.add("src/test/data/collector1");
        list1.add("${execution_id}/data/collector2");
        table1.setDfsFilePaths(list1);
        table1.setExportTargetType(NullWritable.class);
        targetTable.put("EXP_TARGET1", table1);

        ExportTargetTableBean table2 = new ExportTargetTableBean();
        List<String> list2 = new ArrayList<String>();
        list2.add("src/test/data/collector3");
        table2.setDfsFilePaths(list2);
        table2.setExportTargetType(NullWritable.class);
        targetTable.put("EXP_TARGET2", table2);

        ExporterBean bean = new ExporterBean();
        bean.setExportTargetTable(targetTable);
        bean.setExecutionId(executionId);
View Full Code Here

Examples of com.asakusafw.bulkloader.bean.ExportTargetTableBean

     */
    @Test
    public void sendExportFileTest05() throws Exception {
        // ExportBeanを生成
        Map<String, ExportTargetTableBean> targetTable = new LinkedHashMap<String, ExportTargetTableBean>();
        ExportTargetTableBean table1 = new ExportTargetTableBean();
        List<String> list1 = new ArrayList<String>();
        list1.add("/src/test/data/collector1");
        list1.add("/${user}/${execution_id}/data/collector2");
        table1.setDfsFilePaths(list1);
        table1.setExportTargetType(NullWritable.class);
        targetTable.put("EXP_TARGET1", table1);

        ExportTargetTableBean table2 = new ExportTargetTableBean();
        List<String> list2 = new ArrayList<String>();
        list2.add("/src/test/data/collector3");
        table2.setDfsFilePaths(list2);
        table2.setExportTargetType(NullWritable.class);
        targetTable.put("EXP_TARGET2", table2);

        ExporterBean bean = new ExporterBean();
        bean.setExportTargetTable(targetTable);
        bean.setExecutionId(executionId);
View Full Code Here

Examples of com.asakusafw.bulkloader.bean.ExportTargetTableBean

        // テストデータをセット
        util.storeToDatabase(false);

        // ExportBeanを生成
        Map<String, ExportTargetTableBean> targetTable = new LinkedHashMap<String, ExportTargetTableBean>();
        ExportTargetTableBean table1 = new ExportTargetTableBean();
        table1.setDuplicateCheck(true);
        table1.setExportTempTableName("TEMP_IMPORT_TARGET1_1");
        table1.setDuplicateFlagTableName("TEMP_IMPORT_TARGET1_1_DF");
        table1.setExportTableColumns(Arrays.asList(new String[]{"TEXTDATA1", "INTDATA1"}));
        table1.setErrorTableName("IMPORT_TARGET1_ERROR");
        table1.setErrorTableColumns(Arrays.asList(new String[]{"TEXTDATA1", "INTDATA1", "DATEDATA1"}));
        table1.setErrorCodeColumn("ERROR_CODE");
        table1.setErrorCode("ERR01");
        targetTable.put("IMPORT_TARGET1", table1);
        ExportTargetTableBean table2 = new ExportTargetTableBean();
        table2.setDuplicateCheck(true);
        table2.setExportTempTableName("TEMP_IMPORT_TARGET2_1");
        table2.setDuplicateFlagTableName("TEMP_IMPORT_TARGET2_1_DF");
        table2.setExportTableColumns(Arrays.asList(new String[]{"TEXTDATA2", "INTDATA2", "DATEDATA2"}));
        table2.setErrorTableName("IMPORT_TARGET2_ERROR");
        table2.setErrorTableColumns(Arrays.asList(new String[]{"TEXTDATA2", "INTDATA2", "DATEDATA2"}));
        table2.setErrorCodeColumn("ERROR_CODE");
        table2.setErrorCode("ERR02");
        targetTable.put("IMPORT_TARGET2", table2);
        ExporterBean bean = new ExporterBean();
        bean.setExportTargetTable(targetTable);
        bean.setJobflowSid("11");
        bean.setJobflowId(jobflowId);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.