hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sur...@apache.org
Subject svn commit: r1076436 - in /hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode: DataNodeTestUtils.java TestDatanodeUtils.java
Date Wed, 02 Mar 2011 22:19:42 GMT
Author: suresh
Date: Wed Mar  2 22:19:41 2011
New Revision: 1076436

URL: http://svn.apache.org/viewvc?rev=1076436&view=rev
Log:
HDFS-1695. HDFS federation: Fix testOIV and TestDatanodeUtils. Deleting and adding missed
files in the commit r1076412. Contributed by Jakob Homan and Tanping Wang.

Added:
    hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/DataNodeTestUtils.java
Removed:
    hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestDatanodeUtils.java

Added: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/DataNodeTestUtils.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/DataNodeTestUtils.java?rev=1076436&view=auto
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/DataNodeTestUtils.java
(added)
+++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/DataNodeTestUtils.java
Wed Mar  2 22:19:41 2011
@@ -0,0 +1,40 @@
+/**
+ * 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.server.datanode;
+
+import java.io.IOException;
+
+import org.apache.hadoop.hdfs.server.protocol.DatanodeRegistration;
+
+/**
+ * Utility class for accessing package-private DataNode information during tests.
+ *
+ */
+public class DataNodeTestUtils {
+  public static DatanodeRegistration 
+  getDNRegistrationByMachineName(DataNode dn, String mName) {
+    return dn.getDNRegistrationByMachineName(mName);
+  }
+  
+  public static DatanodeRegistration 
+  getDNRegistrationForBP(DataNode dn, String bpid) throws IOException {
+    return dn.getDNRegistrationForBP(bpid);
+  }
+}



Mime
View raw message