removed invalid deletion
This commit is contained in:
parent
ddd6a7ceb3
commit
2e11197142
|
@ -36,7 +36,6 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
|
||||||
import eu.dnetlib.dhp.actionmanager.ror.GenerateRorActionSetJob;
|
import eu.dnetlib.dhp.actionmanager.ror.GenerateRorActionSetJob;
|
||||||
import eu.dnetlib.dhp.application.ArgumentApplicationParser;
|
import eu.dnetlib.dhp.application.ArgumentApplicationParser;
|
||||||
import eu.dnetlib.dhp.common.HdfsSupport;
|
|
||||||
import eu.dnetlib.dhp.common.aggregation.AggregatorReport;
|
import eu.dnetlib.dhp.common.aggregation.AggregatorReport;
|
||||||
|
|
||||||
public class BaseAnalyzerJob {
|
public class BaseAnalyzerJob {
|
||||||
|
@ -48,8 +47,7 @@ public class BaseAnalyzerJob {
|
||||||
public static void main(final String[] args) throws Exception {
|
public static void main(final String[] args) throws Exception {
|
||||||
|
|
||||||
final String jsonConfiguration = IOUtils
|
final String jsonConfiguration = IOUtils
|
||||||
.toString(
|
.toString(GenerateRorActionSetJob.class
|
||||||
GenerateRorActionSetJob.class
|
|
||||||
.getResourceAsStream("/eu/dnetlib/dhp/collection/plugin/base/action_set_parameters.json"));
|
.getResourceAsStream("/eu/dnetlib/dhp/collection/plugin/base/action_set_parameters.json"));
|
||||||
|
|
||||||
final ArgumentApplicationParser parser = new ArgumentApplicationParser(jsonConfiguration);
|
final ArgumentApplicationParser parser = new ArgumentApplicationParser(jsonConfiguration);
|
||||||
|
@ -78,8 +76,6 @@ public class BaseAnalyzerJob {
|
||||||
final String inputPath,
|
final String inputPath,
|
||||||
final String outputPath) throws IOException {
|
final String outputPath) throws IOException {
|
||||||
|
|
||||||
HdfsSupport.remove(outputPath, spark.sparkContext().hadoopConfiguration());
|
|
||||||
|
|
||||||
try (final FileSystem fs = FileSystem.get(new Configuration());
|
try (final FileSystem fs = FileSystem.get(new Configuration());
|
||||||
final AggregatorReport report = new AggregatorReport()) {
|
final AggregatorReport report = new AggregatorReport()) {
|
||||||
final Map<String, AtomicLong> fields = new HashMap<>();
|
final Map<String, AtomicLong> fields = new HashMap<>();
|
||||||
|
@ -163,12 +159,9 @@ public class BaseAnalyzerJob {
|
||||||
private static void saveReport(final FileSystem fs, final String outputPath, final Map<String, AtomicLong> fields)
|
private static void saveReport(final FileSystem fs, final String outputPath, final Map<String, AtomicLong> fields)
|
||||||
throws JsonProcessingException, IOException {
|
throws JsonProcessingException, IOException {
|
||||||
try (final SequenceFile.Writer writer = SequenceFile
|
try (final SequenceFile.Writer writer = SequenceFile
|
||||||
.createWriter(
|
.createWriter(fs.getConf(), SequenceFile.Writer.file(new Path(outputPath)), SequenceFile.Writer
|
||||||
fs.getConf(), SequenceFile.Writer.file(new Path(outputPath)), SequenceFile.Writer
|
.keyClass(IntWritable.class), SequenceFile.Writer
|
||||||
.keyClass(IntWritable.class),
|
.valueClass(Text.class), SequenceFile.Writer.compression(SequenceFile.CompressionType.BLOCK, new DeflateCodec()))) {
|
||||||
SequenceFile.Writer
|
|
||||||
.valueClass(Text.class),
|
|
||||||
SequenceFile.Writer.compression(SequenceFile.CompressionType.BLOCK, new DeflateCodec()))) {
|
|
||||||
|
|
||||||
final Text key = new Text();
|
final Text key = new Text();
|
||||||
final Text value = new Text();
|
final Text value = new Text();
|
||||||
|
|
Loading…
Reference in New Issue