本文整理了Java中org.apache.druid.guice.annotations.Json.<init>()
方法的一些代码示例,展示了Json.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Json.<init>()
方法的具体详情如下:
包路径:org.apache.druid.guice.annotations.Json
类名称:Json
方法名:<init>
暂无
代码示例来源:origin: apache/incubator-druid
@Inject
public DefaultTimeseriesQueryMetricsFactory(@Json ObjectMapper jsonMapper)
{
this.jsonMapper = jsonMapper;
}
代码示例来源:origin: apache/incubator-druid
@Inject
public DefaultGroupByQueryMetricsFactory(@Json ObjectMapper jsonMapper)
{
this.jsonMapper = jsonMapper;
}
代码示例来源:origin: apache/incubator-druid
@Inject
public CuratorDruidNodeDiscoveryProvider(
CuratorFramework curatorFramework,
ZkPathsConfig config,
@Json ObjectMapper jsonMapper
)
{
this.curatorFramework = curatorFramework;
this.config = config;
this.jsonMapper = jsonMapper;
}
代码示例来源:origin: apache/incubator-druid
@Inject
public DefaultGenericQueryMetricsFactory(@Json ObjectMapper jsonMapper)
{
this.jsonMapper = jsonMapper;
}
代码示例来源:origin: apache/incubator-druid
@Inject
public CuratorDruidNodeAnnouncer(Announcer announcer, ZkPathsConfig config, @Json ObjectMapper jsonMapper)
{
this.announcer = announcer;
this.config = config;
this.jsonMapper = jsonMapper;
}
代码示例来源:origin: apache/incubator-druid
@Inject
public S3DataSegmentArchiver(
@Json ObjectMapper mapper,
ServerSideEncryptingAmazonS3 s3Client,
S3DataSegmentArchiverConfig archiveConfig,
S3DataSegmentPusherConfig restoreConfig
)
{
super(s3Client, restoreConfig);
this.mapper = mapper;
this.archiveConfig = archiveConfig;
this.restoreConfig = restoreConfig;
}
代码示例来源:origin: apache/incubator-druid
@Inject
public DefaultTopNQueryMetricsFactory(@Json ObjectMapper jsonMapper)
{
this.jsonMapper = jsonMapper;
}
代码示例来源:origin: apache/incubator-druid
@Inject
public SqlResource(
@Json ObjectMapper jsonMapper,
SqlLifecycleFactory sqlLifecycleFactory
)
{
this.jsonMapper = Preconditions.checkNotNull(jsonMapper, "jsonMapper");
this.sqlLifecycleFactory = Preconditions.checkNotNull(sqlLifecycleFactory, "sqlLifecycleFactory");
}
代码示例来源:origin: apache/incubator-druid
@JsonCreator
public GalaxyEC2UserData(
@JacksonInject @Json ObjectMapper jsonMapper,
@JsonProperty("env") String env,
@JsonProperty("version") String version,
@JsonProperty("type") String type
)
{
this.jsonMapper = jsonMapper;
this.env = env;
this.version = version;
this.type = type;
}
代码示例来源:origin: apache/incubator-druid
@Inject
public SegmentListerResource(
@Json ObjectMapper jsonMapper,
@Smile ObjectMapper smileMapper,
@Nullable BatchDataSegmentAnnouncer announcer,
@Nullable SegmentLoadDropHandler loadDropRequestHandler
)
{
this.jsonMapper = jsonMapper;
this.smileMapper = smileMapper;
this.announcer = announcer;
this.loadDropRequestHandler = loadDropRequestHandler;
}
代码示例来源:origin: apache/incubator-druid
public TestRuleManager(
@Json ObjectMapper jsonMapper,
Supplier<TieredBrokerConfig> config
)
{
super(jsonMapper, config, null);
}
代码示例来源:origin: apache/incubator-druid
@Inject
public TaskManagementResource(
@Json ObjectMapper jsonMapper,
@Smile ObjectMapper smileMapper,
WorkerTaskMonitor workerTaskMonitor
)
{
this.jsonMapper = jsonMapper;
this.smileMapper = smileMapper;
this.workerTaskMonitor = workerTaskMonitor;
}
代码示例来源:origin: apache/incubator-druid
@Inject
public KafkaIndexTaskClientFactory(
@EscalatedGlobal HttpClient httpClient,
@Json ObjectMapper mapper
)
{
super(httpClient, mapper);
}
代码示例来源:origin: apache/incubator-druid
@Inject
public KinesisIndexTaskClientFactory(
@EscalatedGlobal HttpClient httpClient,
@Json ObjectMapper mapper
)
{
super(httpClient, mapper);
}
代码示例来源:origin: apache/incubator-druid
public ListenerResource(
final @Json ObjectMapper jsonMapper,
final @Smile ObjectMapper smileMapper,
final ListenerHandler handler
)
{
this.jsonMapper = Preconditions.checkNotNull(jsonMapper, "jsonMapper");
this.smileMapper = Preconditions.checkNotNull(smileMapper, "smileMapper");
this.handler = Preconditions.checkNotNull(handler, "listener handler");
}
代码示例来源:origin: apache/incubator-druid
@Inject
public SeekableStreamIndexTaskClientFactory(
@EscalatedGlobal HttpClient httpClient,
@Json ObjectMapper mapper
)
{
this.httpClient = httpClient;
this.mapper = mapper;
}
代码示例来源:origin: apache/incubator-druid
@JsonCreator
public InlineSchemaAvroBytesDecoder(
@JacksonInject @Json ObjectMapper mapper,
@JsonProperty("schema") Map<String, Object> schema
) throws Exception
{
Preconditions.checkArgument(schema != null, "schema must be provided");
this.schema = schema;
String schemaStr = mapper.writeValueAsString(schema);
LOGGER.debug("Schema string [%s]", schemaStr);
this.schemaObj = new Schema.Parser().parse(schemaStr);
this.reader = new GenericDatumReader<>(this.schemaObj);
}
代码示例来源:origin: apache/incubator-druid
@Provides
@LazySingleton
public Task readTask(@Json ObjectMapper mapper, ExecutorLifecycleConfig config)
{
try {
return mapper.readValue(config.getTaskFile(), Task.class);
}
catch (IOException e) {
throw Throwables.propagate(e);
}
}
代码示例来源:origin: apache/incubator-druid
@Provides
@Singleton
public JacksonJsonProvider getJacksonJsonProvider(@Json ObjectMapper objectMapper)
{
final JacksonJsonProvider provider = new JacksonJsonProvider();
provider.setMapper(objectMapper);
return provider;
}
代码示例来源:origin: apache/incubator-druid
@Provides @LazySingleton @Json
public ObjectMapper getJsonMapper(final Injector injector)
{
setupJackson(injector, jsonMapper);
return jsonMapper;
}
内容来源于网络,如有侵权,请联系作者删除!