public String getFilePath ( String dirPathTemplate , Record record , Date recordTime ) throws StageException { String dirPath ; // get directory path if ( dirPathTemplateInHeader ) { dirPath = record . getHeader ( ) . getAttribute ( DataLakeTarget . TARGET_DIRECTORY_HEADER ) ; Utils . checkArgument ( ! ( dirPath == null || dirPath . isEmpty ( ) ) , "Directory Path cannot be null" ) ; } else { dirPath = resolvePath ( dirPathTemplateEval , dirPathTemplateVars , dirPathTemplate , recordTime , record ) ; } // SDC-5492: replace "//" to "/" in file path dirPath = dirPath . replaceAll ( "/+" , "/" ) ; if ( dirPath . endsWith ( "/" ) ) { dirPath = dirPath . substring ( 0 , dirPath . length ( ) - 1 ) ; } return outputStreamHelper . getTempFilePath ( dirPath , record , recordTime ) ; }
Returns the temp file path to write records to