org.apache.flink.shaded.netty4.io.netty.handler.codec.http.multipart.DiskFileUpload Java Examples

The following examples show how to use org.apache.flink.shaded.netty4.io.netty.handler.codec.http.multipart.DiskFileUpload. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FileUploadHandler.java    From flink with Apache License 2.0 5 votes vote down vote up
public FileUploadHandler(final Path uploadDir) {
	super(true);

	// the clean up of temp files when jvm exits is handled by org.apache.flink.util.ShutdownHookUtil; thus,
	// it's no need to register those files (post chunks and upload file chunks) to java.io.DeleteOnExitHook
	// which may lead to memory leak.
	DiskAttribute.deleteOnExitTemporaryFile = false;
	DiskFileUpload.deleteOnExitTemporaryFile = false;

	DiskFileUpload.baseDirectory = uploadDir.normalize().toAbsolutePath().toString();
	// share the same directory with file upload for post chunks storage.
	DiskAttribute.baseDirectory = DiskFileUpload.baseDirectory;

	this.uploadDir = requireNonNull(uploadDir);
}
 
Example #2
Source File: FileUploadHandler.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
public FileUploadHandler(final Path uploadDir) {
	super(true);
	DiskFileUpload.baseDirectory = uploadDir.normalize().toAbsolutePath().toString();
	this.uploadDir = requireNonNull(uploadDir);
}
 
Example #3
Source File: FileUploadHandler.java    From flink with Apache License 2.0 4 votes vote down vote up
public FileUploadHandler(final Path uploadDir) {
	super(true);
	DiskFileUpload.baseDirectory = uploadDir.normalize().toAbsolutePath().toString();
	this.uploadDir = requireNonNull(uploadDir);
}