Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(24)  |  Call(24)  |  Derive(0)  |  Import(0)

src/s/a/sahara-2014.1/sahara/service/edp/workflow_creator/base_workflow.py   sahara(Download)
        x.add_element(self.doc, 'action', error_elem.firstChild)
 
        x.add_text_element_to_tag(self.doc, self.tag_name,
                                  'job-tracker', "${jobTracker}")
        x.add_text_element_to_tag(self.doc, self.tag_name,
                                      'streaming')
 
        x.add_text_element_to_tag(self.doc, 'streaming', element, path)
 
    def _add_configuration_elements(self, configuration):
    def _add_job_xml_element(self, job_xml):
        if job_xml:
            x.add_text_element_to_tag(self.doc, self.tag_name,
                                      'job-xml', job_xml)
 

src/s/a/sahara-HEAD/sahara/service/edp/workflow_creator/base_workflow.py   sahara(Download)
        x.add_element(self.doc, 'action', error_elem.firstChild)
 
        x.add_text_element_to_tag(self.doc, self.tag_name,
                                  'job-tracker', "${jobTracker}")
        x.add_text_element_to_tag(self.doc, self.tag_name,
                                      'streaming')
 
        x.add_text_element_to_tag(self.doc, 'streaming', element, path)
 
    def _add_configuration_elements(self, configuration):
    def _add_job_xml_element(self, job_xml):
        if job_xml:
            x.add_text_element_to_tag(self.doc, self.tag_name,
                                      'job-xml', job_xml)
 

src/s/a/sahara-2014.1/sahara/service/edp/workflow_creator/pig_workflow.py   sahara(Download)
        self._add_configuration_elements(configuration)
 
        x.add_text_element_to_tag(self.doc, self.tag_name,
                                  'script', script_name)
 
        x.add_equal_separated_dict(self.doc, self.tag_name, 'param', params)
 
        for arg in arguments:
            x.add_text_element_to_tag(self.doc, self.tag_name, 'argument', arg)

src/s/a/sahara-HEAD/sahara/service/edp/workflow_creator/pig_workflow.py   sahara(Download)
        self._add_configuration_elements(configuration)
 
        x.add_text_element_to_tag(self.doc, self.tag_name,
                                  'script', script_name)
 
        x.add_equal_separated_dict(self.doc, self.tag_name, 'param', params)
 
        for arg in arguments:
            x.add_text_element_to_tag(self.doc, self.tag_name, 'argument', arg)

src/s/a/sahara-2014.1/sahara/service/edp/workflow_creator/java_workflow.py   sahara(Download)
        self._add_configuration_elements(configuration)
 
        x.add_text_element_to_tag(self.doc, self.tag_name,
                                  'main-class', main_class)
 
        if java_opts:
            x.add_text_element_to_tag(self.doc, self.tag_name,
 
        for arg in arguments:
            x.add_text_element_to_tag(self.doc, self.tag_name,
                                      'arg', arg)
 

src/s/a/sahara-2014.1/sahara/service/edp/workflow_creator/hive_workflow.py   sahara(Download)
        self._add_configuration_elements(configuration)
 
        x.add_text_element_to_tag(self.doc, self.tag_name,
                                  'script', script)
 

src/s/a/sahara-HEAD/sahara/service/edp/workflow_creator/java_workflow.py   sahara(Download)
        self._add_configuration_elements(configuration)
 
        x.add_text_element_to_tag(self.doc, self.tag_name,
                                  'main-class', main_class)
 
        if java_opts:
            x.add_text_element_to_tag(self.doc, self.tag_name,
 
        for arg in arguments:
            x.add_text_element_to_tag(self.doc, self.tag_name,
                                      'arg', arg)
 

src/s/a/sahara-HEAD/sahara/service/edp/workflow_creator/hive_workflow.py   sahara(Download)
        self._add_configuration_elements(configuration)
 
        x.add_text_element_to_tag(self.doc, self.tag_name,
                                  'script', script)
 

src/s/a/sahara-2014.1/sahara/tests/unit/utils/test_xml_utils.py   sahara(Download)
</test>
""")
        x.add_text_element_to_tag(doc, 'tag_to_add', 'p', 'v')
        self.assertEqual(doc.toprettyxml(indent="  "),
                         """<?xml version="1.0" ?>
    def _get_xml_text(self, strip):
        doc = x.load_xml_document("service/edp/resources/workflow.xml", strip)
        x.add_child(doc, 'action', 'java')
        x.add_text_element_to_tag(doc, 'java', 'sometag', 'somevalue')
        return doc.toprettyxml(indent="  ").split("\n")

src/s/a/sahara-HEAD/sahara/tests/unit/utils/test_xml_utils.py   sahara(Download)
</test>
""")
        x.add_text_element_to_tag(doc, 'tag_to_add', 'p', 'v')
        self.assertEqual(doc.toprettyxml(indent="  "),
                         """<?xml version="1.0" ?>
    def _get_xml_text(self, strip):
        doc = x.load_xml_document("service/edp/resources/workflow.xml", strip)
        x.add_child(doc, 'action', 'java')
        x.add_text_element_to_tag(doc, 'java', 'sometag', 'somevalue')
        return doc.toprettyxml(indent="  ").split("\n")