Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-23 Thread Qian Zhang

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41597/#review111749
---



src/master/allocator/mesos/hierarchical.cpp (line 1051)


So if this is not an active role, then we will not update its weight in 
`quotaRoleSorter`, and its weight in `quotaRoleSorter` will always be 1.0 even 
it becomes active later? This seems not correct.



src/master/allocator/mesos/hierarchical.cpp (line 1057)


Do we support updating weight for an inactive role? If yes, I think this 
`CHECK` will fail. So I think, here we should update weight in `roleSorter` 
only if `roleSorter` contains the `role`.



src/master/allocator/mesos/hierarchical.cpp (line 1060)


Should we use `quotas.contains(role)` instead?


- Qian Zhang


On Dec. 23, 2015, 1:46 p.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41597/
> ---
> 
> (Updated Dec. 23, 2015, 1:46 p.m.)
> 
> 
> Review request for mesos, Adam B, Neil Conway, and Qian Zhang.
> 
> 
> Bugs: MESOS-3943
> https://issues.apache.org/jira/browse/MESOS-3943
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add the interface in allocator to support updating weight
> at runtime, and the allocator is invoked to allocate the
> resources based on the updated weights later.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
>   src/master/allocator/mesos/allocator.hpp 
> 50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
>   src/master/allocator/mesos/hierarchical.hpp 
> 86ea5a402ed67f8f22f11d5730147cd907d66a08 
>   src/master/allocator/mesos/hierarchical.cpp 
> 775182515dcb52bd873ecdf98c827320251a59c8 
>   src/master/allocator/sorter/drf/sorter.hpp 
> 050896e8b12cd4097ccd137d5284d6b39b0f06ab 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 3a442f121f3a1505513877a5c78458a4b8d0a824 
>   src/master/allocator/sorter/sorter.hpp 
> 7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
>   src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 
> 
> Diff: https://reviews.apache.org/r/41597/diff/
> 
> 
> Testing
> ---
> 
> Make & Make check successfully!
> 
> Test case: https://reviews.apache.org/r/41672/
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-23 Thread Yongqiao Wang

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41597/
---

(Updated Dec. 23, 2015, 9:05 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
775182515dcb52bd873ecdf98c827320251a59c8 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Review Request 41680: Reduced LogLevel in order to avoid overflowing logs.

2015-12-23 Thread Joerg Schad

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41680/
---

Review request for mesos and Bernd Mathiske.


Bugs: MESOS-4181
https://issues.apache.org/jira/browse/MESOS-4181


Repository: mesos


Description
---

Especially the logging of port ranges resulted in enourmous logs, reduced the 
log level from LOG(INFO) to VLOG(1).


Diffs
-

  src/master/allocator/mesos/hierarchical.cpp 
775182515dcb52bd873ecdf98c827320251a59c8 

Diff: https://reviews.apache.org/r/41680/diff/


Testing
---

make check and checked logs


Thanks,

Joerg Schad



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-23 Thread Yongqiao Wang

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41597/
---

(Updated Dec. 23, 2015, 9:18 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
775182515dcb52bd873ecdf98c827320251a59c8 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-23 Thread Yongqiao Wang


> On Dec. 23, 2015, 8:22 a.m., Qian Zhang wrote:
> > src/master/allocator/mesos/hierarchical.cpp, line 1057
> > 
> >
> > Do we support updating weight for an inactive role? If yes, I think 
> > this `CHECK` will fail. So I think, here we should update weight in 
> > `roleSorter` only if `roleSorter` contains the `role`.

Before this check, it has been ensured that the specified role contains in 
activeRoles, so this check will always successful.


> On Dec. 23, 2015, 8:22 a.m., Qian Zhang wrote:
> > src/master/allocator/mesos/hierarchical.cpp, line 1060
> > 
> >
> > Should we use `quotas.contains(role)` instead?

Our target is to update quotaRoleSorter, so use quotaRoleSorter for checking is 
more clearer.


- Yongqiao


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41597/#review111749
---


On Dec. 23, 2015, 9:05 a.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41597/
> ---
> 
> (Updated Dec. 23, 2015, 9:05 a.m.)
> 
> 
> Review request for mesos, Adam B, Neil Conway, and Qian Zhang.
> 
> 
> Bugs: MESOS-3943
> https://issues.apache.org/jira/browse/MESOS-3943
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add the interface in allocator to support updating weight
> at runtime, and the allocator is invoked to allocate the
> resources based on the updated weights later.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
>   src/master/allocator/mesos/allocator.hpp 
> 50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
>   src/master/allocator/mesos/hierarchical.hpp 
> 86ea5a402ed67f8f22f11d5730147cd907d66a08 
>   src/master/allocator/mesos/hierarchical.cpp 
> 775182515dcb52bd873ecdf98c827320251a59c8 
>   src/master/allocator/sorter/drf/sorter.hpp 
> 050896e8b12cd4097ccd137d5284d6b39b0f06ab 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 3a442f121f3a1505513877a5c78458a4b8d0a824 
>   src/master/allocator/sorter/sorter.hpp 
> 7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
>   src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 
> 
> Diff: https://reviews.apache.org/r/41597/diff/
> 
> 
> Testing
> ---
> 
> Make & Make check successfully!
> 
> Test case: https://reviews.apache.org/r/41672/
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Review Request 41681: Introduce HTTP endpoint /weights for updating weight.

2015-12-23 Thread Yongqiao Wang

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41681/
---

Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Bugs: MESOS-4214
https://issues.apache.org/jira/browse/MESOS-4214


Repository: mesos


Description
---

Introduce HTTP endpoint /weights for updating weight.


Diffs
-

  include/mesos/mesos.proto 2431fdd6b84625c6140a2b3913736bffada4e7f6 
  src/CMakeLists.txt bdc45ae604c940dadc27ab6e8b8a3327bd00642b 
  src/Makefile.am cf7f950c0c320a6c8e956409a35a7f47d905f71d 
  src/master/http.cpp deb0c8f9852dc0eec1e8c0ff35c684f982e8b110 
  src/master/master.hpp 8af82a0bbc2038e18180136c82cbaeeacc7b3526 
  src/master/master.cpp 40ce3e17fca88da689128bcf5d35fdddc396c011 
  src/master/weights_handler.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/41681/diff/


Testing
---

Make & Make check successfully!

$ (./mesos-master.sh --ip=127.0.0.1 --work_dir=/Users/yqwyq/tmp/mesos-master  
>> /tmp/mesos-master.log 2>&1 &)
$ curl -d 
weights="[{\"weight\":1.0,\"role\":\"role1\"},{\"weight\":8.0,\"role\":\"role2\"}]"
 -X PUT http://localhost:5050/weights
$ curl http://localhost:5050/roles
{
"roles": [
{
"frameworks": [ ], 
"name": "*", 
"resources": {
"cpus": 0, 
"disk": 0, 
"mem": 0
}, 
"weight": 1
}, 
{
"frameworks": [ ], 
"name": "role1", 
"resources": {
"cpus": 0, 
"disk": 0, 
"mem": 0
}, 
"weight": 1
}, 
{
"frameworks": [ ], 
"name": "role2", 
"resources": {
"cpus": 0, 
"disk": 0, 
"mem": 0
}, 
"weight": 8
}
]
}


Thanks,

Yongqiao Wang



Review Request 41682: Reflected deprecation of external containerizer in documentation.

2015-12-23 Thread Joerg Schad

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41682/
---

Review request for mesos and Bernd Mathiske.


Bugs: MESOS-3370
https://issues.apache.org/jira/browse/MESOS-3370


Repository: mesos


Description
---

Reflected deprecation of external containerizer in documentation.


Diffs
-

  docs/external-containerizer.md 96932189b74dce1ae28e0bd73d5543d1afaffb0b 
  docs/home.md 51c19bb9d0d74698fcdda6197d32ed8f4a57d7c9 

Diff: https://reviews.apache.org/r/41682/diff/


Testing
---

Viewed rendered doc.


Thanks,

Joerg Schad



Re: Review Request 41680: Reduced LogLevel in order to avoid overflowing logs.

2015-12-23 Thread Bernd Mathiske

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41680/#review111757
---

Ship it!


Ship It!

- Bernd Mathiske


On Dec. 23, 2015, 1:06 a.m., Joerg Schad wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41680/
> ---
> 
> (Updated Dec. 23, 2015, 1:06 a.m.)
> 
> 
> Review request for mesos and Bernd Mathiske.
> 
> 
> Bugs: MESOS-4181
> https://issues.apache.org/jira/browse/MESOS-4181
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Especially the logging of port ranges resulted in enourmous logs, reduced the 
> log level from LOG(INFO) to VLOG(1).
> 
> 
> Diffs
> -
> 
>   src/master/allocator/mesos/hierarchical.cpp 
> 775182515dcb52bd873ecdf98c827320251a59c8 
> 
> Diff: https://reviews.apache.org/r/41680/diff/
> 
> 
> Testing
> ---
> 
> make check and checked logs
> 
> 
> Thanks,
> 
> Joerg Schad
> 
>



Review Request 41683: Added links to individual containerizers in containerizer-internal.md.

2015-12-23 Thread Joerg Schad

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41683/
---

Review request for mesos, Bernd Mathiske and Jojy Varghese.


Bugs: MESOS-3370
https://issues.apache.org/jira/browse/MESOS-3370


Repository: mesos


Description
---

Added links to individual containerizers in containerizer-internal.md.


Diffs
-

  docs/containerizer-internals.md f620c32cdd4dd7cf6f245fad4e50925531cb4a39 

Diff: https://reviews.apache.org/r/41683/diff/


Testing
---

viewed rendered doc.


Thanks,

Joerg Schad



Re: Review Request 41683: Added links to individual containerizers in containerizer-internal.md.

2015-12-23 Thread Bernd Mathiske

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41683/#review111760
---

Ship it!


Ship It!

- Bernd Mathiske


On Dec. 23, 2015, 1:32 a.m., Joerg Schad wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41683/
> ---
> 
> (Updated Dec. 23, 2015, 1:32 a.m.)
> 
> 
> Review request for mesos, Bernd Mathiske and Jojy Varghese.
> 
> 
> Bugs: MESOS-3370
> https://issues.apache.org/jira/browse/MESOS-3370
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added links to individual containerizers in containerizer-internal.md.
> 
> 
> Diffs
> -
> 
>   docs/containerizer-internals.md f620c32cdd4dd7cf6f245fad4e50925531cb4a39 
> 
> Diff: https://reviews.apache.org/r/41683/diff/
> 
> 
> Testing
> ---
> 
> viewed rendered doc.
> 
> 
> Thanks,
> 
> Joerg Schad
> 
>



Re: Review Request 41682: Reflected deprecation of external containerizer in documentation.

2015-12-23 Thread Bernd Mathiske

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41682/#review111761
---

Ship it!


Ship It!

- Bernd Mathiske


On Dec. 23, 2015, 1:30 a.m., Joerg Schad wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41682/
> ---
> 
> (Updated Dec. 23, 2015, 1:30 a.m.)
> 
> 
> Review request for mesos, Bernd Mathiske and Jojy Varghese.
> 
> 
> Bugs: MESOS-3370
> https://issues.apache.org/jira/browse/MESOS-3370
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Reflected deprecation of external containerizer in documentation.
> 
> 
> Diffs
> -
> 
>   docs/external-containerizer.md 96932189b74dce1ae28e0bd73d5543d1afaffb0b 
>   docs/home.md 51c19bb9d0d74698fcdda6197d32ed8f4a57d7c9 
> 
> Diff: https://reviews.apache.org/r/41682/diff/
> 
> 
> Testing
> ---
> 
> Viewed rendered doc.
> 
> 
> Thanks,
> 
> Joerg Schad
> 
>



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-23 Thread Yongqiao Wang

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41597/
---

(Updated Dec. 23, 2015, 9:44 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
775182515dcb52bd873ecdf98c827320251a59c8 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41672: Test case(s) for weights + allocation behavior

2015-12-23 Thread Yongqiao Wang

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41672/
---

(Updated Dec. 23, 2015, 9:44 a.m.)


Review request for mesos, Adam B and Neil Conway.


Changes
---

Fix bug.


Bugs: MESOS-4200
https://issues.apache.org/jira/browse/MESOS-4200


Repository: mesos


Description
---

Test case(s) for weights + allocation behavior


Diffs (updated)
-

  src/tests/hierarchical_allocator_tests.cpp 
88bb7e987c471587d46e15082fe1149fd94db5d6 

Diff: https://reviews.apache.org/r/41672/diff/


Testing
---

Make check done:
Yongs-MacBook-Pro:build yqwyq$ ./src/mesos-tests 
--gtest_filter=HierarchicalAllocatorTest.UpdateWeight
Source directory: /Users/yqwyq/Desktop/mesos
Build directory: /Users/yqwyq/Desktop/mesos/build
[==] Running 1 test from 1 test case.
[--] Global test environment set-up.
[--] 1 test from HierarchicalAllocatorTest
[ RUN  ] HierarchicalAllocatorTest.UpdateWeight
[   OK ] HierarchicalAllocatorTest.UpdateWeight (257 ms)
[--] 1 test from HierarchicalAllocatorTest (257 ms total)

[--] Global test environment tear-down
[==] 1 test from 1 test case ran. (340 ms total)
[  PASSED  ] 1 test.


Thanks,

Yongqiao Wang



Re: Review Request 39584: Windows: Implemented `os::rmdir.hpp`.

2015-12-23 Thread Alex Clemmer


> On Dec. 15, 2015, 3:54 a.m., Alex Naparu wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/rmdir.hpp, line 
> > 39
> > 
> >
> > What if the path ends with multiple '\' chars to begin with?

Good question. In general, our externally-facing API (like `os::rmdir`) will 
take any path and normalize that before processing, but our internal functions 
assume that paths are already normalized. Practically speaking, this simplifies 
our code quite a bit, and it's an easy rule to remember.

In this case, `os::realpath` will strip the trailing extraneous slashes from 
the filename (I've verified this), and since `os::rmdir` preforms this 
normalization before `recursiveRemoveDirectory` is called, I believe this code 
is correct.

So the short answer is, "we should never encounter such a situation", assuming 
there is no normalized path with multiple


> On Dec. 15, 2015, 3:54 a.m., Alex Naparu wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/rmdir.hpp, line 
> > 47
> > 
> >
> > What happens if the input path already contains a wildcard? Might be a 
> > good idea to check that "path" is a directory before moving forward. Also 
> > might be a good idea to use realpath here.

The short answer is that paths end with a star yield correct behavior -- 
_i.e._, it will treat the path ending in a wildcard as an absolute path, and 
since that path doesn't exist, it will then return an error. So, a call to 
`isdir` is not necessary here, unless I'm missing something else.

The longer answer is: we assume the path passed into the function is a 
directory, and append either a `*` or a `*` to the end of the path (depending 
on whether it already has a trailing `\ `), and ask `FindFirstFile` to find the 
first file that matches that pattern. Since this will result in a path like 
`C:\example**`, clearly this is not a directory, and the Windows API it will 
fail to find any directory entries matching the pattern, returning an error.

For the normalization issue, as noted above, we do assume that the path is 
normalized when passed into this function.


> On Dec. 15, 2015, 3:54 a.m., Alex Naparu wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/rmdir.hpp, line 
> > 62
> > 
> >
> > Nit: tou're not reusing these, so might as well inline the callse.

I'd like to keep these actually, unless you really are opposed to them. I chose 
them because they make the code self-documenting.


> On Dec. 15, 2015, 3:54 a.m., Alex Naparu wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/rmdir.hpp, line 
> > 73
> > 
> >
> > Attributes should already be available in WIN32_FIND_DATA (see 
> > https://msdn.microsoft.com/en-us/library/windows/desktop/aa365740(v=vs.85).aspx),
> >  you might not need to call GetFileAttribiutes here. If you do need to get 
> > the attributes, consider using CreateFile and GetFileInformationByHandle, 
> > which will always give the up-to-date information even on NTFS (see 
> > https://msdn.microsoft.com/en-us/library/windows/desktop/aa364952(v=vs.85).aspx
> >  for details)

This code can probably actually transition to `stat::isdir`; it wasn't written 
to use that code because I hadn't written that function yet. Now that I have, 
we can reverse the order of these commits, and simply use that function.


> On Dec. 15, 2015, 3:54 a.m., Alex Naparu wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/rmdir.hpp, line 
> > 77
> > 
> >
> > Consider using a smart pointer for closing the handle.

Per our conversation some months ago, we'll transition to a new type, 
`shared_handle`, which is a typedef to `shared_ptr`. This looks the same 
but avoids returning pointer to void everywhere, which is gross.


> On Dec. 15, 2015, 3:54 a.m., Alex Naparu wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/rmdir.hpp, line 
> > 97
> > 
> >
> > Failure of ::remove alone might not be reason enough for aborting the 
> > entire call. For instance, if ::remove fails with "file not found", we're 
> > still good to go.

I believe the POSIX spec actually says that you should stop after you fail to 
delete one of the things you tried to delete. So I think that we should keep 
this behavior, unless you think I missed something else?


> On Dec. 15, 2015, 3:54 a.m., Alex Naparu wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/rmdir.hpp, line 
> > 138
> > 
> >
> > Co

Re: Review Request 41680: Reduced LogLevel in order to avoid overflowing logs.

2015-12-23 Thread Mesos ReviewBot

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41680/#review111767
---


Patch looks great!

Reviews applied: [41680]

Passed command: export OS=ubuntu:14.04;export CONFIGURATION="--verbose";export 
COMPILER=gcc; ./support/docker_build.sh

- Mesos ReviewBot


On Dec. 23, 2015, 9:06 a.m., Joerg Schad wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41680/
> ---
> 
> (Updated Dec. 23, 2015, 9:06 a.m.)
> 
> 
> Review request for mesos and Bernd Mathiske.
> 
> 
> Bugs: MESOS-4181
> https://issues.apache.org/jira/browse/MESOS-4181
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Especially the logging of port ranges resulted in enourmous logs, reduced the 
> log level from LOG(INFO) to VLOG(1).
> 
> 
> Diffs
> -
> 
>   src/master/allocator/mesos/hierarchical.cpp 
> 775182515dcb52bd873ecdf98c827320251a59c8 
> 
> Diff: https://reviews.apache.org/r/41680/diff/
> 
> 
> Testing
> ---
> 
> make check and checked logs
> 
> 
> Thanks,
> 
> Joerg Schad
> 
>



Re: Review Request 41681: Introduce HTTP endpoint /weights for updating weight.

2015-12-23 Thread Mesos ReviewBot

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41681/#review111770
---


Bad patch!

Reviews applied: [41597, 41681]

Failed command: ./support/apply-review.sh -n -r 41681

Error:
 2015-12-23 10:33:16 URL:https://reviews.apache.org/r/41681/diff/raw/ 
[10249/10249] -> "41681.patch" [1]
error: patch failed: src/master/master.hpp:1173
error: src/master/master.hpp: patch does not apply

- Mesos ReviewBot


On Dec. 23, 2015, 9:18 a.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41681/
> ---
> 
> (Updated Dec. 23, 2015, 9:18 a.m.)
> 
> 
> Review request for mesos, Adam B, Neil Conway, and Qian Zhang.
> 
> 
> Bugs: MESOS-4214
> https://issues.apache.org/jira/browse/MESOS-4214
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Introduce HTTP endpoint /weights for updating weight.
> 
> 
> Diffs
> -
> 
>   include/mesos/mesos.proto 2431fdd6b84625c6140a2b3913736bffada4e7f6 
>   src/CMakeLists.txt bdc45ae604c940dadc27ab6e8b8a3327bd00642b 
>   src/Makefile.am cf7f950c0c320a6c8e956409a35a7f47d905f71d 
>   src/master/http.cpp deb0c8f9852dc0eec1e8c0ff35c684f982e8b110 
>   src/master/master.hpp 8af82a0bbc2038e18180136c82cbaeeacc7b3526 
>   src/master/master.cpp 40ce3e17fca88da689128bcf5d35fdddc396c011 
>   src/master/weights_handler.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/41681/diff/
> 
> 
> Testing
> ---
> 
> Make & Make check successfully!
> 
> $ (./mesos-master.sh --ip=127.0.0.1 --work_dir=/Users/yqwyq/tmp/mesos-master  
> >> /tmp/mesos-master.log 2>&1 &)
> $ curl -d 
> weights="[{\"weight\":1.0,\"role\":\"role1\"},{\"weight\":8.0,\"role\":\"role2\"}]"
>  -X PUT http://localhost:5050/weights
> $ curl http://localhost:5050/roles
> {
> "roles": [
> {
> "frameworks": [ ], 
> "name": "*", 
> "resources": {
> "cpus": 0, 
> "disk": 0, 
> "mem": 0
> }, 
> "weight": 1
> }, 
> {
> "frameworks": [ ], 
> "name": "role1", 
> "resources": {
> "cpus": 0, 
> "disk": 0, 
> "mem": 0
> }, 
> "weight": 1
> }, 
> {
> "frameworks": [ ], 
> "name": "role2", 
> "resources": {
> "cpus": 0, 
> "disk": 0, 
> "mem": 0
> }, 
> "weight": 8
> }
> ]
> }
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 39584: Windows: Implemented `os::rmdir.hpp`.

2015-12-23 Thread Mesos ReviewBot

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39584/#review111775
---


Bad patch!

Reviews applied: [39621, 39620, 39583, 39584]

Failed command: ./support/apply-review.sh -n -r 39584

Error:
 2015-12-23 11:50:08 URL:https://reviews.apache.org/r/39584/diff/raw/ 
[14011/14011] -> "39584.patch" [1]
error: patch failed: 3rdparty/libprocess/3rdparty/stout/include/Makefile.am:95
error: 3rdparty/libprocess/3rdparty/stout/include/Makefile.am: patch does not 
apply

- Mesos ReviewBot


On Nov. 16, 2015, 9:13 a.m., Alex Clemmer wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39584/
> ---
> 
> (Updated Nov. 16, 2015, 9:13 a.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan, Joris Van Remoortere, and Joseph 
> Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Windows: Implemented `os::rmdir.hpp`.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am 
> a8c35c086ecae21701f6a720f25231c1b0d4e329 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp 
> 5c1df81193b4b888d2ed5c7dbfa0b5e2fae48467 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/rmdir.hpp 
> PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/rmdir.hpp PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/rmdir.hpp 
> PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp 
> e26df59d9b837e1f4a4b92577f0a3de4b9076cb4 
>   3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp 
> edf17d5ad8efbc988e909bfb8ffa5a015ecdc89d 
> 
> Diff: https://reviews.apache.org/r/39584/diff/
> 
> 
> Testing
> ---
> 
> `make check` from autotools on Ubuntu 15.
> `make check` from CMake on OS X 10.10.
> Ran `check` project in VS on Windows 10.
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>



Re: Review Request 41593: stout: Added `jsonify` function.

2015-12-23 Thread Michael Park

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41593/
---

(Updated Dec. 23, 2015, 5:57 p.m.)


Review request for mesos and Benjamin Hindman.


Changes
---

Added a comment to explain why `WriterProxy` exists.


Repository: mesos


Description
---

See summary.


Diffs (updated)
-

  3rdparty/libprocess/3rdparty/stout/README.md 
a2a3dc6120b10c8fe82088b9f0ebecfa5642f945 
  3rdparty/libprocess/3rdparty/stout/include/Makefile.am 
b2dea9b93adfa3ea0415a0b5c81a369dd29b6cfe 
  3rdparty/libprocess/3rdparty/stout/include/stout/jsonify.hpp PRE-CREATION 

Diff: https://reviews.apache.org/r/41593/diff/


Testing
---


Thanks,

Michael Park



Re: Review Request 39584: Windows: Implemented `os::rmdir.hpp`.

2015-12-23 Thread Alex Clemmer


> On Dec. 15, 2015, 3:54 a.m., Alex Naparu wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/rmdir.hpp, line 
> > 51
> > 
> >
> > Calling FindClose on an invalid handle is not the best idea. At best it 
> > will be a no-op.

So, would you suggest checking if the handle is `INVALID_HANDLE_VALUE` and 
closing it only if that's not true?


- Alex


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39584/#review110385
---


On Nov. 16, 2015, 9:13 a.m., Alex Clemmer wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39584/
> ---
> 
> (Updated Nov. 16, 2015, 9:13 a.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan, Joris Van Remoortere, and Joseph 
> Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Windows: Implemented `os::rmdir.hpp`.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am 
> a8c35c086ecae21701f6a720f25231c1b0d4e329 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp 
> 5c1df81193b4b888d2ed5c7dbfa0b5e2fae48467 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/rmdir.hpp 
> PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/rmdir.hpp PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/rmdir.hpp 
> PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp 
> e26df59d9b837e1f4a4b92577f0a3de4b9076cb4 
>   3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp 
> edf17d5ad8efbc988e909bfb8ffa5a015ecdc89d 
> 
> Diff: https://reviews.apache.org/r/39584/diff/
> 
> 
> Testing
> ---
> 
> `make check` from autotools on Ubuntu 15.
> `make check` from CMake on OS X 10.10.
> Ran `check` project in VS on Windows 10.
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>



Re: Review Request 41593: stout: Added `jsonify` function.

2015-12-23 Thread Michael Park


> On Dec. 22, 2015, 4:52 a.m., Benjamin Hindman wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/jsonify.hpp, line 536
> > 
> >
> > Do you think the comment over `WriterProxy` will be sufficient to 
> > capture this functionality too?

Please take a look at the comment that I've added :)

Also, this has the same problem with `Proxy`'s `operator std::string()` where 
it is a non-const implicit conversion operator. Again, ideally I would declare 
these with ref-qualifiers: `operator BooleanWriter*() &&`.


- Michael


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41593/#review111575
---


On Dec. 23, 2015, 5:57 p.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41593/
> ---
> 
> (Updated Dec. 23, 2015, 5:57 p.m.)
> 
> 
> Review request for mesos and Benjamin Hindman.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> See summary.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/3rdparty/stout/README.md 
> a2a3dc6120b10c8fe82088b9f0ebecfa5642f945 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am 
> b2dea9b93adfa3ea0415a0b5c81a369dd29b6cfe 
>   3rdparty/libprocess/3rdparty/stout/include/stout/jsonify.hpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/41593/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Re: Review Request 41425: Fix the Mesos pkg-config.

2015-12-23 Thread Alex Clemmer

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41425/#review111806
---

Ship it!


Just as a short note here, `pkg-config` doesn't work well with the rest of the 
Windows tool chain, so it's worth wondering what our distribution story should 
be there.

If the consumer is using CMake, then this information is trivially and 
seamlessly communicated to whoever is linking to it. If this is not true, we 
will probably have to support at least one other distribution channel (such as 
NuGet), and possibly many.

Can we add `alexnaparu` and `dpravat` to the review and get their feedback as 
well?

- Alex Clemmer


On Dec. 22, 2015, 8:45 p.m., James Peach wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41425/
> ---
> 
> (Updated Dec. 22, 2015, 8:45 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Ben Mahler, Alex Clemmer, Joris 
> Van Remoortere, Joseph Wu, and Niklas Nielsen.
> 
> 
> Bugs: MESOS-3909
> https://issues.apache.org/jira/browse/MESOS-3909
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The pkg-config file needs to explicitly set the -I path, and also
> set and preprocessor definitions that Mesos assumes will be set for
> picojson.h.
> 
> 
> Diffs
> -
> 
>   mesos.pc.in bc4f7e778dd8e5e2bd5e8f4181d62934ac423135 
> 
> Diff: https://reviews.apache.org/r/41425/diff/
> 
> 
> Testing
> ---
> 
> Check various pkg-config invocations and make sure they are sane:
> 
> $ PKG_CONFIG_PATH=/opt/mesos/lib/pkgconfig pkg-config --libs mesos
> -L/opt/mesos/lib -lmesos
> $ PKG_CONFIG_PATH=/opt/mesos/lib/pkgconfig pkg-config --cflags mesos
> -DPICOJSON_USE_INT64 -D__STDC_FORMAT_MACROS -I/opt/mesos/include
> $ PKG_CONFIG_PATH=/opt/mesos/lib/pkgconfig pkg-config --cflags-only-I 
> mesos
> -I/opt/mesos/include
> 
> 
> Thanks,
> 
> James Peach
> 
>



Re: Review Request 41424: Install picojson.h if we are using the bundled version.

2015-12-23 Thread Alex Clemmer

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41424/#review111807
---

Ship it!


Much in the spirit of my review of #41425, it's interesting to consider what 
our distribution story should be in CMake.

We currently have not implemented of the distribution logic, but it's 
definitely coming down the pike. the person _en pointe_ for that is `darroyo`, 
can we please add her to the review to get her feedback? In the meantime I'll 
open a JIRA to track this work.

To summarize what I will say there: since CMake is expected to work on Windows, 
it does not natively create a `make dist` target for you. So I suspect that a 
"complete" solution is to (1) create a `dist` target on non-Windows platforms, 
which will wrap CPack, which is how we would build distributions with CMake; 
and (2) audit the contents of the distribution in the autotools solution, and 
replicate them in CMake. An example is here[1] and I expect our solution will 
be very similar.

[1] http://agateau.com/2009/cmake-and-make-dist-the-simple-version/

- Alex Clemmer


On Dec. 22, 2015, 8:44 p.m., James Peach wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41424/
> ---
> 
> (Updated Dec. 22, 2015, 8:44 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Ben Mahler, Alex Clemmer, Joris 
> Van Remoortere, Joseph Wu, and Niklas Nielsen.
> 
> 
> Bugs: MESOS-3909
> https://issues.apache.org/jira/browse/MESOS-3909
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The Stout JSON API depends on picojson.h, so we need to install it
> to be able to build Mesos modules outside the Mesos source tree.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/3rdparty/Makefile.am 
> 04d0fa324bf6eab98a51fc08298b9da2992d29d1 
> 
> Diff: https://reviews.apache.org/r/41424/diff/
> 
> 
> Testing
> ---
> 
> Build an external module that implicitly depends on picojson.h
> 
> 
> Thanks,
> 
> James Peach
> 
>



Re: Review Request 41425: Fix the Mesos pkg-config.

2015-12-23 Thread Alex Clemmer


> On Dec. 23, 2015, 9:15 p.m., Alex Clemmer wrote:
> > Just as a short note here, `pkg-config` doesn't work well with the rest of 
> > the Windows tool chain, so it's worth wondering what our distribution story 
> > should be there.
> > 
> > If the consumer is using CMake, then this information is trivially and 
> > seamlessly communicated to whoever is linking to it. If this is not true, 
> > we will probably have to support at least one other distribution channel 
> > (such as NuGet), and possibly many.
> > 
> > Can we add `alexnaparu` and `dpravat` to the review and get their feedback 
> > as well?

The JIRA issue is here: https://issues.apache.org/jira/browse/MESOS-4245


- Alex


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41425/#review111806
---


On Dec. 22, 2015, 8:45 p.m., James Peach wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41425/
> ---
> 
> (Updated Dec. 22, 2015, 8:45 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Ben Mahler, Alex Clemmer, Joris 
> Van Remoortere, Joseph Wu, and Niklas Nielsen.
> 
> 
> Bugs: MESOS-3909
> https://issues.apache.org/jira/browse/MESOS-3909
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The pkg-config file needs to explicitly set the -I path, and also
> set and preprocessor definitions that Mesos assumes will be set for
> picojson.h.
> 
> 
> Diffs
> -
> 
>   mesos.pc.in bc4f7e778dd8e5e2bd5e8f4181d62934ac423135 
> 
> Diff: https://reviews.apache.org/r/41425/diff/
> 
> 
> Testing
> ---
> 
> Check various pkg-config invocations and make sure they are sane:
> 
> $ PKG_CONFIG_PATH=/opt/mesos/lib/pkgconfig pkg-config --libs mesos
> -L/opt/mesos/lib -lmesos
> $ PKG_CONFIG_PATH=/opt/mesos/lib/pkgconfig pkg-config --cflags mesos
> -DPICOJSON_USE_INT64 -D__STDC_FORMAT_MACROS -I/opt/mesos/include
> $ PKG_CONFIG_PATH=/opt/mesos/lib/pkgconfig pkg-config --cflags-only-I 
> mesos
> -I/opt/mesos/include
> 
> 
> Thanks,
> 
> James Peach
> 
>



Review Request 41697: Fixed a documentation bug in containerizer internals doc.

2015-12-23 Thread Anand Mazumdar

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41697/
---

Review request for mesos, Jie Yu and Jojy Varghese.


Repository: mesos


Description
---

The current document delves upon the behavior of using the default executor 
i.e. `mesos-docker-executor` on whether the task has `TaskInfo` set or not. 
This is slightly confusing as any task in Mesos is specified via the `TaskInfo` 
protobuf message.

This change corrects this and outlines the difference in behavior on whether 
the `Task` specifies an executor (custom executor) or specifies a command 
(command executor).


Diffs
-

  docs/containerizer-internals.md 4386bbda21686b616ccf85db408899fece3680df 

Diff: https://reviews.apache.org/r/41697/diff/


Testing
---

make check


Thanks,

Anand Mazumdar



Re: Review Request 41697: Fixed a documentation bug in containerizer internals doc.

2015-12-23 Thread Mesos ReviewBot

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41697/#review111813
---


Patch looks great!

Reviews applied: [41697]

Passed command: export OS=ubuntu:14.04;export CONFIGURATION="--verbose";export 
COMPILER=gcc; ./support/docker_build.sh

- Mesos ReviewBot


On Dec. 23, 2015, 10:22 p.m., Anand Mazumdar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41697/
> ---
> 
> (Updated Dec. 23, 2015, 10:22 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Jojy Varghese.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The current document delves upon the behavior of using the default executor 
> i.e. `mesos-docker-executor` on whether the task has `TaskInfo` set or not. 
> This is slightly confusing as any task in Mesos is specified via the 
> `TaskInfo` protobuf message.
> 
> This change corrects this and outlines the difference in behavior on whether 
> the `Task` specifies an executor (custom executor) or specifies a command 
> (command executor).
> 
> 
> Diffs
> -
> 
>   docs/containerizer-internals.md 4386bbda21686b616ccf85db408899fece3680df 
> 
> Diff: https://reviews.apache.org/r/41697/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>



Re: Review Request 41680: Reduced LogLevel in order to avoid overflowing logs.

2015-12-23 Thread Cody Maloney

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41680/#review111815
---

Ship it!


Ship It!

- Cody Maloney


On Dec. 23, 2015, 9:06 a.m., Joerg Schad wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41680/
> ---
> 
> (Updated Dec. 23, 2015, 9:06 a.m.)
> 
> 
> Review request for mesos and Bernd Mathiske.
> 
> 
> Bugs: MESOS-4181
> https://issues.apache.org/jira/browse/MESOS-4181
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Especially the logging of port ranges resulted in enourmous logs, reduced the 
> log level from LOG(INFO) to VLOG(1).
> 
> 
> Diffs
> -
> 
>   src/master/allocator/mesos/hierarchical.cpp 
> 775182515dcb52bd873ecdf98c827320251a59c8 
> 
> Diff: https://reviews.apache.org/r/41680/diff/
> 
> 
> Testing
> ---
> 
> make check and checked logs
> 
> 
> Thanks,
> 
> Joerg Schad
> 
>



Re: Review Request 39584: Windows: Implemented `os::rmdir.hpp`.

2015-12-23 Thread Alex Clemmer


> On Dec. 10, 2015, 4:12 a.m., Joris Van Remoortere wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/rmdir.hpp, line 
> > 109
> > 
> >
> > Can you explain / comment why here (as well as on L139) we use 
> > `ErrnoError`, yet elsewhere we use `WindowsError`?

`errno` captures errors that have happened in the C standard library, and 
`ErrnoError` captures those errors and their messages and lifts them into an 
`Error` type.

For Windows API functions (which, of course, are not a part of the C standard 
library) have their own `errno`-like error reporting mechanism, called 
`GetLastError()`. `WindowsError` captures these errors and lifts them into an 
`Error` type.

Thus, when we call Windows API functions, we capture errors with 
`WindowsError`, and when we call C standard library functions, we capture 
errors with `ErrnoError`.

Does that make sense?


- Alex


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39584/#review109681
---


On Nov. 16, 2015, 9:13 a.m., Alex Clemmer wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39584/
> ---
> 
> (Updated Nov. 16, 2015, 9:13 a.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan, Joris Van Remoortere, and Joseph 
> Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Windows: Implemented `os::rmdir.hpp`.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am 
> a8c35c086ecae21701f6a720f25231c1b0d4e329 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp 
> 5c1df81193b4b888d2ed5c7dbfa0b5e2fae48467 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/rmdir.hpp 
> PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/rmdir.hpp PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/rmdir.hpp 
> PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp 
> e26df59d9b837e1f4a4b92577f0a3de4b9076cb4 
>   3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp 
> edf17d5ad8efbc988e909bfb8ffa5a015ecdc89d 
> 
> Diff: https://reviews.apache.org/r/39584/diff/
> 
> 
> Testing
> ---
> 
> `make check` from autotools on Ubuntu 15.
> `make check` from CMake on OS X 10.10.
> Ran `check` project in VS on Windows 10.
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-23 Thread Yongqiao Wang

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41597/
---

(Updated Dec. 24, 2015, 1:42 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Address comments of Qian.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
775182515dcb52bd873ecdf98c827320251a59c8 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-23 Thread Qian Zhang

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41597/#review111818
---



src/master/allocator/mesos/hierarchical.cpp (line 1055)


I think we do not need to call activeRoles.contains(), instead, we can 
directly call roleSorter->contains(role) similar with what we did in 
HierarchicalAllocatorProcess::setQuota().


- Qian Zhang


On Dec. 24, 2015, 9:42 a.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41597/
> ---
> 
> (Updated Dec. 24, 2015, 9:42 a.m.)
> 
> 
> Review request for mesos, Adam B, Neil Conway, and Qian Zhang.
> 
> 
> Bugs: MESOS-3943
> https://issues.apache.org/jira/browse/MESOS-3943
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add the interface in allocator to support updating weight
> at runtime, and the allocator is invoked to allocate the
> resources based on the updated weights later.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
>   src/master/allocator/mesos/allocator.hpp 
> 50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
>   src/master/allocator/mesos/hierarchical.hpp 
> 86ea5a402ed67f8f22f11d5730147cd907d66a08 
>   src/master/allocator/mesos/hierarchical.cpp 
> 775182515dcb52bd873ecdf98c827320251a59c8 
>   src/master/allocator/sorter/drf/sorter.hpp 
> 050896e8b12cd4097ccd137d5284d6b39b0f06ab 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 3a442f121f3a1505513877a5c78458a4b8d0a824 
>   src/master/allocator/sorter/sorter.hpp 
> 7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
>   src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 
> 
> Diff: https://reviews.apache.org/r/41597/diff/
> 
> 
> Testing
> ---
> 
> Make & Make check successfully!
> 
> Test case: https://reviews.apache.org/r/41672/
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-23 Thread Yongqiao Wang

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41597/
---

(Updated Dec. 24, 2015, 2:41 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
775182515dcb52bd873ecdf98c827320251a59c8 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-23 Thread Yongqiao Wang

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41597/
---

(Updated Dec. 24, 2015, 2:46 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Addressed the comments of Qian.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
775182515dcb52bd873ecdf98c827320251a59c8 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41672: Test case(s) for weights + allocation behavior

2015-12-23 Thread Yongqiao Wang

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41672/
---

(Updated Dec. 24, 2015, 2:49 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Bugs: MESOS-4200
https://issues.apache.org/jira/browse/MESOS-4200


Repository: mesos


Description
---

Test case(s) for weights + allocation behavior


Diffs (updated)
-

  src/tests/hierarchical_allocator_tests.cpp 
e044f832c2c16e53e663c6ced5452649bb0dcb59 

Diff: https://reviews.apache.org/r/41672/diff/


Testing
---

Make check done:
Yongs-MacBook-Pro:build yqwyq$ ./src/mesos-tests 
--gtest_filter=HierarchicalAllocatorTest.UpdateWeight
Source directory: /Users/yqwyq/Desktop/mesos
Build directory: /Users/yqwyq/Desktop/mesos/build
[==] Running 1 test from 1 test case.
[--] Global test environment set-up.
[--] 1 test from HierarchicalAllocatorTest
[ RUN  ] HierarchicalAllocatorTest.UpdateWeight
[   OK ] HierarchicalAllocatorTest.UpdateWeight (257 ms)
[--] 1 test from HierarchicalAllocatorTest (257 ms total)

[--] Global test environment tear-down
[==] 1 test from 1 test case ran. (340 ms total)
[  PASSED  ] 1 test.


Thanks,

Yongqiao Wang



Re: Review Request 41672: Test case(s) for weights + allocation behavior

2015-12-23 Thread Mesos ReviewBot

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41672/#review111819
---


Patch looks great!

Reviews applied: [41597, 41672]

Passed command: export OS=ubuntu:14.04;export CONFIGURATION="--verbose";export 
COMPILER=gcc; ./support/docker_build.sh

- Mesos ReviewBot


On Dec. 24, 2015, 2:49 a.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41672/
> ---
> 
> (Updated Dec. 24, 2015, 2:49 a.m.)
> 
> 
> Review request for mesos, Adam B, Neil Conway, and Qian Zhang.
> 
> 
> Bugs: MESOS-4200
> https://issues.apache.org/jira/browse/MESOS-4200
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Test case(s) for weights + allocation behavior
> 
> 
> Diffs
> -
> 
>   src/tests/hierarchical_allocator_tests.cpp 
> e044f832c2c16e53e663c6ced5452649bb0dcb59 
> 
> Diff: https://reviews.apache.org/r/41672/diff/
> 
> 
> Testing
> ---
> 
> Make check done:
> Yongs-MacBook-Pro:build yqwyq$ ./src/mesos-tests 
> --gtest_filter=HierarchicalAllocatorTest.UpdateWeight
> Source directory: /Users/yqwyq/Desktop/mesos
> Build directory: /Users/yqwyq/Desktop/mesos/build
> [==] Running 1 test from 1 test case.
> [--] Global test environment set-up.
> [--] 1 test from HierarchicalAllocatorTest
> [ RUN  ] HierarchicalAllocatorTest.UpdateWeight
> [   OK ] HierarchicalAllocatorTest.UpdateWeight (257 ms)
> [--] 1 test from HierarchicalAllocatorTest (257 ms total)
> 
> [--] Global test environment tear-down
> [==] 1 test from 1 test case ran. (340 ms total)
> [  PASSED  ] 1 test.
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-23 Thread Qian Zhang

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41597/#review111824
---

Ship it!


Ship It!

- Qian Zhang


On Dec. 24, 2015, 10:46 a.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41597/
> ---
> 
> (Updated Dec. 24, 2015, 10:46 a.m.)
> 
> 
> Review request for mesos, Adam B, Neil Conway, and Qian Zhang.
> 
> 
> Bugs: MESOS-3943
> https://issues.apache.org/jira/browse/MESOS-3943
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add the interface in allocator to support updating weight
> at runtime, and the allocator is invoked to allocate the
> resources based on the updated weights later.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
>   src/master/allocator/mesos/allocator.hpp 
> 50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
>   src/master/allocator/mesos/hierarchical.hpp 
> 86ea5a402ed67f8f22f11d5730147cd907d66a08 
>   src/master/allocator/mesos/hierarchical.cpp 
> 775182515dcb52bd873ecdf98c827320251a59c8 
>   src/master/allocator/sorter/drf/sorter.hpp 
> 050896e8b12cd4097ccd137d5284d6b39b0f06ab 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 3a442f121f3a1505513877a5c78458a4b8d0a824 
>   src/master/allocator/sorter/sorter.hpp 
> 7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
>   src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 
> 
> Diff: https://reviews.apache.org/r/41597/diff/
> 
> 
> Testing
> ---
> 
> Make & Make check successfully!
> 
> Test case: https://reviews.apache.org/r/41672/
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Review Request 41704: WIP: Added support for checking whether a given path is absolute.

2015-12-23 Thread Artem Harutyunyan

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41704/
---

Review request for mesos and Jie Yu.


Bugs: MESOS-4198
https://issues.apache.org/jira/browse/MESOS-4198


Repository: mesos


Description
---

WIP: Added support for checking whether a given path is absolute.


Diffs
-

  3rdparty/libprocess/3rdparty/stout/include/stout/path.hpp 
0b986f0898da95c4cffd8bde1adfd9994d567096 
  3rdparty/libprocess/3rdparty/stout/tests/path_tests.cpp 
821dbb185f09e2f279d95fd354ce2168cddf1bac 

Diff: https://reviews.apache.org/r/41704/diff/


Testing
---

Ran stout tests.


Thanks,

Artem Harutyunyan



Review Request 41705: WIP: Added support for enforcing quota on (persistent) volumes (MESOS-4198).

2015-12-23 Thread Artem Harutyunyan

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41705/
---

Review request for mesos and Jie Yu.


Bugs: MESOS-4198
https://issues.apache.org/jira/browse/MESOS-4198


Repository: mesos


Description
---

WIP: Added support for enforcing quota on (persistent) volumes (MESOS-4198).


Diffs
-

  src/slave/containerizer/mesos/isolators/posix/disk.cpp 
d971db09083faad08f3cf18c25a79245321d1d9a 
  src/tests/disk_quota_tests.cpp ce736c32a9e78a8a6d0793a06fe87911b9b0558d 

Diff: https://reviews.apache.org/r/41705/diff/


Testing
---

GTEST_FILTER='DiskQuotaTest*' make check -j8


Thanks,

Artem Harutyunyan