diff --git a/athena-elasticsearch/src/test/java/com/amazonaws/athena/connectors/elasticsearch/integ/ElasticsearchIndexUtils.java b/athena-elasticsearch/src/test/java/com/amazonaws/athena/connectors/elasticsearch/integ/ElasticsearchIndexUtils.java index c45dced6ea..cdaf0c6c0b 100644 --- a/athena-elasticsearch/src/test/java/com/amazonaws/athena/connectors/elasticsearch/integ/ElasticsearchIndexUtils.java +++ b/athena-elasticsearch/src/test/java/com/amazonaws/athena/connectors/elasticsearch/integ/ElasticsearchIndexUtils.java @@ -19,9 +19,9 @@ */ package com.amazonaws.athena.connectors.elasticsearch.integ; -import com.amazonaws.athena.connectors.elasticsearch.ElasticsearchDomainMapProvider; import com.amazonaws.athena.connectors.elasticsearch.AwsRestHighLevelClient; import com.amazonaws.athena.connectors.elasticsearch.AwsRestHighLevelClientFactory; +import com.amazonaws.athena.connectors.elasticsearch.ElasticsearchDomainMapProvider; import org.elasticsearch.action.DocWriteRequest; import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.client.RequestOptions; diff --git a/athena-example/src/main/java/com/amazonaws/athena/connectors/example/ExampleMetadataHandler.java b/athena-example/src/main/java/com/amazonaws/athena/connectors/example/ExampleMetadataHandler.java index b674dfb875..e366c91abc 100644 --- a/athena-example/src/main/java/com/amazonaws/athena/connectors/example/ExampleMetadataHandler.java +++ b/athena-example/src/main/java/com/amazonaws/athena/connectors/example/ExampleMetadataHandler.java @@ -43,13 +43,18 @@ import org.apache.arrow.vector.complex.reader.FieldReader; //DO NOT REMOVE - this will not be _unused_ when customers go through the tutorial and uncomment //the TODOs +import org.apache.arrow.vector.types.Types; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.ArrayList; +import java.util.Comparator; import java.util.HashSet; import java.util.List; import java.util.Set; +import java.util.stream.Collectors; + +import static com.amazonaws.athena.connector.lambda.metadata.ListTablesRequest.UNLIMITED_PAGE_SIZE_VALUE; /** * This class is part of an tutorial that will walk you through how to build a connector for your diff --git a/athena-example/src/main/java/com/amazonaws/athena/connectors/example/ExampleRecordHandler.java b/athena-example/src/main/java/com/amazonaws/athena/connectors/example/ExampleRecordHandler.java index e4e6591985..dc522c86e4 100644 --- a/athena-example/src/main/java/com/amazonaws/athena/connectors/example/ExampleRecordHandler.java +++ b/athena-example/src/main/java/com/amazonaws/athena/connectors/example/ExampleRecordHandler.java @@ -22,8 +22,16 @@ import com.amazonaws.athena.connector.lambda.QueryStatusChecker; import com.amazonaws.athena.connector.lambda.data.Block; import com.amazonaws.athena.connector.lambda.data.BlockSpiller; +import com.amazonaws.athena.connector.lambda.data.BlockUtils; +import com.amazonaws.athena.connector.lambda.data.FieldResolver; import com.amazonaws.athena.connector.lambda.data.writers.GeneratedRowWriter; +import com.amazonaws.athena.connector.lambda.data.writers.extractors.Extractor; +import com.amazonaws.athena.connector.lambda.data.writers.extractors.IntExtractor; +import com.amazonaws.athena.connector.lambda.data.writers.extractors.VarCharExtractor; +import com.amazonaws.athena.connector.lambda.data.writers.fieldwriters.FieldWriter; +import com.amazonaws.athena.connector.lambda.data.writers.holders.NullableVarCharHolder; import com.amazonaws.athena.connector.lambda.domain.Split; +import com.amazonaws.athena.connector.lambda.domain.predicate.ConstraintProjector; import com.amazonaws.athena.connector.lambda.handlers.RecordHandler; import com.amazonaws.athena.connector.lambda.records.ReadRecordsRequest; import com.amazonaws.services.athena.AmazonAthena; @@ -34,12 +42,16 @@ import com.amazonaws.services.secretsmanager.AWSSecretsManager; import com.amazonaws.services.secretsmanager.AWSSecretsManagerClientBuilder; import org.apache.arrow.util.VisibleForTesting; +import org.apache.arrow.vector.FieldVector; +import org.apache.arrow.vector.holders.NullableIntHolder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; +import java.util.HashMap; +import java.util.Map; import static java.lang.String.format; diff --git a/athena-example/src/test/java/com/amazonaws/athena/connectors/example/ExampleUserDefinedFuncHandlerTest.java b/athena-example/src/test/java/com/amazonaws/athena/connectors/example/ExampleUserDefinedFuncHandlerTest.java index 45db3b3cf3..314f38bd17 100644 --- a/athena-example/src/test/java/com/amazonaws/athena/connectors/example/ExampleUserDefinedFuncHandlerTest.java +++ b/athena-example/src/test/java/com/amazonaws/athena/connectors/example/ExampleUserDefinedFuncHandlerTest.java @@ -19,6 +19,7 @@ */ package com.amazonaws.athena.connectors.example; +import com.amazonaws.athena.connector.lambda.handlers.UserDefinedFunctionHandler; import org.apache.commons.codec.binary.Base64; import org.junit.Test; import org.slf4j.Logger; @@ -28,16 +29,24 @@ import javax.crypto.Cipher; import javax.crypto.IllegalBlockSizeException; import javax.crypto.NoSuchPaddingException; +import javax.crypto.SecretKey; +import javax.crypto.SecretKeyFactory; +import javax.crypto.spec.IvParameterSpec; +import javax.crypto.spec.PBEKeySpec; import javax.crypto.spec.SecretKeySpec; +import java.io.BufferedWriter; +import java.io.FileWriter; import java.io.IOException; import java.security.InvalidAlgorithmParameterException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.spec.InvalidKeySpecException; import java.security.spec.InvalidParameterSpecException; +import java.security.spec.KeySpec; import java.util.HashMap; import java.util.Map; +import java.util.Random; import static org.junit.Assert.*;