Constructor and Description |
---|
JsonUtil() |
Modifier and Type | Method and Description |
---|---|
static org.apache.hadoop.fs.ContentSummary |
toContentSummary(Map<?,?> json)
Convert a Json map to a ContentSummary.
|
static org.apache.hadoop.security.token.Token<org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier> |
toDelegationToken(Map<?,?> json)
Convert a Json map to a Token of DelegationTokenIdentifier.
|
static org.apache.hadoop.hdfs.protocol.HdfsFileStatus |
toFileStatus(Map<?,?> json,
boolean includesType)
Convert a Json map to a HdfsFileStatus object.
|
static String |
toJsonString(org.apache.hadoop.fs.ContentSummary contentsummary)
Convert a ContentSummary to a Json string.
|
static String |
toJsonString(Exception e)
Convert an exception object to a Json string.
|
static String |
toJsonString(org.apache.hadoop.hdfs.protocol.HdfsFileStatus status,
boolean includeType)
Convert a HdfsFileStatus object to a Json string.
|
static String |
toJsonString(org.apache.hadoop.hdfs.protocol.LocatedBlocks locatedblocks)
Convert LocatedBlocks to a Json string.
|
static String |
toJsonString(org.apache.hadoop.fs.MD5MD5CRC32FileChecksum checksum)
Convert a MD5MD5CRC32FileChecksum to a Json string.
|
static String |
toJsonString(String key,
Object value)
Convert a key-value pair to a Json string.
|
static String |
toJsonString(org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> token)
Convert a token object to a Json string.
|
static String |
toJsonString(org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier>[] tokens)
Convert a token object to a JSON string.
|
static org.apache.hadoop.hdfs.protocol.LocatedBlocks |
toLocatedBlocks(Map<?,?> json)
Convert a Json map to LocatedBlock.
|
static org.apache.hadoop.fs.MD5MD5CRC32FileChecksum |
toMD5MD5CRC32FileChecksum(Map<?,?> json)
Convert a Json map to a MD5MD5CRC32FileChecksum.
|
static org.apache.hadoop.ipc.RemoteException |
toRemoteException(Map<?,?> json)
Convert a Json map to a RemoteException.
|
static org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> |
toToken(Map<?,?> m)
Convert a Json map to a Token.
|
static List<org.apache.hadoop.security.token.Token<?>> |
toTokenList(Map<?,?> json)
Convert a JSON map to a List
|
public JsonUtil()
public static String toJsonString(org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> token) throws IOException
IOException
public static org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> toToken(Map<?,?> m) throws IOException
IOException
public static org.apache.hadoop.security.token.Token<org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier> toDelegationToken(Map<?,?> json) throws IOException
IOException
public static String toJsonString(org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier>[] tokens) throws IOException
IOException
public static List<org.apache.hadoop.security.token.Token<?>> toTokenList(Map<?,?> json) throws IOException
IOException
public static String toJsonString(Exception e)
public static org.apache.hadoop.ipc.RemoteException toRemoteException(Map<?,?> json)
public static String toJsonString(String key, Object value)
public static String toJsonString(org.apache.hadoop.hdfs.protocol.HdfsFileStatus status, boolean includeType)
public static org.apache.hadoop.hdfs.protocol.HdfsFileStatus toFileStatus(Map<?,?> json, boolean includesType)
public static String toJsonString(org.apache.hadoop.hdfs.protocol.LocatedBlocks locatedblocks) throws IOException
IOException
public static org.apache.hadoop.hdfs.protocol.LocatedBlocks toLocatedBlocks(Map<?,?> json) throws IOException
IOException
public static String toJsonString(org.apache.hadoop.fs.ContentSummary contentsummary)
public static org.apache.hadoop.fs.ContentSummary toContentSummary(Map<?,?> json)
public static String toJsonString(org.apache.hadoop.fs.MD5MD5CRC32FileChecksum checksum)
public static org.apache.hadoop.fs.MD5MD5CRC32FileChecksum toMD5MD5CRC32FileChecksum(Map<?,?> json) throws IOException
IOException
Copyright © 2013 Apache Software Foundation. All Rights Reserved.