code: private void closeRenameTmp2BaseFile()
      {
          try
          {
              this.currentWriter.close();
          }
          catch (IOException ex)
          {
              String logFormat = "Failed to HDFS file close. Continue file switch. : TargetUri={0}";
              String logMessage = MessageFormat.format(logFormat, this.currentOutputUri
                      + this.currentSuffix);
              logger.warn(logMessage, ex);
          }
  
          boolean isFileExists = true;
  
          try
          {
              isFileExists = this.fileSystem.exists(new Path(this.currentOutputUri));
          }
          catch (IOException ioex)
          {
              String logFormat = "Failed to search target file exists. Skip file rename. : TargetUri={0}";
              String logMessage = MessageFormat.format(logFormat, this.currentOutputUri);
              logger.warn(logMessage, ioex);
              return;
          }
  
          if (isFileExists)
          {
              String logFormat = "File exists renamed target. Skip file rename. : BeforeUri={0} , AfterUri={1}";
              String logMessage = MessageFormat.format(logFormat, this.currentOutputUri
                      + this.currentSuffix, this.currentOutputUri);
              logger.warn(logMessage);
          }
          else
          {
              try
              {
                  this.fileSystem.rename(new Path(this.currentOutputUri + this.currentSuffix),
                          new Path(this.currentOutputUri));
              }
              catch (IOException ex)
              {
                  String logFormat = "Failed to HDFS file rename. Skip rename file. : BeforeUri={0} , AfterUri={1}";
                  String logMessage = MessageFormat.format(logFormat, this.currentOutputUri
                          + this.currentSuffix, this.currentOutputUri);
                  logger.warn(logMessage, ex);
              }
          }
  
      }
docs: 現在使用している出力中ファイルをクローズし、一時ファイルサフィックスが無いファイル名称にリネームする。