Project

General

Profile

« Previous | Next » 

Revision 53190

cleaned up unused method, using setDurability in put operation

View differences:

modules/dnet-mapreduce-jobs/branches/beta/src/main/java/eu/dnetlib/data/mapreduce/hbase/dataimport/ImportRecordsMapper.java
14 14
import eu.dnetlib.data.transform.XsltRowTransformerFactory;
15 15
import org.apache.commons.logging.Log;
16 16
import org.apache.commons.logging.LogFactory;
17
import org.apache.hadoop.hbase.client.Durability;
17 18
import org.apache.hadoop.hbase.client.Put;
18 19
import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
19 20
import org.apache.hadoop.hbase.util.Bytes;
......
59 60

  
60 61
				final byte[] rowKey = Bytes.toBytes(row.getKey());
61 62
				final Put put = new Put(rowKey);
62
				put.setWriteToWAL(JobParams.WRITE_TO_WAL);
63
				put.setDurability(Durability.SKIP_WAL);
63 64

  
64 65
				for (final Column<String, byte[]> col : row) {
65 66
					final byte[] family = Bytes.toBytes(row.getColumnFamily());
......
78 79
		}
79 80
	}
80 81

  
81
	private Map<String, String> getDatasourceTypeMap(final Context context) {
82
		final String dsType = context.getConfiguration().get("datasourceTypeMap");
83 82

  
84
		final Type token = new TypeToken<Map<String, String>>() {}.getType();
85
		final Map<String, String> dsMap = new Gson().fromJson(dsType, token);
86
		return dsMap;
87
	}
88

  
89 83
}

Also available in: Unified diff