for (PutPointRequest putPointRequest : putPointRequests) {
long geohash = S2Manager.generateGeohash(putPointRequest.getGeoPoint());
long hashKey = S2Manager.generateHashKey(geohash, config.getHashKeyLength());
String geoJson = GeoJsonMapper.stringFromGeoObject(putPointRequest.getGeoPoint());
PutRequest putRequest = putPointRequest.getPutRequest();
AttributeValue hashKeyValue = new AttributeValue().withN(String.valueOf(hashKey));
putRequest.getItem().put(config.getHashKeyAttributeName(), hashKeyValue);
putRequest.getItem().put(config.getRangeKeyAttributeName(), putPointRequest.getRangeKeyValue());
AttributeValue geohashValue = new AttributeValue().withN(Long.toString(geohash));
putRequest.getItem().put(config.getGeohashAttributeName(), geohashValue);
AttributeValue geoJsonValue = new AttributeValue().withS(geoJson);
putRequest.getItem().put(config.getGeoJsonAttributeName(), geoJsonValue);
WriteRequest writeRequest = new WriteRequest(putRequest);
writeRequests.add(writeRequest);
}
Map<String, List<WriteRequest>> requestItems = new HashMap<String, List<WriteRequest>>();