|
@@ -20,19 +20,19 @@
|
|
package org.apache.hadoop.hdfs.server.datanode;
|
|
package org.apache.hadoop.hdfs.server.datanode;
|
|
|
|
|
|
|
|
|
|
|
|
+import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
+import com.fasterxml.jackson.databind.ObjectReader;
|
|
|
|
+import com.fasterxml.jackson.databind.SerializationFeature;
|
|
import com.google.common.base.Preconditions;
|
|
import com.google.common.base.Preconditions;
|
|
import org.apache.hadoop.classification.InterfaceAudience;
|
|
import org.apache.hadoop.classification.InterfaceAudience;
|
|
import org.apache.hadoop.classification.InterfaceStability;
|
|
import org.apache.hadoop.classification.InterfaceStability;
|
|
-import org.codehaus.jackson.map.ObjectMapper;
|
|
|
|
-import org.codehaus.jackson.map.ObjectReader;
|
|
|
|
-import org.codehaus.jackson.map.SerializationConfig;
|
|
|
|
-
|
|
|
|
-import static org.codehaus.jackson.map.type.TypeFactory.defaultInstance;
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.LinkedList;
|
|
import java.util.LinkedList;
|
|
|
|
|
|
|
|
+import static com.fasterxml.jackson.databind.type.TypeFactory.defaultInstance;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* Helper class that reports how much work has has been done by the node.
|
|
* Helper class that reports how much work has has been done by the node.
|
|
*/
|
|
*/
|
|
@@ -41,8 +41,7 @@ import java.util.LinkedList;
|
|
public class DiskBalancerWorkStatus {
|
|
public class DiskBalancerWorkStatus {
|
|
private static final ObjectMapper MAPPER = new ObjectMapper();
|
|
private static final ObjectMapper MAPPER = new ObjectMapper();
|
|
private static final ObjectMapper MAPPER_WITH_INDENT_OUTPUT =
|
|
private static final ObjectMapper MAPPER_WITH_INDENT_OUTPUT =
|
|
- new ObjectMapper().enable(
|
|
|
|
- SerializationConfig.Feature.INDENT_OUTPUT);
|
|
|
|
|
|
+ new ObjectMapper().enable(SerializationFeature.INDENT_OUTPUT);
|
|
private static final ObjectReader READER_WORKSTATUS =
|
|
private static final ObjectReader READER_WORKSTATUS =
|
|
new ObjectMapper().reader(DiskBalancerWorkStatus.class);
|
|
new ObjectMapper().reader(DiskBalancerWorkStatus.class);
|
|
private static final ObjectReader READER_WORKENTRY = new ObjectMapper()
|
|
private static final ObjectReader READER_WORKENTRY = new ObjectMapper()
|