giraph-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Giraph - Porting to Java 1.6 - diamond operator issue
Date Wed, 31 Dec 2014 09:21:49 GMT
Hi to all,

because of actual production environment constraints, I need to make Giraph 1.1 compatible
with Java 1.6.
My production environment is Java 1.6.0_26-b03 / Cloudera cdh4.4.0 ... I know, I know ...
:( :( :(

However, I am stuck on this syntax, and I don't know how to make it compatible with Java 1.6

* diamond operator is not supported in 1.6 so

here "new WrappedMappingInputFormat<>("

public WrappedMappingInputFormat<I, V, E, ? extends Writable>
createWrappedMappingInputFormat() {
  // how to determine ? extends Writable
  // via conf ?   mappingTargetClass ???
  //Type T = mappingTargetClass.getGenericSuperclass();
  //Class<T> l_writable = (Class<T>) ((ParameterizedType) getMappingInputFormatClass().getGenericSuperclass()).getActualTypeArguments()[3];

  WrappedMappingInputFormat<I, V, E, ? extends Writable>
    wrappedMappingInputFormat =
      new WrappedMappingInputFormat<>(createMappingInputFormat());
  return wrappedMappingInputFormat;

What would be the trick / construct to make it 1.6 compatible ?
( watch out the "? extends Writable" ... )

Thanks a lot

best regards and happy new year


Olivier Varène
Big Data Referent
Orange - DSI France/Digital Factory
+33 4 97 46 29 94


Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees
et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par
erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant
susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may
be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message
and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed
or falsified.
Thank you.

View raw message