forked from D-Net/dnet-hadoop
[broker] added coalesce(1) on the stats dataset before storing it on postgres
This commit is contained in:
parent
c30f3ce647
commit
ae2b47b29d
|
@ -80,6 +80,7 @@ public class GenerateStatsJob {
|
||||||
.map(
|
.map(
|
||||||
(MapFunction<Tuple2<String, DatasourceStats>, DatasourceStats>) t -> t._2,
|
(MapFunction<Tuple2<String, DatasourceStats>, DatasourceStats>) t -> t._2,
|
||||||
Encoders.bean(DatasourceStats.class))
|
Encoders.bean(DatasourceStats.class))
|
||||||
|
.coalesce(1)
|
||||||
.write()
|
.write()
|
||||||
.mode(SaveMode.Overwrite)
|
.mode(SaveMode.Overwrite)
|
||||||
.jdbc(dbUrl, "oa_datasource_stats_temp", connectionProperties);
|
.jdbc(dbUrl, "oa_datasource_stats_temp", connectionProperties);
|
||||||
|
|
Loading…
Reference in New Issue