/** * Creates and initializes multiple outputs support, * it should be instantiated in the Mapper/Reducer setup method. * * @param context the TaskInputOutputContext object */ public AvroMultipleOutputs( TaskInputOutputContext<?, ?, ?, ?> context) { this.context = context; namedOutputs = Collections.unmodifiableSet( new HashSet<>(AvroMultipleOutputs.getNamedOutputsList(context))); recordWriters = new HashMap<>(); countersEnabled = getCountersEnabled(context); }
/** * Creates and initializes multiple outputs support, * it should be instantiated in the Mapper/Reducer setup method. * * @param context the TaskInputOutputContext object */ public AvroMultipleOutputs( TaskInputOutputContext<?, ?, ?, ?> context) { this.context = context; namedOutputs = Collections.unmodifiableSet( new HashSet<String>(AvroMultipleOutputs.getNamedOutputsList(context))); recordWriters = new HashMap<String, RecordWriter<?, ?>>(); countersEnabled = getCountersEnabled(context); }