Examples of ExportTargetTableBean


Examples of com.asakusafw.bulkloader.bean.ExportTargetTableBean

    public void checkExportParamTest02() throws Exception {
        JobFlowParamLoader loader = new JobFlowParamLoader();

        // 設定
        Map<String, ExportTargetTableBean> targetTable = new LinkedHashMap<String, ExportTargetTableBean>();
        ExportTargetTableBean table1 = new ExportTargetTableBean();
        // 重複チェックを行うか否か
        table1.setDuplicateCheck(true);
        // Export対象テーブルに対応する異常データテーブル
        table1.setErrorTableName("XXX_ERROR");
        // Export中間TSVファイルに対応するカラム名
        table1.setExportTsvColumns(Arrays.asList(new String[]{"TEXTDATA1", "INTDATA1", "DATEDATA1"}));
        // Export対象テーブルのカラム名
        table1.setExportTableColumns(Arrays.asList(new String[]{"TEXTDATA1", "INTDATA1"}));
        // 異常データテーブルのカラム名
        table1.setErrorTableColumns(Arrays.asList(new String[]{"INTDATA1"}));
        // キー項目のカラム名
        table1.setKeyColumns(Arrays.asList(new String[]{"TEXTDATA1"}));
        // エラーコードを格納するカラム名
        table1.setErrorCodeColumn("ERROR_CODE");
        // 重複チェックエラーのエラーコードの値
        table1.setErrorCode("ERR01");
        // Export対象テーブルに対応するJavaBeanのクラス名
        table1.setExportTargetType(this.getClass());
        // Export対象テーブルのデータをHDFS上に書き出す際のファイルパス
        List<String> list1 = new ArrayList<String>();
        list1.add("hdfs://localhost/user/asakusa/import/11/XXX_1");
        table1.setDfsFilePaths(list1);
        targetTable.put("EXP_TARGET1", table1);

        ExportTargetTableBean table2 = new ExportTargetTableBean();
        // 重複チェックを行うか否か
        table2.setDuplicateCheck(false);
        // Export対象テーブルに対応する異常データテーブル
        table2.setErrorTableName(null);
        // Export中間TSVファイルに対応するカラム名
        table2.setExportTsvColumns(Arrays.asList(new String[]{"TEXTDATA1", "INTDATA1", "DATEDATA1"}));
        // Export対象テーブルのカラム名
        table2.setExportTableColumns(Arrays.asList(new String[]{"TEXTDATA1", "INTDATA1"}));
        // 異常データテーブルのカラム名
        table2.setErrorTableColumns(Arrays.asList(new String[]{}));
        // キー項目のカラム名
        table2.setKeyColumns(Arrays.asList(new String[]{}));
        // エラーコードを格納するカラム名
        table2.setErrorCodeColumn(null);
        // 重複チェックエラーのエラーコードの値
        table2.setErrorCode(null);
        // Export対象テーブルに対応するJavaBeanのクラス名
        table2.setExportTargetType(this.getClass());
        // Export対象テーブルのデータをHDFS上に書き出す際のファイルパス
        List<String> list2 = new ArrayList<String>();
        list2.add("hdfs://localhost/user/asakusa/import/11/XXX_1");
        table2.setDfsFilePaths(list2);
        targetTable.put("EXP_TARGET2", table2);

        // テスト実行
        boolean result = loader.checkExportParam(targetTable, targetName, "1", "dummyFileName");
        assertTrue(result);
View Full Code Here

Examples of com.asakusafw.bulkloader.bean.ExportTargetTableBean

        ExporterBean bean = new ExporterBean();
        bean.setJobflowSid("11");
        bean.setJobflowId("jobflow1");
        bean.setExecutionId("11-1");
        Map<String, ExportTargetTableBean> targetTable = new HashMap<String, ExportTargetTableBean>();
        targetTable.put("table1", new ExportTargetTableBean());
        targetTable.put("table2", new ExportTargetTableBean());
        bean.setExportTargetTable(targetTable);

        Properties p = ConfigurationLoader.getProperty();
        p.setProperty(Constants.PROP_KEY_EXPORT_TSV_DELETE, TsvDeleteType.TRUE.getSymbol());
        ConfigurationLoader.setProperty(p);
View Full Code Here

Examples of com.asakusafw.bulkloader.bean.ExportTargetTableBean

        ExporterBean bean = new ExporterBean();
        bean.setJobflowSid("11");
        bean.setJobflowId("jobflow1");
        bean.setExecutionId("11-1");
        Map<String, ExportTargetTableBean> targetTable = new HashMap<String, ExportTargetTableBean>();
        targetTable.put("table1", new ExportTargetTableBean());
        targetTable.put("table2", new ExportTargetTableBean());
        bean.setExportTargetTable(targetTable);

        Properties p = ConfigurationLoader.getProperty();
        p.setProperty(Constants.PROP_KEY_EXPORT_TSV_DELETE, TsvDeleteType.FALSE.getSymbol());
        ConfigurationLoader.setProperty(p);
View Full Code Here

Examples of com.asakusafw.bulkloader.bean.ExportTargetTableBean

        ExporterBean bean = new ExporterBean();
        bean.setJobflowSid("11");
        bean.setJobflowId("jobflow1");
        bean.setExecutionId("11-1");
        Map<String, ExportTargetTableBean> targetTable = new HashMap<String, ExportTargetTableBean>();
        targetTable.put("table1", new ExportTargetTableBean());
        targetTable.put("table2", new ExportTargetTableBean());
        bean.setExportTargetTable(targetTable);

        Properties p = ConfigurationLoader.getProperty();
        p.setProperty(Constants.PROP_KEY_EXPORT_TSV_DELETE, TsvDeleteType.TRUE.getSymbol());
        ConfigurationLoader.setProperty(p);
View Full Code Here

Examples of com.asakusafw.bulkloader.bean.ExportTargetTableBean

        ExporterBean bean = new ExporterBean();
        bean.setJobflowSid("11");
        bean.setJobflowId("jobflow1");
        bean.setExecutionId("11-1");
        Map<String, ExportTargetTableBean> targetTable = new HashMap<String, ExportTargetTableBean>();
        targetTable.put("table1", new ExportTargetTableBean());
        targetTable.put("table2", new ExportTargetTableBean());
        bean.setExportTargetTable(targetTable);

        Properties p = ConfigurationLoader.getProperty();
        p.setProperty(Constants.PROP_KEY_EXPORT_TSV_DELETE, TsvDeleteType.FALSE.getSymbol());
        ConfigurationLoader.setProperty(p);
View Full Code Here

Examples of com.asakusafw.bulkloader.bean.ExportTargetTableBean

        ExporterBean bean = new ExporterBean();
        bean.setJobflowSid("11");
        bean.setJobflowId("jobflow1");
        bean.setExecutionId("11-1");
        Map<String, ExportTargetTableBean> targetTable = new HashMap<String, ExportTargetTableBean>();
        targetTable.put("table1", new ExportTargetTableBean());
        targetTable.put("table2", new ExportTargetTableBean());
        bean.setExportTargetTable(targetTable);

        Properties p = ConfigurationLoader.getProperty();
        p.setProperty(Constants.PROP_KEY_EXPORT_TSV_DELETE, TsvDeleteType.TRUE.getSymbol());
        ConfigurationLoader.setProperty(p);
View Full Code Here

Examples of com.asakusafw.bulkloader.bean.ExportTargetTableBean

        ExporterBean bean = new ExporterBean();
        bean.setJobflowSid("11");
        bean.setJobflowId("jobflow1");
        bean.setExecutionId("11-1");
        Map<String, ExportTargetTableBean> targetTable = new HashMap<String, ExportTargetTableBean>();
        targetTable.put("table1", new ExportTargetTableBean());
        targetTable.put("table2", new ExportTargetTableBean());
        bean.setExportTargetTable(targetTable);

        Properties p = ConfigurationLoader.getProperty();
        p.setProperty(Constants.PROP_KEY_EXPORT_TSV_DELETE, TsvDeleteType.FALSE.getSymbol());
        ConfigurationLoader.setProperty(p);
View Full Code Here

Examples of com.asakusafw.bulkloader.bean.ExportTargetTableBean

        ExporterBean bean = new ExporterBean();
        bean.setJobflowSid("11");
        bean.setJobflowId("jobflow1");
        bean.setExecutionId("11-1");
        Map<String, ExportTargetTableBean> targetTable = new HashMap<String, ExportTargetTableBean>();
        targetTable.put("table1", new ExportTargetTableBean());
        targetTable.put("table2", new ExportTargetTableBean());
        bean.setExportTargetTable(targetTable);

        Properties p = ConfigurationLoader.getProperty();
        p.setProperty(Constants.PROP_KEY_EXPORT_TSV_DELETE, TsvDeleteType.TRUE.getSymbol());
        ConfigurationLoader.setProperty(p);
View Full Code Here

Examples of com.asakusafw.bulkloader.bean.ExportTargetTableBean

    public void checkExportParamTest13() throws Exception {
        JobFlowParamLoader loader = new JobFlowParamLoader();

        // 設定
        Map<String, ExportTargetTableBean> targetTable = new LinkedHashMap<String, ExportTargetTableBean>();
        ExportTargetTableBean table1 = new ExportTargetTableBean();
        // 重複チェックを行うか否か
        table1.setDuplicateCheck(true);
        // Export対象テーブルに対応する異常データテーブル
        table1.setErrorTableName("XXX_ERROR");
        // Export中間TSVファイルに対応するカラム名
        table1.setExportTsvColumns(Arrays.asList(new String[]{"TEXTDATA1", "INTDATA1", "DATEDATA1"}));
        // Export対象テーブルのカラム名
        table1.setExportTableColumns(Arrays.asList(new String[]{"TEXTDATA1", "TEMP_SID"}));
        // 異常データテーブルのカラム名
        table1.setErrorTableColumns(Arrays.asList(new String[]{"INTDATA1"}));
        // キー項目のカラム名
        table1.setKeyColumns(Arrays.asList(new String[]{"TEXTDATA1"}));
        // エラーコードを格納するカラム名
        table1.setErrorCodeColumn("ERROR_CODE");
        // 重複チェックエラーのエラーコードの値
        table1.setErrorCode("ERR01");
        // Export対象テーブルに対応するJavaBeanのクラス名
        table1.setExportTargetType(this.getClass());
        // Export対象テーブルのデータをHDFS上に書き出す際のファイルパス
        List<String> list1 = new ArrayList<String>();
        list1.add("hdfs://localhost/user/asakusa/import/11/XXX_1");
        table1.setDfsFilePaths(list1);
        targetTable.put("EXP_TARGET1", table1);

        // テスト実行
        boolean result = loader.checkExportParam(targetTable, targetName, "1", "dummyFileName");
        assertFalse(result);
View Full Code Here

Examples of com.asakusafw.bulkloader.bean.ExportTargetTableBean

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

        // ExportBeanを生成
        Map<String, ExportTargetTableBean> targetTable = new LinkedHashMap<String, ExportTargetTableBean>();
        ExportTargetTableBean table1 = new ExportTargetTableBean();
        table1.setDuplicateCheck(false);
        table1.addExportFile(new File(new File ("src/test/data/exporter/EXP_EXP_TARGET1_1.tsv").getAbsolutePath()));
        table1.addExportFile(new File(new File ("src/test/data/exporter/EXP_EXP_TARGET1_2.tsv").getAbsolutePath()));
        table1.setExportTsvColumns(Arrays.asList(new String[]{"SID", "VERSION_NO", "TEXTDATA1", "INTDATA1", "DATEDATA1"}));
        targetTable.put("IMPORT_TARGET1", table1);
        ExportTargetTableBean table2 = new ExportTargetTableBean();
        table2.setDuplicateCheck(false);
        table2.addExportFile(new File(new File ("src/test/data/exporter/EXP_EXP_TARGET2_1.tsv").getAbsolutePath()));
        table2.setExportTsvColumns(Arrays.asList(new String[]{"TEXTDATA2", "INTDATA2", "DATEDATA2"}));
        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.