Beispiel #1
0
 def __init__(self):
     super(VersionHandler, self).__init__()
     self.config_helper = config_helper.ConfigHelperV5()
     self.cloudera_utils = cloudera_utils.ClouderaUtilsV5()
     self.plugin_utils = plugin_utils.PluginUtilsV5()
     self.deploy = deploy
     self.edp_engine = edp_engine
     self.validation = validation.ValidatorV5()
Beispiel #2
0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from sahara.plugins.cdh import confighints_helper as ch_helper
from sahara.plugins.cdh.v5 import cloudera_utils as cu
from sahara.plugins import exceptions as ex
from sahara.plugins import utils as u
from sahara.service.edp import hdfs_helper
from sahara.service.edp.oozie import engine as edp_engine
from sahara.utils import edp

CU = cu.ClouderaUtilsV5()


class EdpOozieEngine(edp_engine.OozieJobEngine):
    def get_hdfs_user(self):
        return 'hdfs'

    def create_hdfs_dir(self, remote, dir_name):
        hdfs_helper.create_dir_hadoop2(remote, dir_name, self.get_hdfs_user())

    def get_oozie_server_uri(self, cluster):
        oozie_ip = CU.pu.get_oozie(cluster).management_ip
        return 'http://%s:11000/oozie' % oozie_ip

    def get_name_node_uri(self, cluster):
        namenode_ip = CU.pu.get_namenode(cluster).fqdn()
Beispiel #3
0
 def __init__(self, cluster):
     super(EdpOozieEngine, self).__init__(cluster)
     self.cloudera_utils = cu.ClouderaUtilsV5()