Project

General

Profile

« Previous | Next » 

Revision 29318

Added by Eri Katsari about 10 years ago

View differences:

modules/dnet-openaire-stats/trunk/src/main/java/eu/dnetlib/data/mapreduce/hbase/statsExport/StatsMapper.java
68 68

  
69 69
			final Type type = decoder.getType();
70 70

  
71
			 if (type != null)
72
			{
71
			if (type != null) {
73 72
				final Oaf oaf = UpdateMerger.mergeBodyUpdates(context, result.getFamilyMap(Bytes.toBytes(type.toString())));
74 73

  
75 74
				if (isValid(oaf))
......
78 77
					if (!deletedByInference(oaf) || entityConfigTable.includeDuplicates(type)) {
79 78
						emitProtos(context, result, oaf);
80 79
					}
80
				} else
81

  
82
				{
83
					log.error("Invalid Oaf " + decoder.getId());
81 84
				}
82 85

  
83 86
			}
......
86 89
	}
87 90

  
88 91
	private boolean isValid(Oaf oaf) {
92
		try {
89 93

  
90
		if (oaf != null && oaf.isInitialized())
91
		// if (oaf != null)
92
		{
93
			return true;
94
			if (oaf != null && oaf.isInitialized()) {
95
				return true;
96
			}
97

  
98
		} catch (Exception e) {
99
			log.error("OAF NOT INITIALIZED ");
94 100
		}
101

  
95 102
		return false;
96 103
	}
97 104

  

Also available in: Unified diff