Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use shardFilter during listShards #377

Merged
merged 5 commits into from
Aug 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if(CMAKE_BUILD_TYPE MATCHES Debug)
endif(CMAKE_BUILD_TYPE MATCHES Debug)

if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.9")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.13 -framework Foundation -framework SystemConfiguration")
endif()

set(CMAKE_CXX_STANDARD 14)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ The KPL is written in C++ and runs as a child process to the main user process.
The Java package should run without the need to install any additional native libraries on the following operating systems:

+ Linux distributions with glibc 2.9 or later
+ Apple OS X 10.9 and later
+ Apple OS X 10.13 and later

Note the release is 64-bit only.

Expand Down
8 changes: 4 additions & 4 deletions aws/kinesis/core/shard_map.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ void ShardMap::list_shards(const Aws::String& next_token) {
req.SetNextToken(next_token);
} else {
req.SetStreamName(stream_);
Aws::Kinesis::Model::ShardFilter shardFilter;
shardFilter.SetType(Aws::Kinesis::Model::ShardFilterType::AT_LATEST);
req.SetShardFilter(shardFilter);
}

kinesis_client_->ListShardsAsync(
Expand All @@ -123,10 +126,7 @@ void ShardMap::list_shards_callback(

auto& shards = outcome.GetResult().GetShards();
for (auto& shard : shards) {
// Check if the shard is closed, if so, do not use it.
if (shard.GetSequenceNumberRange().GetEndingSequenceNumber().size() > 0) {
continue;
}
// We use shard filter for server end to filter out closed shards
store_open_shard(shard_id_from_str(shard.GetShardId()),
uint128_t(shard.GetHashKeyRange().GetEndingHashKey()));
}
Expand Down
1 change: 1 addition & 0 deletions aws/metrics/test/metrics_manager_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include <boost/test/unit_test.hpp>

#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/NoResult.h>
#include <aws/metrics/metrics_manager.h>
#include <aws/monitoring/model/PutMetricDataRequest.h>
Expand Down
1 change: 1 addition & 0 deletions aws/utils/io_service_executor.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#ifndef AWS_UTILS_IO_SERVICE_EXECUTOR_H_
#define AWS_UTILS_IO_SERVICE_EXECUTOR_H_

#include <boost/asio/io_service.hpp>
#include <boost/asio/steady_timer.hpp>

#include <aws/mutex.h>
Expand Down
12 changes: 6 additions & 6 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ silence() {
}

LIB_OPENSSL="https://ftp.openssl.org/source/old/1.0.2/openssl-1.0.2u.tar.gz"
LIB_BOOST="http://sourceforge.net/projects/boost/files/boost/1.61.0/boost_1_61_0.tar.gz"
LIB_BOOST="http://sourceforge.net/projects/boost/files/boost/1.76.0/boost_1_76_0.tar.gz"
LIB_ZLIB="https://zlib.net/fossils/zlib-1.2.11.tar.gz"
LIB_PROTOBUF="https://github.com/protocolbuffers/protobuf/releases/download/v3.11.4/protobuf-all-3.11.4.tar.gz"
LIB_CURL="https://curl.haxx.se/download/curl-7.77.0.tar.gz"
Expand Down Expand Up @@ -52,7 +52,7 @@ RELEASE_TYPE=$(find_release_type)


if [ $1 == "clang" ] || [ $(uname) == 'Darwin' ]; then
export MACOSX_DEPLOYMENT_TARGET='10.9'
export MACOSX_DEPLOYMENT_TARGET='10.13'
export MACOSX_MIN_COMPILER_OPT="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}"
export CC=$(which clang)
export CXX=$(which clang++)
Expand Down Expand Up @@ -136,12 +136,12 @@ if [ ! -d "openssl-1.0.2u" ]; then
fi

# Boost C++ Libraries
if [ ! -d "boost_1_61_0" ]; then
if [ ! -d "boost_1_76_0" ]; then
_curl "$LIB_BOOST" > boost.tgz
tar xf boost.tgz
rm boost.tgz

cd boost_1_61_0
cd boost_1_76_0

LIBS="atomic,chrono,log,system,test,random,regex,thread,filesystem"
OPTS="-j 8 --build-type=minimal --layout=system --prefix=$INSTALL_DIR link=static threading=multi release install"
Expand Down Expand Up @@ -204,7 +204,7 @@ if [ ! -d "curl-7.77.0" ]; then

cd curl-7.77.0

silence conf --disable-shared --disable-ldap --disable-ldaps \
silence conf --disable-shared --disable-ldap --disable-ldaps --without-libidn2 \
--enable-threaded-resolver --disable-debug --without-libssh2 --without-ca-bundle --with-ssl="${INSTALL_DIR}" --without-libidn
if [[ $(uname) == 'Darwin' ]]; then
#
Expand All @@ -224,7 +224,7 @@ fi
if [ ! -d "aws-sdk-cpp" ]; then
git clone https://github.com/awslabs/aws-sdk-cpp.git aws-sdk-cpp
pushd aws-sdk-cpp
git checkout 1.7.180
git checkout 1.8.30
popd

rm -rf aws-sdk-cpp-build
Expand Down