Examples of ImportTargetTableBean


Examples of com.asakusafw.bulkloader.bean.ImportTargetTableBean

        importFile2.createNewFile();
        importFile3.createNewFile();

        // ImportBeanを生成
        Map<String, ImportTargetTableBean> targetTable = new LinkedHashMap<String, ImportTargetTableBean>();
        ImportTargetTableBean tableBean1 = new ImportTargetTableBean();
        tableBean1.setImportFile(importFile1);
        targetTable.put("IMPORT_TARGET1", tableBean1);
        ImportTargetTableBean tableBean2 = new ImportTargetTableBean();
        tableBean2.setImportFile(importFile2);
        targetTable.put("IMPORT_TARGET2", tableBean2);
        ImportTargetTableBean tableBean3 = new ImportTargetTableBean();
        tableBean3.setImportFile(importFile3);
        targetTable.put("IMPORT_TARGET3", tableBean3);
        ImportBean bean = new ImportBean();
        bean.setTargetTable(targetTable);

        // テスト対象クラス実行
View Full Code Here

Examples of com.asakusafw.bulkloader.bean.ImportTargetTableBean

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

        // 設定
        Map<String, ImportTargetTableBean> targetTable = new LinkedHashMap<String, ImportTargetTableBean>();
        ImportTargetTableBean tableBean1 = new ImportTargetTableBean();
        tableBean1.setImportTargetColumns(Arrays.asList(new String[]{"TEXTDATA1", "INTDATA1", "DATEDATA1"}));
        tableBean1.setSearchCondition("INTDATA1=11");
        tableBean1.setUseCache(false);
        tableBean1.setLockType(ImportTableLockType.find("1"));
        tableBean1.setLockedOperation(ImportTableLockedOperation.find("3"));
        tableBean1.setImportTargetType(this.getClass());
        tableBean1.setDfsFilePath(null);
        targetTable.put("IMPORT_TARGET1", tableBean1);

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

Examples of com.asakusafw.bulkloader.bean.ImportTargetTableBean

        File importFile2 = new File(dumpDir, "IMP_IMPORT_TARGET2.tsv");
        File importFile3 = new File(dumpDir, "IMP_IMPORT_TARGET3.tsv");

        // ImportBeanを生成
        Map<String, ImportTargetTableBean> targetTable = new LinkedHashMap<String, ImportTargetTableBean>();
        ImportTargetTableBean tableBean1 = new ImportTargetTableBean();
        tableBean1.setImportFile(importFile1);
        targetTable.put("IMPORT_TARGET1", tableBean1);
        ImportTargetTableBean tableBean2 = new ImportTargetTableBean();
        tableBean2.setImportFile(importFile2);
        targetTable.put("IMPORT_TARGET2", tableBean2);
        ImportTargetTableBean tableBean3 = new ImportTargetTableBean();
        tableBean3.setImportFile(importFile3);
        targetTable.put("IMPORT_TARGET3", tableBean3);
        ImportBean bean = new ImportBean();
        bean.setTargetTable(targetTable);

        // テスト対象クラス実行
View Full Code Here

Examples of com.asakusafw.bulkloader.bean.ImportTargetTableBean

        File importFile2 = null;
        File importFile3 = null;

        // ImportBeanを生成
        Map<String, ImportTargetTableBean> targetTable = new LinkedHashMap<String, ImportTargetTableBean>();
        ImportTargetTableBean tableBean1 = new ImportTargetTableBean();
        tableBean1.setImportFile(importFile1);
        targetTable.put("IMPORT_TARGET1", tableBean1);
        ImportTargetTableBean tableBean2 = new ImportTargetTableBean();
        tableBean2.setImportFile(importFile2);
        targetTable.put("IMPORT_TARGET2", tableBean2);
        ImportTargetTableBean tableBean3 = new ImportTargetTableBean();
        tableBean3.setImportFile(importFile3);
        targetTable.put("IMPORT_TARGET3", tableBean3);
        ImportBean bean = new ImportBean();
        bean.setTargetTable(targetTable);

        // テスト対象クラス実行
View Full Code Here

Examples of com.asakusafw.bulkloader.bean.ImportTargetTableBean

            fos = new FileOutputStream(importFile3);
            fos.write(123);

            // ImportBeanを生成
            Map<String, ImportTargetTableBean> targetTable = new LinkedHashMap<String, ImportTargetTableBean>();
            ImportTargetTableBean tableBean1 = new ImportTargetTableBean();
            tableBean1.setImportFile(importFile1);
            targetTable.put("IMPORT_TARGET1", tableBean1);
            ImportTargetTableBean tableBean2 = new ImportTargetTableBean();
            tableBean2.setImportFile(importFile2);
            targetTable.put("IMPORT_TARGET2", tableBean2);
            ImportTargetTableBean tableBean3 = new ImportTargetTableBean();
            tableBean3.setImportFile(importFile3);
            targetTable.put("IMPORT_TARGET3", tableBean3);
            ImportBean bean = new ImportBean();
            bean.setTargetTable(targetTable);

            // テスト対象クラス実行
View Full Code Here

Examples of com.asakusafw.bulkloader.bean.ImportTargetTableBean

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

        // 設定
        Map<String, ImportTargetTableBean> targetTable = new LinkedHashMap<String, ImportTargetTableBean>();
        ImportTargetTableBean tableBean1 = new ImportTargetTableBean();
        tableBean1.setImportTargetColumns(Arrays.asList(new String[]{"TEXTDATA1", "INTDATA1", "DATEDATA1"}));
        tableBean1.setSearchCondition("INTDATA1=11");
        tableBean1.setUseCache(false);
        tableBean1.setLockType(ImportTableLockType.find("1"));
        tableBean1.setLockedOperation(ImportTableLockedOperation.find("1"));
        tableBean1.setImportTargetType(this.getClass());
        tableBean1.setDfsFilePath("hdfs://localhost/user/asakusa/import/11/XXX_1");
        targetTable.put("IMPORT_TARGET1", tableBean1);

        // テスト実行1
        boolean result = loader.checkImportParam(targetTable, targetName, "1", "dummyFileName", true);
        assertFalse(result);

        // 設定変更
        tableBean1.setLockedOperation(null);

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

Examples of com.asakusafw.bulkloader.bean.ImportTargetTableBean

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

        // 設定
        Map<String, ImportTargetTableBean> targetTable = new LinkedHashMap<String, ImportTargetTableBean>();
        ImportTargetTableBean tableBean1 = new ImportTargetTableBean();
        tableBean1.setImportTargetColumns(Arrays.asList(new String[]{"TEXTDATA1", "INTDATA1", "DATEDATA1"}));
        tableBean1.setSearchCondition("INTDATA1=11");
        tableBean1.setUseCache(false);
        tableBean1.setLockType(ImportTableLockType.find("1"));
        tableBean1.setLockedOperation(ImportTableLockedOperation.find("2"));
        tableBean1.setImportTargetType(this.getClass());
        tableBean1.setDfsFilePath("hdfs://localhost/user/asakusa/import/11/XXX_1");
        targetTable.put("IMPORT_TARGET1", tableBean1);

        // テスト実行1
        boolean result = loader.checkImportParam(targetTable, targetName, "1", "dummyFileName", true);
        assertFalse(result);

        // 設定変更
        tableBean1.setLockedOperation(null);

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

Examples of com.asakusafw.bulkloader.bean.ImportTargetTableBean

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

        // 設定
        Map<String, ImportTargetTableBean> targetTable = new LinkedHashMap<String, ImportTargetTableBean>();
        ImportTargetTableBean tableBean1 = new ImportTargetTableBean();
        tableBean1.setImportTargetColumns(Arrays.asList(new String[]{"TEXTDATA1", "INTDATA1", "DATEDATA1"}));
        tableBean1.setSearchCondition("INTDATA1=11");
        tableBean1.setUseCache(false);
        tableBean1.setLockType(ImportTableLockType.find("2"));
        tableBean1.setLockedOperation(ImportTableLockedOperation.find("2"));
        tableBean1.setImportTargetType(this.getClass());
        tableBean1.setDfsFilePath("hdfs://localhost/user/asakusa/import/11/XXX_1");
        targetTable.put("IMPORT_TARGET1", tableBean1);

        // テスト実行1
        boolean result = loader.checkImportParam(targetTable, targetName, "1", "dummyFileName", true);
        assertFalse(result);

        // 設定変更
        tableBean1.setLockedOperation(null);

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

Examples of com.asakusafw.bulkloader.bean.ImportTargetTableBean

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

        // 設定
        Map<String, ImportTargetTableBean> targetTable = new LinkedHashMap<String, ImportTargetTableBean>();
        ImportTargetTableBean tableBean1 = new ImportTargetTableBean();
        tableBean1.setImportTargetColumns(Arrays.asList(new String[]{"TEXTDATA1", "INTDATA1", "DATEDATA1"}));
        tableBean1.setSearchCondition("INTDATA1=11");
        tableBean1.setUseCache(false);
        tableBean1.setLockType(ImportTableLockType.find("3"));
        tableBean1.setLockedOperation(ImportTableLockedOperation.find("1"));
        tableBean1.setImportTargetType(this.getClass());
        tableBean1.setDfsFilePath("hdfs://localhost/user/asakusa/import/11/XXX_1");
        targetTable.put("IMPORT_TARGET1", tableBean1);

        // テスト実行1
        boolean result = loader.checkImportParam(targetTable, targetName, "1", "dummyFileName", true);
        assertFalse(result);

        // 設定変更
        tableBean1.setLockedOperation(null);

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

Examples of com.asakusafw.bulkloader.bean.ImportTargetTableBean

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

        // 設定
        Map<String, ImportTargetTableBean> targetTable = new LinkedHashMap<String, ImportTargetTableBean>();
        ImportTargetTableBean tableBean1 = new ImportTargetTableBean();
        tableBean1.setImportTargetColumns(Arrays.asList(new String[]{"TEXTDATA1", "INTDATA1", "DATEDATA1"}));
        tableBean1.setSearchCondition("INTDATA1=11");
        tableBean1.setUseCache(false);
        tableBean1.setLockType(ImportTableLockType.find("3"));
        tableBean1.setLockedOperation(ImportTableLockedOperation.find("2"));
        tableBean1.setImportTargetType(this.getClass());
        tableBean1.setDfsFilePath("hdfs://localhost/user/asakusa/import/11/XXX_1");
        targetTable.put("IMPORT_TARGET1", tableBean1);

        ImportTargetTableBean tableBean2 = new ImportTargetTableBean();
        tableBean2.setImportTargetColumns(Arrays.asList(new String[]{"TEXTDATA2"}));
        tableBean2.setSearchCondition("TEXTDATA2='testdata2-3'");
        tableBean2.setUseCache(false);
        tableBean2.setLockType(ImportTableLockType.find("3"));
        tableBean2.setLockedOperation(ImportTableLockedOperation.find("2"));
        tableBean2.setImportTargetType(this.getClass());
        tableBean2.setDfsFilePath("hdfs://localhost/user/asakusa/import/11/XXX_1");
        targetTable.put("IMPORT_TARGET2", tableBean2);

        ImportTargetTableBean tableBean3 = new ImportTargetTableBean();
        tableBean3.setImportTargetColumns(Arrays.asList(new String[]{"TEXTDATA3"}));
        tableBean3.setSearchCondition("TEXTDATA2='testdata2-3'");
        tableBean3.setUseCache(false);
        tableBean3.setLockType(ImportTableLockType.find("3"));
        tableBean3.setLockedOperation(ImportTableLockedOperation.find("2"));
        tableBean3.setImportTargetType(this.getClass());
        tableBean3.setDfsFilePath("hdfs://localhost/user/asakusa/import/11/XXX_1");
        targetTable.put("IMPORT_TARGET3", tableBean3);

        ImportTargetTableBean tableBean4 = new ImportTargetTableBean();
        tableBean4.setImportTargetColumns(Arrays.asList(new String[]{"TEXTDATA3"}));
        tableBean4.setSearchCondition("TEXTDATA2='testdata2-3'");
        tableBean4.setUseCache(false);
        tableBean4.setLockType(ImportTableLockType.find("3"));
        tableBean4.setLockedOperation(ImportTableLockedOperation.find("2"));
        tableBean4.setImportTargetType(this.getClass());
        tableBean4.setDfsFilePath("hdfs://localhost/user/asakusa/import/11/XXX_1");
        targetTable.put("IMPORT_TARGET4", tableBean4);

        ImportTargetTableBean tableBean5 = new ImportTargetTableBean();
        tableBean5.setImportTargetColumns(Arrays.asList(new String[]{"TEXTDATA3"}));
        tableBean5.setSearchCondition("TEXTDATA2='testdata2-3'");
        tableBean5.setUseCache(false);
        tableBean5.setLockType(ImportTableLockType.find("3"));
        tableBean5.setLockedOperation(ImportTableLockedOperation.find("2"));
        tableBean5.setImportTargetType(this.getClass());
        tableBean5.setDfsFilePath("hdfs://localhost/user/asakusa/import/11/XXX_1");
        targetTable.put("IMPORT_TARGET5", tableBean5);

        // テスト実行
        boolean result = loader.checkImportParam(targetTable, targetName, "1", "dummyFileName", false);
        assertTrue(result);
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.