Pārlūkot izejas kodu

commit 7a2264c68e31bd32443d9ed791cd9a1d16d00305
Author: Konstantin Boudnik <cos@yahoo-inc.com>
Date: Mon May 17 11:16:52 2010 -0700

HDFS:1157 from https://issues.apache.org/jira/secure/attachment/12444716/hdfs-1157.patch

+++ b/YAHOO-CHANGES.txt
+ HDFS-1157. Modifications introduced by HDFS-1150 are breaking aspect's
+ bindings (cos)


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-patches@1077468 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley 14 gadi atpakaļ
vecāks
revīzija
10a5b3a371

+ 9 - 6
src/test/system/aop/org/apache/hadoop/hdfs/server/datanode/DataNodeAspect.aj

@@ -26,6 +26,7 @@ import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hdfs.test.system.DNProtocol;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.test.system.DaemonProtocol;
+import org.apache.hadoop.hdfs.server.datanode.SecureDataNodeStarter.SecureResources;
 
 public privileged aspect DataNodeAspect {
   declare parents : DataNode implements DNProtocol;
@@ -34,18 +35,20 @@ public privileged aspect DataNodeAspect {
     return super.getConf();
   }
 
-  pointcut dnConstructorPointcut(Configuration conf, AbstractList<File> dirs) :
-    call(DataNode.new(Configuration, AbstractList<File>))
-    && args(conf, dirs);
+  pointcut dnConstructorPointcut(Configuration conf, AbstractList<File> dirs,
+      SecureResources resources) :
+    call(DataNode.new(Configuration, AbstractList<File>, SecureResources))
+    && args(conf, dirs, resources);
 
-  after(Configuration conf, AbstractList<File> dirs) returning (DataNode datanode):
-    dnConstructorPointcut(conf, dirs) {
+  after(Configuration conf, AbstractList<File> dirs, SecureResources resources)
+    returning (DataNode datanode):
+    dnConstructorPointcut(conf, dirs, resources) {
     try {
       UserGroupInformation ugi = UserGroupInformation.getCurrentUser();
       datanode.setUser(ugi.getShortUserName());
     } catch (IOException e) {
       datanode.LOG.warn("Unable to get the user information for the " +
-          "Jobtracker");
+          "DataNode");
     }
     datanode.setReady(true);
   }