MCPcopy Create free account
hub / github.com/apache/pig / createInputFile

Method createInputFile

test/org/apache/pig/test/Util.java:329–337  ·  view source on GitHub ↗

Helper to create a temporary file with given input data for use in test cases. @param tmpFilenamePrefix file-name prefix @param tmpFilenameSuffix file-name suffix @param inputData input for test cases, each string in inputData[] is written on one line @return File handle to

(String tmpFilenamePrefix,
			                           String tmpFilenameSuffix,
			                           String[] inputData)

Source from the content-addressed store, hash-verified

327 * @throws IOException
328 */
329 static public File createInputFile(String tmpFilenamePrefix,
330 String tmpFilenameSuffix,
331 String[] inputData)
332 throws IOException {
333 File f = File.createTempFile(tmpFilenamePrefix, tmpFilenameSuffix);
334 f.deleteOnExit();
335 writeToFile(f, inputData);
336 return f;
337 }
338
339 static public File createLocalInputFile(String filename, String[] inputData)
340 throws IOException {

Calls 11

writeToFileMethod · 0.95
toConfigurationMethod · 0.95
getFileSystemMethod · 0.80
replaceMethod · 0.65
existsMethod · 0.65
createMethod · 0.65
closeMethod · 0.65
getMethod · 0.65
createTempFileMethod · 0.45
printMethod · 0.45
getPropertiesMethod · 0.45

Tested by

no test coverage detected