public final class TemporaryStorage extends Object
Modifier and Type | Method and Description |
---|---|
static List<org.apache.hadoop.fs.Path> |
list(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path pathPattern)
Resolves the raw path pattern into the concrete path list.
|
static List<org.apache.hadoop.fs.FileStatus> |
listStatus(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path pathPattern)
Resolves the raw path pattern into the concrete file status list.
|
static <V> ModelInput<V> |
openInput(org.apache.hadoop.conf.Configuration conf,
Class<V> dataType,
org.apache.hadoop.fs.FileStatus status,
InputStream input)
Opens a temporary
ModelInput for the specified path. |
static <V> ModelInput<V> |
openInput(org.apache.hadoop.conf.Configuration conf,
Class<V> dataType,
org.apache.hadoop.fs.Path path)
Opens a temporary
ModelInput for the specified path. |
static <V> ModelOutput<V> |
openOutput(org.apache.hadoop.conf.Configuration conf,
Class<V> dataType,
OutputStream output)
Opens a temporary
ModelOutput for the specified output. |
static <V> ModelOutput<V> |
openOutput(org.apache.hadoop.conf.Configuration conf,
Class<V> dataType,
OutputStream output,
org.apache.hadoop.io.compress.CompressionCodec compressionCodec)
Opens a temporary
ModelOutput for the specified output. |
static <V> ModelOutput<V> |
openOutput(org.apache.hadoop.conf.Configuration conf,
Class<V> dataType,
org.apache.hadoop.fs.Path path)
Opens a temporary
ModelOutput for the specified path. |
static <V> ModelOutput<V> |
openOutput(org.apache.hadoop.conf.Configuration conf,
Class<V> dataType,
org.apache.hadoop.fs.Path path,
org.apache.hadoop.io.compress.CompressionCodec compressionCodec)
Opens a temporary
ModelOutput for the specified path. |
public static List<org.apache.hadoop.fs.Path> list(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path pathPattern) throws IOException
conf
- current configurationpathPattern
- path pattern which describes temporary storageIOException
- if failed to resolve path patternIllegalArgumentException
- if some parameters were null
public static List<org.apache.hadoop.fs.FileStatus> listStatus(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path pathPattern) throws IOException
conf
- current configurationpathPattern
- path pattern which describes temporary storageIOException
- if failed to resolve path patternIllegalArgumentException
- if some parameters were null
public static <V> ModelInput<V> openInput(org.apache.hadoop.conf.Configuration conf, Class<V> dataType, org.apache.hadoop.fs.Path path) throws IOException
ModelInput
for the specified path.V
- data typeconf
- configurationdataType
- data typepath
- source path (must not contain wildcards)ModelInput
IOException
- if failed to open inputIllegalArgumentException
- if some parameters were null
public static <V> ModelInput<V> openInput(org.apache.hadoop.conf.Configuration conf, Class<V> dataType, org.apache.hadoop.fs.FileStatus status, InputStream input) throws IOException
ModelInput
for the specified path.V
- data typeconf
- configurationdataType
- data typestatus
- source file statusinput
- source file contentModelInput
IOException
- if failed to open inputIllegalArgumentException
- if some parameters were null
public static <V> ModelOutput<V> openOutput(org.apache.hadoop.conf.Configuration conf, Class<V> dataType, org.apache.hadoop.fs.Path path) throws IOException
ModelOutput
for the specified path.V
- data typeconf
- configurationdataType
- data typepath
- target pathModelOutput
IOException
- if failed to open outputIllegalArgumentException
- if some parameters were null
public static <V> ModelOutput<V> openOutput(org.apache.hadoop.conf.Configuration conf, Class<V> dataType, org.apache.hadoop.fs.Path path, org.apache.hadoop.io.compress.CompressionCodec compressionCodec) throws IOException
ModelOutput
for the specified path.V
- data typeconf
- configurationdataType
- data typepath
- target pathcompressionCodec
- compression codec, or null if not compressedModelOutput
IOException
- if failed to open outputIllegalArgumentException
- if some parameters were null
public static <V> ModelOutput<V> openOutput(org.apache.hadoop.conf.Configuration conf, Class<V> dataType, OutputStream output) throws IOException
ModelOutput
for the specified output.V
- data typeconf
- configurationdataType
- data typeoutput
- target output streamModelOutput
IOException
- if failed to open outputIllegalArgumentException
- if some parameters were null
public static <V> ModelOutput<V> openOutput(org.apache.hadoop.conf.Configuration conf, Class<V> dataType, OutputStream output, org.apache.hadoop.io.compress.CompressionCodec compressionCodec) throws IOException
ModelOutput
for the specified output.V
- data typeconf
- configurationdataType
- data typeoutput
- target output streamcompressionCodec
- compression codec, or null if not compressedModelOutput
IOException
- if failed to open outputIllegalArgumentException
- if some parameters were null
Copyright © 2011–2018 Asakusa Framework Team. All rights reserved.