Package org.apache.oozie.util

Examples of org.apache.oozie.util.XConfiguration.toProperties()


        setSystemProperty("oozie.action.output.properties", jobIdsFile.getAbsolutePath());

        URL url = Thread.currentThread().getContextClassLoader().getResource("PigMain.txt");
        File classPathDir = new File(url.getPath()).getParentFile();
        assertTrue(classPathDir.exists());
        Properties props = jobConfiguration.toProperties();
        assertEquals(props.getProperty("oozie.pig.args.size"), "1");
        File pigProps = new File(classPathDir, "pig.properties");

        new LauncherSecurityManager();
        String user = System.getProperty("user.name");
View Full Code Here



        URL url = Thread.currentThread().getContextClassLoader().getResource("PigMain.txt");
        File classPathDir = new File(url.getPath()).getParentFile();
        assertTrue(classPathDir.exists());
        Properties props = jobConf.toProperties();
        assertEquals(props.getProperty("oozie.pig.args.size"), "1");
        File pigProps = new File(classPathDir, "pig.properties");

        new LauncherSecurityManager();
        String user = System.getProperty("user.name");
View Full Code Here

        os.close();

        setSystemProperty("oozie.launcher.job.id", "" + System.currentTimeMillis());
        setSystemProperty("oozie.action.conf.xml", actionXml.getAbsolutePath());

        Properties props = jobConf.toProperties();
        // Test arguments count
        assertEquals(props.getProperty(ShellMain.CONF_OOZIE_SHELL_ARGS + ".size"), "4");
        // Test environment count
        assertEquals(props.getProperty(ShellMain.CONF_OOZIE_SHELL_ENVS + ".size"), "2");
View Full Code Here

            //needed in the testcase classpath
            URL url = Thread.currentThread().getContextClassLoader().getResource("HiveMain.txt");
            File classPathDir = new File(url.getPath()).getParentFile();
            assertTrue(classPathDir.exists());
            Properties props = jobConf.toProperties();
            assertEquals(props.getProperty("oozie.hive.args.size"), "1");
            File hiveSite = new File(classPathDir, "hive-site.xml");

            File outputDataFile = new File(getTestCaseDir(), "outputdata.properties");
View Full Code Here

        setSystemProperty("oozie.action.output.properties", jobIdsFile.getAbsolutePath());

        URL url = Thread.currentThread().getContextClassLoader().getResource("PigMain.txt");
        File classPathDir = new File(url.getPath()).getParentFile();
        assertTrue(classPathDir.exists());
        Properties props = jobConfiguration.toProperties();
        assertEquals(props.getProperty("oozie.pig.args.size"), "1");
        File pigProps = new File(classPathDir, "pig.properties");

        new LauncherSecurityManager();
        String user = System.getProperty("user.name");
View Full Code Here


        URL url = Thread.currentThread().getContextClassLoader().getResource("PigMain.txt");
        File classPathDir = new File(url.getPath()).getParentFile();
        assertTrue(classPathDir.exists());
        Properties props = jobConf.toProperties();
        assertEquals(props.getProperty("oozie.pig.args.size"), "1");
        File pigProps = new File(classPathDir, "pig.properties");

        new LauncherSecurityManager();
        String user = System.getProperty("user.name");
View Full Code Here

            // as it is a read operation an in case of a race condition loading and inserting
            // into the Map is idempotent and the action-config Map is a ConcurrentHashMap
            actionConf = loadActionConf(hostPort, action);
            hostPortActionConfigs.put(action, actionConf);
        }
        return new XConfiguration(actionConf.toProperties());
    }

    private Configuration getConfiguration(String hostPort) {
        hostPort = (hostPort != null) ? hostPort.toLowerCase() : null;
        Configuration conf = hadoopConfigs.get(hostPort);
View Full Code Here

            // as it is a read operation an in case of a race condition loading and inserting
            // into the Map is idempotent and the action-config Map is a ConcurrentHashMap
            actionConf = loadActionConf(hostPort, action);
            hostPortActionConfigs.put(action, actionConf);
        }
        return new XConfiguration(actionConf.toProperties());
    }

    private Configuration getConfiguration(String hostPort) {
        hostPort = (hostPort != null) ? hostPort.toLowerCase() : null;
        Configuration conf = hadoopConfigs.get(hostPort);
View Full Code Here

        assertEquals("jobtracker", gen.getChild("action", ns).getChild("map-reduce", ns).getChildText("job-tracker", ns));
        assertEquals("namenode", gen.getChild("action", ns).getChild("map-reduce", ns).getChildText("name-node", ns));
        Element eConf = gen.getChild("action", ns).getChild("map-reduce", ns).getChild("configuration", ns);
        XConfiguration xConf = new XConfiguration(new StringReader(XmlUtils.prettyPrint(eConf).toString()));
        Properties genProps = xConf.toProperties();
        Properties expectedProps = new Properties();
        expectedProps.setProperty("mapred.mapper.class", "A.Mapper");
        expectedProps.setProperty("mapred.reducer.class", "A.Reducer");
        expectedProps.setProperty("oozie.libpath", "libpath");
        assertEquals(expectedProps, genProps);
View Full Code Here

        setSystemProperty("oozie.action.output.properties", outputDataFile.getAbsolutePath());

        URL url = Thread.currentThread().getContextClassLoader().getResource("PigMain.txt");
        File classPathDir = new File(url.getPath()).getParentFile();
        assertTrue(classPathDir.exists());
        Properties props = jobConf.toProperties();
        assertEquals(props.getProperty("oozie.pig.args.size"), "1");
        File pigProps = new File(classPathDir, "pig.properties");

        new LauncherSecurityManager();
        String user = System.getProperty("user.name");
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.