This is an automated email from the ASF dual-hosted git repository.

nicknezis pushed a commit to branch nicknezis/cpp-cleanup
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git

commit 3fb5e4934afe243579a79eccfba02a6981627781
Author: Nicholas Nezis <[email protected]>
AuthorDate: Thu Dec 31 03:05:03 2020 -0500

    Initial commit
---
 WORKSPACE                                        | 5 ++---
 heron/instance/src/cpp/gateway/stmgr-client.cpp  | 4 ++--
 heron/stmgr/src/cpp/manager/stream-consumers.cpp | 4 ++--
 heron/tmanager/src/cpp/manager/tmanager.cpp      | 4 ++--
 heron/tmanager/tests/cpp/server/dummystmgr.cpp   | 4 ++--
 third_party/glog/glog.BUILD                      | 2 ++
 6 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/WORKSPACE b/WORKSPACE
index 8e46253..3a9b6c0 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -278,9 +278,8 @@ http_archive(
 http_archive(
     name = "com_github_google_glog",
     build_file = "@//:third_party/glog/glog.BUILD",
-    sha256 = 
"7580e408a2c0b5a89ca214739978ce6ff480b5e7d8d7698a2aa92fadc484d1e0",
-    strip_prefix = "glog-0.3.5",
-    urls = ["https://github.com/google/glog/archive/v0.3.5.tar.gz";],
+    strip_prefix = "glog-0.4.0",
+    urls = ["https://github.com/google/glog/archive/v0.4.0.tar.gz";],
 )
 
 http_archive(
diff --git a/heron/instance/src/cpp/gateway/stmgr-client.cpp 
b/heron/instance/src/cpp/gateway/stmgr-client.cpp
index f2dbf74..f69e598 100644
--- a/heron/instance/src/cpp/gateway/stmgr-client.cpp
+++ b/heron/instance/src/cpp/gateway/stmgr-client.cpp
@@ -126,7 +126,7 @@ void StMgrClient::HandleRegisterResponse(
   if (response->has_pplan()) {
     LOG(INFO) << "Registration response had a pplan";
     using std::move;
-    
pplanWatcher_(move(pool_unique_ptr<proto::system::PhysicalPlan>(response->release_pplan())));
+    
pplanWatcher_(pool_unique_ptr<proto::system::PhysicalPlan>(response->release_pplan()));
   }
 }
 
@@ -145,7 +145,7 @@ void StMgrClient::HandlePhysicalPlan(
         pool_unique_ptr<proto::stmgr::NewInstanceAssignmentMessage> msg) {
   LOG(INFO) << "Got a Physical Plan from our stmgr " << 
instanceProto_.stmgr_id() << " running at "
             << get_clientoptions().get_host() << ":" << 
get_clientoptions().get_port();
-  
pplanWatcher_(std::move(pool_unique_ptr<proto::system::PhysicalPlan>(msg->release_pplan())));
+  
pplanWatcher_(pool_unique_ptr<proto::system::PhysicalPlan>(msg->release_pplan()));
 }
 
 void 
StMgrClient::HandleTupleMessage(pool_unique_ptr<proto::system::HeronTupleSet2> 
msg) {
diff --git a/heron/stmgr/src/cpp/manager/stream-consumers.cpp 
b/heron/stmgr/src/cpp/manager/stream-consumers.cpp
index 1585da0..131812b 100644
--- a/heron/stmgr/src/cpp/manager/stream-consumers.cpp
+++ b/heron/stmgr/src/cpp/manager/stream-consumers.cpp
@@ -35,7 +35,7 @@ namespace stmgr {
 StreamConsumers::StreamConsumers(const proto::api::InputStream& _is,
                                  const proto::api::StreamSchema& _schema,
                                  const std::vector<sp_int32>& _task_ids) {
-  consumers_.push_back(std::move(Grouping::Create(_is.gtype(), _is, _schema, 
_task_ids)));
+  consumers_.push_back(Grouping::Create(_is.gtype(), _is, _schema, _task_ids));
 }
 
 StreamConsumers::~StreamConsumers() {
@@ -48,7 +48,7 @@ StreamConsumers::~StreamConsumers() {
 void StreamConsumers::NewConsumer(const proto::api::InputStream& _is,
                                   const proto::api::StreamSchema& _schema,
                                   const std::vector<sp_int32>& _task_ids) {
-  consumers_.push_back(std::move(Grouping::Create(_is.gtype(), _is, _schema, 
_task_ids)));
+  consumers_.push_back(Grouping::Create(_is.gtype(), _is, _schema, _task_ids));
 }
 
 void StreamConsumers::GetListToSend(const proto::system::HeronDataTuple& 
_tuple,
diff --git a/heron/tmanager/src/cpp/manager/tmanager.cpp 
b/heron/tmanager/src/cpp/manager/tmanager.cpp
index 8848748..5ddcd0a 100644
--- a/heron/tmanager/src/cpp/manager/tmanager.cpp
+++ b/heron/tmanager/src/cpp/manager/tmanager.cpp
@@ -205,7 +205,7 @@ void 
TManager::OnPackingPlanFetch(shared_ptr<proto::system::PackingPlan> newPack
         LOG(INFO) << "Packing plan changed. Deleting physical plan and 
restarting TManager to "
                   << "reset internal state. Exiting.";
         state_mgr_->DeletePhysicalPlan(tmanager_location_->topology_name(),
-          [this](proto::system::StatusCode status) {
+          [](proto::system::StatusCode status) {
             ::exit(1);
           });
       } else {
@@ -221,7 +221,7 @@ void TManager::EstablishTManager(EventLoop::Status) {
   state_mgr_->SetTManagerLocation(*tmanager_location_, std::move(cb));
 
   // if zk lost the tmanager location, tmanager quits to bail out and 
re-establish its location
-  auto cb2 = [this]() {
+  auto cb2 = []() {
     LOG(ERROR) << " lost tmanager location in zk state manager. Bailing 
out..." << std::endl;
     ::exit(1);
   };
diff --git a/heron/tmanager/tests/cpp/server/dummystmgr.cpp 
b/heron/tmanager/tests/cpp/server/dummystmgr.cpp
index 47bb1b1..f0160ef 100644
--- a/heron/tmanager/tests/cpp/server/dummystmgr.cpp
+++ b/heron/tmanager/tests/cpp/server/dummystmgr.cpp
@@ -42,9 +42,9 @@ DummyStMgr::DummyStMgr(std::shared_ptr<EventLoop> eventLoop, 
const NetworkOption
       pplan_(nullptr),
       got_restore_message_(false),
       got_start_message_(false) {
-  
InstallResponseHandler(std::move(make_unique<proto::tmanager::StMgrRegisterRequest>()),
+  InstallResponseHandler(make_unique<proto::tmanager::StMgrRegisterRequest>(),
                          &DummyStMgr::HandleRegisterResponse);
-  
InstallResponseHandler(std::move(make_unique<proto::tmanager::StMgrHeartbeatRequest>()),
+  InstallResponseHandler(make_unique<proto::tmanager::StMgrHeartbeatRequest>(),
                          &DummyStMgr::HandleHeartbeatResponse);
   InstallMessageHandler(&DummyStMgr::HandleNewAssignmentMessage);
   InstallMessageHandler(&DummyStMgr::HandleRestoreTopologyStateRequest);
diff --git a/third_party/glog/glog.BUILD b/third_party/glog/glog.BUILD
index 716c38c..34e83b1 100644
--- a/third_party/glog/glog.BUILD
+++ b/third_party/glog/glog.BUILD
@@ -41,6 +41,7 @@ common_script = [
 ]
 
 mac_script = "\n".join(common_script + [
+    './autogen.sh',
     './configure --prefix=$$INSTALL_DIR --enable-shared=no',
     'make install',
     'rm -rf $$TMP_DIR',
@@ -50,6 +51,7 @@ linux_script = "\n".join(common_script + [
      'export VAR_LIBS="-Wl,--rpath -Wl,$$UNWIND_DIR/lib -L$$UNWIND_DIR/lib"',
      'export VAR_INCL="-I$$UNWIND_DIR/include"',
      'export VAR_LD="-L$$UNWIND_DIR/lib"',
+     './autogen.sh',
      'autoreconf -f -i',
      './configure --prefix=$$INSTALL_DIR --enable-shared=no LIBS="$$VAR_LIBS" 
CPPFLAGS="$$VAR_INCL" LDFLAGS="$$VAR_LD"',
      'make install LIBS="$$VAR_LIBS" CPPFLAGS="$$VAR_INCL" LDFLAGS="$$VAR_LD"',

Reply via email to