wholefile-transformer-lib/src/main/java/com/streamsets/pipeline/stage/processor/transformer/WholeFileTransformerProcessor.java
private Map<String, Object> generateHeaderAttrs(Path file) throws StageException {
    try {
      Map<String, Object> recordHeaderAttr = new HashMap<>();
      recordHeaderAttr.put(HeaderAttributeConstants.FILE, file.toAbsolutePath());
      recordHeaderAttr.put(HeaderAttributeConstants.FILE_NAME, file.getFileName());
      recordHeaderAttr.put(HeaderAttributeConstants.SIZE, Files.size(file));
      recordHeaderAttr.put(HeaderAttributeConstants.LAST_MODIFIED_TIME, Files.getLastModifiedTime(file));

      return recordHeaderAttr;
    } catch (IOException e) {
      throw new TransformerStageCheckedException(Errors.CONVERT_09, e.toString(), e);
    }
  }
private Map<String, Object> generateHeaderAttrs(Path file) throws StageException {
    try {
      Map<String, Object> recordHeaderAttr = new HashMap<>();
      recordHeaderAttr.put(HeaderAttributeConstants.FILE, file.toAbsolutePath());
      recordHeaderAttr.put(HeaderAttributeConstants.FILE_NAME, file.getFileName());
      recordHeaderAttr.put(HeaderAttributeConstants.SIZE, Files.size(file));
      recordHeaderAttr.put(HeaderAttributeConstants.LAST_MODIFIED_TIME, Files.getLastModifiedTime(file));

      return recordHeaderAttr;
    } catch (IOException e) {
      throw new TransformerStageCheckedException(Errors.CONVERT_09, e.toString(), e);
    }
  }
private Map < String , Object > generateHeaderAttrs ( Path file ) throws StageException { try { Map < String , Object > recordHeaderAttr = new HashMap <> ( ) ; recordHeaderAttr . put ( HeaderAttributeConstants . FILE , file . toAbsolutePath ( ) ) ; recordHeaderAttr . put ( HeaderAttributeConstants . FILE_NAME , file . getFileName ( ) ) ; recordHeaderAttr . put ( HeaderAttributeConstants . SIZE , Files . size ( file ) ) ; recordHeaderAttr . put ( HeaderAttributeConstants . LAST_MODIFIED_TIME , Files . getLastModifiedTime ( file ) ) ; return recordHeaderAttr ; } catch ( IOException e ) { throw new TransformerStageCheckedException ( Errors . CONVERT_09 , e . toString ( ) , e ) ; } }
Generate the Header attributes
@param file the {@link java.nio.file.Path} temporary parquet file path
Generate the Header attributes