com.aliyun.openservices.aliyun.log.producer.ProjectConfig Java Examples
The following examples show how to use
com.aliyun.openservices.aliyun.log.producer.ProjectConfig.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LoghubAppender.java From aliyun-log-log4j2-appender with Apache License 2.0 | 6 votes |
@Override public void start() { super.start(); ProjectConfig projectConfig = buildProjectConfig(); producerConfig.getProjectConfigs().put(projectConfig); producerConfig.setBatchCountThreshold(batchCountThreshold); producerConfig.setBatchSizeThresholdInBytes(batchSizeThresholdInBytes); producerConfig.setIoThreadCount(ioThreadCount); producerConfig.setRetries(retries); producerConfig.setBaseRetryBackoffMs(baseRetryBackoffMs); producerConfig.setLingerMs(lingerMs); producerConfig.setMaxBlockMs(maxBlockMs); producerConfig.setMaxRetryBackoffMs(maxRetryBackoffMs); producer = new LogProducer(producerConfig); }
Example #2
Source File: FlinkLogProducer.java From aliyun-log-flink-connector with Apache License 2.0 | 6 votes |
private Producer createProducer(ConfigWrapper configWrapper) { ProducerConfig producerConfig = new ProducerConfig(); producerConfig.setLingerMs(configWrapper.getInt(FLUSH_INTERVAL_MS, ProducerConfig.DEFAULT_LINGER_MS)); producerConfig.setRetries(configWrapper.getInt(MAX_RETRIES, ProducerConfig.DEFAULT_RETRIES)); producerConfig.setBaseRetryBackoffMs( configWrapper.getLong(BASE_RETRY_BACK_OFF_TIME_MS, ProducerConfig.DEFAULT_BASE_RETRY_BACKOFF_MS)); producerConfig.setMaxRetryBackoffMs( configWrapper.getLong(MAX_RETRY_BACK_OFF_TIME_MS, ProducerConfig.DEFAULT_MAX_RETRY_BACKOFF_MS)); producerConfig.setMaxBlockMs( configWrapper.getLong(MAX_BLOCK_TIME_MS, ProducerConfig.DEFAULT_MAX_BLOCK_MS)); producerConfig.setIoThreadCount( configWrapper.getInt(IO_THREAD_NUM, ProducerConfig.DEFAULT_IO_THREAD_COUNT)); Producer producer = new LogProducer(producerConfig); ProjectConfig config = new ProjectConfig(project, configWrapper.getString(ConfigConstants.LOG_ENDPOINT), configWrapper.getString(ConfigConstants.LOG_ACCESSSKEYID), configWrapper.getString(ConfigConstants.LOG_ACCESSKEY)); producer.putProjectConfig(config); return producer; }
Example #3
Source File: LogProducerProvider.java From alibaba-flink-connectors with Apache License 2.0 | 5 votes |
@Override protected LogProducer produceNormalClient(String accessId, String accessKey) { ProjectConfigs projectConfigs = new ProjectConfigs(); ProjectConfig projectConfig = new ProjectConfig(this.projectName, this.endPoint, accessId, accessKey); projectConfigs.put(projectConfig); producerConfig = new ProducerConfig(projectConfigs); producerConfig.setLingerMs(flushInterval); producerConfig.setRetries(maxRetryTimes); LogProducer producer = new LogProducer(producerConfig); return producer; }
Example #4
Source File: LogProducerProvider.java From alibaba-flink-connectors with Apache License 2.0 | 5 votes |
@Override protected LogProducer produceStsClient(String accessId, String accessKey, String securityToken) { ProjectConfigs projectConfigs = new ProjectConfigs(); ProjectConfig projectConfig = new ProjectConfig(this.projectName, this.endPoint, accessId, accessKey, securityToken); projectConfigs.put(projectConfig); producerConfig = new ProducerConfig(projectConfigs); producerConfig.setLingerMs(flushInterval); producerConfig.setRetries(maxRetryTimes); LogProducer producer = new LogProducer(producerConfig); return producer; }
Example #5
Source File: LoghubAppender.java From aliyun-log-logback-appender with Apache License 2.0 | 4 votes |
private ProjectConfig buildProjectConfig() { return new ProjectConfig(project, endpoint, accessKeyId, accessKeySecret, null, userAgent); }
Example #6
Source File: LoghubAppender.java From aliyun-log-log4j2-appender with Apache License 2.0 | 4 votes |
private ProjectConfig buildProjectConfig() { return new ProjectConfig(project, endpoint, accessKeyId, accessKeySecret, null, userAgent); }
Example #7
Source File: LoghubAppender.java From aliyun-log-log4j-appender with Apache License 2.0 | 4 votes |
private ProjectConfig buildProjectConfig() { return new ProjectConfig(project, endpoint, accessKeyId, accessKeySecret, null, userAgent); }