hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomwh...@apache.org
Subject svn commit: r938563 - in /hadoop/common/trunk: ./ src/java/org/apache/hadoop/classification/ src/java/org/apache/hadoop/classification/tools/ src/java/org/apache/hadoop/fs/ src/java/org/apache/hadoop/security/ src/java/org/apache/hadoop/security/token/...
Date Tue, 27 Apr 2010 16:53:41 GMT
Author: tomwhite
Date: Tue Apr 27 16:53:40 2010
New Revision: 938563

URL: http://svn.apache.org/viewvc?rev=938563&view=rev
Log:
HADOOP-6677. InterfaceAudience.LimitedPrivate should take a string not an enum.

Modified:
    hadoop/common/trunk/CHANGES.txt
    hadoop/common/trunk/src/java/org/apache/hadoop/classification/InterfaceAudience.java
    hadoop/common/trunk/src/java/org/apache/hadoop/classification/tools/package-info.java
    hadoop/common/trunk/src/java/org/apache/hadoop/fs/FileContext.java
    hadoop/common/trunk/src/java/org/apache/hadoop/fs/UnresolvedLinkException.java
    hadoop/common/trunk/src/java/org/apache/hadoop/security/TokenStorage.java
    hadoop/common/trunk/src/java/org/apache/hadoop/security/UserGroupInformation.java
    hadoop/common/trunk/src/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenIdentifier.java
    hadoop/common/trunk/src/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSecretManager.java
    hadoop/common/trunk/src/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSelector.java
    hadoop/common/trunk/src/java/org/apache/hadoop/security/token/delegation/DelegationKey.java

Modified: hadoop/common/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/CHANGES.txt?rev=938563&r1=938562&r2=938563&view=diff
==============================================================================
--- hadoop/common/trunk/CHANGES.txt (original)
+++ hadoop/common/trunk/CHANGES.txt Tue Apr 27 16:53:40 2010
@@ -229,6 +229,9 @@ Trunk (unreleased changes)
     HADOOP-6667. RPC.waitForProxy should retry through NoRouteToHostException.
     (Todd Lipcon via tomwhite)
 
+    HADOOP-6677. InterfaceAudience.LimitedPrivate should take a string not an
+    enum. (tomwhite)
+
   OPTIMIZATIONS
 
     HADOOP-6467. Improve the performance on HarFileSystem.listStatus(..).

Modified: hadoop/common/trunk/src/java/org/apache/hadoop/classification/InterfaceAudience.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/java/org/apache/hadoop/classification/InterfaceAudience.java?rev=938563&r1=938562&r2=938563&view=diff
==============================================================================
--- hadoop/common/trunk/src/java/org/apache/hadoop/classification/InterfaceAudience.java (original)
+++ hadoop/common/trunk/src/java/org/apache/hadoop/classification/InterfaceAudience.java Tue
Apr 27 16:53:40 2010
@@ -29,13 +29,11 @@ public class InterfaceAudience {
   @Documented public @interface Public {};
   
   /**
-   * Intended only for the project(s) specified in the annotation
+   * Intended only for the project(s) specified in the annotation.
+   * For example, "Common", "HDFS", "MapReduce", "ZooKeeper", "HBase".
    */
   @Documented public @interface LimitedPrivate {
-    public enum Project {COMMON, AVRO, CHUKWA, HBASE, HDFS, 
-                         HIVE, MAPREDUCE, PIG, ZOOKEEPER};
-    
-    Project[] value();
+    String[] value();
   };
   
   /**

Modified: hadoop/common/trunk/src/java/org/apache/hadoop/classification/tools/package-info.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/java/org/apache/hadoop/classification/tools/package-info.java?rev=938563&r1=938562&r2=938563&view=diff
==============================================================================
--- hadoop/common/trunk/src/java/org/apache/hadoop/classification/tools/package-info.java
(original)
+++ hadoop/common/trunk/src/java/org/apache/hadoop/classification/tools/package-info.java
Tue Apr 27 16:53:40 2010
@@ -15,10 +15,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-@InterfaceAudience.LimitedPrivate({COMMON, AVRO, CHUKWA, HBASE, HDFS, HIVE,
-  MAPREDUCE, PIG, ZOOKEEPER})
+@InterfaceAudience.LimitedPrivate({"Common", "Avro", "Chukwa", "HBase", "HDFS",
+  "Hive", "MapReduce", "Pig", "ZooKeeper"})
 package org.apache.hadoop.classification.tools;
 
-import static org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate.Project.*;
-
 import org.apache.hadoop.classification.InterfaceAudience;

Modified: hadoop/common/trunk/src/java/org/apache/hadoop/fs/FileContext.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/java/org/apache/hadoop/fs/FileContext.java?rev=938563&r1=938562&r2=938563&view=diff
==============================================================================
--- hadoop/common/trunk/src/java/org/apache/hadoop/fs/FileContext.java (original)
+++ hadoop/common/trunk/src/java/org/apache/hadoop/fs/FileContext.java Tue Apr 27 16:53:40
2010
@@ -39,7 +39,6 @@ import org.apache.commons.logging.LogFac
 import org.apache.hadoop.HadoopIllegalArgumentException;
 import org.apache.hadoop.classification.InterfaceAudience;
 import org.apache.hadoop.classification.InterfaceStability;
-import org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate.*;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.Options.CreateOpts;
 import org.apache.hadoop.fs.Options.Rename;
@@ -1135,7 +1134,7 @@ public final class FileContext {
    * RuntimeExceptions:
    * @throws InvalidPathException If path <code>f</code> is invalid
    */
-  @InterfaceAudience.LimitedPrivate({Project.HDFS, Project.MAPREDUCE})
+  @InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"})
   @InterfaceStability.Evolving
   public BlockLocation[] getFileBlockLocations(final Path f, final long start,
       final long len) throws AccessControlException, FileNotFoundException,

Modified: hadoop/common/trunk/src/java/org/apache/hadoop/fs/UnresolvedLinkException.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/java/org/apache/hadoop/fs/UnresolvedLinkException.java?rev=938563&r1=938562&r2=938563&view=diff
==============================================================================
--- hadoop/common/trunk/src/java/org/apache/hadoop/fs/UnresolvedLinkException.java (original)
+++ hadoop/common/trunk/src/java/org/apache/hadoop/fs/UnresolvedLinkException.java Tue Apr
27 16:53:40 2010
@@ -21,12 +21,11 @@ package org.apache.hadoop.fs;
 import java.io.IOException;
 
 import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate.*;
 
 /** 
  * Thrown when a symbolic link is encountered in a path.
  */
-@InterfaceAudience.LimitedPrivate({Project.HDFS})
+@InterfaceAudience.LimitedPrivate({"HDFS"})
 public class UnresolvedLinkException extends IOException {
   private static final long serialVersionUID = 1L;
 

Modified: hadoop/common/trunk/src/java/org/apache/hadoop/security/TokenStorage.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/java/org/apache/hadoop/security/TokenStorage.java?rev=938563&r1=938562&r2=938563&view=diff
==============================================================================
--- hadoop/common/trunk/src/java/org/apache/hadoop/security/TokenStorage.java (original)
+++ hadoop/common/trunk/src/java/org/apache/hadoop/security/TokenStorage.java Tue Apr 27 16:53:40
2010
@@ -18,8 +18,6 @@
 
 package org.apache.hadoop.security;
 
-import static org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate.Project.MAPREDUCE;
-
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
@@ -42,7 +40,7 @@ import org.apache.hadoop.conf.Configurat
  * A class that provides the facilities of reading and writing 
  * secret keys and Tokens.
  */
-@InterfaceAudience.LimitedPrivate({MAPREDUCE})
+@InterfaceAudience.LimitedPrivate({"MapReduce"})
 public class TokenStorage implements Writable {
 
   private  Map<Text, byte[]> secretKeysMap = new HashMap<Text, byte[]>();

Modified: hadoop/common/trunk/src/java/org/apache/hadoop/security/UserGroupInformation.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/java/org/apache/hadoop/security/UserGroupInformation.java?rev=938563&r1=938562&r2=938563&view=diff
==============================================================================
--- hadoop/common/trunk/src/java/org/apache/hadoop/security/UserGroupInformation.java (original)
+++ hadoop/common/trunk/src/java/org/apache/hadoop/security/UserGroupInformation.java Tue
Apr 27 16:53:40 2010
@@ -17,8 +17,6 @@
  */
 package org.apache.hadoop.security;
 
-import static org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate.Project.HDFS;
-import static org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate.Project.MAPREDUCE;
 import static org.apache.hadoop.fs.CommonConfigurationKeys.HADOOP_SECURITY_AUTHENTICATION;
 
 import java.io.IOException;
@@ -542,7 +540,7 @@ public class UserGroupInformation {
    * @param userGroups the names of the groups that the user belongs to
    * @return a fake user for running unit tests
    */
-  @InterfaceAudience.LimitedPrivate({HDFS, MAPREDUCE})
+  @InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"})
   public static UserGroupInformation createUserForTesting(String user, 
                                                           String[] userGroups) {
     ensureInitialized();
@@ -568,7 +566,7 @@ public class UserGroupInformation {
    *          the names of the groups that the user belongs to
    * @return a fake user for running unit tests
    */
-  @InterfaceAudience.LimitedPrivate( { HDFS, MAPREDUCE })
+  @InterfaceAudience.LimitedPrivate( { "HDFS", "MapReduce" })
   public static UserGroupInformation createProxyUserForTesting(String user,
       UserGroupInformation realUser, String[] userGroups) {
     ensureInitialized();

Modified: hadoop/common/trunk/src/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenIdentifier.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenIdentifier.java?rev=938563&r1=938562&r2=938563&view=diff
==============================================================================
--- hadoop/common/trunk/src/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenIdentifier.java
(original)
+++ hadoop/common/trunk/src/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenIdentifier.java
Tue Apr 27 16:53:40 2010
@@ -19,8 +19,6 @@
 package org.apache.hadoop.security.token.delegation;
 
 import org.apache.hadoop.classification.InterfaceAudience;
-import static org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate.Project.HDFS;
-import static org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate.Project.MAPREDUCE;
 
 import java.io.DataInput;
 import java.io.DataOutput;
@@ -31,7 +29,7 @@ import org.apache.hadoop.io.WritableUtil
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.security.token.TokenIdentifier;
 
-@InterfaceAudience.LimitedPrivate({HDFS, MAPREDUCE})
+@InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"})
 public abstract class AbstractDelegationTokenIdentifier 
 extends TokenIdentifier {
   private static final byte VERSION = 0;

Modified: hadoop/common/trunk/src/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSecretManager.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSecretManager.java?rev=938563&r1=938562&r2=938563&view=diff
==============================================================================
--- hadoop/common/trunk/src/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSecretManager.java
(original)
+++ hadoop/common/trunk/src/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSecretManager.java
Tue Apr 27 16:53:40 2010
@@ -21,9 +21,6 @@ package org.apache.hadoop.security.token
 import org.apache.hadoop.classification.InterfaceAudience;
 import org.apache.hadoop.io.Text;
 
-import static org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate.Project.HDFS;
-import static org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate.Project.MAPREDUCE;
-
 import java.io.ByteArrayInputStream;
 import java.io.DataInputStream;
 import java.io.IOException;
@@ -42,7 +39,7 @@ import org.apache.hadoop.security.token.
 import org.apache.hadoop.util.Daemon;
 import org.apache.hadoop.util.StringUtils;
 
-@InterfaceAudience.LimitedPrivate({HDFS, MAPREDUCE})
+@InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"})
 public abstract 
 class AbstractDelegationTokenSecretManager<TokenIdent 
 extends AbstractDelegationTokenIdentifier> 

Modified: hadoop/common/trunk/src/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSelector.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSelector.java?rev=938563&r1=938562&r2=938563&view=diff
==============================================================================
--- hadoop/common/trunk/src/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSelector.java
(original)
+++ hadoop/common/trunk/src/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSelector.java
Tue Apr 27 16:53:40 2010
@@ -25,14 +25,12 @@ import org.apache.hadoop.io.Text;
 import org.apache.hadoop.security.token.Token;
 import org.apache.hadoop.security.token.TokenIdentifier;
 import org.apache.hadoop.security.token.TokenSelector;
-import static org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate.Project.HDFS;
-import static org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate.Project.MAPREDUCE;
 
 /**
  * Look through tokens to find the first delegation token that matches the
  * service and return it.
  */
-@InterfaceAudience.LimitedPrivate({HDFS, MAPREDUCE})
+@InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"})
 public 
 class AbstractDelegationTokenSelector<TokenIdent 
 extends AbstractDelegationTokenIdentifier> 

Modified: hadoop/common/trunk/src/java/org/apache/hadoop/security/token/delegation/DelegationKey.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/java/org/apache/hadoop/security/token/delegation/DelegationKey.java?rev=938563&r1=938562&r2=938563&view=diff
==============================================================================
--- hadoop/common/trunk/src/java/org/apache/hadoop/security/token/delegation/DelegationKey.java
(original)
+++ hadoop/common/trunk/src/java/org/apache/hadoop/security/token/delegation/DelegationKey.java
Tue Apr 27 16:53:40 2010
@@ -27,13 +27,11 @@ import javax.crypto.SecretKey;
 
 import org.apache.hadoop.io.Writable;
 import org.apache.hadoop.io.WritableUtils;
-import static org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate.Project.HDFS;
-import static org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate.Project.MAPREDUCE;
 
 /**
  * Key used for generating and verifying delegation tokens
  */
-@InterfaceAudience.LimitedPrivate({HDFS, MAPREDUCE})
+@InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"})
 public class DelegationKey implements Writable {
   private int keyId;
   private long expiryDate;



Mime
View raw message