зеркало из
1
0
Форкнуть 0

Merge branch 'update-java-version' into jsonMapping

This commit is contained in:
AsafMah 2020-12-14 10:53:04 +02:00 коммит произвёл GitHub
Родитель 9e9fac9386 560da98280
Коммит 9f680fbbcc
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 14 добавлений и 10 удалений

Просмотреть файл

@ -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