示例#1
0
 public String resolveOutputName() throws IOException {
   if (_outputName == null) {
     MrsImageDataProvider dp =
         DataProviderFactory.createTempMrsImageDataProvider(getProviderProperties());
     _outputName = dp.getResourceName();
     addTempResource(_outputName);
   }
   return _outputName;
 }
示例#2
0
  /**
   * After a map op chain is executed, moveOutput will be called on the root map op. By default, the
   * map op's output is stored in a location other than where its final resting place will be, and
   * this method is responsible for moving the content to that location (e.g. toName).
   *
   * @param fs
   * @param toName
   * @throws IOException
   */
  @Override
  public void moveOutput(final String toName) throws IOException {
    // make sure the toName doesn't exist, otherwise the move() will move the output into a
    // directory
    // under the toName.
    DataProviderFactory.delete(toName, getProviderProperties());

    MrsImageDataProvider dp =
        DataProviderFactory.getMrsImageDataProvider(
            getOutputName(), AccessMode.READ, getProviderProperties());
    if (dp != null) {
      dp.move(toName);
    }
    _outputName = toName;
  }