Re: Review Request 50380: Made resources benchmark test for ports `-=/-` more accurate.

2016-07-29 Thread Benjamin Mahler


> On July 29, 2016, 8:35 p.m., Benjamin Mahler wrote:
> > src/tests/resources_tests.cpp, lines 2515-2523
> > 
> >
> > Can we make the initial resources another parameter? I believe Klaus 
> > took this approach initially but I had removed 'initial' to simplify the 
> > patch.
> > 
> > If we make it a parameter we can have initial ports only for the port 
> > test case.
> 
> Guangya Liu wrote:
> Hi Ben, one quick question want to get some comments from you. Regarding 
> to your comments, what about set `initial` resources for all resources types 
> including `scalar`, `range`, `reservations` and then for the new added 
> `contain` benchmark test, I can simply check if the `initial` contains 
> `resources`, what do you think of this approach?

For the contains test, how about we start with three parameters: (a, b, 
numContains)

Then we do `a.contains(b)` numContains times and `b.contains(a)` numContains 
times?


- Benjamin


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


On July 25, 2016, 1:43 p.m., Guangya Liu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50380/
> ---
> 
> (Updated July 25, 2016, 1:43 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Klaus Ma.
> 
> 
> Bugs: MESOS-5898
> https://issues.apache.org/jira/browse/MESOS-5898
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> When run benchmark test for `ports` resources, the `-=` and `-` only
> consumed about 10ms, this cannot reflect the real time of operating
> 1000 `ports` with `-=` and `-`.
> 
> The root cause is that the current calculation is always using same
> port range, with port, the formula for `+` is `a+a+a+a+...+a==a`;
> for `-`, it will be `a-a=0` and `0-a=0`.
> 
> With `0-a=0`, the code here
> https://github.com/apache/mesos/blob/master/src/common/values.cpp#L544
> will cause there is no validation as the `left` is empty after the
> `ports` was subtracted to 0.
> 
> The fix is adding a default `ports` resources to make sure the `ports`
> resources will never be subtracted to 0.
> 
> 
> Diffs
> -
> 
>   src/tests/resources_tests.cpp 4111e080b84079e100b731c9a56861b204f17388 
> 
> Diff: https://reviews.apache.org/r/50380/diff/
> 
> 
> Testing
> ---
> 
> make
> make check
> 
> Before fix:
> ```
>  ./bin/mesos-tests.sh --benchmark  
> --gtest_filter="*Resources_BENCHMARK_Test.Arithmetic/2"
> [==] Running 1 test from 1 test case.
> [--] Global test environment set-up.
> [--] 1 test from ResourcesOperators/Resources_BENCHMARK_Test
> [ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2
> Took 3.042796secs to perform 1000 'total += r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 10026us to perform 1000 'total -= r' operations on ports(*):[1-2, 4-5, 
> 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.193982secs to perform 1000 'total = total + r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 9142us to perform 1000 'total = total - r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> [   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2 (6258 
> ms)
> [--] 1 test from ResourcesOperators/Resources_BENCHMARK_Test (6258 ms 
> total)
> 
> [--] Global test environment tear-down
> [==] 1 test from 1 test case ran. (6278 ms total)
> [  PASSED  ] 1 test.
> ```
> 
> After fix:
> ```
>  ./bin/mesos-tests.sh --benchmark  
> --gtest_filter="*Resources_BENCHMARK_Test.Arithmetic/2"
> [==] Running 1 test from 1 test case.
> [--] Global test environment set-up.
> [--] 1 test from ResourcesOperators/Resources_BENCHMARK_Test
> [ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2
> Took 2.624597secs to perform 1000 'total += r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.592067secs to perform 1000 'total -= r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 2.909614secs to perform 1000 'total = total + r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.369582secs to perform 1000 'total = total - r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> [   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2 (12501 
> ms)
> [--] 1 test from ResourcesOperators/Resources_BENCHMARK_Test (12501 
> ms total)
> 
> [--] Global test environment tear-down
> [==] 1 test from 1 test case ran. (12518 ms total)
> [  PASSED  ] 1 test.
> ```
> 
> 
> Thanks,
> 
> Guangya 

Re: Review Request 50247: Added a abstract base class for scheduler library.

2016-07-29 Thread Anand Mazumdar

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

(Updated July 30, 2016, 2:26 a.m.)


Review request for mesos, Joris Van Remoortere and Vinod Kone.


Changes
---

Addressed review comment. NNFR


Repository: mesos


Description
---

This change adds an abstract base class `MesosBase` that
would be used by implementations for interacting with
Mesos via the Scheduler API. This is needed later for
implementing the V0->V1 Scheduler Adapter.


Diffs (updated)
-

  3rdparty/libprocess/include/process/gtest.hpp 
80d26db7710438115f5dff9a0505a5ec22b68648 
  3rdparty/libprocess/include/process/process.hpp 
54c7d2e7ed3923ab15ab86e36552b023f9de5215 
  3rdparty/libprocess/include/process/ssl/gtest.hpp 
83778bbfcc75f3f39b98d03a3580398e7d1062ea 
  3rdparty/libprocess/src/help.cpp d3c98a7ea94299ef6eb27062233191a380166526 
  3rdparty/libprocess/src/openssl.hpp f33614c82cefbf1c74a74ba9b3fa02105d0bec5b 
  3rdparty/libprocess/src/openssl.cpp a73313b3221d6c80b35f21c00f35d9f9c795f1ec 
  3rdparty/libprocess/src/process.cpp 7f331b812de2f0437838f48e0959441c8e04c358 
  3rdparty/libprocess/src/tests/main.cpp 
023b4fe33a30cd3459d5ec2234a0f44bc736de92 
  3rdparty/libprocess/src/tests/metrics_tests.cpp 
4ddd35b61f222ca674e41875a6d0ee43d12cbfbd 
  3rdparty/libprocess/src/tests/profiler_tests.cpp 
995bd02f6ecce484cd9b2aca355c2707d73d40b2 
  3rdparty/libprocess/src/tests/ssl_client.cpp 
dffd9ffa9e57fccf6e25207e163bea5803b65255 
  3rdparty/libprocess/src/tests/ssl_tests.cpp 
a5ac03969694c4345c2c5004051b08b6d1da8555 
  3rdparty/stout/include/stout/uuid.hpp 
e638d458c6cb4aaee121a903bb381ccfdeae3fad 
  3rdparty/stout/tests/uuid_tests.cpp 8f28fcf491e43e87ddd5b54737fd5aef0f6db0a6 
  CHANGELOG 54b5f316e5ccc175cc3f471681b02e677499317d 
  docs/app-framework-development-guide.md 
b419cb4a2cc85cb903af91378d7291e4966bb879 
  docs/authentication.md 1574db981d5f8ddd7d1f6bef1c2b032823d17297 
  docs/configuration.md d6a7eb02b9f3e0011d52ccfd3093167bb6adccd3 
  docs/endpoints/files/browse.json.md 55ee41b1d61f46a11931a9e9d9b1e4f65f0d80ce 
  docs/endpoints/files/browse.md de8632e95373e2719bc9a035a82ed51f1c9b0437 
  docs/endpoints/files/debug.json.md a4dc0de5f343a799bdba983b4e75ee106b0bf64b 
  docs/endpoints/files/debug.md 9361ffecef4a1cab1138981c5ce302561505cfda 
  docs/endpoints/files/download.json.md 
88dd72cbd97845fe8e9a3bdd374502b91d7712bd 
  docs/endpoints/files/download.md 3a3876010e0f5c55826b20c5176b6f82f3249deb 
  docs/endpoints/files/read.json.md 6697ab1e251c22db8a7b79926d737fad9514249d 
  docs/endpoints/files/read.md 21ea6d8a3b9a2bd7cfc214653048a9f74bbac91c 
  docs/endpoints/master/api/v1.md 19c6142844ee9167f532496873524508d335a59d 
  docs/endpoints/master/api/v1/scheduler.md 
39cd457efd144ce316e8c13c916000cac8e51ad7 
  docs/endpoints/master/create-volumes.md 
f6ec9384f7f2bfb8056e54532ac3417a1f15b1d1 
  docs/endpoints/master/destroy-volumes.md 
054e816371f26c91ccc0d9687f377e80641e42a8 
  docs/endpoints/master/flags.md 850b6f86ddd92af512932aec5af9bdc600cf92d8 
  docs/endpoints/master/frameworks.md 1aed723152528be0e19d79520daac5f470cb49da 
  docs/endpoints/master/reserve.md 9bb04ed0de5b9304301fffd51b39ec07102825cd 
  docs/endpoints/master/state-summary.md 
4eb517ea0f6b5dbc2e7d7c406d54e741cf50e0e5 
  docs/endpoints/master/state.json.md c5852bd01dd5f72a9a11991a033d8c97b111ad21 
  docs/endpoints/master/state.md 8e0650f84ae13ef7952971ffb9732ec379cffd40 
  docs/endpoints/master/tasks.json.md 5d2c0e6eb53fa5e04a973eb786cd16bfad38736f 
  docs/endpoints/master/tasks.md c7df686443e20d255b03fc31a999b9b24b5f3a0a 
  docs/endpoints/master/teardown.md 4c14f594c3713304d5adf59e56e9e8af2b05ebee 
  docs/endpoints/master/unreserve.md 5cce4288231a64d7ee7713f2b44487618e7cc0a7 
  docs/endpoints/slave/api/v1.md c867d795104e053e5aae819df3deea68269228bf 
  docs/endpoints/slave/flags.md 3ea38c160670fc302a42ae98d7ebe0679b5bdc92 
  docs/endpoints/slave/state.json.md ac8536986ceb6532f71b4fe1c62b1b83390b03e7 
  docs/endpoints/slave/state.md c7b61d736582f50b850fed252e558bbae6dad801 
  docs/executor-http-api.md fb70f75c43c2751ff430a571ed8d4630d29a7ef8 
  docs/high-availability-framework-guide.md 
73743aba31f9d0ca827d318e2ecb4752a91b1be0 
  docs/powered-by-mesos.md 64e55e1bdaf6d045bb79ea80aed3171b3ee73900 
  docs/ssl.md 2f7d928ef94b9fb611e071b01755c002554bad40 
  docs/upgrades.md d3e7cdd51b4c294ef49447595d9cb074c5a993fe 
  include/mesos/resources.hpp 88a9feabf66ed34e7e5b1c6cb7e831818e7f7883 
  include/mesos/v1/resources.hpp 054ed00a03319ae5e350542add34f497eaf79152 
  include/mesos/v1/scheduler.hpp 18e7a95f8342ea155f9e339945b05810b6bd82b5 
  site/source/assets/js/dev-community.js 
e2686e2b2caddf6b798e37491c3d5f8879ec374c 
  site/source/blog/2016-07-21-dev-community-status.md 
8a8b0e3509c550c4d0342e36e9ca02214f7144d8 
  site/source/layouts/basic.erb 253de38a53a2dd42f859af5fd0da92786c93a0b2 
  

Re: Review Request 50609: Moved check for '--version' in agent's 'main.cpp'.

2016-07-29 Thread haosdent huang

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


Ship it!




Ship It!

- haosdent huang


On July 29, 2016, 5:16 p.m., Greg Mann wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50609/
> ---
> 
> (Updated July 29, 2016, 5:16 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Pierre Cheynier.
> 
> 
> Bugs: MESOS-5928
> https://issues.apache.org/jira/browse/MESOS-5928
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The recent removal of the agent's default `work_dir`
> requires us to check for the presence of the `--version`
> flag before we check for errors in flag loading; this
> patch makes that change.
> 
> 
> Diffs
> -
> 
>   src/slave/main.cpp a4d971a00f18af661a8bf2cb4f580d35f7c76d10 
> 
> Diff: https://reviews.apache.org/r/50609/diff/
> 
> 
> Testing
> ---
> 
> Ran the mesos agent binary with and without the '--version' flag to verify 
> correct behavior and return code.
> 
> 
> Thanks,
> 
> Greg Mann
> 
>



Re: Review Request 50482: Fixed the CORS error when redirect in WEB UI.

2016-07-29 Thread haosdent huang


> On July 29, 2016, 11:46 p.m., Jiang Yan Xu wrote:
> > src/webui/master/static/js/controllers.js, lines 399-402
> > 
> >
> > Committing with minor comment tweaking
> > 
> > ```
> >   // When the current master is not the leader, the request is 
> > redirected to
> >   // the leading master automatically. This would cause a CORS 
> > error if we
> >   // use XMLHttpRequest here. To avoid the CORS error, we use JSONP 
> > as a
> >   // workaround. Please refer to MESOS-5911 for further details.
> > ```

Thank you!


- haosdent


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


On July 29, 2016, 7:02 a.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50482/
> ---
> 
> (Updated July 29, 2016, 7:02 a.m.)
> 
> 
> Review request for mesos, Adam B, Jie Yu, Michael Lunøe, Vinod Kone, and 
> Jiang Yan Xu.
> 
> 
> Bugs: MESOS-5911
> https://issues.apache.org/jira/browse/MESOS-5911
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The redirection in WEB UI is broken since the CORS restriction after
> we enabled redirection in `master/state` endpoint in
> https://reviews.apache.org/r/34646/. We change the request way to
> `master/state` endpoint from xhr to jsonp for bypassing the CORS
> restriction.
> 
> 
> Diffs
> -
> 
>   src/webui/master/static/index.html a083537cd718162d1913842bddbd2653d8c52337 
>   src/webui/master/static/js/controllers.js 
> ceaf1402ebdae4efd1a8a6fc9c7b795de69e2fc0 
> 
> Diff: https://reviews.apache.org/r/50482/diff/
> 
> 
> Testing
> ---
> 
> Testing video record
> 
> ![http_redirect.gif](https://issues.apache.org/jira/secure/attachment/12820401/http_redirect.gif)
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 50323: Added build script for mesos-local executable.

2016-07-29 Thread Srinivas Brahmaroutu

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

(Updated July 30, 2016, 1:33 a.m.)


Review request for mesos, Alex Clemmer and Joseph Wu.


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


Repository: mesos


Description (updated)
---

Added build script for mesos-local executable.


Diffs (updated)
-

  src/CMakeLists.txt 32a8ae2320ee3dada8a19dd815eccb4710c18159 
  src/local/CMakeLists.txt PRE-CREATION 

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


Testing
---

cmake .. && make mesos-local


Thanks,

Srinivas Brahmaroutu



Re: Review Request 50179: Added mesos-logrotate-logger utility executable.

2016-07-29 Thread Srinivas Brahmaroutu

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

(Updated July 30, 2016, 1:32 a.m.)


Review request for mesos, Alex Clemmer and Joseph Wu.


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


Repository: mesos


Description
---

Added mesos-logrotate-logger utility executable.


Diffs (updated)
-

  src/slave/CMakeLists.txt bb9ad62b2372ca038c43a20d9906aaf43d9ead41 
  src/slave/cmake/SlaveConfigure.cmake ced57496970f1d7edf9e7e443b22d14d2ee948f0 

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


Testing
---

cmake .. && make mesos-logrotate-logger
GLOG_v=1 ./src/mesos-tests 
--gtest_filter="ContainerLogger*.LOGROTATE_RotateInSandbox" should run 
successfully.


Thanks,

Srinivas Brahmaroutu



Re: Review Request 50179: Added mesos-logrotate-logger utility executable.

2016-07-29 Thread Srinivas Brahmaroutu


> On July 28, 2016, 10:12 p.m., Joseph Wu wrote:
> > src/slave/cmake/SlaveConfigure.cmake, line 32
> > 
> >
> > For consistency, this target should be called the 
> > `MESOS_LOGROTATE_LOGGER_TARGET`.

Renamed to MESOS_LOGROTATE_LOGGER_TARGET


> On July 28, 2016, 10:12 p.m., Joseph Wu wrote:
> > src/slave/cmake/SlaveConfigure.cmake, line 33
> > 
> >
> > This is actually an executable that the LogrotateContainerLogger relies 
> > on, inside and outside of tests.

I re-phrased to the best I can.


- Srinivas


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


On July 22, 2016, 7:29 a.m., Srinivas Brahmaroutu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50179/
> ---
> 
> (Updated July 22, 2016, 7:29 a.m.)
> 
> 
> Review request for mesos, Alex Clemmer and Joseph Wu.
> 
> 
> Bugs: MESOS-5792
> https://issues.apache.org/jira/browse/MESOS-5792
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added mesos-logrotate-logger utility executable.
> 
> 
> Diffs
> -
> 
>   src/slave/CMakeLists.txt bb9ad62b2372ca038c43a20d9906aaf43d9ead41 
>   src/slave/cmake/SlaveConfigure.cmake 
> ced57496970f1d7edf9e7e443b22d14d2ee948f0 
> 
> Diff: https://reviews.apache.org/r/50179/diff/
> 
> 
> Testing
> ---
> 
> cmake .. && make mesos-logrotate-logger
> GLOG_v=1 ./src/mesos-tests 
> --gtest_filter="ContainerLogger*.LOGROTATE_RotateInSandbox" should run 
> successfully.
> 
> 
> Thanks,
> 
> Srinivas Brahmaroutu
> 
>



Re: Review Request 50064: Added setns and active user test binaries.

2016-07-29 Thread Srinivas Brahmaroutu

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

(Updated July 30, 2016, 1:30 a.m.)


Review request for mesos, Alex Clemmer and Joseph Wu.


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


Repository: mesos


Description
---

Added setns and active user test binaries.


Diffs (updated)
-

  src/tests/CMakeLists.txt 3c530631d22aa1cfdc2c600112059601bba7d6b7 
  src/tests/cmake/MesosTestsConfigure.cmake 
caecce14ca884dcc09ae4ba7649a09f7ae7c1fdf 
  src/tests/containerizer/CMakeLists.txt 
41e792a2c9ec588d4897d60d012e67c606bbe601 

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


Testing
---

cmake .. && make check


Thanks,

Srinivas Brahmaroutu



Re: Review Request 50252: Added native implementation for v1 Mesos interface.

2016-07-29 Thread Vinod Kone

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




src/java/jni/org_apache_mesos_v1_scheduler_JNIMesos.cpp (line 282)


since it is possible, i would just log a warning and ignore instead of 
crashing here?



src/java/jni/org_apache_mesos_v1_scheduler_JNIMesos.cpp (line 304)


ditto.


- Vinod Kone


On July 29, 2016, 5:26 p.m., Anand Mazumdar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50252/
> ---
> 
> (Updated July 29, 2016, 5:26 p.m.)
> 
> 
> Review request for mesos, Joris Van Remoortere and Vinod Kone.
> 
> 
> Bugs: MESOS-5788
> https://issues.apache.org/jira/browse/MESOS-5788
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This change adds the native C++ implementation for the v1
> Java class `JNIMesos` used for interacting with Mesos.
> 
> 
> Diffs
> -
> 
>   src/Makefile.am cc83525a4455bbb0e654d346921d66ed2436411d 
>   src/java/jni/org_apache_mesos_v1_scheduler_JNIMesos.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/50252/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>



Re: Review Request 50250: Added v1 Scheduler/Mesos interface in Java.

2016-07-29 Thread Vinod Kone

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


Ship it!




Ship It!

- Vinod Kone


On July 29, 2016, 5:26 p.m., Anand Mazumdar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50250/
> ---
> 
> (Updated July 29, 2016, 5:26 p.m.)
> 
> 
> Review request for mesos, Joris Van Remoortere and Vinod Kone.
> 
> 
> Bugs: MESOS-5788
> https://issues.apache.org/jira/browse/MESOS-5788
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This change adds an interface for the v1 Scheduler + Mesos
> interface that the schedulers can use to connect to Mesos.
> 
> 
> Diffs
> -
> 
>   src/Makefile.am cc83525a4455bbb0e654d346921d66ed2436411d 
>   src/java/src/org/apache/mesos/v1/scheduler/Mesos.java PRE-CREATION 
>   src/java/src/org/apache/mesos/v1/scheduler/Scheduler.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/50250/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>



Re: Review Request 50251: Added java implementations for the V0/V1 implementation for Mesos.

2016-07-29 Thread Vinod Kone

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


Ship it!




Ship It!

- Vinod Kone


On July 29, 2016, 5:26 p.m., Anand Mazumdar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50251/
> ---
> 
> (Updated July 29, 2016, 5:26 p.m.)
> 
> 
> Review request for mesos, Joris Van Remoortere and Vinod Kone.
> 
> 
> Bugs: MESOS-5788
> https://issues.apache.org/jira/browse/MESOS-5788
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added java implementations for the V0/V1 implementation for Mesos.
> 
> 
> Diffs
> -
> 
>   src/Makefile.am cc83525a4455bbb0e654d346921d66ed2436411d 
>   src/java/src/org/apache/mesos/v1/scheduler/JNIMesos.java PRE-CREATION 
>   src/java/src/org/apache/mesos/v1/scheduler/V0Mesos.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/50251/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>



Re: Review Request 50248: Added helper functions for v1 JNI `construct()`/`convert()`.

2016-07-29 Thread Vinod Kone

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


Ship it!




Ship It!

- Vinod Kone


On July 29, 2016, 5:26 p.m., Anand Mazumdar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50248/
> ---
> 
> (Updated July 29, 2016, 5:26 p.m.)
> 
> 
> Review request for mesos, Joris Van Remoortere and Vinod Kone.
> 
> 
> Bugs: MESOS-5788
> https://issues.apache.org/jira/browse/MESOS-5788
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> These would be used later in the chain for the making JNI
> calls to v1 Mesos implementation in native code.
> 
> 
> Diffs
> -
> 
>   src/java/jni/construct.cpp e5c070c819698729780b487ebd214ee43f15ae87 
>   src/java/jni/convert.cpp 45ff488b921c0254761ec0a7b5c06608aa86ca3f 
> 
> Diff: https://reviews.apache.org/r/50248/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>



Re: Review Request 50247: Added a abstract base class for scheduler library.

2016-07-29 Thread Vinod Kone

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


Fix it, then Ship it!





include/mesos/v1/scheduler.hpp (line 55)


s/with/to/


- Vinod Kone


On July 29, 2016, 5:26 p.m., Anand Mazumdar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50247/
> ---
> 
> (Updated July 29, 2016, 5:26 p.m.)
> 
> 
> Review request for mesos, Joris Van Remoortere and Vinod Kone.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This change adds an abstract base class `MesosBase` that
> would be used by implementations for interacting with
> Mesos via the Scheduler API. This is needed later for
> implementing the V0->V1 Scheduler Adapter.
> 
> 
> Diffs
> -
> 
>   include/mesos/v1/scheduler.hpp 18e7a95f8342ea155f9e339945b05810b6bd82b5 
> 
> Diff: https://reviews.apache.org/r/50247/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>



Re: Review Request 50064: Added setns and active user test binaries.

2016-07-29 Thread Srinivas Brahmaroutu

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

(Updated July 30, 2016, 12:29 a.m.)


Review request for mesos, Alex Clemmer and Joseph Wu.


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


Repository: mesos


Description
---

Added setns and active user test binaries.


Diffs (updated)
-

  src/tests/CMakeLists.txt 3c530631d22aa1cfdc2c600112059601bba7d6b7 
  src/tests/cmake/MesosTestsConfigure.cmake 
caecce14ca884dcc09ae4ba7649a09f7ae7c1fdf 
  src/tests/containerizer/CMakeLists.txt 
41e792a2c9ec588d4897d60d012e67c606bbe601 

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


Testing
---

cmake .. && make check


Thanks,

Srinivas Brahmaroutu



Re: Review Request 50569: Added `isNegative` to check if the scalar resource is negative.

2016-07-29 Thread Guangya Liu


> On 七月 29, 2016, 8:52 p.m., Benjamin Mahler wrote:
> > src/common/resources.cpp, lines 1456-1457
> > 
> >
> > On second thought, can we inline the logic here and add a TODO?
> > 
> > ```
> >   // Remove the resource if it has become negative or empty.
> >   // Note that a negative resource means the caller is
> >   // subtracting more than they should!
> >   //
> >   // TODO(bmahler): Provide a stronger interface to avoid
> >   // silently allowing this to occur.
> >   
> >   bool negative = 
> > resource->type() == Value::SCALAR &&
> > resource->scalar().value() < 0;
> >   
> >   if (negative || isEmpty(*resource)) {
> > ...
> >   }
> > ```
> > 
> > Since isNegative only applies to Scalar, it seems a bit odd to expose 
> > it as a function. Whereas isEmpty applies to all resource types.

Hi Ben, just want to have some discussion here, seems another option is to 
enhance `isEmpty` as following by enabling checking if `SCALAR` resources is 0 
or a negative number, what do you think?

```
bool Resources::isEmptyOrNegative(const Resource& resource)
{
  if (resource.type() == Value::SCALAR) {
return resource.scalar().value() <= 0;
  } else if (resource.type() == Value::RANGES) {
return resource.ranges().range_size() == 0;
  } else if (resource.type() == Value::SET) {
return resource.set().item_size() == 0;
  } else {
return false;
  }
}
```


- Guangya


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


On 七月 29, 2016, 5:43 a.m., Guangya Liu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50569/
> ---
> 
> (Updated 七月 29, 2016, 5:43 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler, Joris Van Remoortere, and Klaus Ma.
> 
> 
> Bugs: MESOS-5921
> https://issues.apache.org/jira/browse/MESOS-5921
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> When subtract resources finished, we need to call `validate` to
> check if the scalar resource is negative so as to remove this
> resource if it is negative. This is a bit heavy as the `validate`
> did many stuffs.
> 
> This patch is introducing a new helper function `isNegative`
> to check if the resource is a negative scalar resource.
> 
> 
> Diffs
> -
> 
>   include/mesos/resources.hpp 88a9feabf66ed34e7e5b1c6cb7e831818e7f7883 
>   include/mesos/v1/resources.hpp 054ed00a03319ae5e350542add34f497eaf79152 
>   src/common/resources.cpp 3dbff24d6859d3b1ed8589cec50170a5202cfbcb 
>   src/v1/resources.cpp 3c85dc8aa8125962b44e60806ece83a7653d0dc7 
> 
> Diff: https://reviews.apache.org/r/50569/diff/
> 
> 
> Testing
> ---
> 
> make
> make check
> 
> The time of 1000 `ports` `-=` operations was reduced about `0.3s`, even 
> though this does not improve much, the update does make the logic more clear.
> 
> Before fix:
> ```
> [ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2
> Took 2.834335secs to perform 1000 'total += r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 21.828846secs to perform 1000 'total.contains(r)' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.689858secs to perform 1000 'total -= r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 2.962259secs to perform 1000 'total = total + r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.760281secs to perform 1000 'total = total - r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 125159us to perform 1000 'r.nonRevocable()' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> [   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2 (35204 
> ms)
> ```
> 
> After fix:
> ```
> [ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2
> Took 2.619237secs to perform 1000 'total += r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 20.528293secs to perform 1000 'total.contains(r)' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.39984secs to perform 1000 'total -= r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 2.78301secs to perform 1000 'total = total + r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.399465secs to perform 1000 'total = total - r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 121055us to perform 1000 'r.nonRevocable()' operations on ports(*):[1-2, 
> 4-5, 

Re: Review Request 49571: Added a benchmark test for allocations.

2016-07-29 Thread Guangya Liu

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




src/tests/hierarchical_allocator_tests.cpp (lines 3470 - 3476)


I would suggest that you merge this with origial parameters, so that we can 
leverage the `agentCount` and `frameworkCount` here.

```
// The Hierarchical Allocator benchmark tests are parameterized
// by the number of slaves.
INSTANTIATE_TEST_CASE_P(
  SlaveAndFrameworkCount,
  HierarchicalAllocator_BENCHMARK_Test,
::testing::Combine(
::testing::Values(1000U, 5000U, 1U, 2U, 3U, 5U),
::testing::Values(1U, 50U, 100U, 200U, 500U, 1000U, 3000U, 6000U))
  );
```


- Guangya Liu


On 七月 28, 2016, 10:46 p.m., Anindya Sinha wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/49571/
> ---
> 
> (Updated 七月 28, 2016, 10:46 p.m.)
> 
> 
> Review request for mesos and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-5771
> https://issues.apache.org/jira/browse/MESOS-5771
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Allocations test has the following configurations:
> (1) REGULAR: Offers from every slave have regular resources.
> (2) SHARED: Offers from every slave include a shared resource.
> (3) REGULAR: Offers from every alternate slave contain only regular
> resources; and offers from every other alternate slave contains
> a shared resource.
> 
> 
> Diffs
> -
> 
>   src/tests/hierarchical_allocator_tests.cpp 
> bb6947fcecb5b78047e98d10fc1278c612a69548 
> 
> Diff: https://reviews.apache.org/r/49571/diff/
> 
> 
> Testing
> ---
> 
> All tests passed.
> 
> Allocations benchmark test results
> ==
> Support of shared resources has a small impact on runtime performance in 
> allocations. Also, there is no visible impact in performance when shared 
> resources are added in the tests.
> 
> With the patch (and no shared resources)
> 
> round 0 allocate took 3.19704secs to make 200 offers
> round 50 allocate took 3.240605secs to make 200 offers
> round 100 allocate took 3.227024secs to make 200 offers
> round 150 allocate took 3.225281secs to make 200 offers
> round 199 allocate took 3.26036secs to make 200 offers
> 
> With the patch (and shared resources on all agents)
> ---
> round 0 allocate took 3.279115secs to make 200 offers
> round 50 allocate took 3.273396secs to make 200 offers
> round 100 allocate took 3.278509secs to make 200 offers
> round 150 allocate took 3.275959secs to make 200 offers
> round 199 allocate took 3.278151secs to make 200 offers
> 
> With the patch (and shared resources on alternate agents)
> -
> round 0 allocate took 3.251739secs to make 200 offers
> round 50 allocate took 3.263777secs to make 200 offers
> round 100 allocate took 3.263079secs to make 200 offers
> round 150 allocate took 3.263114secs to make 200 offers
> round 199 allocate took 3.236228secs to make 200 offers
> 
> Based on HEAD, with all regular resources (no shared resources in HEAD 
> supported)
> -
> round 0 allocate took 2.925681secs to make 200 offers
> round 50 allocate took 2.922036secs to make 200 offers
> round 100 allocate took 2.909337secs to make 200 offers
> round 150 allocate took 2.914093secs to make 200 offers
> round 199 allocate took 2.923762secs to make 200 offers
> 
> 
> Thanks,
> 
> Anindya Sinha
> 
>



Re: Review Request 40512: Libprocess Reinit: Add a test-only method to reinitialize libprocess.

2016-07-29 Thread Joseph Wu

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

(Updated July 29, 2016, 5 p.m.)


Review request for mesos, Greg Mann, Artem Harutyunyan, Joris Van Remoortere, 
and Vinod Kone.


Changes
---

Add authentication realms to method signature.


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


Repository: mesos


Description
---

This builds upon earlier changes to complete `process::finalize`.  
Tests which need to reconfigure libprocess, such as some SSL-related 
tests, can use `process::reinitialize` to do so.  

This method may also be useful for providing additional isolation 
between tests, such as cleaning up all processes after each test case.


Diffs (updated)
-

  3rdparty/libprocess/src/openssl.cpp a73313b3221d6c80b35f21c00f35d9f9c795f1ec 
  3rdparty/libprocess/src/process.cpp 7f331b812de2f0437838f48e0959441c8e04c358 

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


Testing
---

TODO: Define `process::reinitialize` in several tests, such as `HTTPTest`, 
`MetricsTest`, and `ReapTest` and call `process::reinitialize` before and after 
tests.


Thanks,

Joseph Wu



Re: Review Request 40413: Libprocess Reinit: Move ReaperProcess instantiation into process.cpp.

2016-07-29 Thread Joseph Wu

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

(Updated July 29, 2016, 4:58 p.m.)


Review request for mesos, Greg Mann, Artem Harutyunyan, Joris Van Remoortere, 
and Vinod Kone.


Changes
---

Header update.


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


Repository: mesos


Description
---

The reaper singleton must be unified with `process::initialize` so 
that it also falls under the scope of reinitialization.  The singleton 
must also not be guarded by `Once`.


Diffs (updated)
-

  3rdparty/libprocess/include/process/reap.hpp 
1a9709c618c5ddc9d2b7492cc1855a11f1fc4fb9 
  3rdparty/libprocess/src/process.cpp 7f331b812de2f0437838f48e0959441c8e04c358 
  3rdparty/libprocess/src/reap.cpp ac60c6d769076912293950432266c956d6c7e705 

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


Testing
---

Tests done in a subsequent review.


Thanks,

Joseph Wu



Re: Review Request 40410: Libprocess Reinit: Move MetricsProcess instantiation into process.cpp.

2016-07-29 Thread Joseph Wu

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

(Updated July 29, 2016, 4:56 p.m.)


Review request for mesos, Greg Mann, Artem Harutyunyan, Joris Van Remoortere, 
and Vinod Kone.


Changes
---

Comment tweak.


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


Repository: mesos


Description
---

The metrics singleton must be unified with `process::initialize` so 
that it also falls under the scope of reinitialization.  The singleton 
must also not be guarded by `Once`.


Diffs (updated)
-

  3rdparty/libprocess/include/process/metrics/metrics.hpp 
54487ab2614c7f8e8df10d1e0c39880a6cf5bde3 
  3rdparty/libprocess/src/metrics/metrics.cpp 
ac1544e70f5884f946ce3c31c5430c6a2c1f9dd1 
  3rdparty/libprocess/src/process.cpp 7f331b812de2f0437838f48e0959441c8e04c358 
  3rdparty/libprocess/src/tests/system_tests.cpp 
0f4d0424689522337806ba2227ec4330c700e17e 

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


Testing
---

Tests done in a subsequent review.


Thanks,

Joseph Wu



Review Request 50621: Libprocess reinit: Moved HttpProxy finalization and destruction.

2016-07-29 Thread Joseph Wu

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

Review request for mesos, Greg Mann, Artem Harutyunyan, Joris Van Remoortere, 
and Vinod Kone.


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


Repository: mesos


Description
---

Moves the destructor code in `HttpProxy` into the `Process::finalize`
function.  And changes the `HttpProxy`s termination logic to 
terminate via `UPID` which guards against double-termination.


Diffs
-

  3rdparty/libprocess/src/process.cpp 7f331b812de2f0437838f48e0959441c8e04c358 

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


Testing
---

make

(More testing doen later in the chain)


Thanks,

Joseph Wu



Re: Review Request 50556: Added benchmark test for `Resources::nonRevocable`.

2016-07-29 Thread Guangya Liu


> On 七月 29, 2016, 8:39 p.m., Benjamin Mahler wrote:
> > src/tests/resources_tests.cpp, lines 2581-2589
> > 
> >
> > The Arithmetic test should contain only the arithemtic operations. We 
> > can add a 'Filters' or 'Filtering' test that captures methods that perform 
> > filtering of the resources, like `nonRevocable`, `revocable`, `filter`, etc.

What about enabling the `filter` test case only include `nonRevocable` test for 
now as all of the resources parameters are `nonRevocable` now, the 
`nonRevocable` check will hit `add` logic as expected. For `revocable`, as we 
do not have such resource types, so it will not hit the `add` logic and would 
be pretty fast and cannot evaluate much for the performance. `filter` will be 
called by `nonRevocale`, so I think the test case for it will be covered by 
`nonRevocable`.


- Guangya


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


On 七月 28, 2016, 8:51 a.m., Guangya Liu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50556/
> ---
> 
> (Updated 七月 28, 2016, 8:51 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler, Joris Van Remoortere, and Klaus Ma.
> 
> 
> Bugs: MESOS-5700
> https://issues.apache.org/jira/browse/MESOS-5700
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added benchmark test for `Resources::nonRevocable`.
> 
> 
> Diffs
> -
> 
>   src/tests/resources_tests.cpp 4111e080b84079e100b731c9a56861b204f17388 
> 
> Diff: https://reviews.apache.org/r/50556/diff/
> 
> 
> Testing
> ---
> 
> make
> make check
> 
> ```
> [==] Running 3 tests from 1 test case.
> [--] Global test environment set-up.
> [--] 3 tests from ResourcesOperators/Resources_BENCHMARK_Test
> [ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/0
> Took 271717us to perform 5 'total += r' operations on cpus(*):1; 
> gpus(*):1; mem(*):128; disk(*):256
> Took 1.303957secs to perform 5 'total.contains(r)' operations on 
> cpus(*):1; gpus(*):1; mem(*):128; disk(*):256
> Took 526481us to perform 5 'total -= r' operations on cpus(*):1; 
> gpus(*):1; mem(*):128; disk(*):256
> Took 968073us to perform 5 'total = total + r' operations on cpus(*):1; 
> gpus(*):1; mem(*):128; disk(*):256
> Took 1.270586secs to perform 5 'total = total - r' operations on 
> cpus(*):1; gpus(*):1; mem(*):128; disk(*):256
> Took 775512us to perform 5 'r.nonRevocable()' operations on cpus(*):1; 
> gpus(*):1; mem(*):128; disk(*):256
> [   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/0 (5118 
> ms)
> [ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/1
> Took 23.026846secs to perform 10 'total += r' operations on cpus(0, 
> principal_0, {key_0: value_0}):1; gpus(...
> Took 49.498008secs to perform 10 'total.contains(r)' operations on cpus(0, 
> principal_0, {key_0: value_0}):1; gpus(...
> Took 24.343378secs to perform 10 'total -= r' operations on cpus(0, 
> principal_0, {key_0: value_0}):1; gpus(...
> Took 24.444537secs to perform 10 'total = total + r' operations on cpus(0, 
> principal_0, {key_0: value_0}):1; gpus(...
> Took 24.803728secs to perform 10 'total = total - r' operations on cpus(0, 
> principal_0, {key_0: value_0}):1; gpus(...
> Took 23.992406secs to perform 10 'r.nonRevocable()' operations on cpus(0, 
> principal_0, {key_0: value_0}):1; gpus(...
> [   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/1 (170300 
> ms)
> [ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2
> Took 2.832429secs to perform 1000 'total += r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 22.034252secs to perform 1000 'total.contains(r)' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.628885secs to perform 1000 'total -= r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.113548secs to perform 1000 'total = total + r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.854608secs to perform 1000 'total = total - r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 8.517941secs to perform 1000 'r.nonRevocable()' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> [   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2 (43985 
> ms)
> [--] 3 tests from ResourcesOperators/Resources_BENCHMARK_Test (219403 
> ms total)
> 
> [--] Global test environment tear-down
> [==] 3 tests from 1 test case ran. (219420 ms total)
> [  PASSED  ] 3 tests.
> ```
> 
> 
> Thanks,
> 

Re: Review Request 50380: Made resources benchmark test for ports `-=/-` more accurate.

2016-07-29 Thread Guangya Liu


> On 七月 29, 2016, 8:35 p.m., Benjamin Mahler wrote:
> > src/tests/resources_tests.cpp, lines 2515-2523
> > 
> >
> > Can we make the initial resources another parameter? I believe Klaus 
> > took this approach initially but I had removed 'initial' to simplify the 
> > patch.
> > 
> > If we make it a parameter we can have initial ports only for the port 
> > test case.

Hi Ben, one quick question want to get some comments from you. Regarding to 
your comments, what about set `initial` resources for all resources types 
including `scalar`, `range`, `reservations` and then for the new added 
`contain` benchmark test, I can simply check if the `initial` contains 
`resources`, what do you think of this approach?


- Guangya


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


On 七月 25, 2016, 1:43 p.m., Guangya Liu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50380/
> ---
> 
> (Updated 七月 25, 2016, 1:43 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Klaus Ma.
> 
> 
> Bugs: MESOS-5898
> https://issues.apache.org/jira/browse/MESOS-5898
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> When run benchmark test for `ports` resources, the `-=` and `-` only
> consumed about 10ms, this cannot reflect the real time of operating
> 1000 `ports` with `-=` and `-`.
> 
> The root cause is that the current calculation is always using same
> port range, with port, the formula for `+` is `a+a+a+a+...+a==a`;
> for `-`, it will be `a-a=0` and `0-a=0`.
> 
> With `0-a=0`, the code here
> https://github.com/apache/mesos/blob/master/src/common/values.cpp#L544
> will cause there is no validation as the `left` is empty after the
> `ports` was subtracted to 0.
> 
> The fix is adding a default `ports` resources to make sure the `ports`
> resources will never be subtracted to 0.
> 
> 
> Diffs
> -
> 
>   src/tests/resources_tests.cpp 4111e080b84079e100b731c9a56861b204f17388 
> 
> Diff: https://reviews.apache.org/r/50380/diff/
> 
> 
> Testing
> ---
> 
> make
> make check
> 
> Before fix:
> ```
>  ./bin/mesos-tests.sh --benchmark  
> --gtest_filter="*Resources_BENCHMARK_Test.Arithmetic/2"
> [==] Running 1 test from 1 test case.
> [--] Global test environment set-up.
> [--] 1 test from ResourcesOperators/Resources_BENCHMARK_Test
> [ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2
> Took 3.042796secs to perform 1000 'total += r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 10026us to perform 1000 'total -= r' operations on ports(*):[1-2, 4-5, 
> 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.193982secs to perform 1000 'total = total + r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 9142us to perform 1000 'total = total - r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> [   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2 (6258 
> ms)
> [--] 1 test from ResourcesOperators/Resources_BENCHMARK_Test (6258 ms 
> total)
> 
> [--] Global test environment tear-down
> [==] 1 test from 1 test case ran. (6278 ms total)
> [  PASSED  ] 1 test.
> ```
> 
> After fix:
> ```
>  ./bin/mesos-tests.sh --benchmark  
> --gtest_filter="*Resources_BENCHMARK_Test.Arithmetic/2"
> [==] Running 1 test from 1 test case.
> [--] Global test environment set-up.
> [--] 1 test from ResourcesOperators/Resources_BENCHMARK_Test
> [ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2
> Took 2.624597secs to perform 1000 'total += r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.592067secs to perform 1000 'total -= r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 2.909614secs to perform 1000 'total = total + r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.369582secs to perform 1000 'total = total - r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> [   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2 (12501 
> ms)
> [--] 1 test from ResourcesOperators/Resources_BENCHMARK_Test (12501 
> ms total)
> 
> [--] Global test environment tear-down
> [==] 1 test from 1 test case ran. (12518 ms total)
> [  PASSED  ] 1 test.
> ```
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>



Re: Review Request 40266: Libprocess Reinit: Cleanup SocketManager alongside ProcessManager.

2016-07-29 Thread Joseph Wu


> On July 27, 2016, 4:35 p.m., Greg Mann wrote:
> > 3rdparty/libprocess/src/process.cpp, line 1162
> > 
> >
> > Maybe not significant, but perhaps we should reinitialize this to 
> > `INADDR_ANY`, since that's the initial value when `__address__` is declared?

`Address::LOCALHOST_ANY()` ends up creating an `INADDR_ANY` anyway.


- Joseph


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


On July 29, 2016, 4:44 p.m., Joseph Wu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40266/
> ---
> 
> (Updated July 29, 2016, 4:44 p.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-3910
> https://issues.apache.org/jira/browse/MESOS-3910
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The `SocketManager` and `ProcessManager` are highly inter-dependent, 
> which requires some untangling in `process::finalize`.
> 
> * Logic originally found in `~ProcessManager` has been split into 
>   `ProcessManager::finalize` due to what happens during cleanup.
> * The future from `__s__->accept()` must be explicitly discarded as 
>   libevent does not detect a locally closed socket.
> * Terminating `HttpProxy`s must close the associated socket.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/src/process.cpp 
> 7f331b812de2f0437838f48e0959441c8e04c358 
> 
> Diff: https://reviews.apache.org/r/40266/diff/
> 
> 
> Testing
> ---
> 
> `make check` (libev)
> `make check` (--enable-libevent --enable-ssl)
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>



Re: Review Request 50482: Fixed the CORS error when redirect in WEB UI.

2016-07-29 Thread Jiang Yan Xu

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


Ship it!





src/webui/master/static/js/controllers.js (lines 375 - 378)


Committing with minor comment tweaking

```
  // When the current master is not the leader, the request is 
redirected to
  // the leading master automatically. This would cause a CORS error if 
we
  // use XMLHttpRequest here. To avoid the CORS error, we use JSONP as a
  // workaround. Please refer to MESOS-5911 for further details.
```


- Jiang Yan Xu


On July 29, 2016, 12:02 a.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50482/
> ---
> 
> (Updated July 29, 2016, 12:02 a.m.)
> 
> 
> Review request for mesos, Adam B, Jie Yu, Michael Lunøe, Vinod Kone, and 
> Jiang Yan Xu.
> 
> 
> Bugs: MESOS-5911
> https://issues.apache.org/jira/browse/MESOS-5911
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The redirection in WEB UI is broken since the CORS restriction after
> we enabled redirection in `master/state` endpoint in
> https://reviews.apache.org/r/34646/. We change the request way to
> `master/state` endpoint from xhr to jsonp for bypassing the CORS
> restriction.
> 
> 
> Diffs
> -
> 
>   src/webui/master/static/index.html a083537cd718162d1913842bddbd2653d8c52337 
>   src/webui/master/static/js/controllers.js 
> ceaf1402ebdae4efd1a8a6fc9c7b795de69e2fc0 
> 
> Diff: https://reviews.apache.org/r/50482/diff/
> 
> 
> Testing
> ---
> 
> Testing video record
> 
> ![http_redirect.gif](https://issues.apache.org/jira/secure/attachment/12820401/http_redirect.gif)
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 40266: Libprocess Reinit: Cleanup SocketManager alongside ProcessManager.

2016-07-29 Thread Joseph Wu


> On April 25, 2016, 3:55 p.m., Joseph Wu wrote:
> > 3rdparty/libprocess/src/process.cpp, line 1106
> > 
> >
> > Consider moving to `::finalize`.  The unproxy code should mostly remain 
> > in-place.

Added another review (the next one) to address this.


> On April 25, 2016, 3:55 p.m., Joseph Wu wrote:
> > 3rdparty/libprocess/src/process.cpp, lines 2036-2040
> > 
> >
> > Save `PID` and terminate via `PID`.  This is a better guarantee against 
> > asynchronous/multiple termination events.

Added another review (the next one) to address this.


- Joseph


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


On July 29, 2016, 4:44 p.m., Joseph Wu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40266/
> ---
> 
> (Updated July 29, 2016, 4:44 p.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-3910
> https://issues.apache.org/jira/browse/MESOS-3910
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The `SocketManager` and `ProcessManager` are highly inter-dependent, 
> which requires some untangling in `process::finalize`.
> 
> * Logic originally found in `~ProcessManager` has been split into 
>   `ProcessManager::finalize` due to what happens during cleanup.
> * The future from `__s__->accept()` must be explicitly discarded as 
>   libevent does not detect a locally closed socket.
> * Terminating `HttpProxy`s must close the associated socket.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/src/process.cpp 
> 7f331b812de2f0437838f48e0959441c8e04c358 
> 
> Diff: https://reviews.apache.org/r/40266/diff/
> 
> 
> Testing
> ---
> 
> `make check` (libev)
> `make check` (--enable-libevent --enable-ssl)
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>



Re: Review Request 40266: Libprocess Reinit: Cleanup SocketManager alongside ProcessManager.

2016-07-29 Thread Joseph Wu

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

(Updated July 29, 2016, 4:44 p.m.)


Review request for mesos, Artem Harutyunyan and Joris Van Remoortere.


Changes
---

Rename process manager finalization method.  Tweak some comments.


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


Repository: mesos


Description
---

The `SocketManager` and `ProcessManager` are highly inter-dependent, 
which requires some untangling in `process::finalize`.

* Logic originally found in `~ProcessManager` has been split into 
  `ProcessManager::finalize` due to what happens during cleanup.
* The future from `__s__->accept()` must be explicitly discarded as 
  libevent does not detect a locally closed socket.
* Terminating `HttpProxy`s must close the associated socket.


Diffs (updated)
-

  3rdparty/libprocess/src/process.cpp 7f331b812de2f0437838f48e0959441c8e04c358 

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


Testing
---

`make check` (libev)
`make check` (--enable-libevent --enable-ssl)


Thanks,

Joseph Wu



Re: Review Request 50488: Fixed the incomplete redirect url in `Master::Http::redirect`.

2016-07-29 Thread Jiang Yan Xu

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


Ship it!




I'll change the description to

```
When the request which contains query parameters is sent to a
non-leading master, the master would redirect ignoring the query
parameters. This patch changes redirect() to include them.
```

because the fragment is not sent over to the server.


src/master/http.cpp (line 2038)


I'll add a comment when committing.

```
// `request.url` is not absolute so we can safely append it to
// `basePath`. See https://tools.ietf.org/html/rfc2616#section-5.1.2
// for details.
```


- Jiang Yan Xu


On July 29, 2016, 12:02 a.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50488/
> ---
> 
> (Updated July 29, 2016, 12:02 a.m.)
> 
> 
> Review request for mesos, Adam B, Benjamin Mahler, Jie Yu, Michael Lunøe, 
> Vinod Kone, and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-5911
> https://issues.apache.org/jira/browse/MESOS-5911
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> When the request which contains query parameters or fragment sent to a
> non-leading master, the master would redirect to an URL that ignored
> the query parameters and fragment. This changes the redirect URL
> include the query parameters or fragment.
> 
> 
> Diffs
> -
> 
>   src/master/http.cpp 1cbec976ccedae81def388c62889624aaf9a794e 
> 
> Diff: https://reviews.apache.org/r/50488/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 50593: Added `URL::isAbsolute` to check if the URL is absolute.

2016-07-29 Thread Jiang Yan Xu

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


Ship it!




Ship It!

- Jiang Yan Xu


On July 29, 2016, 12:02 a.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50593/
> ---
> 
> (Updated July 29, 2016, 12:02 a.m.)
> 
> 
> Review request for mesos, Adam B, Benjamin Mahler, Jie Yu, Michael Lunøe, 
> Vinod Kone, and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-5911
> https://issues.apache.org/jira/browse/MESOS-5911
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added `URL::isAbsolute` to check if the URL is absolute.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/include/process/http.hpp 
> c17c047de050da47989a97395c731686f0dfa548 
>   3rdparty/libprocess/src/http.cpp 1bf1f3b1e6b94f19d82d4b23eed7da7da0b25e5a 
> 
> Diff: https://reviews.apache.org/r/50593/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 40512: Libprocess Reinit: Add a test-only method to reinitialize libprocess.

2016-07-29 Thread Greg Mann

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




3rdparty/libprocess/src/process.cpp (line 863)


s/programatically/programmatically/


- Greg Mann


On July 26, 2016, 9:17 p.m., Joseph Wu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40512/
> ---
> 
> (Updated July 26, 2016, 9:17 p.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-3820
> https://issues.apache.org/jira/browse/MESOS-3820
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This builds upon earlier changes to complete `process::finalize`.  
> Tests which need to reconfigure libprocess, such as some SSL-related 
> tests, can use `process::reinitialize` to do so.  
> 
> This method may also be useful for providing additional isolation 
> between tests, such as cleaning up all processes after each test case.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/src/openssl.cpp 
> a73313b3221d6c80b35f21c00f35d9f9c795f1ec 
>   3rdparty/libprocess/src/process.cpp 
> 7f331b812de2f0437838f48e0959441c8e04c358 
> 
> Diff: https://reviews.apache.org/r/40512/diff/
> 
> 
> Testing
> ---
> 
> TODO: Define `process::reinitialize` in several tests, such as `HTTPTest`, 
> `MetricsTest`, and `ReapTest` and call `process::reinitialize` before and 
> after tests.
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>



Re: Review Request 50569: Added `isNegative` to check if the scalar resource is negative.

2016-07-29 Thread Benjamin Mahler

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




src/common/resources.cpp (lines 1456 - 1457)


On second thought, can we inline the logic here and add a TODO?

```
  // Remove the resource if it has become negative or empty.
  // Note that a negative resource means the caller is
  // subtracting more than they should!
  //
  // TODO(bmahler): Provide a stronger interface to avoid
  // silently allowing this to occur.
  
  bool negative = 
resource->type() == Value::SCALAR &&
resource->scalar().value() < 0;
  
  if (negative || isEmpty(*resource)) {
...
  }
```

Since isNegative only applies to Scalar, it seems a bit odd to expose it as 
a function. Whereas isEmpty applies to all resource types.


- Benjamin Mahler


On July 29, 2016, 5:43 a.m., Guangya Liu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50569/
> ---
> 
> (Updated July 29, 2016, 5:43 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler, Joris Van Remoortere, and Klaus Ma.
> 
> 
> Bugs: MESOS-5921
> https://issues.apache.org/jira/browse/MESOS-5921
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> When subtract resources finished, we need to call `validate` to
> check if the scalar resource is negative so as to remove this
> resource if it is negative. This is a bit heavy as the `validate`
> did many stuffs.
> 
> This patch is introducing a new helper function `isNegative`
> to check if the resource is a negative scalar resource.
> 
> 
> Diffs
> -
> 
>   include/mesos/resources.hpp 88a9feabf66ed34e7e5b1c6cb7e831818e7f7883 
>   include/mesos/v1/resources.hpp 054ed00a03319ae5e350542add34f497eaf79152 
>   src/common/resources.cpp 3dbff24d6859d3b1ed8589cec50170a5202cfbcb 
>   src/v1/resources.cpp 3c85dc8aa8125962b44e60806ece83a7653d0dc7 
> 
> Diff: https://reviews.apache.org/r/50569/diff/
> 
> 
> Testing
> ---
> 
> make
> make check
> 
> The time of 1000 `ports` `-=` operations was reduced about `0.3s`, even 
> though this does not improve much, the update does make the logic more clear.
> 
> Before fix:
> ```
> [ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2
> Took 2.834335secs to perform 1000 'total += r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 21.828846secs to perform 1000 'total.contains(r)' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.689858secs to perform 1000 'total -= r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 2.962259secs to perform 1000 'total = total + r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.760281secs to perform 1000 'total = total - r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 125159us to perform 1000 'r.nonRevocable()' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> [   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2 (35204 
> ms)
> ```
> 
> After fix:
> ```
> [ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2
> Took 2.619237secs to perform 1000 'total += r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 20.528293secs to perform 1000 'total.contains(r)' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.39984secs to perform 1000 'total -= r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 2.78301secs to perform 1000 'total = total + r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.399465secs to perform 1000 'total = total - r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 121055us to perform 1000 'r.nonRevocable()' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> [   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2 (32854 
> ms)
> ```
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>



Re: Review Request 50568: Updated -=/+= to subtract/add for resource object.

2016-07-29 Thread Benjamin Mahler

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


Ship it!




Ship It!

- Benjamin Mahler


On July 29, 2016, 1:34 a.m., Guangya Liu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50568/
> ---
> 
> (Updated July 29, 2016, 1:34 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler, Joris Van Remoortere, and Klaus Ma.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This is a follow up action for MESOS-5919. Based on the patch of
> https://reviews.apache.org/r/50553/ and
> https://reviews.apache.org/r/50557/ , we should update -=/+= to
> subtract/add if the resource object is from resources object.
> 
> 
> Diffs
> -
> 
>   include/mesos/resources.hpp 88a9feabf66ed34e7e5b1c6cb7e831818e7f7883 
>   include/mesos/v1/resources.hpp 054ed00a03319ae5e350542add34f497eaf79152 
>   src/common/resources.cpp 3dbff24d6859d3b1ed8589cec50170a5202cfbcb 
>   src/v1/resources.cpp 3c85dc8aa8125962b44e60806ece83a7653d0dc7 
> 
> Diff: https://reviews.apache.org/r/50568/diff/
> 
> 
> Testing
> ---
> 
> make
> make check
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>



Re: Review Request 50557: Used `add` instead of `+=` for `Resources::filter`.

2016-07-29 Thread Benjamin Mahler

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


Ship it!




Ship It!

- Benjamin Mahler


On July 28, 2016, 9:29 a.m., Guangya Liu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50557/
> ---
> 
> (Updated July 28, 2016, 9:29 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler, Joris Van Remoortere, and Klaus Ma.
> 
> 
> Bugs: MESOS-5919
> https://issues.apache.org/jira/browse/MESOS-5919
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The current logic of `Resources::filter` is using `+=` to add
> the filtered resource object and the `+=` resource object will
> invoke `validate` which is not necessary as all of the resource
> objects are valid.
> 
> The fix is using `add` instead of `+=` for `Resources::filter`
> , this can make sure there is no validation and can improve
> performance of `Resources::filter` for resources object.
> 
> 
> Diffs
> -
> 
>   src/common/resources.cpp 3dbff24d6859d3b1ed8589cec50170a5202cfbcb 
>   src/v1/resources.cpp 3c85dc8aa8125962b44e60806ece83a7653d0dc7 
> 
> Diff: https://reviews.apache.org/r/50557/diff/
> 
> 
> Testing
> ---
> 
> make
> make check
> 
> The performance for `ports` resources of `r.nonRevocable()` was improved 
> about `8s` with 1000 operations.
> 
> Before fix with validation.
> ```
> [ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2
> Took 2.832429secs to perform 1000 'total += r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 22.034252secs to perform 1000 'total.contains(r)' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.628885secs to perform 1000 'total -= r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.113548secs to perform 1000 'total = total + r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.854608secs to perform 1000 'total = total - r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 8.517941secs to perform 1000 'r.nonRevocable()' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> [   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2 (43985 
> ms)
> ```
> 
> After fix without validation.
> ```
> [ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2
> Took 2.834335secs to perform 1000 'total += r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 21.828846secs to perform 1000 'total.contains(r)' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.689858secs to perform 1000 'total -= r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 2.962259secs to perform 1000 'total = total + r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.760281secs to perform 1000 'total = total - r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 125159us to perform 1000 'r.nonRevocable()' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> [   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2 (35204 
> ms)
> ```
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>



Re: Review Request 50380: Made resources benchmark test for ports `-=/-` more accurate.

2016-07-29 Thread Benjamin Mahler

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




src/tests/resources_tests.cpp (lines 2515 - 2523)


Can we make the initial resources another parameter? I believe Klaus took 
this approach initially but I had removed 'initial' to simplify the patch.

If we make it a parameter we can have initial ports only for the port test 
case.


- Benjamin Mahler


On July 25, 2016, 1:43 p.m., Guangya Liu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50380/
> ---
> 
> (Updated July 25, 2016, 1:43 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Klaus Ma.
> 
> 
> Bugs: MESOS-5898
> https://issues.apache.org/jira/browse/MESOS-5898
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> When run benchmark test for `ports` resources, the `-=` and `-` only
> consumed about 10ms, this cannot reflect the real time of operating
> 1000 `ports` with `-=` and `-`.
> 
> The root cause is that the current calculation is always using same
> port range, with port, the formula for `+` is `a+a+a+a+...+a==a`;
> for `-`, it will be `a-a=0` and `0-a=0`.
> 
> With `0-a=0`, the code here
> https://github.com/apache/mesos/blob/master/src/common/values.cpp#L544
> will cause there is no validation as the `left` is empty after the
> `ports` was subtracted to 0.
> 
> The fix is adding a default `ports` resources to make sure the `ports`
> resources will never be subtracted to 0.
> 
> 
> Diffs
> -
> 
>   src/tests/resources_tests.cpp 4111e080b84079e100b731c9a56861b204f17388 
> 
> Diff: https://reviews.apache.org/r/50380/diff/
> 
> 
> Testing
> ---
> 
> make
> make check
> 
> Before fix:
> ```
>  ./bin/mesos-tests.sh --benchmark  
> --gtest_filter="*Resources_BENCHMARK_Test.Arithmetic/2"
> [==] Running 1 test from 1 test case.
> [--] Global test environment set-up.
> [--] 1 test from ResourcesOperators/Resources_BENCHMARK_Test
> [ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2
> Took 3.042796secs to perform 1000 'total += r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 10026us to perform 1000 'total -= r' operations on ports(*):[1-2, 4-5, 
> 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.193982secs to perform 1000 'total = total + r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 9142us to perform 1000 'total = total - r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> [   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2 (6258 
> ms)
> [--] 1 test from ResourcesOperators/Resources_BENCHMARK_Test (6258 ms 
> total)
> 
> [--] Global test environment tear-down
> [==] 1 test from 1 test case ran. (6278 ms total)
> [  PASSED  ] 1 test.
> ```
> 
> After fix:
> ```
>  ./bin/mesos-tests.sh --benchmark  
> --gtest_filter="*Resources_BENCHMARK_Test.Arithmetic/2"
> [==] Running 1 test from 1 test case.
> [--] Global test environment set-up.
> [--] 1 test from ResourcesOperators/Resources_BENCHMARK_Test
> [ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2
> Took 2.624597secs to perform 1000 'total += r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.592067secs to perform 1000 'total -= r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 2.909614secs to perform 1000 'total = total + r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.369582secs to perform 1000 'total = total - r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> [   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2 (12501 
> ms)
> [--] 1 test from ResourcesOperators/Resources_BENCHMARK_Test (12501 
> ms total)
> 
> [--] Global test environment tear-down
> [==] 1 test from 1 test case ran. (12518 ms total)
> [  PASSED  ] 1 test.
> ```
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>



Re: Review Request 50551: Added benchmark test for `Resources::contains`.

2016-07-29 Thread Benjamin Mahler

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




src/tests/resources_tests.cpp (lines 2537 - 2548)


Hm.. why not have a separate 'Contains' test for this? The 'Arithmetic' 
test was only for arithemtic operations.


- Benjamin Mahler


On July 28, 2016, 6:41 a.m., Guangya Liu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50551/
> ---
> 
> (Updated July 28, 2016, 6:41 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Klaus Ma.
> 
> 
> Bugs: MESOS-5700
> https://issues.apache.org/jira/browse/MESOS-5700
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added benchmark test for `Resources::contains`.
> 
> 
> Diffs
> -
> 
>   src/tests/resources_tests.cpp 4111e080b84079e100b731c9a56861b204f17388 
> 
> Diff: https://reviews.apache.org/r/50551/diff/
> 
> 
> Testing
> ---
> 
> make
> make check
> 
> ```
> ./bin/mesos-tests.sh --benchmark  
> --gtest_filter="ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/*"
> [==] Running 3 tests from 1 test case.
> [--] Global test environment set-up.
> [--] 3 tests from ResourcesOperators/Resources_BENCHMARK_Test
> [ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/0
> Took 276934us to perform 5 'total += r' operations on cpus(*):1; 
> gpus(*):1; mem(*):128; disk(*):256
> Took 1.395498secs to perform 5 'total.contains(r)' operations on 
> cpus(*):1; gpus(*):1; mem(*):128; disk(*):256
> Took 479028us to perform 5 'total -= r' operations on cpus(*):1; 
> gpus(*):1; mem(*):128; disk(*):256
> Took 951110us to perform 5 'total = total + r' operations on cpus(*):1; 
> gpus(*):1; mem(*):128; disk(*):256
> Took 1.307601secs to perform 5 'total = total - r' operations on 
> cpus(*):1; gpus(*):1; mem(*):128; disk(*):256
> [   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/0 (4413 
> ms)
> [ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/1
> Took 23.67492secs to perform 10 'total += r' operations on cpus(0, 
> principal_0, {key_0: value_0}):1; gpus(...
> Took 49.557323secs to perform 10 'total.contains(r)' operations on cpus(0, 
> principal_0, {key_0: value_0}):1; gpus(...
> Took 23.956811secs to perform 10 'total -= r' operations on cpus(0, 
> principal_0, {key_0: value_0}):1; gpus(...
> Took 23.374198secs to perform 10 'total = total + r' operations on cpus(0, 
> principal_0, {key_0: value_0}):1; gpus(...
> Took 24.492203secs to perform 10 'total = total - r' operations on cpus(0, 
> principal_0, {key_0: value_0}):1; gpus(...
> [   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/1 (145223 
> ms)
> [ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2
> Took 2.705859secs to perform 1000 'total += r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 30.612245secs to perform 1000 'total.contains(r)' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.532576secs to perform 1000 'total -= r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 2.902233secs to perform 1000 'total = total + r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.608806secs to perform 1000 'total = total - r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> [   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2 (43364 
> ms)
> [--] 3 tests from ResourcesOperators/Resources_BENCHMARK_Test (193001 
> ms total)
> 
> [--] Global test environment tear-down
> [==] 3 tests from 1 test case ran. (193024 ms total)
> [  PASSED  ] 3 tests.
> ```
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>



Re: Review Request 50459: Added code to generate JNI Header files.

2016-07-29 Thread Srinivas Brahmaroutu

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

(Updated July 29, 2016, 8:13 p.m.)


Review request for mesos, Alex Clemmer and Joseph Wu.


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


Repository: mesos


Description (updated)
---

Added code to generate JNI Header files.


Diffs (updated)
-

  cmake/MesosConfigure.cmake 6650c7c12b188b08c70cfee72b3200e83e7a1cd2 
  src/java/CMakeLists.txt PRE-CREATION 

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


Testing
---

cmake && make mesos-jni-header
check to see if all the headers are generated.
/include/java/jni/org_apache_mesos_Log.h
/include/java/jni/org_apache_mesos_Log_Entry.h
/include/java/jni/org_apache_mesos_Log_OperationFailedException.h
/include/java/jni/org_apache_mesos_Log_Position.h
/include/java/jni/org_apache_mesos_Log_Reader.h
/include/java/jni/org_apache_mesos_Log_Writer.h
/include/java/jni/org_apache_mesos_Log_WriterFailedException.h
/include/java/jni/org_apache_mesos_MesosExecutorDriver.h
/include/java/jni/org_apache_mesos_MesosSchedulerDriver.h
/include/java/jni/org_apache_mesos_state_AbstractState.h
/include/java/jni/org_apache_mesos_state_AbstractState_ExpungeFuture.h
/include/java/jni/org_apache_mesos_state_AbstractState_FetchFuture.h
/include/java/jni/org_apache_mesos_state_AbstractState_NamesFuture.h
/include/java/jni/org_apache_mesos_state_AbstractState_StoreFuture.h
/include/java/jni/org_apache_mesos_state_LevelDBState.h
/include/java/jni/org_apache_mesos_state_LogState.h
/include/java/jni/org_apache_mesos_state_Variable.h
/include/java/jni/org_apache_mesos_state_ZooKeeperState.h


Thanks,

Srinivas Brahmaroutu



Re: Review Request 50463: Added code to build libmesosjava shared library.

2016-07-29 Thread Srinivas Brahmaroutu

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

(Updated July 29, 2016, 8:13 p.m.)


Review request for mesos, Alex Clemmer and Joseph Wu.


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


Repository: mesos


Description (updated)
---

Added code to build libmesosjava shared library.


Diffs (updated)
-

  cmake/MesosConfigure.cmake b2318ed8eb4e11de43abfc15f51d12b2c0ff8fa1 
  src/CMakeLists.txt bde76f7840afe55f20d7551b3f7e5fe522f7f326 

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


Testing
---

cmake && make mesosjava

Build /src/libmesosjava.* shared libraries.


Thanks,

Srinivas Brahmaroutu



Re: Review Request 50460: Added code to build libstate shared library.

2016-07-29 Thread Srinivas Brahmaroutu

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

(Updated July 29, 2016, 8:13 p.m.)


Review request for mesos, Alex Clemmer and Joseph Wu.


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


Repository: mesos


Description (updated)
---

Added code to build libstate shared library.


Diffs (updated)
-

  cmake/MesosConfigure.cmake 6650c7c12b188b08c70cfee72b3200e83e7a1cd2 
  src/CMakeLists.txt 32a8ae2320ee3dada8a19dd815eccb4710c18159 
  src/state/CMakeLists.txt PRE-CREATION 

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


Testing
---

cmake .. && make state 

build libstate dynamic library.


Thanks,

Srinivas Brahmaroutu



Re: Review Request 50414: Added variables for building Java Protobuf.

2016-07-29 Thread Srinivas Brahmaroutu

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

(Updated July 29, 2016, 8:12 p.m.)


Review request for mesos, Alex Clemmer and Joseph Wu.


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


Repository: mesos


Description
---

Added variables for building Java Protobuf.


Diffs (updated)
-

  3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake 
d34ea4062984a9f29910c830fb854df58d18c3d7 

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


Testing
---

cmake .. && make


Thanks,

Srinivas Brahmaroutu



Re: Review Request 50456: Added custom command to generate Java protobufs.

2016-07-29 Thread Srinivas Brahmaroutu

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

(Updated July 29, 2016, 8:13 p.m.)


Review request for mesos, Alex Clemmer and Joseph Wu.


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


Repository: mesos


Description
---

Added custom command to generate Java protobufs.


Diffs (updated)
-

  cmake/MesosConfigure.cmake 6650c7c12b188b08c70cfee72b3200e83e7a1cd2 
  src/CMakeLists.txt 32a8ae2320ee3dada8a19dd815eccb4710c18159 
  src/java/CMakeLists.txt PRE-CREATION 

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


Testing
---

cmake .. && make mesos-java-protos.
check to see if java/generated folder has all the new java files created.
/src/java/generated/org/apache/mesos/containerizer/Protos.java
/src/java/generated/org/apache/mesos/fetcher/Protos.java
/src/java/generated/org/apache/mesos/Protos.java
/src/java/generated/org/apache/mesos/scheduler/Protos.java
/src/java/generated/org/apache/mesos/v1/executor/Protos.java
/src/java/generated/org/apache/mesos/v1/Protos.java
/src/java/generated/org/apache/mesos/v1/scheduler/Protos.java


Thanks,

Srinivas Brahmaroutu



Re: Review Request 50457: Added code to generate MesosNativeLibrary.java.

2016-07-29 Thread Srinivas Brahmaroutu

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

(Updated July 29, 2016, 8:13 p.m.)


Review request for mesos, Alex Clemmer and Joseph Wu.


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


Repository: mesos


Description
---

Added code to generate MesosNativeLibrary.java.


Diffs (updated)
-

  cmake/MesosCommon.cmake PRE-CREATION 
  src/java/CMakeLists.txt PRE-CREATION 

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


Testing
---

cmake .. 
Check to see if 
/src/java/generated/org/apache/mesos/MesosNativeLibrary.java is 
generated.


Thanks,

Srinivas Brahmaroutu



Re: Review Request 50458: Added code to build mesos-java.jar.

2016-07-29 Thread Srinivas Brahmaroutu

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

(Updated July 29, 2016, 8:13 p.m.)


Review request for mesos, Alex Clemmer and Joseph Wu.


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


Repository: mesos


Description (updated)
---

Added code to build mesos-java.jar.


Diffs (updated)
-

  cmake/MesosConfigure.cmake 6650c7c12b188b08c70cfee72b3200e83e7a1cd2 
  src/java/CMakeLists.txt PRE-CREATION 

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


Testing
---

cmake && make mesos-java 
Check to see if /src/java/mesos-java.jar


Thanks,

Srinivas Brahmaroutu



Re: Review Request 50415: Added build step to build Java Protobuf.

2016-07-29 Thread Srinivas Brahmaroutu

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

(Updated July 29, 2016, 8:12 p.m.)


Review request for mesos, Alex Clemmer and Joseph Wu.


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


Repository: mesos


Description
---

Added build step to build Java Protobuf.


Diffs (updated)
-

  3rdparty/CMakeLists.txt 770a3828a6e0ffaa4f185392fdc1a2152446449d 

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


Testing
---

cmake && make protobuf-2.6.1-java 
check if 
3rdparty/protobuf-2.6.1/src/protobuf-2.6.1-java/java/target/protobuf-java-2.6.1.jar


Thanks,

Srinivas Brahmaroutu



Re: Review Request 50455: Enabled Java builds if Java is found.

2016-07-29 Thread Srinivas Brahmaroutu

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

(Updated July 29, 2016, 8:13 p.m.)


Review request for mesos, Alex Clemmer and Joseph Wu.


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


Repository: mesos


Description
---

Enabled Java builds if Java is found.


Diffs (updated)
-

  cmake/MesosConfigure.cmake 6650c7c12b188b08c70cfee72b3200e83e7a1cd2 

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


Testing
---

cmake ENABLE_JAVA=ON 
check build variables set for Java.
cmake should output
-- 
-- Java Found and will be enabled
-- 


Thanks,

Srinivas Brahmaroutu



Re: Review Request 50456: Added custom command to generate Java protobufs.

2016-07-29 Thread Srinivas Brahmaroutu

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

(Updated July 29, 2016, 7:55 p.m.)


Review request for mesos, Alex Clemmer and Joseph Wu.


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


Repository: mesos


Description (updated)
---

Added custom command to generate Java protobufs.


Diffs (updated)
-

  cmake/MesosConfigure.cmake b2318ed8eb4e11de43abfc15f51d12b2c0ff8fa1 
  src/CMakeLists.txt bde76f7840afe55f20d7551b3f7e5fe522f7f326 
  src/java/CMakeLists.txt PRE-CREATION 

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


Testing
---

cmake .. && make mesos-java-protos.
check to see if java/generated folder has all the new java files created.
/src/java/generated/org/apache/mesos/containerizer/Protos.java
/src/java/generated/org/apache/mesos/fetcher/Protos.java
/src/java/generated/org/apache/mesos/Protos.java
/src/java/generated/org/apache/mesos/scheduler/Protos.java
/src/java/generated/org/apache/mesos/v1/executor/Protos.java
/src/java/generated/org/apache/mesos/v1/Protos.java
/src/java/generated/org/apache/mesos/v1/scheduler/Protos.java


Thanks,

Srinivas Brahmaroutu



Re: Review Request 50455: Enabled Java builds if Java is found.

2016-07-29 Thread Srinivas Brahmaroutu

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

(Updated July 29, 2016, 7:55 p.m.)


Review request for mesos, Alex Clemmer and Joseph Wu.


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


Repository: mesos


Description (updated)
---

Enabled Java builds if Java is found.


Diffs (updated)
-

  cmake/MesosConfigure.cmake b2318ed8eb4e11de43abfc15f51d12b2c0ff8fa1 

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


Testing
---

cmake ENABLE_JAVA=ON 
check build variables set for Java.
cmake should output
-- 
-- Java Found and will be enabled
-- 


Thanks,

Srinivas Brahmaroutu



Re: Review Request 50414: Added variables for building Java Protobuf.

2016-07-29 Thread Srinivas Brahmaroutu

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

(Updated July 29, 2016, 7:54 p.m.)


Review request for mesos, Alex Clemmer and Joseph Wu.


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


Repository: mesos


Description
---

Added variables for building Java Protobuf.


Diffs (updated)
-

  3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake 
d34ea4062984a9f29910c830fb854df58d18c3d7 

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


Testing
---

cmake .. && make


Thanks,

Srinivas Brahmaroutu



Re: Review Request 50415: Added build step to build Java Protobuf.

2016-07-29 Thread Srinivas Brahmaroutu

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

(Updated July 29, 2016, 7:55 p.m.)


Review request for mesos, Alex Clemmer and Joseph Wu.


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


Repository: mesos


Description
---

Added build step to build Java Protobuf.


Diffs (updated)
-

  3rdparty/CMakeLists.txt 770a3828a6e0ffaa4f185392fdc1a2152446449d 

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


Testing
---

cmake && make protobuf-2.6.1-java 
check if 
3rdparty/protobuf-2.6.1/src/protobuf-2.6.1-java/java/target/protobuf-java-2.6.1.jar


Thanks,

Srinivas Brahmaroutu



Re: Review Request 50520: Tweaked agent logging.

2016-07-29 Thread Anand Mazumdar

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


Fix it, then Ship it!





src/slave/slave.cpp 


hmm, why this change?


- Anand Mazumdar


On July 27, 2016, 5:30 p.m., Neil Conway wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50520/
> ---
> 
> (Updated July 27, 2016, 5:30 p.m.)
> 
> 
> Review request for mesos and Anand Mazumdar.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Tweaked agent logging.
> 
> 
> Diffs
> -
> 
>   src/slave/slave.cpp c19a63e4f8df11d8150071ef427bd8038584586b 
> 
> Diff: https://reviews.apache.org/r/50520/diff/
> 
> 
> Testing
> ---
> 
> make check, visual inspection.
> 
> 
> Thanks,
> 
> Neil Conway
> 
>



Re: Review Request 50517: Reduced verbosity of version logging in executor/scheduler driver.

2016-07-29 Thread Neil Conway


> On July 29, 2016, 7:09 p.m., Anand Mazumdar wrote:
> > src/exec/exec.cpp, line 161
> > 
> >
> > Why this change? This is very useful when debugging to know the version 
> > of mesos the executable was compiled against.
> > 
> > Also, we dump the version information in a lot of other places too 
> > e.g., master, agent, scheduler/executor library etc.

Hmm, yeah, fair enough -- I was on the fence about this one, I'll discard it.


- Neil


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


On July 27, 2016, 5:29 p.m., Neil Conway wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50517/
> ---
> 
> (Updated July 27, 2016, 5:29 p.m.)
> 
> 
> Review request for mesos and Anand Mazumdar.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Reduced verbosity of version logging in executor/scheduler driver.
> 
> 
> Diffs
> -
> 
>   src/exec/exec.cpp 90a16a90410027969adf93091bcce253a98d 
>   src/sched/sched.cpp 6a1a201202b8241e853a821ffcec49187a5bdf35 
> 
> Diff: https://reviews.apache.org/r/50517/diff/
> 
> 
> Testing
> ---
> 
> make check, visual inspection.
> 
> 
> Thanks,
> 
> Neil Conway
> 
>



Re: Review Request 48616: Add v1 changes for shared resources.

2016-07-29 Thread Anindya Sinha

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

(Updated July 29, 2016, 7:09 p.m.)


Review request for mesos and Jiang Yan Xu.


Changes
---

Rebased and addressed review comments.


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


Repository: mesos


Description
---

Add v1 changes for shared resources.


Diffs (updated)
-

  include/mesos/v1/resources.hpp 054ed00a03319ae5e350542add34f497eaf79152 
  src/v1/resources.cpp 3c85dc8aa8125962b44e60806ece83a7653d0dc7 

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


Testing
---


Thanks,

Anindya Sinha



Re: Review Request 50205: Enhanced benchmark test for resources to include shared resources.

2016-07-29 Thread Anindya Sinha

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

(Updated July 29, 2016, 7:09 p.m.)


Review request for mesos, Klaus Ma and Jiang Yan Xu.


Changes
---

Rebased and addressed review comment.


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


Repository: mesos


Description
---

Enhanced benchmark test for resources to include shared resources.


Diffs (updated)
-

  src/tests/resources_tests.cpp 4111e080b84079e100b731c9a56861b204f17388 

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


Testing
---

Tests passed. Results for resources benchmark is as follows:

Minimal impact seen in Resources arithmetic with the Resources refactor changes 
to incorporate shared resources.

With shared resources patch (note that 4th test below is for shared resources 
for scalars)

[--] 4 tests from ResourcesOperators/Resources_BENCHMARK_Test
[ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/0
[   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/0 (964 ms)
[ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/1
[   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/1 (17099 ms)
[ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2
[   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2 (9222 ms)
[ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/3
[   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/3 (1049 ms)
[--] 4 tests from ResourcesOperators/Resources_BENCHMARK_Test (28334 ms 
total)

HEAD

[--] 3 tests from ResourcesOperators/Resources_BENCHMARK_Test
[ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/0
[   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/0 (866 ms)
[ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/1
[   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/1 (17563 ms)
[ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2
[   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2 (9218 ms)
[--] 3 tests from ResourcesOperators/Resources_BENCHMARK_Test (27647 ms 
total)

Output from stdout is:

[==] Running 4 tests from 1 test case.
[--] Global test environment set-up.
[--] 4 tests from ResourcesOperators/Resources_BENCHMARK_Test
[ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/0
Took 113429us to perform 5 'total += r' operations on cpus(*):1; gpus(*):1; 
mem(*):128; disk(*):256
Took 154104us to perform 5 'total -= r' operations on cpus(*):1; gpus(*):1; 
mem(*):128; disk(*):256
Took 327479us to perform 5 'total = total + r' operations on cpus(*):1; 
gpus(*):1; mem(*):128; disk(*):256
Took 365752us to perform 5 'total = total - r' operations on cpus(*):1; 
gpus(*):1; mem(*):128; disk(*):256
[   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/0 (964 ms)
[ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/1
Took 4.105799secs to perform 10 'total += r' operations on cpus(0, principal_0, 
{key_0: value_0}):1; gpus(...
Took 4.325702secs to perform 10 'total -= r' operations on cpus(0, principal_0, 
{key_0: value_0}):1; gpus(...
Took 4.188394secs to perform 10 'total = total + r' operations on cpus(0, 
principal_0, {key_0: value_0}):1; gpus(...
Took 4.428872secs to perform 10 'total = total - r' operations on cpus(0, 
principal_0, {key_0: value_0}):1; gpus(...
[   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/1 (17099 ms)
[ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2
Took 2.515553secs to perform 1000 'total += r' operations on ports(*):[1-2, 
4-5, 7-8, 10-11, 13-14, 16-17, 1...
Took 2.038598secs to perform 1000 'total -= r' operations on ports(*):[1-2, 
4-5, 7-8, 10-11, 13-14, 16-17, 1...
Took 2.62789secs to perform 1000 'total = total + r' operations on 
ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
Took 2.03868secs to perform 1000 'total = total - r' operations on 
ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
[   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2 (9222 ms)
[ RUN  ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/3
Took 102441us to perform 5 'total += r' operations on cpus(*):1; 
mem(*):128; disk(test)[persistentId:...
Took 141011us to perform 5 'total -= r' operations on cpus(*):1; 
mem(*):128; disk(test)[persistentId:...
Took 383887us to perform 5 'total = total + r' operations on cpus(*):1; 
mem(*):128; disk(test)[persistentId:...
Took 421132us to perform 5 'total = total - r' operations on cpus(*):1; 
mem(*):128; disk(test)[persistentId:...
[   OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/3 (1049 ms)
[--] 4 tests from 

Re: Review Request 50517: Reduced verbosity of version logging in executor/scheduler driver.

2016-07-29 Thread Anand Mazumdar

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




src/exec/exec.cpp (line 161)


Why this change? This is very useful when debugging to know the version of 
mesos the executable was compiled against.

Also, we dump the version information in a lot of other places too e.g., 
master, agent, scheduler/executor library etc.


- Anand Mazumdar


On July 27, 2016, 5:29 p.m., Neil Conway wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50517/
> ---
> 
> (Updated July 27, 2016, 5:29 p.m.)
> 
> 
> Review request for mesos and Anand Mazumdar.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Reduced verbosity of version logging in executor/scheduler driver.
> 
> 
> Diffs
> -
> 
>   src/exec/exec.cpp 90a16a90410027969adf93091bcce253a98d 
>   src/sched/sched.cpp 6a1a201202b8241e853a821ffcec49187a5bdf35 
> 
> Diff: https://reviews.apache.org/r/50517/diff/
> 
> 
> Testing
> ---
> 
> make check, visual inspection.
> 
> 
> Thanks,
> 
> Neil Conway
> 
>



Re: Review Request 45959: Support arithmetic operations for shared resources with consumer counts.

2016-07-29 Thread Anindya Sinha

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

(Updated July 29, 2016, 7:09 p.m.)


Review request for mesos, Benjamin Mahler, Joris Van Remoortere, and Jiang Yan 
Xu.


Changes
---

Rebased and addressed review comments.


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


Repository: mesos


Description
---

A new class Resource_ is added that allows 'Resources' to group
identical shared resource objects together into a single 'Resource_'
object and tracked by its shared count. Non-shared resource objects
are not grouped.

For resource addition and subtraction, the shared count is adjusted for
shared resources as follows:
a) Addition: If shared resource is absent from original, then the
   resource is added initialized with a consumer count of 1. Otherwise,
   the share count for the shared resource is incremented.
b) Subtraction: If shared resource's share count is already 1, then
   the shared resource is removed from the original. Otherwise, its
   consumer count is decremented.

Note that v1 changes for shared resources are in the next commit.


Diffs (updated)
-

  include/mesos/resources.hpp 88a9feabf66ed34e7e5b1c6cb7e831818e7f7883 
  src/common/resources.cpp 3dbff24d6859d3b1ed8589cec50170a5202cfbcb 
  src/master/validation.cpp 52002beac29c371411348cb026a216e99ac96ab2 
  src/tests/mesos.hpp 51c66f175c80ebacd5af230222ea7e4c81dfc1e8 
  src/tests/resources_tests.cpp 4111e080b84079e100b731c9a56861b204f17388 

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


Testing
---

New tests added to demonstrate arithmetic operations for shared resources with 
consumer counts.
Tests successful.


Thanks,

Anindya Sinha



Re: Review Request 45959: Support arithmetic operations for shared resources with consumer counts.

2016-07-29 Thread Anindya Sinha


> On July 29, 2016, 1:14 a.m., Jiang Yan Xu wrote:
> > src/common/resources.cpp, lines 848-850
> > 
> >
> > Just trying to see if the comments can be made more concise:
> > 
> > ```
> > Assuming the wrapped Resource objects are equal, the 'contains' 
> > relationship is determined by the relationship of the counters for shared 
> > resources.
> > ```

It did not make the comments much more concise but I updated the comments 
though.


> On July 29, 2016, 1:14 a.m., Jiang Yan Xu wrote:
> > src/common/resources.cpp, line 856
> > 
> >
> > Here an `else` clause is more explicit.
> > 
> > ```
> > else {
> >   return internal::contains(resource, that.resource);
> > }
> > ```

I think both are equivalent.


> On July 29, 2016, 1:14 a.m., Jiang Yan Xu wrote:
> > src/common/resources.cpp, lines 255-279
> > 
> >
> > Why the change from the last revision?
> > 
> > Sharedness check at the top allows us to short-circuit the checking for 
> > shared resources and allow us to not have to consider shared resources as a 
> > possbility in subsequent if conditions which is better IMO both for 
> > simplicity and performance (even if the difference in performance may not 
> > be significant).

Whoops. This was based on a comment from Klaus Ma, but the earlier 
implementation addressed that since `bool operator==(const Resource& left, 
const Resource& right)` has all the checks. I misread the `operator==()` to 
only check for values.
I will revert this to original version.


> On July 29, 2016, 1:14 a.m., Jiang Yan Xu wrote:
> > src/common/resources.cpp, lines 323-346
> > 
> >
> > Ditto.

Reverted to earlier version.


- Anindya


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


On July 28, 2016, 10:42 p.m., Anindya Sinha wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45959/
> ---
> 
> (Updated July 28, 2016, 10:42 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler, Joris Van Remoortere, and Jiang 
> Yan Xu.
> 
> 
> Bugs: MESOS-4892
> https://issues.apache.org/jira/browse/MESOS-4892
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> A new class Resource_ is added that allows 'Resources' to group
> identical shared resource objects together into a single 'Resource_'
> object and tracked by its shared count. Non-shared resource objects
> are not grouped.
> 
> For resource addition and subtraction, the shared count is adjusted for
> shared resources as follows:
> a) Addition: If shared resource is absent from original, then the
>resource is added initialized with a consumer count of 1. Otherwise,
>the share count for the shared resource is incremented.
> b) Subtraction: If shared resource's share count is already 1, then
>the shared resource is removed from the original. Otherwise, its
>consumer count is decremented.
> 
> Note that v1 changes for shared resources are in the next commit.
> 
> 
> Diffs
> -
> 
>   include/mesos/resources.hpp 88a9feabf66ed34e7e5b1c6cb7e831818e7f7883 
>   src/common/resources.cpp 3dbff24d6859d3b1ed8589cec50170a5202cfbcb 
>   src/master/validation.cpp 52002beac29c371411348cb026a216e99ac96ab2 
>   src/tests/mesos.hpp 51c66f175c80ebacd5af230222ea7e4c81dfc1e8 
>   src/tests/resources_tests.cpp 4111e080b84079e100b731c9a56861b204f17388 
> 
> Diff: https://reviews.apache.org/r/45959/diff/
> 
> 
> Testing
> ---
> 
> New tests added to demonstrate arithmetic operations for shared resources 
> with consumer counts.
> Tests successful.
> 
> 
> Thanks,
> 
> Anindya Sinha
> 
>



Re: Review Request 50301: Reduced logging verbosity for replicated log operations.

2016-07-29 Thread Neil Conway


> On July 29, 2016, 6:48 p.m., Anand Mazumdar wrote:
> > src/log/recover.cpp, line 466
> > 
> >
> > hmm, why did you reduce the verbosity here?

Do you think that is important to log? Note that this doesn't indicate anything 
unexpected has happened.


- Neil


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


On July 27, 2016, 5:29 p.m., Neil Conway wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50301/
> ---
> 
> (Updated July 27, 2016, 5:29 p.m.)
> 
> 
> Review request for mesos and Anand Mazumdar.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Logging the duration required for each storage operation at `INFO` level
> is overkill for most people consuming the log.
> 
> 
> Diffs
> -
> 
>   src/log/leveldb.cpp f389d74b123574665c611b46cb52e3dc7042b331 
>   src/log/log.cpp f8e439fc756af05acb40878a9473c93c039c889e 
>   src/log/recover.cpp 69b5b28e5e680aa65a2166b06d3bdbd10c390903 
>   src/log/replica.cpp 45b77178fe93e26ae0ffde5ff0f02f36e5150bcb 
>   src/master/registrar.cpp 9d2f5580c7a8674f29b4c2be0142689f000d15a0 
> 
> Diff: https://reviews.apache.org/r/50301/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> Also visual inspection: ran a few `--verbose` test cases and checked that the 
> omitted information wasn't necessary/useful for understanding the replicated 
> log activity.
> 
> 
> Thanks,
> 
> Neil Conway
> 
>



Re: Review Request 50301: Reduced logging verbosity for replicated log operations.

2016-07-29 Thread Anand Mazumdar

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


Fix it, then Ship it!





src/log/recover.cpp (line 466)


hmm, why did you reduce the verbosity here?


- Anand Mazumdar


On July 27, 2016, 5:29 p.m., Neil Conway wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50301/
> ---
> 
> (Updated July 27, 2016, 5:29 p.m.)
> 
> 
> Review request for mesos and Anand Mazumdar.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Logging the duration required for each storage operation at `INFO` level
> is overkill for most people consuming the log.
> 
> 
> Diffs
> -
> 
>   src/log/leveldb.cpp f389d74b123574665c611b46cb52e3dc7042b331 
>   src/log/log.cpp f8e439fc756af05acb40878a9473c93c039c889e 
>   src/log/recover.cpp 69b5b28e5e680aa65a2166b06d3bdbd10c390903 
>   src/log/replica.cpp 45b77178fe93e26ae0ffde5ff0f02f36e5150bcb 
>   src/master/registrar.cpp 9d2f5580c7a8674f29b4c2be0142689f000d15a0 
> 
> Diff: https://reviews.apache.org/r/50301/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> Also visual inspection: ran a few `--verbose` test cases and checked that the 
> omitted information wasn't necessary/useful for understanding the replicated 
> log activity.
> 
> 
> Thanks,
> 
> Neil Conway
> 
>



Re: Review Request 46227: Added an user to indicate owner of persistent volume.

2016-07-29 Thread Greg Mann

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




include/mesos/mesos.proto (line 711)


s/mesos-slave/mesos-agent/



include/mesos/v1/mesos.proto (line 710)


s/mesos-slave/mesos-agent/


- Greg Mann


On April 14, 2016, 11:07 p.m., Anindya Sinha wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46227/
> ---
> 
> (Updated April 14, 2016, 11:07 p.m.)
> 
> 
> Review request for mesos and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-4893
> https://issues.apache.org/jira/browse/MESOS-4893
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> When a persistent volume is created, it is created with the user
> indicated in Resource::DiskInfo::Persistence. If missing, it would
> fall back to make the user of the mesos-slave process as the owner
> of the persistent volume.
> 
> 
> Diffs
> -
> 
>   include/mesos/mesos.proto 87af4a06db8cc3889fe4d3b314206103f5ce5f2d 
>   include/mesos/v1/mesos.proto 34da0a1484dc2f71262d8b97484b8edaae35bb6c 
> 
> Diff: https://reviews.apache.org/r/46227/diff/
> 
> 
> Testing
> ---
> 
> All tests passed.
> 
> 
> Thanks,
> 
> Anindya Sinha
> 
>



Re: Review Request 50523: Updated docker recovery to account for GPU resources.

2016-07-29 Thread Rajat Phull

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

(Updated July 29, 2016, 6:15 p.m.)


Review request for mesos, Benjamin Mahler, Kevin Klues, and Yubo Li.


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


Repository: mesos


Description
---

Updated docker recovery to account for GPU resources.


Diffs (updated)
-

  src/slave/containerizer/docker.hpp 43ca4317d608b3b43dd7bd0d1b55c721e7364885 
  src/slave/containerizer/docker.cpp 12bad2db03bcf755317c654f028b628c5c407a62 
  src/tests/containerizer/nvidia_gpu_isolator_tests.cpp 
02d82e3e1ab3e7dd05f351a294774cf000276bcd 

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


Testing
---

GTEST_FILTER="NvidiaGpuDockerContainerizerTest.ROOT_DOCKER_LaunchWithGpuRecovery"
 make -j check


Thanks,

Rajat Phull



Re: Review Request 50524: Updated docker recovery to use abstraction provided by docker inspect.

2016-07-29 Thread Rajat Phull

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

(Updated July 29, 2016, 6:16 p.m.)


Review request for mesos, Benjamin Mahler, Kevin Klues, and Yubo Li.


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


Repository: mesos


Description
---

Updated docker recovery to use abstraction provided by docker inspect.


Diffs (updated)
-

  src/slave/containerizer/docker.hpp 43ca4317d608b3b43dd7bd0d1b55c721e7364885 
  src/slave/containerizer/docker.cpp 12bad2db03bcf755317c654f028b628c5c407a62 

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


Testing
---

GTEST_FILTER="NvidiaGpuDockerContainerizerTest.ROOT_DOCKER_LaunchWithGpuRecovery"
 make -j check


Thanks,

Rajat Phull



Re: Review Request 50253: Added native implementation for the V0 Mesos Adapter.

2016-07-29 Thread Anand Mazumdar

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

(Updated July 29, 2016, 6:06 p.m.)


Review request for mesos, Joris Van Remoortere and Vinod Kone.


Changes
---

Moved `heartbeatTimer` to being an `Option` since it's not initialized at 
creation of the adapter process.


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


Repository: mesos


Description
---

This change adds the C++ implementation for the JAVA V0 to V1 Mesos
implementation adapter (driver + scheduler).


Diffs (updated)
-

  src/Makefile.am cc83525a4455bbb0e654d346921d66ed2436411d 
  src/java/jni/org_apache_mesos_v1_scheduler_V0Mesos.cpp PRE-CREATION 

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


Testing
---

make check


Thanks,

Anand Mazumdar



Re: Review Request 45959: Support arithmetic operations for shared resources with consumer counts.

2016-07-29 Thread Anindya Sinha


> On July 20, 2016, 2:36 a.m., Klaus Ma wrote:
> > src/common/resources.cpp, lines 308-316
> > 
> >
> > I think we can check name,type, role firstly, then check SharedInfo.

Although I updated it based on your comment, I think it was not needed since 
`left == right` does those checks. I will revert it in the next update.


- Anindya


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


On July 28, 2016, 10:42 p.m., Anindya Sinha wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45959/
> ---
> 
> (Updated July 28, 2016, 10:42 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler, Joris Van Remoortere, and Jiang 
> Yan Xu.
> 
> 
> Bugs: MESOS-4892
> https://issues.apache.org/jira/browse/MESOS-4892
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> A new class Resource_ is added that allows 'Resources' to group
> identical shared resource objects together into a single 'Resource_'
> object and tracked by its shared count. Non-shared resource objects
> are not grouped.
> 
> For resource addition and subtraction, the shared count is adjusted for
> shared resources as follows:
> a) Addition: If shared resource is absent from original, then the
>resource is added initialized with a consumer count of 1. Otherwise,
>the share count for the shared resource is incremented.
> b) Subtraction: If shared resource's share count is already 1, then
>the shared resource is removed from the original. Otherwise, its
>consumer count is decremented.
> 
> Note that v1 changes for shared resources are in the next commit.
> 
> 
> Diffs
> -
> 
>   include/mesos/resources.hpp 88a9feabf66ed34e7e5b1c6cb7e831818e7f7883 
>   src/common/resources.cpp 3dbff24d6859d3b1ed8589cec50170a5202cfbcb 
>   src/master/validation.cpp 52002beac29c371411348cb026a216e99ac96ab2 
>   src/tests/mesos.hpp 51c66f175c80ebacd5af230222ea7e4c81dfc1e8 
>   src/tests/resources_tests.cpp 4111e080b84079e100b731c9a56861b204f17388 
> 
> Diff: https://reviews.apache.org/r/45959/diff/
> 
> 
> Testing
> ---
> 
> New tests added to demonstrate arithmetic operations for shared resources 
> with consumer counts.
> Tests successful.
> 
> 
> Thanks,
> 
> Anindya Sinha
> 
>



Re: Review Request 50254: Added an example test for the V0/V1 Mesos java implementation.

2016-07-29 Thread Anand Mazumdar


> On July 26, 2016, 11:56 p.m., Vinod Kone wrote:
> > src/examples/java/V1TestFramework.java, line 134
> > 
> >
> > can you add a hearbeat timer and do a `reconnect()` if it fires?

I left a TODO to do this in a follow up patch.


- Anand


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


On July 20, 2016, 7:03 p.m., Anand Mazumdar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50254/
> ---
> 
> (Updated July 20, 2016, 7:03 p.m.)
> 
> 
> Review request for mesos, Joris Van Remoortere and Vinod Kone.
> 
> 
> Bugs: MESOS-5788
> https://issues.apache.org/jira/browse/MESOS-5788
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added an example test for the V0/V1 Mesos java implementation.
> 
> 
> Diffs
> -
> 
>   configure.ac d2136909b7305498ae901a5ea00133142b77f9e6 
>   src/Makefile.am cc83525a4455bbb0e654d346921d66ed2436411d 
>   src/examples/java/V1TestFramework.java PRE-CREATION 
>   src/examples/java/v1-test-framework.in PRE-CREATION 
>   src/tests/examples_tests.cpp ac513ce9aa3c8f366fe81ba937e3dc0d51a26940 
>   src/tests/java_v0_framework_test.sh PRE-CREATION 
>   src/tests/java_v1_framework_test.sh PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/50254/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>



Re: Review Request 50248: Added helper functions for v1 JNI `construct()`/`convert()`.

2016-07-29 Thread Anand Mazumdar

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

(Updated July 29, 2016, 5:26 p.m.)


Review request for mesos, Joris Van Remoortere and Vinod Kone.


Changes
---

Review comments


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


Repository: mesos


Description
---

These would be used later in the chain for the making JNI
calls to v1 Mesos implementation in native code.


Diffs (updated)
-

  src/java/jni/construct.cpp e5c070c819698729780b487ebd214ee43f15ae87 
  src/java/jni/convert.cpp 45ff488b921c0254761ec0a7b5c06608aa86ca3f 

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


Testing
---

make check


Thanks,

Anand Mazumdar



Re: Review Request 50251: Added java implementations for the V0/V1 implementation for Mesos.

2016-07-29 Thread Anand Mazumdar

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

(Updated July 29, 2016, 5:26 p.m.)


Review request for mesos, Joris Van Remoortere and Vinod Kone.


Changes
---

Review comments


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


Repository: mesos


Description
---

Added java implementations for the V0/V1 implementation for Mesos.


Diffs (updated)
-

  src/Makefile.am cc83525a4455bbb0e654d346921d66ed2436411d 
  src/java/src/org/apache/mesos/v1/scheduler/JNIMesos.java PRE-CREATION 
  src/java/src/org/apache/mesos/v1/scheduler/V0Mesos.java PRE-CREATION 

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


Testing
---

make check


Thanks,

Anand Mazumdar



Re: Review Request 50253: Added native implementation for the V0 Mesos Adapter.

2016-07-29 Thread Anand Mazumdar

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

(Updated July 29, 2016, 5:26 p.m.)


Review request for mesos, Joris Van Remoortere and Vinod Kone.


Changes
---

Review comments


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


Repository: mesos


Description
---

This change adds the C++ implementation for the JAVA V0 to V1 Mesos
implementation adapter (driver + scheduler).


Diffs (updated)
-

  src/Makefile.am cc83525a4455bbb0e654d346921d66ed2436411d 
  src/java/jni/org_apache_mesos_v1_scheduler_V0Mesos.cpp PRE-CREATION 

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


Testing
---

make check


Thanks,

Anand Mazumdar



Re: Review Request 50247: Added a abstract base class for scheduler library.

2016-07-29 Thread Anand Mazumdar

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

(Updated July 29, 2016, 5:26 p.m.)


Review request for mesos, Joris Van Remoortere and Vinod Kone.


Changes
---

Review comments


Repository: mesos


Description
---

This change adds an abstract base class `MesosBase` that
would be used by implementations for interacting with
Mesos via the Scheduler API. This is needed later for
implementing the V0->V1 Scheduler Adapter.


Diffs (updated)
-

  include/mesos/v1/scheduler.hpp 18e7a95f8342ea155f9e339945b05810b6bd82b5 

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


Testing
---

make check


Thanks,

Anand Mazumdar



Re: Review Request 50252: Added native implementation for v1 Mesos interface.

2016-07-29 Thread Anand Mazumdar

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

(Updated July 29, 2016, 5:26 p.m.)


Review request for mesos, Joris Van Remoortere and Vinod Kone.


Changes
---

Review comments


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


Repository: mesos


Description
---

This change adds the native C++ implementation for the v1
Java class `JNIMesos` used for interacting with Mesos.


Diffs (updated)
-

  src/Makefile.am cc83525a4455bbb0e654d346921d66ed2436411d 
  src/java/jni/org_apache_mesos_v1_scheduler_JNIMesos.cpp PRE-CREATION 

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


Testing
---

make check


Thanks,

Anand Mazumdar



Re: Review Request 50250: Added v1 Scheduler/Mesos interface in Java.

2016-07-29 Thread Anand Mazumdar

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

(Updated July 29, 2016, 5:26 p.m.)


Review request for mesos, Joris Van Remoortere and Vinod Kone.


Changes
---

Review comments


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


Repository: mesos


Description
---

This change adds an interface for the v1 Scheduler + Mesos
interface that the schedulers can use to connect to Mesos.


Diffs (updated)
-

  src/Makefile.am cc83525a4455bbb0e654d346921d66ed2436411d 
  src/java/src/org/apache/mesos/v1/scheduler/Mesos.java PRE-CREATION 
  src/java/src/org/apache/mesos/v1/scheduler/Scheduler.java PRE-CREATION 

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


Testing
---

make check


Thanks,

Anand Mazumdar



Re: Review Request 50254: Added an example test for the V0/V1 Mesos java implementation.

2016-07-29 Thread Anand Mazumdar

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

(Updated July 29, 2016, 5:26 p.m.)


Review request for mesos, Joris Van Remoortere and Vinod Kone.


Changes
---

Review comments


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


Repository: mesos


Description
---

Added an example test for the V0/V1 Mesos java implementation.


Diffs (updated)
-

  configure.ac d2136909b7305498ae901a5ea00133142b77f9e6 
  src/Makefile.am cc83525a4455bbb0e654d346921d66ed2436411d 
  src/examples/java/V1TestFramework.java PRE-CREATION 
  src/examples/java/v1-test-framework.in PRE-CREATION 
  src/tests/examples_tests.cpp ac513ce9aa3c8f366fe81ba937e3dc0d51a26940 
  src/tests/java_v0_framework_test.sh PRE-CREATION 
  src/tests/java_v1_framework_test.sh PRE-CREATION 

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


Testing
---

make check


Thanks,

Anand Mazumdar



Re: Review Request 50570: Mesos-slave --help should not return as failed.

2016-07-29 Thread Greg Mann

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


Ship it!




Ship It!

- Greg Mann


On July 29, 2016, 10:32 a.m., Pierre Cheynier wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50570/
> ---
> 
> (Updated July 29, 2016, 10:32 a.m.)
> 
> 
> Review request for mesos and Greg Mann.
> 
> 
> Bugs: MESOS-5922
> https://issues.apache.org/jira/browse/MESOS-5922
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Doing a simple `mesos-agent --help` should return with exit_status=0.
> It's not the case since work_dir is considered as mandatory.
> 
> 
> Diffs
> -
> 
>   src/slave/main.cpp a4d971a00f18af661a8bf2cb4f580d35f7c76d10 
> 
> Diff: https://reviews.apache.org/r/50570/diff/
> 
> 
> Testing
> ---
> 
> $ ./boostrap
> $ mkdir build && cd build
> $ ../configure
> $ make
> $ make check
> $ ./build/src/mesos-agent --help > /dev/null; echo $?
> 0
> $ ./build/src/mesos-agent --work_dir='/mnt/mesos' > /dev/null; echo $?
> 0
> $ ./build/src/mesos-agent --work_dir='/mnt/mesos' --master=localhost:5050; 
> echo $?
> WARNING: Logging before InitGoogleLogging() is written to STDERR
> I0728 17:01:43.261836 23247 main.cpp:243] Build: 2016-07-28 16:16:49 by pierre
> I0728 17:01:43.261925 23247 main.cpp:244] Version: 1.1.0
> I0728 17:01:43.261930 23247 main.cpp:251] Git SHA: 
> beda6ffb72687d9f5c23b07552cadf42756bcd75
> (...)
> 
> 
> Thanks,
> 
> Pierre Cheynier
> 
>



Review Request 50609: Moved check for '--version' in agent's 'main.cpp'.

2016-07-29 Thread Greg Mann

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

Review request for mesos, Jie Yu and Pierre Cheynier.


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


Repository: mesos


Description
---

The recent removal of the agent's default `work_dir`
requires us to check for the presence of the `--version`
flag before we check for errors in flag loading; this
patch makes that change.


Diffs
-

  src/slave/main.cpp a4d971a00f18af661a8bf2cb4f580d35f7c76d10 

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


Testing
---

Ran the mesos agent binary with and without the '--version' flag to verify 
correct behavior and return code.


Thanks,

Greg Mann



Re: Review Request 49616: Add suppression benchmark.

2016-07-29 Thread Jacob Janco

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

(Updated July 29, 2016, 5:05 p.m.)


Review request for mesos, James Peach, Joris Van Remoortere, and Jiang Yan Xu.


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


Repository: mesos


Description
---

- Useful for high framework clusters which carry
  many suppressed frameworks that are considered
  during allocation.


Diffs (updated)
-

  src/tests/hierarchical_allocator_tests.cpp 
acea1277bf4980743a0b875af5c2861cffe80ab5 

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


Testing
---

MESOS_BENCHMARK=1 GTEST_FILTER="*BENCHMARK_Test.SuppressOffers*" make check

...
[ RUN  ] 
SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.SuppressOffers/12
Using 5000 agents and 500 frameworks
Added 500 frameworks in 9300us
Added 5000 agents in 15.881391secs
allocate() took 15.537025secs to make 5000 offers with 100 out of 500 
frameworks suppressing offers
allocate() took 15.175028secs to make 5000 offers with 200 out of 500 
frameworks suppressing offers
allocate() took 15.554843secs to make 5000 offers with 300 out of 500 
frameworks suppressing offers
allocate() took 15.740833secs to make 5000 offers with 400 out of 500 
frameworks suppressing offers
allocate() took 1.311314secs to make 0 offers with 500 out of 500 frameworks 
suppressing offers
[   OK ] 
SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.SuppressOffers/12 
(93269 ms)
[ RUN  ] 
SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.SuppressOffers/13
Using 5000 agents and 1000 frameworks
Added 1000 frameworks in 17917us
Added 5000 agents in 31.450037secs
allocate() took 31.807624secs to make 5000 offers with 200 out of 1000 
frameworks suppressing offers
allocate() took 32.039667secs to make 5000 offers with 400 out of 1000 
frameworks suppressing offers
allocate() took 32.333716secs to make 5000 offers with 600 out of 1000 
frameworks suppressing offers
allocate() took 32.938456secs to make 5000 offers with 800 out of 1000 
frameworks suppressing offers
allocate() took 2.69174secs to make 0 offers with 1000 out of 1000 frameworks 
suppressing offers
[   OK ] 
SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.SuppressOffers/13 
(178827 ms)
[ RUN  ] 
SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.SuppressOffers/14
Using 5000 agents and 3000 frameworks
Added 3000 frameworks in 55821us
Added 5000 agents in 1.6420837333mins
allocate() took 1.6388713167mins to make 5000 offers with 600 out of 3000 
frameworks suppressing offers
allocate() took 1.6645890833mins to make 5000 offers with 1200 out of 3000 
frameworks suppressing offers
allocate() took 1.6524411667mins to make 5000 offers with 1800 out of 3000 
frameworks suppressing offers
allocate() took 1.71699065mins to make 5000 offers with 2400 out of 3000 
frameworks suppressing offers
allocate() took 8.371823secs to make 0 offers with 3000 out of 3000 frameworks 
suppressing offers
[   OK ] 
SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.SuppressOffers/14 
(528494 ms)
[ RUN  ] 
SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.SuppressOffers/15
Using 5000 agents and 6000 frameworks
Added 6000 frameworks in 110493us
Added 5000 agents in 3.342676mins
allocate() took 3.6809198667mins to make 5000 offers with 1200 out of 6000 
frameworks suppressing offers
allocate() took 3.6710132333mins to make 5000 offers with 2400 out of 6000 
frameworks suppressing offers
allocate() took 3.6804925167mins to make 5000 offers with 3600 out of 6000 
frameworks suppressing offers
allocate() took 3.7197498333mins to make 5000 offers with 4800 out of 6000 
frameworks suppressing offers
allocate() took 17.318823secs to make 0 offers with 6000 out of 6000 frameworks 
suppressing offers
...


Thanks,

Jacob Janco



Re: Review Request 50125: Added mesos-docker-executor support for device control.

2016-07-29 Thread Yubo Li

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

(Updated 七月 29, 2016, 9:56 a.m.)


Review request for mesos, Benjamin Mahler, Kevin Klues, and Rajat Phull.


Summary (updated)
-

Added mesos-docker-executor support for device control.


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


Repository: mesos


Description (updated)
---

Added a new flag '--device' to mesos-docker-executor to control device
exposition, isolation, and access permission.


Diffs (updated)
-

  src/docker/executor.hpp 7b63d784d6b8685912598b77fb38cf6e70646ae3 
  src/docker/executor.cpp 445628c9164facdd8bd812c5b45e3b2b886ebf0e 
  src/slave/containerizer/docker.cpp 12bad2db03bcf755317c654f028b628c5c407a62 

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


Testing
---

make check


Thanks,

Yubo Li



Re: Review Request 50599: Added a new 'device' entry to 'docker::Flags'.

2016-07-29 Thread Yubo Li

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

(Updated 七月 29, 2016, 9:54 a.m.)


Review request for mesos, Benjamin Mahler, Guangya Liu, Kevin Klues, and Rajat 
Phull.


Changes
---

Splitted a new patch for atomic function


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


Repository: mesos


Description
---

Added a new string entry 'device' to 'docker::Flags' to
indicate host devices exposed into docker container, and
passed allocated GPUs to it.


Diffs (updated)
-

  src/slave/containerizer/docker.cpp 12bad2db03bcf755317c654f028b628c5c407a62 

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


Testing
---

make check


Thanks,

Yubo Li



Re: Review Request 50128: Added helpful functions to 'Docker::Device'.

2016-07-29 Thread Yubo Li

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

(Updated 七月 29, 2016, 9:52 a.m.)


Review request for mesos, Benjamin Mahler, Kevin Klues, and Rajat Phull.


Summary (updated)
-

Added helpful functions to 'Docker::Device'.


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


Repository: mesos


Description
---

Wrapped helpful functions to 'Docker::Device' to
handle string parsing and serializing.


Diffs (updated)
-

  src/docker/docker.hpp 9093371afc8ea792ba94f61c6875703e547ea6b0 
  src/docker/docker.cpp e8d2cb9662af34d75c9e2d822004f58fac76e7e0 

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


Testing
---

make check


Thanks,

Yubo Li



Re: Review Request 50601: Fixed Rakefile to generate links to external .md files.

2016-07-29 Thread Joerg Schad

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

(Updated July 29, 2016, 9:35 a.m.)


Review request for mesos, Neil Conway and Till Toenshoff.


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


Repository: mesos


Description
---

Previously links to external .md -i.e, outside of the documentation-
were generated incorrectly. This patch exludes all links to .md
files starting with http from the link rewriting logic.
Note that this includes https links.


Diffs (updated)
-

  site/Rakefile aa777bdd8e459f27ab487b5641595142f4e14c68 

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


Testing (updated)
---

build website via docker container.
additionally regex explained/tested here: https://regex101.com/r/zP6sH6/3


Thanks,

Joerg Schad



Review Request 50601: Fixed Rakefile to generate links to external .md files.

2016-07-29 Thread Joerg Schad

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

Review request for mesos, Neil Conway and Till Toenshoff.


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


Repository: mesos


Description
---

Previously links to external .md -i.e, outside of the documentation-
were generated incorrectly. This patch exludes all links to .md
files starting with http from the link rewriting logic.
Note that this includes https links.


Diffs
-

  site/Rakefile aa777bdd8e459f27ab487b5641595142f4e14c68 

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


Testing
---

build website via docker container.
additionally regex explained/tested here: https://regex101.com/r/zP6sH6/2


Thanks,

Joerg Schad



Review Request 50599: Added a new 'device' entry to 'docker::Flags'.

2016-07-29 Thread Yubo Li

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

Review request for mesos, Benjamin Mahler, Guangya Liu, Kevin Klues, and Rajat 
Phull.


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


Repository: mesos


Description
---

Added a new string entry 'device' to 'docker::Flags' to
indicate host devices exposed into docker container, and
passed allocated GPUs to it.


Diffs
-

  src/slave/containerizer/docker.cpp 12bad2db03bcf755317c654f028b628c5c407a62 

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


Testing
---

make check


Thanks,

Yubo Li



Re: Review Request 50488: Fixed the incomplete redirect url in `Master::Http::redirect`.

2016-07-29 Thread haosdent huang

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

(Updated July 29, 2016, 7:02 a.m.)


Review request for mesos, Adam B, Benjamin Mahler, Jie Yu, Michael Lunøe, Vinod 
Kone, and Jiang Yan Xu.


Changes
---

Address @xujyan's comment.


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


Repository: mesos


Description
---

When the request which contains query parameters or fragment sent to a
non-leading master, the master would redirect to an URL that ignored
the query parameters and fragment. This changes the redirect URL
include the query parameters or fragment.


Diffs (updated)
-

  src/master/http.cpp 1cbec976ccedae81def388c62889624aaf9a794e 

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


Testing
---


Thanks,

haosdent huang



Re: Review Request 50482: Fixed the CORS error when redirect in WEB UI.

2016-07-29 Thread haosdent huang

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

(Updated July 29, 2016, 7:02 a.m.)


Review request for mesos, Adam B, Jie Yu, Michael Lunøe, Vinod Kone, and Jiang 
Yan Xu.


Changes
---

Rebase.


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


Repository: mesos


Description
---

The redirection in WEB UI is broken since the CORS restriction after
we enabled redirection in `master/state` endpoint in
https://reviews.apache.org/r/34646/. We change the request way to
`master/state` endpoint from xhr to jsonp for bypassing the CORS
restriction.


Diffs (updated)
-

  src/webui/master/static/index.html a083537cd718162d1913842bddbd2653d8c52337 
  src/webui/master/static/js/controllers.js 
ceaf1402ebdae4efd1a8a6fc9c7b795de69e2fc0 

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


Testing
---

Testing video record

![http_redirect.gif](https://issues.apache.org/jira/secure/attachment/12820401/http_redirect.gif)


Thanks,

haosdent huang



Re: Review Request 50593: Added `URL::isAbsolute` to check if the URL is absolute.

2016-07-29 Thread haosdent huang

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

(Updated July 29, 2016, 7:02 a.m.)


Review request for mesos, Adam B, Benjamin Mahler, Jie Yu, Michael Lunøe, Vinod 
Kone, and Jiang Yan Xu.


Changes
---

Address @xujyan's comment.


Summary (updated)
-

Added `URL::isAbsolute` to check if the URL is absolute.


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


Repository: mesos


Description (updated)
---

Added `URL::isAbsolute` to check if the URL is absolute.


Diffs (updated)
-

  3rdparty/libprocess/include/process/http.hpp 
c17c047de050da47989a97395c731686f0dfa548 
  3rdparty/libprocess/src/http.cpp 1bf1f3b1e6b94f19d82d4b23eed7da7da0b25e5a 

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


Testing
---


Thanks,

haosdent huang



Re: Review Request 50593: Added `URL::isRelative` to check if the URL is relative.

2016-07-29 Thread haosdent huang


> On July 29, 2016, 6:38 a.m., Jiang Yan Xu wrote:
> > I suggested `isAbsolute()` because it's a precisely defined concept in 
> > https://tools.ietf.org/html/rfc3986#section-4.3 whereas **relative** is 
> > not, it's just a **subset of URIs**.
> > 
> > Can we implement `isAbsolute()` instead and in the next review just do 
> > `CHECK(!request.url.isAbsolute());`?
> > 
> > e.g., the golang implementation just looks as whether the `scheme` is empty.
> > 
> > https://golang.org/src/net/url/url.go?s=22627:22653#L834
> > ```
> > // IsAbs reports whether the URL is absolute.
> > func (u *URL) IsAbs() bool {
> > return u.Scheme != ""
> > }
> > ```

Sure, let me update.


- haosdent


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


On July 29, 2016, 4:06 a.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50593/
> ---
> 
> (Updated July 29, 2016, 4:06 a.m.)
> 
> 
> Review request for mesos, Adam B, Benjamin Mahler, Jie Yu, Michael Lunøe, 
> Vinod Kone, and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-5911
> https://issues.apache.org/jira/browse/MESOS-5911
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added `URL::isRelative` to check if the URL is relative.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/include/process/http.hpp 
> c17c047de050da47989a97395c731686f0dfa548 
>   3rdparty/libprocess/src/http.cpp 1bf1f3b1e6b94f19d82d4b23eed7da7da0b25e5a 
> 
> Diff: https://reviews.apache.org/r/50593/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 50128: Added Helpful functions to 'Docker::Device'.

2016-07-29 Thread Yubo Li

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

(Updated 七月 29, 2016, 6:39 a.m.)


Review request for mesos, Benjamin Mahler, Kevin Klues, and Rajat Phull.


Changes
---

Changed commit order to depend on 50123


Summary (updated)
-

Added Helpful functions to 'Docker::Device'.


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


Repository: mesos


Description (updated)
---

Wrapped helpful functions to 'Docker::Device' to
handle string parsing and serializing.


Diffs (updated)
-

  src/docker/docker.hpp 9093371afc8ea792ba94f61c6875703e547ea6b0 
  src/docker/docker.cpp e8d2cb9662af34d75c9e2d822004f58fac76e7e0 

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


Testing
---

make check


Thanks,

Yubo Li



Re: Review Request 50593: Added `URL::isRelative` to check if the URL is relative.

2016-07-29 Thread Jiang Yan Xu

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



I suggested `isAbsolute()` because it's a precisely defined concept in 
https://tools.ietf.org/html/rfc3986#section-4.3 whereas **relative** is not, 
it's just a **subset of URIs**.

Can we implement `isAbsolute()` instead and in the next review just do 
`CHECK(!request.url.isAbsolute());`?

e.g., the golang implementation just looks as whether the `scheme` is empty.

https://golang.org/src/net/url/url.go?s=22627:22653#L834
```
// IsAbs reports whether the URL is absolute.
func (u *URL) IsAbs() bool {
return u.Scheme != ""
}
```

- Jiang Yan Xu


On July 28, 2016, 9:06 p.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50593/
> ---
> 
> (Updated July 28, 2016, 9:06 p.m.)
> 
> 
> Review request for mesos, Adam B, Benjamin Mahler, Jie Yu, Michael Lunøe, 
> Vinod Kone, and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-5911
> https://issues.apache.org/jira/browse/MESOS-5911
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added `URL::isRelative` to check if the URL is relative.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/include/process/http.hpp 
> c17c047de050da47989a97395c731686f0dfa548 
>   3rdparty/libprocess/src/http.cpp 1bf1f3b1e6b94f19d82d4b23eed7da7da0b25e5a 
> 
> Diff: https://reviews.apache.org/r/50593/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> haosdent huang
> 
>