当前位置: 首页>>代码示例>>Java>>正文


Java Cluster.getProperties方法代码示例

本文整理汇总了Java中org.apache.falcon.entity.v0.cluster.Cluster.getProperties方法的典型用法代码示例。如果您正苦于以下问题:Java Cluster.getProperties方法的具体用法?Java Cluster.getProperties怎么用?Java Cluster.getProperties使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.falcon.entity.v0.cluster.Cluster的用法示例。


在下文中一共展示了Cluster.getProperties方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createAppProperties

import org.apache.falcon.entity.v0.cluster.Cluster; //导入方法依赖的package包/类
protected Properties createAppProperties(String clusterName, Path bundlePath, String user) throws FalconException {

        Cluster cluster = EntityUtil.getEntity(EntityType.CLUSTER, clusterName);
        Properties properties = new Properties();
        if (cluster.getProperties() != null) {
            addClusterProperties(properties, cluster.getProperties()
                    .getProperties());
        }
        properties.setProperty(OozieWorkflowEngine.NAME_NODE,
                ClusterHelper.getStorageUrl(cluster));
        properties.setProperty(OozieWorkflowEngine.JOB_TRACKER,
                ClusterHelper.getMREndPoint(cluster));
        properties.setProperty(OozieClient.BUNDLE_APP_PATH,
                "${" + OozieWorkflowEngine.NAME_NODE + "}" + bundlePath.toString());
        properties.setProperty("colo.name", cluster.getColo());

        properties.setProperty(OozieClient.USER_NAME, user);
        properties.setProperty(OozieClient.USE_SYSTEM_LIBPATH, "true");
        properties.setProperty("falcon.libpath", ClusterHelper.getLocation(cluster, "working") + "/lib");
        LOG.info("Cluster: " + cluster.getName() + ", PROPS: " + properties);
        return properties;
    }
 
开发者ID:shaikidris,项目名称:incubator-falcon,代码行数:23,代码来源:OozieWorkflowBuilder.java

示例2: createCoordDefaultConfiguration

import org.apache.falcon.entity.v0.cluster.Cluster; //导入方法依赖的package包/类
protected Map<String, String> createCoordDefaultConfiguration(Cluster cluster, Path coordPath, String coordName) {
    Map<String, String> props = new HashMap<String, String>();
    props.put(ARG.entityName.getPropName(), entity.getName());
    props.put(ARG.nominalTime.getPropName(), NOMINAL_TIME_EL);
    props.put(ARG.timeStamp.getPropName(), ACTUAL_TIME_EL);
    props.put("userBrokerUrl", ClusterHelper.getMessageBrokerUrl(cluster));
    props.put("userBrokerImplClass", ClusterHelper.getMessageBrokerImplClass(cluster));
    String falconBrokerUrl = StartupProperties.get().getProperty(ARG.brokerUrl.getPropName(),
            "tcp://localhost:61616?daemon=true");
    props.put(ARG.brokerUrl.getPropName(), falconBrokerUrl);
    String falconBrokerImplClass = StartupProperties.get().getProperty(ARG.brokerImplClass.getPropName(),
            ClusterHelper.DEFAULT_BROKER_IMPL_CLASS);
    props.put(ARG.brokerImplClass.getPropName(), falconBrokerImplClass);
    String jmsMessageTTL = StartupProperties.get().getProperty("broker.ttlInMins",
            DEFAULT_BROKER_MSG_TTL.toString());
    props.put(ARG.brokerTTL.getPropName(), jmsMessageTTL);
    props.put(ARG.entityType.getPropName(), entity.getEntityType().name());
    props.put("logDir", getStoragePath(new Path(coordPath, "../../logs")));
    props.put(OozieClient.EXTERNAL_ID,
            new ExternalId(entity.getName(), EntityUtil.getWorkflowNameTag(coordName, entity),
                    "${coord:nominalTime()}").getId());
    props.put("workflowEngineUrl", ClusterHelper.getOozieUrl(cluster));
    try {
        if (EntityUtil.getLateProcess(entity) == null
                || EntityUtil.getLateProcess(entity).getLateInputs() == null
                || EntityUtil.getLateProcess(entity).getLateInputs().size() == 0) {
            props.put("shouldRecord", "false");
        } else {
            props.put("shouldRecord", "true");
        }
    } catch (FalconException e) {
        LOG.error("Unable to get Late Process for entity:" + entity, e);
        throw new FalconRuntimException(e);
    }
    props.put("entityName", entity.getName());
    props.put("entityType", entity.getEntityType().name().toLowerCase());
    props.put(ARG.cluster.getPropName(), cluster.getName());
    if (cluster.getProperties() != null) {
        for (Property prop : cluster.getProperties().getProperties()) {
            props.put(prop.getName(), prop.getValue());
        }
    }

    props.put(MR_QUEUE_NAME, "default");
    props.put(MR_JOB_PRIORITY, "NORMAL");
    //props in entity override the set props.
    props.putAll(getEntityProperties());
    return props;
}
 
开发者ID:shaikidris,项目名称:incubator-falcon,代码行数:50,代码来源:AbstractOozieEntityMapper.java


注:本文中的org.apache.falcon.entity.v0.cluster.Cluster.getProperties方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。