HDFS-12037. Ozone: Improvement rest API output format for better looking. Contributed by Weiwei Yang.
This commit is contained in:
parent
25c1b296e6
commit
7afddca9d5
|
@ -56,7 +56,8 @@ public class BucketInfo implements Comparable<BucketInfo> {
|
|||
mapper.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY);
|
||||
mapper.addMixIn(Object.class, MixIn.class);
|
||||
|
||||
WRITER = mapper.writer(filters);
|
||||
mapper.setFilterProvider(filters);
|
||||
WRITER = mapper.writerWithDefaultPrettyPrinter();
|
||||
}
|
||||
|
||||
private String volumeName;
|
||||
|
|
|
@ -54,7 +54,8 @@ public class KeyInfo implements Comparable<KeyInfo> {
|
|||
JsonAutoDetect.Visibility.ANY);
|
||||
mapper.addMixIn(Object.class, MixIn.class);
|
||||
|
||||
WRITER = mapper.writer(filters);
|
||||
mapper.setFilterProvider(filters);
|
||||
WRITER = mapper.writerWithDefaultPrettyPrinter();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -55,7 +55,8 @@ public class ListBuckets {
|
|||
JsonAutoDetect.Visibility.ANY);
|
||||
mapper.addMixIn(Object.class, MixIn.class);
|
||||
|
||||
WRITER = mapper.writer(filters);
|
||||
mapper.setFilterProvider(filters);
|
||||
WRITER = mapper.writerWithDefaultPrettyPrinter();
|
||||
}
|
||||
|
||||
private List<BucketInfo> buckets;
|
||||
|
|
|
@ -58,7 +58,8 @@ public class ListKeys {
|
|||
JsonAutoDetect.Visibility.ANY);
|
||||
mapper.addMixIn(Object.class, MixIn.class);
|
||||
|
||||
WRITER = mapper.writer(filters);
|
||||
mapper.setFilterProvider(filters);
|
||||
WRITER = mapper.writerWithDefaultPrettyPrinter();
|
||||
}
|
||||
|
||||
private String name;
|
||||
|
|
|
@ -59,7 +59,8 @@ public class ListVolumes {
|
|||
JsonAutoDetect.Visibility.ANY);
|
||||
mapper.addMixIn(Object.class, MixIn.class);
|
||||
|
||||
WRITER = mapper.writer(filters);
|
||||
mapper.setFilterProvider(filters);
|
||||
WRITER = mapper.writerWithDefaultPrettyPrinter();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -58,7 +58,8 @@ public class VolumeInfo implements Comparable<VolumeInfo> {
|
|||
JsonAutoDetect.Visibility.ANY);
|
||||
mapper.addMixIn(Object.class, MixIn.class);
|
||||
|
||||
WRITER = mapper.writer(filters);
|
||||
mapper.setFilterProvider(filters);
|
||||
WRITER = mapper.writerWithDefaultPrettyPrinter();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue