[ovirt-devel] Slides for the Java 8 presentation yesterday

2015-12-02 Thread Juan Hernández
Hello all,

The slides for the Java 8 new features that I delivered yesterday are
available here:

https://jhernand.fedorapeople.org/java8/slides.html

There is no recording, as hangout failed and I forgot to record the
BlueJeans call, sorry.

Regards,
Juan Hernandez
-- 
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
3ºD, 28016 Madrid, Spain
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel

Re: [ovirt-devel] Slides for the Java 8 presentation yesterday

2015-12-02 Thread Fred Rolland
Thanks Juan for the great presentation !!

On Wed, Dec 2, 2015 at 10:50 AM, Juan Hernández  wrote:

> Hello all,
>
> The slides for the Java 8 new features that I delivered yesterday are
> available here:
>
> https://jhernand.fedorapeople.org/java8/slides.html
>
> There is no recording, as hangout failed and I forgot to record the
> BlueJeans call, sorry.
>
> Regards,
> Juan Hernandez
> --
> Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
> 3ºD, 28016 Madrid, Spain
> Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.
> ___
> Devel mailing list
> Devel@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/devel
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel

[ovirt-devel] [ANN] oVirt 3.6.1 Second Release Candidate is now available for testing

2015-12-02 Thread Sandro Bonazzola
The oVirt Project is pleased to announce the availability
of the Second Release Candidate of oVirt 3.6.1 for testing, as of December
3rd, 2015.

This release is available now for Fedora 22,
Red Hat Enterprise Linux 6.7, CentOS Linux 6.7 (or similar) and
Red Hat Enterprise Linux >= 7.1, CentOS Linux >= 7.1 (or similar).

This release supports Hypervisor Hosts running
Red Hat Enterprise Linux >= 7.1, CentOS Linux >= 7.1 (or similar) and
Fedora 22.
Highly experimental support for Debian 8.2 Jessie has been added too.

This release candidate includes updated packages for:
- ovirt-engine
- ovirt-engine-extension-aaa-jdbc
- ovirt-hosted-engine-ha
- ovirt-hosted-engine-setup
- vdsm

This release of oVirt 3.6.1 includes numerous bug fixes.
See the release notes [1] for an initial list of the new features and bugs
fixed.

Please refer to release notes [1] for Installation / Upgrade instructions.
A new oVirt Live ISO will be available soon[2].

Please note that mirrors[3] may need usually one day before being
synchronized.

Please refer to the release notes for known issues in this release.

[1] http://www.ovirt.org/OVirt_3.6.1_Release_Notes
[2] http://resources.ovirt.org/pub/ovirt-3.6-pre/iso/
[3] http://www.ovirt.org/Repository_mirrors#Current_mirrors

-- 
Sandro Bonazzola
Better technology. Faster innovation. Powered by community collaboration.
See how it works at redhat.com
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel

Re: [ovirt-devel] Slides for the Java 8 presentation yesterday

2015-12-02 Thread Martin Mucha
Thanks Juan, I've read your slides and learn something new from them.

And I'd like to ask one small thing about how lambdas are represented. It seems 
that from early draft there were 'some changes' — from inner class 
representation, to runtime generated inner class representation, to no classes 
in the end. So if spec says, that [quote]:

The value of a lambda expression is a reference to an instance of a class with 
the following properties:
• The class implements the targeted functional interface type and, if the 
target type is an intersection type, every other interface type mentioned in 
the intersection.
…

and in current implementation class type of lambda is now it's enclosing class 
type, it means, that lambda is represented by instance of class its defined 
in(this instanceof  in lambda returns true). Then it seems 
that enclosing type has to implement functional interface to fulfill spec. 
Which seems wild, provided, that with two 'Runnable-representing' lambdas 
enclosing class has to implement Runnable twice, with two different 
implementations, which is usually impossible.

as you know more about this subject, can I ask you to confirm this statements / 
explain where I'm wrong and how it works internally / or explain what kind of 
sorcery is going on here?

thanks,
Mar.

- Original Message -
> Thanks Juan for the great presentation !!
> 
> On Wed, Dec 2, 2015 at 10:50 AM, Juan Hernández < jhern...@redhat.com >
> wrote:
> 
> 
> Hello all,
> 
> The slides for the Java 8 new features that I delivered yesterday are
> available here:
> 
> https://jhernand.fedorapeople.org/java8/slides.html
> 
> There is no recording, as hangout failed and I forgot to record the
> BlueJeans call, sorry.
> 
> Regards,
> Juan Hernandez
> --
> Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
> 3ºD, 28016 Madrid, Spain
> Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.
> ___
> Devel mailing list
> Devel@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/devel
> 
> 
> ___
> Devel mailing list
> Devel@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/devel
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel

Re: [ovirt-devel] vdsm debian support

2015-12-02 Thread Sandro Bonazzola
On Wed, Dec 2, 2015 at 11:54 AM, Milan Zamazal  wrote:

> Hi, I tried to install the packages on a freshly installed Debian 8
> (jessie) system.  It failed with the following error:
>
>   # apt-get install vdsm
>   ...
>   Setting up vdsm (4.17.11-1) ...
>   Usage: /usr/bin/vdsm-tool [options]  [arguments]
>   Valid options:
>   ...
>
> The offending command in vdsm.postinst script is:
>
>   ...
>   + vdsm-tool load-needed-modules
>   Usage: /usr/bin/vdsm-tool [options]  [arguments]
>   ...
>
> When run manually, vdsm-tool doesn't seem to accept any action, e.g.:
>
>   # vdsm-tool configure
>   Usage: /usr/bin/vdsm-tool [options]  [arguments]
>   Valid options:
> -h, --help
>   Show this help menu.
> -l, --logfile 
>   Redirect logging to file.
> -v, --verbose
>   Include warning (and errors) messages in log.
> -vv, --vverbose
>   Include information (and above) messages in log.
> -vvv, --vvverbose
>   Include debug (and above) messages in log.
> -a, --append
>   Append to logfile instead of truncating it
>   (if logging to a file).
>
> Note there are no vdsm-tool commands listed in the help output.
> And load-needed-modules action looks strange, I couldn't find it
> anywhere except the postinst script.
>

Y. Bronheim, can you take a look?

-- 
Sandro Bonazzola
Better technology. Faster innovation. Powered by community collaboration.
See how it works at redhat.com
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel

Re: [ovirt-devel] Slides for the Java 8 presentation yesterday

2015-12-02 Thread Martin Mucha
thank you very much for explanation.
M.

- Original Message -
> On 12/02/2015 10:53 AM, Martin Mucha wrote:
> > Thanks Juan, I've read your slides and learn something new from them.
> > 
> > And I'd like to ask one small thing about how lambdas are represented. It
> > seems that from early draft there were 'some changes' — from inner class
> > representation, to runtime generated inner class representation, to no
> > classes in the end. So if spec says, that [quote]:
> > 
> > The value of a lambda expression is a reference to an instance of a class
> > with the following properties:
> > • The class implements the targeted functional interface type and, if the
> > target type is an intersection type, every other interface type mentioned
> > in the intersection.
> > …
> > 
> > and in current implementation class type of lambda is now it's enclosing
> > class type, it means, that lambda is represented by instance of class its
> > defined in(this instanceof  in lambda returns true). Then
> > it seems that enclosing type has to implement functional interface to
> > fulfill spec. Which seems wild, provided, that with two
> > 'Runnable-representing' lambdas enclosing class has to implement Runnable
> > twice, with two different implementations, which is usually impossible.
> > 
> > as you know more about this subject, can I ask you to confirm this
> > statements / explain where I'm wrong and how it works internally / or
> > explain what kind of sorcery is going on here?
> > 
> > thanks,
> > Mar.
> > 
> 
> I'm not an expert in the subject, but as far as I understand there are
> two mechanisms used to implement the lambda expressions. First is that
> the body of the lambda expression is implemented as a method within the
> class were it is used. For example, if you write a class like this:
> 
>   public class Test {
> public go() {
>   Runnable my = () -> System.out.println("Hello!");
>   my.run();
> }
>   }
> 
> The compiler will ad a new synthetic method to the class, named
> "lambda$main$0", containing the body of the expression:
> 
>   private static void labmda$main$0() {
> System.out.println("Hello!");
>   }
> 
> In this case the method is static, because the expression doesn't need
> to access members of the containing class, and it doesn't receive
> parameters because it doesn't use variables or parameters from its
> environment. If it used members it wouldn't have been static, and would
> have parameters, one for each local variable or parameter used. For
> example, if you change the class to this:
> 
>  public class Test {
>String member;
> 
>public void go(String parameter) {
>  String local = "local";
>  Runnable my = () -> {
>System.out.println(member);
>System.out.println(parameter);
>System.out.println(local);
>  };
>  my.run();
>}
> }
> 
> Then the generated method looks like this:
> 
>   private void labmda$main$0(String parameter, String local) {
> System.out.println(member);
> System.out.println(parameter);
> System.out.println(local);
>   }
> 
> Note that the method isn't now static, that is why it can access
> members, and why "this" doesn't mean the same that it means in anonymous
> inner classes. Note that this doesn't mean that the type of the
> expression is the enclosing class, just that "this" has a different meaning.
> 
> The second mechanism is the "invokedynamic" instruction, introduced in
> Java 7. This is used to instantiate the the object that wraps the
> expression. In the above example, the following line:
> 
>   Runnable my = () -> { ... }
> 
> Is translated by the compiler in a "invokedynamic" instruction like this:
> 
>   invokedynamic #3, 0 // InvokeDynamic
> #0:run:(LTest;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Runnable;
> 
> I won't go into the details here (and I don't know them very well
> either), but more or less this is telling the Java virtual machine that
> during run time, the first time that this instruction is executed, it
> should use the lambda expressions bootstrap method to find (maybe
> create, "linking" is the term) an object that implements the "Runnable"
> interface such that the "run" method class the "lambda$run$0" method. I
> guess that these classes are generated with a mechanism similar to
> java.lang.reflect.Proxy, but not exactly the same.
> 
> > - Original Message -
> >> Thanks Juan for the great presentation !!
> >>
> >> On Wed, Dec 2, 2015 at 10:50 AM, Juan Hernández < jhern...@redhat.com >
> >> wrote:
> >>
> >>
> >> Hello all,
> >>
> >> The slides for the Java 8 new features that I delivered yesterday are
> >> available here:
> >>
> >> https://jhernand.fedorapeople.org/java8/slides.html
> >>
> >> There is no recording, as hangout failed and I forgot to record the
> >> BlueJeans call, sorry.
> >>
> >> Regards,
> >> Juan Hernandez
> >> --
> 
> --
> Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
> 3ºD, 28016 Madrid, 

Re: [ovirt-devel] [VDSM] Coverage reports

2015-12-02 Thread Allon Mureinik
Awesome!

Infra stakeholders - any chance to have this pushed to the devel list once
a month (or some other reasonable period)?

On Fri, Nov 27, 2015 at 8:57 PM, Nir Soffer  wrote:

> Hi all,
>
> Thanks to Edward, we have now coverage reports in jenkins.
>
> The way to access the report on jenkins is to use this url:
> http://jenkins.ovirt.org/job/vdsm_master_check-patch-fc23-x86_64/
> /artifact/exported-artifacts/htmlcov/index.html
>
> Here is an example, hopefully it will be accessible when you try:
>
> http://jenkins.ovirt.org/job/vdsm_master_check-patch-fc23-x86_64/648/artifact/exported-artifacts/htmlcov/index.html
>
> Todo:
>
> - Easy way to access the report from gerrit
>   It should be easy to add a link the coverage report in the comment added
>   by jenkins after a build finish.
>
> - Store the coverage reports for longer time, maybe a week?
>
> - We have only 45% coverage instead of the minimum, 100%.
>
>   Note that coverage of 25% can mean *no* code was run by the tests.
> The only code
>   running was the functions and class definitions. Here is an example:
>
> http://jenkins.ovirt.org/job/vdsm_master_check-patch-fc23-x86_64/648/artifact/exported-artifacts/htmlcov/_home_jenkins_workspace_vdsm_master_check-patch-fc23-x86_64_vdsm_vdsm_storage_devicemapper_py.html
>
>   Modules that were never imported during the tests have 0% coverage:
>
> http://jenkins.ovirt.org/job/vdsm_master_check-patch-fc23-x86_64/648/artifact/exported-artifacts/htmlcov/_home_jenkins_workspace_vdsm_master_check-patch-fc23-x86_64_vdsm_vdsm_storage_hsm_py.html
>
> - coverage creates lot of useless noise in the jenkins logs, need to
> slicense
>   this output.
>
> http://jenkins.ovirt.org/job/vdsm_master_check-patch-fc23-x86_64/648/consoleFull
>   I did not find a way to do this in nosetests, may need hacking
>   nose coverage plugin.
>
> - The report includes only the tests in the tests directory.
>
>We have additional tests in lib/vdsm/infra/* which are not
> included. We should
>move these to the tests directory.
>
> - The report is using absolute paths, but we like shorter relative paths.
>
>   I don't see a way to configure nosetests or coverage to generate
> relative paths.
>   May need hacking of the generated html/json in htmlcov.
>
> - Add "make coverage" target for running coverage locally
>
> - An easy way to enable coverage for the functional tests or for running
>   a single test module.
>
>   Can be done using nosetests --cover* options. Should be documented in
>   tests/README, and maybe automated using a script or Makefile.
>   When running locally, one would like to have the script open the report
>   in the browser automatically:
>   xdg-open tests/htmlcov/index.html
>
> - An easy way to enable coverage when testing flows in vdsm
>
>   Petr sent a patch for enabling coverage using vdsm.conf:
>   https://gerrit.ovirt.org/49168
>   We discussed adding vdsm-coverage package that will make it easy to setup
>
> Nir
> ___
> Devel mailing list
> Devel@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/devel
>
>
>
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel

Re: [ovirt-devel] Slides for the Java 8 presentation yesterday

2015-12-02 Thread Juan Hernández
On 12/02/2015 10:53 AM, Martin Mucha wrote:
> Thanks Juan, I've read your slides and learn something new from them.
> 
> And I'd like to ask one small thing about how lambdas are represented. It 
> seems that from early draft there were 'some changes' — from inner class 
> representation, to runtime generated inner class representation, to no 
> classes in the end. So if spec says, that [quote]:
> 
> The value of a lambda expression is a reference to an instance of a class 
> with the following properties:
> • The class implements the targeted functional interface type and, if the 
> target type is an intersection type, every other interface type mentioned in 
> the intersection.
> …
> 
> and in current implementation class type of lambda is now it's enclosing 
> class type, it means, that lambda is represented by instance of class its 
> defined in(this instanceof  in lambda returns true). Then it 
> seems that enclosing type has to implement functional interface to fulfill 
> spec. Which seems wild, provided, that with two 'Runnable-representing' 
> lambdas enclosing class has to implement Runnable twice, with two different 
> implementations, which is usually impossible.
> 
> as you know more about this subject, can I ask you to confirm this statements 
> / explain where I'm wrong and how it works internally / or explain what kind 
> of sorcery is going on here?
> 
> thanks,
> Mar.
> 

I'm not an expert in the subject, but as far as I understand there are
two mechanisms used to implement the lambda expressions. First is that
the body of the lambda expression is implemented as a method within the
class were it is used. For example, if you write a class like this:

  public class Test {
public go() {
  Runnable my = () -> System.out.println("Hello!");
  my.run();
}
  }

The compiler will ad a new synthetic method to the class, named
"lambda$main$0", containing the body of the expression:

  private static void labmda$main$0() {
System.out.println("Hello!");
  }

In this case the method is static, because the expression doesn't need
to access members of the containing class, and it doesn't receive
parameters because it doesn't use variables or parameters from its
environment. If it used members it wouldn't have been static, and would
have parameters, one for each local variable or parameter used. For
example, if you change the class to this:

 public class Test {
   String member;

   public void go(String parameter) {
 String local = "local";
 Runnable my = () -> {
   System.out.println(member);
   System.out.println(parameter);
   System.out.println(local);
 };
 my.run();
   }
}

Then the generated method looks like this:

  private void labmda$main$0(String parameter, String local) {
System.out.println(member);
System.out.println(parameter);
System.out.println(local);
  }

Note that the method isn't now static, that is why it can access
members, and why "this" doesn't mean the same that it means in anonymous
inner classes. Note that this doesn't mean that the type of the
expression is the enclosing class, just that "this" has a different meaning.

The second mechanism is the "invokedynamic" instruction, introduced in
Java 7. This is used to instantiate the the object that wraps the
expression. In the above example, the following line:

  Runnable my = () -> { ... }

Is translated by the compiler in a "invokedynamic" instruction like this:

  invokedynamic #3, 0 // InvokeDynamic
#0:run:(LTest;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Runnable;

I won't go into the details here (and I don't know them very well
either), but more or less this is telling the Java virtual machine that
during run time, the first time that this instruction is executed, it
should use the lambda expressions bootstrap method to find (maybe
create, "linking" is the term) an object that implements the "Runnable"
interface such that the "run" method class the "lambda$run$0" method. I
guess that these classes are generated with a mechanism similar to
java.lang.reflect.Proxy, but not exactly the same.

> - Original Message -
>> Thanks Juan for the great presentation !!
>>
>> On Wed, Dec 2, 2015 at 10:50 AM, Juan Hernández < jhern...@redhat.com >
>> wrote:
>>
>>
>> Hello all,
>>
>> The slides for the Java 8 new features that I delivered yesterday are
>> available here:
>>
>> https://jhernand.fedorapeople.org/java8/slides.html
>>
>> There is no recording, as hangout failed and I forgot to record the
>> BlueJeans call, sorry.
>>
>> Regards,
>> Juan Hernandez
>> --

-- 
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
3ºD, 28016 Madrid, Spain
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel