|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.classifier.df.DFUtils
public final class DFUtils
Utility class that contains various helper methods
Method Summary | |
---|---|
static String |
elapsedTime(long milli)
Formats a time interval in milliseconds to a String in the form "hours:minutes:seconds:millis" |
static org.apache.hadoop.fs.Path[] |
listOutputFiles(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path outputPath)
Return a list of all files in the output directory |
static double[] |
readDoubleArray(DataInput in)
Reads a double[] from a DataInput |
static int[] |
readIntArray(DataInput in)
Reads an int[] from a DataInput |
static Node[] |
readNodeArray(DataInput in)
Reads a Node[] from a DataInput |
static void |
storeString(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path path,
String string)
Write a string to a path. |
static void |
storeWritable(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path path,
org.apache.hadoop.io.Writable writable)
|
static void |
writeArray(DataOutput out,
double[] array)
Writes a double[] into a DataOutput |
static void |
writeArray(DataOutput out,
int[] array)
Writes an int[] into a DataOutput |
static void |
writeArray(DataOutput out,
Node[] array)
Writes an Node[] into a DataOutput |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void writeArray(DataOutput out, Node[] array) throws IOException
IOException
public static Node[] readNodeArray(DataInput in) throws IOException
IOException
public static void writeArray(DataOutput out, double[] array) throws IOException
IOException
public static double[] readDoubleArray(DataInput in) throws IOException
IOException
public static void writeArray(DataOutput out, int[] array) throws IOException
IOException
public static int[] readIntArray(DataInput in) throws IOException
IOException
public static org.apache.hadoop.fs.Path[] listOutputFiles(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path outputPath) throws IOException
IOException
- if no file is foundpublic static String elapsedTime(long milli)
public static void storeWritable(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path path, org.apache.hadoop.io.Writable writable) throws IOException
IOException
public static void storeString(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path path, String string) throws IOException
conf
- From which the file system will be pickedpath
- Where the string will be writtenstring
- The string to write
IOException
- if things go poorly
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |