This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Installing kubectl, AWS Command Line Utility, eksctl and helm in a Centos environment" | |
echo | |
# First configure yum to use https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64 as a repo" | |
cat <<EOF > /etc/yum.repos.d/kubernetes.repo | |
[kubernetes] | |
name=Kubernetes | |
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Obtain bit mask required to ensure we have on average a specific number of logical objects in each physical object | |
* @param keySpaceSize - size of key space | |
* @param objectsPerBlock - average number of objects stored in each physical object | |
* @return bit mask as a BigInteger | |
*/ | |
public static BigInteger getBitMask(long keySpaceSize,int objectsPerBlock){ | |
// No of bits required is | |
// log(keySpaceSize/objectsPerBlock) / log(2) | |
// as reqd # of keys is keySpaceSize/objectsPerBlock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static final int BIT_MASK_SIZE = 25; | |
public static final BigInteger BIT_MASK = (new BigInteger("2")).pow(BIT_MASK_SIZE).subtract(new BigInteger("1")); | |
public static final String METADATA_BIN_NAME = "deviceMetaData"; | |
public static final AerospikeClient aeroClient = new AerospikeClient(hostName,aerospikeServicePort); | |
/** | |
* Get device meta data from Aerospike having employed 'blocking' technique | |
* @param deviceIDasUUID - device id | |
* @return device meta data | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static final int BIT_MASK_SIZE = 25; | |
public static final BigInteger BIT_MASK = (new BigInteger("2")).pow(BIT_MASK_SIZE).subtract(new BigInteger("1")); | |
public static final String METADATA_BIN_NAME = "deviceMetaData"; | |
public static final AerospikeClient aeroClient = new AerospikeClient(hostName,aerospikeServicePort); | |
/** | |
* Store device meta data in Aerospike using 'blocking' technique | |
* @param deviceIDasUUID - device id | |
* @param deviceMetaData - metadat | |
*/ |