logstash-output-adls 1.1.4 → 1.2.0.rc3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/CONTRIBUTORS +14 -0
- data/Gemfile +10 -1
- data/NOTICE.TXT +1 -1
- data/README.md +96 -26
- data/lib/com/microsoft/azure/azure-data-lake-store-sdk/2.1.5/azure-data-lake-store-sdk-2.1.5.jar +0 -0
- data/lib/logstash-output-adls_jars.rb +2 -2
- data/lib/logstash/outputs/adls.rb +11 -11
- data/logstash-output-adls.gemspec +6 -5
- data/vendor/jar-dependencies/runtime-jars/azure-data-lake-store-sdk-2.1.5.jar +0 -0
- metadata +29 -25
- data/lib/com/microsoft/azure/azure-data-lake-store-sdk/2.1.1/azure-data-lake-store-sdk-2.1.1.jar +0 -0
- data/vendor/jar-dependencies/runtime-jars/azure-data-lake-store-sdk-2.1.1.jar +0 -0
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 4d0ca693187aebbcce25fd9204e52838508f49fc
         | 
| 4 | 
            +
              data.tar.gz: 67cbee093c81eaedf80cc071b162844434e56c59
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: a317642002d8a319ff45313bb7447b27ca718e6c6b94fb16438883234e4b716ea0f7f691fcff80a4a182c4ce2e912b00cc5157994ef744890a8d449fdbbedcec
         | 
| 7 | 
            +
              data.tar.gz: 3725c0d76c6ebc9bd6f468d4ea55a6470710e47a5cd94a9f4ca33987e07f27536a32bfcd7a973fc5a227032da0a4ae018c3dd36147272d529190aa9e76422f4d
         | 
    
        data/CHANGELOG.md
    ADDED
    
    
    
        data/CONTRIBUTORS
    ADDED
    
    | @@ -0,0 +1,14 @@ | |
| 1 | 
            +
            The following is a list of people who have contributed ideas, code, bug
         | 
| 2 | 
            +
            reports, or in general have helped logstash along its way.
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            Maintainers:
         | 
| 5 | 
            +
            * Carlos Alexandre
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            Contributors:
         | 
| 8 | 
            +
            * Carlos Alexandre (calexandre)
         | 
| 9 | 
            +
            * João Serra (jserra)
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            Note: If you've sent us patches, bug reports, or otherwise contributed to
         | 
| 12 | 
            +
            Logstash, and you aren't on the list above and want to be, please let us know
         | 
| 13 | 
            +
            and we'll make sure you're here. Contributions from folks like you are what make
         | 
| 14 | 
            +
            open source awesome.
         | 
    
        data/Gemfile
    CHANGED
    
    | @@ -1,2 +1,11 @@ | |
| 1 1 | 
             
            source 'https://rubygems.org'
         | 
| 2 | 
            -
             | 
| 2 | 
            +
             | 
| 3 | 
            +
            gemspec
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            logstash_path = ENV["LOGSTASH_PATH"] || "../../logstash"
         | 
| 6 | 
            +
            use_logstash_source = ENV["LOGSTASH_SOURCE"] && ENV["LOGSTASH_SOURCE"].to_s == "1"
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            if Dir.exist?(logstash_path) && use_logstash_source
         | 
| 9 | 
            +
              gem 'logstash-core', :path => "#{logstash_path}/logstash-core"
         | 
| 10 | 
            +
              gem 'logstash-core-plugin-api', :path => "#{logstash_path}/logstash-core-plugin-api"
         | 
| 11 | 
            +
            end
         | 
    
        data/NOTICE.TXT
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | @@ -1,32 +1,15 @@ | |
| 1 1 | 
             
            # Azure Data Lake Store Output Logstash Plugin
         | 
| 2 2 |  | 
| 3 | 
            +
             | 
| 4 | 
            +
            [](https://travis-ci.org/nosinovacao/logstash-output-adls)
         | 
| 5 | 
            +
             | 
| 3 6 | 
             
            This is a Azure Data Laka Store Output Plugin for [Logstash](https://github.com/elastic/logstash).
         | 
| 4 7 |  | 
| 5 8 | 
             
            This plugin uses the official [Microsoft Data Lake Store Java SDK](https://github.com/Azure/azure-data-lake-store-java) with their custom [AzureDataLakeFilesystem - ADL](https://docs.microsoft.com/en-us/azure/data-lake-store/data-lake-store-overview#what-is-azure-data-lake-store-file-system-adl) protocol, which Microsoft claims is more efficient than WebHDFS.
         | 
| 6 9 |  | 
| 7 10 | 
             
            It is fully free and fully open source. The license is Apache 2.0, meaning you are pretty much free to use it however you want in whatever way.
         | 
| 8 11 |  | 
| 9 | 
            -
            ##  | 
| 10 | 
            -
             | 
| 11 | 
            -
            ```sh
         | 
| 12 | 
            -
            bin/logstash-plugin install logstash-output-adls
         | 
| 13 | 
            -
            ```
         | 
| 14 | 
            -
             | 
| 15 | 
            -
            ### Manual installation on a already deployed Logstash:
         | 
| 16 | 
            -
             | 
| 17 | 
            -
            You can install the plugin on a already deployed Logstash and avoid messing with the Logstash Gemfile. 
         | 
| 18 | 
            -
            Please note that in this mode you can't alter the plugin source (logstash-output-adls/lib/logstash/outputs/adls.rb) without rebuilding the gem, which makes sense for a production deploy.
         | 
| 19 | 
            -
             | 
| 20 | 
            -
            Note that you'll need an already built gem file from the previous step.
         | 
| 21 | 
            -
             | 
| 22 | 
            -
            - Copy logstash-output-adls-x.x.x.gem to your remote Logstash.
         | 
| 23 | 
            -
            - Install the package on your remote Logstash:
         | 
| 24 | 
            -
             | 
| 25 | 
            -
            ```sh
         | 
| 26 | 
            -
            bin/logstash-plugin install /your/local/logstash-output-adls-x.x.x.gem
         | 
| 27 | 
            -
            ```
         | 
| 28 | 
            -
             | 
| 29 | 
            -
            ## Configuration
         | 
| 12 | 
            +
            ## Documentation
         | 
| 30 13 |  | 
| 31 14 | 
             
            ### Configuration example:
         | 
| 32 15 |  | 
| @@ -44,6 +27,7 @@ bin/logstash-plugin install /your/local/logstash-output-adls-x.x.x.gem | |
| 44 27 | 
             
                 adls_client_id => "00000000-0000-0000-0000-000000000000"                                 # (required)
         | 
| 45 28 | 
             
                 adls_client_key => "XXXXXXXXXXXXXXXXXXXXXX"                                              # (required)
         | 
| 46 29 | 
             
                 path => "/logstash/%{+YYYY}/%{+MM}/%{+dd}/logstash-%{+HH}-%{[@metadata][cid]}.log"       # (required)
         | 
| 30 | 
            +
                 test_path => "testfile"                                                                  # (optional, default "testfile")
         | 
| 47 31 | 
             
                 line_separator => "\n"                                                                   # (optional, default: "\n")
         | 
| 48 32 | 
             
                 created_files_permission => 755                                                          # (optional, default: 755)
         | 
| 49 33 | 
             
                 adls_token_expire_security_margin => 300                                                 # (optional, default: 300)
         | 
| @@ -66,6 +50,7 @@ bin/logstash-plugin install /your/local/logstash-output-adls-x.x.x.gem | |
| 66 50 | 
             
            | `adls_client_id` | yes | | Azure DLS ClientID |
         | 
| 67 51 | 
             
            | `adls_client_key` | yes | | Azure DLS ClientKey |
         | 
| 68 52 | 
             
            | `path` | yes | | The path to the file to write to. Event fields can be used here, as well as date fields in the joda time format, e.g.: `/logstash/%{+YYYY-MM-dd}/logstash-%{+HH}-%{[@metadata][cid]}.log` |
         | 
| 53 | 
            +
            | `test_path` | no | `testfile` | Path to test access on ADLS. This is used upon startup to ensure you have write access. |
         | 
| 69 54 | 
             
            | `line_separator` | no | `\n` | Line separator for events written |
         | 
| 70 55 | 
             
            | `created_files_permission` | no | 755 | File permission for files created |
         | 
| 71 56 | 
             
            | `adls_token_expire_security_margin` | no | 300 | The security margin (in seconds) that shoud be subtracted to the token's expire value to calculate when the token shoud be renewed. (i.e. If the Oauth token expires in 1hour, it will be renewed in "1hour -adls_token_expire_security_margin " |
         | 
| @@ -87,9 +72,48 @@ This plugin relies only on Logstash concurrency/batching facilities and can conf | |
| 87 72 | 
             
            - However, unless you have very high concurrency and/or a large batch size, these errors shouldn't be a problem.
         | 
| 88 73 |  | 
| 89 74 |  | 
| 90 | 
            -
            ##  | 
| 75 | 
            +
            ## Developing
         | 
| 76 | 
            +
             | 
| 77 | 
            +
            ### 1. Plugin Development and Testing
         | 
| 78 | 
            +
             | 
| 79 | 
            +
            To install, build and test, just run this command from the project's folder. If you want to deep-dive read into the next sections.
         | 
| 80 | 
            +
             | 
| 81 | 
            +
            ```sh
         | 
| 82 | 
            +
            ci/build.sh
         | 
| 83 | 
            +
            ```
         | 
| 84 | 
            +
             | 
| 85 | 
            +
            #### Build using Docker
         | 
| 86 | 
            +
             | 
| 87 | 
            +
            - If you want to use Docker to build, you can use Windows or Linux variants.
         | 
| 88 | 
            +
            - Execute the following commands in your project folder
         | 
| 89 | 
            +
            - The main advantage of using the method below, is that the container will preserve its state until it is removed, making subsequent `bundle install` commands much faster.
         | 
| 90 | 
            +
             | 
| 91 | 
            +
            **Windows (powershell):**
         | 
| 92 | 
            +
            ```powershell
         | 
| 93 | 
            +
            # Start the container (it will stop once you exit it)
         | 
| 94 | 
            +
            "docker run -it -v $($pwd -replace "\\", "/")/:/project/ -w /project/ --name jruby jruby:latest bash" | Invoke-Expression
         | 
| 95 | 
            +
             | 
| 96 | 
            +
            # Start it again (it should stay up now)
         | 
| 97 | 
            +
            docker start jruby
         | 
| 98 | 
            +
             | 
| 99 | 
            +
            # Enter the container shell and execute the usual build commands
         | 
| 100 | 
            +
            docker exec -it jruby bash
         | 
| 101 | 
            +
            ```
         | 
| 102 | 
            +
             | 
| 103 | 
            +
            **Linux**
         | 
| 104 | 
            +
            ```sh
         | 
| 105 | 
            +
            # Start the container (it will stop once you exit it)
         | 
| 106 | 
            +
            docker run -it -v $pwd:/project -w /project --name jruby jruby:latest bash
         | 
| 107 | 
            +
             | 
| 108 | 
            +
            # Start it again (it should stay up now)
         | 
| 109 | 
            +
            docker start jruby
         | 
| 110 | 
            +
             | 
| 111 | 
            +
            # Enter the container shell and execute the usual build commands
         | 
| 112 | 
            +
            docker exec -it jruby bash
         | 
| 113 | 
            +
            ```
         | 
| 114 | 
            +
             | 
| 91 115 |  | 
| 92 | 
            -
             | 
| 116 | 
            +
            #### Build
         | 
| 93 117 | 
             
            - To get started, you'll need JRuby with the Bundler and Rake gems installed.
         | 
| 94 118 |  | 
| 95 119 | 
             
            - Install dependencies:
         | 
| @@ -99,7 +123,7 @@ bundle install | |
| 99 123 |  | 
| 100 124 | 
             
            - Install Java dependencies from Maven:
         | 
| 101 125 | 
             
            ```sh
         | 
| 102 | 
            -
            rake  | 
| 126 | 
            +
            rake vendor
         | 
| 103 127 | 
             
            ```
         | 
| 104 128 |  | 
| 105 129 | 
             
            - Build your plugin gem:
         | 
| @@ -108,7 +132,28 @@ rake install_jars | |
| 108 132 | 
             
            gem build logstash-output-adls.gemspec
         | 
| 109 133 | 
             
            ```
         | 
| 110 134 |  | 
| 111 | 
            -
             | 
| 135 | 
            +
            #### Test
         | 
| 136 | 
            +
             | 
| 137 | 
            +
            - Update your dependencies
         | 
| 138 | 
            +
            ```
         | 
| 139 | 
            +
            bundle install
         | 
| 140 | 
            +
            ```
         | 
| 141 | 
            +
             | 
| 142 | 
            +
            - Run unit tests
         | 
| 143 | 
            +
            ```
         | 
| 144 | 
            +
            bundle exec rspec
         | 
| 145 | 
            +
            ```
         | 
| 146 | 
            +
             | 
| 147 | 
            +
            - Run integration tests
         | 
| 148 | 
            +
            you'll need to have docker available within your test environment before running the integration tests. The tests depend on a specific Kafka image found in Docker Hub called spotify/kafka. You will need internet connectivity to pull in this image if it does not already exist locally.
         | 
| 149 | 
            +
             | 
| 150 | 
            +
            ```
         | 
| 151 | 
            +
            bundle exec rspec --tag integration
         | 
| 152 | 
            +
            ```
         | 
| 153 | 
            +
             | 
| 154 | 
            +
            ### 2. Running your unpublished Plugin in Logstash
         | 
| 155 | 
            +
             | 
| 156 | 
            +
            #### Running your unpublished Plugin in Logstash
         | 
| 112 157 |  | 
| 113 158 | 
             
            - Edit Logstash `Gemfile` and add the local plugin path, for example:
         | 
| 114 159 | 
             
            ```sh
         | 
| @@ -117,5 +162,30 @@ gem "logstash-output-adls", :path => "/your/local/logstash-output-adls" | |
| 117 162 |  | 
| 118 163 | 
             
            - Install plugin:
         | 
| 119 164 | 
             
            ```sh
         | 
| 165 | 
            +
            # Logstash 2.3 and higher
         | 
| 120 166 | 
             
            bin/logstash-plugin install --no-verify
         | 
| 121 | 
            -
             | 
| 167 | 
            +
             | 
| 168 | 
            +
            # Prior to Logstash 2.3
         | 
| 169 | 
            +
            bin/plugin install --no-verify
         | 
| 170 | 
            +
            ```
         | 
| 171 | 
            +
             | 
| 172 | 
            +
            - Run Logstash with your plugin
         | 
| 173 | 
            +
            ```sh
         | 
| 174 | 
            +
            bin/logstash -e 'input { stdin { } } output { adls { } }'
         | 
| 175 | 
            +
            ```
         | 
| 176 | 
            +
            At this point any modifications to the plugin code will be applied to this local Logstash setup. After modifying the plugin, simply rerun Logstash.
         | 
| 177 | 
            +
             | 
| 178 | 
            +
            #### Run in an installed Logstash
         | 
| 179 | 
            +
             | 
| 180 | 
            +
            You can use the same **2.1** method to run your plugin in an installed Logstash by editing its `Gemfile` and pointing the `:path` to your local plugin development directory or you can build the gem and install it using:
         | 
| 181 | 
            +
             | 
| 182 | 
            +
            - Build your plugin gem
         | 
| 183 | 
            +
            ```sh
         | 
| 184 | 
            +
            gem build logstash-output-adls.gemspec
         | 
| 185 | 
            +
            ```
         | 
| 186 | 
            +
            - Install the plugin from the Logstash home
         | 
| 187 | 
            +
            ```sh
         | 
| 188 | 
            +
            # Logstash 2.3 and higher
         | 
| 189 | 
            +
            bin/plugin install /your/local/plugin/logstash-output-adls.gem
         | 
| 190 | 
            +
            ```
         | 
| 191 | 
            +
            - Start Logstash and proceed to test the plugin
         | 
    
        data/lib/com/microsoft/azure/azure-data-lake-store-sdk/2.1.5/azure-data-lake-store-sdk-2.1.5.jar
    ADDED
    
    | Binary file | 
| @@ -6,7 +6,7 @@ rescue LoadError | |
| 6 6 | 
             
              require 'org/slf4j/slf4j-api/1.7.21/slf4j-api-1.7.21.jar'
         | 
| 7 7 | 
             
              require 'org/slf4j/slf4j-log4j12/1.7.21/slf4j-log4j12-1.7.21.jar'
         | 
| 8 8 | 
             
              require 'log4j/log4j/1.2.17/log4j-1.2.17.jar'
         | 
| 9 | 
            -
              require 'com/microsoft/azure/azure-data-lake-store-sdk/2.1. | 
| 9 | 
            +
              require 'com/microsoft/azure/azure-data-lake-store-sdk/2.1.5/azure-data-lake-store-sdk-2.1.5.jar'
         | 
| 10 10 | 
             
            end
         | 
| 11 11 |  | 
| 12 12 | 
             
            if defined? Jars
         | 
| @@ -14,5 +14,5 @@ if defined? Jars | |
| 14 14 | 
             
              require_jar( 'org.slf4j', 'slf4j-api', '1.7.21' )
         | 
| 15 15 | 
             
              require_jar( 'org.slf4j', 'slf4j-log4j12', '1.7.21' )
         | 
| 16 16 | 
             
              require_jar( 'log4j', 'log4j', '1.2.17' )
         | 
| 17 | 
            -
              require_jar( 'com.microsoft.azure', 'azure-data-lake-store-sdk', '2.1. | 
| 17 | 
            +
              require_jar( 'com.microsoft.azure', 'azure-data-lake-store-sdk', '2.1.5' )
         | 
| 18 18 | 
             
            end
         | 
| @@ -23,6 +23,7 @@ require 'logstash-output-adls_jars.rb' | |
| 23 23 | 
             
            #     adls_client_id => "00000000-0000-0000-0000-000000000000"                                  # (required)
         | 
| 24 24 | 
             
            #     adls_client_key => "XXXXXXXXXXXXXXXXXXXXXX"                                               # (required)
         | 
| 25 25 | 
             
            #     path => "/logstash/%{+YYYY}/%{+MM}/%{+dd}/logstash-%{+HH}-%{[@metadata][cid]}.log"        # (required)
         | 
| 26 | 
            +
            #     test_path => "testfile"                                                                   # (optional, default "testfile")
         | 
| 26 27 | 
             
            #     line_separator => "\n"                                                                    # (optional, default: "\n")
         | 
| 27 28 | 
             
            #     created_files_permission => 755                                                           # (optional, default: 755)
         | 
| 28 29 | 
             
            #     adls_token_expire_security_margin => 300                                                  # (optional, default: 300)
         | 
| @@ -58,6 +59,9 @@ class LogStash::Outputs::ADLS < LogStash::Outputs::Base | |
| 58 59 | 
             
              # `/user/logstash/dt=%{+YYYY-MM-dd}/%{@source_host}-%{+HH}.log`
         | 
| 59 60 | 
             
              config :path, :validate => :string, :required => true
         | 
| 60 61 |  | 
| 62 | 
            +
              # The path used for testing permissions in the datalake
         | 
| 63 | 
            +
              config :test_path, :validate => :string, :default => "testfile"
         | 
| 64 | 
            +
             | 
| 61 65 | 
             
              # Line separator for events written.
         | 
| 62 66 | 
             
              config :line_separator, :validate => :string, :default => "\n"
         | 
| 63 67 |  | 
| @@ -96,7 +100,7 @@ class LogStash::Outputs::ADLS < LogStash::Outputs::Base | |
| 96 100 | 
             
                def register()
         | 
| 97 101 |  | 
| 98 102 | 
             
                  begin
         | 
| 99 | 
            -
                    @client = prepare_client(@adls_fqdn, @adls_client_id, @adls_token_endpoint, @adls_client_key)
         | 
| 103 | 
            +
                    @client = prepare_client(@adls_fqdn, @adls_client_id, @adls_token_endpoint, @adls_client_key,  @test_path)
         | 
| 100 104 | 
             
                  rescue => e
         | 
| 101 105 | 
             
                    logger.error("Cannot Login in ADLS. Aborting.... Exception: #{e.message}; Trace:#{e.backtrace.join("\n\t")}")
         | 
| 102 106 | 
             
                    exit 1
         | 
| @@ -118,7 +122,7 @@ class LogStash::Outputs::ADLS < LogStash::Outputs::Base | |
| 118 122 | 
             
                    end
         | 
| 119 123 | 
             
                    def run
         | 
| 120 124 | 
             
                      begin
         | 
| 121 | 
            -
                        @parent.client = @parent.prepare_client(@parent.adls_fqdn, @parent.adls_client_id, @parent.adls_token_endpoint, @parent.adls_client_key)
         | 
| 125 | 
            +
                        @parent.client = @parent.prepare_client(@parent.adls_fqdn, @parent.adls_client_id, @parent.adls_token_endpoint, @parent.adls_client_key, @parent.test_path)
         | 
| 122 126 | 
             
                      rescue => e
         | 
| 123 127 | 
             
                        sleepTime = [@parent.retry_interval, @parent.max_retry_interval].min
         | 
| 124 128 | 
             
                        @parent.logger.error("ADLS Refresh OAuth Token Failed! Retrying in #{sleepTime.to_s} seconds... Exception: #{e.message}; Trace:#{e.backtrace.join("\n\t")}")         
         | 
| @@ -143,7 +147,7 @@ class LogStash::Outputs::ADLS < LogStash::Outputs::Base | |
| 143 147 | 
             
                @logger.info("Logstash ADLS output plugin is shutting down...")
         | 
| 144 148 | 
             
              end
         | 
| 145 149 |  | 
| 146 | 
            -
              def prepare_client(accountFQDN, clientId, authTokenEndpoint, clientKey)
         | 
| 150 | 
            +
              def prepare_client(accountFQDN, clientId, authTokenEndpoint, clientKey, testPath)
         | 
| 147 151 | 
             
                azureToken = com.microsoft.azure.datalake.store.oauth2.AzureADAuthenticator.getTokenUsingClientCreds(authTokenEndpoint, clientId, clientKey)
         | 
| 148 152 |  | 
| 149 153 | 
             
                calendar = java.util.Calendar.getInstance()
         | 
| @@ -157,7 +161,7 @@ class LogStash::Outputs::ADLS < LogStash::Outputs::Base | |
| 157 161 | 
             
                options = com.microsoft.azure.datalake.store.ADLStoreOptions.new()
         | 
| 158 162 | 
             
                options.setUserAgentSuffix("Logstash-ADLS-Output-Plugin")
         | 
| 159 163 | 
             
                client.setOptions(options)
         | 
| 160 | 
            -
                client.checkExists( | 
| 164 | 
            +
                client.checkExists(testPath) # Test the Client to make sure it works. The return value is irrelevant. 
         | 
| 161 165 | 
             
                client
         | 
| 162 166 | 
             
              end
         | 
| 163 167 |  | 
| @@ -204,12 +208,11 @@ class LogStash::Outputs::ADLS < LogStash::Outputs::Base | |
| 204 208 | 
             
                  end 
         | 
| 205 209 | 
             
                end
         | 
| 206 210 | 
             
                @logger.debug("#{events.length.to_s} events written on ADLS in #{Time.now-timeElapsed} seconds.")
         | 
| 207 | 
            -
             | 
| 208 211 | 
             
              end
         | 
| 209 212 |  | 
| 210 213 | 
             
              def write_data(path, data)
         | 
| 211 214 | 
             
                begin
         | 
| 212 | 
            -
                   | 
| 215 | 
            +
                  @logger.debug("Trying to write at #{path}")
         | 
| 213 216 | 
             
                  adlsClient = @client
         | 
| 214 217 |  | 
| 215 218 | 
             
                  # Try to append to already existing file, which will work most of the times.
         | 
| @@ -229,11 +232,8 @@ class LogStash::Outputs::ADLS < LogStash::Outputs::Base | |
| 229 232 | 
             
                    createStream.close()
         | 
| 230 233 | 
             
                    @logger.debug("File #{path} created.")
         | 
| 231 234 | 
             
                  else
         | 
| 232 | 
            -
             | 
| 235 | 
            +
                    raise e  
         | 
| 233 236 | 
             
                  end           
         | 
| 234 237 | 
             
                end
         | 
| 235 | 
            -
             | 
| 236 | 
            -
             | 
| 237 | 
            -
              end
         | 
| 238 | 
            -
                    
         | 
| 238 | 
            +
              end 
         | 
| 239 239 | 
             
            end
         | 
| @@ -1,8 +1,9 @@ | |
| 1 | 
            -
             | 
| 1 | 
            +
            # encoding: utf-8
         | 
| 2 2 | 
             
            Gem::Specification.new do |s|
         | 
| 3 3 |  | 
| 4 4 | 
             
              s.name            = 'logstash-output-adls'
         | 
| 5 | 
            -
              s.version         = '1. | 
| 5 | 
            +
              s.version         = '1.2.0'
         | 
| 6 | 
            +
              s.version         = "#{s.version}.rc#{ENV['TRAVIS_TAG'][/-rc(.*)/i,1]}" if ENV['TRAVIS_TAG'] =~ /-rc(.*)/i
         | 
| 6 7 | 
             
              s.licenses        = ['Apache-2.0']
         | 
| 7 8 | 
             
              s.summary         = "Plugin to write events to Azure Data Lake Store (ADLS)"
         | 
| 8 9 | 
             
              s.description     = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
         | 
| @@ -12,7 +13,7 @@ Gem::Specification.new do |s| | |
| 12 13 | 
             
              s.require_paths = ["lib"]
         | 
| 13 14 |  | 
| 14 15 | 
             
              # Files
         | 
| 15 | 
            -
              s.files = Dir[ | 
| 16 | 
            +
              s.files = Dir["lib/**/*","spec/**/*","*.gemspec","*.md","CONTRIBUTORS","Gemfile","LICENSE","NOTICE.TXT", "vendor/jar-dependencies/**/*.jar", "vendor/jar-dependencies/**/*.rb", "VERSION", "docs/**/*"]
         | 
| 16 17 |  | 
| 17 18 | 
             
              # Tests
         | 
| 18 19 | 
             
              s.test_files = s.files.grep(%r{^(test|spec|features)/})
         | 
| @@ -20,15 +21,15 @@ Gem::Specification.new do |s| | |
| 20 21 | 
             
              # Special flag to let us know this is actually a logstash plugin
         | 
| 21 22 | 
             
              s.metadata = { "logstash_plugin" => "true", "logstash_group" => "output" }
         | 
| 22 23 |  | 
| 23 | 
            -
              s.requirements << "jar 'com.microsoft.azure:azure-data-lake-store-sdk', '2.1. | 
| 24 | 
            +
              s.requirements << "jar 'com.microsoft.azure:azure-data-lake-store-sdk', '2.1.5'"
         | 
| 24 25 | 
             
              s.requirements << "jar 'org.slf4j:slf4j-log4j12', '1.7.21'"
         | 
| 25 26 |  | 
| 26 27 | 
             
              s.add_development_dependency 'jar-dependencies', '~> 0.3.2'
         | 
| 27 28 |  | 
| 28 29 | 
             
              # Gem dependencies
         | 
| 29 30 | 
             
              s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
         | 
| 30 | 
            -
              s.add_development_dependency 'logstash-devutils'
         | 
| 31 31 |  | 
| 32 | 
            +
              s.add_development_dependency 'logstash-devutils'
         | 
| 32 33 | 
             
              s.add_development_dependency 'logstash-codec-line'
         | 
| 33 34 | 
             
              s.add_development_dependency 'logstash-codec-json'
         | 
| 34 35 | 
             
              s.add_development_dependency 'logstash-codec-plain'
         | 
    
        metadata
    CHANGED
    
    | @@ -1,30 +1,31 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: logstash-output-adls
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1. | 
| 4 | 
            +
              version: 1.2.0.rc3
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - NOS Inovação
         | 
| 8 | 
            -
            autorequire:
         | 
| 8 | 
            +
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2017- | 
| 11 | 
            +
            date: 2017-09-12 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 | 
            +
              name: jar-dependencies
         | 
| 14 15 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 15 16 | 
             
                requirements:
         | 
| 16 17 | 
             
                - - "~>"
         | 
| 17 18 | 
             
                  - !ruby/object:Gem::Version
         | 
| 18 19 | 
             
                    version: 0.3.2
         | 
| 19 | 
            -
              name: jar-dependencies
         | 
| 20 | 
            -
              prerelease: false
         | 
| 21 20 | 
             
              type: :development
         | 
| 21 | 
            +
              prerelease: false
         | 
| 22 22 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 23 | 
             
                requirements:
         | 
| 24 24 | 
             
                - - "~>"
         | 
| 25 25 | 
             
                  - !ruby/object:Gem::Version
         | 
| 26 26 | 
             
                    version: 0.3.2
         | 
| 27 27 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 28 | 
            +
              name: logstash-core-plugin-api
         | 
| 28 29 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 29 30 | 
             
                requirements:
         | 
| 30 31 | 
             
                - - ">="
         | 
| @@ -33,9 +34,8 @@ dependencies: | |
| 33 34 | 
             
                - - "<="
         | 
| 34 35 | 
             
                  - !ruby/object:Gem::Version
         | 
| 35 36 | 
             
                    version: '2.99'
         | 
| 36 | 
            -
              name: logstash-core-plugin-api
         | 
| 37 | 
            -
              prerelease: false
         | 
| 38 37 | 
             
              type: :runtime
         | 
| 38 | 
            +
              prerelease: false
         | 
| 39 39 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 40 40 | 
             
                requirements:
         | 
| 41 41 | 
             
                - - ">="
         | 
| @@ -45,73 +45,77 @@ dependencies: | |
| 45 45 | 
             
                  - !ruby/object:Gem::Version
         | 
| 46 46 | 
             
                    version: '2.99'
         | 
| 47 47 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 48 | 
            +
              name: logstash-devutils
         | 
| 48 49 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 49 50 | 
             
                requirements:
         | 
| 50 51 | 
             
                - - ">="
         | 
| 51 52 | 
             
                  - !ruby/object:Gem::Version
         | 
| 52 53 | 
             
                    version: '0'
         | 
| 53 | 
            -
              name: logstash-devutils
         | 
| 54 | 
            -
              prerelease: false
         | 
| 55 54 | 
             
              type: :development
         | 
| 55 | 
            +
              prerelease: false
         | 
| 56 56 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 57 57 | 
             
                requirements:
         | 
| 58 58 | 
             
                - - ">="
         | 
| 59 59 | 
             
                  - !ruby/object:Gem::Version
         | 
| 60 60 | 
             
                    version: '0'
         | 
| 61 61 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 62 | 
            +
              name: logstash-codec-line
         | 
| 62 63 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 63 64 | 
             
                requirements:
         | 
| 64 65 | 
             
                - - ">="
         | 
| 65 66 | 
             
                  - !ruby/object:Gem::Version
         | 
| 66 67 | 
             
                    version: '0'
         | 
| 67 | 
            -
              name: logstash-codec-line
         | 
| 68 | 
            -
              prerelease: false
         | 
| 69 68 | 
             
              type: :development
         | 
| 69 | 
            +
              prerelease: false
         | 
| 70 70 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 71 71 | 
             
                requirements:
         | 
| 72 72 | 
             
                - - ">="
         | 
| 73 73 | 
             
                  - !ruby/object:Gem::Version
         | 
| 74 74 | 
             
                    version: '0'
         | 
| 75 75 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 76 | 
            +
              name: logstash-codec-json
         | 
| 76 77 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 77 78 | 
             
                requirements:
         | 
| 78 79 | 
             
                - - ">="
         | 
| 79 80 | 
             
                  - !ruby/object:Gem::Version
         | 
| 80 81 | 
             
                    version: '0'
         | 
| 81 | 
            -
              name: logstash-codec-json
         | 
| 82 | 
            -
              prerelease: false
         | 
| 83 82 | 
             
              type: :development
         | 
| 83 | 
            +
              prerelease: false
         | 
| 84 84 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 85 85 | 
             
                requirements:
         | 
| 86 86 | 
             
                - - ">="
         | 
| 87 87 | 
             
                  - !ruby/object:Gem::Version
         | 
| 88 88 | 
             
                    version: '0'
         | 
| 89 89 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 90 | 
            +
              name: logstash-codec-plain
         | 
| 90 91 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 91 92 | 
             
                requirements:
         | 
| 92 93 | 
             
                - - ">="
         | 
| 93 94 | 
             
                  - !ruby/object:Gem::Version
         | 
| 94 95 | 
             
                    version: '0'
         | 
| 95 | 
            -
              name: logstash-codec-plain
         | 
| 96 | 
            -
              prerelease: false
         | 
| 97 96 | 
             
              type: :development
         | 
| 97 | 
            +
              prerelease: false
         | 
| 98 98 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 99 99 | 
             
                requirements:
         | 
| 100 100 | 
             
                - - ">="
         | 
| 101 101 | 
             
                  - !ruby/object:Gem::Version
         | 
| 102 102 | 
             
                    version: '0'
         | 
| 103 | 
            -
            description: This gem is a Logstash plugin required to be installed on top of the | 
| 103 | 
            +
            description: This gem is a Logstash plugin required to be installed on top of the
         | 
| 104 | 
            +
              Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This
         | 
| 105 | 
            +
              gem is not a stand-alone program
         | 
| 104 106 | 
             
            email: nosi.metadata@nos.pt
         | 
| 105 107 | 
             
            executables: []
         | 
| 106 108 | 
             
            extensions: []
         | 
| 107 109 | 
             
            extra_rdoc_files: []
         | 
| 108 110 | 
             
            files:
         | 
| 111 | 
            +
            - CHANGELOG.md
         | 
| 112 | 
            +
            - CONTRIBUTORS
         | 
| 109 113 | 
             
            - Gemfile
         | 
| 110 114 | 
             
            - LICENSE
         | 
| 111 115 | 
             
            - NOTICE.TXT
         | 
| 112 116 | 
             
            - README.md
         | 
| 113 117 | 
             
            - lib/com/fasterxml/jackson/core/jackson-core/2.7.4/jackson-core-2.7.4.jar
         | 
| 114 | 
            -
            - lib/com/microsoft/azure/azure-data-lake-store-sdk/2.1. | 
| 118 | 
            +
            - lib/com/microsoft/azure/azure-data-lake-store-sdk/2.1.5/azure-data-lake-store-sdk-2.1.5.jar
         | 
| 115 119 | 
             
            - lib/log4j/log4j/1.2.17/log4j-1.2.17.jar
         | 
| 116 120 | 
             
            - lib/logstash-output-adls_jars.rb
         | 
| 117 121 | 
             
            - lib/logstash/outputs/adls.rb
         | 
| @@ -120,7 +124,7 @@ files: | |
| 120 124 | 
             
            - logstash-output-adls.gemspec
         | 
| 121 125 | 
             
            - spec/integration/adls_spec.rb
         | 
| 122 126 | 
             
            - spec/outputs/adls_spec.rb
         | 
| 123 | 
            -
            - vendor/jar-dependencies/runtime-jars/azure-data-lake-store-sdk-2.1. | 
| 127 | 
            +
            - vendor/jar-dependencies/runtime-jars/azure-data-lake-store-sdk-2.1.5.jar
         | 
| 124 128 | 
             
            - vendor/jar-dependencies/runtime-jars/jackson-core-2.7.4.jar
         | 
| 125 129 | 
             
            - vendor/jar-dependencies/runtime-jars/log4j-1.2.17.jar
         | 
| 126 130 | 
             
            - vendor/jar-dependencies/runtime-jars/slf4j-api-1.7.21.jar
         | 
| @@ -131,7 +135,7 @@ licenses: | |
| 131 135 | 
             
            metadata:
         | 
| 132 136 | 
             
              logstash_plugin: 'true'
         | 
| 133 137 | 
             
              logstash_group: output
         | 
| 134 | 
            -
            post_install_message:
         | 
| 138 | 
            +
            post_install_message: 
         | 
| 135 139 | 
             
            rdoc_options: []
         | 
| 136 140 | 
             
            require_paths:
         | 
| 137 141 | 
             
            - lib
         | 
| @@ -142,15 +146,15 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 142 146 | 
             
                  version: '0'
         | 
| 143 147 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 144 148 | 
             
              requirements:
         | 
| 145 | 
            -
              - - " | 
| 149 | 
            +
              - - ">"
         | 
| 146 150 | 
             
                - !ruby/object:Gem::Version
         | 
| 147 | 
            -
                  version:  | 
| 151 | 
            +
                  version: 1.3.1
         | 
| 148 152 | 
             
            requirements:
         | 
| 149 | 
            -
            - jar 'com.microsoft.azure:azure-data-lake-store-sdk', '2.1. | 
| 153 | 
            +
            - jar 'com.microsoft.azure:azure-data-lake-store-sdk', '2.1.5'
         | 
| 150 154 | 
             
            - jar 'org.slf4j:slf4j-log4j12', '1.7.21'
         | 
| 151 | 
            -
            rubyforge_project:
         | 
| 152 | 
            -
            rubygems_version: 2.6. | 
| 153 | 
            -
            signing_key:
         | 
| 155 | 
            +
            rubyforge_project: 
         | 
| 156 | 
            +
            rubygems_version: 2.6.13
         | 
| 157 | 
            +
            signing_key: 
         | 
| 154 158 | 
             
            specification_version: 4
         | 
| 155 159 | 
             
            summary: Plugin to write events to Azure Data Lake Store (ADLS)
         | 
| 156 160 | 
             
            test_files:
         | 
    
        data/lib/com/microsoft/azure/azure-data-lake-store-sdk/2.1.1/azure-data-lake-store-sdk-2.1.1.jar
    DELETED
    
    | Binary file | 
| Binary file |