private void outputDict(TblColRef col, Dictionary<String> dict) throws IOException, InterruptedException { // output written to baseDir/colName/colName.rldict-r-00000 (etc) String dictFileName = col.getIdentity() + "/" + col.getName() + DICT_FILE_POSTFIX; try (ByteArrayOutputStream baos = new ByteArrayOutputStream(); DataOutputStream outputStream = new DataOutputStream(baos);) { outputStream.writeUTF(dict.getClass().getName()); dict.write(outputStream); mos.write(BatchConstants.CFG_OUTPUT_DICT, NullWritable.get(), new ArrayPrimitiveWritable(baos.toByteArray()), dictFileName); } mos.close(); } }
@Override public void doCleanup(Context context) throws IOException, InterruptedException { mos.close(); Path outputDirBase = new Path(context.getConfiguration().get(FileOutputFormat.OUTDIR), PathNameCuboidBase); FileSystem fs = FileSystem.get(context.getConfiguration()); if (!fs.exists(outputDirBase)) { fs.mkdirs(outputDirBase); SequenceFile .createWriter(context.getConfiguration(), SequenceFile.Writer.file(new Path(outputDirBase, "part-m-00000")), SequenceFile.Writer.keyClass(Text.class), SequenceFile.Writer.valueClass(Text.class)) .close(); } }
@Override public void doCleanup(Context context) throws IOException, InterruptedException { mos.close(); Path outputDirBase = new Path(context.getConfiguration().get(FileOutputFormat.OUTDIR), PathNameCuboidBase); FileSystem fs = FileSystem.get(context.getConfiguration()); if (!fs.exists(outputDirBase)) { fs.mkdirs(outputDirBase); SequenceFile .createWriter(context.getConfiguration(), SequenceFile.Writer.file(new Path(outputDirBase, "part-m-00000")), SequenceFile.Writer.keyClass(Text.class), SequenceFile.Writer.valueClass(Text.class)) .close(); } }
@Override protected void doCleanup(Context context) throws IOException, InterruptedException { if (isStatistics) { //output the hll info; List<Long> allCuboids = Lists.newArrayList(); allCuboids.addAll(cuboidHLLMap.keySet()); Collections.sort(allCuboids); logMapperAndCuboidStatistics(allCuboids); // for human check outputStatistics(allCuboids); } else { //dimension col if (cubeDesc.listDimensionColumnsExcludingDerived(true).contains(col)) { outputDimRangeInfo(); } // dic col if (buildDictInReducer) { Dictionary<String> dict = builder.build(); outputDict(col, dict); } } mos.close(); }
@Override public void cleanup(Context context) throws IOException, InterruptedException { mos.close(); } }
@Override protected void cleanup(Context context) throws IOException, InterruptedException { // multipleOutputs=null;//本地会失败 multipleOutputs.close(); } }
@Override public void cleanup(Context context) throws IOException, InterruptedException { multiOutputs.close(); multiOutputs = null; }
@Override public void cleanup(Context context) throws IOException, InterruptedException { if (debugOut != null) { debugOut.close(); } }
@Override public void cleanup(Context context) throws IOException, InterruptedException { if (debugOut != null) { debugOut.close(); } } protected void process(Context context, Fact fact, Derivation d,
protected void cleanup(Context context) throws IOException, InterruptedException { // Close multiple outputs! mos.close(); } }
@Override protected void cleanup(final Context context) throws IOException, InterruptedException { if (mos != null) { mos.close(); } }
@Override public void cleanup(Context context) throws IOException, InterruptedException { if (mout != null) { mout.close(); } log.info("Most input triples stored at one time by any reasoner: " + maxStored + " (reasoner for node: " + maxNode + ")"); } @Override
@Override public void cleanup(Context context) throws IOException, InterruptedException { mout.close(); log.info("Input records processed: " + totalInput); log.info("Distinct facts: " + totalFacts); log.info("Output facts: " + totalOutput); } @Override
public void cleanup(Context context) throws IOException, InterruptedException { mos.close(); } }
public void cleanup(Context context) throws IOException, InterruptedException { mos.close(); } }
public void cleanup(Context context) throws IOException, InterruptedException { mos.close(); } }
@Override protected void cleanup(Context context) throws IOException, InterruptedException { super.cleanup(context); mos.close(); } }
public void cleanup(Context context) throws IOException, InterruptedException { mos.close(); } }
@Override protected void cleanup(Context context) throws IOException, InterruptedException { if (debugOut != null) { debugOut.close(); } // Perform schema-level reasoning schema.closure(); // Output the complete schema context.write(NullWritable.get(), schema); } }
@Override protected void cleanup(Context context) throws IOException, InterruptedException { writeDecisions(NullWritable.get(), makeDecisionsDuringCleanup()); mos.close(); super.cleanup(context); } }