[kudu-CR] env posix: add another failure case to Walk

2017-09-28 Thread Alexey Serbin (Code Review)
Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8171 )

Change subject: env_posix: add another failure case to Walk
..


Patch Set 1: Code-Review+2

(1 comment)

After some consideration I think that handling FTS_DNR might be considered as 
an optional thing, please free to ignore.

http://gerrit.cloudera.org:8080/#/c/8171/1/src/kudu/util/env_posix.cc
File src/kudu/util/env_posix.cc:

http://gerrit.cloudera.org:8080/#/c/8171/1/src/kudu/util/env_posix.cc@1475
PS1, Line 1475: case FTS_NS
> Well, I would try to create a directory X then 'chmod  X'.  I think tha
Yep, it worked as expected to me on OS X:

$ mkdir /tmp/test
$ chmod  /tmp/test
$ clang++ -o x x.cc
$ ./x
FTS_D
FTS_DNR: unable to access file /tmp/test during walk: Permission denied


x.cc contained the following sketchy code:

#include 
#include 
#include 

#include 

using namespace std;

int main() {
  char* paths[] = { "/tmp/test", nullptr };
  FTS* tree = fts_open(paths, FTS_PHYSICAL | FTS_XDEV | FTS_NOCHDIR, nullptr);
  if (!tree) {
cerr << "fts_open() failed" << endl;
return 1;
  }

  while (true) {
FTSENT* ent = fts_read(tree);
if (!ent) {
  break;
}

switch (ent->fts_info) {
  case FTS_D: // Directory in pre-order
cout << "FTS_D" << endl;
break;
  case FTS_DP:// Directory in post-order
cout << "FTS_DP" << endl;
break;
  case FTS_F: // A regular file
  case FTS_SL:// A symbolic link
  case FTS_SLNONE:// A broken symbolic link
  case FTS_DEFAULT:   // Unknown type of file
cout << "FTS_F|FTS_SL|FTS_SLNONE|FTS_DEFAULT" << endl;
break;

  case FTS_ERR:
cerr << "FTS_ERR: unable to access file " << ent->fts_path
 << " during walk: " << strerror(ent->fts_errno) << endl;
  case FTS_NS:
cerr << "FTS_NS: unable to access file " << ent->fts_path
 << " during walk: " << strerror(ent->fts_errno) << endl;
  case FTS_DNR:
cerr << "FTS_DNR: unable to access file " << ent->fts_path
 << " during walk: " << strerror(ent->fts_errno) << endl;
break;

  default:
cerr << "Unable to access file " << ent->fts_path
 << " during walk (code " << ent->fts_info << ")" << endl;
break;
}
  }
  fts_close(tree);

  return 0;
}



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I16edaec169d074913768c95a16173ff105d7b6a1
Gerrit-Change-Number: 8171
Gerrit-PatchSet: 1
Gerrit-Owner: Adar Dembo 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: Todd Lipcon 
Gerrit-Comment-Date: Fri, 29 Sep 2017 05:46:15 +
Gerrit-HasComments: Yes


[kudu-CR] env posix: add another failure case to Walk

2017-09-28 Thread Alexey Serbin (Code Review)
Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8171 )

Change subject: env_posix: add another failure case to Walk
..


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/8171/1/src/kudu/util/env_posix.cc
File src/kudu/util/env_posix.cc:

http://gerrit.cloudera.org:8080/#/c/8171/1/src/kudu/util/env_posix.cc@1475
PS1, Line 1475: case FTS_NS
> I could do that, but how would you test for it?
Well, I would try to create a directory X then 'chmod  X'.  I think that 
would do it -- need to test that.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I16edaec169d074913768c95a16173ff105d7b6a1
Gerrit-Change-Number: 8171
Gerrit-PatchSet: 1
Gerrit-Owner: Adar Dembo 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: Todd Lipcon 
Gerrit-Comment-Date: Fri, 29 Sep 2017 03:23:09 +
Gerrit-HasComments: Yes


[kudu-CR] env posix: add another failure case to Walk

2017-09-28 Thread Adar Dembo (Code Review)
Adar Dembo has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8171 )

Change subject: env_posix: add another failure case to Walk
..


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/8171/1/src/kudu/util/env_posix.cc
File src/kudu/util/env_posix.cc:

http://gerrit.cloudera.org:8080/#/c/8171/1/src/kudu/util/env_posix.cc@1475
PS1, Line 1475: case FTS_NS
> From reading 'man fts_read' it seems the FTS_DNR should also be treated as
I could do that, but how would you test for it?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I16edaec169d074913768c95a16173ff105d7b6a1
Gerrit-Change-Number: 8171
Gerrit-PatchSet: 1
Gerrit-Owner: Adar Dembo 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: Todd Lipcon 
Gerrit-Comment-Date: Fri, 29 Sep 2017 02:58:29 +
Gerrit-HasComments: Yes


[kudu-CR] env posix: add another failure case to Walk

2017-09-28 Thread Alexey Serbin (Code Review)
Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8171 )

Change subject: env_posix: add another failure case to Walk
..


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/8171/1/src/kudu/util/env_posix.cc
File src/kudu/util/env_posix.cc:

http://gerrit.cloudera.org:8080/#/c/8171/1/src/kudu/util/env_posix.cc@1475
PS1, Line 1475: case FTS_NS
>From reading 'man fts_read' it seems the FTS_DNR should also be treated as 
>error where fts_errno is set.

Would it make sense to add that case here as well?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I16edaec169d074913768c95a16173ff105d7b6a1
Gerrit-Change-Number: 8171
Gerrit-PatchSet: 1
Gerrit-Owner: Adar Dembo 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: Todd Lipcon 
Gerrit-Comment-Date: Fri, 29 Sep 2017 02:29:54 +
Gerrit-HasComments: Yes


[kudu-CR] env posix: add another failure case to Walk

2017-09-28 Thread Adar Dembo (Code Review)
Hello Alexey Serbin, Todd Lipcon,

I'd like you to do a code review. Please visit

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

to review the following change.


Change subject: env_posix: add another failure case to Walk
..

env_posix: add another failure case to Walk

The manpage for fts_read has this to say about FTS_NS:

  A file for which no stat(2) information was available.   The  con‐
  tents  of  the  fts_statp  field  are undefined.  This is an error
  return, and the fts_errno field  will  be  set  to  indicate  what
  caused the error.

As such, we should treat it the same as FTS_ERR.

The new test fails without this change, which I found somewhat surprising;
I would have expected fts_open(2) to at least check for the existence of the
root directory, but apparently that's deferred to fts_read(2).

Change-Id: I16edaec169d074913768c95a16173ff105d7b6a1
---
M src/kudu/util/env-test.cc
M src/kudu/util/env_posix.cc
2 files changed, 38 insertions(+), 33 deletions(-)



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I16edaec169d074913768c95a16173ff105d7b6a1
Gerrit-Change-Number: 8171
Gerrit-PatchSet: 1
Gerrit-Owner: Adar Dembo 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: Todd Lipcon 


[kudu-CR] KUDU-2055 [part 2]: Add util to construct sorted disjoint interval list

2017-09-28 Thread Dan Burkert (Code Review)
Dan Burkert has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8041 )

Change subject: KUDU-2055 [part 2]: Add util to construct sorted disjoint 
interval list
..


Patch Set 10: Code-Review+2


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I61a813c047be4882f246eaf404598e7e18fcac87
Gerrit-Change-Number: 8041
Gerrit-PatchSet: 10
Gerrit-Owner: Hao Hao 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: Andrew Wong 
Gerrit-Reviewer: Dan Burkert 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Hao Hao 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon 
Gerrit-Comment-Date: Thu, 28 Sep 2017 23:49:30 +
Gerrit-HasComments: No


[kudu-CR] KUDU-2055 [part 2]: Add util to construct sorted disjoint interval list

2017-09-28 Thread Dan Burkert (Code Review)
Dan Burkert has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/8041 )

Change subject: KUDU-2055 [part 2]: Add util to construct sorted disjoint 
interval list
..

KUDU-2055 [part 2]: Add util to construct sorted disjoint interval list

This patch adds a utility to construct a sorted disjoint interval list
in-place given a list of intervals. The operation to construct such one
is O(nlg n + n) where 'n' is the number of intervals. This util can be
used when log block manager coalesces block deletions belonging to the
same container.

For example, given the input interval list:
   [--2---) [-1-)
   [--3--)[---5--)[4)

The output sorted disjoint interval list is:
   [--1--)  [-2-)

It also adds unit test to verify given overlapped, duplicate, invalid
intervals, the implementation works as expected.

Change-Id: I61a813c047be4882f246eaf404598e7e18fcac87
Reviewed-on: http://gerrit.cloudera.org:8080/8041
Tested-by: Kudu Jenkins
Reviewed-by: Dan Burkert 
---
M src/kudu/util/CMakeLists.txt
A src/kudu/util/sorted_disjoint_interval_list-test.cc
A src/kudu/util/sorted_disjoint_interval_list.h
3 files changed, 194 insertions(+), 0 deletions(-)

Approvals:
  Kudu Jenkins: Verified
  Dan Burkert: Looks good to me, approved

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I61a813c047be4882f246eaf404598e7e18fcac87
Gerrit-Change-Number: 8041
Gerrit-PatchSet: 11
Gerrit-Owner: Hao Hao 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: Andrew Wong 
Gerrit-Reviewer: Dan Burkert 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Hao Hao 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon 


[kudu-CR] KUDU-2055 [part 4]: Coalesce hole punch for LBM

2017-09-28 Thread Hao Hao (Code Review)
Hao Hao has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8162 )

Change subject: KUDU-2055 [part 4]: Coalesce hole punch for LBM
..


Patch Set 2:

The failed test seems to be a known flaky test filed in 
https://issues.apache.org/jira/browse/KUDU-1736. Taking a look.


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7ccc9538b8184f8f7ba8f6118713b82fef433275
Gerrit-Change-Number: 8162
Gerrit-PatchSet: 2
Gerrit-Owner: Hao Hao 
Gerrit-Reviewer: Hao Hao 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Comment-Date: Thu, 28 Sep 2017 23:40:47 +
Gerrit-HasComments: No


[kudu-CR] WIP: Pull StatusOr and related tests from protobuf

2017-09-28 Thread Dan Burkert (Code Review)
Dan Burkert has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8127 )

Change subject: WIP: Pull StatusOr and related tests from protobuf
..


Patch Set 1:

In Rust, where this pattern is pervasive, it's common to have functions return 
Result<(T1, T2)>, which is the equivalent to ResultOr>.  In/out 
params are still passed by mutable reference, so it's much clearer from the 
signature what params are purely out params vs in/out.


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If2d86a3769da733456956fb892de6d679a011a63
Gerrit-Change-Number: 8127
Gerrit-PatchSet: 1
Gerrit-Owner: David Ribeiro Alves 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: Dan Burkert 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon 
Gerrit-Comment-Date: Thu, 28 Sep 2017 23:20:25 +
Gerrit-HasComments: No


[kudu-CR] WIP: Pull StatusOr and related tests from protobuf

2017-09-28 Thread Adar Dembo (Code Review)
Adar Dembo has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8127 )

Change subject: WIP: Pull StatusOr and related tests from protobuf
..


Patch Set 1:

At first I thought this was supposed to be a StatusAnd, which addresses a 
real pain point where some call paths want to return supplemental error 
information and it's nicer if that information was coupled with the Status 
itself. I remember Alexey distinctly wishing for that while working on a thorny 
CatalogManager error-handling patch.

But, this is just syntactic sugar to combine an OUT parameter into the return 
value, right? Is it even worth it?

I'm asking because it seems like with StatusOr instead of one calling 
convention (e.g. "Status DoFoo(Bar* out1, Baz* out2)") we'll have two:

  Status DoFoo(const Bar& in) // functions without OUT params
  StatusOr DoFoo(Baz* out2) // functions with 1+ OUT param

That is, functions with no OUT params will continue to use Status, while calls 
with at least one OUT param will return the first in the StatusOr and the 
remainder as normal OUT params.

I think this is especially weird for functions with multiple OUT params, 
because the first will be in StatusOr while the rest will be regular OUT 
params. Or is the idea to combine all of them into StatusOr, 
Status, or Status?

These concerns can be alleviated if I understood how we intend to apply 
StatusOr.


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If2d86a3769da733456956fb892de6d679a011a63
Gerrit-Change-Number: 8127
Gerrit-PatchSet: 1
Gerrit-Owner: David Ribeiro Alves 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: Dan Burkert 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon 
Gerrit-Comment-Date: Thu, 28 Sep 2017 23:07:57 +
Gerrit-HasComments: No


[kudu-CR] [catalog manager] introduce replica selector

2017-09-28 Thread Alexey Serbin (Code Review)
Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8161 )

Change subject: [catalog manager] introduce replica selector
..


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/8161/2//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/8161/2//COMMIT_MSG@18
PS2, Line 18: to receive information on NON_VOTER replicas as well.
> can you elaborate on the use case here? What client operations need to spec
The 'regular' client operations should work with voter replicas only, as I 
understand.

The use case for getting all replicas is when kudu CLI tool fetches that 
information to report on replica membership status for listings in 'table list 
--tablets' and 'ksck' sub-commands.

I hope to post corresponding patch for that later today.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I303a6d158184575a9a105c2d2bf26961ae8b3e93
Gerrit-Change-Number: 8161
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 
Gerrit-Comment-Date: Thu, 28 Sep 2017 22:39:50 +
Gerrit-HasComments: Yes


[kudu-CR] KUDU-2055 [part 2]: Add util to construct sorted disjoint interval list

2017-09-28 Thread Hao Hao (Code Review)
Hello Tidy Bot, Alexey Serbin, Dan Burkert, David Ribeiro Alves, Kudu Jenkins, 
Andrew Wong, Adar Dembo, Todd Lipcon,

I'd like you to reexamine a change. Please visit

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

to look at the new patch set (#10).

Change subject: KUDU-2055 [part 2]: Add util to construct sorted disjoint 
interval list
..

KUDU-2055 [part 2]: Add util to construct sorted disjoint interval list

This patch adds a utility to construct a sorted disjoint interval list
in-place given a list of intervals. The operation to construct such one
is O(nlg n + n) where 'n' is the number of intervals. This util can be
used when log block manager coalesces block deletions belonging to the
same container.

For example, given the input interval list:
   [--2---) [-1-)
   [--3--)[---5--)[4)

The output sorted disjoint interval list is:
   [--1--)  [-2-)

It also adds unit test to verify given overlapped, duplicate, invalid
intervals, the implementation works as expected.

Change-Id: I61a813c047be4882f246eaf404598e7e18fcac87
---
M src/kudu/util/CMakeLists.txt
A src/kudu/util/sorted_disjoint_interval_list-test.cc
A src/kudu/util/sorted_disjoint_interval_list.h
3 files changed, 194 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/41/8041/10
--
To view, visit http://gerrit.cloudera.org:8080/8041
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I61a813c047be4882f246eaf404598e7e18fcac87
Gerrit-Change-Number: 8041
Gerrit-PatchSet: 10
Gerrit-Owner: Hao Hao 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: Andrew Wong 
Gerrit-Reviewer: Dan Burkert 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Hao Hao 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon 


[kudu-CR] KUDU-2055 [part 2]: Add util to construct sorted disjoint interval list

2017-09-28 Thread Dan Burkert (Code Review)
Dan Burkert has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8041 )

Change subject: KUDU-2055 [part 2]: Add util to construct sorted disjoint 
interval list
..


Patch Set 9: Code-Review+2


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I61a813c047be4882f246eaf404598e7e18fcac87
Gerrit-Change-Number: 8041
Gerrit-PatchSet: 9
Gerrit-Owner: Hao Hao 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: Andrew Wong 
Gerrit-Reviewer: Dan Burkert 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Hao Hao 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon 
Gerrit-Comment-Date: Thu, 28 Sep 2017 21:25:14 +
Gerrit-HasComments: No


[kudu-CR] [catalog manager] introduce replica selector

2017-09-28 Thread Todd Lipcon (Code Review)
Todd Lipcon has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8161 )

Change subject: [catalog manager] introduce replica selector
..


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/8161/2//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/8161/2//COMMIT_MSG@18
PS2, Line 18: to receive information on NON_VOTER replicas as well.
can you elaborate on the use case here? What client operations need to specify 
a selection policy instead of always returning all members, and why? Would be 
nice to motivate the change use-case-first to evaluate whether the protocol 
changes make sense for what is needed by the clients, since it's pretty hard to 
change the proto later if it doesn't fit.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I303a6d158184575a9a105c2d2bf26961ae8b3e93
Gerrit-Change-Number: 8161
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 
Gerrit-Comment-Date: Thu, 28 Sep 2017 20:21:37 +
Gerrit-HasComments: Yes


[kudu-CR] [catalog manager] introduce replica selector

2017-09-28 Thread Alexey Serbin (Code Review)
Alexey Serbin has uploaded a new patch set (#2). ( 
http://gerrit.cloudera.org:8080/8161 )

Change subject: [catalog manager] introduce replica selector
..

[catalog manager] introduce replica selector

Introduced replica selector for GetTabletLocations RPC and
various wrapper methods used in master, catalog manager, and tests.
The selector is used to specify replica membership matching policy
while populating the result of the GetTabletLocations RPC.

As of now, only VOTER_REPLICA policy is used for all GetTabletLocations
invocations and only VOTER replicas are returned in the result.
As soon as NON_VOTER replicas appear in a follow-up commit, it will
be possible to use ANY_REPLICA policy with GetTabletLocation request
to receive information on NON_VOTER replicas as well.

Change-Id: I303a6d158184575a9a105c2d2bf26961ae8b3e93
---
M src/kudu/integration-tests/cluster_itest_util.cc
M src/kudu/integration-tests/cluster_itest_util.h
M src/kudu/integration-tests/raft_consensus-itest.cc
M src/kudu/integration-tests/registration-test.cc
M src/kudu/integration-tests/table_locations-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/master/catalog_manager.h
M src/kudu/master/master.proto
M src/kudu/master/master_service.cc
M src/kudu/tools/kudu-admin-test.cc
10 files changed, 160 insertions(+), 47 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I303a6d158184575a9a105c2d2bf26961ae8b3e93
Gerrit-Change-Number: 8161
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin 


[kudu-CR] [webui] Allow custom response codes and headers

2017-09-28 Thread Will Berkeley (Code Review)
Hello Tidy Bot, Kudu Jenkins,

I'd like you to reexamine a change. Please visit

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

to look at the new patch set (#4).

Change subject: [webui] Allow custom response codes and headers
..

[webui] Allow custom response codes and headers

Previously, the path handlers used to implement pages in the web ui
could only return 200 OK and could not set any headers, as these two
aspects of the HTTP response were handled in the underlying webserver
code. This patch introduces WebResponse and PrerenderedWebResponse
structs that wrap and replace the 'output' EasyJson and ostringstream
pointers, respectively, used before, and which has fields for the
response code and additional headers.

The ability to add headers isn't currently used, but it's nice to have.
The response codes are adjusted where necessary to match what one
would expect, e.g. navigating to /tablet?id=foo returns
404.

Change-Id: I9ff890785eeb2df3eed9e7c54d0daf760c8b3924
---
M src/kudu/master/master-path-handlers.cc
M src/kudu/master/master-path-handlers.h
M src/kudu/server/default-path-handlers.cc
M src/kudu/server/pprof-path-handlers.cc
M src/kudu/server/rpcz-path-handler.cc
M src/kudu/server/tracing-path-handlers.cc
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/tserver/tserver-path-handlers.cc
M src/kudu/tserver/tserver-path-handlers.h
M src/kudu/util/thread.cc
M src/kudu/util/web_callback_registry.h
12 files changed, 237 insertions(+), 124 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/41/8141/4
--
To view, visit http://gerrit.cloudera.org:8080/8141
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9ff890785eeb2df3eed9e7c54d0daf760c8b3924
Gerrit-Change-Number: 8141
Gerrit-PatchSet: 4
Gerrit-Owner: Will Berkeley 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Will Berkeley 


[kudu-CR] KUDU-2055 [part 5]: Incorporate BlockDeletionTransaction in block deletions

2017-09-28 Thread Hao Hao (Code Review)
Hao Hao has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/8163


Change subject: KUDU-2055 [part 5]: Incorporate BlockDeletionTransaction in 
block deletions
..

KUDU-2055 [part 5]: Incorporate BlockDeletionTransaction in block deletions

This patches incorporates fs::BlockDeletionTransaction API in tablet
metadata's orphaned block deletions to improve overall performance of
batched block deletions, such as delete a tablet.

Change-Id: I1bfac61a70b45d9f27d807f22bc21e582da2dd97
---
M src/kudu/tablet/tablet_metadata.cc
1 file changed, 7 insertions(+), 11 deletions(-)



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1bfac61a70b45d9f27d807f22bc21e582da2dd97
Gerrit-Change-Number: 8163
Gerrit-PatchSet: 1
Gerrit-Owner: Hao Hao