public class HadoopHelper extends Object
Constructor and Description |
---|
HadoopHelper() |
Modifier and Type | Method and Description |
---|---|
static org.apache.hadoop.conf.Configuration |
getDefaultConf() |
static String |
getTrackletInfo(String storeDir)
Get the content of info.txt in Har.
|
static Tracklet |
retrieveTracklet(String storeDir)
Retrieve a tracklet from the HDFS or HAR.
|
static Tracklet |
retrieveTracklet(String storeDir,
org.apache.hadoop.fs.FileSystem hdfs)
Retrieve a tracklet from the HDFS or HAR.
|
static void |
storeTracklet(String storeDir,
Tracklet tracklet,
org.apache.hadoop.fs.FileSystem hdfs)
Store a tracklet to the HDFS.
|
public static org.apache.hadoop.conf.Configuration getDefaultConf()
@Nonnull public static Tracklet retrieveTracklet(@Nonnull String storeDir) throws IOException, URISyntaxException
storeDir
- the directory storing the tracklet (including only data of this tracklet).IOException
- on failure of retrieving the tracklet.
URISyntaxException
- on syntax error detected in the
storeDir.
@Nonnull public static Tracklet retrieveTracklet(@Nonnull String storeDir, @Nonnull org.apache.hadoop.fs.FileSystem hdfs) throws IOException, URISyntaxException
storeDir
- the directory storing the tracklet (including only data of this tracklet).IOException
- on failure of retrieving the tracklet.
URISyntaxException
- on syntax error detected in the
storeDir.
public static String getTrackletInfo(@Nonnull String storeDir) throws IOException, URISyntaxException
storeDir
- the directory storing the tracklet.IOException
- on failure of retrieving the
tracklet.
URISyntaxException
- on syntax error detected
in the storeDir.
public static void storeTracklet(@Nonnull String storeDir, @Nonnull Tracklet tracklet, @Nonnull org.apache.hadoop.fs.FileSystem hdfs) throws Exception
storeDir
- the directory storing the tracklet.tracklet
- the tracklet to store.IOException
- on failure creating and
writing files in HDFS.
Exception