|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hdfs.DFSUtil
@InterfaceAudience.Private public class DFSUtil
Nested Class Summary | |
---|---|
static class |
DFSUtil.ErrorSimulator
Utility class to facilitate junit test error simulation. |
Constructor Summary | |
---|---|
DFSUtil()
|
Method Summary | |
---|---|
static String |
byteArray2String(byte[][] pathComponents)
Given a list of path components returns a path as a UTF8 String |
static byte[][] |
bytes2byteArray(byte[] bytes,
byte separator)
Splits the array of bytes into array of arrays of bytes on byte separator |
static byte[][] |
bytes2byteArray(byte[] bytes,
int len,
byte separator)
Splits first len bytes in bytes to array of arrays of bytes on byte separator |
static String |
bytes2String(byte[] bytes)
Converts a byte array to a string using UTF8 encoding. |
static boolean |
isValidName(String src)
Whether the pathname is valid. |
static org.apache.hadoop.fs.BlockLocation[] |
locatedBlocks2Locations(LocatedBlocks blocks)
Convert a LocatedBlocks to BlockLocations[] |
static byte[] |
string2Bytes(String str)
Converts a string to a byte array using UTF8 encoding. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DFSUtil()
Method Detail |
---|
public static boolean isValidName(String src)
public static String bytes2String(byte[] bytes)
public static byte[] string2Bytes(String str)
public static String byteArray2String(byte[][] pathComponents)
public static byte[][] bytes2byteArray(byte[] bytes, byte separator)
bytes
- the array of bytes to splitseparator
- the delimiting bytepublic static byte[][] bytes2byteArray(byte[] bytes, int len, byte separator)
bytes
- the byte array to splitlen
- the number of bytes to splitseparator
- the delimiting bytepublic static org.apache.hadoop.fs.BlockLocation[] locatedBlocks2Locations(LocatedBlocks blocks)
blocks
- a LocatedBlocks
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |