Revision 56491
Added by Miriam Baglioni over 4 years ago
modules/dnet-mapreduce-jobs/trunk/src/main/java/eu/dnetlib/data/mapreduce/hbase/propagation/communitytoresult/CommunityList.java | ||
---|---|---|
1 |
package eu.dnetlib.data.mapreduce.hbase.propagation.communitytoresult; |
|
2 |
|
|
3 |
import java.util.ArrayList; |
|
4 |
|
|
5 |
public class CommunityList extends ArrayList<String> { |
|
6 |
|
|
7 |
public CommunityList(){ |
|
8 |
super(); |
|
9 |
} |
|
10 |
} |
modules/dnet-mapreduce-jobs/trunk/src/main/java/eu/dnetlib/data/mapreduce/hbase/propagation/communitytoresult/CommunityToResultMapper.java | ||
---|---|---|
36 | 36 |
private Text valueOut; |
37 | 37 |
private String[] sem_rels; |
38 | 38 |
private String trust; |
39 |
List<String> idCommunityList;
|
|
39 |
CommunityList idCommunityList;
|
|
40 | 40 |
|
41 | 41 |
@Override |
42 | 42 |
protected void setup(final Context context) throws IOException, InterruptedException { |
43 |
Type listType = new TypeToken<List<String>>() {}.getType(); |
|
44 | 43 |
|
45 |
idCommunityList = new Gson().fromJson(context.getConfiguration().get("community.id.list"),listType);
|
|
44 |
idCommunityList = new Gson().fromJson(context.getConfiguration().get("community.id.list"), CommunityList.class);
|
|
46 | 45 |
keyOut = new ImmutableBytesWritable(); |
47 | 46 |
valueOut = new Text(); |
48 | 47 |
|
Also available in: Unified diff
used class to extend ArrayList<String>