giraph-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <olivier.var...@orange.com>
Subject Re: Giraph - Porting to Java 1.6 - diamond operator issue
Date Wed, 31 Dec 2014 11:14:35 GMT
Thank you Armando,

there was the answer in your patch :D

to make it simple

just transform 

new WrappedMappingInputFormat<>(createMappingInputFormat());

into 

new WrappedMappingInputFormat(createMappingInputFormat());


Thanks a lot

I tried a bunch of reflection and other esoteric stuff ... but, as always, simplest solutions
are the best.

many thanks


Best regards
Olivier


------------------------------------
Olivier Varène
Big Data Referent
Orange - DSI France/Digital Factory
olivier.varene@orange.com
+33 4 97 46 29 94







Le 31 déc. 2014 à 11:55, Armando Miraglia <a.miraglia@student.vu.nl> a écrit :

> Hi Olivier.
> 
> I had the same issue some time ago. I was using a Hadoop cluster which
> was using java 1.6 and I had to make Giraph compatible to java 1.6
> again.
> 
> In February I uploaded a patch to make Giraph compatbile, and you
> can find the patch here: https://issues.apache.org/jira/browse/GIRAPH-847
> 
> Now, consider that this patch is quite old and has not been rebased to
> the current trunk. However, it should be enough to get you started and
> fix your issue.
> 
> Cheers,
> Armando
> 
> On Wed, Dec 31, 2014 at 09:21:49AM +0000, olivier.varene@orange.com wrote:
>> 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());
>>  configureIfPossible(wrappedMappingInputFormat);
>>  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
>> 
>> 
>> ------------------------------------
>> Olivier Varène
>> Big Data Referent
>> Orange - DSI France/Digital Factory
>> olivier.varene@orange.com
>> +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.
>> 


_________________________________________________________________________________________________________________________

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.


Mime
View raw message