You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Jie Yu <yu...@gmail.com> on 2015/03/10 01:07:18 UTC

Review Request 31873: Added Java binding for the new acceptOffers API.

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

Review request for mesos, Ben Mahler, Michael Park, and Vinod Kone.


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


Repository: mesos


Description
-------

Added Java binding for the new acceptOffers API.


Diffs
-----

  src/examples/java/TestFramework.java 65ba9d9e242f40d6382cd9c18269b87f8b59b5a1 
  src/java/jni/construct.cpp e54c11ef0ce3e9f6d0e572d3a89cadae417f9cd6 
  src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp 4f0dad78f7300b7bbf147f231eb053fd7faf4b69 
  src/java/src/org/apache/mesos/MesosSchedulerDriver.java a1055a5d907133485891ebd6d8731c102b913fec 
  src/java/src/org/apache/mesos/SchedulerDriver.java d5b100a4c371bd9c496b9127767c14047185e5f9 

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


Testing
-------

make check


Thanks,

Jie Yu


Re: Review Request 31873: Added Java binding for the new acceptOffers API.

Posted by Jie Yu <yu...@gmail.com>.

> On March 11, 2015, 9:19 p.m., Michael Park wrote:
> > The Java changes look good to me. I've only skimmed over the C++ JNI changes, JNI code is... painful. Look give a second sweep over the JNI code soon.
> > Meanwhile, just a few nits on comments.

I'll commit those first. Let me know if you have further comments and I'll address them.


- Jie


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


On March 10, 2015, 12:07 a.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31873/
> -----------------------------------------------------------
> 
> (Updated March 10, 2015, 12:07 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Michael Park, and Vinod Kone.
> 
> 
> Bugs: MESOS-2427
>     https://issues.apache.org/jira/browse/MESOS-2427
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added Java binding for the new acceptOffers API.
> 
> 
> Diffs
> -----
> 
>   src/examples/java/TestFramework.java 65ba9d9e242f40d6382cd9c18269b87f8b59b5a1 
>   src/java/jni/construct.cpp e54c11ef0ce3e9f6d0e572d3a89cadae417f9cd6 
>   src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp 4f0dad78f7300b7bbf147f231eb053fd7faf4b69 
>   src/java/src/org/apache/mesos/MesosSchedulerDriver.java a1055a5d907133485891ebd6d8731c102b913fec 
>   src/java/src/org/apache/mesos/SchedulerDriver.java d5b100a4c371bd9c496b9127767c14047185e5f9 
> 
> Diff: https://reviews.apache.org/r/31873/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


Re: Review Request 31873: Added Java binding for the new acceptOffers API.

Posted by Michael Park <mc...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/31873/#review76128
-----------------------------------------------------------


The Java changes look good to me. I've only skimmed over the C++ JNI changes, JNI code is... painful. Look give a second sweep over the JNI code soon.
Meanwhile, just a few nits on comments.


src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp
<https://reviews.apache.org/r/31873/#comment123567>

    ```
    Construct C++ OfferIDs from Java OfferIDs.
    ```



src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp
<https://reviews.apache.org/r/31873/#comment123566>

    ```
    // Construct C++ 'Offer::Operation's from Java 'Offer.Operation's.
    ```



src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp
<https://reviews.apache.org/r/31873/#comment123565>

    ```
    // Construct C++ Filters from Java Filters.
    ```


- Michael Park


On March 10, 2015, 12:07 a.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31873/
> -----------------------------------------------------------
> 
> (Updated March 10, 2015, 12:07 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Michael Park, and Vinod Kone.
> 
> 
> Bugs: MESOS-2427
>     https://issues.apache.org/jira/browse/MESOS-2427
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added Java binding for the new acceptOffers API.
> 
> 
> Diffs
> -----
> 
>   src/examples/java/TestFramework.java 65ba9d9e242f40d6382cd9c18269b87f8b59b5a1 
>   src/java/jni/construct.cpp e54c11ef0ce3e9f6d0e572d3a89cadae417f9cd6 
>   src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp 4f0dad78f7300b7bbf147f231eb053fd7faf4b69 
>   src/java/src/org/apache/mesos/MesosSchedulerDriver.java a1055a5d907133485891ebd6d8731c102b913fec 
>   src/java/src/org/apache/mesos/SchedulerDriver.java d5b100a4c371bd9c496b9127767c14047185e5f9 
> 
> Diff: https://reviews.apache.org/r/31873/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


Re: Review Request 31873: Added Java binding for the new acceptOffers API.

Posted by Mesos ReviewBot <de...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/31873/#review75835
-----------------------------------------------------------


Patch looks great!

Reviews applied: [31873]

All tests passed.

- Mesos ReviewBot


On March 10, 2015, 12:07 a.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31873/
> -----------------------------------------------------------
> 
> (Updated March 10, 2015, 12:07 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Michael Park, and Vinod Kone.
> 
> 
> Bugs: MESOS-2427
>     https://issues.apache.org/jira/browse/MESOS-2427
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added Java binding for the new acceptOffers API.
> 
> 
> Diffs
> -----
> 
>   src/examples/java/TestFramework.java 65ba9d9e242f40d6382cd9c18269b87f8b59b5a1 
>   src/java/jni/construct.cpp e54c11ef0ce3e9f6d0e572d3a89cadae417f9cd6 
>   src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp 4f0dad78f7300b7bbf147f231eb053fd7faf4b69 
>   src/java/src/org/apache/mesos/MesosSchedulerDriver.java a1055a5d907133485891ebd6d8731c102b913fec 
>   src/java/src/org/apache/mesos/SchedulerDriver.java d5b100a4c371bd9c496b9127767c14047185e5f9 
> 
> Diff: https://reviews.apache.org/r/31873/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


Re: Review Request 31873: Added Java binding for the new acceptOffers API.

Posted by Jie Yu <yu...@gmail.com>.

> On March 11, 2015, 7:14 p.m., Ben Mahler wrote:
> > src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp, lines 902-903
> > <https://reviews.apache.org/r/31873/diff/1/?file=889870#file889870line902>
> >
> >     Want to collapse these lines to just `push_back(construct<...>(...));`

Done.


> On March 11, 2015, 7:14 p.m., Ben Mahler wrote:
> > src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp, lines 925-928
> > <https://reviews.apache.org/r/31873/diff/1/?file=889870#file889870line925>
> >
> >     Want to collapse these lines to just `push_back(construct<...>(...))`?

Done.


- Jie


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


On March 10, 2015, 12:07 a.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31873/
> -----------------------------------------------------------
> 
> (Updated March 10, 2015, 12:07 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Michael Park, and Vinod Kone.
> 
> 
> Bugs: MESOS-2427
>     https://issues.apache.org/jira/browse/MESOS-2427
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added Java binding for the new acceptOffers API.
> 
> 
> Diffs
> -----
> 
>   src/examples/java/TestFramework.java 65ba9d9e242f40d6382cd9c18269b87f8b59b5a1 
>   src/java/jni/construct.cpp e54c11ef0ce3e9f6d0e572d3a89cadae417f9cd6 
>   src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp 4f0dad78f7300b7bbf147f231eb053fd7faf4b69 
>   src/java/src/org/apache/mesos/MesosSchedulerDriver.java a1055a5d907133485891ebd6d8731c102b913fec 
>   src/java/src/org/apache/mesos/SchedulerDriver.java d5b100a4c371bd9c496b9127767c14047185e5f9 
> 
> Diff: https://reviews.apache.org/r/31873/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


Re: Review Request 31873: Added Java binding for the new acceptOffers API.

Posted by Jie Yu <yu...@gmail.com>.

> On March 11, 2015, 7:14 p.m., Ben Mahler wrote:
> > src/examples/java/TestFramework.java, lines 48-49
> > <https://reviews.apache.org/r/31873/diff/1/?file=889868#file889868line48>
> >
> >     Do you need to fix this in this patch? Just commit the whitespace removal on master if you really want it.

Oops. I don't intend to. My vim script automatically removes it:)


- Jie


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


On March 10, 2015, 12:07 a.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31873/
> -----------------------------------------------------------
> 
> (Updated March 10, 2015, 12:07 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Michael Park, and Vinod Kone.
> 
> 
> Bugs: MESOS-2427
>     https://issues.apache.org/jira/browse/MESOS-2427
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added Java binding for the new acceptOffers API.
> 
> 
> Diffs
> -----
> 
>   src/examples/java/TestFramework.java 65ba9d9e242f40d6382cd9c18269b87f8b59b5a1 
>   src/java/jni/construct.cpp e54c11ef0ce3e9f6d0e572d3a89cadae417f9cd6 
>   src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp 4f0dad78f7300b7bbf147f231eb053fd7faf4b69 
>   src/java/src/org/apache/mesos/MesosSchedulerDriver.java a1055a5d907133485891ebd6d8731c102b913fec 
>   src/java/src/org/apache/mesos/SchedulerDriver.java d5b100a4c371bd9c496b9127767c14047185e5f9 
> 
> Diff: https://reviews.apache.org/r/31873/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


Re: Review Request 31873: Added Java binding for the new acceptOffers API.

Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/31873/#review76106
-----------------------------------------------------------

Ship it!


This patch looks good, but can you please include updates to the CHANGELOG and Upgrades documents in this review chain to capture this API change in 0.23.0?


src/examples/java/TestFramework.java
<https://reviews.apache.org/r/31873/#comment123515>

    Do you need to fix this in this patch? Just commit the whitespace removal on master if you really want it.



src/examples/java/TestFramework.java
<https://reviews.apache.org/r/31873/#comment123516>

    Can we move '`launch`' up and use it to store our tasks, instead of using the extra `List<TaskInfo>`?



src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp
<https://reviews.apache.org/r/31873/#comment123519>

    Want to collapse these lines to just `push_back(construct<...>(...));`



src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp
<https://reviews.apache.org/r/31873/#comment123520>

    Want to collapse these lines to just `push_back(construct<...>(...))`?


- Ben Mahler


On March 10, 2015, 12:07 a.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31873/
> -----------------------------------------------------------
> 
> (Updated March 10, 2015, 12:07 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Michael Park, and Vinod Kone.
> 
> 
> Bugs: MESOS-2427
>     https://issues.apache.org/jira/browse/MESOS-2427
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added Java binding for the new acceptOffers API.
> 
> 
> Diffs
> -----
> 
>   src/examples/java/TestFramework.java 65ba9d9e242f40d6382cd9c18269b87f8b59b5a1 
>   src/java/jni/construct.cpp e54c11ef0ce3e9f6d0e572d3a89cadae417f9cd6 
>   src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp 4f0dad78f7300b7bbf147f231eb053fd7faf4b69 
>   src/java/src/org/apache/mesos/MesosSchedulerDriver.java a1055a5d907133485891ebd6d8731c102b913fec 
>   src/java/src/org/apache/mesos/SchedulerDriver.java d5b100a4c371bd9c496b9127767c14047185e5f9 
> 
> Diff: https://reviews.apache.org/r/31873/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>