hadoop git commit: HDFS-7756. Restore method signature for LocatedBlock#getLocations(). (Ted Yu via yliu)

2015-02-09 Thread yliu
Repository: hadoop
Updated Branches:
  refs/heads/trunk 1b56d1ce3 - 260b5e32c


HDFS-7756. Restore method signature for LocatedBlock#getLocations(). (Ted Yu 
via yliu)


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

Branch: refs/heads/trunk
Commit: 260b5e32c427d54c8c74b9f84432700317d1f282
Parents: 1b56d1c
Author: yliu y...@apache.org
Authored: Tue Feb 10 01:57:51 2015 +0800
Committer: yliu y...@apache.org
Committed: Tue Feb 10 01:57:51 2015 +0800

--
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt |  3 +
 .../hdfs/protocol/DatanodeInfoWithStorage.java  | 63 
 .../hadoop/hdfs/protocol/LocatedBlock.java  |  4 +-
 .../protocol/DatanodeInfoWithStorage.java   | 59 --
 .../blockmanagement/TestDatanodeManager.java|  8 +--
 5 files changed, 72 insertions(+), 65 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hadoop/blob/260b5e32/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
--
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt 
b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index 5a77829..a841c7e 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -887,6 +887,9 @@ Release 2.7.0 - UNRELEASED
 HDFS-7647. DatanodeManager.sortLocatedBlocks sorts DatanodeInfos
 but not StorageIDs. (Milan Desai via Arpit Agarwal)
 
+HDFS-7756. Restore method signature for LocatedBlock#getLocations(). (Ted
+Yu via yliu)
+
 Release 2.6.1 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/260b5e32/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/DatanodeInfoWithStorage.java
--
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/DatanodeInfoWithStorage.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/DatanodeInfoWithStorage.java
new file mode 100644
index 000..db2c2e7
--- /dev/null
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/DatanodeInfoWithStorage.java
@@ -0,0 +1,63 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hdfs.protocol;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.hdfs.StorageType;
+import org.apache.hadoop.hdfs.protocol.DatanodeInfo;
+
+@InterfaceAudience.Private
+@InterfaceStability.Evolving
+public class DatanodeInfoWithStorage extends DatanodeInfo {
+  private final String storageID;
+  private final StorageType storageType;
+
+  public DatanodeInfoWithStorage(DatanodeInfo from, String storageID,
+ StorageType storageType) {
+super(from);
+this.storageID = storageID;
+this.storageType = storageType;
+  }
+
+  public String getStorageID() {
+return storageID;
+  }
+
+  public StorageType getStorageType() {
+return storageType;
+  }
+
+  @Override
+  public boolean equals(Object o) {
+// allows this class to be used interchangeably with DatanodeInfo
+return super.equals(o);
+  }
+
+  @Override
+  public int hashCode() {
+// allows this class to be used interchangeably with DatanodeInfo
+return super.hashCode();
+  }
+
+  @Override
+  public String toString() {
+return DatanodeInfoWithStorage[ + super.toString() + , + storageID +
+, + storageType + ];
+  }
+}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/260b5e32/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedBlock.java
--
diff --git 

hadoop git commit: HDFS-7756. Restore method signature for LocatedBlock#getLocations(). (Ted Yu via yliu)

2015-02-09 Thread yliu
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 ae316705b - cc0668ebe


HDFS-7756. Restore method signature for LocatedBlock#getLocations(). (Ted Yu 
via yliu)


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

Branch: refs/heads/branch-2
Commit: cc0668ebe67078878d51d8158ac948383a3e351e
Parents: ae31670
Author: yliu y...@apache.org
Authored: Tue Feb 10 02:00:32 2015 +0800
Committer: yliu y...@apache.org
Committed: Tue Feb 10 02:00:32 2015 +0800

--
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt |  3 +
 .../hdfs/protocol/DatanodeInfoWithStorage.java  | 63 
 .../hadoop/hdfs/protocol/LocatedBlock.java  |  4 +-
 .../protocol/DatanodeInfoWithStorage.java   | 59 --
 .../blockmanagement/TestDatanodeManager.java|  8 +--
 5 files changed, 72 insertions(+), 65 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hadoop/blob/cc0668eb/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
--
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt 
b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index 3278dd8..8d49f3c 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -587,6 +587,9 @@ Release 2.7.0 - UNRELEASED
 HDFS-7647. DatanodeManager.sortLocatedBlocks sorts DatanodeInfos
 but not StorageIDs. (Milan Desai via Arpit Agarwal)
 
+HDFS-7756. Restore method signature for LocatedBlock#getLocations(). (Ted
+Yu via yliu)
+
 Release 2.6.1 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/cc0668eb/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/DatanodeInfoWithStorage.java
--
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/DatanodeInfoWithStorage.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/DatanodeInfoWithStorage.java
new file mode 100644
index 000..db2c2e7
--- /dev/null
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/DatanodeInfoWithStorage.java
@@ -0,0 +1,63 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hdfs.protocol;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.hdfs.StorageType;
+import org.apache.hadoop.hdfs.protocol.DatanodeInfo;
+
+@InterfaceAudience.Private
+@InterfaceStability.Evolving
+public class DatanodeInfoWithStorage extends DatanodeInfo {
+  private final String storageID;
+  private final StorageType storageType;
+
+  public DatanodeInfoWithStorage(DatanodeInfo from, String storageID,
+ StorageType storageType) {
+super(from);
+this.storageID = storageID;
+this.storageType = storageType;
+  }
+
+  public String getStorageID() {
+return storageID;
+  }
+
+  public StorageType getStorageType() {
+return storageType;
+  }
+
+  @Override
+  public boolean equals(Object o) {
+// allows this class to be used interchangeably with DatanodeInfo
+return super.equals(o);
+  }
+
+  @Override
+  public int hashCode() {
+// allows this class to be used interchangeably with DatanodeInfo
+return super.hashCode();
+  }
+
+  @Override
+  public String toString() {
+return DatanodeInfoWithStorage[ + super.toString() + , + storageID +
+, + storageType + ];
+  }
+}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/cc0668eb/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedBlock.java
--
diff --git