Revision 52993
Added by Sandro La Bruzzo over 5 years ago
modules/dnet-mapreduce-jobs/branches/beta/src/main/java/eu/dnetlib/data/mapreduce/hbase/dedup/DedupBuildRootsReducer.java | ||
---|---|---|
117 | 117 |
|
118 | 118 |
private void emit(final String msg, final Context context, final byte[] rowkey, final String family, final String qualifier, final byte[] value, final String label) |
119 | 119 |
throws IOException, InterruptedException { |
120 |
if (StringUtils.startsWith(family, "resultResult_publicationDataset_isSupplement")) { |
|
121 |
System.err.println(String.format("Error find relation %s on key %s and qualifier %s, message:'%s'", family, new String(rowkey), qualifier, msg)); |
|
122 |
throw new RuntimeException("SUCA!"); |
|
123 |
|
|
124 |
} |
|
125 |
|
|
126 |
|
|
127 |
|
|
128 |
|
|
120 | 129 |
final Put put = new Put(rowkey).add(Bytes.toBytes(family), Bytes.toBytes(qualifier), value); |
121 | 130 |
put.setDurability(Durability.SKIP_WAL); |
122 | 131 |
|
123 | 132 |
try { |
124 | 133 |
context.write(new ImmutableBytesWritable(rowkey), put); |
125 |
} catch (RetriesExhaustedWithDetailsException | NoSuchColumnFamilyException e) {
|
|
134 |
} catch (Throwable e) {
|
|
126 | 135 |
System.err.println( |
127 | 136 |
String.format("%s, rowkey %s, family %s, qualifier %s", |
128 | 137 |
msg, new String(rowkey), family, qualifier)); |
Also available in: Unified diff
adding check to understand the bug of wrong relation generated