kafka.etl
Class KafkaETLUtils
java.lang.Object
kafka.etl.KafkaETLUtils
public class KafkaETLUtils
- extends java.lang.Object
Field Summary |
static org.apache.hadoop.fs.PathFilter |
PATH_FILTER
|
Method Summary |
static java.lang.String |
findContainingJar(java.lang.Class my_class,
java.lang.ClassLoader loader)
|
static java.lang.String |
findContainingJar(java.lang.String fileName,
java.lang.ClassLoader loader)
|
static byte[] |
getBytes(org.apache.hadoop.io.BytesWritable val)
|
static java.lang.String |
getFileName(org.apache.hadoop.fs.Path path)
|
static org.apache.hadoop.fs.Path |
getLastPath(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.FileSystem fs)
|
static Props |
getPropsFromJob(org.apache.hadoop.conf.Configuration conf)
|
static Props |
readProps(java.lang.String file)
|
static java.util.List<java.lang.String> |
readText(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path)
|
static java.util.List<java.lang.String> |
readText(org.apache.hadoop.fs.FileSystem fs,
java.lang.String inputFile)
|
static void |
setPropsInJob(org.apache.hadoop.conf.Configuration conf,
Props props)
|
static void |
writeText(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path outPath,
java.lang.String content)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PATH_FILTER
public static org.apache.hadoop.fs.PathFilter PATH_FILTER
KafkaETLUtils
public KafkaETLUtils()
getLastPath
public static org.apache.hadoop.fs.Path getLastPath(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.FileSystem fs)
throws java.io.IOException
- Throws:
java.io.IOException
getFileName
public static java.lang.String getFileName(org.apache.hadoop.fs.Path path)
throws java.io.IOException
- Throws:
java.io.IOException
readText
public static java.util.List<java.lang.String> readText(org.apache.hadoop.fs.FileSystem fs,
java.lang.String inputFile)
throws java.io.IOException,
java.io.FileNotFoundException
- Throws:
java.io.IOException
java.io.FileNotFoundException
readText
public static java.util.List<java.lang.String> readText(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path)
throws java.io.IOException,
java.io.FileNotFoundException
- Throws:
java.io.IOException
java.io.FileNotFoundException
writeText
public static void writeText(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path outPath,
java.lang.String content)
throws java.io.IOException
- Throws:
java.io.IOException
getPropsFromJob
public static Props getPropsFromJob(org.apache.hadoop.conf.Configuration conf)
setPropsInJob
public static void setPropsInJob(org.apache.hadoop.conf.Configuration conf,
Props props)
readProps
public static Props readProps(java.lang.String file)
throws java.io.IOException
- Throws:
java.io.IOException
findContainingJar
public static java.lang.String findContainingJar(java.lang.Class my_class,
java.lang.ClassLoader loader)
findContainingJar
public static java.lang.String findContainingJar(java.lang.String fileName,
java.lang.ClassLoader loader)
getBytes
public static byte[] getBytes(org.apache.hadoop.io.BytesWritable val)