本文整理汇总了Java中com.facebook.presto.spi.ConnectorHandleResolver类的典型用法代码示例。如果您正苦于以下问题:Java ConnectorHandleResolver类的具体用法?Java ConnectorHandleResolver怎么用?Java ConnectorHandleResolver使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ConnectorHandleResolver类属于com.facebook.presto.spi包,在下文中一共展示了ConnectorHandleResolver类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getHandleResolver
import com.facebook.presto.spi.ConnectorHandleResolver; //导入依赖的package包/类
@Override
public ConnectorHandleResolver getHandleResolver()
{
return new ConnectorHandleResolver()
{
public Class<? extends ConnectorTableHandle> getTableHandleClass()
{
return RestTableHandle.class;
}
public Class<? extends ColumnHandle> getColumnHandleClass()
{
return RestColumnHandle.class;
}
public Class<? extends ConnectorSplit> getSplitClass()
{
return RestConnectorSplit.class;
}
public Class<? extends ConnectorTableLayoutHandle> getTableLayoutHandleClass()
{
return RestConnectorTableLayoutHandle.class;
}
@Override
public Class<? extends ConnectorTransactionHandle> getTransactionHandleClass()
{
return RestTransactionHandle.class;
}
@Override
public Class<? extends ConnectorInsertTableHandle> getInsertTableHandleClass()
{
return RestInsertTableHandle.class;
}
};
}
开发者ID:prestodb-rocks,项目名称:presto-rest,代码行数:39,代码来源:RestConnectorFactory.java
示例2: addConnectorName
import com.facebook.presto.spi.ConnectorHandleResolver; //导入依赖的package包/类
public void addConnectorName(String name, ConnectorHandleResolver resolver)
{
requireNonNull(name, "name is null");
requireNonNull(resolver, "resolver is null");
ConnectorHandleResolver existingResolver = handleResolvers.putIfAbsent(name, resolver);
checkState(existingResolver == null || existingResolver.equals(resolver),
"Connector '%s' is already assigned to resolver: %s", name, existingResolver);
}
开发者ID:y-lan,项目名称:presto,代码行数:9,代码来源:HandleResolver.java
示例3: getId
import com.facebook.presto.spi.ConnectorHandleResolver; //导入依赖的package包/类
private <T> String getId(T handle, Function<ConnectorHandleResolver, Class<? extends T>> getter)
{
for (Entry<String, ConnectorHandleResolver> entry : handleResolvers.entrySet()) {
try {
if (getter.apply(entry.getValue()).isInstance(handle)) {
return entry.getKey();
}
}
catch (UnsupportedOperationException ignored) {
}
}
throw new IllegalArgumentException("No connector for handle: " + handle);
}
开发者ID:y-lan,项目名称:presto,代码行数:14,代码来源:HandleResolver.java
示例4: KafkaConnector
import com.facebook.presto.spi.ConnectorHandleResolver; //导入依赖的package包/类
@Inject
public KafkaConnector(ConnectorMetadata metadata,
ConnectorSplitManager splitManager,
ConnectorRecordSetProvider recordSetProvider,
ConnectorHandleResolver handleResolver)
{
construct(metadata, splitManager, recordSetProvider, handleResolver);
}
开发者ID:dropbox,项目名称:presto-kafka-connector,代码行数:9,代码来源:KafkaConnector.java
示例5: construct
import com.facebook.presto.spi.ConnectorHandleResolver; //导入依赖的package包/类
private void construct(ConnectorMetadata metadata,
ConnectorSplitManager splitManager,
ConnectorRecordSetProvider recordSetProvider,
ConnectorHandleResolver handleResolver)
{
this.metadata = checkNotNull(metadata, "metadata is null");
this.splitManager = checkNotNull(splitManager, "splitManager is null");
this.recordSetProvider = checkNotNull(recordSetProvider,
"recordSetProvider is null");
this.handleResolver = checkNotNull(handleResolver,
"handleResolver is null");
}
开发者ID:dropbox,项目名称:presto-kafka-connector,代码行数:13,代码来源:KafkaConnector.java
示例6: create
import com.facebook.presto.spi.ConnectorHandleResolver; //导入依赖的package包/类
@Override
public Connector create(final String connectorId, Map<String, String> requiredConfig) {
checkNotNull(requiredConfig, "requiredConfig is null");
checkNotNull(optionalConfig, "optionalConfig is null");
try {
// // A plugin is not required to use Guice; it is just very convenient
// Bootstrap app = new Bootstrap(new JsonModule(), new ExampleModule(connectorId));
//
// Injector injector = app.strictConfig().doNotInitializeLogging()
// .setRequiredConfigurationProperties(requiredConfig)
// .setOptionalConfigurationProperties(optionalConfig).initialize();
ClassToInstanceMap<Object> services = ImmutableClassToInstanceMap.builder()
.put(ConnectorMetadata.class, new CloudataConnectorMetadata(connectorId, store))
.put(ConnectorSplitManager.class, new CloudataSplitManager(nodeManager, connectorId))
.put(ConnectorRecordSetProvider.class, new CloudataConnectorRecordSetProvider())
.put(ConnectorHandleResolver.class, new CloudataConnectorHandleResolver()).build();
CloudataConnector connector = new CloudataConnector(store, services);
connectors.put(connectorId, connector);
return connector;
} catch (Exception e) {
throw Throwables.propagate(e);
}
}
开发者ID:justinsb,项目名称:cloudata,代码行数:31,代码来源:CloudataConnectorFactory.java
示例7: getHandleResolver
import com.facebook.presto.spi.ConnectorHandleResolver; //导入依赖的package包/类
@Override
public ConnectorHandleResolver getHandleResolver()
{
return new HDFSHandleResolver();
}
开发者ID:dbiir,项目名称:paraflow,代码行数:6,代码来源:HDFSConnectorFactory.java
示例8: getHandleResolver
import com.facebook.presto.spi.ConnectorHandleResolver; //导入依赖的package包/类
@Override
public ConnectorHandleResolver getHandleResolver() {
return new EthereumHandleResolver();
}
开发者ID:xiaoyao1991,项目名称:presto-ethereum,代码行数:5,代码来源:EthereumConnectorFactory.java
示例9: getHandleResolver
import com.facebook.presto.spi.ConnectorHandleResolver; //导入依赖的package包/类
public ConnectorHandleResolver getHandleResolver() {
log.info("INFORMATION: AmpoolConnectorFactory getHandleResolver() called.");
return new AmpoolHandleResolver();
}
开发者ID:ampool,项目名称:monarch,代码行数:5,代码来源:AmpoolConnectorFactory.java
示例10: getHandleResolver
import com.facebook.presto.spi.ConnectorHandleResolver; //导入依赖的package包/类
@Override
public ConnectorHandleResolver getHandleResolver()
{
return new KuduHandleResolver();
}
开发者ID:trackingio,项目名称:presto-kudu,代码行数:6,代码来源:KuduConnectorFactory.java
示例11: getHandleResolver
import com.facebook.presto.spi.ConnectorHandleResolver; //导入依赖的package包/类
@Override
public ConnectorHandleResolver getHandleResolver()
{
return new KafkaHandleResolver();
}
开发者ID:y-lan,项目名称:presto,代码行数:6,代码来源:KafkaConnectorFactory.java
示例12: getHandleResolver
import com.facebook.presto.spi.ConnectorHandleResolver; //导入依赖的package包/类
@Override
public ConnectorHandleResolver getHandleResolver()
{
return new ExampleHandleResolver();
}
开发者ID:y-lan,项目名称:presto,代码行数:6,代码来源:ExampleConnectorFactory.java
示例13: getHandleResolver
import com.facebook.presto.spi.ConnectorHandleResolver; //导入依赖的package包/类
@Override
public ConnectorHandleResolver getHandleResolver()
{
return new RaptorHandleResolver();
}
开发者ID:y-lan,项目名称:presto,代码行数:6,代码来源:RaptorConnectorFactory.java
示例14: getHandleResolver
import com.facebook.presto.spi.ConnectorHandleResolver; //导入依赖的package包/类
@Override
public ConnectorHandleResolver getHandleResolver()
{
return new RedisHandleResolver();
}
开发者ID:y-lan,项目名称:presto,代码行数:6,代码来源:RedisConnectorFactory.java
示例15: getHandleResolver
import com.facebook.presto.spi.ConnectorHandleResolver; //导入依赖的package包/类
@Override
public ConnectorHandleResolver getHandleResolver()
{
return new BlackHoleHandleResolver();
}
开发者ID:y-lan,项目名称:presto,代码行数:6,代码来源:BlackHoleConnectorFactory.java
示例16: getHandleResolver
import com.facebook.presto.spi.ConnectorHandleResolver; //导入依赖的package包/类
@Override
public ConnectorHandleResolver getHandleResolver()
{
return new TpchIndexHandleResolver();
}
开发者ID:y-lan,项目名称:presto,代码行数:6,代码来源:IndexedTpchConnectorFactory.java
示例17: getHandleResolver
import com.facebook.presto.spi.ConnectorHandleResolver; //导入依赖的package包/类
@Override
public ConnectorHandleResolver getHandleResolver()
{
return new JmxHandleResolver();
}
开发者ID:y-lan,项目名称:presto,代码行数:6,代码来源:JmxConnectorFactory.java
示例18: getHandleResolver
import com.facebook.presto.spi.ConnectorHandleResolver; //导入依赖的package包/类
@Override
public ConnectorHandleResolver getHandleResolver()
{
return new JdbcHandleResolver();
}
开发者ID:y-lan,项目名称:presto,代码行数:6,代码来源:JdbcConnectorFactory.java
示例19: getHandleResolver
import com.facebook.presto.spi.ConnectorHandleResolver; //导入依赖的package包/类
@Override
public ConnectorHandleResolver getHandleResolver()
{
return new LegacyTransactionHandleResolver(connectorFactory.getHandleResolver());
}
开发者ID:y-lan,项目名称:presto,代码行数:6,代码来源:LegacyTransactionConnectorFactory.java
示例20: LegacyTransactionHandleResolver
import com.facebook.presto.spi.ConnectorHandleResolver; //导入依赖的package包/类
public LegacyTransactionHandleResolver(ConnectorHandleResolver handleResolver)
{
this.handleResolver = requireNonNull(handleResolver, "handleResolver is null");
}
开发者ID:y-lan,项目名称:presto,代码行数:5,代码来源:LegacyTransactionHandleResolver.java
注:本文中的com.facebook.presto.spi.ConnectorHandleResolver类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论