public final class DynamoDBUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CHARACTER_ENCODING |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
base64DecodeString(String base64String)
base64 decode a base64String using org.apache.commons.codec.binary.Base64
|
static String |
base64EncodeByteArray(byte[] bytes)
base64 encode a byte array using org.apache.commons.codec.binary.Base64
|
static List<ByteBuffer> |
base64StringToByteBuffer(String... base64EncodedKeys)
Converts a given list of base64EncodedKeys to a List of ByteBuffers
|
static ByteBuffer |
base64StringToByteBuffer(String base64EncodedKey)
Converts a base64 encoded key into a ByteBuffer
|
static int |
calcMaxMapTasks(org.apache.hadoop.mapred.JobClient jobClient) |
static Double |
calculateAverageItemSize(com.amazonaws.services.dynamodbv2.model.TableDescription description) |
static org.apache.hadoop.mapred.JobClient |
createJobClient(org.apache.hadoop.mapred.JobConf jobConf) |
static String |
getDynamoDBEndpoint(org.apache.hadoop.conf.Configuration conf,
String region)
Calculates DynamoDB end-point.
|
static com.google.gson.Gson |
getGson()
Get a Gson reference with custom ByteBuffer serializer/deserializer.
|
static String |
getValueFromConf(org.apache.hadoop.conf.Configuration conf,
String confKey) |
static String |
getValueFromConf(org.apache.hadoop.conf.Configuration conf,
String confKey,
String defaultValue) |
static void |
verifyInterval(long intervalBeginTime,
long intervalLength) |
public static final String CHARACTER_ENCODING
public static Double calculateAverageItemSize(com.amazonaws.services.dynamodbv2.model.TableDescription description)
public static String base64EncodeByteArray(byte[] bytes)
bytes - bytes to encodepublic static byte[] base64DecodeString(String base64String)
base64String - string to base64 decodepublic static ByteBuffer base64StringToByteBuffer(String base64EncodedKey)
base64EncodedKey - base64 encoded key to be convertedByteBuffer representation of the provided base64 encoded key stringpublic static List<ByteBuffer> base64StringToByteBuffer(String... base64EncodedKeys)
base64EncodedKeys - base64 encoded key(s) to be convertedByteBuffers representing the provided base64EncodedKeyspublic static com.google.gson.Gson getGson()
public static void verifyInterval(long intervalBeginTime,
long intervalLength)
public static String getValueFromConf(org.apache.hadoop.conf.Configuration conf, String confKey, String defaultValue)
public static String getValueFromConf(org.apache.hadoop.conf.Configuration conf, String confKey)
public static String getDynamoDBEndpoint(org.apache.hadoop.conf.Configuration conf, String region)
conf - Job Configurationregion - optional preferred regionpublic static org.apache.hadoop.mapred.JobClient createJobClient(org.apache.hadoop.mapred.JobConf jobConf)
public static int calcMaxMapTasks(org.apache.hadoop.mapred.JobClient jobClient)
throws IOException
IOExceptionCopyright © 2019. All rights reserved.