You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Alexey Serbin (Code Review)" <ge...@cloudera.org> on 2017/06/06 02:08:40 UTC

[kudu-CR] [ExternalDaemon] return non-OK if no process to pause/resume

Alexey Serbin has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/7092

Change subject: [ExternalDaemon] return non-OK if no process to pause/resume
......................................................................

[ExternalDaemon] return non-OK if no process to pause/resume

Prior to this patch, ExternalDaemon::{Pause,Resume}() methods
returned Status::OK() if there were no process to pause/resume.

This patch addresses that: now both methods return Status::NotFound()
if there is no process to pause/resume.  Also, added WARN_UNUSED_RESULT
attribute for both methods and updated the call sites to handle their
return status correspondingly.  Besides, replaced gscoped_ptr with
std::unique_ptr in external_minicluster.{cc,h}.

Change-Id: Ibce641a29ffc43391f54c6a8aacf6ba91ae93ae9
---
M src/kudu/integration-tests/client-stress-test.cc
M src/kudu/integration-tests/external_mini_cluster.cc
M src/kudu/integration-tests/external_mini_cluster.h
M src/kudu/integration-tests/master_failover-itest.cc
M src/kudu/integration-tests/master_migration-itest.cc
M src/kudu/integration-tests/raft_consensus-itest.cc
6 files changed, 55 insertions(+), 42 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/92/7092/1
-- 
To view, visit http://gerrit.cloudera.org:8080/7092
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibce641a29ffc43391f54c6a8aacf6ba91ae93ae9
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>

[kudu-CR] [ExternalDaemon] return non-OK if no process to pause/resume

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change.

Change subject: [ExternalDaemon] return non-OK if no process to pause/resume
......................................................................


Patch Set 2:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/7092/2/src/kudu/integration-tests/external_mini_cluster.cc
File src/kudu/integration-tests/external_mini_cluster.cc:

PS2, Line 827: NotFound
maybe IllegalState is more appropriate?


Line 839:     return Status::NotFound(Substitute(
same


PS2, Line 1108:   const Status s = daemon_->Resume();
              :   if (!s.ok()) {
              :     LOG(WARNING) << "Could not resume external daemon: " <<  s.ToString();
              :  
use WARN_NOT_OK here?


-- 
To view, visit http://gerrit.cloudera.org:8080/7092
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibce641a29ffc43391f54c6a8aacf6ba91ae93ae9
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[kudu-CR] [ExternalDaemon] return non-OK if no process to pause/resume

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has uploaded a new patch set (#3).

Change subject: [ExternalDaemon] return non-OK if no process to pause/resume
......................................................................

[ExternalDaemon] return non-OK if no process to pause/resume

Prior to this patch, ExternalDaemon::{Pause,Resume}() methods
returned Status::OK() if there were no process to pause/resume.

This patch addresses that: now both methods return Status::NotFound()
if there is no process to pause/resume.  Also, added WARN_UNUSED_RESULT
attribute for both methods and updated the call sites to handle their
return status correspondingly.  Besides, replaced gscoped_ptr with
std::unique_ptr in external_minicluster.{cc,h}.

Change-Id: Ibce641a29ffc43391f54c6a8aacf6ba91ae93ae9
---
M src/kudu/integration-tests/client-stress-test.cc
M src/kudu/integration-tests/external_mini_cluster.cc
M src/kudu/integration-tests/external_mini_cluster.h
M src/kudu/integration-tests/master_failover-itest.cc
M src/kudu/integration-tests/master_migration-itest.cc
M src/kudu/integration-tests/raft_consensus-itest.cc
6 files changed, 50 insertions(+), 38 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/92/7092/3
-- 
To view, visit http://gerrit.cloudera.org:8080/7092
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ibce641a29ffc43391f54c6a8aacf6ba91ae93ae9
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] [ExternalDaemon] return non-OK if no process to pause/resume

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change.

Change subject: [ExternalDaemon] return non-OK if no process to pause/resume
......................................................................


Patch Set 3: Code-Review+2

-- 
To view, visit http://gerrit.cloudera.org:8080/7092
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibce641a29ffc43391f54c6a8aacf6ba91ae93ae9
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] [ExternalDaemon] return non-OK if no process to pause/resume

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has submitted this change and it was merged.

Change subject: [ExternalDaemon] return non-OK if no process to pause/resume
......................................................................


[ExternalDaemon] return non-OK if no process to pause/resume

Prior to this patch, ExternalDaemon::{Pause,Resume}() methods
returned Status::OK() if there were no process to pause/resume.

This patch addresses that: now both methods return Status::NotFound()
if there is no process to pause/resume.  Also, added WARN_UNUSED_RESULT
attribute for both methods and updated the call sites to handle their
return status correspondingly.  Besides, replaced gscoped_ptr with
std::unique_ptr in external_minicluster.{cc,h}.

Change-Id: Ibce641a29ffc43391f54c6a8aacf6ba91ae93ae9
Reviewed-on: http://gerrit.cloudera.org:8080/7092
Reviewed-by: Todd Lipcon <to...@apache.org>
Tested-by: Kudu Jenkins
---
M src/kudu/integration-tests/client-stress-test.cc
M src/kudu/integration-tests/external_mini_cluster.cc
M src/kudu/integration-tests/external_mini_cluster.h
M src/kudu/integration-tests/master_failover-itest.cc
M src/kudu/integration-tests/master_migration-itest.cc
M src/kudu/integration-tests/raft_consensus-itest.cc
6 files changed, 50 insertions(+), 38 deletions(-)

Approvals:
  Todd Lipcon: Looks good to me, approved
  Kudu Jenkins: Verified



-- 
To view, visit http://gerrit.cloudera.org:8080/7092
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibce641a29ffc43391f54c6a8aacf6ba91ae93ae9
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] [ExternalDaemon] return non-OK if no process to pause/resume

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change.

Change subject: [ExternalDaemon] return non-OK if no process to pause/resume
......................................................................


Patch Set 2: Verified+1

Unrelated flake in SparkSQL StringStartsWith filters(org.apache.kudu.spark.kudu.DefaultSourceTest)

-- 
To view, visit http://gerrit.cloudera.org:8080/7092
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibce641a29ffc43391f54c6a8aacf6ba91ae93ae9
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-HasComments: No

[kudu-CR] [ExternalDaemon] return non-OK if no process to pause/resume

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change.

Change subject: [ExternalDaemon] return non-OK if no process to pause/resume
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/7092/2/src/kudu/integration-tests/external_mini_cluster.cc
File src/kudu/integration-tests/external_mini_cluster.cc:

PS2, Line 827: NotFound
> maybe IllegalState is more appropriate?
yep, that was a hard choice between NotFound and IllegalState :)

But at the second glance I think IllegalState() looks better.

Done.


Line 839:     return Status::NotFound(Substitute(
> same
Done


-- 
To view, visit http://gerrit.cloudera.org:8080/7092
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibce641a29ffc43391f54c6a8aacf6ba91ae93ae9
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[kudu-CR] [ExternalDaemon] return non-OK if no process to pause/resume

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has uploaded a new patch set (#2).

Change subject: [ExternalDaemon] return non-OK if no process to pause/resume
......................................................................

[ExternalDaemon] return non-OK if no process to pause/resume

Prior to this patch, ExternalDaemon::{Pause,Resume}() methods
returned Status::OK() if there were no process to pause/resume.

This patch addresses that: now both methods return Status::NotFound()
if there is no process to pause/resume.  Also, added WARN_UNUSED_RESULT
attribute for both methods and updated the call sites to handle their
return status correspondingly.  Besides, replaced gscoped_ptr with
std::unique_ptr in external_minicluster.{cc,h}.

Change-Id: Ibce641a29ffc43391f54c6a8aacf6ba91ae93ae9
---
M src/kudu/integration-tests/client-stress-test.cc
M src/kudu/integration-tests/external_mini_cluster.cc
M src/kudu/integration-tests/external_mini_cluster.h
M src/kudu/integration-tests/master_failover-itest.cc
M src/kudu/integration-tests/master_migration-itest.cc
M src/kudu/integration-tests/raft_consensus-itest.cc
6 files changed, 52 insertions(+), 38 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/92/7092/2
-- 
To view, visit http://gerrit.cloudera.org:8080/7092
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ibce641a29ffc43391f54c6a8aacf6ba91ae93ae9
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins