Re: Review Request 38342: Add JSON::protobuf for google::protobuf::RepeatedPtrField (stout part)

2015-10-04 Thread Klaus Ma


> On Sept. 29, 2015, 4:17 p.m., Alexander Rukletsov wrote:
> > One high level suggestion.
> > 
> > After looking at our http code, I realized that we use the same pattern 
> > again and again, for example:
> > ```
> > JSON::Array array;
> > array.values.reserve(status.network_infos().size()); // MESOS-2353.
> > foreach (const NetworkInfo& info, status.network_infos()) {
> >   array.values.push_back(model(info));
> > }
> > object.values["network_infos"] = std::move(array);
> > ```
> > We cannot use newly added `JSON::protobuf()` here, because a different way 
> > for rendering JSON from protobuf is used. Without digging deep inside, I 
> > know three ways how we create a `JSON` out of a proto in our codebase:
> > - wrap in `JSON::Protobuf()` for individual messages;
> > - wrap in one of the `model()` family functions;
> > - pass as it is for built-in types.
> > 
> > The proposed conversion function covers one of the possible ways. How about 
> > add one more convertion? Something like:
> > ```
> > template 
> > Array protobuf(const google::protobuf::RepeatedPtrField& repeated,
> > const lambda::function(const T&)>& converter)
> > {
> >   static_assert(std::is_convertible::value,
> > "T must be a google::protobuf::Message");
> >   JSON::Array array;
> >   array.values.reserve(repeated.size());
> >   foreach (const T& elem, repeated) {
> > array.values.push_back(converter(elem));
> >   }
> >   
> >   return array;
> > }
> > ```
> > 
> > Then the snippet above could be rewritten as:
> > ```
> > object.values["network_infos"] = 
> > std::move(JSON::protobuf(status.network_infos(), [](const NetworkInfo& 
> > info) { return model(info); });
> > ```
> > 
> > A further improvement would be to accept any iterable collection, not only 
> > `RepeatedPtrField<>`, for example `hashset`.
> > 
> > What do you think?
> 
> Klaus Ma wrote:
> Awesome! I've also try similar proposal, but failed when `function` 
> converting with `template`; your suggestion using lambda is great!
> For the `hashset`, I'd suggest to address it when we have such case in 
> our code :).
> 
> I'll also address your comments above.
> 
> Alexander Rukletsov wrote:
> We do have such cases in our codebase ; ). Here are a few as an example:
> - https://github.com/apache/mesos/blob/master/src/master/http.cpp#L217
> - https://github.com/apache/mesos/blob/master/src/master/http.cpp#L229
> 
> Michael Park wrote:
> I like the idea of taking a projection function as an argument, but let's 
> do it as a separate ticket to keep the scope of this review narrow.
> 
> Klaus Ma wrote:
> I'll log a new ticket to trace projection fuction part.

MESOS-3580 is logged to trace this requirement, @alex-mesos, would you shepherd 
it?


- Klaus


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


On Oct. 4, 2015, 11:29 a.m., Klaus Ma wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38342/
> ---
> 
> (Updated Oct. 4, 2015, 11:29 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Michael Park, and Jan Schlicht.
> 
> 
> Bugs: MESOS-3405
> https://issues.apache.org/jira/browse/MESOS-3405
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Currently, `stout/protobuf.hpp` provides a `JSON::Protobuf` utility which 
> converts a `google::protobuf::Message` into a `JSON::Object`.
> We should add the support for `google::protobuf::RepeatedPtrField` by 
> introducing overloaded functions.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp 2285ce9 
>   3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.cpp 68328a2 
>   3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.pb.h 8ebb798 
>   3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.pb.cc 34eb6d0 
>   3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.proto 920f5c9 
> 
> Diff: https://reviews.apache.org/r/38342/diff/
> 
> 
> Testing
> ---
> 
> cd 3rdparty/libprocess/3rdparty/stout
> ./boostrap
> ./configure
> make
> 
> 
> Thanks,
> 
> Klaus Ma
> 
>



Re: Review Request 38900: Update command executor to support rootfs.

2015-10-04 Thread Mesos ReviewBot

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


Patch looks great!

Reviews applied: [38900]

All tests passed.

- Mesos ReviewBot


On Oct. 4, 2015, 5:35 a.m., Timothy Chen wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38900/
> ---
> 
> (Updated Oct. 4, 2015, 5:35 a.m.)
> 
> 
> Review request for mesos, Jie Yu and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-3428
> https://issues.apache.org/jira/browse/MESOS-3428
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Update command executor to support rootfs.
> 
> 
> Diffs
> -
> 
>   src/launcher/executor.cpp 50b3c6e319f4b1e08c8ebcdd9f161e19bb14d390 
>   src/slave/constants.hpp df18676f17f2277e3c38432b76f16c5f9cb08341 
>   src/slave/constants.cpp cf3ee7bbc252364a1b73731feab6a9da68ee1f55 
>   src/slave/containerizer/mesos/containerizer.hpp 
> 4c1419290645ad4c44360a81618a6cea7ad190df 
>   src/slave/containerizer/mesos/containerizer.cpp 
> b904b2d88e9b62fa4ba312c4569a4d89b0dc6052 
>   src/slave/slave.cpp d1c9977feeb30ad43586a4560eed155865d27a6c 
> 
> Diff: https://reviews.apache.org/r/38900/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Timothy Chen
> 
>



Re: Review Request 38532: Add error message when cgroup don't support memory.pressure_level.

2015-10-04 Thread Guangya Liu

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



src/tests/containerizer/cgroups_tests.cpp (line 1054)


Does the blank space is needed?


- Guangya Liu


On 十月 3, 2015, 4 p.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38532/
> ---
> 
> (Updated 十月 3, 2015, 4 p.m.)
> 
> 
> Review request for mesos, Jie Yu, Joris Van Remoortere, and Michael Park.
> 
> 
> Bugs: MESOS-3473
> https://issues.apache.org/jira/browse/MESOS-3473
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add error message when cgroup don't support memory.pressure_level.
> 
> 
> Diffs
> -
> 
>   src/tests/containerizer/cgroups_tests.cpp 
> 75a3bc0009c037dc18ce319db2eb44630f083e8c 
> 
> Diff: https://reviews.apache.org/r/38532/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 37023: Add an endpoint that exposes component flags.

2015-10-04 Thread Mesos ReviewBot

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


Patch looks great!

Reviews applied: [37023]

All tests passed.

- Mesos ReviewBot


On Oct. 4, 2015, 6:27 a.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37023/
> ---
> 
> (Updated Oct. 4, 2015, 6:27 a.m.)
> 
> 
> Review request for mesos and Ben Mahler.
> 
> 
> Bugs: MESOS-3104
> https://issues.apache.org/jira/browse/MESOS-3104
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add an endpoint that exposes component flags.
> 
> 
> Diffs
> -
> 
>   src/master/http.cpp 4b9f9ed005a4af2897171659d15168955cc60660 
>   src/master/master.hpp 4bb65f0b6b77ea7324b0dee943602cfdb0f6a11c 
>   src/master/master.cpp 6bee4f351c3fd0fb72f64bbc863968e4786b318b 
>   src/slave/http.cpp f9cf7bbe81b7fe9637de9a8d66329c16a7e1a89b 
>   src/slave/slave.hpp 18be4f8188ad34ef4d0aa4b5eba241053d071476 
>   src/slave/slave.cpp d1c9977feeb30ad43586a4560eed155865d27a6c 
> 
> Diff: https://reviews.apache.org/r/37023/diff/
> 
> 
> Testing
> ---
> 
> manual test wich mesos-local.
> ```
> $ curl http://localhost:5050/master/flags 2>/dev/null|jq .
> {
>   "flags": {
> "allocation_interval": "1secs",
> "allocator": "HierarchicalDRF",
> "authenticate": "false",
> "authenticate_slaves": "false",
> "authenticators": "crammd5",
> "framework_sorter": "drf",
> "help": "true",
> "initialize_driver_logging": "true",
> "log_auto_initialize": "true",
> "logbufsecs": "0",
> "logging_level": "INFO",
> "max_slave_ping_timeouts": "5",
> "quiet": "false",
> "recovery_slave_removal_limit": "100%",
> "registry": "replicated_log",
> "registry_fetch_timeout": "1mins",
> "registry_store_timeout": "5secs",
> "registry_strict": "false",
> "root_submissions": "true",
> "slave_ping_timeout": "15secs",
> "slave_reregister_timeout": "10mins",
> "user_sorter": "drf",
> "version": "false",
> "webui_dir": "/home/haosdent/mesos/build/../src/webui",
> "work_dir": "/tmp/mesos",
> "zk_session_timeout": "10secs"
>   }
> }
> ```
> 
> ```
> $ curl http://localhost:5050/slave(1)/flags 2>/dev/null|jq .
> {
>   "flags": {
> "authenticatee": "crammd5",
> "cgroups_cpu_enable_pids_and_tids_count": "false",
> "cgroups_enable_cfs": "false",
> "cgroups_hierarchy": "/sys/fs/cgroup",
> "cgroups_limit_swap": "false",
> "cgroups_root": "mesos",
> "container_disk_watch_interval": "15secs",
> "containerizers": "mesos",
> "default_role": "*",
> "disk_watch_interval": "1mins",
> "docker": "docker",
> "docker_kill_orphans": "true",
> "docker_remove_delay": "6hrs",
> "docker_socket": "/var/run/docker.sock",
> "docker_stop_timeout": "0ns",
> "enforce_container_disk_quota": "false",
> "executor_registration_timeout": "1mins",
> "executor_shutdown_grace_period": "5secs",
> "fetcher_cache_dir": "/tmp/mesos/fetch",
> "fetcher_cache_size": "2GB",
> "frameworks_home": "",
> "gc_delay": "1weeks",
> "gc_disk_headroom": "0.1",
> "hadoop_home": "",
> "help": "false",
> "initialize_driver_logging": "true",
> "isolation": "posix/cpu,posix/mem",
> "launcher_dir": "/home/haosdent/mesos/build/src",
> "logbufsecs": "0",
> "logging_level": "INFO",
> "oversubscribed_resources_interval": "15secs",
> "perf_duration": "10secs",
> "perf_interval": "1mins",
> "qos_correction_interval_min": "0ns",
> "quiet": "false",
> "recover": "reconnect",
> "recovery_timeout": "15mins",
> "registration_backoff_factor": "1secs",
> "resource_monitoring_interval": "1secs",
> "revocable_cpu_low_priority": "true",
> "sandbox_directory": "/mnt/mesos/sandbox",
> "strict": "true",
> "switch_user": "true",
> "version": "false",
> "work_dir": "/tmp/mesos/0"
>   }
> }
> ```
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Review Request 38978: Add post-rewrite hook.

2015-10-04 Thread haosdent huang

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

Review request for mesos and Joris Van Remoortere.


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


Repository: mesos


Description
---

Add post-rewrite hook.


Diffs
-

  bootstrap 779b33cdcb88b2417769bb046a17b47cd6042f2d 
  support/hooks/post-rewrite PRE-CREATION 

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


Testing
---

test manually


Thanks,

haosdent huang



Re: Review Request 38532: Add error message when cgroup don't support memory.pressure_level.

2015-10-04 Thread Mesos ReviewBot

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


Patch looks great!

Reviews applied: [38532]

All tests passed.

- Mesos ReviewBot


On Oct. 4, 2015, 6:59 a.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38532/
> ---
> 
> (Updated Oct. 4, 2015, 6:59 a.m.)
> 
> 
> Review request for mesos, Jie Yu, Joris Van Remoortere, and Michael Park.
> 
> 
> Bugs: MESOS-3473
> https://issues.apache.org/jira/browse/MESOS-3473
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add error message when cgroup don't support memory.pressure_level.
> 
> 
> Diffs
> -
> 
>   src/tests/containerizer/cgroups_tests.cpp 
> 75a3bc0009c037dc18ce319db2eb44630f083e8c 
> 
> Diff: https://reviews.apache.org/r/38532/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Review Request 38979: TestContainerizer should not modify global environment variables.

2015-10-04 Thread haosdent huang

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

Review request for mesos and Joris Van Remoortere.


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


Repository: mesos


Description
---

TestContainerizer should not modify global environment variables.


Diffs
-

  src/tests/containerizer.cpp 1f743155526192569dd61a47ab67d8e58aab205a 

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


Testing
---


Thanks,

haosdent huang



Re: Review Request 36181: Port CFS support to Docker Containerizer

2015-10-04 Thread Mesos ReviewBot

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


Patch looks great!

Reviews applied: [36181]

All tests passed.

- Mesos ReviewBot


On Oct. 4, 2015, 6:40 a.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36181/
> ---
> 
> (Updated Oct. 4, 2015, 6:40 a.m.)
> 
> 
> Review request for mesos and Timothy Chen.
> 
> 
> Bugs: MESOS-2154
> https://issues.apache.org/jira/browse/MESOS-2154
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Port CFS support to Docker Containerizer
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/docker.cpp 6c975f904178e01797b67628a2d471ec7b3b1fbf 
> 
> Diff: https://reviews.apache.org/r/36181/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 37024: Exposes mesos version information in components.

2015-10-04 Thread haosdent huang

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

(Updated Oct. 4, 2015, 1:07 p.m.)


Review request for mesos and Ben Mahler.


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


Repository: mesos


Description
---

Add an endpoint that exposes component version.


Diffs
-

  include/mesos/executor.hpp 72eca97dd84fb1300b37764a3ef3a57fb5e676c2 
  include/mesos/scheduler.hpp ee198b6955882f4f31466ca05429ca16fbf2f5cd 
  src/Makefile.am 457ad26ee55bd7a2aedf27f45db58a9a4a6a5dc5 
  src/exec/exec.cpp 31e0c2f17a9092d18285828111d27628fb07bc02 
  src/local/local.cpp 4d98bf23705027f3ba0cbb571289f21b288fe7db 
  src/master/main.cpp bafc605d6c20bd264b932e44ee80373a3f692734 
  src/sched/sched.cpp 012af0508eeceeccd168b29f36fa258d20b28c21 
  src/slave/main.cpp 364dc7fc7ab2e3cef01aea7267dafa014b60e2b9 
  src/version/version_info.hpp PRE-CREATION 
  src/version/version_info.cpp PRE-CREATION 

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


Testing
---

Manual test result:

```
$ curl http://localhost:5050/version 2>/dev/null|jq .

{
  "version": "0.24.0",
  "build_user": "haosdent",
  "build_time": 1439702338,
  "build_date": "2015-08-16 13:18:58"
}
```


Thanks,

haosdent huang



Re: Review Request 37024: Exposes mesos version information in components.

2015-10-04 Thread haosdent huang

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

(Updated Oct. 4, 2015, 1:07 p.m.)


Review request for mesos and Ben Mahler.


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


Repository: mesos


Description
---

Add an endpoint that exposes component version.


Diffs
-

  include/mesos/executor.hpp 72eca97dd84fb1300b37764a3ef3a57fb5e676c2 
  include/mesos/scheduler.hpp ee198b6955882f4f31466ca05429ca16fbf2f5cd 
  src/Makefile.am 457ad26ee55bd7a2aedf27f45db58a9a4a6a5dc5 
  src/exec/exec.cpp 31e0c2f17a9092d18285828111d27628fb07bc02 
  src/local/local.cpp 4d98bf23705027f3ba0cbb571289f21b288fe7db 
  src/master/main.cpp bafc605d6c20bd264b932e44ee80373a3f692734 
  src/sched/sched.cpp 012af0508eeceeccd168b29f36fa258d20b28c21 
  src/slave/main.cpp 364dc7fc7ab2e3cef01aea7267dafa014b60e2b9 
  src/version/version_info.hpp PRE-CREATION 
  src/version/version_info.cpp PRE-CREATION 

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


Testing
---

Manual test result:

```
$ curl http://localhost:5050/version 2>/dev/null|jq .

{
  "version": "0.24.0",
  "build_user": "haosdent",
  "build_time": 1439702338,
  "build_date": "2015-08-16 13:18:58"
}
```


Thanks,

haosdent huang



Re: Review Request 38978: Add post-rewrite hook.

2015-10-04 Thread Mesos ReviewBot

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


Patch looks great!

Reviews applied: [38978]

All tests passed.

- Mesos ReviewBot


On Oct. 4, 2015, 8:08 a.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38978/
> ---
> 
> (Updated Oct. 4, 2015, 8:08 a.m.)
> 
> 
> Review request for mesos and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-2953
> https://issues.apache.org/jira/browse/MESOS-2953
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add post-rewrite hook.
> 
> 
> Diffs
> -
> 
>   bootstrap 779b33cdcb88b2417769bb046a17b47cd6042f2d 
>   support/hooks/post-rewrite PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/38978/diff/
> 
> 
> Testing
> ---
> 
> test manually
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 38342: Add JSON::protobuf for google::protobuf::RepeatedPtrField (stout part)

2015-10-04 Thread Klaus Ma


> On Sept. 29, 2015, 10:43 a.m., Alexander Rukletsov wrote:
> > 3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.cpp, line 166
> > 
> >
> > See my comment above. I think you should not repeat testing conversion 
> > for all the fields, just a simple message with repeated field.

Replaced with SimpleMessage.


- Klaus


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


On Oct. 4, 2015, 11:29 a.m., Klaus Ma wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38342/
> ---
> 
> (Updated Oct. 4, 2015, 11:29 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Michael Park, and Jan Schlicht.
> 
> 
> Bugs: MESOS-3405
> https://issues.apache.org/jira/browse/MESOS-3405
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Currently, `stout/protobuf.hpp` provides a `JSON::Protobuf` utility which 
> converts a `google::protobuf::Message` into a `JSON::Object`.
> We should add the support for `google::protobuf::RepeatedPtrField` by 
> introducing overloaded functions.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp 2285ce9 
>   3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.cpp 68328a2 
>   3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.pb.h 8ebb798 
>   3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.pb.cc 34eb6d0 
>   3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.proto 920f5c9 
> 
> Diff: https://reviews.apache.org/r/38342/diff/
> 
> 
> Testing
> ---
> 
> cd 3rdparty/libprocess/3rdparty/stout
> ./boostrap
> ./configure
> make
> 
> 
> Thanks,
> 
> Klaus Ma
> 
>



Re: Review Request 38342: Add JSON::protobuf for google::protobuf::RepeatedPtrField (stout part)

2015-10-04 Thread Klaus Ma


> On Sept. 29, 2015, 4:17 p.m., Alexander Rukletsov wrote:
> > One high level suggestion.
> > 
> > After looking at our http code, I realized that we use the same pattern 
> > again and again, for example:
> > ```
> > JSON::Array array;
> > array.values.reserve(status.network_infos().size()); // MESOS-2353.
> > foreach (const NetworkInfo& info, status.network_infos()) {
> >   array.values.push_back(model(info));
> > }
> > object.values["network_infos"] = std::move(array);
> > ```
> > We cannot use newly added `JSON::protobuf()` here, because a different way 
> > for rendering JSON from protobuf is used. Without digging deep inside, I 
> > know three ways how we create a `JSON` out of a proto in our codebase:
> > - wrap in `JSON::Protobuf()` for individual messages;
> > - wrap in one of the `model()` family functions;
> > - pass as it is for built-in types.
> > 
> > The proposed conversion function covers one of the possible ways. How about 
> > add one more convertion? Something like:
> > ```
> > template 
> > Array protobuf(const google::protobuf::RepeatedPtrField& repeated,
> > const lambda::function(const T&)>& converter)
> > {
> >   static_assert(std::is_convertible::value,
> > "T must be a google::protobuf::Message");
> >   JSON::Array array;
> >   array.values.reserve(repeated.size());
> >   foreach (const T& elem, repeated) {
> > array.values.push_back(converter(elem));
> >   }
> >   
> >   return array;
> > }
> > ```
> > 
> > Then the snippet above could be rewritten as:
> > ```
> > object.values["network_infos"] = 
> > std::move(JSON::protobuf(status.network_infos(), [](const NetworkInfo& 
> > info) { return model(info); });
> > ```
> > 
> > A further improvement would be to accept any iterable collection, not only 
> > `RepeatedPtrField<>`, for example `hashset`.
> > 
> > What do you think?
> 
> Klaus Ma wrote:
> Awesome! I've also try similar proposal, but failed when `function` 
> converting with `template`; your suggestion using lambda is great!
> For the `hashset`, I'd suggest to address it when we have such case in 
> our code :).
> 
> I'll also address your comments above.
> 
> Alexander Rukletsov wrote:
> We do have such cases in our codebase ; ). Here are a few as an example:
> - https://github.com/apache/mesos/blob/master/src/master/http.cpp#L217
> - https://github.com/apache/mesos/blob/master/src/master/http.cpp#L229
> 
> Michael Park wrote:
> I like the idea of taking a projection function as an argument, but let's 
> do it as a separate ticket to keep the scope of this review narrow.

I'll log a new ticket to trace projection fuction part.


- Klaus


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


On Oct. 4, 2015, 11:29 a.m., Klaus Ma wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38342/
> ---
> 
> (Updated Oct. 4, 2015, 11:29 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Michael Park, and Jan Schlicht.
> 
> 
> Bugs: MESOS-3405
> https://issues.apache.org/jira/browse/MESOS-3405
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Currently, `stout/protobuf.hpp` provides a `JSON::Protobuf` utility which 
> converts a `google::protobuf::Message` into a `JSON::Object`.
> We should add the support for `google::protobuf::RepeatedPtrField` by 
> introducing overloaded functions.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp 2285ce9 
>   3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.cpp 68328a2 
>   3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.pb.h 8ebb798 
>   3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.pb.cc 34eb6d0 
>   3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.proto 920f5c9 
> 
> Diff: https://reviews.apache.org/r/38342/diff/
> 
> 
> Testing
> ---
> 
> cd 3rdparty/libprocess/3rdparty/stout
> ./boostrap
> ./configure
> make
> 
> 
> Thanks,
> 
> Klaus Ma
> 
>



Re: Review Request 38342: Add JSON::protobuf for google::protobuf::RepeatedPtrField (stout part)

2015-10-04 Thread Klaus Ma

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

(Updated Oct. 4, 2015, 11:29 a.m.)


Review request for mesos, Alexander Rukletsov, Michael Park, and Jan Schlicht.


Changes
---

Address the comments


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


Repository: mesos


Description
---

Currently, `stout/protobuf.hpp` provides a `JSON::Protobuf` utility which 
converts a `google::protobuf::Message` into a `JSON::Object`.
We should add the support for `google::protobuf::RepeatedPtrField` by 
introducing overloaded functions.


Diffs (updated)
-

  3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp 2285ce9 
  3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.cpp 68328a2 
  3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.pb.h 8ebb798 
  3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.pb.cc 34eb6d0 
  3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.proto 920f5c9 

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


Testing
---

cd 3rdparty/libprocess/3rdparty/stout
./boostrap
./configure
make


Thanks,

Klaus Ma



Re: Review Request 38532: Add error message when cgroup don't support memory.pressure_level.

2015-10-04 Thread haosdent huang

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

(Updated Oct. 4, 2015, 6:59 a.m.)


Review request for mesos, Jie Yu, Joris Van Remoortere, and Michael Park.


Changes
---

Update according @gyliu reviews.


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


Repository: mesos


Description
---

Add error message when cgroup don't support memory.pressure_level.


Diffs (updated)
-

  src/tests/containerizer/cgroups_tests.cpp 
75a3bc0009c037dc18ce319db2eb44630f083e8c 

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


Testing
---


Thanks,

haosdent huang



Re: Review Request 38961: Simplified resources initialization.

2015-10-04 Thread Guangya Liu

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

Ship it!


Ship It!

- Guangya Liu


On 十月 2, 2015, 5:10 p.m., Alexander Rukletsov wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38961/
> ---
> 
> (Updated 十月 2, 2015, 5:10 p.m.)
> 
> 
> Review request for mesos and Bernd Mathiske.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Simplified resources initialization.
> 
> 
> Diffs
> -
> 
>   src/tests/fetcher_cache_tests.cpp 31ca14621962f8851920b733ba0dec9f1afe8e79 
> 
> Diff: https://reviews.apache.org/r/38961/diff/
> 
> 
> Testing
> ---
> 
> make check (Mac OS X 10.10.4)
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>



Re: Review Request 37023: Add an endpoint that exposes component flags.

2015-10-04 Thread haosdent huang

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

(Updated Oct. 4, 2015, 6:26 a.m.)


Review request for mesos and Ben Mahler.


Changes
---

Fix failed compile


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


Repository: mesos


Description
---

Add an endpoint that exposes component flags.


Diffs (updated)
-

  src/master/http.cpp 4b9f9ed005a4af2897171659d15168955cc60660 
  src/master/master.hpp 4bb65f0b6b77ea7324b0dee943602cfdb0f6a11c 
  src/master/master.cpp 6bee4f351c3fd0fb72f64bbc863968e4786b318b 
  src/slave/http.cpp f9cf7bbe81b7fe9637de9a8d66329c16a7e1a89b 
  src/slave/slave.hpp 18be4f8188ad34ef4d0aa4b5eba241053d071476 
  src/slave/slave.cpp d1c9977feeb30ad43586a4560eed155865d27a6c 

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


Testing (updated)
---

manual test wich mesos-local.
```
$ curl http://localhost:5050/master/flags 2>/dev/null|jq .
{
  "flags": {
"allocation_interval": "1secs",
"allocator": "HierarchicalDRF",
"authenticate": "false",
"authenticate_slaves": "false",
"authenticators": "crammd5",
"framework_sorter": "drf",
"help": "true",
"initialize_driver_logging": "true",
"log_auto_initialize": "true",
"logbufsecs": "0",
"logging_level": "INFO",
"max_slave_ping_timeouts": "5",
"quiet": "false",
"recovery_slave_removal_limit": "100%",
"registry": "replicated_log",
"registry_fetch_timeout": "1mins",
"registry_store_timeout": "5secs",
"registry_strict": "false",
"root_submissions": "true",
"slave_ping_timeout": "15secs",
"slave_reregister_timeout": "10mins",
"user_sorter": "drf",
"version": "false",
"webui_dir": "/home/haosdent/mesos/build/../src/webui",
"work_dir": "/tmp/mesos",
"zk_session_timeout": "10secs"
  }
}
```

```
$ curl http://localhost:5050/slave(1)/flags.json 2>/dev/null|jq .
{
  "flags": {
"authenticatee": "crammd5",
"cgroups_cpu_enable_pids_and_tids_count": "false",
"cgroups_enable_cfs": "false",
"cgroups_hierarchy": "/sys/fs/cgroup",
"cgroups_limit_swap": "false",
"cgroups_root": "mesos",
"container_disk_watch_interval": "15secs",
"containerizers": "mesos",
"default_role": "*",
"disk_watch_interval": "1mins",
"docker": "docker",
"docker_kill_orphans": "true",
"docker_remove_delay": "6hrs",
"docker_socket": "/var/run/docker.sock",
"docker_stop_timeout": "0ns",
"enforce_container_disk_quota": "false",
"executor_registration_timeout": "1mins",
"executor_shutdown_grace_period": "5secs",
"fetcher_cache_dir": "/tmp/mesos/fetch",
"fetcher_cache_size": "2GB",
"frameworks_home": "",
"gc_delay": "1weeks",
"gc_disk_headroom": "0.1",
"hadoop_home": "",
"help": "false",
"initialize_driver_logging": "true",
"isolation": "posix/cpu,posix/mem",
"launcher_dir": "/home/haosdent/mesos/build/src",
"logbufsecs": "0",
"logging_level": "INFO",
"oversubscribed_resources_interval": "15secs",
"perf_duration": "10secs",
"perf_interval": "1mins",
"qos_correction_interval_min": "0ns",
"quiet": "false",
"recover": "reconnect",
"recovery_timeout": "15mins",
"registration_backoff_factor": "1secs",
"resource_monitoring_interval": "1secs",
"revocable_cpu_low_priority": "true",
"sandbox_directory": "/mnt/mesos/sandbox",
"strict": "true",
"switch_user": "true",
"version": "false",
"work_dir": "/tmp/mesos/0"
  }
}
```


Thanks,

haosdent huang



Re: Review Request 37023: Add an endpoint that exposes component flags.

2015-10-04 Thread haosdent huang

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

(Updated Oct. 4, 2015, 6:27 a.m.)


Review request for mesos and Ben Mahler.


Changes
---

Update test


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


Repository: mesos


Description
---

Add an endpoint that exposes component flags.


Diffs
-

  src/master/http.cpp 4b9f9ed005a4af2897171659d15168955cc60660 
  src/master/master.hpp 4bb65f0b6b77ea7324b0dee943602cfdb0f6a11c 
  src/master/master.cpp 6bee4f351c3fd0fb72f64bbc863968e4786b318b 
  src/slave/http.cpp f9cf7bbe81b7fe9637de9a8d66329c16a7e1a89b 
  src/slave/slave.hpp 18be4f8188ad34ef4d0aa4b5eba241053d071476 
  src/slave/slave.cpp d1c9977feeb30ad43586a4560eed155865d27a6c 

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


Testing (updated)
---

manual test wich mesos-local.
```
$ curl http://localhost:5050/master/flags 2>/dev/null|jq .
{
  "flags": {
"allocation_interval": "1secs",
"allocator": "HierarchicalDRF",
"authenticate": "false",
"authenticate_slaves": "false",
"authenticators": "crammd5",
"framework_sorter": "drf",
"help": "true",
"initialize_driver_logging": "true",
"log_auto_initialize": "true",
"logbufsecs": "0",
"logging_level": "INFO",
"max_slave_ping_timeouts": "5",
"quiet": "false",
"recovery_slave_removal_limit": "100%",
"registry": "replicated_log",
"registry_fetch_timeout": "1mins",
"registry_store_timeout": "5secs",
"registry_strict": "false",
"root_submissions": "true",
"slave_ping_timeout": "15secs",
"slave_reregister_timeout": "10mins",
"user_sorter": "drf",
"version": "false",
"webui_dir": "/home/haosdent/mesos/build/../src/webui",
"work_dir": "/tmp/mesos",
"zk_session_timeout": "10secs"
  }
}
```

```
$ curl http://localhost:5050/slave(1)/flags 2>/dev/null|jq .
{
  "flags": {
"authenticatee": "crammd5",
"cgroups_cpu_enable_pids_and_tids_count": "false",
"cgroups_enable_cfs": "false",
"cgroups_hierarchy": "/sys/fs/cgroup",
"cgroups_limit_swap": "false",
"cgroups_root": "mesos",
"container_disk_watch_interval": "15secs",
"containerizers": "mesos",
"default_role": "*",
"disk_watch_interval": "1mins",
"docker": "docker",
"docker_kill_orphans": "true",
"docker_remove_delay": "6hrs",
"docker_socket": "/var/run/docker.sock",
"docker_stop_timeout": "0ns",
"enforce_container_disk_quota": "false",
"executor_registration_timeout": "1mins",
"executor_shutdown_grace_period": "5secs",
"fetcher_cache_dir": "/tmp/mesos/fetch",
"fetcher_cache_size": "2GB",
"frameworks_home": "",
"gc_delay": "1weeks",
"gc_disk_headroom": "0.1",
"hadoop_home": "",
"help": "false",
"initialize_driver_logging": "true",
"isolation": "posix/cpu,posix/mem",
"launcher_dir": "/home/haosdent/mesos/build/src",
"logbufsecs": "0",
"logging_level": "INFO",
"oversubscribed_resources_interval": "15secs",
"perf_duration": "10secs",
"perf_interval": "1mins",
"qos_correction_interval_min": "0ns",
"quiet": "false",
"recover": "reconnect",
"recovery_timeout": "15mins",
"registration_backoff_factor": "1secs",
"resource_monitoring_interval": "1secs",
"revocable_cpu_low_priority": "true",
"sandbox_directory": "/mnt/mesos/sandbox",
"strict": "true",
"switch_user": "true",
"version": "false",
"work_dir": "/tmp/mesos/0"
  }
}
```


Thanks,

haosdent huang



Re: Review Request 37023: Add an endpoint that exposes component flags.

2015-10-04 Thread Guangya Liu

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

Ship it!


Ship It!

- Guangya Liu


On 十月 4, 2015, 6:27 a.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37023/
> ---
> 
> (Updated 十月 4, 2015, 6:27 a.m.)
> 
> 
> Review request for mesos and Ben Mahler.
> 
> 
> Bugs: MESOS-3104
> https://issues.apache.org/jira/browse/MESOS-3104
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add an endpoint that exposes component flags.
> 
> 
> Diffs
> -
> 
>   src/master/http.cpp 4b9f9ed005a4af2897171659d15168955cc60660 
>   src/master/master.hpp 4bb65f0b6b77ea7324b0dee943602cfdb0f6a11c 
>   src/master/master.cpp 6bee4f351c3fd0fb72f64bbc863968e4786b318b 
>   src/slave/http.cpp f9cf7bbe81b7fe9637de9a8d66329c16a7e1a89b 
>   src/slave/slave.hpp 18be4f8188ad34ef4d0aa4b5eba241053d071476 
>   src/slave/slave.cpp d1c9977feeb30ad43586a4560eed155865d27a6c 
> 
> Diff: https://reviews.apache.org/r/37023/diff/
> 
> 
> Testing
> ---
> 
> manual test wich mesos-local.
> ```
> $ curl http://localhost:5050/master/flags 2>/dev/null|jq .
> {
>   "flags": {
> "allocation_interval": "1secs",
> "allocator": "HierarchicalDRF",
> "authenticate": "false",
> "authenticate_slaves": "false",
> "authenticators": "crammd5",
> "framework_sorter": "drf",
> "help": "true",
> "initialize_driver_logging": "true",
> "log_auto_initialize": "true",
> "logbufsecs": "0",
> "logging_level": "INFO",
> "max_slave_ping_timeouts": "5",
> "quiet": "false",
> "recovery_slave_removal_limit": "100%",
> "registry": "replicated_log",
> "registry_fetch_timeout": "1mins",
> "registry_store_timeout": "5secs",
> "registry_strict": "false",
> "root_submissions": "true",
> "slave_ping_timeout": "15secs",
> "slave_reregister_timeout": "10mins",
> "user_sorter": "drf",
> "version": "false",
> "webui_dir": "/home/haosdent/mesos/build/../src/webui",
> "work_dir": "/tmp/mesos",
> "zk_session_timeout": "10secs"
>   }
> }
> ```
> 
> ```
> $ curl http://localhost:5050/slave(1)/flags 2>/dev/null|jq .
> {
>   "flags": {
> "authenticatee": "crammd5",
> "cgroups_cpu_enable_pids_and_tids_count": "false",
> "cgroups_enable_cfs": "false",
> "cgroups_hierarchy": "/sys/fs/cgroup",
> "cgroups_limit_swap": "false",
> "cgroups_root": "mesos",
> "container_disk_watch_interval": "15secs",
> "containerizers": "mesos",
> "default_role": "*",
> "disk_watch_interval": "1mins",
> "docker": "docker",
> "docker_kill_orphans": "true",
> "docker_remove_delay": "6hrs",
> "docker_socket": "/var/run/docker.sock",
> "docker_stop_timeout": "0ns",
> "enforce_container_disk_quota": "false",
> "executor_registration_timeout": "1mins",
> "executor_shutdown_grace_period": "5secs",
> "fetcher_cache_dir": "/tmp/mesos/fetch",
> "fetcher_cache_size": "2GB",
> "frameworks_home": "",
> "gc_delay": "1weeks",
> "gc_disk_headroom": "0.1",
> "hadoop_home": "",
> "help": "false",
> "initialize_driver_logging": "true",
> "isolation": "posix/cpu,posix/mem",
> "launcher_dir": "/home/haosdent/mesos/build/src",
> "logbufsecs": "0",
> "logging_level": "INFO",
> "oversubscribed_resources_interval": "15secs",
> "perf_duration": "10secs",
> "perf_interval": "1mins",
> "qos_correction_interval_min": "0ns",
> "quiet": "false",
> "recover": "reconnect",
> "recovery_timeout": "15mins",
> "registration_backoff_factor": "1secs",
> "resource_monitoring_interval": "1secs",
> "revocable_cpu_low_priority": "true",
> "sandbox_directory": "/mnt/mesos/sandbox",
> "strict": "true",
> "switch_user": "true",
> "version": "false",
> "work_dir": "/tmp/mesos/0"
>   }
> }
> ```
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 36181: Port CFS support to Docker Containerizer

2015-10-04 Thread haosdent huang

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

(Updated Oct. 4, 2015, 6:40 a.m.)


Review request for mesos and Timothy Chen.


Changes
---

Fix compile error.


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


Repository: mesos


Description
---

Port CFS support to Docker Containerizer


Diffs (updated)
-

  src/slave/containerizer/docker.cpp 6c975f904178e01797b67628a2d471ec7b3b1fbf 

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


Testing
---


Thanks,

haosdent huang



Re: Review Request 38338: Enhanced option for Docker cli volume plugin.

2015-10-04 Thread haosdent huang


> On Oct. 4, 2015, 2:09 a.m., Guangya Liu wrote:
> > src/docker/docker.cpp, line 463
> > 
> >
> > Is it possible to add a unit test for this change?

Because it depends on install and configure flocker in host, I not idea how to 
add a unit test when host don't have flocker. Do you have some ideas how to 
test this?


- haosdent


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


On Oct. 3, 2015, 3:55 p.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38338/
> ---
> 
> (Updated Oct. 3, 2015, 3:55 p.m.)
> 
> 
> Review request for mesos and Timothy Chen.
> 
> 
> Bugs: MESOS-3392
> https://issues.apache.org/jira/browse/MESOS-3392
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Enhanced option for Docker cli volume plugin.
> 
> 
> Diffs
> -
> 
>   include/mesos/mesos.proto 4a16be1f570769f3ce42a50a9da9f4fb1c227999 
>   src/docker/docker.cpp afcedf1f1a309bd0626c33ee25694ac1b43bdec7 
> 
> Diff: https://reviews.apache.org/r/38338/diff/
> 
> 
> Testing
> ---
> 
> # When use volume-driver
> ```
> I1003 23:49:41.986047 11268 docker.cpp:571] Running docker -H 
> unix:///var/run/docker.sock run -e MESOS_SANDBOX=/mnt/mesos/sandbox -e 
> MESOS_CONTAINER_NAME=mesos-docker-test -v src:target:rw -v 
> /tmp/DockerTest_ROOT_DOCKER_volume_driver_D3Fxye:/mnt/mesos/sandbox 
> --volume-driver=flocker --net host --entrypoint /bin/sh --name 
> mesos-docker-test busybox -c sleep 120
> ```
> Could see `-v src:target`
> 
> # When don't use volume-driver
> ```
> 1003 23:53:48.028715 12125 docker.cpp:571] Running docker -H 
> unix:///var/run/docker.sock run -e MESOS_SANDBOX=/mnt/mesos/sandbox -e 
> MESOS_CONTAINER_NAME=mesos-docker-test -v 
> /tmp/DockerTest_ROOT_DOCKER_volume_driver_jmtVzt/src:target:rw -v 
> /tmp/DockerTest_ROOT_DOCKER_volume_driver_jmtVzt:/mnt/mesos/sandbox --net 
> host --entrypoint /bin/sh --name mesos-docker-test busybox -c sleep 120
> ```
> Could see `-v /tmp/DockerTest_ROOT_DOCKER_volume_driver_jmtVzt/src:target:rw`
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 38338: Enhanced option for Docker cli volume plugin.

2015-10-04 Thread haosdent huang


> On Oct. 4, 2015, 2:09 a.m., Guangya Liu wrote:
> > include/mesos/mesos.proto, line 1443
> > 
> >
> > Does v1 also needs to be updated?

I notice we have some inconsistent between v1 and current proto, so I not sure 
should add or not.


- haosdent


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


On Oct. 3, 2015, 3:55 p.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38338/
> ---
> 
> (Updated Oct. 3, 2015, 3:55 p.m.)
> 
> 
> Review request for mesos and Timothy Chen.
> 
> 
> Bugs: MESOS-3392
> https://issues.apache.org/jira/browse/MESOS-3392
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Enhanced option for Docker cli volume plugin.
> 
> 
> Diffs
> -
> 
>   include/mesos/mesos.proto 4a16be1f570769f3ce42a50a9da9f4fb1c227999 
>   src/docker/docker.cpp afcedf1f1a309bd0626c33ee25694ac1b43bdec7 
> 
> Diff: https://reviews.apache.org/r/38338/diff/
> 
> 
> Testing
> ---
> 
> # When use volume-driver
> ```
> I1003 23:49:41.986047 11268 docker.cpp:571] Running docker -H 
> unix:///var/run/docker.sock run -e MESOS_SANDBOX=/mnt/mesos/sandbox -e 
> MESOS_CONTAINER_NAME=mesos-docker-test -v src:target:rw -v 
> /tmp/DockerTest_ROOT_DOCKER_volume_driver_D3Fxye:/mnt/mesos/sandbox 
> --volume-driver=flocker --net host --entrypoint /bin/sh --name 
> mesos-docker-test busybox -c sleep 120
> ```
> Could see `-v src:target`
> 
> # When don't use volume-driver
> ```
> 1003 23:53:48.028715 12125 docker.cpp:571] Running docker -H 
> unix:///var/run/docker.sock run -e MESOS_SANDBOX=/mnt/mesos/sandbox -e 
> MESOS_CONTAINER_NAME=mesos-docker-test -v 
> /tmp/DockerTest_ROOT_DOCKER_volume_driver_jmtVzt/src:target:rw -v 
> /tmp/DockerTest_ROOT_DOCKER_volume_driver_jmtVzt:/mnt/mesos/sandbox --net 
> host --entrypoint /bin/sh --name mesos-docker-test busybox -c sleep 120
> ```
> Could see `-v /tmp/DockerTest_ROOT_DOCKER_volume_driver_jmtVzt/src:target:rw`
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 38899: Added handler for Executor->Framework message for the Executor HTTP API

2015-10-04 Thread Guangya Liu

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



src/slave/http.cpp (line 316)


I think that the blank line is not needed.


- Guangya Liu


On 九月 30, 2015, 5:02 p.m., Anand Mazumdar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38899/
> ---
> 
> (Updated 九月 30, 2015, 5:02 p.m.)
> 
> 
> Review request for mesos, Isabel Jimenez and Vinod Kone.
> 
> 
> Bugs: MESOS-2296
> https://issues.apache.org/jira/browse/MESOS-2296
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Trivial change to call the `executorMessage(...)` function that already 
> existed in `src/slave/slave.cpp` to handle ExecutorToFrameworkMessage.
> 
> 
> Diffs
> -
> 
>   src/slave/http.cpp f9cf7bbe81b7fe9637de9a8d66329c16a7e1a89b 
> 
> Diff: https://reviews.apache.org/r/38899/diff/
> 
> 
> Testing
> ---
> 
> make check. Would add tests later after the MESOS-3480 review chain gets 
> committed.
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>



Re: Review Request 38960: Add QuotaInfo Protobuf to CMake.

2015-10-04 Thread Guangya Liu

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

Ship it!


Ship It!

- Guangya Liu


On 十月 2, 2015, 4:51 p.m., Joseph Wu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38960/
> ---
> 
> (Updated 十月 2, 2015, 4:51 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Bernd Mathiske, Alex Clemmer, 
> and Till Toenshoff.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> QuotaInfo was introduced here: https://reviews.apache.org/r/36908/
> 
> 
> Diffs
> -
> 
>   src/CMakeLists.txt 891f951f3107ece29b7923b7a3cc414e2ea56983 
> 
> Diff: https://reviews.apache.org/r/38960/diff/
> 
> 
> Testing
> ---
> 
> ```
> cmake .. # (OSX)
> make -j8 | grep quota
> ```
> 
> Confirmed that quota protobuf was built.
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>



Re: Review Request 38705: Added support for applying a review chain (apply-reviews.py).

2015-10-04 Thread Guangya Liu


> On 十月 1, 2015, 1:12 p.m., Guangya Liu wrote:
> > support/apply-reviews.py, line 2
> > 
> >
> > The import should be in alpha order
> 
> Artem Harutyunyan wrote:
> I am happy to fix this, but could you please justify your reasoning?

Please check 
https://github.com/apache/mesos/blob/master/support/post-reviews.py#L25-#L30 

Also I see that most of the import or include are using alpha order in mesos.


- Guangya


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


On 十月 1, 2015, 5:12 p.m., Artem Harutyunyan wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38705/
> ---
> 
> (Updated 十月 1, 2015, 5:12 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Joris Van Remoortere, Joseph Wu, 
> and Vinod Kone.
> 
> 
> Bugs: MESOS-3468
> https://issues.apache.org/jira/browse/MESOS-3468
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> See summary.
> 
> 
> Diffs
> -
> 
>   support/apply-reviews.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/38705/diff/
> 
> 
> Testing
> ---
> 
> Tested the script with python 2.7.
> 
> 
> Thanks,
> 
> Artem Harutyunyan
> 
>



Re: Review Request 38338: Enhanced option for Docker cli volume plugin.

2015-10-04 Thread Guangya Liu


> On 十月 4, 2015, 2:09 a.m., Guangya Liu wrote:
> > src/docker/docker.cpp, line 463
> > 
> >
> > Is it possible to add a unit test for this change?
> 
> haosdent huang wrote:
> Because it depends on install and configure flocker in host, I not idea 
> how to add a unit test when host don't have flocker. Do you have some ideas 
> how to test this?

My original thinking is only code level testing by adding some check to see if 
"--volume-driver" is in dockerInfo, but this does not seems to help much. I 
think it is OK as long as you the feature test passed in your env. ;-)


- Guangya


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


On 十月 3, 2015, 3:55 p.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38338/
> ---
> 
> (Updated 十月 3, 2015, 3:55 p.m.)
> 
> 
> Review request for mesos and Timothy Chen.
> 
> 
> Bugs: MESOS-3392
> https://issues.apache.org/jira/browse/MESOS-3392
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Enhanced option for Docker cli volume plugin.
> 
> 
> Diffs
> -
> 
>   include/mesos/mesos.proto 4a16be1f570769f3ce42a50a9da9f4fb1c227999 
>   src/docker/docker.cpp afcedf1f1a309bd0626c33ee25694ac1b43bdec7 
> 
> Diff: https://reviews.apache.org/r/38338/diff/
> 
> 
> Testing
> ---
> 
> # When use volume-driver
> ```
> I1003 23:49:41.986047 11268 docker.cpp:571] Running docker -H 
> unix:///var/run/docker.sock run -e MESOS_SANDBOX=/mnt/mesos/sandbox -e 
> MESOS_CONTAINER_NAME=mesos-docker-test -v src:target:rw -v 
> /tmp/DockerTest_ROOT_DOCKER_volume_driver_D3Fxye:/mnt/mesos/sandbox 
> --volume-driver=flocker --net host --entrypoint /bin/sh --name 
> mesos-docker-test busybox -c sleep 120
> ```
> Could see `-v src:target`
> 
> # When don't use volume-driver
> ```
> 1003 23:53:48.028715 12125 docker.cpp:571] Running docker -H 
> unix:///var/run/docker.sock run -e MESOS_SANDBOX=/mnt/mesos/sandbox -e 
> MESOS_CONTAINER_NAME=mesos-docker-test -v 
> /tmp/DockerTest_ROOT_DOCKER_volume_driver_jmtVzt/src:target:rw -v 
> /tmp/DockerTest_ROOT_DOCKER_volume_driver_jmtVzt:/mnt/mesos/sandbox --net 
> host --entrypoint /bin/sh --name mesos-docker-test busybox -c sleep 120
> ```
> Could see `-v /tmp/DockerTest_ROOT_DOCKER_volume_driver_jmtVzt/src:target:rw`
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Review Request 38986: Add VersionProcess.

2015-10-04 Thread haosdent huang

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

Review request for mesos and Ben Mahler.


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


Repository: mesos


Description
---

Add VersionProcess.


Diffs
-

  src/version/version.hpp PRE-CREATION 
  src/version/version.cpp PRE-CREATION 

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


Testing
---


Thanks,

haosdent huang



Re: Review Request 37024: Exposes mesos version information in components.

2015-10-04 Thread haosdent huang

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

(Updated Oct. 4, 2015, 2:39 p.m.)


Review request for mesos and Ben Mahler.


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


Repository: mesos


Description
---

Add an endpoint that exposes component version.


Diffs (updated)
-

  src/Makefile.am e69892736b0edc8c264eaccd52a04d44d01f53ba 
  src/exec/exec.cpp 7b51baaa8c08d248918974a3a22b6217e388bcb1 
  src/local/main.cpp 18b2f0187637cd425d55c220f73faac5a1218f0f 
  src/master/main.cpp bafc605d6c20bd264b932e44ee80373a3f692734 
  src/sched/sched.cpp 571e00d303009a940f17c8ed4582749a718e846d 
  src/slave/main.cpp 364dc7fc7ab2e3cef01aea7267dafa014b60e2b9 

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


Testing
---

Manual test result:

```
$ curl http://localhost:5050/version 2>/dev/null|jq .

{
  "version": "0.24.0",
  "build_user": "haosdent",
  "build_time": 1439702338,
  "build_date": "2015-08-16 13:18:58"
}
```


Thanks,

haosdent huang



Re: Review Request 37024: Exposes mesos version information in components.

2015-10-04 Thread haosdent huang

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

(Updated Oct. 4, 2015, 2:25 p.m.)


Review request for mesos and Ben Mahler.


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


Repository: mesos


Description
---

Add an endpoint that exposes component version.


Diffs (updated)
-

  src/version/version.hpp PRE-CREATION 
  src/version/version.cpp PRE-CREATION 

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


Testing
---

Manual test result:

```
$ curl http://localhost:5050/version 2>/dev/null|jq .

{
  "version": "0.24.0",
  "build_user": "haosdent",
  "build_time": 1439702338,
  "build_date": "2015-08-16 13:18:58"
}
```


Thanks,

haosdent huang



Re: Review Request 37024: Exposes mesos version information in components.

2015-10-04 Thread haosdent huang

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

(Updated Oct. 4, 2015, 3:12 p.m.)


Review request for mesos and Ben Mahler.


Changes
---

Because the object of src/Makefile.am in apache repo seems not correct, I 
remove it temporary


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


Repository: mesos


Description
---

Add an endpoint that exposes component version.


Diffs (updated)
-

  src/exec/exec.cpp 7b51baaa8c08d248918974a3a22b6217e388bcb1 
  src/local/main.cpp 18b2f0187637cd425d55c220f73faac5a1218f0f 
  src/master/main.cpp bafc605d6c20bd264b932e44ee80373a3f692734 
  src/sched/sched.cpp 571e00d303009a940f17c8ed4582749a718e846d 
  src/slave/main.cpp 364dc7fc7ab2e3cef01aea7267dafa014b60e2b9 
  src/version/version.hpp PRE-CREATION 
  src/version/version.cpp PRE-CREATION 

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


Testing
---

Manual test result:

```
$ curl http://localhost:5050/version 2>/dev/null|jq .

{
  "version": "0.24.0",
  "build_user": "haosdent",
  "build_time": 1439702338,
  "build_date": "2015-08-16 13:18:58"
}
```


Thanks,

haosdent huang