Class Split
- java.lang.Object
-
- com.amazonaws.athena.connector.lambda.domain.Split
-
public class Split extends Object
A Split is best thought of as a unit of work that is part of a larger activity. For example, if we needed to read a 100GB table stored in S3. We might want to improve performance by parallelizing the reads of this large file by _splitting_ it up into 100MB pieces. You could think of each piece as a split. In general, Splits are opaque to Athena with the exception of the SpillLocation and EncryptionKey which are used by Athena to find any data that was spilled by the processing of the split. All properties on the split are soley produced by and consumed by the connector.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Split.Builder
-
Constructor Summary
Constructors Constructor Description Split(SpillLocation spillLocation, EncryptionKey encryptionKey, Map<String,String> properties)
Basic constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
EncryptionKey
getEncryptionKey()
The optional EncryptionKey this Split can use to encrypt/decrypt data.Map<String,String>
getProperties()
Provides access to all properties on this Split.String
getProperty(String key)
Retrieves the value of the requested property.double
getPropertyAsDouble(String key)
Retrieves the value of the requested property and attempts to parse the value into a double.int
getPropertyAsInt(String key)
Retrieves the value of the requested property and attempts to parse the value into an int.long
getPropertyAsLong(String key)
Retrieves the value of the requested property and attempts to parse the value into an Long.SpillLocation
getSpillLocation()
The optional SpillLocation this Split can write to.int
hashCode()
static Split.Builder
newBuilder(SpillLocation spillLocation, EncryptionKey encryptionKey)
String
toString()
-
-
-
Constructor Detail
-
Split
public Split(SpillLocation spillLocation, EncryptionKey encryptionKey, Map<String,String> properties)
Basic constructor.- Parameters:
spillLocation
- The optional SpillLocation this Split can write to.encryptionKey
- The optional EncryptionKey this Split can use to encrypt/decrypt data.properties
- The properties that define what this split is meant to do.
-
-
Method Detail
-
getProperty
public String getProperty(String key)
Retrieves the value of the requested property.- Parameters:
key
- The name of the property to retrieve.- Returns:
- The value for that property or null if there is no such property.
-
getPropertyAsInt
public int getPropertyAsInt(String key)
Retrieves the value of the requested property and attempts to parse the value into an int.- Parameters:
key
- The name of the property to retrieve.- Returns:
- The value for that property, throws if there is no such property.
-
getPropertyAsLong
public long getPropertyAsLong(String key)
Retrieves the value of the requested property and attempts to parse the value into an Long.- Parameters:
key
- The name of the property to retrieve.- Returns:
- The value for that property, throws if there is no such property.
-
getPropertyAsDouble
public double getPropertyAsDouble(String key)
Retrieves the value of the requested property and attempts to parse the value into a double.- Parameters:
key
- The name of the property to retrieve.- Returns:
- The value for that property, throws if there is no such property.
-
getProperties
public Map<String,String> getProperties()
Provides access to all properties on this Split.- Returns:
- Map
containing all properties on the split.
-
getSpillLocation
public SpillLocation getSpillLocation()
The optional SpillLocation this Split can write to.- Returns:
- The SpillLocation.
-
getEncryptionKey
public EncryptionKey getEncryptionKey()
The optional EncryptionKey this Split can use to encrypt/decrypt data.- Returns:
- The EncryptionKey.
-
newBuilder
public static Split.Builder newBuilder(SpillLocation spillLocation, EncryptionKey encryptionKey)
-
-