You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Andrei Sekretenko <as...@apache.org> on 2020/09/22 18:09:20 UTC

Review Request 72900: Added offer constraints to `updateFramework()` in the Java bindings.

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

Review request for mesos and Benjamin Mahler.


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


Repository: mesos


Description
-------

Added offer constraints to `updateFramework()` in the Java bindings.


Diffs
-----

  src/examples/java/TestFramework.java 1dea79c0e5b76385bad74ded755911f4d1858112 
  src/java/jni/construct.cpp 8d8f76e4602e506faa635970f096d344a9ad8562 
  src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp 1817bbafc4ce65ee5e58eb787e71c6d06481a32f 
  src/java/src/org/apache/mesos/MesosSchedulerDriver.java 3e74be9e59e1419569ad940e5db5390b629ca376 
  src/java/src/org/apache/mesos/SchedulerDriver.java e04916e055349ee287eb0c9327bc5f6d1e6caec3 


Diff: https://reviews.apache.org/r/72900/diff/1/


Testing
-------


Thanks,

Andrei Sekretenko


Re: Review Request 72900: Added offer constraints to `updateFramework()` in the Java bindings.

Posted by Andrei Sekretenko <as...@apache.org>.

> On Sept. 24, 2020, 8:34 p.m., Benjamin Mahler wrote:
> > src/examples/java/TestFramework.java
> > Lines 31-53 (original), 31-58 (patched)
> > <https://reviews.apache.org/r/72900/diff/1/?file=2239838#file2239838line31>
> >
> >     Seems we should separate the TestFramework.java changes from the binding changes?

I'd rather switch to the new signature in the same patch: this patch `@Deprecate`s the old signature, and thus should trigger compilation warnings unless we switch to the new one.


- Andrei


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


On Sept. 25, 2020, 5:48 p.m., Andrei Sekretenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72900/
> -----------------------------------------------------------
> 
> (Updated Sept. 25, 2020, 5:48 p.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-10189
>     https://issues.apache.org/jira/browse/MESOS-10189
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added offer constraints to `updateFramework()` in the Java bindings.
> 
> 
> Diffs
> -----
> 
>   src/examples/java/TestFramework.java 1dea79c0e5b76385bad74ded755911f4d1858112 
>   src/java/jni/construct.cpp a48ca07664f7178df97c3a9557f6908507442333 
>   src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp 1817bbafc4ce65ee5e58eb787e71c6d06481a32f 
>   src/java/src/org/apache/mesos/MesosSchedulerDriver.java 3e74be9e59e1419569ad940e5db5390b629ca376 
>   src/java/src/org/apache/mesos/SchedulerDriver.java e04916e055349ee287eb0c9327bc5f6d1e6caec3 
> 
> 
> Diff: https://reviews.apache.org/r/72900/diff/2/
> 
> 
> Testing
> -------
> 
> Testing Done
> 
> With empty constraints:
> make check
> (and, specifically, src/mesos-tests --gtest_filter='ExamplesTest.JavaFramework')
> 
> 
> With non-empty constraints: extended ExamplesTest.JavaFramework (see WIP https://reviews.apache.org/r/72901 which will most likely be discarded) and re-ran it.
> 
> 
> Thanks,
> 
> Andrei Sekretenko
> 
>


Re: Review Request 72900: Added offer constraints to `updateFramework()` in the Java bindings.

Posted by Andrei Sekretenko <as...@apache.org>.

> On Sept. 24, 2020, 8:34 p.m., Benjamin Mahler wrote:
> > src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp
> > Line 1071 (original), 1071 (patched)
> > <https://reviews.apache.org/r/72900/diff/1/?file=2239840#file2239840line1071>
> >
> >     The suppressed roles collection is gone now? (Not sure if it was specified right originally)

Thanks for noticing! 
It was specified right originally; JNI signatures of generics contain no information about the type parameters, a `Collection<String>` indeed maps onto `Ljava/util/Collection`


- Andrei


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


On Sept. 25, 2020, 5:48 p.m., Andrei Sekretenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72900/
> -----------------------------------------------------------
> 
> (Updated Sept. 25, 2020, 5:48 p.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-10189
>     https://issues.apache.org/jira/browse/MESOS-10189
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added offer constraints to `updateFramework()` in the Java bindings.
> 
> 
> Diffs
> -----
> 
>   src/examples/java/TestFramework.java 1dea79c0e5b76385bad74ded755911f4d1858112 
>   src/java/jni/construct.cpp a48ca07664f7178df97c3a9557f6908507442333 
>   src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp 1817bbafc4ce65ee5e58eb787e71c6d06481a32f 
>   src/java/src/org/apache/mesos/MesosSchedulerDriver.java 3e74be9e59e1419569ad940e5db5390b629ca376 
>   src/java/src/org/apache/mesos/SchedulerDriver.java e04916e055349ee287eb0c9327bc5f6d1e6caec3 
> 
> 
> Diff: https://reviews.apache.org/r/72900/diff/2/
> 
> 
> Testing
> -------
> 
> Testing Done
> 
> With empty constraints:
> make check
> (and, specifically, src/mesos-tests --gtest_filter='ExamplesTest.JavaFramework')
> 
> 
> With non-empty constraints: extended ExamplesTest.JavaFramework (see WIP https://reviews.apache.org/r/72901 which will most likely be discarded) and re-ran it.
> 
> 
> Thanks,
> 
> Andrei Sekretenko
> 
>


Re: Review Request 72900: Added offer constraints to `updateFramework()` in the Java bindings.

Posted by Benjamin Mahler <bm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72900/#review221954
-----------------------------------------------------------


Fix it, then Ship it!





src/examples/java/TestFramework.java
Lines 31-53 (original), 31-58 (patched)
<https://reviews.apache.org/r/72900/#comment311021>

    Seems we should separate the TestFramework.java changes from the binding changes?



src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp
Line 1071 (original), 1071 (patched)
<https://reviews.apache.org/r/72900/#comment311022>

    The suppressed roles collection is gone now? (Not sure if it was specified right originally)


- Benjamin Mahler


On Sept. 22, 2020, 6:09 p.m., Andrei Sekretenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72900/
> -----------------------------------------------------------
> 
> (Updated Sept. 22, 2020, 6:09 p.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-10189
>     https://issues.apache.org/jira/browse/MESOS-10189
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added offer constraints to `updateFramework()` in the Java bindings.
> 
> 
> Diffs
> -----
> 
>   src/examples/java/TestFramework.java 1dea79c0e5b76385bad74ded755911f4d1858112 
>   src/java/jni/construct.cpp 8d8f76e4602e506faa635970f096d344a9ad8562 
>   src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp 1817bbafc4ce65ee5e58eb787e71c6d06481a32f 
>   src/java/src/org/apache/mesos/MesosSchedulerDriver.java 3e74be9e59e1419569ad940e5db5390b629ca376 
>   src/java/src/org/apache/mesos/SchedulerDriver.java e04916e055349ee287eb0c9327bc5f6d1e6caec3 
> 
> 
> Diff: https://reviews.apache.org/r/72900/diff/1/
> 
> 
> Testing
> -------
> 
> Testing Done
> 
> With empty constraints:
> make check
> (and, specifically, src/mesos-tests --gtest_filter='ExamplesTest.JavaFramework')
> 
> 
> With non-empty constraints: extended ExamplesTest.JavaFramework (see WIP https://reviews.apache.org/r/72901 which will most likely be discarded) and re-ran it.
> 
> 
> Thanks,
> 
> Andrei Sekretenko
> 
>


Re: Review Request 72900: Added offer constraints to `updateFramework()` in the Java bindings.

Posted by Andrei Sekretenko <as...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72900/#review221924
-----------------------------------------------------------




src/java/src/org/apache/mesos/SchedulerDriver.java
Line 388 (original), 390 (patched)
<https://reviews.apache.org/r/72900/#comment310976>

    Comments need to be synchronized with the final version of C++ ones: https://reviews.apache.org/r/72874/


- Andrei Sekretenko


On Sept. 22, 2020, 8:09 p.m., Andrei Sekretenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72900/
> -----------------------------------------------------------
> 
> (Updated Sept. 22, 2020, 8:09 p.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-10189
>     https://issues.apache.org/jira/browse/MESOS-10189
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added offer constraints to `updateFramework()` in the Java bindings.
> 
> 
> Diffs
> -----
> 
>   src/examples/java/TestFramework.java 1dea79c0e5b76385bad74ded755911f4d1858112 
>   src/java/jni/construct.cpp 8d8f76e4602e506faa635970f096d344a9ad8562 
>   src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp 1817bbafc4ce65ee5e58eb787e71c6d06481a32f 
>   src/java/src/org/apache/mesos/MesosSchedulerDriver.java 3e74be9e59e1419569ad940e5db5390b629ca376 
>   src/java/src/org/apache/mesos/SchedulerDriver.java e04916e055349ee287eb0c9327bc5f6d1e6caec3 
> 
> 
> Diff: https://reviews.apache.org/r/72900/diff/1/
> 
> 
> Testing
> -------
> 
> Testing Done
> 
> With empty constraints:
> make check
> (and, specifically, src/mesos-tests --gtest_filter='ExamplesTest.JavaFramework')
> 
> 
> With non-empty constraints: extended ExamplesTest.JavaFramework (see WIP https://reviews.apache.org/r/72901 which will most likely be discarded) and re-ran it.
> 
> 
> Thanks,
> 
> Andrei Sekretenko
> 
>


Re: Review Request 72900: Added offer constraints to `updateFramework()` in the Java bindings.

Posted by Andrei Sekretenko <as...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72900/
-----------------------------------------------------------

(Updated Sept. 25, 2020, 5:48 p.m.)


Review request for mesos and Benjamin Mahler.


Changes
-------

- Fixed the signature comment in the C++ JNI code
 - `updateFramework` javadoc comments: synced from the C++ driver, adjusted @params, added @deprecated to the comment for the old signature.


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


Repository: mesos


Description
-------

Added offer constraints to `updateFramework()` in the Java bindings.


Diffs (updated)
-----

  src/examples/java/TestFramework.java 1dea79c0e5b76385bad74ded755911f4d1858112 
  src/java/jni/construct.cpp a48ca07664f7178df97c3a9557f6908507442333 
  src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp 1817bbafc4ce65ee5e58eb787e71c6d06481a32f 
  src/java/src/org/apache/mesos/MesosSchedulerDriver.java 3e74be9e59e1419569ad940e5db5390b629ca376 
  src/java/src/org/apache/mesos/SchedulerDriver.java e04916e055349ee287eb0c9327bc5f6d1e6caec3 


Diff: https://reviews.apache.org/r/72900/diff/2/

Changes: https://reviews.apache.org/r/72900/diff/1-2/


Testing
-------

Testing Done

With empty constraints:
make check
(and, specifically, src/mesos-tests --gtest_filter='ExamplesTest.JavaFramework')


With non-empty constraints: extended ExamplesTest.JavaFramework (see WIP https://reviews.apache.org/r/72901 which will most likely be discarded) and re-ran it.


Thanks,

Andrei Sekretenko