本文整理汇总了Java中org.apache.mesos.state.ZooKeeperState类的典型用法代码示例。如果您正苦于以下问题:Java ZooKeeperState类的具体用法?Java ZooKeeperState怎么用?Java ZooKeeperState使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ZooKeeperState类属于org.apache.mesos.state包,在下文中一共展示了ZooKeeperState类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: State
import org.apache.mesos.state.ZooKeeperState; //导入依赖的package包/类
/**
* Constructor for State
*
* @param zookeeperUrl the URL of the Zookeeper
*/
public State(String zookeeperUrl) {
Matcher matcher = validateZookeeperUrl(zookeeperUrl);
state = new ZooKeeperState(
matcher.group(1),
30000,
TimeUnit.MILLISECONDS,
"/" + SchedulerConfiguration.getFrameworkName() + matcher.group(2));
}
开发者ID:Praqma,项目名称:mesos-kibana,代码行数:14,代码来源:State.java
示例2: PersistentStateStore
import org.apache.mesos.state.ZooKeeperState; //导入依赖的package包/类
public PersistentStateStore(ZooKeeperState zk, int desiredInstances) {
this.zk = zk;
this.zkFuture = zk.fetch(CRATE_STATE);
this.state = restore();
int nodeCount = state.desiredInstances().getValue() == CrateState.UNDEFINED_DESIRED_INSTANCES ?
desiredInstances :
state.desiredInstances().getValue();
desiredInstances(nodeCount);
}
开发者ID:crate,项目名称:crate-mesos-framework,代码行数:10,代码来源:PersistentStateStore.java
示例3: PersistentState
import org.apache.mesos.state.ZooKeeperState; //导入依赖的package包/类
@Autowired
public PersistentState(LogstashSettings logstashSettings) {
if (logstashSettings.getNativeLibrary() != null) {
MesosNativeLibrary.load(logstashSettings.getNativeLibrary());
}
this.zkState = new ZooKeeperState(logstashSettings.getStateZkServers(),
logstashSettings.getStateZkTimeout(),
TimeUnit.MILLISECONDS,
"/logstash-mesos/" + logstashSettings.getFrameworkName());
}
开发者ID:triforkse,项目名称:logstash-mesos,代码行数:13,代码来源:PersistentState.java
示例4: HBaseZkStore
import org.apache.mesos.state.ZooKeeperState; //导入依赖的package包/类
@Inject
public HBaseZkStore(HBaseFrameworkConfig hbaseFrameworkConfig) {
this.state = new ZooKeeperState(hbaseFrameworkConfig.getStateZkServers(),
hbaseFrameworkConfig.getStateZkTimeout(),
TimeUnit.MILLISECONDS,
"/hbase-mesos/" + hbaseFrameworkConfig.getFrameworkName());
}
开发者ID:jan-zajic,项目名称:mesos-hbase,代码行数:9,代码来源:HBaseZkStore.java
示例5: providesStateStore
import org.apache.mesos.state.ZooKeeperState; //导入依赖的package包/类
@Provides
@Singleton
State providesStateStore(MyriadConfiguration cfg) {
return new ZooKeeperState(cfg.getZkServers(), cfg.getZkTimeout(), TimeUnit.MILLISECONDS, "/myriad/" + cfg.getFrameworkName());
}
开发者ID:apache,项目名称:incubator-myriad,代码行数:6,代码来源:MesosModule.java
注:本文中的org.apache.mesos.state.ZooKeeperState类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论