GithubHelp home page GithubHelp logo

connectionvalidator's Introduction

ConnectionValidator

Codebase to validate connectivity to external systems

Utility to check connectivity to ADLS Gen2 from Databricks.

This is a piece of java code to check the access connectivity from a given machine to the adls gen2 storage account.

What script does?:

  1. Tests if the folder creation/deletion works fine.
  2. Tests if the file upload to folder works fine.
  3. Tests if the listing of folder works fine.
Usage

Connect by using an account key

$ java -cp ./out/artifacts/AzureADLSGen2ConnectivityTest_jar/AzureADLSGen2ConnectivityTest.jar 
    abcd.adls.ADLSClientConnector 
    --account_name <adls_gen2_storage_account_name>
    --container_name <storage_container_name> 
    --auth_type account_key 
    --account_key <your_storage_account_key>

Connect by using Azure Active Directory (Azure AD)/Service Principal

 $ java -cp ./out/artifacts/AzureADLSGen2ConnectivityTest_jar/AzureADLSGen2ConnectivityTest.jar 
      abcd.adls.ADLSClientConnector 
    --account_name <adls_gen2_storage_account_name>
    --auth_type service_principal 
    --tenant_id <Azure tenant/directory ID> 
    --client_id <Azure Client App ID>
    --client_secret <Azure Client Secret>
Sample Output:
$ Creating directory under the container
Successfully created/overwrote the iwx_test_connectivity directory under the given container!
Trying to upload a sample file to container csv-test...
Creation of sample file succeeded!
Trying to list the directory contents csv-test...
     PathName: iwx_test_connectivity/sample.txt
Done Listing!
Trying to remove a sample file from the container csv-test...
Sample file deletion succeeded!
Trying to remove the iwx_test_connectivity directory from the container csv-test...
Directory iwx_test_connectivity deletion succeeded!
Testing Complete!

Process finished with exit code 0

connectionvalidator's People

Contributors

abhr1994 avatar nitin-bs avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.