Package org.apache.hadoop.hdfs.web
Class JsonUtilClient
java.lang.Object
org.apache.hadoop.hdfs.web.JsonUtilClient
Utility methods used in WebHDFS/HttpFS JSON conversion.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<ErasureCodingPolicyInfo>getAllErasureCodingPolicies(Map<?, ?> json) getErasureCodeCodecs(Map<?, ?> json) static Collection<BlockStoragePolicy>getStoragePolicies(Map<?, ?> json) static Collection<org.apache.hadoop.fs.FileStatus>getTrashRoots(Map<?, ?> json) static org.apache.hadoop.fs.BlockLocation[]toBlockLocationArray(Map<?, ?> json) static BlockStoragePolicytoBlockStoragePolicy(Map<?, ?> m) toDiffListingList(List<?> objs) static ErasureCodingPolicytoECPolicy(Map<?, ?> m) static ErasureCodingPolicyInfotoECPolicyInfo(Map<?, ?> m) static org.apache.hadoop.fs.FileStatustoFileStatus(Map<?, ?> json) static HdfsFileStatustoFileStatus(Map<?, ?> json, boolean includesType) Convert a Json map to a HdfsFileStatus object.static org.apache.hadoop.fs.FsServerDefaultstoFsServerDefaults(Map<?, ?> json) static org.apache.hadoop.fs.FsStatustoFsStatus(Map<?, ?> json) static SnapshotDiffReporttoSnapshotDiffReport(Map<?, ?> json) static SnapshotDiffReportListingtoSnapshotDiffReportListing(Map<?, ?> json) static SnapshotStatus[]toSnapshotList(Map<?, ?> json) static SnapshottableDirectoryStatus[]toSnapshottableDirectoryList(Map<?, ?> json)
-
Constructor Details
-
JsonUtilClient
public JsonUtilClient()
-
-
Method Details
-
toFileStatus
Convert a Json map to a HdfsFileStatus object. -
getStoragePolicies
-
toBlockStoragePolicy
-
toECPolicy
-
toFsServerDefaults
-
toSnapshotDiffReport
-
toFsStatus
-
getAllErasureCodingPolicies
-
toECPolicyInfo
-
getErasureCodeCodecs
-
getTrashRoots
-
toFileStatus
-
toSnapshotDiffReportListing
-
toDiffListingList
public static List<SnapshotDiffReportListing.DiffReportListingEntry> toDiffListingList(List<?> objs) -
toSnapshottableDirectoryList
-
toSnapshotList
-
toBlockLocationArray
@VisibleForTesting public static org.apache.hadoop.fs.BlockLocation[] toBlockLocationArray(Map<?, ?> json) throws IOException- Throws:
IOException
-