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

Review request for mesos, Benjamin Hindman and Ben Mahler.


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


Repository: mesos


Description
-------

This aids in verifying the files are kept in sync.
diff include/mesos/type_utils.cpp include/mesos/v1/mesos.cpp should
result in only include and namespace differences.

Also included Modules as part of the V1 API to aid in symmetry.


Diffs
-----

  include/mesos/module/module.proto 821fc0e72ece7c497595859fc5efc1c64ea49b9b 
  include/mesos/type_utils.hpp 6cedf079c710c7d6ab8f95c47c133e6a1efe9a82 
  include/mesos/v1/mesos.hpp 260e1125dea792ebcece404f94363e8c4bc36f28 
  include/mesos/v1/module/module.hpp PRE-CREATION 
  include/mesos/v1/module/module.proto PRE-CREATION 
  src/Makefile.am 776483bfe54255eb44dffed9fb43f3b26235fb40 

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


Testing
-------

Most notable is the ACL streamer which I wasn't sure if we purposely moved into 
mesos as opposed to keeping the authorization directory in the previous api.
diff include/mesos/type_utils.hpp include/mesos/v1/mesos.hpp
```
19,20c19,20
< #ifndef __MESOS_TYPE_UTILS_H__
< #define __MESOS_TYPE_UTILS_H__
---
> #ifndef __MESOS_V1_HPP__
> #define __MESOS_V1_HPP__
26c26
< #include <mesos/mesos.hpp>
---
> #include <mesos/v1/mesos.pb.h> // ONLY USEFUL AFTER RUNNING PROTOC.
28c28
< #include <mesos/module/module.hpp>
---
> #include <mesos/v1/module/module.hpp>
30c30
< #include <mesos/scheduler/scheduler.hpp>
---
> #include <mesos/v1/scheduler/scheduler.hpp>
32,33d31
< #include <stout/hashmap.hpp>
< #include <stout/stringify.hpp>
35,46d32
< #include <stout/uuid.hpp>
< 
< // This file includes definitions for operators on public protobuf
< // classes (defined in mesos.proto, module.proto, etc.) that don't
< // have these operators generated by the protobuf compiler. The
< // corresponding definitions are in src/common/type_utils.cpp.
< //
< // Mesos modules need some of the protobuf classes defined in
< // mesos.proto, module.proto, etc., and require some of these
< // operators declared in type_utils.hpp. Exposing type_utils.hpp
< // allows us to build modules without having a dependency on mesos
< // source tree (src/*).
48a35
> namespace v1 {
61c48
< bool operator==(const SlaveInfo& left, const SlaveInfo& right);
---
> bool operator==(const AgentInfo& left, const AgentInfo& right);
104c91
< inline bool operator==(const SlaveID& left, const SlaveID& right)
---
> inline bool operator==(const AgentID& left, const AgentID& right)
152c139
< inline bool operator==(const SlaveID& left, const std::string& right)
---
> inline bool operator==(const AgentID& left, const std::string& right)
197c184
< inline bool operator!=(const SlaveID& left, const SlaveID& right)
---
> inline bool operator!=(const AgentID& left, const AgentID& right)
239c226
< inline bool operator<(const SlaveID& left, const SlaveID& right)
---
> inline bool operator<(const AgentID& left, const AgentID& right)
250a238,243
> inline std::ostream& operator<<(std::ostream& stream, const ACLs& acls)
> {
>   return stream << acls.DebugString();
> }
> 
> 
309c302
< inline std::ostream& operator<<(std::ostream& stream, const SlaveID& slaveId)
---
> inline std::ostream& operator<<(std::ostream& stream, const AgentID& agentId)
311c304
<   return stream << slaveId.value();
---
>   return stream << agentId.value();
315c308
< inline std::ostream& operator<<(std::ostream& stream, const SlaveInfo& slave)
---
> inline std::ostream& operator<<(std::ostream& stream, const AgentInfo& agent)
317c310
<   return stream << slave.DebugString();
---
>   return stream << agent.DebugString();
422c415
<     const Modules& modules)
---
>     const module::Modules& modules)
435a429
> } // namespace v1 {
441c435
< struct hash<mesos::CommandInfo_URI>
---
> struct hash<mesos::v1::CommandInfo::URI>
445c439
<   typedef mesos::CommandInfo_URI argument_type;
---
>   typedef mesos::v1::CommandInfo::URI argument_type;
466c460
< struct hash<mesos::ContainerID>
---
> struct hash<mesos::v1::ContainerID>
470c464
<   typedef mesos::ContainerID argument_type;
---
>   typedef mesos::v1::ContainerID argument_type;
482c476
< struct hash<mesos::ExecutorID>
---
> struct hash<mesos::v1::ExecutorID>
486c480
<   typedef mesos::ExecutorID argument_type;
---
>   typedef mesos::v1::ExecutorID argument_type;
498c492
< struct hash<mesos::FrameworkID>
---
> struct hash<mesos::v1::FrameworkID>
502c496
<   typedef mesos::FrameworkID argument_type;
---
>   typedef mesos::v1::FrameworkID argument_type;
514c508
< struct hash<mesos::OfferID>
---
> struct hash<mesos::v1::OfferID>
518c512
<   typedef mesos::OfferID argument_type;
---
>   typedef mesos::v1::OfferID argument_type;
530c524
< struct hash<mesos::SlaveID>
---
> struct hash<mesos::v1::AgentID>
534c528
<   typedef mesos::SlaveID argument_type;
---
>   typedef mesos::v1::AgentID argument_type;
536c530
<   result_type operator()(const argument_type& slaveId) const
---
>   result_type operator()(const argument_type& agentId) const
539c533
<     boost::hash_combine(seed, slaveId.value());
---
>     boost::hash_combine(seed, agentId.value());
546c540
< struct hash<mesos::TaskID>
---
> struct hash<mesos::v1::TaskID>
550c544
<   typedef mesos::TaskID argument_type;
---
>   typedef mesos::v1::TaskID argument_type;
562c556
< struct hash<mesos::TaskState>
---
> struct hash<mesos::v1::TaskState>
566c560
<   typedef mesos::TaskState argument_type;
---
>   typedef mesos::v1::TaskState argument_type;
577c571
< struct hash<mesos::TaskStatus_Source>
---
> struct hash<mesos::v1::TaskStatus_Source>
581c575
<   typedef mesos::TaskStatus_Source argument_type;
---
>   typedef mesos::v1::TaskStatus_Source argument_type;
592c586
< struct hash<mesos::TaskStatus_Reason>
---
> struct hash<mesos::v1::TaskStatus_Reason>
596c590
<   typedef mesos::TaskStatus_Reason argument_type;
---
>   typedef mesos::v1::TaskStatus_Reason argument_type;
607c601
< struct hash<mesos::Image_Type>
---
> struct hash<mesos::v1::Image_Type>
611c605
<   typedef mesos::Image_Type argument_type;
---
>   typedef mesos::v1::Image_Type argument_type;
622c616
< struct hash<std::pair<mesos::FrameworkID, mesos::ExecutorID>>
---
> struct hash<std::pair<mesos::v1::FrameworkID, mesos::v1::ExecutorID>>
627c621
<       mesos::FrameworkID, mesos::ExecutorID> argument_type;
---
>       mesos::v1::FrameworkID, mesos::v1::ExecutorID> argument_type;
632,633c626,627
<     boost::hash_combine(seed, std::hash<mesos::FrameworkID>()(pair.first));
<     boost::hash_combine(seed, std::hash<mesos::ExecutorID>()(pair.second));
---
>     boost::hash_combine(seed, 
> std::hash<mesos::v1::FrameworkID>()(pair.first));
>     boost::hash_combine(seed, 
> std::hash<mesos::v1::ExecutorID>()(pair.second));
640c634
< struct hash<mesos::MachineID>
---
> struct hash<mesos::v1::MachineID>
644c638
<   typedef mesos::MachineID argument_type;
---
>   typedef mesos::v1::MachineID argument_type;
657c651
< #endif // __MESOS_TYPE_UTILS_H__
---
> #endif // __MESOS_V1_HPP__
```


Thanks,

Joris Van Remoortere

Reply via email to