public class IOManagerImpl extends Object implements IOManager
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
IOManagerImpl(String... tempDirs)
Constructs a new IOManager.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Removes all temporary files.
|
BufferFileReader |
createBufferFileReader(FileIOChannel.ID channelID) |
BufferFileWriter |
createBufferFileWriter(FileIOChannel.ID channelID) |
FileIOChannel.ID |
createChannel() |
FileIOChannel.ID |
createChannel(String prefix) |
FileIOChannel.Enumerator |
createChannelEnumerator() |
static void |
deleteChannel(FileIOChannel.ID channel)
Deletes the file underlying the given channel.
|
File[] |
getSpillingDirectories()
Gets the directories that the I/O manager spills to.
|
String[] |
getSpillingDirectoriesPaths()
Gets the directories that the I/O manager spills to, as path strings.
|
static String[] |
splitPaths(String separatedPaths) |
String[] |
tempDirs() |
public IOManagerImpl(String... tempDirs)
tempDirs
- The basic directories for files underlying anonymous channels.public void close() throws Exception
close
in interface AutoCloseable
Exception
public FileIOChannel.ID createChannel()
createChannel
in interface IOManager
public FileIOChannel.ID createChannel(String prefix)
createChannel
in interface IOManager
public FileIOChannel.Enumerator createChannelEnumerator()
createChannelEnumerator
in interface IOManager
public static void deleteChannel(FileIOChannel.ID channel)
channel
- The channel to be deleted.public File[] getSpillingDirectories()
public String[] getSpillingDirectoriesPaths()
public BufferFileWriter createBufferFileWriter(FileIOChannel.ID channelID) throws IOException
createBufferFileWriter
in interface IOManager
IOException
public BufferFileReader createBufferFileReader(FileIOChannel.ID channelID) throws IOException
createBufferFileReader
in interface IOManager
IOException
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.