diff --git hbase-native-client/core/async-batch-rpc-retrying-caller.cc hbase-native-client/core/async-batch-rpc-retrying-caller.cc index 05290f5..88314b1 100644 --- hbase-native-client/core/async-batch-rpc-retrying-caller.cc +++ hbase-native-client/core/async-batch-rpc-retrying-caller.cc @@ -272,7 +272,7 @@ void AsyncBatchRpcRetryingCaller::GroupAndSend(const std::vectorserver_name().port() << "];"; } else if (loc[i].hasException()) { VLOG(8) << "Exception occured while locating region:- " - << loc[i].exception().getCopied()->what() << " for action index " << i; + << loc[i].exception().what() << " for action index " << i; // TODO Feedback needed, Java API only identifies DoNotRetryIOException // We might receive runtime error from location-cache.cc too, we are treating both same if (loc[i].exception().is_compatible_with()) { @@ -290,8 +290,7 @@ void AsyncBatchRpcRetryingCaller::GroupAndSend(const std::vector(*loc[i].exception().getCopied()), - nullptr); + AddError(action, std::make_shared(), nullptr); locate_failed.push_back(action); } } @@ -306,7 +305,6 @@ void AsyncBatchRpcRetryingCaller::GroupAndSend(const std::vector lock(multi_mutex_); - auto exc = ew.getCopied(); VLOG(8) << "GetRegionLocations() exception: " << ew.what().toStdString(); }); return; @@ -368,19 +366,18 @@ void AsyncBatchRpcRetryingCaller::Send(ActionsByServer &actions_by_server, int32 } } else if (completed_responses[num].hasException()) { VLOG(8) << "Received exception: " - << completed_responses[num].exception().getCopied()->what() + << completed_responses[num].exception().what() << " from server for action index " << num; // TODO: we should call OnError here as well. } } }) .onError([=](const folly::exception_wrapper &ew) { - auto exc = ew.getCopied(); VLOG(8) << "GetMultiResponse() exception: " << ew.what().toStdString(); std::lock_guard lock(multi_mutex_); for (const auto &action_by_server : actions_by_server) { OnError(action_by_server.second->actions_by_region(), tries, - std::make_shared(*exc), action_by_server.first); + std::make_shared(), action_by_server.first); } }); return; diff --git hbase-native-client/core/async-batch-rpc-retrying-caller.h hbase-native-client/core/async-batch-rpc-retrying-caller.h index 29a0e6a..05c160a 100644 --- hbase-native-client/core/async-batch-rpc-retrying-caller.h +++ hbase-native-client/core/async-batch-rpc-retrying-caller.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include diff --git hbase-native-client/core/async-rpc-retrying-caller.cc hbase-native-client/core/async-rpc-retrying-caller.cc index aee7d0b..720fe80 100644 --- hbase-native-client/core/async-rpc-retrying-caller.cc +++ hbase-native-client/core/async-rpc-retrying-caller.cc @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include "connection/rpc-client.h" #include "core/async-connection.h" diff --git hbase-native-client/core/raw-async-table.h hbase-native-client/core/raw-async-table.h index ca12be6..12ef0aa 100644 --- hbase-native-client/core/raw-async-table.h +++ hbase-native-client/core/raw-async-table.h @@ -19,7 +19,7 @@ #pragma once #include -#include +#include #include #include #include diff --git hbase-native-client/core/table.cc hbase-native-client/core/table.cc index b89c1a2..3b7a87b 100644 --- hbase-native-client/core/table.cc +++ hbase-native-client/core/table.cc @@ -120,9 +120,9 @@ std::vector> Table::Get(const std::vectorwhat() << " for " + LOG(ERROR) << "Caught exception:- " << tresult.exception().what() << " for " << gets[num++].row(); - throw tresult.exception().getCopied(); + throw tresult.exception(); } } return results; diff --git hbase-native-client/docker-files/Dockerfile hbase-native-client/docker-files/Dockerfile index d5a1eab..efd9a9d 100644 --- hbase-native-client/docker-files/Dockerfile +++ hbase-native-client/docker-files/Dockerfile @@ -84,6 +84,39 @@ RUN git clone https://github.com/google/protobuf.git /usr/src/protobuf && \ make clean && \ ldconfig +# Update folly +RUN cd /usr/src/ && \ + ver=2017.06.19.00 && \ + wget https://github.com/facebook/folly/archive/v$ver.tar.gz && \ + tar zxf v$ver.tar.gz && \ + rm -rf v$ver.tar.gz && \ + cd folly-$ver/folly/test && \ + rm -rf gtest && \ + wget https://github.com/google/googletest/archive/release-1.8.0.tar.gz && \ + tar zxf release-1.8.0.tar.gz && \ + rm -f release-1.8.0.tar.gz && \ + mv googletest-release-1.8.0 gtest && \ + cd ../ && \ + ldconfig && \ + autoreconf -ivf && \ + ./configure && \ + make && \ + make check && \ + make install + +# Update wangle +RUN cd /usr/src/ && \ + ver=2017.06.26.00 && \ + wget https://github.com/facebook/wangle/archive/v$ver.tar.gz && \ + tar zxf v$ver.tar.gz && \ + rm -rf v$ver.tar.gz && \ + cd wangle-$ver/wangle && \ + ldconfig && \ + cmake . -DBUILD_TESTS=OFF && \ + make && \ + ctest && \ + make install + ENTRYPOINT /usr/sbin/krb5kdc -P /var/run/krb5kdc.pid && /bin/bash WORKDIR /usr/src/hbase/hbase-native-client