hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From x...@apache.org
Subject [02/50] [abbrv] hadoop git commit: HDFS-12037. Ozone: Improvement rest API output format for better looking. Contributed by Weiwei Yang.
Date Wed, 19 Jul 2017 22:34:54 GMT
HDFS-12037. Ozone: Improvement rest API output format for better looking. Contributed by Weiwei
Yang.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/6798e6dd
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/6798e6dd
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/6798e6dd

Branch: refs/heads/HDFS-7240
Commit: 6798e6dd71316008fcec9fb891689e1c66311608
Parents: 3bc9202
Author: Weiwei Yang <wwei@apache.org>
Authored: Sat Jul 8 10:06:58 2017 +0800
Committer: Xiaoyu Yao <xyao@apache.org>
Committed: Wed Jul 12 17:11:46 2017 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/ozone/web/response/BucketInfo.java     | 3 ++-
 .../main/java/org/apache/hadoop/ozone/web/response/KeyInfo.java   | 3 ++-
 .../java/org/apache/hadoop/ozone/web/response/ListBuckets.java    | 3 ++-
 .../main/java/org/apache/hadoop/ozone/web/response/ListKeys.java  | 3 ++-
 .../java/org/apache/hadoop/ozone/web/response/ListVolumes.java    | 3 ++-
 .../java/org/apache/hadoop/ozone/web/response/VolumeInfo.java     | 3 ++-
 6 files changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/6798e6dd/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/BucketInfo.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/BucketInfo.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/BucketInfo.java
index 1e47c16..53c7119 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/BucketInfo.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/BucketInfo.java
@@ -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;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/6798e6dd/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/KeyInfo.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/KeyInfo.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/KeyInfo.java
index 69be5b9..e5cfd21 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/KeyInfo.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/KeyInfo.java
@@ -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();
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/hadoop/blob/6798e6dd/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/ListBuckets.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/ListBuckets.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/ListBuckets.java
index 3b0d32e..bc4e65b 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/ListBuckets.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/ListBuckets.java
@@ -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;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/6798e6dd/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/ListKeys.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/ListKeys.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/ListKeys.java
index fd76e4a..9dc77d2 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/ListKeys.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/ListKeys.java
@@ -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;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/6798e6dd/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/ListVolumes.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/ListVolumes.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/ListVolumes.java
index 797c0ef..b918349 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/ListVolumes.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/ListVolumes.java
@@ -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();
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/hadoop/blob/6798e6dd/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/VolumeInfo.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/VolumeInfo.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/VolumeInfo.java
index 8e6ec902..112b27e 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/VolumeInfo.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/response/VolumeInfo.java
@@ -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();
   }
 
   /**


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message