Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancements in Testing and Functionality #11

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

bkcompton
Copy link

@bkcompton bkcompton commented Jul 13, 2019

  • Enhanced Tests (almost full coverage)

  • Fixed Issue: CTAS Queries Don't Work

  • Conformed to strict Sonar and es-lint rules

  • Added ability to configure timeouts for both retry and common error scenarios

  • Added ability to set the Athena workgroup in configuration (Allows workgroup level security)

  • Increased the version numbers on test tools and updated package.json to have debug script that can be used in .vscode's launch.json.

Brian Compton added 8 commits July 13, 2019 12:00
… and commonErrorRetry). Also, updated documentation on retry to indicate it now supports a function or an Integer.
…ed by Athena an S3 constructors. This was needed for me to avoid the EMFILE error which occurs on macOS when you have more than 256 open file descriptors. Also occurs in AWS Lambda environment.
@bkcompton
Copy link
Author

bkcompton commented Jul 23, 2019

The last commit allows for the caller to pass in the optional aws params object to the AthenaExpress constructor which is then used in the AWS and Athena constructors for additional configurability.

This was required by my AWS Lambda which was creating more then the default open file descriptor setting in the Lambda environment. This is overridable via the following setting in https.Agent constructor... (I set it to 5000 below).

The resolved error message found in CloudFormation:

  NetworkingError: getaddrinfo EMFILE bucket_name.s3.amazonaws.com:443
    const awsOptions = { 
       httpOptions: { 
         agent: new https.Agent({ 
           maxSockets: 5000 
         }) 
       } 
    };  

Usage:

    const athenaExpressConfig = { 
        awsOptions,  
        aws: awsSdk,  
        db: dbName.toLowerCase(),  
        region,  
        workGroup: athenaWorkgroup,  
        s3: s3SQLLogOutputPath . 
    };
    const athenaExpress = new AthenaExpress(athenaExpressConfig);  

I hope this helps others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant