- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中co.cask.cdap.common.guice.ZKClientModule.<init>()
方法的一些代码示例,展示了ZKClientModule.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZKClientModule.<init>()
方法的具体详情如下:
包路径:co.cask.cdap.common.guice.ZKClientModule
类名称:ZKClientModule
方法名:<init>
暂无
代码示例来源:origin: cdapio/cdap
/**
* Creates a guice {@link Injector} used by this master service process.
*/
@VisibleForTesting
static Injector createProcessInjector(CConfiguration cConf, Configuration hConf) {
return Guice.createInjector(
new ConfigModule(cConf, hConf),
new ZKClientModule(),
new KafkaLogAppenderModule()
);
}
代码示例来源:origin: cdapio/cdap
@Override
public void init(String[] args) {
Injector injector = Guice.createInjector(new ConfigModule(),
new IOModule(),
new ZKClientModule(),
new ZKDiscoveryModule(),
new SecurityModules().getDistributedModules());
configuration = injector.getInstance(CConfiguration.class);
if (configuration.getBoolean(Constants.Security.ENABLED)) {
this.zkClientService = injector.getInstance(ZKClientService.class);
this.authServer = injector.getInstance(ExternalAuthenticationServer.class);
}
}
代码示例来源:origin: cdapio/cdap
@VisibleForTesting
static Injector createInjector(CConfiguration cConf, Configuration hConf) {
return Guice.createInjector(
new ConfigModule(cConf, hConf),
new ZKClientModule(),
new ZKDiscoveryModule(),
new IOModule(),
new KafkaClientModule(),
new DFSLocationModule()
);
}
}
代码示例来源:origin: caskdata/cdap
private Injector createInjector() {
List<Module> modules = ImmutableList.<Module>builder()
.add(new ConfigModule(cConf))
.add(new ZKClientModule())
.add(new KafkaClientModule())
.addAll(extraModules)
.build();
return Guice.createInjector(modules);
}
代码示例来源:origin: cdapio/cdap
static Injector createGuiceInjector(CConfiguration cConf) {
return Guice.createInjector(
new ConfigModule(cConf),
new ZKClientModule(),
new ZKDiscoveryModule(),
new RouterModules().getDistributedModules(),
new SecurityModules().getDistributedModules(),
new IOModule(),
new AbstractModule() {
@Override
protected void configure() {
bind(RouteStore.class).to(ZKRouteStore.class).in(Scopes.SINGLETON);
}
}
);
}
}
代码示例来源:origin: cdapio/cdap
@BeforeClass
public static void startUp() throws Exception {
HBaseTestingUtility testUtil = new HBaseTestingUtility();
zkCluster = testUtil.startMiniZKCluster();
zkConnectString = testUtil.getConfiguration().get(HConstants.ZOOKEEPER_QUORUM) + ":"
+ zkCluster.getClientPort();
LOG.info("Running ZK cluster at " + zkConnectString);
CConfiguration cConf = CConfiguration.create();
cConf.set(Constants.Zookeeper.QUORUM, zkConnectString);
injector1 = Guice.createInjector(new ConfigModule(cConf, testUtil.getConfiguration()),
new ZKClientModule());
injector2 = Guice.createInjector(new ConfigModule(cConf, testUtil.getConfiguration()),
new ZKClientModule());
}
代码示例来源:origin: cdapio/cdap
@VisibleForTesting
public static Injector createInjector(CConfiguration cConf, Configuration hConf) {
return Guice.createInjector(
new ConfigModule(cConf, hConf),
new IOModule(),
new ZKClientModule(),
new ZKDiscoveryModule(),
new KafkaClientModule(),
new MetricsClientRuntimeModule().getDistributedModules(),
new KafkaLogAppenderModule(),
new DFSLocationModule(),
new NamespaceQueryAdminModule(),
new AuthorizationEnforcementModule().getDistributedModules(),
new AuthenticationContextModules().getMasterModule(),
new MessagingServerRuntimeModule().getDistributedModules()
);
}
}
代码示例来源:origin: caskdata/cdap
new ZKClientModule(),
new ZKDiscoveryModule(),
new DFSLocationModule(),
代码示例来源:origin: cdapio/cdap
@BeforeClass
public static void init() throws IOException {
zkServer = InMemoryZKServer.builder().setDataDir(TMP_FOLDER.newFolder()).build();
zkServer.startAndWait();
CConfiguration cConf = CConfiguration.create();
cConf.set(Constants.Zookeeper.QUORUM, zkServer.getConnectionStr());
Injector injector = Guice.createInjector(new ConfigModule(cConf),
new ZKClientModule());
zkClientService = injector.getInstance(ZKClientService.class);
zkClientService.startAndWait();
}
代码示例来源:origin: cdapio/cdap
@VisibleForTesting
public static Injector createInjector(CConfiguration cConf, Configuration hConf) {
return Guice.createInjector(
new ConfigModule(cConf, hConf),
new IOModule(),
new ZKClientModule(),
new ZKDiscoveryModule(),
new KafkaClientModule(),
new DFSLocationModule(),
new DataFabricModules(HBaseTableExporter.class.getName()).getDistributedModules(),
new DataSetsModules().getDistributedModules(),
new MessagingClientModule(),
new MetricsClientRuntimeModule().getDistributedModules(),
new KafkaLogAppenderModule(),
new ExploreClientModule(),
new AuthorizationModule(),
new AuthorizationEnforcementModule().getMasterModule(),
new AuthenticationContextModules().getMasterModule(),
new NamespaceQueryAdminModule(),
new SecureStoreServerModule(),
new AbstractModule() {
@Override
protected void configure() {
bind(UGIProvider.class).to(RemoteUGIProvider.class);
bind(OwnerAdmin.class).to(DefaultOwnerAdmin.class);
}
}
);
}
代码示例来源:origin: cdapio/cdap
@VisibleForTesting
static Injector createInjector(CConfiguration cConf, Configuration hConf) {
return Guice.createInjector(
new ConfigModule(cConf, hConf),
new ZKClientModule(),
new DFSLocationModule(),
new NamespaceQueryAdminModule(),
new ZKDiscoveryModule(),
new DataFabricModules("cdap.explore.ContextManager").getDistributedModules(),
new DataSetsModules().getDistributedModules(),
new ExploreClientModule(),
new KafkaClientModule(),
new AuditModule().getDistributedModules(),
new AuthorizationEnforcementModule().getDistributedModules(),
new SecureStoreClientModule(),
new AuthenticationContextModules().getMasterModule(),
new MessagingClientModule(),
new AbstractModule() {
@Override
protected void configure() {
bind(UGIProvider.class).to(RemoteUGIProvider.class).in(Scopes.SINGLETON);
bind(MetricsCollectionService.class).to(NoOpMetricsCollectionService.class).in(Scopes.SINGLETON);
// bind PrivilegesManager to a remote implementation, so it does not need to instantiate the authorizer
bind(PrivilegesManager.class).to(RemotePrivilegesManager.class);
bind(OwnerAdmin.class).to(DefaultOwnerAdmin.class);
}
}
);
}
代码示例来源:origin: cdapio/cdap
@VisibleForTesting
static Injector createGuiceInjector(CConfiguration cConf, Configuration hConf, TwillContext twillContext) {
String txClientId = String.format("cdap.service.%s.%d", Constants.Service.LOGSAVER, twillContext.getInstanceId());
return Guice.createInjector(
new ConfigModule(cConf, hConf),
new IOModule(),
new ZKClientModule(),
new ZKDiscoveryModule(),
new KafkaClientModule(),
new MetricsClientRuntimeModule().getDistributedModules(),
new DFSLocationModule(),
new NamespaceQueryAdminModule(),
new DataFabricModules(txClientId).getDistributedModules(),
new DataSetsModules().getDistributedModules(),
new DistributedLogFrameworkModule(twillContext),
new KafkaLogAppenderModule(),
new AuditModule().getDistributedModules(),
new AuthorizationEnforcementModule().getDistributedModules(),
new AuthenticationContextModules().getMasterModule(),
new MessagingClientModule(),
new AbstractModule() {
@Override
protected void configure() {
bind(OwnerAdmin.class).to(DefaultOwnerAdmin.class);
bind(UGIProvider.class).to(RemoteUGIProvider.class).in(Scopes.SINGLETON);
}
}
);
}
}
代码示例来源:origin: cdapio/cdap
@BeforeClass
public static void setup() throws Exception {
HBaseTestingUtility testUtil = new HBaseTestingUtility();
zkCluster = testUtil.startMiniZKCluster();
String zkConnectString = testUtil.getConfiguration().get(HConstants.ZOOKEEPER_QUORUM) + ":"
+ zkCluster.getClientPort();
LOG.info("Running ZK cluster at " + zkConnectString);
CConfiguration cConf1 = CConfiguration.create();
cConf1.set(Constants.Zookeeper.QUORUM, zkConnectString);
CConfiguration cConf2 = CConfiguration.create();
cConf2.set(Constants.Zookeeper.QUORUM, zkConnectString);
injector1 = Guice.createInjector(new ConfigModule(cConf1, testUtil.getConfiguration()), new IOModule(),
new SecurityModules().getDistributedModules(), new ZKClientModule(),
new ZKDiscoveryModule());
injector2 = Guice.createInjector(new ConfigModule(cConf2, testUtil.getConfiguration()), new IOModule(),
new SecurityModules().getDistributedModules(), new ZKClientModule(),
new ZKDiscoveryModule());
}
代码示例来源:origin: cdapio/cdap
@Test
public void testMasterDiscovery() {
Injector injector = Guice.createInjector(
new ConfigModule(cConf),
new ZKClientModule(),
new ZKDiscoveryModule()
);
ZKClientService zkClient = injector.getInstance(ZKClientService.class);
zkClient.startAndWait();
try {
DiscoveryService discoveryService = injector.getInstance(DiscoveryService.class);
DiscoveryServiceClient discoveryServiceClient = injector.getInstance(DiscoveryServiceClient.class);
// Register a master service
InetSocketAddress socketAddr = new InetSocketAddress(InetAddress.getLoopbackAddress(), 43210);
Cancellable cancellable = discoveryService.register(new Discoverable(Constants.Service.APP_FABRIC_HTTP,
socketAddr));
try {
// Discover the master service
Discoverable discoverable = new RandomEndpointStrategy(
() -> discoveryServiceClient.discover(Constants.Service.APP_FABRIC_HTTP)).pick(10, TimeUnit.SECONDS);
Assert.assertNotNull(discoverable);
Assert.assertEquals(Constants.Service.APP_FABRIC_HTTP, discoverable.getName());
Assert.assertEquals(socketAddr, discoverable.getSocketAddress());
} finally {
cancellable.cancel();
}
} finally {
zkClient.stopAndWait();
}
}
代码示例来源:origin: cdapio/cdap
@VisibleForTesting
static Injector createGuiceInjector(CConfiguration cConf, Configuration hConf, String txClientId,
TwillContext twillContext) {
return Guice.createInjector(
new ConfigModule(cConf, hConf),
new IOModule(),
new ZKClientModule(),
new ZKDiscoveryModule(),
new KafkaClientModule(),
new MessagingClientModule(),
new MetricsClientRuntimeModule().getDistributedModules(),
new MetricsStoreModule(),
new KafkaLogAppenderModule(),
new DFSLocationModule(),
new NamespaceQueryAdminModule(),
new DataFabricModules(txClientId).getDistributedModules(),
new DataSetsModules().getDistributedModules(),
new MetricsProcessorModule(twillContext),
new MetricsProcessorStatusServiceModule(),
new AuditModule().getDistributedModules(),
new AuthorizationEnforcementModule().getDistributedModules(),
new AuthenticationContextModules().getMasterModule(),
new AbstractModule() {
@Override
protected void configure() {
bind(OwnerAdmin.class).to(DefaultOwnerAdmin.class);
}
}
);
}
代码示例来源:origin: cdapio/cdap
Injector injector = Guice.createInjector(
new ConfigModule(cConf),
new ZKClientModule(),
new ZKDiscoveryModule()
);
代码示例来源:origin: cdapio/cdap
new ConfigModule(cConf, hConf),
new IOModule(),
new ZKClientModule(),
new ZKDiscoveryModule(),
new KafkaClientModule(),
代码示例来源:origin: cdapio/cdap
new ConfigModule(cConf, hConf),
new IOModule(),
new ZKClientModule(),
new ZKDiscoveryModule(),
new KafkaClientModule(),
代码示例来源:origin: cdapio/cdap
new ConfigModule(cConf, hConf),
new IOModule(),
new ZKClientModule(),
new ZKDiscoveryModule(),
new KafkaClientModule(),
代码示例来源:origin: co.cask.cdap/cdap-explore
return Guice.createInjector(
new ConfigModule(cConf, hConf),
new ZKClientModule(),
new LocationRuntimeModule().getDistributedModules(),
new NamespaceClientRuntimeModule().getDistributedModules(),
本文整理了Java中co.cask.cdap.api.workflow.WorkflowToken类的一些代码示例,展示了WorkflowToken类的具体用法。这些代码示例主要来源于Github/S
本文整理了Java中co.cask.cdap.api.workflow.WorkflowSpecification类的一些代码示例,展示了WorkflowSpecification类的具体用法。这些代
本文整理了Java中co.cask.cdap.common.guice.ZKClientModule类的一些代码示例,展示了ZKClientModule类的具体用法。这些代码示例主要来源于Github
本文整理了Java中co.cask.cdap.common.guice.ZKDiscoveryModule类的一些代码示例,展示了ZKDiscoveryModule类的具体用法。这些代码示例主要来源于
本文整理了Java中co.cask.cdap.common.zookeeper.ZKExtOperations类的一些代码示例,展示了ZKExtOperations类的具体用法。这些代码示例主要来源于
本文整理了Java中co.cask.cdap.common.zookeeper.store.ZKPropertyStore类的一些代码示例,展示了ZKPropertyStore类的具体用法。这些代码示
我想通过使用 cdap 源插件来读取可供 Sftp 服务器使用的 csv 文件。 我遇到了FTP Batch Source插件做同样的事情。但是当运行这个时,我遇到了异常。 Caused by: ja
本文整理了Java中co.cask.cdap.api.workflow.WorkflowSpecification.getName()方法的一些代码示例,展示了WorkflowSpecificatio
本文整理了Java中co.cask.cdap.api.workflow.WorkflowSpecification.getNodeIdMap()方法的一些代码示例,展示了WorkflowSpecifi
本文整理了Java中co.cask.cdap.api.workflow.WorkflowSpecification.getLocalDatasetSpecs()方法的一些代码示例,展示了Workflo
本文整理了Java中co.cask.cdap.api.workflow.WorkflowSpecification.()方法的一些代码示例,展示了WorkflowSpecification.()的具体
本文整理了Java中co.cask.cdap.api.workflow.WorkflowToken.getAll()方法的一些代码示例,展示了WorkflowToken.getAll()的具体用法。这
本文整理了Java中co.cask.cdap.api.workflow.WorkflowToken.put()方法的一些代码示例,展示了WorkflowToken.put()的具体用法。这些代码示例主
本文整理了Java中co.cask.cdap.api.workflow.WorkflowToken.getAllFromNode()方法的一些代码示例,展示了WorkflowToken.getAllF
本文整理了Java中co.cask.cdap.api.workflow.WorkflowSpecification.getClassName()方法的一些代码示例,展示了WorkflowSpecifi
本文整理了Java中co.cask.cdap.api.workflow.WorkflowSpecification.getPlugins()方法的一些代码示例,展示了WorkflowSpecifica
本文整理了Java中co.cask.cdap.api.workflow.WorkflowSpecification.getNodes()方法的一些代码示例,展示了WorkflowSpecificati
本文整理了Java中co.cask.cdap.api.workflow.WorkflowSpecification.getDescription()方法的一些代码示例,展示了WorkflowSpeci
本文整理了Java中co.cask.cdap.common.guice.ZKClientModule.()方法的一些代码示例,展示了ZKClientModule.()的具体用法。这些代码示例主要来源于
本文整理了Java中co.cask.cdap.common.guice.ZKDiscoveryModule.()方法的一些代码示例,展示了ZKDiscoveryModule.()的具体用法。这些代码示
我是一名优秀的程序员,十分优秀!