Merge branch 'update-java-version' into jsonMapping
This commit is contained in:
Коммит
9f680fbbcc
10
.travis.yml
10
.travis.yml
|
@ -3,13 +3,15 @@ language: ruby
|
|||
cache: bundler
|
||||
matrix:
|
||||
include:
|
||||
- rvm: jruby-9.1.13.0
|
||||
- rvm: jruby-9.2.13.0
|
||||
env: LOGSTASH_BRANCH=7.x
|
||||
- rvm: jruby-9.2.13.0
|
||||
env: LOGSTASH_BRANCH=7.0
|
||||
- rvm: jruby-9.1.13.0
|
||||
- rvm: jruby-9.2.13.0
|
||||
env: LOGSTASH_BRANCH=6.8
|
||||
- rvm: jruby-9.1.13.0
|
||||
- rvm: jruby-9.2.13.0
|
||||
env: LOGSTASH_BRANCH=6.7
|
||||
- rvm: jruby-9.1.13.0
|
||||
- rvm: jruby-9.2.13.0
|
||||
env: LOGSTASH_BRANCH=6.6
|
||||
fast_finish: true
|
||||
install: true
|
||||
|
|
|
@ -18,4 +18,6 @@ else
|
|||
bundle install
|
||||
bundle exec rake vendor
|
||||
bundle exec rspec spec
|
||||
lock_jars
|
||||
gem build
|
||||
fi
|
|
@ -28,19 +28,19 @@ class LogStash::Outputs::Kusto < LogStash::Outputs::Base
|
|||
|
||||
@logger.debug('Preparing Kusto resources.')
|
||||
|
||||
kusto = Java::com.microsoft.azure.kusto
|
||||
kusto_connection_string = kusto.data.ConnectionStringBuilder.createWithAadApplicationCredentials(ingest_url, app_id, app_key.value, app_tenant)
|
||||
kusto_java = Java::com.microsoft.azure.kusto
|
||||
kusto_connection_string = kusto_java.data.ConnectionStringBuilder.createWithAadApplicationCredentials(ingest_url, app_id, app_key.value, app_tenant)
|
||||
@logger.debug(Gem.loaded_specs.to_s)
|
||||
# Unfortunately there's no way to avoid using the gem/plugin name directly...
|
||||
name_for_tracing = "logstash-output-kusto:#{Gem.loaded_specs['logstash-output-kusto']&.version || "unknown"}"
|
||||
@logger.debug("Client name for tracing: #{name_for_tracing}")
|
||||
kusto_connection_string.setClientVersionForTracing(name_for_tracing)
|
||||
|
||||
@kusto_client = kusto.ingest.IngestClientFactory.createClient(kusto_connection_string)
|
||||
@kusto_client = kusto_java.ingest.IngestClientFactory.createClient(kusto_connection_string)
|
||||
|
||||
@ingestion_properties = kusto.ingest.IngestionProperties.new(database, table)
|
||||
@ingestion_properties.setIngestionMapping(json_mapping, kusto.ingest.IngestionMapping::IngestionMappingKind::Json)
|
||||
@ingestion_properties.setDataFormat(kusto.ingest.IngestionProperties::DATA_FORMAT::json)
|
||||
@ingestion_properties = kusto_java.ingest.IngestionProperties.new(database, table)
|
||||
@ingestion_properties.setIngestionMapping(json_mapping, kusto_java.ingest.IngestionMapping::IngestionMappingKind::Json)
|
||||
@ingestion_properties.setDataFormat(kusto_java.ingest.IngestionProperties::DATA_FORMAT::json)
|
||||
|
||||
@delete_local = delete_local
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче